summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_localevalue.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_localevalue.h')
-rw-r--r--xfa/fxfa/parser/cxfa_localevalue.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_localevalue.h b/xfa/fxfa/parser/cxfa_localevalue.h
index cedea10b10..c6f9c1ee98 100644
--- a/xfa/fxfa/parser/cxfa_localevalue.h
+++ b/xfa/fxfa/parser/cxfa_localevalue.h
@@ -9,6 +9,7 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
+#include "core/fxcrt/unowned_ptr.h"
#include "xfa/fxfa/parser/cxfa_node.h"
class LocaleIface;
@@ -28,7 +29,6 @@ class CXFA_LocaleMgr;
class CXFA_LocaleValue {
public:
CXFA_LocaleValue();
- CXFA_LocaleValue(const CXFA_LocaleValue& value);
CXFA_LocaleValue(uint32_t dwType, CXFA_LocaleMgr* pLocaleMgr);
CXFA_LocaleValue(uint32_t dwType,
const WideString& wsValue,
@@ -38,8 +38,10 @@ class CXFA_LocaleValue {
const WideString& wsFormat,
LocaleIface* pLocale,
CXFA_LocaleMgr* pLocaleMgr);
+ CXFA_LocaleValue(const CXFA_LocaleValue& that);
~CXFA_LocaleValue();
- CXFA_LocaleValue& operator=(const CXFA_LocaleValue& value);
+
+ CXFA_LocaleValue& operator=(const CXFA_LocaleValue& that);
bool ValidateValue(const WideString& wsValue,
const WideString& wsPattern,
@@ -56,6 +58,7 @@ class CXFA_LocaleValue {
const WideString& wsFormat,
LocaleIface* pLocale);
+ bool IsValid() const { return m_bValid; }
WideString GetValue() const { return m_wsValue; }
uint32_t GetType() const { return m_dwType; }
double GetDoubleNum() const;
@@ -63,8 +66,6 @@ class CXFA_LocaleValue {
CFX_DateTime GetDate() const;
CFX_DateTime GetTime() const;
- bool IsValid() const { return m_bValid; }
-
private:
bool FormatSinglePattern(WideString& wsResult,
const WideString& wsFormat,
@@ -81,10 +82,10 @@ class CXFA_LocaleValue {
const WideString& wsPattern,
LocaleIface* pLocale);
- CXFA_LocaleMgr* m_pLocaleMgr;
+ UnownedPtr<CXFA_LocaleMgr> m_pLocaleMgr;
WideString m_wsValue;
- uint32_t m_dwType;
- bool m_bValid;
+ uint32_t m_dwType = XFA_VT_NULL;
+ bool m_bValid = true;
};
#endif // XFA_FXFA_PARSER_CXFA_LOCALEVALUE_H_