vcl/source/control/field.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 6ab0e309adabd8aeda00909b2ea9f0f1cb45144a Author: Caolán McNamara <[email protected]> AuthorDate: Thu Oct 4 14:36:24 2018 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Oct 15 12:17:16 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 <[email protected]> (cherry picked from commit 5239c649ead0344f6a8fc1bcee44a2ec9fd6ae56) Reviewed-on: https://gerrit.libreoffice.org/61712 Tested-by: Xisco Faulí <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
