diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-02 22:40:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-02 22:40:06 +0000 |
commit | 0c56d6362b95fe0181be2c2ac66db1c3ab73552b (patch) | |
tree | 1f2e8df8e6b6e281405d69e2413a68f338917f50 /xfa/fxfa/cxfa_fontmgr.cpp | |
parent | 4dbea51fc4bfdcc520dec2b949fd44ec8881cac9 (diff) | |
download | pdfium-0c56d6362b95fe0181be2c2ac66db1c3ab73552b.tar.xz |
Make CFGAS_DefaultFontManager a class with only static methods.
It has no member variables.
Change-Id: I25b333e201d76e90d25e3f526cf23bccd2b4687a
Reviewed-on: https://pdfium-review.googlesource.com/c/43315
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fontmgr.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_fontmgr.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_fontmgr.cpp b/xfa/fxfa/cxfa_fontmgr.cpp index 7abf720b50..92fe77a52c 100644 --- a/xfa/fxfa/cxfa_fontmgr.cpp +++ b/xfa/fxfa/cxfa_fontmgr.cpp @@ -16,6 +16,7 @@ #include "core/fxge/cfx_fontmgr.h" #include "core/fxge/cfx_gemodule.h" #include "third_party/base/ptr_util.h" +#include "xfa/fgas/font/cfgas_defaultfontmanager.h" #include "xfa/fgas/font/cfgas_gefont.h" #include "xfa/fgas/font/fgas_fontutils.h" #include "xfa/fxfa/cxfa_ffapp.h" @@ -44,9 +45,10 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont( if (pFont) return pFont; } - if (!pFont) - pFont = m_pDefFontMgr.GetFont(hDoc->GetApp()->GetFDEFontMgr(), wsFontFamily, - dwFontStyles); + if (!pFont) { + pFont = CFGAS_DefaultFontManager::GetFont(hDoc->GetApp()->GetFDEFontMgr(), + wsFontFamily, dwFontStyles); + } if (!pFont && pMgr) { pFont = pMgr->GetFont(wsEnglishName.AsStringView(), dwFontStyles, false); @@ -55,8 +57,8 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont( } if (!pFont) { - pFont = m_pDefFontMgr.GetDefaultFont(hDoc->GetApp()->GetFDEFontMgr(), - wsFontFamily, dwFontStyles); + pFont = CFGAS_DefaultFontManager::GetDefaultFont( + hDoc->GetApp()->GetFDEFontMgr(), wsFontFamily, dwFontStyles); } if (!pFont) { |