diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-31 14:39:22 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-31 14:39:22 -0700 |
commit | 58b2a2cef3f50c8cc771708798214c7a785fdad0 (patch) | |
tree | b5061f2190a7e5be8839ab09d7f55909437a4576 /fpdfsdk/src/fpdf_sysfontinfo.cpp | |
parent | d1e6a3f6d95e37cae3caf40bca0a0aacf8d0e223 (diff) | |
download | pdfium-58b2a2cef3f50c8cc771708798214c7a785fdad0.tar.xz |
Merge to XFA: Name IFX_SysFontInfo subclasses consistently.
(cherry picked from commit 4d2e494e38ffdeb0143fbe3f624743499ebcac80)
Original Review URL: https://codereview.chromium.org/1257743005 .
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1258283004 .
Diffstat (limited to 'fpdfsdk/src/fpdf_sysfontinfo.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_sysfontinfo.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp index 18d0af06a5..6b7d6fbe4c 100644 --- a/fpdfsdk/src/fpdf_sysfontinfo.cpp +++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp @@ -8,10 +8,10 @@ #include "../include/fsdk_define.h" #include "../include/pdfwindow/PWL_FontMap.h" -class CSysFontInfo_Ext final : public IFX_SystemFontInfo +class CFX_ExternalFontInfo final : public IFX_SystemFontInfo { public: - FPDF_SYSFONTINFO* m_pInfo; + CFX_ExternalFontInfo(FPDF_SYSFONTINFO* pInfo) : m_pInfo(pInfo) { } virtual void Release() override { @@ -78,7 +78,9 @@ public: } private: - ~CSysFontInfo_Ext() { } + ~CFX_ExternalFontInfo() { } + + FPDF_SYSFONTINFO* const m_pInfo; }; DLLEXPORT void STDCALL FPDF_AddInstalledFont(void* mapper, const char* name, int charset) @@ -88,11 +90,11 @@ DLLEXPORT void STDCALL FPDF_AddInstalledFont(void* mapper, const char* name, int DLLEXPORT void STDCALL FPDF_SetSystemFontInfo(FPDF_SYSFONTINFO* pFontInfoExt) { - if (pFontInfoExt->version != 1) return; + if (pFontInfoExt->version != 1) + return; - CSysFontInfo_Ext* pFontInfo = FX_NEW CSysFontInfo_Ext; - pFontInfo->m_pInfo = pFontInfoExt; - CFX_GEModule::Get()->GetFontMgr()->SetSystemFontInfo(pFontInfo); + CFX_GEModule::Get()->GetFontMgr()->SetSystemFontInfo( + new CFX_ExternalFontInfo(pFontInfoExt)); } DLLEXPORT const FPDF_CharsetFontMap* STDCALL FPDF_GetDefaultTTFMap() |