diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-24 20:37:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-25 08:57:06 +0200 |
commit | c9e13a9f18af433a306a489e996f680aba442da4 (patch) | |
tree | 6f5fcac5e24877718b7e948d72f30ca6df33ee84 /vcl | |
parent | 49a273dde0aaf6329a6776176413ffb7845d7b1f (diff) |
loplugin:unusedfields
Change-Id: Ia2fb09dcd6f266e7eab04fceb893839531ab3e00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/field.cxx | 7 | ||||
-rw-r--r-- | vcl/source/control/longcurr.cxx | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index bc6328d1adfc..65089351795d 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -546,7 +546,6 @@ NumericFormatter::NumericFormatter(Edit* pEdit) // a "large" value substantially smaller than SAL_MAX_INT64, to avoid // overflow in computations using this "dummy" value , mnMax(SAL_MAX_INT32) - , mbWrapOnLimits(false) , mbFormatting(false) , mnSpinSize(1) // for fields @@ -768,11 +767,9 @@ void NumericFormatter::ImplNewFieldValue( sal_Int64 nNewValue ) sal_Int64 NumericFormatter::ClipAgainstMinMax(sal_Int64 nValue) const { if (nValue > mnMax) - nValue = mbWrapOnLimits ? ((nValue - mnMin) % (mnMax + 1)) + mnMin - : mnMax; + nValue = mnMax; else if (nValue < mnMin) - nValue = mbWrapOnLimits ? ((nValue + mnMax + 1 - mnMin) % (mnMax + 1)) + mnMin - : mnMin; + nValue = mnMin; return nValue; } diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 42a79fffd400..b4368c3e10a6 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -291,7 +291,7 @@ LongCurrencyFormatter::~LongCurrencyFormatter() OUString const & LongCurrencyFormatter::GetCurrencySymbol() const { - return !maCurrencySymbol.isEmpty() ? maCurrencySymbol : GetLocaleDataWrapper().getCurrSymbol(); + return GetLocaleDataWrapper().getCurrSymbol(); } void LongCurrencyFormatter::SetValue(const BigInt& rNewValue) |