diff options
Diffstat (limited to 'basic/source/comp/exprnode.cxx')
-rw-r--r-- | basic/source/comp/exprnode.cxx | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index d47c86f86ea8..f516513d7589 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -53,7 +53,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, SbiToken t, SbiExprNode* nVal = 0; eType = SbxVARIANT; // Nodes sind immer Variant eNodeType = SbxNODE; - bComposite= TRUE; + bComposite= sal_True; } SbiExprNode::SbiExprNode( SbiParser* p, double n, SbxDataType t ) @@ -86,11 +86,11 @@ SbiExprNode::SbiExprNode( SbiParser* p, const SbiSymDef& r, SbxDataType t, SbiEx aVar.pNext= NULL; // Funktionsergebnisse sind nie starr - 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 ); @@ -101,7 +101,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 ); @@ -118,8 +118,8 @@ void SbiExprNode::BaseInit( SbiParser* p ) pLeft = NULL; pRight = NULL; pWithParent = NULL; - bComposite = FALSE; - bError = FALSE; + bComposite = sal_False; + bError = sal_False; } SbiExprNode::~SbiExprNode() @@ -174,7 +174,7 @@ SbiExprNode* SbiExprNode::GetRealNode() // Diese Methode setzt den Typ um, falls er in den Integer-Bereich hineinpasst -BOOL SbiExprNode::IsIntConst() +sal_Bool SbiExprNode::IsIntConst() { if( eNodeType == SbxNUMVAL ) { @@ -185,29 +185,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(); } @@ -256,7 +256,7 @@ void SbiExprNode::CollectBits() } } -// Kann ein Zweig umgeformt werden, wird TRUE zurueckgeliefert. In diesem +// Kann ein Zweig umgeformt werden, wird sal_True zurueckgeliefert. In diesem // Fall ist das Ergebnis im linken Zweig. void SbiExprNode::FoldConstants() @@ -283,7 +283,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; @@ -320,7 +320,7 @@ void SbiExprNode::FoldConstants() break; default: pGen->GetParser()->Error( SbERR_CONVERSION ); - bError = TRUE; + bError = sal_True; } } } @@ -334,50 +334,50 @@ void SbiExprNode::FoldConstants() || eTok == IDIV || eTok == MOD ) { // Integer-Operationen - 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; @@ -401,14 +401,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; |