summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-26 11:09:35 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-26 15:21:44 +0000
commit1a43b3064dc38a55de4b1d727237806578bb3ef9 (patch)
tree66c790a154b68fdd6ea63c0bb4cabc0fac0badf4 /xfa/fxfa
parenta7caeb52912150e59aadf49ed21a45a4a1260a4a (diff)
downloadpdfium-1a43b3064dc38a55de4b1d727237806578bb3ef9.tar.xz
Remove font default params
This CL removes some default parameters from the font code. Change-Id: If6f6e09c93474e1e8b7ffaae53eb37dd40c32fab Reviewed-on: https://pdfium-review.googlesource.com/14815 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_fontmgr.cpp11
-rw-r--r--xfa/fxfa/cxfa_fontmgr.h3
2 files changed, 6 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_fontmgr.cpp b/xfa/fxfa/cxfa_fontmgr.cpp
index ddf8ffada4..d144bd2cb5 100644
--- a/xfa/fxfa/cxfa_fontmgr.cpp
+++ b/xfa/fxfa/cxfa_fontmgr.cpp
@@ -26,11 +26,10 @@ CXFA_FontMgr::~CXFA_FontMgr() {}
RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
CXFA_FFDoc* hDoc,
const WideStringView& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+ uint32_t dwFontStyles) {
uint32_t dwHash = FX_HashCode_GetW(wsFontFamily, false);
ByteString bsKey;
- bsKey.Format("%u%u%u", dwHash, dwFontStyles, wCodePage);
+ bsKey.Format("%u%u%u", dwHash, dwFontStyles, 0xFFFF);
auto iter = m_FontMap.find(bsKey);
if (iter != m_FontMap.end())
return iter->second;
@@ -48,7 +47,7 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
}
if (!pFont && m_pDefFontMgr)
pFont = m_pDefFontMgr->GetFont(hDoc->GetApp()->GetFDEFontMgr(),
- wsFontFamily, dwFontStyles, wCodePage);
+ wsFontFamily, dwFontStyles);
if (!pFont && pMgr) {
pPDFFont = nullptr;
@@ -58,8 +57,8 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
return pFont;
}
if (!pFont && m_pDefFontMgr) {
- pFont = m_pDefFontMgr->GetDefaultFont(
- hDoc->GetApp()->GetFDEFontMgr(), wsFontFamily, dwFontStyles, wCodePage);
+ pFont = m_pDefFontMgr->GetDefaultFont(hDoc->GetApp()->GetFDEFontMgr(),
+ wsFontFamily, dwFontStyles);
}
if (pFont) {
diff --git a/xfa/fxfa/cxfa_fontmgr.h b/xfa/fxfa/cxfa_fontmgr.h
index 55ee6bbc4d..a940fafc46 100644
--- a/xfa/fxfa/cxfa_fontmgr.h
+++ b/xfa/fxfa/cxfa_fontmgr.h
@@ -28,8 +28,7 @@ class CXFA_FontMgr {
RetainPtr<CFGAS_GEFont> GetFont(CXFA_FFDoc* hDoc,
const WideStringView& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF);
+ uint32_t dwFontStyles);
void SetDefFontMgr(std::unique_ptr<CFGAS_DefaultFontManager> pFontMgr);
private: