basic/source/sbx/sbxscan.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit bc2896c98795d356d2c1b690d431b94aebd5b5bb
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Thu Sep 30 09:31:55 2021 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Sep 30 15:19:49 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.heini...@yahoo.de>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122881

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 2d42c2351d4f..1c5983fd7959 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -309,14 +309,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 )

Reply via email to