diff options
Diffstat (limited to 'xfa/src')
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffapp.cpp | 7 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffapp.h | 7 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_fontmgr.cpp | 7 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_fontmgr.h | 6 |
4 files changed, 15 insertions, 12 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffapp.cpp b/xfa/src/fxfa/src/app/xfa_ffapp.cpp index 67ec95b009..abd02460d1 100644 --- a/xfa/src/fxfa/src/app/xfa_ffapp.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffapp.cpp @@ -134,9 +134,14 @@ FX_BOOL CXFA_FileRead2::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) }
return FALSE;
}
+// static
IXFA_App* IXFA_App::Create(IXFA_AppProvider* pProvider)
{
- return FX_NEW CXFA_FFApp(pProvider);
+ return new CXFA_FFApp(pProvider);
+}
+// virtual
+IXFA_App::~IXFA_App()
+{
}
CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider)
: m_pDocHandler(NULL)
diff --git a/xfa/src/fxfa/src/app/xfa_ffapp.h b/xfa/src/fxfa/src/app/xfa_ffapp.h index 82d0b95e02..b99f1fe209 100644 --- a/xfa/src/fxfa/src/app/xfa_ffapp.h +++ b/xfa/src/fxfa/src/app/xfa_ffapp.h @@ -47,11 +47,8 @@ class CXFA_FFApp : public IXFA_App, public IFWL_AdapterNative {
public:
CXFA_FFApp(IXFA_AppProvider* pProvider);
- ~CXFA_FFApp();
- virtual void Release()
- {
- delete this;
- }
+ ~CXFA_FFApp() override;
+
virtual IXFA_DocHandler* GetDocHandler();
virtual XFA_HDOC CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile);
virtual XFA_HDOC CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc);
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp index ef49911dc1..8138e5870b 100644 --- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp +++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp @@ -1010,10 +1010,15 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName(FX_WSTR wsFontName) return NULL;
#endif
}
-IXFA_FontMgr* XFA_GetDefaultFontMgr()
+// static
+IXFA_FontMgr* IXFA_FontMgr::CreateDefault()
{
return FX_NEW CXFA_DefFontMgr;
}
+// virtual
+IXFA_FontMgr::~IXFA_FontMgr()
+{
+}
CXFA_DefFontMgr::~CXFA_DefFontMgr()
{
FX_INT32 iCounts = m_CacheFonts.GetSize();
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.h b/xfa/src/fxfa/src/app/xfa_fontmgr.h index 09e0d19096..fd65570115 100644 --- a/xfa/src/fxfa/src/app/xfa_fontmgr.h +++ b/xfa/src/fxfa/src/app/xfa_fontmgr.h @@ -17,11 +17,7 @@ class CXFA_DefFontMgr : public IXFA_FontMgr {
public:
CXFA_DefFontMgr() {}
- virtual ~CXFA_DefFontMgr();
- virtual void Release()
- {
- delete this;
- }
+ ~CXFA_DefFontMgr() override;
virtual IFX_Font* GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
virtual IFX_Font* GetDefaultFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
protected:
|