summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_localevalue.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-06-05 09:46:45 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-05 13:58:40 +0000
commit7211eac14643bbbaf41bfc205c244668f46be440 (patch)
tree6dacdf2a39b60695d0811d8ff63b650ebe56e3c1 /xfa/fxfa/parser/cxfa_localevalue.h
parentaf680b17e0e1b94e40afa6a01ba3bbdead2d6035 (diff)
downloadpdfium-7211eac14643bbbaf41bfc205c244668f46be440.tar.xz
Cleaning up some XFA locale related code
This CL removes some unused locale related code and formats other bits. Change-Id: I172fc16a634a8982c00bfaf84fdcd4cd277eb36d Reviewed-on: https://pdfium-review.googlesource.com/6077 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_localevalue.h')
-rw-r--r--xfa/fxfa/parser/cxfa_localevalue.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/xfa/fxfa/parser/cxfa_localevalue.h b/xfa/fxfa/parser/cxfa_localevalue.h
index d263dba476..caf4b0c0f1 100644
--- a/xfa/fxfa/parser/cxfa_localevalue.h
+++ b/xfa/fxfa/parser/cxfa_localevalue.h
@@ -44,11 +44,30 @@ class CXFA_LocaleValue {
bool ValidateValue(const CFX_WideString& wsValue,
const CFX_WideString& wsPattern,
IFX_Locale* pLocale,
- CFX_WideString* pMatchFormat = nullptr);
+ CFX_WideString* pMatchFormat);
+
bool FormatPatterns(CFX_WideString& wsResult,
const CFX_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,
+ IFX_Locale* pLocale);
+
+ CFX_WideString GetValue() const { return m_wsValue; }
+ uint32_t GetType() const { return m_dwType; }
+ double GetDoubleNum() const;
+ bool SetDate(const CFX_DateTime& d);
+ CFX_DateTime GetDate() const;
+ CFX_DateTime GetTime() const;
+
+ bool IsValid() const { return m_bValid; }
+
+ private:
bool FormatSinglePattern(CFX_WideString& wsResult,
const CFX_WideString& wsFormat,
IFX_Locale* pLocale,
@@ -57,29 +76,14 @@ class CXFA_LocaleValue {
bool ValidateCanonicalDate(const CFX_WideString& wsDate,
CFX_DateTime* unDate);
bool ValidateCanonicalTime(const CFX_WideString& wsTime);
- void GetNumbericFormat(CFX_WideString& wsFormat,
- int32_t nIntLen,
- int32_t nDecLen,
- bool bSign = true);
- bool ValidateNumericTemp(CFX_WideString& wsNumeric,
- CFX_WideString& wsFormat,
- IFX_Locale* pLocale = nullptr,
- int32_t* pos = nullptr);
-
- CFX_WideString GetValue() const;
- uint32_t GetType() const;
- double GetDoubleNum() const;
- CFX_DateTime GetDate() const;
- CFX_DateTime GetTime() const;
- bool SetDate(const CFX_DateTime& d);
+
bool SetTime(const CFX_DateTime& t);
bool SetDateTime(const CFX_DateTime& dt);
- bool IsValid() const { return m_bValid; }
- private:
bool ParsePatternValue(const CFX_WideString& wsValue,
const CFX_WideString& wsPattern,
IFX_Locale* pLocale);
+
CXFA_LocaleMgr* m_pLocaleMgr;
CFX_WideString m_wsValue;
uint32_t m_dwType;