Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3969)

Unified Diff: xfa/fxfa/app/xfa_fontmgr.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidgetacc.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_fontmgr.cpp
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 542fec57a35971cf34ca4dcb15cc455e60712f97..72952a7bd9586d82b4a7b452496b61783304b6b7 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;
}
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidgetacc.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698