summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-21 09:29:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-21 15:34:16 +0200
commit387a88fa252990ded26ee7ea6b89b11be7616986 (patch)
tree870415232202aec0c314b7626b5ad01ddb6083b0 /basic/source/comp
parent4bea7a17056770c83006048f9fd3fa252958718b (diff)
use tools::Long in basegfx..chart2
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/exprnode.cxx15
-rw-r--r--basic/source/comp/symtbl.cxx3
2 files changed, 10 insertions, 8 deletions
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 8fb38b44eeb6..3b0bbc4ceaec 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -24,6 +24,7 @@
#include <rtl/math.hxx>
#include <parser.hxx>
#include <expr.hxx>
+#include <tools/long.hxx>
#include <basic/sberrors.hxx>
@@ -294,8 +295,8 @@ void SbiExprNode::FoldConstantsBinaryNode(SbiParser* pParser)
{
double nl = pLeft->nVal;
double nr = pRight->nVal;
- long ll = 0, lr = 0;
- long llMod = 0, lrMod = 0;
+ tools::Long ll = 0, lr = 0;
+ tools::Long llMod = 0, lrMod = 0;
if( ( eTok >= AND && eTok <= IMP )
|| eTok == IDIV || eTok == MOD )
{
@@ -321,9 +322,9 @@ void SbiExprNode::FoldConstantsBinaryNode(SbiParser* pParser)
bErr = true;
nr = SbxMINLNG;
}
- ll = static_cast<long>(nl); lr = static_cast<long>(nr);
- llMod = static_cast<long>(nl);
- lrMod = static_cast<long>(nr);
+ ll = static_cast<tools::Long>(nl); lr = static_cast<tools::Long>(nr);
+ llMod = static_cast<tools::Long>(nl);
+ lrMod = static_cast<tools::Long>(nr);
if( bErr )
{
pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
@@ -411,7 +412,7 @@ void SbiExprNode::FoldConstantsBinaryNode(SbiParser* pParser)
&& nVal >= SbxMINLNG && nVal <= SbxMAXLNG )
{
// Decimal place away
- long n = static_cast<long>(nVal);
+ tools::Long n = static_cast<tools::Long>(nVal);
nVal = n;
eType = ( n >= SbxMININT && n <= SbxMAXINT )
? SbxINTEGER : SbxLONG;
@@ -450,7 +451,7 @@ void SbiExprNode::FoldConstantsUnaryNode(SbiParser* pParser)
pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
bError = true;
}
- nVal = static_cast<double>(~static_cast<long>(nVal));
+ nVal = static_cast<double>(~static_cast<tools::Long>(nVal));
eType = SbxLONG;
} break;
default: break;
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 00a857abad6a..46b3b924798e 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <rtl/character.hxx>
#include <basic/sberrors.hxx>
+#include <tools/long.hxx>
// All symbol names are laid down int the symbol-pool's stringpool, so that
// all symbols are handled in the same case. On saving the code-image, the
@@ -69,7 +70,7 @@ short SbiStringPool::Add( double n, SbxDataType t )
// tdf#131296 - store numeric value including its type character
// See GetSuffixType in basic/source/comp/scanner.cxx for type characters
case SbxINTEGER: snprintf( buf, sizeof(buf), "%d%%", static_cast<short>(n) ); break;
- case SbxLONG: snprintf( buf, sizeof(buf), "%ld&", static_cast<long>(n) ); break;
+ case SbxLONG: snprintf( buf, sizeof(buf), "%ld&", static_cast<tools::Long>(n) ); break;
case SbxSINGLE: snprintf( buf, sizeof(buf), "%.6g!", static_cast<float>(n) ); break;
case SbxDOUBLE: snprintf( buf, sizeof(buf), "%.16g", n ); break; // default processing in SbiRuntime::StepLOADNC - no type character
case SbxCURRENCY: snprintf(buf, sizeof(buf), "%.16g@", n); break;