loplugin:salbool: Automatic rewrite of sal_False/True

Change-Id: Idb7e5ff0c73bbc2c462b92cd96444eb5d2d4194b
This commit is contained in:
Stephan Bergmann 2016-04-20 17:15:31 +02:00
parent 08bb436ff9
commit f555ab4e96
12 changed files with 28 additions and 28 deletions

View File

@ -203,7 +203,7 @@ void EmbeddedObjectContainer::CloseEmbeddedObjects()
{
try
{
xClose->close( sal_True );
xClose->close( true );
}
catch (const uno::Exception&)
{
@ -508,7 +508,7 @@ bool EmbeddedObjectContainer::StoreEmbeddedObject(
//TODO/LATER: possible optimization, don't store immediately
//xPersist->setPersistentEntry( pImpl->mxStorage, rName, embed::EntryInitModes::ENTRY_NO_INIT, aSeq, aSeq );
xPersist->storeAsEntry( pImpl->mxStorage, rName, aSeq, aSeq );
xPersist->saveCompleted( sal_True );
xPersist->saveCompleted( true );
}
}
}
@ -802,7 +802,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
{
try
{
xResult->close( sal_True );
xResult->close( true );
}
catch (const uno::Exception&)
{
@ -1093,7 +1093,7 @@ bool EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed:
uno::Reference < ::util::XCloseable > xClose( xObj, uno::UNO_QUERY );
try
{
xClose->close( sal_True );
xClose->close( true );
}
catch (const uno::Exception&)
{
@ -1598,7 +1598,7 @@ bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< embed::
{
uno::Reference< util::XModifiable > xModif( xObj->getComponent(), uno::UNO_QUERY_THROW );
if ( xModif->isModified() )
xModif->setModified( sal_False );
xModif->setModified( false );
}
catch (const uno::Exception&)
{

View File

@ -564,9 +564,9 @@ namespace comphelper
)
{
if ( mapping->second == _value )
return sal_True;
return true;
}
return sal_False;
return false;
}

View File

@ -56,7 +56,7 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(css::uno::Runtim
::osl::ResettableMutexGuard aLock(m_aLock);
if (m_xAccess.is() && m_aNames.getLength() > m_nPos)
return sal_True;
return true;
if (m_xAccess.is())
{
@ -64,7 +64,7 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(css::uno::Runtim
m_xAccess.clear();
}
return sal_False;
return false;
}
@ -155,7 +155,7 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(css::uno::Runti
::osl::ResettableMutexGuard aLock(m_aLock);
if (m_xAccess.is() && m_xAccess->getCount() > m_nPos)
return sal_True;
return true;
if (m_xAccess.is())
{
@ -163,7 +163,7 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(css::uno::Runti
m_xAccess.clear();
}
return sal_False;
return false;
}

View File

@ -210,7 +210,7 @@ void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rR
break;
case TypeClass_BOOLEAN:
rRet <<= sal_True;
rRet <<= true;
break;
case TypeClass_STRING:

View File

@ -135,7 +135,7 @@ namespace comphelper
Reference < i18n::XBreakIterator > xBreakIter = implGetBreakIterator();
if ( xBreakIter.is() )
{
rBoundary = xBreakIter->getWordBoundary( sText, nIndex, implGetLocale(), i18n::WordType::ANY_WORD, sal_True );
rBoundary = xBreakIter->getWordBoundary( sText, nIndex, implGetLocale(), i18n::WordType::ANY_WORD, true );
// it's a word, if the first character is an alpha-numeric character
Reference< i18n::XCharacterClassification > xCharClass = implGetCharacterClassification();

View File

@ -244,7 +244,7 @@ void OLockListener::Dispose()
uno::Reference< util::XCloseable > xCloseable( m_xInstance, uno::UNO_QUERY );
if ( xCloseable.is() )
xCloseable->close( sal_True );
xCloseable->close( true );
}
catch( uno::Exception& )
{}

View File

@ -589,7 +589,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName(
uno::Sequence< beans::PropertyValue > aTempMD( aMediaDescr );
// get TypeName
OUString aTypeName = xTypeDetection->queryTypeByDescriptor( aTempMD, sal_True );
OUString aTypeName = xTypeDetection->queryTypeByDescriptor( aTempMD, true );
// get FilterName
for ( sal_Int32 nInd = 0; nInd < aTempMD.getLength(); nInd++ )

View File

@ -223,7 +223,7 @@ namespace comphelper
{
// XSet is only a workaround for addProperty not being able to add default-void properties.
// So, everything of XSet except insert is implemented empty
return sal_False;
return false;
}
@ -250,7 +250,7 @@ namespace comphelper
m_pArrayHelper.reset();
g.clear();
setModified(sal_True);
setModified(true);
}
@ -282,7 +282,7 @@ namespace comphelper
{
// XSet is only a workaround for addProperty not being able to add default-void properties.
// So, everything of XSet except insert is implemented empty
return sal_False;
return false;
}
@ -356,7 +356,7 @@ namespace comphelper
m_pArrayHelper.reset();
g.clear();
setModified(sal_True);
setModified(true);
}
@ -370,7 +370,7 @@ namespace comphelper
m_pArrayHelper.reset();
g.clear();
setModified(sal_True);
setModified(true);
}

View File

@ -425,7 +425,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const css::uno::Se
// implementation)
if ( ( nHandle != -1 ) && !isCurrentlyForwardingProperty( nHandle ) )
fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, sal_False);
fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, false);
}
else
{
@ -448,7 +448,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const css::uno::Se
}
if (nDest)
fire(pHandles.get(), pNewValues.get(), pOldValues.get(), nDest, sal_False);
fire(pHandles.get(), pNewValues.get(), pOldValues.get(), nDest, false);
}
}
@ -460,7 +460,7 @@ void SAL_CALL OPropertySetAggregationHelper::vetoableChange(const css::beans::Pr
cppu::IPropertyArrayHelper& rPH = getInfoHelper();
sal_Int32 nHandle = rPH.getHandleByName(_rEvent.PropertyName);
fire(&nHandle, &_rEvent.NewValue, &_rEvent.OldValue, 1, sal_True);
fire(&nHandle, &_rEvent.NewValue, &_rEvent.OldValue, 1, true);
}
@ -759,7 +759,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
}
// fire vetoable events
fire( pHandles.get(), pConvertedValues.get(), pOldValues.get(), nHitCount, sal_True );
fire( pHandles.get(), pConvertedValues.get(), pOldValues.get(), nHitCount, true );
// setting the agg Properties
m_xAggregateMultiSet->setPropertyValues(AggPropertyNames, AggValues);
@ -777,7 +777,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
}
// fire change events
fire( pHandles.get(), pConvertedValues.get(), pOldValues.get(), nHitCount, sal_False );
fire( pHandles.get(), pConvertedValues.get(), pOldValues.get(), nHitCount, false );
}
else
m_xAggregateMultiSet->setPropertyValues(AggPropertyNames, AggValues);

View File

@ -71,7 +71,7 @@ namespace comphelper
void OPropertyStateHelper::firePropertyChange(sal_Int32 nHandle, const css::uno::Any& aNewValue, const css::uno::Any& aOldValue)
{
fire(&nHandle, &aNewValue, &aOldValue, 1, sal_False);
fire(&nHandle, &aNewValue, &aOldValue, 1, false);
}
// XPropertyState

View File

@ -127,7 +127,7 @@ bool tryPropertyValueEnum(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any&
inline bool tryPropertyValue(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any& /*out*/_rOldValue, const css::uno::Any& _rValueToSet, bool _bCurrentValue)
{
bool bModified(false);
sal_Bool bNewValue(sal_False);
sal_Bool bNewValue(false);
::cppu::convertPropertyValue(bNewValue, _rValueToSet);
if (bool(bNewValue) != _bCurrentValue)
{

View File

@ -31,7 +31,7 @@ private:
public:
UnoTunnelIdInit() : m_aSeq(16)
{
rtl_createUuid( reinterpret_cast<sal_uInt8*>(m_aSeq.getArray()), nullptr, sal_True );
rtl_createUuid( reinterpret_cast<sal_uInt8*>(m_aSeq.getArray()), nullptr, true );
}
const css::uno::Sequence< sal_Int8 >& getSeq() const { return m_aSeq; }
};