diff options
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 4 | ||||
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 20 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 10 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 26 | ||||
-rw-r--r-- | basic/source/comp/exprnode.cxx | 26 | ||||
-rw-r--r-- | basic/source/comp/exprtree.cxx | 32 | ||||
-rw-r--r-- | basic/source/comp/loops.cxx | 8 | ||||
-rw-r--r-- | basic/source/comp/parser.cxx | 8 |
8 files changed, 67 insertions, 67 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index d7a7bf191d4d..4aece49a21c5 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -442,7 +442,7 @@ namespace basic SotStorageRef xDummyStor = new SotStorage( OUString() ); _out_rpBasicManager = new BasicManager( *xDummyStor, OUString() /* TODO/LATER: xStorage */, pAppBasic, - &aAppBasicDir, sal_True ); + &aAppBasicDir, true ); if ( !_out_rpBasicManager->GetErrors().empty() ) { // handle errors @@ -467,7 +467,7 @@ namespace basic // create new BASIC-manager StarBASIC* pBasic = new StarBASIC( pAppBasic ); pBasic->SetFlag( SBX_EXTSEARCH ); - _out_rpBasicManager = new BasicManager( pBasic, NULL, sal_True ); + _out_rpBasicManager = new BasicManager( pBasic, NULL, true ); } // knit the containers with the BasicManager diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 6621a4014b36..1b31518f27f9 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -874,7 +874,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase { INetURLObject aObj( aRealStorageName, INET_PROT_FILE ); aObj.removeSegment(); - bool bWasAbsolute = sal_False; + bool bWasAbsolute = false; aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute ); //*** TODO: Replace if still necessary @@ -960,7 +960,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) INetURLObject aLibRelStorage( aStorName ); aLibRelStorage.removeSegment(); - bool bWasAbsolute = sal_False; + bool bWasAbsolute = false; aLibRelStorage = aLibRelStorage.smartRel2Abs( aLibRelStorageName, bWasAbsolute); DBG_ASSERT(!bWasAbsolute, "RelStorageName was absolute!" ); @@ -971,11 +971,11 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) } else { - xStorageRef = new SotStorage( sal_False, aLibAbsStorage.GetMainURL - ( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True ); + xStorageRef = new SotStorage( false, aLibAbsStorage.GetMainURL + ( INetURLObject::NO_DECODE ), eStorageReadMode, true ); if ( xStorageRef->GetError() != ERRCODE_NONE ) - xStorageRef = new SotStorage( sal_False, aLibRelStorage. - GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True ); + xStorageRef = new SotStorage( false, aLibRelStorage. + GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, true ); } if ( xStorageRef.Is() ) { @@ -1077,7 +1077,7 @@ sal_Bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurS if ( !xStorage.Is() ) { - xStorage = new SotStorage( sal_False, aStorageName, eStorageReadMode ); + xStorage = new SotStorage( false, aStorageName, eStorageReadMode ); } SotStorageRef xBasicStorage = xStorage->OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, sal_False ); @@ -1328,11 +1328,11 @@ sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage SotStorageRef xStorage; if ( !pLibInfo->IsExtern() ) { - xStorage = new SotStorage( sal_False, GetStorageName() ); + xStorage = new SotStorage( false, GetStorageName() ); } else { - xStorage = new SotStorage( sal_False, pLibInfo->GetStorageName() ); + xStorage = new SotStorage( false, pLibInfo->GetStorageName() ); } if ( xStorage->IsStorage( OUString(szBasicStorage) ) ) @@ -1551,7 +1551,7 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName, const OUString& Pa { if( !LinkTargetURL.isEmpty()) { - SotStorageRef xStorage = new SotStorage( sal_False, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE ); + SotStorageRef xStorage = new SotStorage( false, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE ); if( !xStorage->GetError() ) { pLib = AddLib( *xStorage, rLibName, sal_True ); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index eba896f0609b..4e4dd94e50bb 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -1483,15 +1483,15 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper case TypeClass_BYTE: { sal_Int16 nVal = pVar->GetInteger(); - sal_Bool bOverflow = sal_False; + bool bOverflow = false; if( nVal < -128 ) { - bOverflow = sal_True; + bOverflow = true; nVal = -128; } else if( nVal > 127 ) { - bOverflow = sal_True; + bOverflow = true; nVal = 127; } if( bOverflow ) @@ -1936,7 +1936,7 @@ OUString Impl_DumpProperties( SbUnoObject* pUnoObj ) // Is it in Uno a sequence? SbxDataType eType = pVar->GetFullType(); - sal_Bool bMaybeVoid = sal_False; + bool bMaybeVoid = false; if( i < nUnoPropCount ) { const Property& rProp = pUnoProps[ i ]; @@ -1946,7 +1946,7 @@ OUString Impl_DumpProperties( SbUnoObject* pUnoObj ) if( rProp.Attributes & PropertyAttribute::MAYBEVOID ) { eType = unoToSbxType( rProp.Type.getTypeClass() ); - bMaybeVoid = sal_True; + bMaybeVoid = true; } if( eType == SbxOBJECT ) { diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index b1e4b8ffad9a..f8ac006a01ca 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1125,7 +1125,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth ) // Launcher problem // i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already - sal_Bool bWasError = SbxBase::GetError() != 0; + bool bWasError = SbxBase::GetError() != 0; SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxCLASS_OBJECT ); if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) ) SbxBase::ResetError(); @@ -2277,9 +2277,9 @@ class FormObjEventListenerImpl : public FormObjEventListener_BASE uno::Reference< lang::XComponent > mxComponent; uno::Reference< frame::XModel > mxModel; bool mbDisposed; - sal_Bool mbOpened; - sal_Bool mbActivated; - sal_Bool mbShowing; + bool mbOpened; + bool mbActivated; + bool mbShowing; FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined @@ -2287,7 +2287,7 @@ class FormObjEventListenerImpl : public FormObjEventListener_BASE public: FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) : mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ), - mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False ) + mbDisposed( false ), mbOpened( false ), mbActivated( false ), mbShowing( false ) { if ( mxComponent.is() ) { @@ -2319,7 +2319,7 @@ public: removeListener(); } - sal_Bool isShowing() const { return mbShowing; } + bool isShowing() const { return mbShowing; } void removeListener() { @@ -2354,11 +2354,11 @@ public: { if ( mpUserForm ) { - mbOpened = sal_True; - mbShowing = sal_True; + mbOpened = true; + mbShowing = true; if ( mbActivated ) { - mbOpened = mbActivated = sal_False; + mbOpened = mbActivated = false; mpUserForm->triggerActivateEvent(); } } @@ -2399,8 +2399,8 @@ public: virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) { - mbOpened = sal_False; - mbShowing = sal_False; + mbOpened = false; + mbShowing = false; } virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) @@ -2415,10 +2415,10 @@ public: { if ( mpUserForm ) { - mbActivated = sal_True; + mbActivated = true; if ( mbOpened ) { - mbOpened = mbActivated = sal_False; + mbOpened = mbActivated = false; mpUserForm->triggerActivateEvent(); } } diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index 49911c1ad344..53ef38d0587e 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -311,11 +311,11 @@ void SbiExprNode::FoldConstants() || eTok == IDIV || eTok == MOD ) { // Integer operations - sal_Bool err = sal_False; - if( nl > SbxMAXLNG ) err = sal_True, nl = SbxMAXLNG; - else if( nl < SbxMINLNG ) err = sal_True, nl = SbxMINLNG; - if( nr > SbxMAXLNG ) err = sal_True, nr = SbxMAXLNG; - else if( nr < SbxMINLNG ) err = sal_True, nr = SbxMINLNG; + bool err = false; + if( nl > SbxMAXLNG ) err = true, nl = SbxMAXLNG; + else if( nl < SbxMINLNG ) err = true, nl = SbxMINLNG; + if( nr > SbxMAXLNG ) err = true, nr = SbxMAXLNG; + else if( nr < SbxMINLNG ) err = 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); @@ -325,20 +325,20 @@ void SbiExprNode::FoldConstants() bError = true; } } - sal_Bool bBothInt = sal_Bool( pLeft->eType < SbxSINGLE + bool bBothInt = ( pLeft->eType < SbxSINGLE && pRight->eType < SbxSINGLE ); delete pLeft; pLeft = NULL; delete pRight; pRight = NULL; nVal = 0; eType = SbxDOUBLE; eNodeType = SbxNUMVAL; - sal_Bool bCheckType = sal_False; + bool bCheckType = false; switch( eTok ) { case EXPON: nVal = pow( nl, nr ); break; case MUL: - bCheckType = sal_True; + bCheckType = true; nVal = nl * nr; break; case DIV: if( !nr ) @@ -348,10 +348,10 @@ void SbiExprNode::FoldConstants() } else nVal = nl / nr; break; case PLUS: - bCheckType = sal_True; + bCheckType = true; nVal = nl + nr; break; case MINUS: - bCheckType = sal_True; + bCheckType = true; nVal = nl - nr; break; case EQ: nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE; @@ -427,9 +427,9 @@ void SbiExprNode::FoldConstants() nVal = -nVal; break; case NOT: { // Integer operation! - sal_Bool err = sal_False; - if( nVal > SbxMAXLNG ) err = sal_True, nVal = SbxMAXLNG; - else if( nVal < SbxMINLNG ) err = sal_True, nVal = SbxMINLNG; + bool err = false; + if( nVal > SbxMAXLNG ) err = true, nVal = SbxMAXLNG; + else if( nVal < SbxMINLNG ) err = true, nVal = SbxMINLNG; if( err ) { pGen->GetParser()->Error( SbERR_MATH_OVERFLOW ); diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index fe5077b3ad42..e77bf77923af 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -85,21 +85,21 @@ SbiExpression::~SbiExpression() // Are there parameters without brackets following? This may be a number, // a string, a symbol or also a comma (if the 1st parameter is missing) -static sal_Bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok ) +static bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok ) { if( eTok == LPAREN ) { - return sal_True; + return true; } // but only if similar to CALL! if( !p->WhiteSpace() || eCurExpr != SbSYMBOL ) { - return sal_False; + return false; } if ( eTok == NUMBER || eTok == MINUS || eTok == FIXSTRING || eTok == SYMBOL || eTok == COMMA || eTok == DOT || eTok == NOT || eTok == BYVAL ) { - return sal_True; + return true; } else // check for default params with reserved names ( e.g. names of tokens ) { @@ -108,10 +108,10 @@ static sal_Bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken tokens.Next(); if ( tokens.Peek() == ASSIGN ) { - return sal_True; + return true; } } - return sal_False; + return false; } // definition of a new symbol @@ -121,7 +121,7 @@ static SbiSymDef* AddSym ( SbiToken eTok, SbiSymPool& rPool, SbiExprType eCurExp { SbiSymDef* pDef; // A= is not a procedure - sal_Bool bHasType = sal_Bool( eTok == EQ || eTok == DOT ); + bool bHasType = ( eTok == EQ || eTok == DOT ); if( ( !bHasType && eCurExpr == SbSYMBOL ) || pPar ) { // so this is a procedure @@ -137,7 +137,7 @@ static SbiSymDef* AddSym ( SbiToken eTok, SbiSymPool& rPool, SbiExprType eCurExp // special treatment for Colls like Documents(1) if( eCurExpr == SbSTDEXPR ) { - bHasType = sal_True; + bHasType = true; } pDef = pProc; pDef->SetType( bHasType ? eType : SbxEMPTY ); @@ -249,7 +249,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) // It might be an object part, if . or ! is following. // In case of . the variable must already be defined; // it's an object, if pDef is NULL after the search. - sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM ) + bool bObj = ( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() ); if( bObj ) { @@ -444,7 +444,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj ) eTok = pParser->Peek(); } } - sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() ); + bool bObj = ( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() ); if( bObj ) { if( eType == SbxVARIANT ) @@ -846,22 +846,22 @@ SbiConstExpression::SbiConstExpression( SbiParser* p ) : SbiExpression( p ) else { // #40204 special treatment for sal_Bool-constants - sal_Bool bIsBool = sal_False; + bool bIsBool = false; if( pExpr->eNodeType == SbxVARVAL ) { SbiSymDef* pVarDef = pExpr->GetVar(); - sal_Bool bBoolVal = sal_False; + bool bBoolVal = false; if( pVarDef->GetName().equalsIgnoreAsciiCase( "true" ) ) { - bIsBool = sal_True; - bBoolVal = sal_True; + bIsBool = true; + bBoolVal = true; } else if( pVarDef->GetName().equalsIgnoreAsciiCase( "false" ) ) //else if( pVarDef->GetName().ICompare( "false" ) == COMPARE_EQUAL ) { - bIsBool = sal_True; - bBoolVal = sal_False; + bIsBool = true; + bBoolVal = false; } if( bIsBool ) diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index 127ec8809c6a..e486039f14ad 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -358,7 +358,7 @@ void SbiParser::Select() TestEoln(); sal_uInt32 nNextTarget = 0; sal_uInt32 nDoneTarget = 0; - sal_Bool bElse = sal_False; + bool bElse = false; while( !bAbort ) { @@ -369,13 +369,13 @@ void SbiParser::Select() aGen.BackChain( nNextTarget ), nNextTarget = 0; aGen.Statement(); - sal_Bool bDone = sal_False; + bool bDone = false; sal_uInt32 nTrueTarget = 0; if( Peek() == ELSE ) { // CASE ELSE Next(); - bElse = sal_True; + bElse = true; } else while( !bDone ) { @@ -415,7 +415,7 @@ void SbiParser::Select() } if( Peek() == COMMA ) Next(); - else TestEoln(), bDone = sal_True; + else TestEoln(), bDone = true; } if( !bElse ) diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 680f4dcd40cc..8ac380f0d65c 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -32,12 +32,12 @@ struct SbiParseStack { // "Stack" for statement-blocks struct SbiStatement { SbiToken eTok; void( SbiParser::*Func )(); - sal_Bool bMain; // sal_True: OK outside the SUB - sal_Bool bSubr; // sal_True: OK inside the SUB + bool bMain; // true: OK outside the SUB + bool bSubr; // true: OK inside the SUB }; -#define Y sal_True -#define N sal_False +#define Y true +#define N false static const SbiStatement StmntTable [] = { { ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE |