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_localevalue.h | 43 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_localevalue.h') diff --git a/xfa/fxfa/parser/cxfa_localevalue.h b/xfa/fxfa/parser/cxfa_localevalue.h index caf4b0c0f1..d49376332d 100644 --- a/xfa/fxfa/parser/cxfa_localevalue.h +++ b/xfa/fxfa/parser/cxfa_localevalue.h @@ -31,34 +31,32 @@ class CXFA_LocaleValue { CXFA_LocaleValue(const CXFA_LocaleValue& value); CXFA_LocaleValue(uint32_t dwType, CXFA_LocaleMgr* pLocaleMgr); CXFA_LocaleValue(uint32_t dwType, - const CFX_WideString& wsValue, + const WideString& wsValue, CXFA_LocaleMgr* pLocaleMgr); CXFA_LocaleValue(uint32_t dwType, - const CFX_WideString& wsValue, - const CFX_WideString& wsFormat, + const WideString& wsValue, + const WideString& wsFormat, IFX_Locale* pLocale, CXFA_LocaleMgr* pLocaleMgr); ~CXFA_LocaleValue(); CXFA_LocaleValue& operator=(const CXFA_LocaleValue& value); - bool ValidateValue(const CFX_WideString& wsValue, - const CFX_WideString& wsPattern, + bool ValidateValue(const WideString& wsValue, + const WideString& wsPattern, IFX_Locale* pLocale, - CFX_WideString* pMatchFormat); + WideString* pMatchFormat); - bool FormatPatterns(CFX_WideString& wsResult, - const CFX_WideString& wsFormat, + bool FormatPatterns(WideString& wsResult, + const WideString& wsFormat, IFX_Locale* pLocale, XFA_VALUEPICTURE eValueType) const; - void GetNumericFormat(CFX_WideString& wsFormat, - int32_t nIntLen, - int32_t nDecLen); - bool ValidateNumericTemp(const CFX_WideString& wsNumeric, - const CFX_WideString& wsFormat, + void GetNumericFormat(WideString& wsFormat, int32_t nIntLen, int32_t nDecLen); + bool ValidateNumericTemp(const WideString& wsNumeric, + const WideString& wsFormat, IFX_Locale* pLocale); - CFX_WideString GetValue() const { return m_wsValue; } + WideString GetValue() const { return m_wsValue; } uint32_t GetType() const { return m_dwType; } double GetDoubleNum() const; bool SetDate(const CFX_DateTime& d); @@ -68,24 +66,23 @@ class CXFA_LocaleValue { bool IsValid() const { return m_bValid; } private: - bool FormatSinglePattern(CFX_WideString& wsResult, - const CFX_WideString& wsFormat, + bool FormatSinglePattern(WideString& wsResult, + const WideString& wsFormat, IFX_Locale* pLocale, XFA_VALUEPICTURE eValueType) const; - bool ValidateCanonicalValue(const CFX_WideString& wsValue, uint32_t dwVType); - bool ValidateCanonicalDate(const CFX_WideString& wsDate, - CFX_DateTime* unDate); - bool ValidateCanonicalTime(const CFX_WideString& wsTime); + bool ValidateCanonicalValue(const WideString& wsValue, uint32_t dwVType); + bool ValidateCanonicalDate(const WideString& wsDate, CFX_DateTime* unDate); + bool ValidateCanonicalTime(const WideString& wsTime); bool SetTime(const CFX_DateTime& t); bool SetDateTime(const CFX_DateTime& dt); - bool ParsePatternValue(const CFX_WideString& wsValue, - const CFX_WideString& wsPattern, + bool ParsePatternValue(const WideString& wsValue, + const WideString& wsPattern, IFX_Locale* pLocale); CXFA_LocaleMgr* m_pLocaleMgr; - CFX_WideString m_wsValue; + WideString m_wsValue; uint32_t m_dwType; bool m_bValid; }; -- cgit v1.2.3