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/fde/css/cfde_cssrulecollection.cpp | 4 ++-- xfa/fde/css/fde_css.h | 2 +- xfa/fde/css/fde_cssstyleselector.cpp | 2 +- xfa/fde/css/fde_cssstyleselector.h | 8 ++++---- xfa/fde/fde_gedevice.cpp | 2 +- xfa/fde/fde_visualset.h | 2 +- xfa/fde/ifde_txtedtengine.h | 2 +- xfa/fde/tto/fde_textout.h | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) (limited to 'xfa/fde') diff --git a/xfa/fde/css/cfde_cssrulecollection.cpp b/xfa/fde/css/cfde_cssrulecollection.cpp index 70cc655a56..28a482b834 100644 --- a/xfa/fde/css/cfde_cssrulecollection.cpp +++ b/xfa/fde/css/cfde_cssrulecollection.cpp @@ -39,7 +39,7 @@ CFDE_CSSRuleCollection::~CFDE_CSSRuleCollection() { void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr) { + CFGAS_FontMgr* pFontMgr) { int32_t iSheets = sheets.GetSize(); for (int32_t i = 0; i < iSheets; ++i) { IFDE_CSSStyleSheet* pSheet = sheets.GetAt(i); @@ -55,7 +55,7 @@ void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, IFDE_CSSRule* pRule, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr) { + CFGAS_FontMgr* pFontMgr) { switch (pRule->GetType()) { case FDE_CSSRULETYPE_Style: { IFDE_CSSStyleRule* pStyleRule = static_cast(pRule); diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h index 1ee037537c..b9a0d2be5d 100644 --- a/xfa/fde/css/fde_css.h +++ b/xfa/fde/css/fde_css.h @@ -10,7 +10,7 @@ #include "core/fxge/fx_dib.h" #include "xfa/fgas/crt/fgas_stream.h" #include "xfa/fgas/crt/fgas_utils.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" class CFDE_CSSAccelerator; class CFDE_CSSDeclaration; diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index 3eef4e4a4a..1bcd161f0c 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -106,7 +106,7 @@ FDE_CSSRuleData::FDE_CSSRuleData(CFDE_CSSSelector* pSel, } } -CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(IFGAS_FontMgr* pFontMgr) +CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr) : m_pFontMgr(pFontMgr), m_fDefFontSize(12.0f) { m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_High] = FDE_CSSSTYLESHEETGROUP_Author; m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_Mid] = FDE_CSSSTYLESHEETGROUP_User; diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h index d72c9bf0cd..8ef3885823 100644 --- a/xfa/fde/css/fde_cssstyleselector.h +++ b/xfa/fde/css/fde_cssstyleselector.h @@ -39,7 +39,7 @@ class CFDE_CSSRuleCollection : public CFX_Target { void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr); + CFGAS_FontMgr* pFontMgr); void Clear(); int32_t CountSelectors() const { return m_iSelectors; } @@ -70,7 +70,7 @@ class CFDE_CSSRuleCollection : public CFX_Target { void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, IFDE_CSSRule* pRule, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr); + CFGAS_FontMgr* pFontMgr); void AddRuleTo(CFX_MapPtrToPtr& map, uint32_t dwKey, CFDE_CSSSelector* pSel, @@ -88,7 +88,7 @@ class CFDE_CSSRuleCollection : public CFX_Target { class CFDE_CSSStyleSelector : public CFX_Target { public: - explicit CFDE_CSSStyleSelector(IFGAS_FontMgr* pFontMgr); + explicit CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr); ~CFDE_CSSStyleSelector() override; void SetDefFontSize(FX_FLOAT fFontSize); @@ -172,7 +172,7 @@ class CFDE_CSSStyleSelector : public CFX_Target { FDE_CSSRUBYPOSITION ToRubyPosition(FDE_CSSPROPERTYVALUE eValue); FDE_CSSRUBYSPAN ToRubySpan(FDE_CSSPROPERTYVALUE eValue); - IFGAS_FontMgr* const m_pFontMgr; + CFGAS_FontMgr* const m_pFontMgr; FX_FLOAT m_fDefFontSize; std::unique_ptr m_pRuleDataStore; CFDE_CSSStyleSheetArray m_SheetGroups[FDE_CSSSTYLESHEETGROUP_MAX]; diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp index 314d17cdc1..4adfd54af4 100644 --- a/xfa/fde/fde_gedevice.cpp +++ b/xfa/fde/fde_gedevice.cpp @@ -14,7 +14,7 @@ #include "core/fxge/cfx_substfont.h" #include "xfa/fde/cfde_path.h" #include "xfa/fde/fde_object.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fgas/font/fgas_gefont.h" CFDE_RenderDevice::CFDE_RenderDevice(CFX_RenderDevice* pDevice, diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h index 58ac4b99e4..481f4a5cbb 100644 --- a/xfa/fde/fde_visualset.h +++ b/xfa/fde/fde_visualset.h @@ -13,7 +13,7 @@ #include "xfa/fde/cfde_path.h" #include "xfa/fde/fde_object.h" #include "xfa/fgas/crt/fgas_memory.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" struct FXTEXT_CHARPOS; diff --git a/xfa/fde/ifde_txtedtengine.h b/xfa/fde/ifde_txtedtengine.h index 960edd36b7..391449ce7a 100644 --- a/xfa/fde/ifde_txtedtengine.h +++ b/xfa/fde/ifde_txtedtengine.h @@ -8,7 +8,7 @@ #define XFA_FDE_IFDE_TXTEDTENGINE_H_ #include "core/fxge/fx_dib.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" class CFDE_TxtEdtEngine; class IFDE_TxtEdtPage; diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h index 3aba000db1..7e40f39dc7 100644 --- a/xfa/fde/tto/fde_textout.h +++ b/xfa/fde/tto/fde_textout.h @@ -15,7 +15,7 @@ #include "core/fxge/fx_dib.h" #include "xfa/fde/fde_object.h" #include "xfa/fgas/crt/fgas_utils.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" #define FDE_TTOSTYLE_Underline 0x0001 #define FDE_TTOSTYLE_Strikeout 0x0002 -- cgit v1.2.3