loplugin:flatten in ucbhelper

Change-Id: Ic5a8ce908671bd492395bff01aa211b8bdd74ca7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100008
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2020-08-03 15:56:20 +02:00
parent 186c34af5d
commit c82dae439e
7 changed files with 339 additions and 339 deletions

View File

@@ -1314,8 +1314,9 @@ css::uno::Any SAL_CALL ContentEventListener_Impl::queryInterface( const css::uno
// virtual // virtual
void SAL_CALL ContentEventListener_Impl::contentEvent( const ContentEvent& evt ) void SAL_CALL ContentEventListener_Impl::contentEvent( const ContentEvent& evt )
{ {
if ( evt.Source == m_rContent.m_xContent ) if ( evt.Source != m_rContent.m_xContent )
{ return;
switch ( evt.Action ) switch ( evt.Action )
{ {
case ContentAction::DELETED: case ContentAction::DELETED:
@@ -1330,7 +1331,6 @@ void SAL_CALL ContentEventListener_Impl::contentEvent( const ContentEvent& evt )
break; break;
} }
} }
}
// XEventListenr methods. // XEventListenr methods.

View File

@@ -819,8 +819,9 @@ void InternetProxyDecider_Impl::setNoProxyList(
m_aNoProxyList.clear(); m_aNoProxyList.clear();
if ( !rNoProxyList.isEmpty() ) if ( rNoProxyList.isEmpty() )
{ return;
// List of connection endpoints hostname[:port], // List of connection endpoints hostname[:port],
// separated by semicolon. Wildcards allowed. // separated by semicolon. Wildcards allowed.
@@ -917,7 +918,6 @@ void InternetProxyDecider_Impl::setNoProxyList(
} }
while ( nEnd != nLen ); while ( nEnd != nLen );
} }
}
} // namespace proxydecider_impl } // namespace proxydecider_impl

View File

@@ -402,8 +402,9 @@ void SAL_CALL ContentImplHelper::addProperty(
OSL_ENSURE( xSet.is(), OSL_ENSURE( xSet.is(),
"ContentImplHelper::addProperty - No property set!" ); "ContentImplHelper::addProperty - No property set!" );
if ( xSet.is() ) if ( !xSet.is() )
{ return;
uno::Reference< beans::XPropertyContainer > xContainer( uno::Reference< beans::XPropertyContainer > xContainer(
xSet, uno::UNO_QUERY ); xSet, uno::UNO_QUERY );
@@ -411,8 +412,9 @@ void SAL_CALL ContentImplHelper::addProperty(
xContainer.is(), xContainer.is(),
"ContentImplHelper::addProperty - No property container!" ); "ContentImplHelper::addProperty - No property container!" );
if ( xContainer.is() ) if ( !xContainer.is() )
{ return;
// Property is always removable. // Property is always removable.
Attributes |= beans::PropertyAttribute::REMOVABLE; Attributes |= beans::PropertyAttribute::REMOVABLE;
@@ -456,8 +458,6 @@ void SAL_CALL ContentImplHelper::addProperty(
notifyPropertySetInfoChange( evt ); notifyPropertySetInfoChange( evt );
} }
} }
}
}
// virtual // virtual
void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name ) void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
@@ -490,8 +490,9 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
// Open persistent property set, if exists. // Open persistent property set, if exists.
uno::Reference< css::ucb::XPersistentPropertySet > xSet( uno::Reference< css::ucb::XPersistentPropertySet > xSet(
getAdditionalPropertySet( false ) ); getAdditionalPropertySet( false ) );
if ( xSet.is() ) if ( !xSet.is() )
{ return;
uno::Reference< beans::XPropertyContainer > xContainer( uno::Reference< beans::XPropertyContainer > xContainer(
xSet, uno::UNO_QUERY ); xSet, uno::UNO_QUERY );
@@ -499,8 +500,9 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
xContainer.is(), xContainer.is(),
"ContentImplHelper::removeProperty - No property container!" ); "ContentImplHelper::removeProperty - No property container!" );
if ( xContainer.is() ) if ( !xContainer.is() )
{ return;
try try
{ {
xContainer->removeProperty( Name ); xContainer->removeProperty( Name );
@@ -552,8 +554,6 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
notifyPropertySetInfoChange( evt ); notifyPropertySetInfoChange( evt );
} }
} }
}
}
// virtual // virtual
void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener( void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener(
@@ -644,8 +644,9 @@ void ContentImplHelper::notifyPropertiesChange(
return; return;
sal_Int32 nCount = evt.getLength(); sal_Int32 nCount = evt.getLength();
if ( nCount ) if ( !nCount )
{ return;
// First, notify listeners interested in changes of every property. // First, notify listeners interested in changes of every property.
cppu::OInterfaceContainerHelper* pAllPropsContainer cppu::OInterfaceContainerHelper* pAllPropsContainer
= m_pImpl->m_pPropertyChangeListeners->getContainer( = m_pImpl->m_pPropertyChangeListeners->getContainer(
@@ -714,7 +715,6 @@ void ContentImplHelper::notifyPropertiesChange(
it = aListeners.begin(); it = aListeners.begin();
} }
} }
}
void ContentImplHelper::notifyPropertySetInfoChange( void ContentImplHelper::notifyPropertySetInfoChange(
const beans::PropertySetInfoChangeEvent& evt ) const const beans::PropertySetInfoChangeEvent& evt ) const

View File

@@ -604,11 +604,13 @@ void PropertyValueSet::appendVoid( const OUString& rPropName )
void PropertyValueSet::appendPropertySet( void PropertyValueSet::appendPropertySet(
const Reference< XPropertySet >& rxSet ) const Reference< XPropertySet >& rxSet )
{ {
if ( rxSet.is() ) if ( !rxSet.is() )
{ return;
Reference< XPropertySetInfo > xInfo = rxSet->getPropertySetInfo(); Reference< XPropertySetInfo > xInfo = rxSet->getPropertySetInfo();
if ( xInfo.is() ) if ( !xInfo.is() )
{ return;
const Sequence< Property > aProps = xInfo->getProperties(); const Sequence< Property > aProps = xInfo->getProperties();
Reference< XPropertyAccess > xPropertyAccess( rxSet, UNO_QUERY ); Reference< XPropertyAccess > xPropertyAccess( rxSet, UNO_QUERY );
@@ -653,8 +655,6 @@ void PropertyValueSet::appendPropertySet(
} }
} }
} }
}
}
bool PropertyValueSet::appendPropertySetValue( bool PropertyValueSet::appendPropertySetValue(

View File

@@ -181,8 +181,9 @@ void ContentProviderImplHelper::queryExistingContents(
void ContentProviderImplHelper::registerNewContent( void ContentProviderImplHelper::registerNewContent(
const uno::Reference< ucb::XContent > & xContent ) const uno::Reference< ucb::XContent > & xContent )
{ {
if ( xContent.is() ) if ( !xContent.is() )
{ return;
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
cleanupRegisteredContents(); cleanupRegisteredContents();
@@ -194,7 +195,6 @@ void ContentProviderImplHelper::registerNewContent(
if ( it == m_pImpl->m_aContents.end() ) if ( it == m_pImpl->m_aContents.end() )
m_pImpl->m_aContents[ aURL ] = xContent; m_pImpl->m_aContents[ aURL ] = xContent;
} }
}
uno::Reference< css::ucb::XPropertySetRegistry > uno::Reference< css::ucb::XPropertySetRegistry >
ContentProviderImplHelper::getAdditionalPropertySetRegistry() ContentProviderImplHelper::getAdditionalPropertySetRegistry()

View File

@@ -1404,8 +1404,9 @@ PropertySetInfo::PropertySetInfo(
: m_pProps( new uno::Sequence< beans::Property >( nProps ) ) : m_pProps( new uno::Sequence< beans::Property >( nProps ) )
{ {
if ( nProps ) if ( !nProps )
{ return;
const PropertyInfo* pEntry = pProps; const PropertyInfo* pEntry = pProps;
beans::Property* pProperties = m_pProps->getArray(); beans::Property* pProperties = m_pProps->getArray();
@@ -1421,7 +1422,6 @@ PropertySetInfo::PropertySetInfo(
pEntry++; pEntry++;
} }
} }
}

View File

@@ -231,8 +231,9 @@ void ResultSetImplHelper::init( bool bStatic )
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
if ( !m_bInitDone ) if ( m_bInitDone )
{ return;
if ( bStatic ) if ( bStatic )
{ {
// virtual... derived class fills m_xResultSet1 // virtual... derived class fills m_xResultSet1
@@ -255,7 +256,6 @@ void ResultSetImplHelper::init( bool bStatic )
} }
m_bInitDone = true; m_bInitDone = true;
} }
}
} // namespace ucbhelper } // namespace ucbhelper