diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-19 09:13:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-19 13:26:27 +0100 |
commit | be8c414567f49242164b1fdfb12764b16be355c1 (patch) | |
tree | c1f505272ec27e5e069f5d6964dc4f7b20150a5a /desktop | |
parent | be94207ecb88a9005ee6624e354d70c9613d7653 (diff) |
loplugin:unusedmethods also check for functions returning bool
we were previously excluding them
Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11
Reviewed-on: https://gerrit.libreoffice.org/48167
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 26 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.hxx | 6 |
2 files changed, 13 insertions, 19 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index d1c16ea2007a..f477e4245d31 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -602,53 +602,49 @@ bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const return ( RET_OK == aInfo->Execute() ); } -bool ExtMgrDialog::enablePackage( const uno::Reference< deployment::XPackage > &xPackage, +void ExtMgrDialog::enablePackage( const uno::Reference< deployment::XPackage > &xPackage, bool bEnable ) { if ( !xPackage.is() ) - return false; + return; if ( bEnable ) { if ( ! continueOnSharedExtension( xPackage, this, RID_STR_WARNING_ENABLE_SHARED_EXTENSION, m_bEnableWarning ) ) - return false; + return; } else { if ( ! continueOnSharedExtension( xPackage, this, RID_STR_WARNING_DISABLE_SHARED_EXTENSION, m_bDisableWarning ) ) - return false; + return; } m_pManager->getCmdQueue()->enableExtension( xPackage, bEnable ); - - return true; } -bool ExtMgrDialog::removePackage( const uno::Reference< deployment::XPackage > &xPackage ) +void ExtMgrDialog::removePackage( const uno::Reference< deployment::XPackage > &xPackage ) { if ( !xPackage.is() ) - return false; + return; if ( !IsSharedPkgMgr( xPackage ) || m_bDeleteWarning ) { if ( ! removeExtensionWarn( xPackage->getDisplayName() ) ) - return false; + return; } if ( ! continueOnSharedExtension( xPackage, this, RID_STR_WARNING_REMOVE_SHARED_EXTENSION, m_bDeleteWarning ) ) - return false; + return; m_pManager->getCmdQueue()->removeExtension( xPackage ); - - return true; } -bool ExtMgrDialog::updatePackage( const uno::Reference< deployment::XPackage > &xPackage ) +void ExtMgrDialog::updatePackage( const uno::Reference< deployment::XPackage > &xPackage ) { if ( !xPackage.is() ) - return false; + return; // get the extension with highest version uno::Sequence<uno::Reference<deployment::XPackage> > seqExtensions = @@ -661,8 +657,6 @@ bool ExtMgrDialog::updatePackage( const uno::Reference< deployment::XPackage > & vEntries.push_back(extension); m_pManager->getCmdQueue()->checkForUpdates( vEntries ); - - return true; } diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 2daae7c20e52..29cf6b47722e 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -164,10 +164,10 @@ public: void setGetExtensionsURL( const OUString &rURL ); virtual void addPackageToList( const css::uno::Reference< css::deployment::XPackage > &, bool bLicenseMissing = false ) override; - bool enablePackage(const css::uno::Reference< css::deployment::XPackage > &xPackage, + void enablePackage(const css::uno::Reference< css::deployment::XPackage > &xPackage, bool bEnable ); - bool removePackage(const css::uno::Reference< css::deployment::XPackage > &xPackage ); - bool updatePackage(const css::uno::Reference< css::deployment::XPackage > &xPackage ); + void removePackage(const css::uno::Reference< css::deployment::XPackage > &xPackage ); + void updatePackage(const css::uno::Reference< css::deployment::XPackage > &xPackage ); bool acceptLicense(const css::uno::Reference< css::deployment::XPackage > &xPackage ); TheExtensionManager* getExtensionManager() const { return m_pManager; } |