diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-18 14:23:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-18 18:40:16 +0000 |
commit | 275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch) | |
tree | 2029b9158ec044764ceff122fe5fb5d0a3f123d1 /xfa/fxfa/parser/cxfa_localemgr.cpp | |
parent | 450fbeaaabf1ab340c1018de2e58f1950657517e (diff) | |
download | pdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz |
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 <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_localemgr.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_localemgr.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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<IFX_Locale> 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<IFX_Locale> 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(); } |