diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-25 13:46:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-26 07:30:07 +0100 |
commit | 9e23683b4c91c60e39839a03cfa6adc436a9afeb (patch) | |
tree | c63efbe4a1b51c495dae1867cf04f4cf2c617f8d /desktop | |
parent | 55febfff803fd0a49a8b24fd7dc16253e70bd28e (diff) |
loplugin:singlevalfields
Change-Id: I4a56a27ebce927b8e21cf37bb2c527caf1317bcc
Reviewed-on: https://gerrit.libreoffice.org/69681
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_updatedialog.cxx | 42 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.hxx | 3 |
2 files changed, 0 insertions, 45 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index fe8517de628d..c4b3cebb3fe0 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -480,7 +480,6 @@ UpdateDialog::UpdateDialog( , m_ignoredUpdate(DpResId(RID_DLG_UPDATE_IGNORED_UPDATE)) , m_updateData(*updateData) , m_thread(new UpdateDialog::Thread(context, *this, vExtensionList)) - , m_bModified( false ) , m_xChecking(m_xBuilder->weld_label("UPDATE_CHECKING")) , m_xThrobber(m_xBuilder->weld_spinner("THROBBER")) , m_xUpdate(m_xBuilder->weld_label("UPDATE_LABEL")) @@ -533,7 +532,6 @@ UpdateDialog::UpdateDialog( UpdateDialog::~UpdateDialog() { - storeIgnoredUpdates(); } short UpdateDialog::run() { @@ -756,7 +754,6 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) } } - storeIgnoredUpdates(); createNotifyJob( bPrepareOnly, aItemList ); } @@ -858,45 +855,6 @@ void UpdateDialog::getIgnoredUpdates() } -void UpdateDialog::storeIgnoredUpdates() -{ - if ( m_bModified && ( !m_ignoredUpdates.empty() ) ) - { - uno::Reference< lang::XMultiServiceFactory > xConfig( - configuration::theDefaultProvider::get(m_context)); - beans::NamedValue aValue( "nodepath", uno::Any( IGNORED_UPDATES ) ); - uno::Sequence< uno::Any > args(1); - args[0] <<= aValue; - - uno::Reference< container::XNameContainer > xNameContainer( xConfig->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", args ), uno::UNO_QUERY_THROW ); - - for (auto const& ignoredUpdate : m_ignoredUpdates) - { - if ( xNameContainer->hasByName( ignoredUpdate->sExtensionID ) ) - { - if ( ignoredUpdate->bRemoved ) - xNameContainer->removeByName( ignoredUpdate->sExtensionID ); - else - uno::Reference< beans::XPropertySet >( xNameContainer->getByName( ignoredUpdate->sExtensionID ), uno::UNO_QUERY_THROW )->setPropertyValue( PROPERTY_VERSION, uno::Any( ignoredUpdate->sVersion ) ); - } - else if ( ! ignoredUpdate->bRemoved ) - { - uno::Reference< beans::XPropertySet > elem( uno::Reference< lang::XSingleServiceFactory >( xNameContainer, uno::UNO_QUERY_THROW )->createInstance(), uno::UNO_QUERY_THROW ); - elem->setPropertyValue( PROPERTY_VERSION, uno::Any( ignoredUpdate->sVersion ) ); - xNameContainer->insertByName( ignoredUpdate->sExtensionID, uno::Any( elem ) ); - } - } - - uno::Reference< util::XChangesBatch > xChangesBatch( xNameContainer, uno::UNO_QUERY ); - if ( xChangesBatch.is() && xChangesBatch->hasPendingChanges() ) - xChangesBatch->commitChanges(); - } - - m_bModified = false; -} - - bool UpdateDialog::isIgnoredUpdate( UpdateDialog::Index * index ) { bool bIsIgnored = false; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index 106abf3dafff..d5b4f841c48c 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -112,7 +112,6 @@ private: void enableOk(); void getIgnoredUpdates(); - void storeIgnoredUpdates(); void initDescription(); void clearDescription(); @@ -152,8 +151,6 @@ private: rtl::Reference< UpdateDialog::Thread > m_thread; css::uno::Reference< css::deployment::XExtensionManager > m_xExtensionManager; - bool m_bModified; - std::unique_ptr<weld::Label> m_xChecking; std::unique_ptr<weld::Spinner> m_xThrobber; std::unique_ptr<weld::Label> m_xUpdate; |