[Libreoffice-commits] core.git: extensions/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 8 10:19:37 UTC 2020


 extensions/source/update/check/updatecheck.cxx       |    6 ++----
 extensions/source/update/check/updatecheckconfig.cxx |    3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 1027f7a0e1c10d957de34e27af16a4d0e825ffb2
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Mon Jun 8 11:28:16 2020 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Mon Jun 8 12:18:58 2020 +0200

    loplugin:elidestringvar in extensions
    
    Change-Id: Ica6d1a6480d122d508d1b87c2a6102f55363b995
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95790
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Jenkins

diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index b4a5152a563e..71a7b1239f63 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -1464,8 +1464,6 @@ UpdateCheck::storeReleaseNote(sal_Int8 nNum, const OUString &rURL)
 
 void UpdateCheck::showExtensionDialog()
 {
-    OUString sServiceName = "com.sun.star.deployment.ui.PackageManagerDialog";
-    OUString sArguments = "SHOW_UPDATE_DIALOG";
     uno::Reference< uno::XInterface > xService;
 
     if( ! m_xContext.is() )
@@ -1477,10 +1475,10 @@ void UpdateCheck::showExtensionDialog()
         throw uno::RuntimeException(
             "UpdateCheck::showExtensionDialog(): unable to obtain service manager from component context", uno::Reference< uno::XInterface > () );
 
-    xService = xServiceManager->createInstanceWithContext( sServiceName, m_xContext );
+    xService = xServiceManager->createInstanceWithContext( "com.sun.star.deployment.ui.PackageManagerDialog", m_xContext );
     uno::Reference< task::XJobExecutor > xExecuteable( xService, uno::UNO_QUERY );
     if ( xExecuteable.is() )
-        xExecuteable->trigger( sArguments );
+        xExecuteable->trigger( "SHOW_UPDATE_DIALOG" );
 }
 
 
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index 546325e74861..0db924341208 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -308,10 +308,9 @@ UpdateCheckConfig::getLocalFileName() const
 OUString
 UpdateCheckConfig::getDownloadDestination() const
 {
-    OUString aName = DOWNLOAD_DESTINATION;
     OUString aRet;
 
-    const_cast <UpdateCheckConfig *> (this)->getByName(aName) >>= aRet;
+    const_cast <UpdateCheckConfig *> (this)->getByName(DOWNLOAD_DESTINATION) >>= aRet;
 
     return aRet;
 }


More information about the Libreoffice-commits mailing list