merge to XFA: Fix -Wnon-virtual-dtor compiler warnings.
authorTom Sepez <tsepez@chromium.org>
Fri, 9 Jan 2015 19:46:17 +0000 (11:46 -0800)
committerTom Sepez <tsepez@chromium.org>
Fri, 9 Jan 2015 19:46:17 +0000 (11:46 -0800)
Original at URL: https://codereview.chromium.org/810883005

Note that the new code in XFA introduces many more of these, to be handled
separately.

TBR=brucedawson@chromium.org
TBR=thestig@chromium.org

BUG=https://code.google.com/p/pdfium/issues/detail?id=102

Review URL: https://codereview.chromium.org/842223004

27 files changed:
core/include/fpdfapi/fpdf_parser.h
core/include/fpdfapi/fpdf_render.h
core/include/fpdfdoc/fpdf_ap.h
core/include/fpdfdoc/fpdf_tagged.h
core/include/fpdfdoc/fpdf_vt.h
core/include/fxcodec/fx_codec_provider.h
core/include/fxcrt/fx_arb.h
core/include/fxcrt/fx_basic.h
core/include/fxcrt/fx_stream.h
core/include/fxge/fpf.h
core/include/fxge/fx_dib.h
core/include/fxge/fx_font.h
core/include/fxge/fx_ge.h
core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
core/src/fpdfapi/fpdf_font/ttgsubtable.h
core/src/fpdfdoc/tagged_int.h
core/src/fxcodec/jbig2/JBig2_Module.h
core/src/fxcrt/fx_arabic.h
fpdfsdk/include/fsdk_annothandler.h
fpdfsdk/include/fxedit/fx_edit.h
fpdfsdk/include/javascript/IJavaScript.h
fpdfsdk/include/pdfwindow/PWL_Edit.h
fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
fpdfsdk/include/pdfwindow/PWL_IconList.h
fpdfsdk/include/pdfwindow/PWL_Note.h
fpdfsdk/include/pdfwindow/PWL_Wnd.h
fpdfsdk/src/fpdf_sysfontinfo.cpp

index da22dc7..d2fdad4 100644 (file)
@@ -49,7 +49,7 @@ class CFX_PrivateData;
 class IPDF_EnumPageHandler
 {
 public:
-
+    virtual ~IPDF_EnumPageHandler() { }
     virtual FX_BOOL EnumPage(CPDF_Dictionary* pPageDict) = 0;
 };
 class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects
@@ -247,8 +247,7 @@ class CPDF_SyntaxParser : public CFX_Object
 public:
 
     CPDF_SyntaxParser();
-
-    ~CPDF_SyntaxParser();
+    virtual ~CPDF_SyntaxParser();
 
     void                               InitParser(IFX_FileRead* pFileAccess, FX_DWORD HeaderOffset);
 
@@ -366,7 +365,7 @@ struct PARSE_CONTEXT {
 class IPDF_DocParser : public CFX_Object
 {
 public:
-
+    virtual ~IPDF_DocParser() { }
     virtual FX_DWORD   GetRootObjNum() = 0;
 
     virtual FX_DWORD   GetInfoObjNum() = 0;
@@ -402,8 +401,7 @@ class CPDF_Parser FX_FINAL : public IPDF_DocParser
 public:
 
     CPDF_Parser();
-
-    ~CPDF_Parser();
+    ~CPDF_Parser() override;
 
     FX_DWORD                   StartParse(FX_LPCSTR filename, FX_BOOL bReParse = FALSE);
 
@@ -853,13 +851,13 @@ protected:
 class IFX_FileAvail
 {
 public:
-
+    virtual ~IFX_FileAvail() { }
     virtual FX_BOOL                    IsDataAvail( FX_FILESIZE offset, FX_DWORD size) = 0;
 };
 class IFX_DownloadHints
 {
 public:
-
+    virtual ~IFX_DownloadHints() { }
     virtual void                       AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0;
 };
 #define PDF_IS_LINEARIZED                      1
@@ -871,13 +869,12 @@ public:
 class IPDF_DataAvail
 {
 public:
+    virtual ~IPDF_DataAvail() { }
 
     virtual FX_BOOL                    IsDocAvail(IFX_DownloadHints* pHints) = 0;
 
-
     virtual void                       SetDocument(CPDF_Document* pDoc) = 0;
 
-
     virtual FX_BOOL                    IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0;
 
     virtual FX_BOOL                    IsLinearized() = 0;
index c059bed..e2801f6 100644 (file)
@@ -138,7 +138,7 @@ protected:
 class IPDF_BackgroundDraw
 {
 public:
-
+    virtual ~IPDF_BackgroundDraw() { }
     virtual    void    OnDrawBackground(
         CFX_RenderDevice* pBitmapDevice,
         const CFX_AffineMatrix* pOriginal2Bitmap
index 78f9676..02bbf24 100644 (file)
@@ -13,9 +13,8 @@
 class IPVT_FontMap
 {
 public:
-
+    virtual ~IPVT_FontMap() { }
     virtual CPDF_Font*                                         GetPDFFont(FX_INT32 nFontIndex) = 0;
-
     virtual CFX_ByteString                                     GetPDFFontAlias(FX_INT32 nFontIndex) = 0;
 };
 struct CPVT_Dash {
index f3ab01e..1a2a5d4 100644 (file)
@@ -68,6 +68,7 @@ struct CPDF_StructKid {
 class CPDF_StructElement : public CFX_Object
 {
 public:
+    virtual ~CPDF_StructElement() { }
 
     virtual CPDF_StructTree*   GetTree() const = 0;
 
index 41025cb..3e23c3a 100644 (file)
@@ -275,6 +275,7 @@ struct CPVT_Section {
 class IPDF_VariableText_Provider
 {
 public:
+    virtual ~IPDF_VariableText_Provider() { }
 
     virtual FX_INT32                                           GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle) = 0;
 
@@ -291,6 +292,7 @@ public:
 class IPDF_VariableText_Iterator
 {
 public:
+    virtual ~IPDF_VariableText_Iterator() { }
 
     virtual FX_BOOL                                                    NextWord() = 0;
 
@@ -323,11 +325,9 @@ public:
 class IPDF_VariableText
 {
 public:
-
     static IPDF_VariableText*                  NewVariableText();
 
     static void                                                        DelVariableText(IPDF_VariableText* pVT);
-public:
 
     virtual IPDF_VariableText_Provider*                SetProvider(IPDF_VariableText_Provider * pProvider) = 0;
 
@@ -440,5 +440,8 @@ public:
     virtual FX_INT32                                           WordPlaceToWordIndex(const CPVT_WordPlace & place) const = 0;
 
     virtual CPVT_WordPlace                                     WordIndexToWordPlace(FX_INT32 index) const = 0;
+
+protected:
+    ~IPDF_VariableText() { }
 };
 #endif
index f26194a..00792ff 100644 (file)
@@ -10,7 +10,6 @@ class CFX_DIBAttribute;
 class IFX_JpegProvider
 {
 public:
-
     virtual void               Release() = 0;
 
     virtual void*              CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height, int nComps, FX_BOOL ColorTransform) = 0;
@@ -49,5 +48,8 @@ public:
 
 
     virtual FX_DWORD   GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr = NULL) = 0;
+
+protected:
+    ~IFX_JpegProvider() { }
 };
 #endif
index ed0370f..a1dc231 100644 (file)
@@ -64,5 +64,8 @@ public:
     virtual FX_BOOL                    EndChar() = 0;
     virtual FX_INT32           GetBidiInfo(FX_INT32 &iStart, FX_INT32 &iCount) = 0;
     virtual void                       Reset() = 0;
+
+protected:
+    ~IFX_BidiChar() { }
 };
 #endif
index 2a77e6e..1c828ce 100644 (file)
@@ -240,7 +240,7 @@ class IFX_BufferArchive
 {
 public:
     IFX_BufferArchive(FX_STRSIZE size);
-
+    virtual ~IFX_BufferArchive() { }
 
     virtual void                       Clear();
 
@@ -271,7 +271,7 @@ class CFX_FileBufferArchive : public IFX_BufferArchive, public CFX_Object
 {
 public:
     CFX_FileBufferArchive(FX_STRSIZE size = 32768);
-    ~CFX_FileBufferArchive();
+    ~CFX_FileBufferArchive() override;
     virtual void                       Clear();
 
     FX_BOOL                                    AttachFile(IFX_StreamWrite *pFile, FX_BOOL bTakeover = FALSE);
@@ -1377,7 +1377,7 @@ protected:
 class IFX_Pause
 {
 public:
-
+    virtual ~IFX_Pause() { }
     virtual FX_BOOL    NeedToPauseNow() = 0;
 };
 class CFX_DataFilter : public CFX_Object
index 0a3d1c4..2e02f0c 100644 (file)
@@ -65,7 +65,7 @@ FX_BOOL               FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst);
 class IFX_StreamWrite
 {
 public:
-
+    virtual ~IFX_StreamWrite() { }
     virtual void               Release() = 0;
 
     virtual    FX_BOOL         WriteBlock(const void* pData, size_t size) = 0;
@@ -91,6 +91,7 @@ IFX_FileWrite* FX_CreateFileWrite(FX_LPCWSTR filename);
 class IFX_StreamRead
 {
 public:
+    virtual ~IFX_StreamRead() { }
 
     virtual void                       Release() = 0;
 
@@ -103,7 +104,6 @@ public:
 class IFX_FileRead : IFX_StreamRead
 {
 public:
-
     virtual void                       Release() = 0;
 
     virtual FX_FILESIZE                GetSize() = 0;
index 99d9b7c..28d028c 100644 (file)
@@ -12,6 +12,7 @@ class IFPF_Font;
 class IFPF_DeviceModule
 {
 public:
+    virtual ~IFPF_DeviceModule() { }
     virtual void                               Destroy() = 0;
     virtual IFPF_FontMgr*              GetFontMgr() = 0;
 };
@@ -41,10 +42,14 @@ public:
     virtual FX_INT32           GetHeight() const = 0;
     virtual FX_INT32           GetItalicAngle() const = 0;
     virtual FX_DWORD           GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize) = 0;
+
+protected:
+    ~IFPF_Font() { }
 };
 class IFPF_FontMgr
 {
 public:
+    virtual ~IFPF_FontMgr() { }
     virtual void                       LoadSystemFonts() = 0;
     virtual void                       LoadPrivateFont(IFX_FileRead* pFontFile) = 0;
     virtual void                       LoadPrivateFont(FX_BSTR bsFileName) = 0;
index d8a2003..f7e435d 100644 (file)
@@ -402,16 +402,15 @@ protected:
 class IFX_ScanlineComposer
 {
 public:
+    virtual ~IFX_ScanlineComposer() { }
 
     virtual    void            ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha = NULL) = 0;
 
-
     virtual FX_BOOL            SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0;
 };
 class CFX_ScanlineCompositor : public CFX_Object
 {
 public:
-
     CFX_ScanlineCompositor();
 
     ~CFX_ScanlineCompositor();
index 8744919..73292a0 100644 (file)
@@ -274,6 +274,7 @@ public:
 class IFX_FontEnumerator
 {
 public:
+    virtual ~IFX_FontEnumerator() { }
 
     virtual void               HitFont() = 0;
 
@@ -282,6 +283,7 @@ public:
 class IFX_AdditionalFontEnum
 {
 public:
+    virtual ~IFX_AdditionalFontEnum() { }
     virtual int  CountFiles() = 0;
     virtual IFX_FileStream* GetFontFile(int index) = 0;
 };
@@ -328,6 +330,7 @@ class IFX_SystemFontInfo : public CFX_Object
 public:
     static IFX_SystemFontInfo* CreateDefault();
     virtual void               Release() = 0;
+
     virtual    FX_BOOL         EnumFontList(CFX_FontMapper* pMapper) = 0;
     virtual void*              MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact) = 0;
     virtual void*              MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family)\r
@@ -347,6 +350,8 @@ public:
     {
         return NULL;
     }
+protected:
+    ~IFX_SystemFontInfo() { }
 };
 class CFX_FolderFontInfo : public IFX_SystemFontInfo
 {
@@ -460,6 +465,9 @@ class IFX_GSUBTable
 public:
     virtual void       Release() = 0;
     virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0;
+
+protected:
+     ~IFX_GSUBTable() { }
 };
 IFX_GSUBTable* FXGE_CreateGSUBTable(CFX_Font* pFont);
 #endif
index 82719ff..0c4bce8 100644 (file)
@@ -637,9 +637,11 @@ public:
 class IFX_PSOutput
 {
 public:
-
-    virtual void       OutputPS(FX_LPCSTR string, int len) = 0;
     virtual void  Release() = 0;
+    virtual void       OutputPS(FX_LPCSTR string, int len) = 0;
+
+protected:
+    ~IFX_PSOutput() { }
 };
 class CPSFont;
 class CFX_PSRenderer : public CFX_Object
index 42f77de..e317aa6 100644 (file)
@@ -446,7 +446,7 @@ IFX_GSUBTable* FXGE_CreateGSUBTable(CFX_Font* pFont)
         if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->m_pGsubData)) {
             return pGsubTable;
         }
-        delete pGsubTable;
+        pGsubTable->Release();
     }
     return NULL;
 }
index c381a01..6b1b4f2 100644 (file)
@@ -414,6 +414,11 @@ public:
         delete this;
     }
     virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) FX_OVERRIDE;
+
     CFX_CTTGSUBTable m_GsubImp;
+
+private:
+    ~CFX_GSUBTable() { }
 };
 #endif
+
index d190db6..7efd682 100644 (file)
@@ -6,7 +6,9 @@
 
 #ifndef _FPDF_TAGGED_INT_H_
 #define _FPDF_TAGGED_INT_H_
-class CPDF_StructTreeImpl;
+
+#include "../../include/fpdfdoc/fpdf_tagged.h"
+
 class CPDF_StructElementImpl;
 class CPDF_StructTreeImpl : public CPDF_StructTree
 {
@@ -36,7 +38,6 @@ class CPDF_StructElementImpl FX_FINAL : public CPDF_StructElement
 {
 public:
     CPDF_StructElementImpl(CPDF_StructTreeImpl* pTree, CPDF_StructElementImpl* pParent, CPDF_Dictionary* pDict);
-    ~CPDF_StructElementImpl();
     CPDF_StructTree*           GetTree() const
     {
         return m_pTree;
@@ -79,13 +80,15 @@ public:
     CPDF_StructElementImpl*    Retain();
     void                                       Release();
 protected:
+    ~CPDF_StructElementImpl();
+
     CPDF_StructTreeImpl*       m_pTree;
     CFX_ByteString                     m_Type;
     CPDF_StructElementImpl*    m_pParent;
     CPDF_Dictionary*           m_pDict;
     CFX_ArrayTemplate<CPDF_StructKid>  m_Kids;
-
     int                        m_RefCount;
+
     friend class CPDF_StructTreeImpl;
 };
 #endif
index 3a01eb0..711cf40 100644 (file)
@@ -10,6 +10,7 @@
 class CJBig2_Module
 {
 public:
+    virtual ~CJBig2_Module() { }
 
     virtual void *JBig2_Malloc(FX_DWORD dwSize) = 0;
 
index e44bfb8..f55f7c6 100644 (file)
@@ -195,7 +195,9 @@ public:
     virtual FX_BOOL            EndChar() FX_OVERRIDE;
     virtual FX_INT32   GetBidiInfo(FX_INT32 &iStart, FX_INT32 &iCount) FX_OVERRIDE;
     virtual void               Reset() FX_OVERRIDE;
-protected:
+
+private:
+    ~CFX_BidiChar() { }
     FX_BOOL            m_bSeparateNeutral;
     FX_INT32   m_iCurStart;
     FX_INT32   m_iCurCount;
index 6aa9412..6f2b71b 100644 (file)
@@ -306,26 +306,28 @@ typedef int (*AI_COMPARE) (CPDFSDK_Annot* p1, CPDFSDK_Annot* p2);
 
 class CPDFSDK_AnnotIterator
 {
-protected:
-       CPDFSDK_Annot*  NextAnnot (const CPDFSDK_Annot* pCurrent) ;
-       CPDFSDK_Annot*  PrevAnnot (const CPDFSDK_Annot* pCurrent) ;     
-       CPDFSDK_Annot*  NextAnnot(int& index ) ;
-       CPDFSDK_Annot*  PrevAnnot(int& index ) ;
 public:
     CPDFSDK_AnnotIterator(CPDFSDK_PageView * pPageView, FX_BOOL bReverse,
-               FX_BOOL bIgnoreTopmost=FALSE,FX_BOOL bCircle=FALSE,CFX_PtrArray* pList=NULL);   
+               FX_BOOL bIgnoreTopmost=FALSE,FX_BOOL bCircle=FALSE,CFX_PtrArray* pList=NULL);
+    virtual ~CPDFSDK_AnnotIterator() { }
+
        virtual CPDFSDK_Annot*  Next (const CPDFSDK_Annot* pCurrent) ;
        virtual CPDFSDK_Annot*  Prev (const CPDFSDK_Annot* pCurrent) ;  
        virtual CPDFSDK_Annot*  Next(int& index ) ;
        virtual CPDFSDK_Annot*  Prev(int& index ) ;
        virtual int             Count(){return m_pIteratorAnnotList.GetSize();}
-       
+
        virtual FX_BOOL         InitIteratorAnnotList(CPDFSDK_PageView * pPageView,CFX_PtrArray* pList=NULL);
-       
+
        void                                    InsertSort(CFX_PtrArray &arrayList, AI_COMPARE pCompare);
+
 protected:
-       //      CFX_PtrList                      m_pIteratorAnnotList; 
-       CFX_PtrArray         m_pIteratorAnnotList;      
+       CPDFSDK_Annot*  NextAnnot (const CPDFSDK_Annot* pCurrent) ;
+       CPDFSDK_Annot*  PrevAnnot (const CPDFSDK_Annot* pCurrent) ;
+       CPDFSDK_Annot*  NextAnnot(int& index ) ;
+       CPDFSDK_Annot*  PrevAnnot(int& index ) ;
+
+       CFX_PtrArray         m_pIteratorAnnotList;
        FX_BOOL                      m_bReverse;
        FX_BOOL              m_bIgnoreTopmost;
        FX_BOOL              m_bCircle;
index 95b9096..a8cd711 100644 (file)
@@ -44,6 +44,7 @@ class IFX_SystemHandler;
 class IFX_Edit_FontMap
 {
 public:
+        virtual ~IFX_Edit_FontMap() { }
        //map a fontindex to pdf font.
        virtual CPDF_Font *                                             GetPDFFont(FX_INT32 nFontIndex) = 0;
        //get the alias of a pdf font.
@@ -58,8 +59,8 @@ public:
 
 class IFX_Edit_Notify
 {
-       //this class is implemented by user
 public:
+        virtual ~IFX_Edit_Notify() { }
        //set the horizontal scrollbar information.
        virtual void                                                    IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, 
                                                                                                FX_FLOAT fContentMin, FX_FLOAT fContentMax, 
@@ -84,8 +85,9 @@ public:
 
 class IFX_Edit_OprNotify
 {
-       //this class is implemented by user
 public:
+        virtual ~IFX_Edit_OprNotify() { }
+
        //OprType: 0
        virtual void                                                    OnInsertWord(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace) = 0;
        //OprType: 1
@@ -143,10 +145,13 @@ public:
 class IFX_Edit_UndoItem
 {
 public:
+       virtual void                                                    Release() = 0;
        virtual void                                                    Undo() = 0;
        virtual void                                                    Redo() = 0;
        virtual CFX_WideString                                  GetUndoTitle() = 0;
-       virtual void                                                    Release() = 0;
+
+protected:
+        ~IFX_Edit_UndoItem() { }
 };
 
 class FXET_CLASS IFX_Edit
@@ -155,8 +160,7 @@ public:
        static IFX_Edit*                                                NewEdit();
        static  void                                                    DelEdit(IFX_Edit* pEdit);
 
-public:
-       //set a IFX_Edit_FontMap pointer implemented by user.
+        //set a IFX_Edit_FontMap pointer implemented by user.
        virtual void                                                    SetFontMap(IFX_Edit_FontMap* pFontMap) = 0;
        //if user don't like to use FontMap, implement VTProvider and set it directly.
        virtual void                                                    SetVTProvider(IPDF_VariableText_Provider* pProvider) = 0;
@@ -371,7 +375,6 @@ public:
 
        virtual void                                                    AddUndoItem(IFX_Edit_UndoItem* pUndoItem) = 0;
 
-public:
        static CFX_ByteString                                   GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, 
                                                                                                        const CPVT_WordRange* pRange = NULL, 
                                                                                                        FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0);
@@ -388,12 +391,15 @@ public:
                                                                                                        const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
        static void                                                             GenerateUnderlineObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEdit,
                                                                                                        const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, FX_COLORREF color);
+
+protected:
+    ~IFX_Edit() { }
 };
 
 class IFX_List_Notify
 {
-       //this class is implemented by user
 public:
+        virtual ~IFX_List_Notify() { }
        //set the horizontal scrollbar information.
        virtual void                                                    IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, 
                                                                                                FX_FLOAT fContentMin, FX_FLOAT fContentMax, 
@@ -416,7 +422,6 @@ public:
        static IFX_List*                                                NewList();
        static void                                                             DelList(IFX_List* pList);
 
-public:
        virtual void                                                    SetFontMap(IFX_Edit_FontMap * pFontMap) = 0;
        virtual void                                                    SetNotify(IFX_List_Notify * pNotify) = 0;
 
@@ -465,7 +470,10 @@ public:
        virtual void                                                    OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
        virtual void                                                    OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
        virtual FX_BOOL                                                 OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+
+protected:
+        ~IFX_List() { }
 };
 
-#endif 
+#endif
 
index 7754537..fbd89d2 100644 (file)
@@ -11,13 +11,13 @@ namespace v8 {
 class Platform;
 }
 
-class IFXJS_Context  
+class IFXJS_Context
 {
 public:
+        virtual ~IFXJS_Context() { }
        virtual FX_BOOL                         Compile(const CFX_WideString& script, CFX_WideString& info) = 0;
        virtual FX_BOOL                         RunScript(const CFX_WideString& script, CFX_WideString& info) = 0;
 
-public:
        virtual void                            OnApp_Init() = 0;
 
        virtual void                            OnDoc_Open(CPDFSDK_Document* pDoc, const CFX_WideString& strTargetName) = 0;
@@ -31,7 +31,7 @@ public:
        virtual void                            OnPage_Close(CPDFSDK_Document* pTarget) = 0;
        virtual void                            OnPage_InView(CPDFSDK_Document* pTarget) = 0;
        virtual void                            OnPage_OutView(CPDFSDK_Document* pTarget) = 0;
-       
+
        virtual void                            OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0;
        virtual void                            OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0;
        virtual void                            OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0;
@@ -90,6 +90,9 @@ public:
        virtual FX_BOOL                         IsEntered() = 0;
        virtual FX_BOOL                         GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
        virtual FX_BOOL                         SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
+
+protected:
+         ~IFXJS_Runtime() { }
 };
 
 class CPDFDoc_Environment;
index 6af324d..f7d7b6f 100644 (file)
@@ -14,6 +14,7 @@ class IPWL_SpellCheck;
 class IPWL_Filler_Notify
 {
 public:
+        virtual ~IPWL_Filler_Notify() { }
        virtual void                                    QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, 
                                                                                FX_INT32 & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top)
        virtual void                                    OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode,
index b13d5e1..c9d87b2 100644 (file)
@@ -30,6 +30,7 @@ class CPWL_Edit;
 class IPWL_Edit_Notify
 {
 public:
+        virtual ~IPWL_Edit_Notify() { }
        //when the position of caret is changed in edit
        virtual void                                    OnCaretMove(FX_INT32 x1, FX_INT32 y1, FX_INT32 x2, FX_INT32 y2) {}
        virtual void                                    OnContentChange(const CPDF_Rect& rcContent){}
index effabd0..6b3d577 100644 (file)
@@ -16,6 +16,7 @@ class CPWL_Label;
 class IPWL_IconList_Notify
 {
 public:
+        virtual ~IPWL_IconList_Notify() { }
        virtual void                                            OnNoteListSelChanged(FX_INT32 nItemIndex) = 0;
 };
 
index b3f7358..125271f 100644 (file)
@@ -27,6 +27,7 @@ class IPopup_Note;
 class IPWL_NoteNotify
 {
 public:
+       virtual ~IPWL_NoteNotify() { }
        virtual void                                            OnNoteMove(const FX_RECT& rtWin) = 0;
        virtual void                                            OnNoteShow(FX_BOOL bShow) = 0;
        virtual void                                            OnNoteActivate(FX_BOOL bActive) = 0;
@@ -45,12 +46,14 @@ public:
 class IPWL_NoteHandler
 {
 public:
+       virtual ~IPWL_NoteHandler() { }
        virtual void                                            OnNoteColorChanged(const CPWL_Color& color) = 0;
 };
 
 class IPWL_NoteItem
 {
 public:
+       virtual ~IPWL_NoteItem() { }
        virtual void                                            SetPrivateData(void* pData) = 0;
        virtual void                                            SetBkColor(const CPWL_Color& color) = 0;
        virtual void                                            SetSubjectName(const CFX_WideString& sName) = 0;
index c3dd9b7..51a3058 100644 (file)
@@ -168,6 +168,7 @@ inline FX_BOOL operator != (const CPWL_Color &c1, const CPWL_Color &c2)
 class IPWL_SpellCheck
 {
 public:
+        virtual ~IPWL_SpellCheck() { }
        virtual FX_BOOL                                                 CheckWord(FX_LPCSTR sWord) = 0;
        virtual void                                                    SuggestWords(FX_LPCSTR sWord, CFX_ByteStringArray & sSuggest) = 0;      
 };
@@ -175,6 +176,8 @@ public:
 class IPWL_Provider
 {
 public:
+        virtual ~IPWL_Provider() { }
+
        //get a matrix which map user space to CWnd client space
        virtual CPDF_Matrix                                             GetWindowMatrix(void* pAttachedData) = 0;
 
@@ -193,6 +196,7 @@ public:
 class IPWL_FocusHandler
 {
 public:
+        virtual ~IPWL_FocusHandler() { }
        virtual void                                                    OnSetFocus(CPWL_Wnd* pWnd) = 0;
        virtual void                                                    OnKillFocus(CPWL_Wnd* pWnd) = 0;
 };
index 0e0114b..f60dc97 100644 (file)
@@ -75,6 +75,9 @@ public:
                if (m_pInfo->DeleteFont)
                        m_pInfo->DeleteFont(m_pInfo, hFont);
        }
+
+private:
+        ~CSysFontInfo_Ext() { }
 };
 
 DLLEXPORT void STDCALL FPDF_AddInstalledFont(void* mapper, const char* name, int charset)