[Libreoffice-commits] core.git: basic/source
Andreas Heinisch (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 30 09:34:30 UTC 2021
basic/source/sbx/sbxscan.cxx | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
New commits:
commit 8294268307d98d3ea04f18a2ed89212cec516845
Author: Andreas Heinisch <andreas.heinisch at yahoo.de>
AuthorDate: Thu Sep 30 09:31:55 2021 +0200
Commit: Andreas Heinisch <andreas.heinisch at yahoo.de>
CommitDate: Thu Sep 30 11:33:55 2021 +0200
tdf#143575, tdf#143974 - Remove custom precision format in BASIC
Change-Id: Iefe046fa223f85204b27ebabe81523aa1a97f92f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122856
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch at yahoo.de>
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index c3edcac0810e..a496a51d6ccb 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -310,14 +310,8 @@ void ImpCvtNum( double nNum, short nPrec, OUString& rRes, bool bCoreString )
if( bCoreString )
cDecimalSep = '.';
- const double dMaxNumWithoutExp = (nPrec == 6) ? 1E6 : 1E14;
- rtl_math_StringFormat aMathStringFormat
- = (nNum && (std::abs(nNum) < 1E-1 || std::abs(nNum) >= dMaxNumWithoutExp))
- ? rtl_math_StringFormat_E2
- : rtl_math_StringFormat_F;
-
// tdf#143575 - use rtl::math::doubleToUString to convert numbers to strings in basic
- rRes = rtl::math::doubleToUString(nNum, aMathStringFormat, nPrec, cDecimalSep, true);
+ rRes = rtl::math::doubleToUString(nNum, rtl_math_StringFormat_Automatic, nPrec, cDecimalSep, true);
}
bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType )
More information about the Libreoffice-commits
mailing list