summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h17
-rw-r--r--core/include/fpdfapi/fpdf_render.h2
-rw-r--r--core/include/fpdfdoc/fpdf_ap.h3
-rw-r--r--core/include/fpdfdoc/fpdf_tagged.h1
-rw-r--r--core/include/fpdfdoc/fpdf_vt.h7
-rw-r--r--core/include/fxcodec/fx_codec_provider.h4
-rw-r--r--core/include/fxcrt/fx_arb.h3
-rw-r--r--core/include/fxcrt/fx_basic.h6
-rw-r--r--core/include/fxcrt/fx_stream.h4
-rw-r--r--core/include/fxge/fpf.h5
-rw-r--r--core/include/fxge/fx_dib.h3
-rw-r--r--core/include/fxge/fx_font.h8
-rw-r--r--core/include/fxge/fx_ge.h6
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.h5
-rw-r--r--core/src/fpdfdoc/tagged_int.h9
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Module.h1
-rw-r--r--core/src/fxcrt/fx_arabic.h4
18 files changed, 60 insertions, 30 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index da22dc72ca..d2fdad4cfb 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -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;
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index c059bedb2b..e2801f61f2 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -138,7 +138,7 @@ protected:
class IPDF_BackgroundDraw
{
public:
-
+ virtual ~IPDF_BackgroundDraw() { }
virtual void OnDrawBackground(
CFX_RenderDevice* pBitmapDevice,
const CFX_AffineMatrix* pOriginal2Bitmap
diff --git a/core/include/fpdfdoc/fpdf_ap.h b/core/include/fpdfdoc/fpdf_ap.h
index 78f9676221..02bbf249c4 100644
--- a/core/include/fpdfdoc/fpdf_ap.h
+++ b/core/include/fpdfdoc/fpdf_ap.h
@@ -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 {
diff --git a/core/include/fpdfdoc/fpdf_tagged.h b/core/include/fpdfdoc/fpdf_tagged.h
index f3ab01ea28..1a2a5d4ffa 100644
--- a/core/include/fpdfdoc/fpdf_tagged.h
+++ b/core/include/fpdfdoc/fpdf_tagged.h
@@ -68,6 +68,7 @@ struct CPDF_StructKid {
class CPDF_StructElement : public CFX_Object
{
public:
+ virtual ~CPDF_StructElement() { }
virtual CPDF_StructTree* GetTree() const = 0;
diff --git a/core/include/fpdfdoc/fpdf_vt.h b/core/include/fpdfdoc/fpdf_vt.h
index 41025cbe2e..3e23c3a1a3 100644
--- a/core/include/fpdfdoc/fpdf_vt.h
+++ b/core/include/fpdfdoc/fpdf_vt.h
@@ -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
diff --git a/core/include/fxcodec/fx_codec_provider.h b/core/include/fxcodec/fx_codec_provider.h
index f26194a14e..00792ff2ad 100644
--- a/core/include/fxcodec/fx_codec_provider.h
+++ b/core/include/fxcodec/fx_codec_provider.h
@@ -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
diff --git a/core/include/fxcrt/fx_arb.h b/core/include/fxcrt/fx_arb.h
index ed0370ff74..a1dc231a8d 100644
--- a/core/include/fxcrt/fx_arb.h
+++ b/core/include/fxcrt/fx_arb.h
@@ -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
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 2a77e6e947..1c828cea48 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -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
diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h
index 0a3d1c4609..2e02f0c865 100644
--- a/core/include/fxcrt/fx_stream.h
+++ b/core/include/fxcrt/fx_stream.h
@@ -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;
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h
index 99d9b7c999..28d028cfbb 100644
--- a/core/include/fxge/fpf.h
+++ b/core/include/fxge/fpf.h
@@ -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;
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index d8a2003548..f7e435d966 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -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();
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 8744919cf8..73292a0fd1 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -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)
@@ -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
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index 82719ffda6..0c4bce8003 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -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
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
index 42f77de57b..e317aa67fd 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
@@ -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;
}
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
index c381a01304..6b1b4f2443 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
@@ -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
+
diff --git a/core/src/fpdfdoc/tagged_int.h b/core/src/fpdfdoc/tagged_int.h
index d190db6427..7efd682887 100644
--- a/core/src/fpdfdoc/tagged_int.h
+++ b/core/src/fpdfdoc/tagged_int.h
@@ -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
diff --git a/core/src/fxcodec/jbig2/JBig2_Module.h b/core/src/fxcodec/jbig2/JBig2_Module.h
index 3a01eb094c..711cf4047b 100644
--- a/core/src/fxcodec/jbig2/JBig2_Module.h
+++ b/core/src/fxcodec/jbig2/JBig2_Module.h
@@ -10,6 +10,7 @@
class CJBig2_Module
{
public:
+ virtual ~CJBig2_Module() { }
virtual void *JBig2_Malloc(FX_DWORD dwSize) = 0;
diff --git a/core/src/fxcrt/fx_arabic.h b/core/src/fxcrt/fx_arabic.h
index e44bfb8142..f55f7c60cf 100644
--- a/core/src/fxcrt/fx_arabic.h
+++ b/core/src/fxcrt/fx_arabic.h
@@ -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;