[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 12 10:09:56 UTC 2018
vcl/source/control/field.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 5239c649ead0344f6a8fc1bcee44a2ec9fd6ae56
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Oct 4 14:36:24 2018 +0100
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Oct 12 12:09:32 2018 +0200
Resolves: tdf#120031 skip min/max for empty string in GetSavedIntValue
so "" turns into 0, which is which we want for the single use case here
in 6-1
Change-Id: I3e28b09e2ed99ab90583b087b4100efe4935414a
Reviewed-on: https://gerrit.libreoffice.org/61378
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 5401e0300244..afa412a28b20 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -612,7 +612,12 @@ sal_Int64 NumericFormatter::GetValue() const
sal_Int64 NumericFormatter::GetSavedIntValue() const
{
- return GetField() ? GetValueFromString(GetField()->GetSavedValue()) : 0;
+ if (!GetField())
+ return 0;
+ const OUString& rStr = GetField()->GetSavedValue();
+ if (rStr.isEmpty())
+ return 0;
+ return GetValueFromString(rStr);
}
bool NumericFormatter::IsValueModified() const
More information about the Libreoffice-commits
mailing list