summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fontmgr.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-13 17:21:31 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-13 17:21:31 -0700
commitafe94306e3c542f0d499e7f7706ee5dec4028d8a (patch)
tree5012c9356cf1af259c74da3008dc7fcad439db2a /xfa/fxfa/app/xfa_fontmgr.cpp
parent01e624fb699af3a8ee2f81620d59d366dac18f29 (diff)
downloadpdfium-afe94306e3c542f0d499e7f7706ee5dec4028d8a.tar.xz
Make CFX_WideString(const CFX_WideString&) explicit.
BUG= Review-Url: https://codereview.chromium.org/1979723003
Diffstat (limited to 'xfa/fxfa/app/xfa_fontmgr.cpp')
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 608c9073c3..bf8c1a7326 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);