diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-13 14:30:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-15 14:58:53 +0200 |
commit | c7cd9bec28fbe06b46c4bc24db39d843857ce731 (patch) | |
tree | 77fd34d8992d21ad81cca11453675aec1736d6c3 /vcl | |
parent | 590ec971a833e353e745049503958c99d58bbb15 (diff) |
rename entry formatter for more consistent naming
Change-Id: I0a138015b1db6d00413e4b381f0da0757d56e25c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98667
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/weldutils.cxx | 26 | ||||
-rw-r--r-- | vcl/source/control/longcurr.cxx | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx index ba4c30b416d2..3c11b8e4afbb 100644 --- a/vcl/source/app/weldutils.cxx +++ b/vcl/source/app/weldutils.cxx @@ -236,27 +236,27 @@ IMPL_LINK_NOARG(EntryFormatter, FocusOutHdl, weld::Widget&, void) m_aFocusOutHdl.Call(m_rEntry); } -DoubleNumericEntry::DoubleNumericEntry(weld::Entry& rEntry) +DoubleNumericFormatter::DoubleNumericFormatter(weld::Entry& rEntry) : EntryFormatter(rEntry) { ResetConformanceTester(); } -DoubleNumericEntry::DoubleNumericEntry(weld::FormattedSpinButton& rSpinButton) +DoubleNumericFormatter::DoubleNumericFormatter(weld::FormattedSpinButton& rSpinButton) : EntryFormatter(rSpinButton) { ResetConformanceTester(); } -DoubleNumericEntry::~DoubleNumericEntry() = default; +DoubleNumericFormatter::~DoubleNumericFormatter() = default; -void DoubleNumericEntry::FormatChanged(FORMAT_CHANGE_TYPE nWhat) +void DoubleNumericFormatter::FormatChanged(FORMAT_CHANGE_TYPE nWhat) { ResetConformanceTester(); EntryFormatter::FormatChanged(nWhat); } -bool DoubleNumericEntry::CheckText(const OUString& sText) const +bool DoubleNumericFormatter::CheckText(const OUString& sText) const { // We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't // recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10") @@ -264,7 +264,7 @@ bool DoubleNumericEntry::CheckText(const OUString& sText) const return m_pNumberValidator->isValidNumericFragment(sText); } -void DoubleNumericEntry::ResetConformanceTester() +void DoubleNumericFormatter::ResetConformanceTester() { // the thousands and the decimal separator are language dependent const SvNumberformat* pFormatEntry = GetOrCreateFormatter()->GetEntry(m_nFormatKey); @@ -288,32 +288,32 @@ void DoubleNumericEntry::ResetConformanceTester() new validation::NumberValidator(cSeparatorThousand, cSeparatorDecimal)); } -LongCurrencyEntry::LongCurrencyEntry(weld::Entry& rEntry) +LongCurrencyFormatter::LongCurrencyFormatter(weld::Entry& rEntry) : EntryFormatter(rEntry) { } -LongCurrencyEntry::LongCurrencyEntry(weld::FormattedSpinButton& rSpinButton) +LongCurrencyFormatter::LongCurrencyFormatter(weld::FormattedSpinButton& rSpinButton) : EntryFormatter(rSpinButton) , m_bThousandSep(true) { - SetOutputHdl(LINK(this, LongCurrencyEntry, FormatOutputHdl)); - SetInputHdl(LINK(this, LongCurrencyEntry, ParseInputHdl)); + SetOutputHdl(LINK(this, LongCurrencyFormatter, FormatOutputHdl)); + SetInputHdl(LINK(this, LongCurrencyFormatter, ParseInputHdl)); } -void LongCurrencyEntry::SetUseThousandSep(bool b) +void LongCurrencyFormatter::SetUseThousandSep(bool b) { m_bThousandSep = b; ReFormat(); } -void LongCurrencyEntry::SetCurrencySymbol(const OUString& rStr) +void LongCurrencyFormatter::SetCurrencySymbol(const OUString& rStr) { m_aCurrencySymbol = rStr; ReFormat(); } -LongCurrencyEntry::~LongCurrencyEntry() = default; +LongCurrencyFormatter::~LongCurrencyFormatter() = default; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 6e5baa5de9fe..af7b0b37f08a 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -223,7 +223,7 @@ static bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue, namespace weld { - IMPL_LINK_NOARG(LongCurrencyEntry, FormatOutputHdl, LinkParamNone*, bool) + IMPL_LINK_NOARG(LongCurrencyFormatter, FormatOutputHdl, LinkParamNone*, bool) { const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper(); const OUString& rCurrencySymbol = !m_aCurrencySymbol.isEmpty() ? m_aCurrencySymbol : rLocaleDataWrapper.getCurrSymbol(); @@ -233,7 +233,7 @@ namespace weld return true; } - IMPL_LINK(LongCurrencyEntry, ParseInputHdl, sal_Int64*, result, TriState) + IMPL_LINK(LongCurrencyFormatter, ParseInputHdl, sal_Int64*, result, TriState) { const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper(); |