diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-14 13:52:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-15 18:17:35 +0100 |
commit | 4ce5d39689fda418e8f2d7d9c1124190b2cbad7a (patch) | |
tree | 1e261f9e2b305fbdf56e3784c6589efbd683755b /include/vcl/fmtfield.hxx | |
parent | 9e0a099fb66c303bec0489198ba7cfe770b28684 (diff) |
bind SalInstanceSpinButton to FormattedField
Change-Id: I71190343739fae51b1c17d74ea1c4a548bca0b01
Reviewed-on: https://gerrit.libreoffice.org/63371
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl/fmtfield.hxx')
-rw-r--r-- | include/vcl/fmtfield.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/vcl/fmtfield.hxx b/include/vcl/fmtfield.hxx index 16b01dd3c1e5..de1a090036f7 100644 --- a/include/vcl/fmtfield.hxx +++ b/include/vcl/fmtfield.hxx @@ -70,6 +70,7 @@ protected: bool m_bEnableEmptyField : 1; bool m_bAutoColor : 1; bool m_bEnableNaN : 1; + bool m_bDisableRemainderFactor : 1; enum valueState { valueDirty, valueString, valueDouble }; valueState m_ValueState; double m_dCurrentValue; @@ -138,6 +139,8 @@ public: void SetThousandsSep(bool _bUseSeparator); // the is no check if the current format is numeric, so be cautious when calling these functions + void DisableRemainderFactor(); + sal_uInt16 GetDecimalDigits() const; void SetDecimalDigits(sal_uInt16 _nPrecision); // There is no check if the current format is numeric, so be cautious when calling these functions @@ -162,6 +165,8 @@ public: virtual void Last() override; // Default Implementation: Current double is set to the first or last value + virtual bool set_property(const OString &rKey, const OUString &rValue) override; + void SetSpinSize(double dStep) { m_dSpinSize = dStep; } double GetSpinSize() const { return m_dSpinSize; } @@ -174,6 +179,8 @@ public: bool TreatingAsNumber() const { return m_bTreatAsNumber; } void TreatAsNumber(bool bDoSo) { m_bTreatAsNumber = bDoSo; } + void SetOutputHdl(const Link<Edit&, bool>& rLink) { m_aOutputHdl = rLink; } + void SetInputHdl(const Link<sal_Int64*,TriState>& rLink) { m_aInputHdl = rLink; } public: virtual void SetText( const OUString& rStr ) override; virtual void SetText( const OUString& rStr, const Selection& rNewSelection ) override; @@ -250,9 +257,11 @@ protected: bool PreNotify(NotifyEvent& rNEvt) override; void ReFormat(); +private: + Link<Edit&, bool> m_aOutputHdl; + Link<sal_Int64*, TriState> m_aInputHdl; }; - class VCL_DLLPUBLIC DoubleNumericField final : public FormattedField { public: |