diff options
author | npm <npm@chromium.org> | 2016-11-11 17:16:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-11 17:16:23 -0800 |
commit | 8f3eb6051c0465923d6694bd0f0b6dc5bb51cbe3 (patch) | |
tree | df8f721cdf86d0c0cd3a0780bb55ac9a7a58f4f1 /xfa/fxfa | |
parent | c40697b24550182898b30de639790eaf82ebf158 (diff) | |
download | pdfium-8f3eb6051c0465923d6694bd0f0b6dc5bb51cbe3.tar.xz |
Remove IFGAS_FontMgr and clean up (the renamed) CFGAS_FontMgr a little.
IFGAS_FontMgr is an interface only for a class only defined on Windows,
plus a class only defined for non-Windows. I'm removing the interface,
renaming the class to have the same name in both cases, and cleaning up
a bit of unused methods.
Review-Url: https://codereview.chromium.org/2494883002
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/app/xfa_ffapp.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_fontmgr.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_textlayout.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/xfa_ffapp.h | 6 | ||||
-rw-r--r-- | xfa/fxfa/xfa_fontmgr.h | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp index c5dcad848c..bfb9822ecc 100644 --- a/xfa/fxfa/app/xfa_ffapp.cpp +++ b/xfa/fxfa/app/xfa_ffapp.cpp @@ -9,7 +9,7 @@ #include <algorithm> #include <utility> -#include "xfa/fgas/font/fgas_stdfontmgr.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fxfa/app/xfa_fwladapter.h" @@ -115,13 +115,13 @@ CXFA_FontMgr* CXFA_FFApp::GetXFAFontMgr() const { return m_pFontMgr.get(); } -IFGAS_FontMgr* CXFA_FFApp::GetFDEFontMgr() { +CFGAS_FontMgr* CXFA_FFApp::GetFDEFontMgr() { if (!m_pFDEFontMgr) { #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - m_pFDEFontMgr = IFGAS_FontMgr::Create(FX_GetDefFontEnumerator()); + m_pFDEFontMgr = CFGAS_FontMgr::Create(FX_GetDefFontEnumerator()); #else m_pFontSource.reset(new CFX_FontSourceEnum_File); - m_pFDEFontMgr = IFGAS_FontMgr::Create(m_pFontSource.get()); + m_pFDEFontMgr = CFGAS_FontMgr::Create(m_pFontSource.get()); #endif } return m_pFDEFontMgr.get(); diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index 589dcd42f2..ddac27d533 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1749,7 +1749,7 @@ CFGAS_GEFont* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, uint32_t dwFontStyles, uint16_t wCodePage) { CFX_WideString wsFontName(wsFontFamily); - IFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); + CFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); CFGAS_GEFont* pFont = pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage); if (!pFont) { @@ -1793,7 +1793,7 @@ CFGAS_GEFont* CXFA_DefFontMgr::GetDefaultFont( const CFX_WideStringC& wsFontFamily, uint32_t dwFontStyles, uint16_t wCodePage) { - IFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); + CFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); CFGAS_GEFont* pFont = pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage); if (!pFont) { @@ -1836,7 +1836,7 @@ CFGAS_GEFont* CXFA_PDFFontMgr::FindFont(const CFX_ByteString& strPsName, } CFX_ByteString name = strPsName; name.Remove(' '); - IFGAS_FontMgr* pFDEFontMgr = m_pDoc->GetApp()->GetFDEFontMgr(); + CFGAS_FontMgr* pFDEFontMgr = m_pDoc->GetApp()->GetFDEFontMgr(); for (const auto& it : *pFontSetDict) { const CFX_ByteString& key = it.first; CPDF_Object* pObj = it.second; diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index 291cc5133a..345fc272e3 100644 --- a/xfa/fxfa/app/xfa_textlayout.cpp +++ b/xfa/fxfa/app/xfa_textlayout.cpp @@ -94,7 +94,7 @@ void CXFA_TextParser::InitCSSData(CXFA_TextProvider* pTextProvider) { if (!m_pSelector) { CXFA_FFDoc* pDoc = pTextProvider->GetDocNode(); - IFGAS_FontMgr* pFontMgr = pDoc->GetApp()->GetFDEFontMgr(); + CFGAS_FontMgr* pFontMgr = pDoc->GetApp()->GetFDEFontMgr(); ASSERT(pFontMgr); m_pSelector.reset(new CFDE_CSSStyleSelector(pFontMgr)); FX_FLOAT fFontSize = 10; diff --git a/xfa/fxfa/xfa_ffapp.h b/xfa/fxfa/xfa_ffapp.h index 359f8ffa3c..e7475de889 100644 --- a/xfa/fxfa/xfa_ffapp.h +++ b/xfa/fxfa/xfa_ffapp.h @@ -12,7 +12,7 @@ #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fpdfapi/parser/cpdf_stream_acc.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fwl/core/ifwl_app.h" #include "xfa/fxfa/fxfa.h" @@ -52,7 +52,7 @@ class CXFA_FFApp { CXFA_FFDocHandler* GetDocHandler(); CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate); - IFGAS_FontMgr* GetFDEFontMgr(); + CFGAS_FontMgr* GetFDEFontMgr(); CXFA_FWLTheme* GetFWLTheme(); IXFA_AppProvider* GetAppProvider() const { return m_pProvider; } @@ -79,7 +79,7 @@ class CXFA_FFApp { // // TODO(dsinclair): The GEFont should have the FontMgr as the pointer instead // of the DEFFontMgr so this goes away. Bug 561. - std::unique_ptr<IFGAS_FontMgr> m_pFDEFontMgr; + std::unique_ptr<CFGAS_FontMgr> m_pFDEFontMgr; std::unique_ptr<CXFA_FontMgr> m_pFontMgr; #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ diff --git a/xfa/fxfa/xfa_fontmgr.h b/xfa/fxfa/xfa_fontmgr.h index 8838bbcd0c..a6a5822e0d 100644 --- a/xfa/fxfa/xfa_fontmgr.h +++ b/xfa/fxfa/xfa_fontmgr.h @@ -12,7 +12,7 @@ #include "core/fxcrt/fx_ext.h" #include "core/fxcrt/fx_system.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fxfa/fxfa.h" class CPDF_Font; |