diff options
author | tsepez <tsepez@chromium.org> | 2016-04-13 21:40:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-13 21:40:19 -0700 |
commit | bd9748d504555f100d34025d76a9e0119986bc3f (patch) | |
tree | 829a03f0064b6593f6eff9551ed24b862a06006e /xfa/fxfa/app/xfa_fontmgr.cpp | |
parent | 6e0d67d4f55fc7cb4632f4c5d08cd7565a237d30 (diff) | |
download | pdfium-bd9748d504555f100d34025d76a9e0119986bc3f.tar.xz |
Remove implicit cast from CFX_WideString to (const wchar_t*)
BUG=
Review URL: https://codereview.chromium.org/1882043004
Diffstat (limited to 'xfa/fxfa/app/xfa_fontmgr.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_fontmgr.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index 542fec57a3..72952a7bd9 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1725,8 +1725,8 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName( _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ CFX_WideString wsFontNameTemp = wsFontName; wsFontNameTemp.Remove(L' '); - uint32_t dwCurFontNameHash = - FX_HashCode_String_GetW(wsFontNameTemp, wsFontNameTemp.GetLength(), TRUE); + uint32_t dwCurFontNameHash = FX_HashCode_String_GetW( + wsFontNameTemp.c_str(), wsFontNameTemp.GetLength(), TRUE); int32_t iStart = 0; int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1; int32_t iMid = 0; @@ -1763,7 +1763,8 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, uint16_t wCodePage) { CFX_WideString wsFontName = wsFontFamily; IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); - IFX_Font* pFont = pFDEFontMgr->LoadFont(wsFontName, dwFontStyles, wCodePage); + IFX_Font* pFont = + pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage); if (!pFont) { const XFA_FONTINFO* pCurFont = XFA_GetFontINFOByFontName(wsFontName.AsStringC()); @@ -1785,7 +1786,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, } CFX_WideString wsReplace = CFX_WideString(pReplace, pNameText - pReplace); - pFont = pFDEFontMgr->LoadFont(wsReplace, dwStyle, wCodePage); + pFont = pFDEFontMgr->LoadFont(wsReplace.c_str(), dwStyle, wCodePage); if (pFont) { break; } |