summaryrefslogtreecommitdiff
path: root/basic/source/comp/exprnode.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/comp/exprnode.cxx')
-rwxr-xr-x[-rw-r--r--]basic/source/comp/exprnode.cxx76
1 files changed, 38 insertions, 38 deletions
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 542fdaeba6..ff171eecc3 100644..100755
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -54,7 +54,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, SbiToken t, SbiExprNode*
nVal = 0;
eType = SbxVARIANT; // Nodes are always Variant
eNodeType = SbxNODE;
- bComposite= TRUE;
+ bComposite= sal_True;
}
SbiExprNode::SbiExprNode( SbiParser* p, double n, SbxDataType t )
@@ -87,11 +87,11 @@ SbiExprNode::SbiExprNode( SbiParser* p, const SbiSymDef& r, SbxDataType t, SbiEx
aVar.pNext= NULL;
// Results of functions are at no time fixed
- bComposite= BOOL( aVar.pDef->GetProcDef() != NULL );
+ bComposite= sal_Bool( aVar.pDef->GetProcDef() != NULL );
}
// #120061 TypeOf
-SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, USHORT nId )
+SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, sal_uInt16 nId )
{
BaseInit( p );
@@ -102,7 +102,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, USHORT nId )
}
// new <type>
-SbiExprNode::SbiExprNode( SbiParser* p, USHORT nId )
+SbiExprNode::SbiExprNode( SbiParser* p, sal_uInt16 nId )
{
BaseInit( p );
@@ -119,8 +119,8 @@ void SbiExprNode::BaseInit( SbiParser* p )
pLeft = NULL;
pRight = NULL;
pWithParent = NULL;
- bComposite = FALSE;
- bError = FALSE;
+ bComposite = sal_False;
+ bError = sal_False;
}
SbiExprNode::~SbiExprNode()
@@ -175,7 +175,7 @@ SbiExprNode* SbiExprNode::GetRealNode()
// This method transform the type, if it fits into the Integer range
-BOOL SbiExprNode::IsIntConst()
+sal_Bool SbiExprNode::IsIntConst()
{
if( eNodeType == SbxNUMVAL )
{
@@ -186,29 +186,29 @@ BOOL SbiExprNode::IsIntConst()
{
nVal = (double) (short) nVal;
eType = SbxINTEGER;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SbiExprNode::IsNumber()
+sal_Bool SbiExprNode::IsNumber()
{
- return BOOL( eNodeType == SbxNUMVAL );
+ return sal_Bool( eNodeType == SbxNUMVAL );
}
-BOOL SbiExprNode::IsString()
+sal_Bool SbiExprNode::IsString()
{
- return BOOL( eNodeType == SbxSTRVAL );
+ return sal_Bool( eNodeType == SbxSTRVAL );
}
-BOOL SbiExprNode::IsVariable()
+sal_Bool SbiExprNode::IsVariable()
{
- return BOOL( eNodeType == SbxVARVAL );
+ return sal_Bool( eNodeType == SbxVARVAL );
}
-BOOL SbiExprNode::IsLvalue()
+sal_Bool SbiExprNode::IsLvalue()
{
return IsVariable();
}
@@ -284,7 +284,7 @@ void SbiExprNode::FoldConstants()
String rr( pRight->GetString() );
delete pLeft; pLeft = NULL;
delete pRight; pRight = NULL;
- bComposite = FALSE;
+ bComposite = sal_False;
if( eTok == PLUS || eTok == CAT )
{
eTok = CAT;
@@ -321,7 +321,7 @@ void SbiExprNode::FoldConstants()
break;
default:
pGen->GetParser()->Error( SbERR_CONVERSION );
- bError = TRUE;
+ bError = sal_True;
}
}
}
@@ -335,50 +335,50 @@ void SbiExprNode::FoldConstants()
|| eTok == IDIV || eTok == MOD )
{
// Integer operations
- BOOL err = FALSE;
- if( nl > SbxMAXLNG ) err = TRUE, nl = SbxMAXLNG;
+ sal_Bool err = sal_False;
+ if( nl > SbxMAXLNG ) err = sal_True, nl = SbxMAXLNG;
else
- if( nl < SbxMINLNG ) err = TRUE, nl = SbxMINLNG;
- if( nr > SbxMAXLNG ) err = TRUE, nr = SbxMAXLNG;
+ if( nl < SbxMINLNG ) err = sal_True, nl = SbxMINLNG;
+ if( nr > SbxMAXLNG ) err = sal_True, nr = SbxMAXLNG;
else
- if( nr < SbxMINLNG ) err = TRUE, nr = SbxMINLNG;
+ if( nr < SbxMINLNG ) err = sal_True, nr = SbxMINLNG;
ll = (long) nl; lr = (long) nr;
llMod = (long) (nl < 0 ? nl - 0.5 : nl + 0.5);
lrMod = (long) (nr < 0 ? nr - 0.5 : nr + 0.5);
if( err )
{
pGen->GetParser()->Error( SbERR_MATH_OVERFLOW );
- bError = TRUE;
+ bError = sal_True;
}
}
- BOOL bBothInt = BOOL( pLeft->eType < SbxSINGLE
+ sal_Bool bBothInt = sal_Bool( pLeft->eType < SbxSINGLE
&& pRight->eType < SbxSINGLE );
delete pLeft; pLeft = NULL;
delete pRight; pRight = NULL;
nVal = 0;
eType = SbxDOUBLE;
eNodeType = SbxNUMVAL;
- bComposite = FALSE;
- BOOL bCheckType = FALSE;
+ bComposite = sal_False;
+ sal_Bool bCheckType = sal_False;
switch( eTok )
{
case EXPON:
nVal = pow( nl, nr ); break;
case MUL:
- bCheckType = TRUE;
+ bCheckType = sal_True;
nVal = nl * nr; break;
case DIV:
if( !nr )
{
pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
- bError = TRUE;
+ bError = sal_True;
} else nVal = nl / nr;
break;
case PLUS:
- bCheckType = TRUE;
+ bCheckType = sal_True;
nVal = nl + nr; break;
case MINUS:
- bCheckType = TRUE;
+ bCheckType = sal_True;
nVal = nl - nr; break;
case EQ:
nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE;
@@ -402,14 +402,14 @@ void SbiExprNode::FoldConstants()
if( !lr )
{
pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
- bError = TRUE;
+ bError = sal_True;
} else nVal = ll / lr;
eType = SbxLONG; break;
case MOD:
if( !lr )
{
pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
- bError = TRUE;
+ bError = sal_True;
} else nVal = llMod % lrMod;
eType = SbxLONG; break;
case AND:
@@ -448,21 +448,21 @@ void SbiExprNode::FoldConstants()
pLeft = NULL;
eType = SbxDOUBLE;
eNodeType = SbxNUMVAL;
- bComposite = FALSE;
+ bComposite = sal_False;
switch( eTok )
{
case NEG:
nVal = -nVal; break;
case NOT: {
// Integer operation!
- BOOL err = FALSE;
- if( nVal > SbxMAXLNG ) err = TRUE, nVal = SbxMAXLNG;
+ sal_Bool err = sal_False;
+ if( nVal > SbxMAXLNG ) err = sal_True, nVal = SbxMAXLNG;
else
- if( nVal < SbxMINLNG ) err = TRUE, nVal = SbxMINLNG;
+ if( nVal < SbxMINLNG ) err = sal_True, nVal = SbxMINLNG;
if( err )
{
pGen->GetParser()->Error( SbERR_MATH_OVERFLOW );
- bError = TRUE;
+ bError = sal_True;
}
nVal = (double) ~((long) nVal);
eType = SbxLONG;