summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-31 14:21:42 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-31 14:21:42 -0700
commit4d2e494e38ffdeb0143fbe3f624743499ebcac80 (patch)
treed919c4860fc5cc743919eda79f3d76fea39c482b /fpdfsdk
parent01fa1efb228acdcf5250804c670107133668e4b2 (diff)
downloadpdfium-4d2e494e38ffdeb0143fbe3f624743499ebcac80.tar.xz
Name IFX_SysFontInfo subclasses consistently.
Nearly a naming-only change, but add one argument to constructor. grep now shows: class CFX_AndroidFontInfo : public IFX_SystemFontInfo class CFX_Win32FontInfo final : public IFX_SystemFontInfo class CFX_ExternalFontInfo final : public IFX_SystemFontInfo class CFX_FolderFontInfo : public IFX_SystemFontInfo class CFX_MacFontInfo : public CFX_FolderFontInfo class CFX_LinuxFontInfo : public CFX_FolderFontInfo R=thestig@chromium.org Review URL: https://codereview.chromium.org/1257743005 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/src/fpdf_sysfontinfo.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp
index cf0cdd915b..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 = 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()