summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxscan.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2021-12-02 12:37:07 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-12-09 12:06:49 +0100
commit47aabde053a1472dc32770da29d68c8de5bd7919 (patch)
tree88526deaaa76a5583cd06abe48c6a44e0a65c41e /basic/source/sbx/sbxscan.cxx
parentc1916d3ab8f764e465f889334050ce7c863576b3 (diff)
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source/sbx/sbxscan.cxx')
-rw-r--r--basic/source/sbx/sbxscan.cxx3
1 files changed, 2 insertions, 1 deletions
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 <vcl/errcode.hxx>
#include <unotools/resmgr.hxx>
#include "sbxconv.hxx"
+#include <rtlproto.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/charclass.hxx>
@@ -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() )