summaryrefslogtreecommitdiff
path: root/xfa/fgas/localization
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fgas/localization')
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp7
-rw-r--r--xfa/fgas/localization/fgas_locale.h52
-rw-r--r--xfa/fgas/localization/fgas_localeimp.h96
3 files changed, 48 insertions, 107 deletions
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index 5f7074fc1c..1ef92f0d5f 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -456,13 +456,6 @@ CFX_WideString CFX_LCNumeric::ToString(int32_t nTreading,
return wsResult;
}
-IFX_FormatString* IFX_FormatString::Create(IFX_LocaleMgr* pLocaleMgr,
- FX_BOOL bUseLCID) {
- if (!pLocaleMgr) {
- return NULL;
- }
- return new CFX_FormatString(pLocaleMgr, bUseLCID);
-}
CFX_FormatString::CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID)
: m_pLocaleMgr(pLocaleMgr), m_bUseLCID(bUseLCID) {}
CFX_FormatString::~CFX_FormatString() {}
diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h
index 20b6c1232e..48592a3bb2 100644
--- a/xfa/fgas/localization/fgas_locale.h
+++ b/xfa/fgas/localization/fgas_locale.h
@@ -100,58 +100,6 @@ FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate,
FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
CFX_Unitime& datetime,
IFX_Locale* pLocale);
-class IFX_FormatString {
- public:
- static IFX_FormatString* Create(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID);
-
- virtual ~IFX_FormatString() {}
- virtual void Release() = 0;
- virtual void SplitFormatString(const CFX_WideString& wsFormatString,
- CFX_WideStringArray& wsPatterns) = 0;
- virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern) = 0;
- virtual uint16_t GetLCID(const CFX_WideString& wsPattern) = 0;
- virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern) = 0;
- virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsValue) = 0;
- virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- FX_FLOAT& fValue) = 0;
- virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsValue) = 0;
- virtual FX_BOOL ParseDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
- FX_DATETIMETYPE eDateTimeType,
- CFX_Unitime& dtValue) = 0;
- virtual FX_BOOL ParseZero(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern) = 0;
- virtual FX_BOOL ParseNull(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern) = 0;
- virtual FX_BOOL FormatText(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput) = 0;
- virtual FX_BOOL FormatNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput) = 0;
- virtual FX_BOOL FormatNum(FX_FLOAT fNum,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput) = 0;
- virtual FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput) = 0;
- virtual FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput,
- FX_DATETIMETYPE eDateTimeType) = 0;
- virtual FX_BOOL FormatDateTime(const CFX_Unitime& dt,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput) = 0;
- virtual FX_BOOL FormatZero(const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput) = 0;
- virtual FX_BOOL FormatNull(const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput) = 0;
-};
class CFX_Decimal {
public:
CFX_Decimal();
diff --git a/xfa/fgas/localization/fgas_localeimp.h b/xfa/fgas/localization/fgas_localeimp.h
index c45ed950b9..c828a6bbd7 100644
--- a/xfa/fgas/localization/fgas_localeimp.h
+++ b/xfa/fgas/localization/fgas_localeimp.h
@@ -44,59 +44,59 @@ class CFX_Locale : public IFX_Locale {
CXML_Element* m_pElement;
};
-class CFX_FormatString : public IFX_FormatString {
+class CFX_FormatString {
public:
CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID);
- virtual void Release() { delete this; }
- virtual void SplitFormatString(const CFX_WideString& wsFormatString,
- CFX_WideStringArray& wsPatterns);
- virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern);
- virtual uint16_t GetLCID(const CFX_WideString& wsPattern);
- virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern);
- virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsValue);
- virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- FX_FLOAT& fValue);
- virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsValue);
- virtual FX_BOOL ParseDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
- FX_DATETIMETYPE eDateTimeType,
- CFX_Unitime& dtValue);
- virtual FX_BOOL ParseZero(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern);
- virtual FX_BOOL ParseNull(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern);
- virtual FX_BOOL FormatText(const CFX_WideString& wsSrcText,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput);
- virtual FX_BOOL FormatNum(const CFX_WideString& wsSrcNum,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput);
- virtual FX_BOOL FormatNum(FX_FLOAT fNum,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput);
- virtual FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput);
- virtual FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput,
- FX_DATETIMETYPE eDateTimeType);
- virtual FX_BOOL FormatDateTime(const CFX_Unitime& dt,
- const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput);
- virtual FX_BOOL FormatZero(const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput);
- virtual FX_BOOL FormatNull(const CFX_WideString& wsPattern,
- CFX_WideString& wsOutput);
+ void Release() { delete this; }
+
+ void SplitFormatString(const CFX_WideString& wsFormatString,
+ CFX_WideStringArray& wsPatterns);
+ FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern);
+ uint16_t GetLCID(const CFX_WideString& wsPattern);
+ CFX_WideString GetLocaleName(const CFX_WideString& wsPattern);
+ FX_BOOL ParseText(const CFX_WideString& wsSrcText,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsValue);
+ FX_BOOL ParseNum(const CFX_WideString& wsSrcNum,
+ const CFX_WideString& wsPattern,
+ FX_FLOAT& fValue);
+ FX_BOOL ParseNum(const CFX_WideString& wsSrcNum,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsValue);
+ FX_BOOL ParseDateTime(const CFX_WideString& wsSrcDateTime,
+ const CFX_WideString& wsPattern,
+ FX_DATETIMETYPE eDateTimeType,
+ CFX_Unitime& dtValue);
+ FX_BOOL ParseZero(const CFX_WideString& wsSrcText,
+ const CFX_WideString& wsPattern);
+ FX_BOOL ParseNull(const CFX_WideString& wsSrcText,
+ const CFX_WideString& wsPattern);
+ FX_BOOL FormatText(const CFX_WideString& wsSrcText,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsOutput);
+ FX_BOOL FormatNum(const CFX_WideString& wsSrcNum,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsOutput);
+ FX_BOOL FormatNum(FX_FLOAT fNum,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsOutput);
+ FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsOutput);
+ FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsOutput,
+ FX_DATETIMETYPE eDateTimeType);
+ FX_BOOL FormatDateTime(const CFX_Unitime& dt,
+ const CFX_WideString& wsPattern,
+ CFX_WideString& wsOutput);
+ FX_BOOL FormatZero(const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
+ FX_BOOL FormatNull(const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
protected:
- virtual ~CFX_FormatString();
+ ~CFX_FormatString();
+
IFX_Locale* GetTextFormat(const CFX_WideString& wsPattern,
const CFX_WideStringC& wsCategory,
CFX_WideString& wsPurgePattern);