summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-01 16:13:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-02 08:03:16 +0200
commitdf6270e9c1d75a4865bf79043190669b74de71d3 (patch)
tree6d2affabf04146d5ee997ae0c6d3caadacc76524 /desktop
parent8f90492812d1edac6c91e83b84f3512877dcd552 (diff)
loplugin:returnconstant in cui,desktop
Change-Id: Ieec9e3d9e2e18add9a1bc7e0e15bb8435ea51954 Reviewed-on: https://gerrit.libreoffice.org/58428 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx18
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx10
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.hxx1
-rw-r--r--desktop/source/migration/migration.cxx4
-rw-r--r--desktop/source/migration/migration_impl.hxx2
5 files changed, 9 insertions, 26 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 6d60fdf5d36f..c31088a88a8f 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1026,19 +1026,15 @@ IMPL_STATIC_LINK(ExtMgrDialog, Restart, void*, pParent, void)
bool ExtMgrDialog::Close()
{
- bool bRet = TheExtensionManager::queryTermination();
- if ( bRet )
+ bool bRet = ModelessDialog::Close();
+ m_pManager->terminateDialog();
+ //only suggest restart if modified and this is the first close attempt
+ if (!m_bClosed && m_pManager->isModified())
{
- bRet = ModelessDialog::Close();
- m_pManager->terminateDialog();
- //only suggest restart if modified and this is the first close attempt
- if (!m_bClosed && m_pManager->isModified())
- {
- m_pManager->clearModified();
- Application::PostUserEvent(LINK(nullptr, ExtMgrDialog, Restart), m_xRestartParent);
- }
- m_bClosed = true;
+ m_pManager->clearModified();
+ Application::PostUserEvent(LINK(nullptr, ExtMgrDialog, Restart), m_xRestartParent);
}
+ m_bClosed = true;
return bRet;
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index ae743357aa7f..407cf042fa64 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -250,16 +250,6 @@ bool TheExtensionManager::installPackage( const OUString &rPackageURL, bool bWar
}
-bool TheExtensionManager::queryTermination()
-{
- if ( dp_misc::office_is_running() )
- return true;
- // the standalone application unopkg must not close ( and quit ) the dialog
- // when there are still actions in the queue
- return true;
-}
-
-
void TheExtensionManager::terminateDialog()
{
if ( ! dp_misc::office_is_running() )
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index d6755d83d135..4980458f0dfd 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -96,7 +96,6 @@ public:
bool installPackage( const OUString &rPackageURL, bool bWarnUser = false );
void createPackageList();
- static bool queryTermination();
void terminateDialog();
// Tools
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index c40993338e46..622515d3e179 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -351,7 +351,7 @@ static void insertSorted(migrations_available& rAvailableMigrations, supported_m
rAvailableMigrations.push_back( aSupportedMigration );
}
-bool MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigrations)
+void MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigrations)
{
// get supported version names
uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration/SupportedVersions"), uno::UNO_QUERY_THROW);
@@ -375,8 +375,6 @@ bool MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigr
insertSorted( rAvailableMigrations, aSupportedMigration );
SAL_INFO( "desktop.migration", " available migration '" << aSupportedMigration.name << "'" );
}
-
- return true;
}
migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName)
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index 70ff0000b9cb..c32d77eee1e2 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -165,7 +165,7 @@ private:
MigrationHashMap m_aOldVersionItemsHashMap;
// functions to control the migration process
- static bool readAvailableMigrations(migrations_available&);
+ static void readAvailableMigrations(migrations_available&);
bool alreadyMigrated();
static migrations_vr readMigrationSteps(const OUString& rMigrationName);
sal_Int32 findPreferredMigrationProcess(const migrations_available&);