diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
commit | 9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch) | |
tree | 812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /sal | |
parent | Releasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff) | |
download | libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip |
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/strtmpl.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx index 6414115d41..8c63f1081f 100644 --- a/sal/rtl/strtmpl.hxx +++ b/sal/rtl/strtmpl.hxx @@ -1527,6 +1527,11 @@ void doubleToString(rtl_tString** pResult, sal_Int32* pResultCapacity, sal_Int32 } else { + if (nOrigDigits <= nDecPlaces && aParts.exponent >= 0 && fValue < 0x1p53) + { + // Use integer representation with highest accuracy. + nRoundDigits = nOrigDigits; // no rounding + } nDecPlaces = std::max<sal_Int32>(0, nDecPlaces - nExp - 1); eFormat = rtl_math_StringFormat_F; } |