summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-12-06 22:09:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-06 22:09:40 +0000
commit11506300e6a64de2aaba2abbea23d69b98627412 (patch)
treeb6822f6629ef9ecca1de1b71f82a94abacf95950
parentfd9e0b8f5f9204a46090c3b392b9a4322a6ea09d (diff)
downloadpdfium-chromium/3287.tar.xz
Fix ps rendering.chromium/3287
Also fix other occurrences that were missed. Bug:pdfium:947 Change-Id: Ic7e909ff9ce3abdf91e8e9ba108c84ad28b2fd65 Reviewed-on: https://pdfium-review.googlesource.com/20472 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
-rw-r--r--core/fxge/win32/cfx_psrenderer.cpp3
-rw-r--r--fxjs/cjs_global.cpp4
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.cpp11
3 files changed, 8 insertions, 10 deletions
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index ecfab49c38..1513c07c68 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -676,8 +676,7 @@ bool CFX_PSRenderer::DrawText(int nChars,
last_fontnum = ps_fontnum;
}
buf << pCharPos[i].m_Origin.x << " " << pCharPos[i].m_Origin.y << " m";
- ByteString hex;
- hex.Format("<%02X>", ps_glyphindex);
+ ByteString hex = ByteString::Format("<%02X>", ps_glyphindex);
buf << hex.AsStringView() << "Tj\n";
}
buf << "Q\n";
diff --git a/fxjs/cjs_global.cpp b/fxjs/cjs_global.cpp
index db63a4b8b9..95124ff84d 100644
--- a/fxjs/cjs_global.cpp
+++ b/fxjs/cjs_global.cpp
@@ -116,8 +116,8 @@ void JSSpecialPropDel(const char* class_name,
pObj->DelProperty(pRuntime, PropFromV8Prop(property).c_str());
if (result.HasError()) {
// TODO(dsinclair): Should this set the pRuntime->Error result?
- // ByteString cbName;
- // cbName.Format("%s.%s", class_name, "DelProperty");
+ // ByteString cbName =
+ // ByteString::Format("%s.%s", class_name, "DelProperty");
}
}
diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp
index 1e829e5e4c..2647eb52c7 100644
--- a/xfa/fgas/font/cfgas_fontmgr.cpp
+++ b/xfa/fgas/font/cfgas_fontmgr.cpp
@@ -952,8 +952,7 @@ RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByCodePage(
uint16_t wCodePage,
uint32_t dwFontStyles,
const wchar_t* pszFontFamily) {
- ByteString bsHash;
- bsHash.Format("%d, %d", wCodePage, dwFontStyles);
+ ByteString bsHash = ByteString::Format("%d, %d", wCodePage, dwFontStyles);
bsHash += FX_UTF8Encode(WideStringView(pszFontFamily));
uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringView(), false);
std::vector<RetainPtr<CFGAS_GEFont>>* pFontArray = &m_Hash2Fonts[dwHash];
@@ -1012,9 +1011,10 @@ RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
uint16_t wBitField = x ? x->wBitField : 0x03E7;
ByteString bsHash;
if (wCodePage == 0xFFFF)
- bsHash.Format("%d, %d, %d", wCodePage, wBitField, dwFontStyles);
+ bsHash =
+ ByteString::Format("%d, %d, %d", wCodePage, wBitField, dwFontStyles);
else
- bsHash.Format("%d, %d", wCodePage, dwFontStyles);
+ bsHash = ByteString::Format("%d, %d", wCodePage, dwFontStyles);
bsHash += FX_UTF8Encode(WideStringView(pszFontFamily));
uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringView(), false);
std::vector<RetainPtr<CFGAS_GEFont>>* pFonts = &m_Hash2Fonts[dwHash];
@@ -1091,8 +1091,7 @@ RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::LoadFont(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
- ByteString bsHash;
- bsHash.Format("%d, %d", wCodePage, dwFontStyles);
+ ByteString bsHash = ByteString::Format("%d, %d", wCodePage, dwFontStyles);
bsHash += FX_UTF8Encode(WideStringView(pszFontFamily));
uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringView(), false);
std::vector<RetainPtr<CFGAS_GEFont>>* pFontArray = &m_Hash2Fonts[dwHash];