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

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

Issue 1979723003: Make CFX_WideString(const CFX_WideString&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Override Created 4 years, 7 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_ffwidgethandler.cpp ('k') | xfa/fxfa/app/xfa_textlayout.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 608c9073c373baf452140b04f22bf230691caf33..bf8c1a7326a344e8984dafaa631bbad8e68139a8 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1713,7 +1713,7 @@ void XFA_LocalFontNameToEnglishName(const CFX_WideStringC& wsLocalName,
}
const XFA_FONTINFO* XFA_GetFontINFOByFontName(
const CFX_WideStringC& wsFontName) {
- CFX_WideString wsFontNameTemp = wsFontName;
+ CFX_WideString wsFontNameTemp(wsFontName);
wsFontNameTemp.Remove(L' ');
uint32_t dwCurFontNameHash =
FX_HashCode_GetW(wsFontNameTemp.AsStringC(), true);
@@ -1745,7 +1745,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
- CFX_WideString wsFontName = wsFontFamily;
+ CFX_WideString wsFontName(wsFontFamily);
IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
IFX_Font* pFont =
pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage);
@@ -1882,7 +1882,8 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
auto it = m_FontMap.find(strKey);
if (it != m_FontMap.end())
return it->second;
- CFX_ByteString bsPsName = CFX_ByteString::FromUnicode(wsFontFamily);
+ CFX_ByteString bsPsName =
+ CFX_ByteString::FromUnicode(CFX_WideString(wsFontFamily));
FX_BOOL bBold = (dwFontStyles & FX_FONTSTYLE_Bold) == FX_FONTSTYLE_Bold;
FX_BOOL bItalic = (dwFontStyles & FX_FONTSTYLE_Italic) == FX_FONTSTYLE_Italic;
CFX_ByteString strFontName = PsNameToFontName(bsPsName, bBold, bItalic);
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidgethandler.cpp ('k') | xfa/fxfa/app/xfa_textlayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698