summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-20 11:58:48 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-20 11:58:48 -0800
commitd94d48bdb9e295127af77d7f329731133a236801 (patch)
treeb095888ed05ca3e004286a766eac17a017de13ce
parent4246b0015732d7611ad6838b76b85161fab3795e (diff)
downloadpdfium-d94d48bdb9e295127af77d7f329731133a236801.tar.xz
Remove _FXFA_USEGASFONTMGR_ (always true).
Small tidying. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1601023004 .
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
index ad5120e493..05c9c24125 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
@@ -1759,25 +1759,16 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr() {
}
m_CacheFonts.RemoveAll();
}
-#define _FXFA_USEGASFONTMGR_
IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
FX_WORD wCodePage) {
CFX_WideString wsFontName = wsFontFamily;
IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();
-#ifdef _FXFA_USEGASFONTMGR_
const XFA_FONTINFO* pCurFont = NULL;
FX_BOOL bGetFontInfo = TRUE;
IFX_Font* pFont = pFDEFontMgr->LoadFont((const FX_WCHAR*)wsFontName,
dwFontStyles, wCodePage);
-#else
- const XFA_FONTINFO* pCurFont = XFA_GetFontINFOByFontName(wsFontName);
- FX_BOOL bGetFontInfo = FALSE;
- IFX_Font* pFont = IFX_Font::LoadFont(
- (const FX_WCHAR*)wsFontName, dwFontStyles | FX_FONTSTYLE_ExactMatch,
- pCurFont ? pCurFont->wCodePage : wCodePage, pFDEFontMgr);
-#endif
if (!pFont && hDoc) {
if (bGetFontInfo) {
pCurFont = XFA_GetFontINFOByFontName(wsFontName);
@@ -1800,13 +1791,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
}
CFX_WideString wsReplace =
CFX_WideString(pReplace, pNameText - pReplace);
-#ifdef _FXFA_USEGASFONTMGR_
pFont = pFDEFontMgr->LoadFont(wsReplace, dwStyle, wCodePage);
-#else
- pFont = IFX_Font::LoadFont((const FX_WCHAR*)wsReplace,
- dwStyle | FX_FONTSTYLE_ExactMatch,
- pCurFont->wCodePage, pFDEFontMgr);
-#endif
if (pFont != NULL) {
break;
}
@@ -1826,24 +1811,11 @@ IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc,
FX_DWORD dwFontStyles,
FX_WORD wCodePage) {
IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();
-#ifdef _FXFA_USEGASFONTMGR_
IFX_Font* pFont =
pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage);
-#else
- const XFA_FONTINFO* pCurFont = XFA_GetFontINFOByFontName(wsFontFamily);
- IFX_Font* pFont =
- IFX_Font::LoadFont(L"Arial Narrow", dwFontStyles,
- pCurFont ? pCurFont->wCodePage : 1252, pFDEFontMgr);
-#endif
if (!pFont)
-#ifdef _FXFA_USEGASFONTMGR_
pFont =
pFDEFontMgr->LoadFont((const FX_WCHAR*)NULL, dwFontStyles, wCodePage);
-#else
- pFont =
- IFX_Font::LoadFont((const FX_WCHAR*)NULL, dwFontStyles,
- pCurFont ? pCurFont->wCodePage : 1252, pFDEFontMgr);
-#endif
FXSYS_assert(pFont != NULL);
if (pFont) {
m_CacheFonts.Add(pFont);