[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 2 08:10:18 UTC 2019
vcl/source/window/builder.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit ed67b443d1db273818737ef7996330a8f475361b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 1 21:40:31 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 2 10:09:29 2019 +0200
clamp to target type bounds
Change-Id: I8d3f7653b7e9b64a2f433b4ebfb8a0fef1522e93
Reviewed-on: https://gerrit.libreoffice.org/71637
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 9cda9210b38d..4006ace7bc36 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -284,7 +284,13 @@ namespace weld
double fResult(0.0);
bool bRet = MetricFormatter::TextToValue(get_text(), fResult, 0, m_xSpinButton->get_digits(), rLocaleData, m_eSrcUnit);
if (bRet)
+ {
+ if (fResult > SAL_MAX_INT32)
+ fResult = SAL_MAX_INT32;
+ else if (fResult < SAL_MIN_INT32)
+ fResult = SAL_MIN_INT32;
*result = fResult;
+ }
return bRet;
}
More information about the Libreoffice-commits
mailing list