diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-27 12:47:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-27 12:47:01 -0700 |
commit | 303e525325904cd9b6a847f48951510e7dd8a45e (patch) | |
tree | dab3ff0e3bda317dc51ef0caf8d15daf88e7e6b8 /xfa/fgas/font/fgas_stdfontmgr.cpp | |
parent | 43854a5073602a4613131aa6dbac5f7b9a095bcd (diff) | |
download | pdfium-303e525325904cd9b6a847f48951510e7dd8a45e.tar.xz |
More IFX_ interface cleanup.
Remove IFX_FontProvider, IFX_FontSourceEnum, IFX_SAXReader and
IFX_SAXReaderHandler.
Review-Url: https://codereview.chromium.org/1930533002
Diffstat (limited to 'xfa/fgas/font/fgas_stdfontmgr.cpp')
-rw-r--r-- | xfa/fgas/font/fgas_stdfontmgr.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index dedc8b0ad2..a3964d2bb8 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -555,21 +555,19 @@ IFX_FileAccess* CFX_FontSourceEnum_File::GetNext(FX_POSITION& pos) { pos = 0 != m_wsNext.GetLength() ? pAccess : NULL; return (IFX_FileAccess*)pAccess; } -IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum() { - return (IFX_FontSourceEnum*)new CFX_FontSourceEnum_File; -} -IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum) { - if (NULL == pFontEnum) { - return NULL; - } + +IFX_FontMgr* IFX_FontMgr::Create(CFX_FontSourceEnum_File* pFontEnum) { + if (!pFontEnum) + return nullptr; + CFX_FontMgrImp* pFontMgr = new CFX_FontMgrImp(pFontEnum); - if (pFontMgr->EnumFonts()) { + if (pFontMgr->EnumFonts()) return pFontMgr; - } + delete pFontMgr; - return NULL; + return nullptr; } -CFX_FontMgrImp::CFX_FontMgrImp(IFX_FontSourceEnum* pFontEnum) +CFX_FontMgrImp::CFX_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum) : m_pFontSource(pFontEnum) {} FX_BOOL CFX_FontMgrImp::EnumFontsFromFontMapper() { |