diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-23 14:54:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-24 10:24:23 +0200 |
commit | 4b5fe30b437d62ad72354ed72752438e0544eaa0 (patch) | |
tree | 1b1d641b81b2cbdc79a4720b0c16cbd937d7a0a2 /vcl/source | |
parent | c50ae6a282ed83762bf634fed5c91033eb305c88 (diff) |
NumericField is unused
Change-Id: I9ada46d4c5cc0b2ebf45f062083ba34ebe3d8270
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99320
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/field.cxx | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index f18005f0bb57..bc6328d1adfc 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -776,109 +776,6 @@ sal_Int64 NumericFormatter::ClipAgainstMinMax(sal_Int64 nValue) const return nValue; } -NumericField::NumericField(vcl::Window* pParent, WinBits nWinStyle) - : SpinField(pParent, nWinStyle) - , NumericFormatter(this) -{ - Reformat(); -} - -void NumericField::dispose() -{ - ClearField(); - SpinField::dispose(); -} - -bool NumericField::set_property(const OString &rKey, const OUString &rValue) -{ - if (rKey == "digits") - SetDecimalDigits(rValue.toInt32()); - else if (rKey == "spin-size") - SetSpinSize(rValue.toInt32()); - else if (rKey == "wrap") - mbWrapOnLimits = toBool(rValue); - else - return SpinField::set_property(rKey, rValue); - return true; -} - -bool NumericField::PreNotify( NotifyEvent& rNEvt ) -{ - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) - { - if ( ImplNumericProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) - return true; - } - - return SpinField::PreNotify( rNEvt ); -} - -bool NumericField::EventNotify( NotifyEvent& rNEvt ) -{ - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) - MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) - { - if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) - Reformat(); - } - - return SpinField::EventNotify( rNEvt ); -} - -void NumericField::DataChanged( const DataChangedEvent& rDCEvt ) -{ - SpinField::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::LOCALE) ) - { - OUString sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); - OUString sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); - ImplGetLocaleDataWrapper().setLanguageTag( GetSettings().GetLanguageTag() ); - OUString sNewDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); - OUString sNewThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); - ImplUpdateSeparators( sOldDecSep, sNewDecSep, sOldThSep, sNewThSep, this ); - ReformatAll(); - } -} - -void NumericField::Modify() -{ - MarkToBeReformatted( true ); - SpinField::Modify(); -} - -void NumericField::Up() -{ - FieldUp(); - SpinField::Up(); -} - -void NumericField::Down() -{ - FieldDown(); - SpinField::Down(); -} - -void NumericField::First() -{ - FieldFirst(); - SpinField::First(); -} - -void NumericField::Last() -{ - FieldLast(); - SpinField::Last(); -} - -void NumericField::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) -{ - SpinField::DumpAsPropertyTree(rJsonWriter); - rJsonWriter.put("min", GetMin()); - rJsonWriter.put("max", GetMax()); -} - namespace { Size calcMinimumSize(const Edit &rSpinField, const NumericFormatter &rFormatter) @@ -915,11 +812,6 @@ namespace } } -Size NumericField::CalcMinimumSize() const -{ - return calcMinimumSize(*this, *this); -} - NumericBox::NumericBox(vcl::Window* pParent, WinBits nWinStyle) : ComboBox(pParent, nWinStyle) , NumericFormatter(this) |