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 --- xfa/fxfa/parser/cxfa_localemgr.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_localemgr.cpp') diff --git a/xfa/fxfa/parser/cxfa_localemgr.cpp b/xfa/fxfa/parser/cxfa_localemgr.cpp index 833f72c33f..5d74c9bf47 100644 --- a/xfa/fxfa/parser/cxfa_localemgr.cpp +++ b/xfa/fxfa/parser/cxfa_localemgr.cpp @@ -1078,7 +1078,7 @@ static std::unique_ptr XFA_GetLocaleFromBuffer(const uint8_t* pBuf, : nullptr; } -static uint16_t XFA_GetLanguage(CFX_WideString wsLanguage) { +static uint16_t XFA_GetLanguage(WideString wsLanguage) { if (wsLanguage.GetLength() < 2) return FX_LANG_en_US; @@ -1121,7 +1121,7 @@ static uint16_t XFA_GetLanguage(CFX_WideString wsLanguage) { return FX_LANG_en_US; } -CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid) +CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, WideString wsDeflcid) : m_dwLocaleFlags(0x00) { m_dwDeflcid = XFA_GetLanguage(wsDeflcid); if (pLocaleSet) { @@ -1194,8 +1194,7 @@ std::unique_ptr CXFA_LocaleMgr::GetLocale(uint16_t lcid) { } } -IFX_Locale* CXFA_LocaleMgr::GetLocaleByName( - const CFX_WideString& wsLocaleName) { +IFX_Locale* CXFA_LocaleMgr::GetLocaleByName(const WideString& wsLocaleName) { for (size_t i = 0; i < m_LocaleArray.size(); i++) { IFX_Locale* pLocale = m_LocaleArray[i].get(); if (pLocale->GetName() == wsLocaleName) @@ -1220,7 +1219,7 @@ void CXFA_LocaleMgr::SetDefLocale(IFX_Locale* pLocale) { m_pDefLocale = pLocale; } -CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { +WideStringView CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { if (!(m_dwLocaleFlags & 0x01)) { m_wsConfigLocale.clear(); if (pConfig) { @@ -1242,5 +1241,5 @@ CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { } m_dwLocaleFlags |= 0x01; } - return m_wsConfigLocale.AsStringC(); + return m_wsConfigLocale.AsStringView(); } -- cgit v1.2.3