From 8f3eb6051c0465923d6694bd0f0b6dc5bb51cbe3 Mon Sep 17 00:00:00 2001 From: npm Date: Fri, 11 Nov 2016 17:16:23 -0800 Subject: 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 --- xfa/fxfa/app/xfa_ffapp.cpp | 8 ++++---- xfa/fxfa/app/xfa_fontmgr.cpp | 6 +++--- xfa/fxfa/app/xfa_textlayout.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'xfa/fxfa/app') 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 #include -#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; -- cgit v1.2.3