From 275e260a6cd4a8e506ba974feb85ebcd926c1739 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 18 Sep 2017 14:23:18 -0400 Subject: Convert string class names Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- core/fxge/cfx_fontmapper.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'core/fxge/cfx_fontmapper.h') diff --git a/core/fxge/cfx_fontmapper.h b/core/fxge/cfx_fontmapper.h index 1b262bf0f4..3f28c73150 100644 --- a/core/fxge/cfx_fontmapper.h +++ b/core/fxge/cfx_fontmapper.h @@ -23,10 +23,10 @@ class CFX_FontMapper { void SetSystemFontInfo(std::unique_ptr pFontInfo); IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo.get(); } - void AddInstalledFont(const CFX_ByteString& name, int charset); + void AddInstalledFont(const ByteString& name, int charset); void LoadInstalledFonts(); - FXFT_Face FindSubstFont(const CFX_ByteString& face_name, + FXFT_Face FindSubstFont(const ByteString& face_name, bool bTrueType, uint32_t flags, int weight, @@ -41,19 +41,17 @@ class CFX_FontMapper { #endif // PDF_ENABLE_XFA bool IsBuiltinFace(const FXFT_Face face) const; int GetFaceSize() const; - CFX_ByteString GetFaceName(int index) const { - return m_FaceArray[index].name; - } + ByteString GetFaceName(int index) const { return m_FaceArray[index].name; } - std::vector m_InstalledTTFonts; - std::vector> m_LocalizedTTFonts; + std::vector m_InstalledTTFonts; + std::vector> m_LocalizedTTFonts; private: static const size_t MM_FACE_COUNT = 2; static const size_t FOXIT_FACE_COUNT = 14; - CFX_ByteString GetPSNameFromTT(void* hFont); - CFX_ByteString MatchInstalledFonts(const CFX_ByteString& norm_name); + ByteString GetPSNameFromTT(void* hFont); + ByteString MatchInstalledFonts(const ByteString& norm_name); FXFT_Face UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseFont, int italic_angle, @@ -64,19 +62,19 @@ class CFX_FontMapper { uint32_t ttc_size, uint32_t font_size); FXFT_Face GetCachedFace(void* hFont, - CFX_ByteString SubstName, + ByteString SubstName, int weight, bool bItalic, uint32_t font_size); struct FaceData { - CFX_ByteString name; + ByteString name; uint32_t charset; }; bool m_bListLoaded; FXFT_Face m_MMFaces[MM_FACE_COUNT]; - CFX_ByteString m_LastFamily; + ByteString m_LastFamily; std::vector m_FaceArray; std::unique_ptr m_pFontInfo; FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT]; -- cgit v1.2.3