diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-08-21 22:54:26 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-08-21 22:59:16 +0900 |
commit | 2efc59c9b6174e9b4b148a1c12dc8c5aac11865f (patch) | |
tree | e4373b57a438af2b047dc437c516930a9a14cce9 /basic/source/runtime | |
parent | c2ead1e76ee63091bc00112e9b453b86487c2181 (diff) |
sal_Bool to bool
Change-Id: I38141187c4f0809343a93c5765c0773d2321968a
Diffstat (limited to 'basic/source/runtime')
-rw-r--r-- | basic/source/runtime/iosys.cxx | 30 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 16 | ||||
-rw-r--r-- | basic/source/runtime/step0.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/step1.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/step2.cxx | 18 |
5 files changed, 35 insertions, 35 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 8ec4614f9fea..893ba364d75b 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -194,14 +194,14 @@ void SbiStream::MapError() return user; } -sal_Bool needSecurityRestrictions( void ) +bool needSecurityRestrictions( void ) { - static sal_Bool bNeedInit = sal_True; - static sal_Bool bRetVal = sal_True; + static bool bNeedInit = true; + static bool bRetVal = true; if( bNeedInit ) { - bNeedInit = sal_False; + bNeedInit = false; // Get system user to compare to portal user oslSecurity aSecurity = osl_getCurrentSecurity(); @@ -210,12 +210,12 @@ sal_Bool needSecurityRestrictions( void ) if( !bRet ) { // No valid security! -> Secure mode! - return sal_True; + return true; } Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); if( !xSMgr.is() ) - return sal_True; + return true; Reference< XBridgeFactory > xBridgeFac( xSMgr->createInstance ( ::rtl::OUString("com.sun.star.bridge.BridgeFactory" ) ), UNO_QUERY ); @@ -230,13 +230,13 @@ sal_Bool needSecurityRestrictions( void ) if( nBridgeCount == 0 ) { // No bridges -> local - bRetVal = sal_False; + bRetVal = false; return bRetVal; } // Iterate through all bridges to find (portal) user property const Reference< XBridge >* pBridges = aBridgeSeq.getConstArray(); - bRetVal = sal_False; // Now only sal_True if user different from portal user is found + bRetVal = false; // Now only sal_True if user different from portal user is found sal_Int32 i; for( i = 0 ; i < nBridgeCount ; i++ ) { @@ -254,7 +254,7 @@ sal_Bool needSecurityRestrictions( void ) else { // Different user -> Secure mode! - bRetVal = sal_True; + bRetVal = true; break; } } @@ -268,19 +268,19 @@ sal_Bool needSecurityRestrictions( void ) // Returns sal_True if UNO is available, otherwise the old file // system implementation has to be used // #89378 New semantic: Don't just ask for UNO but for UCB -sal_Bool hasUno( void ) +bool hasUno( void ) { - static sal_Bool bNeedInit = sal_True; - static sal_Bool bRetVal = sal_True; + static bool bNeedInit = true; + static bool bRetVal = true; if( bNeedInit ) { - bNeedInit = sal_False; + bNeedInit = false; Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); if( !xSMgr.is() ) { // No service manager at all - bRetVal = sal_False; + bRetVal = false; } else { @@ -290,7 +290,7 @@ sal_Bool hasUno( void ) if ( !( xManager.is() && xManager->queryContentProvider( ::rtl::OUString("file:///" ) ).is() ) ) { // No UCB - bRetVal = sal_False; + bRetVal = false; } } } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 32d0abb71954..f81e99dd89a5 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -527,8 +527,8 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, sal_uInt32 nStart ) pStmnt = (const sal_uInt8* ) pImg->GetCode() + nStart; bRun = bError = true; - bInError = sal_False; - bBlocked = sal_False; + bInError = false; + bBlocked = false; nLine = 0; nCol1 = 0; nCol2 = 0; @@ -678,7 +678,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) // execute a P-Code -sal_Bool SbiRuntime::Step() +bool SbiRuntime::Step() { if( bRun ) { @@ -751,7 +751,7 @@ sal_Bool SbiRuntime::Step() // in the error handler? so std-error if ( !bInError ) { - bInError = sal_True; + bInError = true; if( !bError ) // On Error Resume Next StepRESUME( 1 ); @@ -791,7 +791,7 @@ sal_Bool SbiRuntime::Step() { pRt->nError = err; if( pRt != pRtErrHdl ) - pRt->bRun = sal_False; + pRt->bRun = false; else break; pRt = pRt->pNext; @@ -924,7 +924,7 @@ SbxVariableRef SbiRuntime::PopVar() return xVar; } -sal_Bool SbiRuntime::ClearExprStack() +bool SbiRuntime::ClearExprStack() { // Attention: Clear() doesn't suffice as methods must be deleted while ( nExprLvl ) @@ -932,7 +932,7 @@ sal_Bool SbiRuntime::ClearExprStack() PopVar(); } refExprStk->Clear(); - return sal_False; + return false; } // Take variable from the expression-stack without removing it @@ -1198,7 +1198,7 @@ void SbiRuntime::DllCall const String& aDLLName, SbxArray* pArgs, // parameter (from index 1, can be NULL) SbxDataType eResType, // return value - sal_Bool bCDecl ) // sal_True: according to C-conventions + bool bCDecl ) // true: according to C-conventions { // No DllCall for "virtual" portal users if( needSecurityRestrictions() ) diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 869ddcc32ca1..9ea8ed40a3e8 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -576,7 +576,7 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b } // Handle Dim As New - sal_Bool bDimAsNew = bVBAEnabled && refVar->IsSet( SBX_DIM_AS_NEW ); + bool bDimAsNew = bVBAEnabled && refVar->IsSet( SBX_DIM_AS_NEW ); SbxBaseRef xPrevVarObj; if( bDimAsNew ) xPrevVarObj = refVar->GetObject(); @@ -1264,7 +1264,7 @@ void SbiRuntime::StepNOERROR() void SbiRuntime::StepLEAVE() { - bRun = sal_False; + bRun = false; // If VBA and we are leaving an ErrorHandler then clear the error ( it's been processed ) if ( bInError && pError ) SbxErrObject::getUnoErrObject()->Clear(); diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index cd63c8091eea..a9466faae69b 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -387,7 +387,7 @@ void SbiRuntime::StepRESUME( sal_uInt32 nOp1 ) pInst->nErr = 0; pInst->nErl = 0; nError = 0; - bInError = sal_False; + bInError = false; } // close channel (+channel, 0=all) diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index a75ebe8e30aa..e2d898cf429c 100644 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -46,7 +46,7 @@ SbxVariable* getVBAConstant( const String& rName ); // 0x8000 - Argv is reserved SbxVariable* SbiRuntime::FindElement - ( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError nNotFound, sal_Bool bLocal, sal_Bool bStatic ) + ( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError nNotFound, bool bLocal, bool bStatic ) { bool bIsVBAInterOp = SbiRuntime::isVBAEnabled(); if( bIsVBAInterOp ) @@ -604,11 +604,11 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) void SbiRuntime::StepRTL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - PushVar( FindElement( rBasic.pRtl, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_False ) ); + PushVar( FindElement( rBasic.pRtl, nOp1, nOp2, SbERR_PROC_UNDEFINED, false ) ); } void -SbiRuntime::StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError nNotFound, sal_Bool bLocal, sal_Bool bStatic ) +SbiRuntime::StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError nNotFound, bool bLocal, bool bStatic ) { if( !refLocals ) refLocals = new SbxArray; @@ -618,7 +618,7 @@ SbiRuntime::StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, Sb void SbiRuntime::StepFIND( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_True ); + StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, true ); } // Search inside a class module (CM) to enable global search in time @@ -629,7 +629,7 @@ void SbiRuntime::StepFIND_CM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) if( pClassModuleObject ) pMod->SetFlag( SBX_GBLSEARCH ); - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_True ); + StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, true ); if( pClassModuleObject ) pMod->ResetFlag( SBX_GBLSEARCH ); @@ -637,7 +637,7 @@ void SbiRuntime::StepFIND_CM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) void SbiRuntime::StepFIND_STATIC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_True, sal_True ); + StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, true, true ); } // loading an object-element (+StringID+type) @@ -661,7 +661,7 @@ void SbiRuntime::StepELEM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) if( pObj ) SaveRef( (SbxVariable*)pObj ); - PushVar( FindElement( pObj, nOp1, nOp2, SbERR_NO_METHOD, sal_False ) ); + PushVar( FindElement( pObj, nOp1, nOp2, SbERR_NO_METHOD, false ) ); } // loading a parameter (+offset+type) @@ -767,7 +767,7 @@ void SbiRuntime::StepCALL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) SbxArray* pArgs = NULL; if( nOp1 & 0x8000 ) pArgs = refArgv; - DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, sal_False ); + DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, false ); aLibName = String(); if( nOp1 & 0x8000 ) PopArgv(); @@ -781,7 +781,7 @@ void SbiRuntime::StepCALLC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) SbxArray* pArgs = NULL; if( nOp1 & 0x8000 ) pArgs = refArgv; - DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, sal_True ); + DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, true ); aLibName = String(); if( nOp1 & 0x8000 ) PopArgv(); |