[Libreoffice-commits] core.git: include/vcl svtools/source svx/source vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 15 12:59:51 UTC 2020
include/vcl/weldutils.hxx | 16 ++++++++--------
svtools/source/brwbox/ebbcontrols.cxx | 8 ++++----
svx/source/fmcomp/gridcell.cxx | 4 ++--
vcl/source/app/weldutils.cxx | 26 +++++++++++++-------------
vcl/source/control/longcurr.cxx | 4 ++--
5 files changed, 29 insertions(+), 29 deletions(-)
New commits:
commit c7cd9bec28fbe06b46c4bc24db39d843857ce731
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 13 14:30:37 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 15 14:58:53 2020 +0200
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 at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx
index 7acb919b493d..ebb458de9727 100644
--- a/include/vcl/weldutils.hxx
+++ b/include/vcl/weldutils.hxx
@@ -202,13 +202,13 @@ private:
virtual void UpdateCurrentValue(double dCurrentValue) override;
};
-class VCL_DLLPUBLIC DoubleNumericEntry final : public EntryFormatter
+class VCL_DLLPUBLIC DoubleNumericFormatter final : public EntryFormatter
{
public:
- DoubleNumericEntry(weld::Entry& rEntry);
- DoubleNumericEntry(weld::FormattedSpinButton& rSpinButton);
+ DoubleNumericFormatter(weld::Entry& rEntry);
+ DoubleNumericFormatter(weld::FormattedSpinButton& rSpinButton);
- virtual ~DoubleNumericEntry() override;
+ virtual ~DoubleNumericFormatter() override;
private:
virtual bool CheckText(const OUString& sText) const override;
@@ -219,16 +219,16 @@ private:
std::unique_ptr<validation::NumberValidator> m_pNumberValidator;
};
-class VCL_DLLPUBLIC LongCurrencyEntry final : public EntryFormatter
+class VCL_DLLPUBLIC LongCurrencyFormatter final : public EntryFormatter
{
public:
- LongCurrencyEntry(weld::Entry& rEntry);
- LongCurrencyEntry(weld::FormattedSpinButton& rSpinButton);
+ LongCurrencyFormatter(weld::Entry& rEntry);
+ LongCurrencyFormatter(weld::FormattedSpinButton& rSpinButton);
void SetUseThousandSep(bool b);
void SetCurrencySymbol(const OUString& rStr);
- virtual ~LongCurrencyEntry() override;
+ virtual ~LongCurrencyFormatter() override;
private:
DECL_LINK(FormatOutputHdl, LinkParamNone*, bool);
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index a10375adf5f8..7372d4fe67d6 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -449,9 +449,9 @@ namespace svt
: FormattedControlBase(pParent, bSpinVariant)
{
if (bSpinVariant)
- m_xEntryFormatter.reset(new weld::DoubleNumericEntry(*m_xSpinButton));
+ m_xEntryFormatter.reset(new weld::DoubleNumericFormatter(*m_xSpinButton));
else
- m_xEntryFormatter.reset(new weld::DoubleNumericEntry(*m_xEntry));
+ m_xEntryFormatter.reset(new weld::DoubleNumericFormatter(*m_xEntry));
InitFormattedControlBase();
}
@@ -459,9 +459,9 @@ namespace svt
: FormattedControlBase(pParent, bSpinVariant)
{
if (bSpinVariant)
- m_xEntryFormatter.reset(new weld::LongCurrencyEntry(*m_xSpinButton));
+ m_xEntryFormatter.reset(new weld::LongCurrencyFormatter(*m_xSpinButton));
else
- m_xEntryFormatter.reset(new weld::LongCurrencyEntry(*m_xEntry));
+ m_xEntryFormatter.reset(new weld::LongCurrencyFormatter(*m_xEntry));
InitFormattedControlBase();
}
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index ca50c2a427fc..bddf63079c0c 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2046,7 +2046,7 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
rEditFormatter.SetMaxValue(nMax);
rEditFormatter.SetSpinSize(nStep);
rEditFormatter.SetStrictFormat(bStrict);
- weld::LongCurrencyEntry& rCurrencyEditFormatter = static_cast<weld::LongCurrencyEntry&>(rEditFormatter);
+ weld::LongCurrencyFormatter& rCurrencyEditFormatter = static_cast<weld::LongCurrencyFormatter&>(rEditFormatter);
rCurrencyEditFormatter.SetUseThousandSep(bThousand);
rCurrencyEditFormatter.SetCurrencySymbol(aStr);
@@ -2055,7 +2055,7 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
rPaintFormatter.SetMinValue(nMin);
rPaintFormatter.SetMaxValue(nMax);
rPaintFormatter.SetStrictFormat(bStrict);
- weld::LongCurrencyEntry& rPaintCurrencyFormatter = static_cast<weld::LongCurrencyEntry&>(rPaintFormatter);
+ weld::LongCurrencyFormatter& rPaintCurrencyFormatter = static_cast<weld::LongCurrencyFormatter&>(rPaintFormatter);
rPaintCurrencyFormatter.SetUseThousandSep(bThousand);
rPaintCurrencyFormatter.SetCurrencySymbol(aStr);
}
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();
More information about the Libreoffice-commits
mailing list