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:
parent
186c34af5d
commit
c82dae439e
@ -1314,8 +1314,9 @@ css::uno::Any SAL_CALL ContentEventListener_Impl::queryInterface( const css::uno
|
||||
// virtual
|
||||
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 )
|
||||
{
|
||||
case ContentAction::DELETED:
|
||||
@ -1330,7 +1331,6 @@ void SAL_CALL ContentEventListener_Impl::contentEvent( const ContentEvent& evt )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// XEventListenr methods.
|
||||
|
@ -819,8 +819,9 @@ void InternetProxyDecider_Impl::setNoProxyList(
|
||||
|
||||
m_aNoProxyList.clear();
|
||||
|
||||
if ( !rNoProxyList.isEmpty() )
|
||||
{
|
||||
if ( rNoProxyList.isEmpty() )
|
||||
return;
|
||||
|
||||
// List of connection endpoints hostname[:port],
|
||||
// separated by semicolon. Wildcards allowed.
|
||||
|
||||
@ -917,7 +918,6 @@ void InternetProxyDecider_Impl::setNoProxyList(
|
||||
}
|
||||
while ( nEnd != nLen );
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace proxydecider_impl
|
||||
|
||||
|
@ -402,8 +402,9 @@ void SAL_CALL ContentImplHelper::addProperty(
|
||||
OSL_ENSURE( xSet.is(),
|
||||
"ContentImplHelper::addProperty - No property set!" );
|
||||
|
||||
if ( xSet.is() )
|
||||
{
|
||||
if ( !xSet.is() )
|
||||
return;
|
||||
|
||||
uno::Reference< beans::XPropertyContainer > xContainer(
|
||||
xSet, uno::UNO_QUERY );
|
||||
|
||||
@ -411,8 +412,9 @@ void SAL_CALL ContentImplHelper::addProperty(
|
||||
xContainer.is(),
|
||||
"ContentImplHelper::addProperty - No property container!" );
|
||||
|
||||
if ( xContainer.is() )
|
||||
{
|
||||
if ( !xContainer.is() )
|
||||
return;
|
||||
|
||||
// Property is always removable.
|
||||
Attributes |= beans::PropertyAttribute::REMOVABLE;
|
||||
|
||||
@ -456,8 +458,6 @@ void SAL_CALL ContentImplHelper::addProperty(
|
||||
notifyPropertySetInfoChange( evt );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
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.
|
||||
uno::Reference< css::ucb::XPersistentPropertySet > xSet(
|
||||
getAdditionalPropertySet( false ) );
|
||||
if ( xSet.is() )
|
||||
{
|
||||
if ( !xSet.is() )
|
||||
return;
|
||||
|
||||
uno::Reference< beans::XPropertyContainer > xContainer(
|
||||
xSet, uno::UNO_QUERY );
|
||||
|
||||
@ -499,8 +500,9 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
||||
xContainer.is(),
|
||||
"ContentImplHelper::removeProperty - No property container!" );
|
||||
|
||||
if ( xContainer.is() )
|
||||
{
|
||||
if ( !xContainer.is() )
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
xContainer->removeProperty( Name );
|
||||
@ -552,8 +554,6 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
||||
notifyPropertySetInfoChange( evt );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener(
|
||||
@ -644,8 +644,9 @@ void ContentImplHelper::notifyPropertiesChange(
|
||||
return;
|
||||
|
||||
sal_Int32 nCount = evt.getLength();
|
||||
if ( nCount )
|
||||
{
|
||||
if ( !nCount )
|
||||
return;
|
||||
|
||||
// First, notify listeners interested in changes of every property.
|
||||
cppu::OInterfaceContainerHelper* pAllPropsContainer
|
||||
= m_pImpl->m_pPropertyChangeListeners->getContainer(
|
||||
@ -714,7 +715,6 @@ void ContentImplHelper::notifyPropertiesChange(
|
||||
it = aListeners.begin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ContentImplHelper::notifyPropertySetInfoChange(
|
||||
const beans::PropertySetInfoChangeEvent& evt ) const
|
||||
|
@ -604,11 +604,13 @@ void PropertyValueSet::appendVoid( const OUString& rPropName )
|
||||
void PropertyValueSet::appendPropertySet(
|
||||
const Reference< XPropertySet >& rxSet )
|
||||
{
|
||||
if ( rxSet.is() )
|
||||
{
|
||||
if ( !rxSet.is() )
|
||||
return;
|
||||
|
||||
Reference< XPropertySetInfo > xInfo = rxSet->getPropertySetInfo();
|
||||
if ( xInfo.is() )
|
||||
{
|
||||
if ( !xInfo.is() )
|
||||
return;
|
||||
|
||||
const Sequence< Property > aProps = xInfo->getProperties();
|
||||
|
||||
Reference< XPropertyAccess > xPropertyAccess( rxSet, UNO_QUERY );
|
||||
@ -653,8 +655,6 @@ void PropertyValueSet::appendPropertySet(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool PropertyValueSet::appendPropertySetValue(
|
||||
|
@ -181,8 +181,9 @@ void ContentProviderImplHelper::queryExistingContents(
|
||||
void ContentProviderImplHelper::registerNewContent(
|
||||
const uno::Reference< ucb::XContent > & xContent )
|
||||
{
|
||||
if ( xContent.is() )
|
||||
{
|
||||
if ( !xContent.is() )
|
||||
return;
|
||||
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
cleanupRegisteredContents();
|
||||
@ -194,7 +195,6 @@ void ContentProviderImplHelper::registerNewContent(
|
||||
if ( it == m_pImpl->m_aContents.end() )
|
||||
m_pImpl->m_aContents[ aURL ] = xContent;
|
||||
}
|
||||
}
|
||||
|
||||
uno::Reference< css::ucb::XPropertySetRegistry >
|
||||
ContentProviderImplHelper::getAdditionalPropertySetRegistry()
|
||||
|
@ -1404,8 +1404,9 @@ PropertySetInfo::PropertySetInfo(
|
||||
: m_pProps( new uno::Sequence< beans::Property >( nProps ) )
|
||||
{
|
||||
|
||||
if ( nProps )
|
||||
{
|
||||
if ( !nProps )
|
||||
return;
|
||||
|
||||
const PropertyInfo* pEntry = pProps;
|
||||
beans::Property* pProperties = m_pProps->getArray();
|
||||
|
||||
@ -1421,7 +1422,6 @@ PropertySetInfo::PropertySetInfo(
|
||||
pEntry++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -231,8 +231,9 @@ void ResultSetImplHelper::init( bool bStatic )
|
||||
{
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
if ( !m_bInitDone )
|
||||
{
|
||||
if ( m_bInitDone )
|
||||
return;
|
||||
|
||||
if ( bStatic )
|
||||
{
|
||||
// virtual... derived class fills m_xResultSet1
|
||||
@ -255,7 +256,6 @@ void ResultSetImplHelper::init( bool bStatic )
|
||||
}
|
||||
m_bInitDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ucbhelper
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user