Kaydet (Commit) d57010fa authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: Ie8e35c4342db6e2dc35fca33cee7b4d71cfcb732
üst aa527537
...@@ -2242,7 +2242,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, ...@@ -2242,7 +2242,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
// number of Parameter -1 because of Param0 == this // number of Parameter -1 because of Param0 == this
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0; sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
Sequence<Any> args; Sequence<Any> args;
sal_Bool bOutParams = sal_False; bool bOutParams = false;
sal_uInt32 i; sal_uInt32 i;
if( !bInvocation && mxUnoAccess.is() ) if( !bInvocation && mxUnoAccess.is() )
...@@ -2300,7 +2300,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, ...@@ -2300,7 +2300,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
{ {
ParamMode aParamMode = rInfo.aMode; ParamMode aParamMode = rInfo.aMode;
if( aParamMode != ParamMode_IN ) if( aParamMode != ParamMode_IN )
bOutParams = sal_True; bOutParams = true;
} }
} }
} }
...@@ -2417,21 +2417,21 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) ...@@ -2417,21 +2417,21 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ )
//*** Define the name *** //*** Define the name ***
sal_Bool bFatalError = sal_True; bool bFatalError = true;
// Is it an interface or a struct? // Is it an interface or a struct?
sal_Bool bSetClassName = sal_False; bool bSetClassName = false;
OUString aClassName_; OUString aClassName_;
if( eType == TypeClass_STRUCT || eType == TypeClass_EXCEPTION ) if( eType == TypeClass_STRUCT || eType == TypeClass_EXCEPTION )
{ {
// Struct is Ok // Struct is Ok
bFatalError = sal_False; bFatalError = false;
// insert the real name of the class // insert the real name of the class
if( aName_.isEmpty() ) if( aName_.isEmpty() )
{ {
aClassName_ = aUnoObj_.getValueType().getTypeName(); aClassName_ = aUnoObj_.getValueType().getTypeName();
bSetClassName = sal_True; bSetClassName = true;
} }
typelib_TypeDescription * pDeclTD = 0; typelib_TypeDescription * pDeclTD = 0;
typelib_typedescription_getByName( &pDeclTD, maTmpUnoObj.getValueTypeName().pData ); typelib_typedescription_getByName( &pDeclTD, maTmpUnoObj.getValueTypeName().pData );
...@@ -2441,7 +2441,7 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) ...@@ -2441,7 +2441,7 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ )
else if( eType == TypeClass_INTERFACE ) else if( eType == TypeClass_INTERFACE )
{ {
// Interface works always through the type in the Any // Interface works always through the type in the Any
bFatalError = sal_False; bFatalError = false;
} }
if( bSetClassName ) if( bSetClassName )
SetClassName( aClassName_ ); SetClassName( aClassName_ );
...@@ -3652,7 +3652,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, ...@@ -3652,7 +3652,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
// Parameter count -1 because of Param0 == this // Parameter count -1 because of Param0 == this
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0; sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
Sequence<Any> args; Sequence<Any> args;
sal_Bool bOutParams = sal_False; bool bOutParams = false;
Reference< XServiceConstructorDescription > xCtor = pUnoCtor->getServiceCtorDesc(); Reference< XServiceConstructorDescription > xCtor = pUnoCtor->getServiceCtorDesc();
Sequence< Reference< XParameter > > aParameterSeq = xCtor->getParameters(); Sequence< Reference< XParameter > > aParameterSeq = xCtor->getParameters();
...@@ -3739,7 +3739,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, ...@@ -3739,7 +3739,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
if( !bOutParams ) if( !bOutParams )
{ {
if( xParam->isOut() ) if( xParam->isOut() )
bOutParams = sal_True; bOutParams = true;
} }
} }
else else
...@@ -4101,7 +4101,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName, ...@@ -4101,7 +4101,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName,
// Check if to firing or approveFiring has to be called // Check if to firing or approveFiring has to be called
Reference< XIdlMethod > xMethod = m_xListenerType->getMethod( FunctionName ); Reference< XIdlMethod > xMethod = m_xListenerType->getMethod( FunctionName );
sal_Bool bApproveFiring = sal_False; bool bApproveFiring = false;
if( !xMethod.is() ) if( !xMethod.is() )
return aRet; return aRet;
Reference< XIdlClass > xReturnType = xMethod->getReturnType(); Reference< XIdlClass > xReturnType = xMethod->getReturnType();
...@@ -4109,7 +4109,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName, ...@@ -4109,7 +4109,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName,
if( ( xReturnType.is() && xReturnType->getTypeClass() != TypeClass_VOID ) || if( ( xReturnType.is() && xReturnType->getTypeClass() != TypeClass_VOID ) ||
aExceptionSeq.getLength() > 0 ) aExceptionSeq.getLength() > 0 )
{ {
bApproveFiring = sal_True; bApproveFiring = true;
} }
else else
{ {
...@@ -4122,7 +4122,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName, ...@@ -4122,7 +4122,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName,
{ {
if( pInfos[ i ].aMode != ParamMode_IN ) if( pInfos[ i ].aMode != ParamMode_IN )
{ {
bApproveFiring = sal_True; bApproveFiring = true;
break; break;
} }
} }
...@@ -4496,7 +4496,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction, ...@@ -4496,7 +4496,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction,
OUString aFunctionName = m_aPrefix; OUString aFunctionName = m_aPrefix;
aFunctionName += rFunction; aFunctionName += rFunction;
sal_Bool bSetRescheduleBack = sal_False; bool bSetRescheduleBack = false;
sal_Bool bOldReschedule = sal_True; sal_Bool bOldReschedule = sal_True;
SbiInstance* pInst = GetSbData()->pInst; SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() ) if( pInst && pInst->IsCompatibility() )
...@@ -4505,7 +4505,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction, ...@@ -4505,7 +4505,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction,
if ( bOldReschedule ) if ( bOldReschedule )
{ {
pInst->EnableReschedule( sal_False ); pInst->EnableReschedule( sal_False );
bSetRescheduleBack = sal_True; bSetRescheduleBack = true;
} }
} }
...@@ -5002,7 +5002,7 @@ OUString SbUnoStructRefObject::Impl_DumpProperties() ...@@ -5002,7 +5002,7 @@ OUString SbUnoStructRefObject::Impl_DumpProperties()
// Is it in Uno a sequence? // Is it in Uno a sequence?
SbxDataType eType = pVar->GetFullType(); SbxDataType eType = pVar->GetFullType();
sal_Bool bMaybeVoid = sal_False; bool bMaybeVoid = false;
OUString aName( pVar->GetName() ); OUString aName( pVar->GetName() );
StructFieldInfo::iterator it = maFields.find( aName ); StructFieldInfo::iterator it = maFields.find( aName );
......
...@@ -592,12 +592,12 @@ void SbxObject::Remove( SbxVariable* pVar ) ...@@ -592,12 +592,12 @@ void SbxObject::Remove( SbxVariable* pVar )
} }
} }
static sal_Bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray )
{ {
SbxArrayRef p = (SbxArray*) SbxBase::Load( rStrm ); SbxArrayRef p = (SbxArray*) SbxBase::Load( rStrm );
if( !p.Is() ) if( !p.Is() )
{ {
return sal_False; return false;
} }
for( sal_uInt16 i = 0; i < p->Count(); i++ ) for( sal_uInt16 i = 0; i < p->Count(); i++ )
{ {
...@@ -610,7 +610,7 @@ static sal_Bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) ...@@ -610,7 +610,7 @@ static sal_Bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray )
} }
} }
pArray->Merge( p ); pArray->Merge( p );
return sal_True; return true;
} }
// The load of an object is additive! // The load of an object is additive!
...@@ -758,7 +758,7 @@ OUString SbxObject::GenerateSource( const OUString &rLinePrefix, ...@@ -758,7 +758,7 @@ OUString SbxObject::GenerateSource( const OUString &rLinePrefix,
return aSource; return aSource;
} }
static sal_Bool CollectAttrs( const SbxBase* p, OUString& rRes ) static bool CollectAttrs( const SbxBase* p, OUString& rRes )
{ {
OUString aAttrs; OUString aAttrs;
if( p->IsHidden() ) if( p->IsHidden() )
...@@ -794,12 +794,12 @@ static sal_Bool CollectAttrs( const SbxBase* p, OUString& rRes ) ...@@ -794,12 +794,12 @@ static sal_Bool CollectAttrs( const SbxBase* p, OUString& rRes )
rRes = " ("; rRes = " (";
rRes += aAttrs; rRes += aAttrs;
rRes += ")"; rRes += ")";
return sal_True; return true;
} }
else else
{ {
rRes = ""; rRes = "";
return sal_False; return false;
} }
} }
......
...@@ -191,7 +191,7 @@ void SbxValue::Clear() ...@@ -191,7 +191,7 @@ void SbxValue::Clear()
{ {
SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef"); SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
sal_Bool bParentProp = pThisVar && 5345 == bool bParentProp = pThisVar && 5345 ==
( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ); ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) );
if ( !bParentProp ) if ( !bParentProp )
aData.pObj->ReleaseRef(); aData.pObj->ReleaseRef();
...@@ -540,7 +540,7 @@ sal_Bool SbxValue::Put( const SbxValues& rVal ) ...@@ -540,7 +540,7 @@ sal_Bool SbxValue::Put( const SbxValues& rVal )
} }
SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef"); SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
sal_Bool bParentProp = pThisVar && 5345 == bool bParentProp = pThisVar && 5345 ==
( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ); ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) );
if ( !bParentProp ) if ( !bParentProp )
p->aData.pObj->AddRef(); p->aData.pObj->AddRef();
...@@ -809,7 +809,7 @@ sal_Bool SbxValue::SetType( SbxDataType t ) ...@@ -809,7 +809,7 @@ sal_Bool SbxValue::SetType( SbxDataType t )
: 0; : 0;
DBG_ASSERT( nSlotId != 5345 || pThisVar->GetName().equalsAscii("Parent"), DBG_ASSERT( nSlotId != 5345 || pThisVar->GetName().equalsAscii("Parent"),
"SID_PARENTOBJECT is not named 'Parent'" ); "SID_PARENTOBJECT is not named 'Parent'" );
sal_Bool bParentProp = 5345 == nSlotId; bool bParentProp = 5345 == nSlotId;
if ( !bParentProp ) if ( !bParentProp )
aData.pObj->ReleaseRef(); aData.pObj->ReleaseRef();
} }
......
...@@ -466,8 +466,8 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& ...@@ -466,8 +466,8 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
// Library must be loaded // Library must be loaded
loadLibrary( Name ); loadLibrary( Name );
sal_Bool bKillCryptedFiles = sal_False; bool bKillCryptedFiles = false;
sal_Bool bKillUncryptedFiles = sal_False; bool bKillUncryptedFiles = false;
// Remove or change password? // Remove or change password?
if( bOldPassword ) if( bOldPassword )
...@@ -503,7 +503,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& ...@@ -503,7 +503,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
// Store application basic uncrypted // Store application basic uncrypted
uno::Reference< embed::XStorage > xStorage; uno::Reference< embed::XStorage > xStorage;
storeLibraries_Impl( xStorage, false ); storeLibraries_Impl( xStorage, false );
bKillCryptedFiles = sal_True; bKillCryptedFiles = true;
} }
} }
} }
...@@ -523,7 +523,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& ...@@ -523,7 +523,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
// Store applictaion basic crypted // Store applictaion basic crypted
uno::Reference< embed::XStorage > xStorage; uno::Reference< embed::XStorage > xStorage;
storeLibraries_Impl( xStorage, false ); storeLibraries_Impl( xStorage, false );
bKillUncryptedFiles = sal_True; bKillUncryptedFiles = true;
} }
} }
...@@ -913,10 +913,10 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary ...@@ -913,10 +913,10 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
pScriptLib->mbLoadedBinary = true; pScriptLib->mbLoadedBinary = true;
} }
sal_Bool bLoadSource = sal_False; bool bLoadSource = false;
if( !pScriptLib->mbLoadedSource && pLib->mbPasswordVerified && !bVerifyPasswordOnly ) if( !pScriptLib->mbLoadedSource && pLib->mbPasswordVerified && !bVerifyPasswordOnly )
{ {
bLoadSource = sal_True; bLoadSource = true;
pScriptLib->mbLoadedSource = true; pScriptLib->mbLoadedSource = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment