From 47aabde053a1472dc32770da29d68c8de5bd7919 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 2 Dec 2021 12:37:07 +0200 Subject: Make the tdf#97983 changes to BASIC optional If you want to keep the string to floating point conversion semantics in BASIC as they were in LibreOffice 6, you can either set the LIBREOFFICE6FLOATINGPOINTMODE environment variable to some non-empty value, or set the org.openoffice.Office.Scripting/Basic/Compatibility/ UseLibreOffice6FloatingPointConversion flag in the Expert Configuration. (Or use a registry modification file with that effect.) Adapt the relevant unit test accordingly. Thanks to Mike Kaganski for showing how to access the setting in the LibreOffice registry from Basic. Change-Id: I13d6d5d834e1bb81ef8df489db2b1da79f01dfc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125756 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- basic/source/sbx/sbxscan.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'basic/source/sbx/sbxscan.cxx') diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index e6037d05cbcd..d8c1582af52d 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -26,6 +26,7 @@ #include #include #include "sbxconv.hxx" +#include #include #include @@ -400,7 +401,7 @@ bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen ) { double n; SbxDataType t; - eRes = ImpScan( rSrc, n, t, pLen, true ); + eRes = ImpScan( rSrc, n, t, pLen, !LibreOffice6FloatingPointMode() ); if( eRes == ERRCODE_NONE ) { if( !IsFixed() ) -- cgit