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/fgas/font | |
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/fgas/font')
-rw-r--r-- | xfa/fgas/font/cfgas_defaultfontmanager.cpp | 6 | ||||
-rw-r--r-- | xfa/fgas/font/cfgas_defaultfontmanager.h | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/xfa/fgas/font/cfgas_defaultfontmanager.cpp b/xfa/fgas/font/cfgas_defaultfontmanager.cpp index fcaf6fdffe..4380c4e4df 100644 --- a/xfa/fgas/font/cfgas_defaultfontmanager.cpp +++ b/xfa/fgas/font/cfgas_defaultfontmanager.cpp @@ -9,10 +9,7 @@ #include "xfa/fgas/font/cfgas_gefont.h" #include "xfa/fgas/font/fgas_fontutils.h" -CFGAS_DefaultFontManager::CFGAS_DefaultFontManager() {} - -CFGAS_DefaultFontManager::~CFGAS_DefaultFontManager() {} - +// static RetainPtr<CFGAS_GEFont> CFGAS_DefaultFontManager::GetFont( CFGAS_FontMgr* pFontMgr, const WideStringView& wsFontFamily, @@ -55,6 +52,7 @@ RetainPtr<CFGAS_GEFont> CFGAS_DefaultFontManager::GetFont( return pFont; } +// static RetainPtr<CFGAS_GEFont> CFGAS_DefaultFontManager::GetDefaultFont( CFGAS_FontMgr* pFontMgr, const WideStringView& wsFontFamily, diff --git a/xfa/fgas/font/cfgas_defaultfontmanager.h b/xfa/fgas/font/cfgas_defaultfontmanager.h index 3d723d5e14..e1b36be386 100644 --- a/xfa/fgas/font/cfgas_defaultfontmanager.h +++ b/xfa/fgas/font/cfgas_defaultfontmanager.h @@ -15,15 +15,17 @@ class CFGAS_FontMgr; class CFGAS_DefaultFontManager { public: - CFGAS_DefaultFontManager(); - ~CFGAS_DefaultFontManager(); - - RetainPtr<CFGAS_GEFont> GetFont(CFGAS_FontMgr* pFontMgr, - const WideStringView& wsFontFamily, - uint32_t dwFontStyles); - RetainPtr<CFGAS_GEFont> GetDefaultFont(CFGAS_FontMgr* pFontMgr, + static RetainPtr<CFGAS_GEFont> GetFont(CFGAS_FontMgr* pFontMgr, const WideStringView& wsFontFamily, uint32_t dwFontStyles); + static RetainPtr<CFGAS_GEFont> GetDefaultFont( + CFGAS_FontMgr* pFontMgr, + const WideStringView& wsFontFamily, + uint32_t dwFontStyles); + + CFGAS_DefaultFontManager() = delete; + CFGAS_DefaultFontManager(const CFGAS_DefaultFontManager&) = delete; + CFGAS_DefaultFontManager& operator=(const CFGAS_DefaultFontManager&) = delete; }; #endif // XFA_FGAS_FONT_CFGAS_DEFAULTFONTMANAGER_H_ |