Kaydet (Commit) f555ab4e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:salbool: Automatic rewrite of sal_False/True

Change-Id: Idb7e5ff0c73bbc2c462b92cd96444eb5d2d4194b
üst 08bb436f
...@@ -203,7 +203,7 @@ void EmbeddedObjectContainer::CloseEmbeddedObjects() ...@@ -203,7 +203,7 @@ void EmbeddedObjectContainer::CloseEmbeddedObjects()
{ {
try try
{ {
xClose->close( sal_True ); xClose->close( true );
} }
catch (const uno::Exception&) catch (const uno::Exception&)
{ {
...@@ -508,7 +508,7 @@ bool EmbeddedObjectContainer::StoreEmbeddedObject( ...@@ -508,7 +508,7 @@ bool EmbeddedObjectContainer::StoreEmbeddedObject(
//TODO/LATER: possible optimization, don't store immediately //TODO/LATER: possible optimization, don't store immediately
//xPersist->setPersistentEntry( pImpl->mxStorage, rName, embed::EntryInitModes::ENTRY_NO_INIT, aSeq, aSeq ); //xPersist->setPersistentEntry( pImpl->mxStorage, rName, embed::EntryInitModes::ENTRY_NO_INIT, aSeq, aSeq );
xPersist->storeAsEntry( pImpl->mxStorage, rName, 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 ...@@ -802,7 +802,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
{ {
try try
{ {
xResult->close( sal_True ); xResult->close( true );
} }
catch (const uno::Exception&) catch (const uno::Exception&)
{ {
...@@ -1093,7 +1093,7 @@ bool EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed: ...@@ -1093,7 +1093,7 @@ bool EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed:
uno::Reference < ::util::XCloseable > xClose( xObj, uno::UNO_QUERY ); uno::Reference < ::util::XCloseable > xClose( xObj, uno::UNO_QUERY );
try try
{ {
xClose->close( sal_True ); xClose->close( true );
} }
catch (const uno::Exception&) catch (const uno::Exception&)
{ {
...@@ -1598,7 +1598,7 @@ bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< embed:: ...@@ -1598,7 +1598,7 @@ bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< embed::
{ {
uno::Reference< util::XModifiable > xModif( xObj->getComponent(), uno::UNO_QUERY_THROW ); uno::Reference< util::XModifiable > xModif( xObj->getComponent(), uno::UNO_QUERY_THROW );
if ( xModif->isModified() ) if ( xModif->isModified() )
xModif->setModified( sal_False ); xModif->setModified( false );
} }
catch (const uno::Exception&) catch (const uno::Exception&)
{ {
......
...@@ -564,9 +564,9 @@ namespace comphelper ...@@ -564,9 +564,9 @@ namespace comphelper
) )
{ {
if ( mapping->second == _value ) if ( mapping->second == _value )
return sal_True; return true;
} }
return sal_False; return false;
} }
......
...@@ -56,7 +56,7 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(css::uno::Runtim ...@@ -56,7 +56,7 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(css::uno::Runtim
::osl::ResettableMutexGuard aLock(m_aLock); ::osl::ResettableMutexGuard aLock(m_aLock);
if (m_xAccess.is() && m_aNames.getLength() > m_nPos) if (m_xAccess.is() && m_aNames.getLength() > m_nPos)
return sal_True; return true;
if (m_xAccess.is()) if (m_xAccess.is())
{ {
...@@ -64,7 +64,7 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(css::uno::Runtim ...@@ -64,7 +64,7 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(css::uno::Runtim
m_xAccess.clear(); m_xAccess.clear();
} }
return sal_False; return false;
} }
...@@ -155,7 +155,7 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(css::uno::Runti ...@@ -155,7 +155,7 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(css::uno::Runti
::osl::ResettableMutexGuard aLock(m_aLock); ::osl::ResettableMutexGuard aLock(m_aLock);
if (m_xAccess.is() && m_xAccess->getCount() > m_nPos) if (m_xAccess.is() && m_xAccess->getCount() > m_nPos)
return sal_True; return true;
if (m_xAccess.is()) if (m_xAccess.is())
{ {
...@@ -163,7 +163,7 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(css::uno::Runti ...@@ -163,7 +163,7 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(css::uno::Runti
m_xAccess.clear(); m_xAccess.clear();
} }
return sal_False; return false;
} }
......
...@@ -210,7 +210,7 @@ void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rR ...@@ -210,7 +210,7 @@ void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rR
break; break;
case TypeClass_BOOLEAN: case TypeClass_BOOLEAN:
rRet <<= sal_True; rRet <<= true;
break; break;
case TypeClass_STRING: case TypeClass_STRING:
......
...@@ -135,7 +135,7 @@ namespace comphelper ...@@ -135,7 +135,7 @@ namespace comphelper
Reference < i18n::XBreakIterator > xBreakIter = implGetBreakIterator(); Reference < i18n::XBreakIterator > xBreakIter = implGetBreakIterator();
if ( xBreakIter.is() ) 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 // it's a word, if the first character is an alpha-numeric character
Reference< i18n::XCharacterClassification > xCharClass = implGetCharacterClassification(); Reference< i18n::XCharacterClassification > xCharClass = implGetCharacterClassification();
......
...@@ -244,7 +244,7 @@ void OLockListener::Dispose() ...@@ -244,7 +244,7 @@ void OLockListener::Dispose()
uno::Reference< util::XCloseable > xCloseable( m_xInstance, uno::UNO_QUERY ); uno::Reference< util::XCloseable > xCloseable( m_xInstance, uno::UNO_QUERY );
if ( xCloseable.is() ) if ( xCloseable.is() )
xCloseable->close( sal_True ); xCloseable->close( true );
} }
catch( uno::Exception& ) catch( uno::Exception& )
{} {}
......
...@@ -589,7 +589,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( ...@@ -589,7 +589,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName(
uno::Sequence< beans::PropertyValue > aTempMD( aMediaDescr ); uno::Sequence< beans::PropertyValue > aTempMD( aMediaDescr );
// get TypeName // get TypeName
OUString aTypeName = xTypeDetection->queryTypeByDescriptor( aTempMD, sal_True ); OUString aTypeName = xTypeDetection->queryTypeByDescriptor( aTempMD, true );
// get FilterName // get FilterName
for ( sal_Int32 nInd = 0; nInd < aTempMD.getLength(); nInd++ ) for ( sal_Int32 nInd = 0; nInd < aTempMD.getLength(); nInd++ )
......
...@@ -223,7 +223,7 @@ namespace comphelper ...@@ -223,7 +223,7 @@ namespace comphelper
{ {
// XSet is only a workaround for addProperty not being able to add default-void properties. // XSet is only a workaround for addProperty not being able to add default-void properties.
// So, everything of XSet except insert is implemented empty // So, everything of XSet except insert is implemented empty
return sal_False; return false;
} }
...@@ -250,7 +250,7 @@ namespace comphelper ...@@ -250,7 +250,7 @@ namespace comphelper
m_pArrayHelper.reset(); m_pArrayHelper.reset();
g.clear(); g.clear();
setModified(sal_True); setModified(true);
} }
...@@ -282,7 +282,7 @@ namespace comphelper ...@@ -282,7 +282,7 @@ namespace comphelper
{ {
// XSet is only a workaround for addProperty not being able to add default-void properties. // XSet is only a workaround for addProperty not being able to add default-void properties.
// So, everything of XSet except insert is implemented empty // So, everything of XSet except insert is implemented empty
return sal_False; return false;
} }
...@@ -356,7 +356,7 @@ namespace comphelper ...@@ -356,7 +356,7 @@ namespace comphelper
m_pArrayHelper.reset(); m_pArrayHelper.reset();
g.clear(); g.clear();
setModified(sal_True); setModified(true);
} }
...@@ -370,7 +370,7 @@ namespace comphelper ...@@ -370,7 +370,7 @@ namespace comphelper
m_pArrayHelper.reset(); m_pArrayHelper.reset();
g.clear(); g.clear();
setModified(sal_True); setModified(true);
} }
......
...@@ -425,7 +425,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const css::uno::Se ...@@ -425,7 +425,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const css::uno::Se
// implementation) // implementation)
if ( ( nHandle != -1 ) && !isCurrentlyForwardingProperty( nHandle ) ) if ( ( nHandle != -1 ) && !isCurrentlyForwardingProperty( nHandle ) )
fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, sal_False); fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, false);
} }
else else
{ {
...@@ -448,7 +448,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const css::uno::Se ...@@ -448,7 +448,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const css::uno::Se
} }
if (nDest) 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 ...@@ -460,7 +460,7 @@ void SAL_CALL OPropertySetAggregationHelper::vetoableChange(const css::beans::Pr
cppu::IPropertyArrayHelper& rPH = getInfoHelper(); cppu::IPropertyArrayHelper& rPH = getInfoHelper();
sal_Int32 nHandle = rPH.getHandleByName(_rEvent.PropertyName); 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( ...@@ -759,7 +759,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
} }
// fire vetoable events // 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 // setting the agg Properties
m_xAggregateMultiSet->setPropertyValues(AggPropertyNames, AggValues); m_xAggregateMultiSet->setPropertyValues(AggPropertyNames, AggValues);
...@@ -777,7 +777,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( ...@@ -777,7 +777,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
} }
// fire change events // fire change events
fire( pHandles.get(), pConvertedValues.get(), pOldValues.get(), nHitCount, sal_False ); fire( pHandles.get(), pConvertedValues.get(), pOldValues.get(), nHitCount, false );
} }
else else
m_xAggregateMultiSet->setPropertyValues(AggPropertyNames, AggValues); m_xAggregateMultiSet->setPropertyValues(AggPropertyNames, AggValues);
......
...@@ -71,7 +71,7 @@ namespace comphelper ...@@ -71,7 +71,7 @@ namespace comphelper
void OPropertyStateHelper::firePropertyChange(sal_Int32 nHandle, const css::uno::Any& aNewValue, const css::uno::Any& aOldValue) 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 // XPropertyState
......
...@@ -127,7 +127,7 @@ bool tryPropertyValueEnum(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any& ...@@ -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) inline bool tryPropertyValue(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any& /*out*/_rOldValue, const css::uno::Any& _rValueToSet, bool _bCurrentValue)
{ {
bool bModified(false); bool bModified(false);
sal_Bool bNewValue(sal_False); sal_Bool bNewValue(false);
::cppu::convertPropertyValue(bNewValue, _rValueToSet); ::cppu::convertPropertyValue(bNewValue, _rValueToSet);
if (bool(bNewValue) != _bCurrentValue) if (bool(bNewValue) != _bCurrentValue)
{ {
......
...@@ -31,7 +31,7 @@ private: ...@@ -31,7 +31,7 @@ private:
public: public:
UnoTunnelIdInit() : m_aSeq(16) 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; } const css::uno::Sequence< sal_Int8 >& getSeq() const { return m_aSeq; }
}; };
......
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