Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: fpdfsdk/src/fpdfview.cpp

Issue 370853002: pdfium: Fix all -Wdelete-non-virtual-dtor violations on Mac. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« fpdfsdk/src/fpdfeditpage.cpp ('K') | « fpdfsdk/src/fpdfsave.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../include/fsdk_define.h" 7 #include "../include/fsdk_define.h"
8 #include "../include/fpdfview.h" 8 #include "../include/fpdfview.h"
9 #include "../include/fsdk_rendercontext.h" 9 #include "../include/fsdk_rendercontext.h"
10 #include "../include/fpdf_progressive.h" 10 #include "../include/fpdf_progressive.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 catch (...) { 282 catch (...) {
283 delete pParser; 283 delete pParser;
284 SetLastError(FPDF_ERR_UNKNOWN); 284 SetLastError(FPDF_ERR_UNKNOWN);
285 return NULL; 285 return NULL;
286 } 286 }
287 return pParser->GetDocument(); 287 return pParser->GetDocument();
288 } 288 }
289 289
290 extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code); 290 extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code);
291 291
292 class CMemFile: public IFX_FileRead, public CFX_Object 292 class CMemFile FX_FINAL: public IFX_FileRead, public CFX_Object
293 { 293 {
294 public: 294 public:
295 CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {} 295 CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {}
296 296
297 virtual void Release() {delete this;} 297 virtual void Release() {delete this;}
298 virtual FX_FILESIZE GetSize() {return m_size;} 298 virtual FX_FILESIZE GetSize() {return m_size;}
299 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs et, size_t size) 299 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs et, size_t size)
300 { 300 {
301 if(offset+size > (FX_DWORD)m_size) return FALSE; 301 if(offset+size > (FX_DWORD)m_size) return FALSE;
302 FXSYS_memcpy(buffer, m_pBuf+offset, size); 302 FXSYS_memcpy(buffer, m_pBuf+offset, size);
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 { 870 {
871 if (document == NULL) 871 if (document == NULL)
872 return NULL; 872 return NULL;
873 if (name == NULL || name[0] == 0) 873 if (name == NULL || name[0] == 0)
874 return NULL; 874 return NULL;
875 875
876 CPDF_Document* pDoc = (CPDF_Document*)document; 876 CPDF_Document* pDoc = (CPDF_Document*)document;
877 CPDF_NameTree name_tree(pDoc, FX_BSTRC("Dests")); 877 CPDF_NameTree name_tree(pDoc, FX_BSTRC("Dests"));
878 return name_tree.LookupNamedDest(pDoc, name); 878 return name_tree.LookupNamedDest(pDoc, name);
879 } 879 }
OLDNEW
« fpdfsdk/src/fpdfeditpage.cpp ('K') | « fpdfsdk/src/fpdfsave.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698