diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-03 12:08:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-05 16:44:09 +0200 |
commit | 95cfa85395f983df3ba044192b29ce0bbc5e6085 (patch) | |
tree | 24388695e580fab69539bc4d9304e8a5535ef6bf /include/vcl/formatter.hxx | |
parent | 7b6549811a929e004266a6ead26b69d499c73e0c (diff) |
adjust FormattedSpinButton to be driven by an EntryFormatter
so we can have the same backend driving the FormattedSpinButtons as a
FormattedEntry
Change-Id: I07a472315a04787eb5fcf992cde8f758af742156
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97860
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl/formatter.hxx')
-rw-r--r-- | include/vcl/formatter.hxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/vcl/formatter.hxx b/include/vcl/formatter.hxx index f54d59ca4600..4f9a016cc6da 100644 --- a/include/vcl/formatter.hxx +++ b/include/vcl/formatter.hxx @@ -156,13 +156,13 @@ public: // Min-/Max-management bool HasMinValue() const { return m_bHasMin; } - void ClearMinValue() { m_bHasMin = false; } - void SetMinValue(double dMin); + virtual void ClearMinValue() { m_bHasMin = false; } + virtual void SetMinValue(double dMin); double GetMinValue() const { return m_dMinValue; } bool HasMaxValue() const { return m_bHasMax; } - void ClearMaxValue() { m_bHasMax = false; } - void SetMaxValue(double dMax); + virtual void ClearMaxValue() { m_bHasMax = false; } + virtual void SetMaxValue(double dMax); double GetMaxValue() const { return m_dMaxValue; } // Current value @@ -219,7 +219,7 @@ public: void SetStrictFormat(bool bEnable) { m_bStrictFormat = bEnable; } // Check format during input - void SetSpinSize(double dStep) { m_dSpinSize = dStep; } + virtual void SetSpinSize(double dStep) { m_dSpinSize = dStep; } double GetSpinSize() const { return m_dSpinSize; } void SetSpinFirst(double dFirst) { m_dSpinFirst = dFirst; } @@ -304,6 +304,8 @@ protected: SvNumberFormatter* CreateFormatter() { SetFormatter(StandardFormatter()); return m_pFormatter; } + virtual void UpdateCurrentValue(double dCurrentValue) { m_dCurrentValue = dCurrentValue; } + void ReFormat(); }; |