From ca3ac5e9ffc936066267fbb1c329e5297d8e23e6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 10 Jun 2015 17:38:11 -0700 Subject: Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs. Nearly automatic merge + re-run script on new files. Original Review URL: https://codereview.chromium.org/1180593004. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1174303002. --- xfa/src/fgas/include/fx_locale.h | 8 ++++---- xfa/src/fgas/include/fx_sax.h | 10 +++++----- xfa/src/fgas/src/localization/fx_locale.cpp | 16 ++++++++-------- xfa/src/fgas/src/localization/fx_localeimp.h | 6 +++--- xfa/src/fgas/src/localization/fx_localemgr.cpp | 2 +- xfa/src/fgas/src/localization/fx_localemgr.h | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) (limited to 'xfa/src/fgas') diff --git a/xfa/src/fgas/include/fx_locale.h b/xfa/src/fgas/include/fx_locale.h index ef6b910b00..b377f981e4 100644 --- a/xfa/src/fgas/include/fx_locale.h +++ b/xfa/src/fgas/include/fx_locale.h @@ -77,12 +77,12 @@ public: virtual FX_WORD GetDefLocaleID() = 0; virtual IFX_Locale* GetDefLocale() = 0; virtual IFX_Locale* GetLocale(FX_WORD lcid) = 0; - virtual IFX_Locale* GetLocaleByName(FX_WSTR wsLocaleName) = 0; + virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName) = 0; }; IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, FX_WORD wDefaultLCID); void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult); FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime); -FX_BOOL FX_TimeFromCanonical(FX_WSTR wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale); +FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale); class IFX_FormatString { public: @@ -117,8 +117,8 @@ public: CFX_Decimal(int32_t val); CFX_Decimal(int64_t val); CFX_Decimal(FX_FLOAT val, uint8_t scale = 3); - CFX_Decimal(FX_WSTR str); - CFX_Decimal(FX_BSTR str); + CFX_Decimal(const CFX_WideStringC& str); + CFX_Decimal(const CFX_ByteStringC& str); operator CFX_WideString() const; operator double() const; FX_BOOL operator == (const CFX_Decimal& val) const; diff --git a/xfa/src/fgas/include/fx_sax.h b/xfa/src/fgas/include/fx_sax.h index a6122c48e5..9d959e2321 100644 --- a/xfa/src/fgas/include/fx_sax.h +++ b/xfa/src/fgas/include/fx_sax.h @@ -27,13 +27,13 @@ enum FX_SAXNODE { class IFX_SAXReaderHandler { public: - virtual void* OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos) = 0; - virtual void OnTagAttribute(void* pTag, FX_BSTR bsAttri, FX_BSTR bsValue) = 0; + virtual void* OnTagEnter(const CFX_ByteStringC& bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos) = 0; + virtual void OnTagAttribute(void* pTag, const CFX_ByteStringC& bsAttri, const CFX_ByteStringC& bsValue) = 0; virtual void OnTagBreak(void* pTag) = 0; - virtual void OnTagData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0; + virtual void OnTagData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, FX_DWORD dwStartPos) = 0; virtual void OnTagClose(void* pTag, FX_DWORD dwEndPos) = 0; - virtual void OnTagEnd(void* pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos) = 0; - virtual void OnTargetData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0; + virtual void OnTagEnd(void* pTag, const CFX_ByteStringC& bsTagName, FX_DWORD dwEndPos) = 0; + virtual void OnTargetData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, FX_DWORD dwStartPos) = 0; }; class IFX_SAXReader { diff --git a/xfa/src/fgas/src/localization/fx_locale.cpp b/xfa/src/fgas/src/localization/fx_locale.cpp index 8e564354a7..1ab98a2f5f 100644 --- a/xfa/src/fgas/src/localization/fx_locale.cpp +++ b/xfa/src/fgas/src/localization/fx_locale.cpp @@ -51,7 +51,7 @@ const static CFX_WideStringC gs_wsTextSymbols = FX_WSTRC(L"AXO09"); const static CFX_WideStringC gs_wsTimeSymbols = FX_WSTRC(L"hHkKMSFAzZ"); const static CFX_WideStringC gs_wsDateSymbols = FX_WSTRC(L"DJMEeGgYwW"); const static CFX_WideStringC gs_wsConstChars = FX_WSTRC(L",-:/. "); -static FX_STRSIZE FX_Local_Find(FX_WSTR wsSymbols, FX_WCHAR ch, FX_STRSIZE nStart = 0) +static FX_STRSIZE FX_Local_Find(const CFX_WideStringC& wsSymbols, FX_WCHAR ch, FX_STRSIZE nStart = 0) { FX_STRSIZE nLength = wsSymbols.GetLength(); if (nLength < 1 || nStart > nLength) { @@ -79,7 +79,7 @@ CFX_WideString CFX_Locale::GetName() { return CFX_WideString(); } -static CFX_WideString FX_GetXMLContent(FX_BSTR bsSpace, CXML_Element* pxmlElement, FX_BSTR bsTag, FX_WSTR wsName) +static CFX_WideString FX_GetXMLContent(const CFX_ByteStringC& bsSpace, CXML_Element* pxmlElement, const CFX_ByteStringC& bsTag, const CFX_WideStringC& wsName) { CXML_Element* pDatePattern = NULL; int32_t nCount = pxmlElement->CountElements(bsSpace, bsTag); @@ -729,7 +729,7 @@ CFX_WideString CFX_FormatString::GetLocaleName(const CFX_WideString& wsPattern) } return CFX_WideString(); } -IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString &wsPattern, FX_WSTR wsCategory, CFX_WideString& wsPurgePattern) +IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString &wsPattern, const CFX_WideStringC& wsCategory, CFX_WideString& wsPurgePattern) { IFX_Locale* pLocale = NULL; int32_t ccf = 0; @@ -2887,7 +2887,7 @@ static int32_t FX_GetNumTrailingLimit(const CFX_WideString& wsFormat, int iDotPo } return iTreading; } -FX_BOOL CFX_FormatString::FormatStrNum(FX_WSTR wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput) +FX_BOOL CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput) { if (wsInputNum.IsEmpty() || wsPattern.IsEmpty()) { return FALSE; @@ -3816,7 +3816,7 @@ FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime datetime = datetime + ut; return TRUE; } -FX_BOOL FX_TimeFromCanonical(FX_WSTR wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale) +FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale) { if (wsTime.GetLength() == 0) { return FALSE; @@ -4327,7 +4327,7 @@ FX_BOOL CFX_FormatString::FormatNull(const CFX_WideString& wsPattern, CFX_WideSt } return TRUE; } -IFX_Locale* CFX_FormatString::GetPatternLocale(FX_WSTR wsLocale) +IFX_Locale* CFX_FormatString::GetPatternLocale(const CFX_WideStringC& wsLocale) { if (m_bUseLCID) { } @@ -4623,7 +4623,7 @@ CFX_Decimal::CFX_Decimal(FX_FLOAT val, uint8_t scale ) m_uLo = (uint32_t)plo; m_uFlags = FXMATH_DECIMAL_MAKEFLAGS(val < 0 && IsNotZero(), scale); } -CFX_Decimal::CFX_Decimal(FX_WSTR strObj) +CFX_Decimal::CFX_Decimal(const CFX_WideStringC& strObj) { const FX_WCHAR* str = strObj.GetPtr(); const FX_WCHAR* strBound = str + strObj.GetLength(); @@ -4659,7 +4659,7 @@ cont: } m_uFlags = FXMATH_DECIMAL_MAKEFLAGS(negmet && IsNotZero(), scale); } -CFX_Decimal::CFX_Decimal(FX_BSTR strObj) +CFX_Decimal::CFX_Decimal(const CFX_ByteStringC& strObj) { CFX_WideString wstrObj; wstrObj.ConvertFrom(strObj); diff --git a/xfa/src/fgas/src/localization/fx_localeimp.h b/xfa/src/fgas/src/localization/fx_localeimp.h index 8dfec2e862..43d8592ae7 100644 --- a/xfa/src/fgas/src/localization/fx_localeimp.h +++ b/xfa/src/fgas/src/localization/fx_localeimp.h @@ -62,12 +62,12 @@ public: virtual FX_BOOL FormatNull(const CFX_WideString& wsPattern, CFX_WideString& wsOutput); protected: virtual ~CFX_FormatString(); - IFX_Locale* GetTextFormat(const CFX_WideString &wsPattern, FX_WSTR wsCategory, CFX_WideString& wsPurgePattern); + IFX_Locale* GetTextFormat(const CFX_WideString &wsPattern, const CFX_WideStringC& wsCategory, CFX_WideString& wsPurgePattern); IFX_Locale* GetNumericFormat(const CFX_WideString& wsPattern, int32_t& iDotIndex, FX_DWORD& dwStyle, CFX_WideString& wsPurgePattern); - FX_BOOL FormatStrNum(FX_WSTR wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput); + FX_BOOL FormatStrNum(const CFX_WideStringC& wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput); FX_BOOL FormatLCNumeric(CFX_LCNumeric& lcNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput); FX_DATETIMETYPE GetDateTimeFormat(const CFX_WideString& wsPattern, IFX_Locale*& pLocale, CFX_WideString &wsDatePattern, CFX_WideString &wsTimePattern); - IFX_Locale* GetPatternLocale(FX_WSTR wsLocale); + IFX_Locale* GetPatternLocale(const CFX_WideStringC& wsLocale); IFX_LocaleMgr* m_pLocaleMgr; FX_BOOL m_bUseLCID; }; diff --git a/xfa/src/fgas/src/localization/fx_localemgr.cpp b/xfa/src/fgas/src/localization/fx_localemgr.cpp index 0623fe1789..ebdd4b89a9 100644 --- a/xfa/src/fgas/src/localization/fx_localemgr.cpp +++ b/xfa/src/fgas/src/localization/fx_localemgr.cpp @@ -94,7 +94,7 @@ IFX_Locale* CFX_LocaleMgr::GetLocale(FX_WORD lcid) } return pLocale; } -IFX_Locale* CFX_LocaleMgr::GetLocaleByName(FX_WSTR wsLocaleName) +IFX_Locale* CFX_LocaleMgr::GetLocaleByName(const CFX_WideStringC& wsLocaleName) { return NULL; } diff --git a/xfa/src/fgas/src/localization/fx_localemgr.h b/xfa/src/fgas/src/localization/fx_localemgr.h index 5e995b2e1b..fbfdf12b0e 100644 --- a/xfa/src/fgas/src/localization/fx_localemgr.h +++ b/xfa/src/fgas/src/localization/fx_localemgr.h @@ -17,7 +17,7 @@ public: virtual FX_WORD GetDefLocaleID(); virtual IFX_Locale* GetDefLocale(); virtual IFX_Locale* GetLocale(FX_WORD lcid); - virtual IFX_Locale* GetLocaleByName(FX_WSTR wsLocaleName); + virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName); CFX_MapPtrToPtr m_lcid2xml; protected: ~CFX_LocaleMgr(); -- cgit v1.2.3