diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2021-09-30 09:31:55 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-09-30 15:19:49 +0200 |
commit | bc2896c98795d356d2c1b690d431b94aebd5b5bb (patch) | |
tree | b42f40feec8d6030ab6654b059cfcda2d0eb2c53 /basic | |
parent | da0d6541b29f4dd3cd223e15be14dabc2704fb83 (diff) |
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@yahoo.de>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122881
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/sbx/sbxscan.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
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 ) |