summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxint.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/sbx/sbxint.cxx')
-rw-r--r--basic/source/sbx/sbxint.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 85febcd802c2..1b57239ddba9 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -19,11 +19,11 @@
#include <sal/config.h>
-#include <o3tl/float_int_conversion.hxx>
#include <o3tl/safeint.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
+#include <rtlproto.hxx>
#include <rtl/math.hxx>
@@ -140,7 +140,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr, true ) != ERRCODE_NONE )
+ if( ImpScan( *p->pOUString, d, t, nullptr, !LibreOffice6FloatingPointMode() ) != ERRCODE_NONE )
nRes = 0;
else
nRes = ImpDoubleToInteger(d);
@@ -383,7 +383,7 @@ start:
// Check if really 0 or invalid conversion
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr, true ) != ERRCODE_NONE )
+ if( ImpScan( *p->pOUString, d, t, nullptr, !LibreOffice6FloatingPointMode() ) != ERRCODE_NONE )
nRes = 0;
else
nRes = ImpDoubleToSalInt64(d);
@@ -485,8 +485,7 @@ start:
if( !p->pOUString )
p->pOUString = new OUString;
- ::OString aOStr = OString::number( n );
- (*p->pOUString) = ::OStringToOUString( aOStr, RTL_TEXTENCODING_ASCII_US );
+ (*p->pOUString) = OUString::number(n);
break;
}
case SbxOBJECT:
@@ -639,7 +638,7 @@ start:
// Check if really 0 or invalid conversion
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr, true ) != ERRCODE_NONE )
+ if( ImpScan( *p->pOUString, d, t, nullptr, !LibreOffice6FloatingPointMode() ) != ERRCODE_NONE )
nRes = 0;
else
nRes = ImpDoubleToSalUInt64(d);
@@ -742,8 +741,7 @@ start:
SbxBase::SetError( ERRCODE_BASIC_CONVERSION );
else
{
- ::OString aOStr = OString::number( n );
- (*p->pOUString) = ::OStringToOUString( aOStr, RTL_TEXTENCODING_ASCII_US );
+ (*p->pOUString) = OUString::number(n);
}
break;
case SbxOBJECT: