diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-07 21:22:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-08 10:00:57 +0100 |
commit | 68d370ddf14455a31898b5e456ab2b4d64ae9e51 (patch) | |
tree | d097242220268647a34c2933c1e302e6e788f0e3 /include/vcl/field.hxx | |
parent | 7d73c1c00c14df7cd130db1f7196a1bfe5155a83 (diff) |
clarify that edit doesn't change during FormatterBase lifetime
Change-Id: I416eee47eaae49a629fb0199e6b086215d315a94
Reviewed-on: https://gerrit.libreoffice.org/63048
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl/field.hxx')
-rw-r--r-- | include/vcl/field.hxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index faf37bb2cd58..33c7ecf4e000 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -55,11 +55,11 @@ protected: SAL_DLLPRIVATE LocaleDataWrapper& ImplGetLocaleDataWrapper() const; - void SetField( Edit* pField ) { mpField = pField; } Edit* GetField() const { return mpField; } + void ClearField() { mpField.clear(); } public: - explicit FormatterBase(); + explicit FormatterBase(Edit* pField); virtual ~FormatterBase(); const LocaleDataWrapper& GetLocaleDataWrapper() const; @@ -95,7 +95,7 @@ private: bool mbInPattKeyInput; protected: - PatternFormatter(); + PatternFormatter(Edit* pEdit); SAL_DLLPRIVATE void ImplSetMask(const OString& rEditMask, const OUString& rLiteralMask); @@ -174,7 +174,7 @@ protected: sal_Int64 mnFirst; sal_Int64 mnLast; - NumericFormatter(); + NumericFormatter(Edit* pEdit); void FieldUp(); void FieldDown(); @@ -244,7 +244,7 @@ protected: FieldUnit meUnit; Link<MetricFormatter&,void> maCustomConvertLink; - MetricFormatter(); + MetricFormatter(Edit* pEdit); SAL_DLLPRIVATE void ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ); @@ -262,7 +262,7 @@ private: class VCL_DLLPUBLIC CurrencyFormatter : public NumericFormatter { protected: - CurrencyFormatter(); + CurrencyFormatter(Edit* pEdit); SAL_DLLPRIVATE void ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ); virtual sal_Int64 GetValueFromString(const OUString& rStr) const override; @@ -292,7 +292,7 @@ private: SAL_DLLPRIVATE void ImplInit(); protected: - DateFormatter(); + DateFormatter(Edit* pEdit); SAL_DLLPRIVATE const Date& ImplGetFieldDate() const { return maFieldDate; } SAL_DLLPRIVATE void ImplDateReformat( const OUString& rStr, OUString& rOutStr ); @@ -372,7 +372,7 @@ private: protected: tools::Time maFieldTime; - TimeFormatter(); + TimeFormatter(Edit* pEdit); SAL_DLLPRIVATE void ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime ); |