summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/cfgas_formatstring.h
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /xfa/fgas/crt/cfgas_formatstring.h
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-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/fgas/crt/cfgas_formatstring.h')
-rw-r--r--xfa/fgas/crt/cfgas_formatstring.h74
1 files changed, 36 insertions, 38 deletions
diff --git a/xfa/fgas/crt/cfgas_formatstring.h b/xfa/fgas/crt/cfgas_formatstring.h
index c91f43598e..5eae25dca5 100644
--- a/xfa/fgas/crt/cfgas_formatstring.h
+++ b/xfa/fgas/crt/cfgas_formatstring.h
@@ -12,8 +12,8 @@
#include "core/fxcrt/ifx_locale.h"
#include "xfa/fxfa/parser/cxfa_localemgr.h"
-bool FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_DateTime* datetime);
-bool FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
+bool FX_DateFromCanonical(const WideString& wsDate, CFX_DateTime* datetime);
+bool FX_TimeFromCanonical(const WideStringView& wsTime,
CFX_DateTime* datetime,
IFX_Locale* pLocale);
@@ -22,52 +22,50 @@ class CFGAS_FormatString {
explicit CFGAS_FormatString(CXFA_LocaleMgr* pLocaleMgr);
~CFGAS_FormatString();
- void SplitFormatString(const CFX_WideString& wsFormatString,
- std::vector<CFX_WideString>* wsPatterns);
- FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern);
+ void SplitFormatString(const WideString& wsFormatString,
+ std::vector<WideString>* wsPatterns);
+ FX_LOCALECATEGORY GetCategory(const WideString& wsPattern);
- bool ParseText(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern,
- CFX_WideString* wsValue);
- bool ParseNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- CFX_WideString* wsValue);
- bool ParseDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
+ bool ParseText(const WideString& wsSrcText,
+ const WideString& wsPattern,
+ WideString* wsValue);
+ bool ParseNum(const WideString& wsSrcNum,
+ const WideString& wsPattern,
+ WideString* wsValue);
+ bool ParseDateTime(const WideString& wsSrcDateTime,
+ const WideString& wsPattern,
FX_DATETIMETYPE eDateTimeType,
CFX_DateTime* dtValue);
- bool ParseZero(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern);
- bool ParseNull(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern);
+ bool ParseZero(const WideString& wsSrcText, const WideString& wsPattern);
+ bool ParseNull(const WideString& wsSrcText, const WideString& wsPattern);
- bool FormatText(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern,
- CFX_WideString* wsOutput);
- bool FormatNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- CFX_WideString* wsOutput);
- bool FormatDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
+ bool FormatText(const WideString& wsSrcText,
+ const WideString& wsPattern,
+ WideString* wsOutput);
+ bool FormatNum(const WideString& wsSrcNum,
+ const WideString& wsPattern,
+ WideString* wsOutput);
+ bool FormatDateTime(const WideString& wsSrcDateTime,
+ const WideString& wsPattern,
FX_DATETIMETYPE eDateTimeType,
- CFX_WideString* wsOutput);
- bool FormatZero(const CFX_WideString& wsPattern, CFX_WideString* wsOutput);
- bool FormatNull(const CFX_WideString& wsPattern, CFX_WideString* wsOutput);
+ WideString* wsOutput);
+ bool FormatZero(const WideString& wsPattern, WideString* wsOutput);
+ bool FormatNull(const WideString& wsPattern, WideString* wsOutput);
private:
- CFX_WideString GetTextFormat(const CFX_WideString& wsPattern,
- const CFX_WideStringC& wsCategory);
- IFX_Locale* GetNumericFormat(const CFX_WideString& wsPattern,
+ WideString GetTextFormat(const WideString& wsPattern,
+ const WideStringView& wsCategory);
+ IFX_Locale* GetNumericFormat(const WideString& wsPattern,
int32_t* iDotIndex,
uint32_t* dwStyle,
- CFX_WideString* wsPurgePattern);
- bool FormatStrNum(const CFX_WideStringC& wsInputNum,
- const CFX_WideString& wsPattern,
- CFX_WideString* wsOutput);
- FX_DATETIMETYPE GetDateTimeFormat(const CFX_WideString& wsPattern,
+ WideString* wsPurgePattern);
+ bool FormatStrNum(const WideStringView& wsInputNum,
+ const WideString& wsPattern,
+ WideString* wsOutput);
+ FX_DATETIMETYPE GetDateTimeFormat(const WideString& wsPattern,
IFX_Locale** pLocale,
- CFX_WideString* wsDatePattern,
- CFX_WideString* wsTimePattern);
+ WideString* wsDatePattern,
+ WideString* wsTimePattern);
CXFA_LocaleMgr* m_pLocaleMgr;
};