From 4c3debb3c91f5842784be30a911b52cdabcab7df Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 8 Apr 2016 12:20:38 -0700 Subject: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003 --- xfa/fxfa/app/xfa_fontmgr.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/app/xfa_fontmgr.cpp') diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index c2de4115cb..542fec57a3 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1766,7 +1766,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, IFX_Font* pFont = pFDEFontMgr->LoadFont(wsFontName, dwFontStyles, wCodePage); if (!pFont) { const XFA_FONTINFO* pCurFont = - XFA_GetFontINFOByFontName(wsFontName.AsWideStringC()); + XFA_GetFontINFOByFontName(wsFontName.AsStringC()); if (pCurFont && pCurFont->pReplaceFont) { uint32_t dwStyle = 0; if (dwFontStyles & FX_FONTSTYLE_Bold) { @@ -1862,7 +1862,7 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, for (const auto& it : *pFontSetDict) { const CFX_ByteString& key = it.first; CPDF_Object* pObj = it.second; - if (!PsNameMatchDRFontName(strPsName.AsByteStringC(), bBold, bItalic, key, + if (!PsNameMatchDRFontName(strPsName.AsStringC(), bBold, bItalic, key, bStrictMatch)) { continue; } @@ -2030,8 +2030,7 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc, CPDF_Font* pPDFFont = NULL; IFX_Font* pFont = NULL; if (pMgr) { - pFont = - pMgr->GetFont(wsEnglishName.AsWideStringC(), dwFontStyles, &pPDFFont); + pFont = pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont); if (pFont) return pFont; } @@ -2040,8 +2039,8 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc, } if (!pFont && pMgr) { pPDFFont = NULL; - pFont = pMgr->GetFont(wsEnglishName.AsWideStringC(), dwFontStyles, - &pPDFFont, FALSE); + pFont = pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont, + FALSE); if (pFont) return pFont; } -- cgit v1.2.3