diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:15:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:25:38 +0200 |
commit | 918faa4a1647c165cbaf41108858bd33a530c37b (patch) | |
tree | 496141c80224af8230d300633c79134740acbe83 /cppuhelper/source | |
parent | e7f330fa4aad63873a552e84bfdbf6452832b007 (diff) |
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: If965f73934c182a1c96d9fdca6f395c256f6b259
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/component.cxx | 10 | ||||
-rw-r--r-- | cppuhelper/source/factory.cxx | 6 | ||||
-rw-r--r-- | cppuhelper/source/implbase.cxx | 20 | ||||
-rw-r--r-- | cppuhelper/source/implbase_ex.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/interfacecontainer.cxx | 22 | ||||
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 22 | ||||
-rw-r--r-- | cppuhelper/source/tdmgr.cxx | 4 |
7 files changed, 43 insertions, 43 deletions
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index 192a2de9a2bc..eab7ec571b20 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -153,7 +153,7 @@ void OComponentHelper::dispose() if( !rBHelper.bDisposed && !rBHelper.bInDispose ) { // only one call go into this section - rBHelper.bInDispose = sal_True; + rBHelper.bInDispose = true; bDoDispose = true; } } @@ -180,14 +180,14 @@ void OComponentHelper::dispose() { MutexGuard aGuard( rBHelper.rMutex ); // bDispose and bInDisposing must be set in this order: - rBHelper.bDisposed = sal_True; - rBHelper.bInDispose = sal_False; + rBHelper.bDisposed = true; + rBHelper.bInDispose = false; throw; } MutexGuard aGuard( rBHelper.rMutex ); // bDispose and bInDisposing must be set in this order: - rBHelper.bDisposed = sal_True; - rBHelper.bInDispose = sal_False; + rBHelper.bDisposed = true; + rBHelper.bInDispose = false; } catch (RuntimeException &) { diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 5748921fd73a..891db88d2266 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -461,8 +461,8 @@ void OFactoryComponentHelper::dispose() sal_Bool SAL_CALL OFactoryComponentHelper::releaseOnNotification() throw(css::uno::RuntimeException, std::exception) { if( bOneInstance) - return sal_False; - return sal_True; + return false; + return true; } class ORegistryFactoryHelper : public OFactoryComponentHelper, @@ -940,7 +940,7 @@ sal_Bool SAL_CALL OFactoryProxyHelper::releaseOnNotification() throw(css::uno::R Reference<XUnloadingPreference> pref( xFactory, UNO_QUERY); if( pref.is()) return pref->releaseOnNotification(); - return sal_True; + return true; } // global function diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index 635ca10d3e6d..147fe822c091 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -95,7 +95,7 @@ void WeakComponentImplHelperBase::dispose() ClearableMutexGuard aGuard( rBHelper.rMutex ); if (!rBHelper.bDisposed && !rBHelper.bInDispose) { - rBHelper.bInDispose = sal_True; + rBHelper.bInDispose = true; aGuard.clear(); try { @@ -110,14 +110,14 @@ void WeakComponentImplHelperBase::dispose() { MutexGuard aGuard2( rBHelper.rMutex ); // bDisposed and bInDispose must be set in this order: - rBHelper.bDisposed = sal_True; - rBHelper.bInDispose = sal_False; + rBHelper.bDisposed = true; + rBHelper.bInDispose = false; throw; } MutexGuard aGuard2( rBHelper.rMutex ); // bDisposed and bInDispose must be set in this order: - rBHelper.bDisposed = sal_True; - rBHelper.bInDispose = sal_False; + rBHelper.bDisposed = true; + rBHelper.bInDispose = false; } catch (RuntimeException &) { @@ -227,7 +227,7 @@ void WeakAggComponentImplHelperBase::dispose() ClearableMutexGuard aGuard( rBHelper.rMutex ); if (!rBHelper.bDisposed && !rBHelper.bInDispose) { - rBHelper.bInDispose = sal_True; + rBHelper.bInDispose = true; aGuard.clear(); try { @@ -242,14 +242,14 @@ void WeakAggComponentImplHelperBase::dispose() { MutexGuard aGuard2( rBHelper.rMutex ); // bDisposed and bInDispose must be set in this order: - rBHelper.bDisposed = sal_True; - rBHelper.bInDispose = sal_False; + rBHelper.bDisposed = true; + rBHelper.bInDispose = false; throw; } MutexGuard aGuard2( rBHelper.rMutex ); // bDisposed and bInDispose must be set in this order: - rBHelper.bDisposed = sal_True; - rBHelper.bInDispose = sal_False; + rBHelper.bDisposed = true; + rBHelper.bInDispose = false; } catch (RuntimeException &) { diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index b2fc96d8d048..485e72957433 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -105,7 +105,7 @@ static inline type_entry * getTypeEntries( class_data * cd ) // ref is statically held by getCppuType() pEntry->m_type.typeRef = rType.getTypeLibType(); } - cd->m_storedTypeRefs = sal_True; + cd->m_storedTypeRefs = true; } } return pEntries; diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index 9d4a2ac27372..ae19aad49c74 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -70,7 +70,7 @@ OInterfaceIteratorHelper::OInterfaceIteratorHelper( OInterfaceContainerHelper & aData = rCont_.aData; if( bIsList ) { - rCont.bInUse = sal_True; + rCont.bInUse = true; nRemain = aData.pAsSequence->getLength(); } else if( aData.pAsInterface ) @@ -92,7 +92,7 @@ OInterfaceIteratorHelper::~OInterfaceIteratorHelper() if( bShared ) { OSL_ENSURE( rCont.bInUse, "OInterfaceContainerHelper must be in use" ); - rCont.bInUse = sal_False; + rCont.bInUse = false; } } @@ -140,8 +140,8 @@ void OInterfaceIteratorHelper::remove() OInterfaceContainerHelper::OInterfaceContainerHelper( Mutex & rMutex_ ) : rMutex( rMutex_ ) - , bInUse( sal_False ) - , bIsList( sal_False ) + , bInUse( false ) + , bIsList( false ) { } @@ -189,7 +189,7 @@ void OInterfaceContainerHelper::copyAndResetInUse() else if( aData.pAsInterface ) aData.pAsInterface->acquire(); - bInUse = sal_False; + bInUse = false; } } @@ -215,7 +215,7 @@ sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & pArray[1] = rListener; aData.pAsInterface->release(); aData.pAsSequence = pSeq; - bIsList = sal_True; + bIsList = true; return 2; } else @@ -268,7 +268,7 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface p->acquire(); delete aData.pAsSequence; aData.pAsInterface = p; - bIsList = sal_False; + bIsList = false; return 1; } else @@ -292,8 +292,8 @@ void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) aData.pAsInterface->release(); // set the member to null, use the iterator to delete the values aData.pAsInterface = nullptr; - bIsList = sal_False; - bInUse = sal_False; + bIsList = false; + bInUse = false; aGuard.clear(); while( aIt.hasMoreElements() ) { @@ -322,8 +322,8 @@ void OInterfaceContainerHelper::clear() aData.pAsInterface->release(); // set the member to null, use the iterator to delete the values aData.pAsInterface = nullptr; - bIsList = sal_False; - bInUse = sal_False; + bIsList = false; + bInUse = false; // release mutex before aIt destructor call aGuard.clear(); } diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index b8b63041c6d0..82e32df55738 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -536,7 +536,7 @@ void OPropertySetHelper::setFastPropertyValue( sal_Int32 nHandle, const Any& rVa // In aValue is the converted rValue // fire a constrained event // second parameter NULL means constrained - fire( &nHandle, &rValue, &aOldVal, 1, sal_True ); + fire( &nHandle, &rValue, &aOldVal, 1, true ); } { @@ -593,7 +593,7 @@ void OPropertySetHelper::impl_fireAll( sal_Int32* i_handles, const Any* i_newVal if ( m_pReserved->m_handles.empty() ) { aGuard.clear(); - fire( i_handles, i_newValues, i_oldValues, i_count, sal_False ); + fire( i_handles, i_newValues, i_oldValues, i_count, false ); return; } @@ -619,7 +619,7 @@ void OPropertySetHelper::impl_fireAll( sal_Int32* i_handles, const Any* i_newVal m_pReserved->m_oldValues.clear(); aGuard.clear(); - fire( &allHandles[0], &allNewValues[0], &allOldValues[0], additionalEvents + i_count, sal_False ); + fire( &allHandles[0], &allNewValues[0], &allOldValues[0], additionalEvents + i_count, false ); } @@ -871,7 +871,7 @@ void OPropertySetHelper::setFastPropertyValues( } // fire vetoable events - fire( pHandles, pConvertedValues.get(), pOldValues.get(), n, sal_True ); + fire( pHandles, pConvertedValues.get(), pOldValues.get(), n, true ); { // must lock the mutex outside the loop. @@ -1034,7 +1034,7 @@ void OPropertyArrayHelper::init( sal_Bool bSorted ) if( pProperties[i].Handle != i ) return; // The handle is the index - bRightOrdered = sal_True; + bRightOrdered = true; } OPropertyArrayHelper::OPropertyArrayHelper( @@ -1043,7 +1043,7 @@ OPropertyArrayHelper::OPropertyArrayHelper( sal_Bool bSorted ) : m_pReserved(nullptr) , aInfos(pProps, nEle) - , bRightOrdered( sal_False ) + , bRightOrdered( false ) { init( bSorted ); } @@ -1053,7 +1053,7 @@ OPropertyArrayHelper::OPropertyArrayHelper( sal_Bool bSorted ) : m_pReserved(nullptr) , aInfos(aProps) - , bRightOrdered( sal_False ) + , bRightOrdered( false ) { init( bSorted ); } @@ -1078,12 +1078,12 @@ sal_Bool OPropertyArrayHelper::fillPropertyMembersByHandle if( bRightOrdered ) { if( nHandle < 0 || nHandle >= nElements ) - return sal_False; + return false; if( pPropName ) *pPropName = pProperties[ nHandle ].Name; if( pAttributes ) *pAttributes = pProperties[ nHandle ].Attributes; - return sal_True; + return true; } else { @@ -1096,11 +1096,11 @@ sal_Bool OPropertyArrayHelper::fillPropertyMembersByHandle *pPropName = pProperties[ i ].Name; if( pAttributes ) *pAttributes = pProperties[ i ].Attributes; - return sal_True; + return true; } } } - return sal_False; + return false; } diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index e4c6edff61a9..789b3f1e7726 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -658,9 +658,9 @@ sal_Bool SAL_CALL installTypeDescriptionManager( xComp->addEventListener( new EventListenerImpl( xTDMgr ) ); // register c typelib callback ::typelib_typedescription_registerCallback( xTDMgr.get(), typelib_callback ); - return sal_True; + return true; } - return sal_False; + return false; } } // end namespace cppu |