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_font.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'core/fxge/cfx_font.cpp') diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp index 7a51df1b85..017b120dd4 100644 --- a/core/fxge/cfx_font.cpp +++ b/core/fxge/cfx_font.cpp @@ -291,7 +291,7 @@ void CFX_Font::DeleteFace() { m_Face = nullptr; } -void CFX_Font::LoadSubst(const CFX_ByteString& face_name, +void CFX_Font::LoadSubst(const ByteString& face_name, bool bTrueType, uint32_t flags, int weight, @@ -446,7 +446,7 @@ bool CFX_Font::IsItalic() const { if (FXFT_Is_Face_Italic(m_Face) == FXFT_STYLE_FLAG_ITALIC) return true; - CFX_ByteString str(FXFT_Get_Face_Style_Name(m_Face)); + ByteString str(FXFT_Get_Face_Style_Name(m_Face)); str.MakeLower(); return str.Contains("italic"); } @@ -459,31 +459,31 @@ bool CFX_Font::IsFixedWidth() const { return m_Face && FXFT_Is_Face_fixedwidth(m_Face) != 0; } -CFX_ByteString CFX_Font::GetPsName() const { +ByteString CFX_Font::GetPsName() const { if (!m_Face) - return CFX_ByteString(); + return ByteString(); - CFX_ByteString psName = FXFT_Get_Postscript_Name(m_Face); + ByteString psName = FXFT_Get_Postscript_Name(m_Face); if (psName.IsEmpty()) psName = "Untitled"; return psName; } -CFX_ByteString CFX_Font::GetFamilyName() const { +ByteString CFX_Font::GetFamilyName() const { if (!m_Face && !m_pSubstFont) - return CFX_ByteString(); + return ByteString(); if (m_Face) - return CFX_ByteString(FXFT_Get_Face_Family_Name(m_Face)); + return ByteString(FXFT_Get_Face_Family_Name(m_Face)); return m_pSubstFont->m_Family; } -CFX_ByteString CFX_Font::GetFaceName() const { +ByteString CFX_Font::GetFaceName() const { if (!m_Face && !m_pSubstFont) - return CFX_ByteString(); + return ByteString(); if (m_Face) { - CFX_ByteString style = CFX_ByteString(FXFT_Get_Face_Style_Name(m_Face)); - CFX_ByteString facename = GetFamilyName(); + ByteString style = ByteString(FXFT_Get_Face_Style_Name(m_Face)); + ByteString facename = GetFamilyName(); if (facename.IsEmpty()) facename = "Untitled"; if (!style.IsEmpty() && style != "Regular") -- cgit v1.2.3