summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-10-14 14:46:31 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2015-10-14 14:52:10 +0200
commiteb33ef931a635d2d706e2ec4abec3f5a7a24674a (patch)
tree70d7da1429a387f7565e039c9820f29e862d56d9 /include/svtools
parent96983b2a2cad767cb3bfd77ce60acfe31402dd9c (diff)
tdf#93390 correctly handle back-and-forth between numeric and text value
Change-Id: I06711afd5d668816608661f0fe433efd93fef99e
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/fmtfield.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx
index ea9ba48793a5..6426772295cd 100644
--- a/include/svtools/fmtfield.hxx
+++ b/include/svtools/fmtfield.hxx
@@ -66,10 +66,11 @@ protected:
bool m_bStrictFormat : 1;
- bool m_bValueDirty : 1;
bool m_bEnableEmptyField : 1;
bool m_bAutoColor : 1;
bool m_bEnableNaN : 1;
+ enum valueState { valueDirty, valueString, valueDouble };
+ valueState m_ValueState;
double m_dCurrentValue;
double m_dDefaultValue;
@@ -119,7 +120,7 @@ public:
void EnableEmptyField(bool bEnable);
// If disabled, the value will be resetted to the last valid value on leave
- void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_bValueDirty = true; }
+ void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_ValueState = valueDirty; }
// If the current String is invalid, GetValue() returns this value
double GetDefaultValue() const { return m_dDefaultValue; }