Kaydet (Commit) 1d40b59d authored tarafından Matteo Casalin's avatar Matteo Casalin

Avoid 'else' after a return

Change-Id: Ia530aa2fdaa5f6d77180da3139a47407adf9f519
üst 03518d08
...@@ -932,8 +932,7 @@ bool SfxDocTplService_Impl::removeContent( const OUString& rContentURL ) ...@@ -932,8 +932,7 @@ bool SfxDocTplService_Impl::removeContent( const OUString& rContentURL )
if ( Content::create( rContentURL, maCmdEnv, comphelper::getProcessComponentContext(), aContent ) ) if ( Content::create( rContentURL, maCmdEnv, comphelper::getProcessComponentContext(), aContent ) )
return removeContent( aContent ); return removeContent( aContent );
else return false;
return false;
} }
...@@ -2212,8 +2211,7 @@ uno::Reference< ucb::XContent > SAL_CALL SfxDocTplService::getContent() ...@@ -2212,8 +2211,7 @@ uno::Reference< ucb::XContent > SAL_CALL SfxDocTplService::getContent()
{ {
if ( pImp->init() ) if ( pImp->init() )
return pImp->getContent().get(); return pImp->getContent().get();
else return nullptr;
return nullptr;
} }
...@@ -2221,10 +2219,7 @@ sal_Bool SAL_CALL SfxDocTplService::storeTemplate( const OUString& GroupName, ...@@ -2221,10 +2219,7 @@ sal_Bool SAL_CALL SfxDocTplService::storeTemplate( const OUString& GroupName,
const OUString& TemplateName, const OUString& TemplateName,
const uno::Reference< frame::XStorable >& Storable ) const uno::Reference< frame::XStorable >& Storable )
{ {
if ( pImp->init() ) return pImp->init() && pImp->storeTemplate( GroupName, TemplateName, Storable );
return pImp->storeTemplate( GroupName, TemplateName, Storable );
else
return false;
} }
...@@ -2232,20 +2227,14 @@ sal_Bool SAL_CALL SfxDocTplService::addTemplate( const OUString& rGroupName, ...@@ -2232,20 +2227,14 @@ sal_Bool SAL_CALL SfxDocTplService::addTemplate( const OUString& rGroupName,
const OUString& rTemplateName, const OUString& rTemplateName,
const OUString& rSourceURL ) const OUString& rSourceURL )
{ {
if ( pImp->init() ) return pImp->init() && pImp->addTemplate( rGroupName, rTemplateName, rSourceURL );
return pImp->addTemplate( rGroupName, rTemplateName, rSourceURL );
else
return false;
} }
sal_Bool SAL_CALL SfxDocTplService::removeTemplate( const OUString& rGroupName, sal_Bool SAL_CALL SfxDocTplService::removeTemplate( const OUString& rGroupName,
const OUString& rTemplateName ) const OUString& rTemplateName )
{ {
if ( pImp->init() ) return pImp->init() && pImp->removeTemplate( rGroupName, rTemplateName );
return pImp->removeTemplate( rGroupName, rTemplateName );
else
return false;
} }
...@@ -2256,28 +2245,19 @@ sal_Bool SAL_CALL SfxDocTplService::renameTemplate( const OUString& rGroupName, ...@@ -2256,28 +2245,19 @@ sal_Bool SAL_CALL SfxDocTplService::renameTemplate( const OUString& rGroupName,
if ( rOldName == rNewName ) if ( rOldName == rNewName )
return true; return true;
if ( pImp->init() ) return pImp->init() && pImp->renameTemplate( rGroupName, rOldName, rNewName );
return pImp->renameTemplate( rGroupName, rOldName, rNewName );
else
return false;
} }
sal_Bool SAL_CALL SfxDocTplService::addGroup( const OUString& rGroupName ) sal_Bool SAL_CALL SfxDocTplService::addGroup( const OUString& rGroupName )
{ {
if ( pImp->init() ) return pImp->init() && pImp->addGroup( rGroupName );
return pImp->addGroup( rGroupName );
else
return false;
} }
sal_Bool SAL_CALL SfxDocTplService::removeGroup( const OUString& rGroupName ) sal_Bool SAL_CALL SfxDocTplService::removeGroup( const OUString& rGroupName )
{ {
if ( pImp->init() ) return pImp->init() && pImp->removeGroup( rGroupName );
return pImp->removeGroup( rGroupName );
else
return false;
} }
...@@ -2287,10 +2267,7 @@ sal_Bool SAL_CALL SfxDocTplService::renameGroup( const OUString& rOldName, ...@@ -2287,10 +2267,7 @@ sal_Bool SAL_CALL SfxDocTplService::renameGroup( const OUString& rOldName,
if ( rOldName == rNewName ) if ( rOldName == rNewName )
return true; return true;
if ( pImp->init() ) return pImp->init() && pImp->renameGroup( rOldName, rNewName );
return pImp->renameGroup( rOldName, rNewName );
else
return false;
} }
......
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