From 4763091bbecab8722a43d0ed73eafc0a1f596242 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 8 May 2017 14:17:56 +0200 Subject: loplugin:constantparam Change-Id: Ia9500b25602c14aadf49fe373682ae9d87a0a1a2 Reviewed-on: https://gerrit.libreoffice.org/37390 Tested-by: Jenkins Reviewed-by: Noel Grandin --- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 2 +- .../source/deployment/registry/configuration/dp_configuration.cxx | 6 +++--- desktop/source/deployment/registry/dp_backend.cxx | 6 ++---- desktop/source/deployment/registry/help/dp_help.cxx | 4 ++-- desktop/source/deployment/registry/inc/dp_backend.h | 2 -- 5 files changed, 8 insertions(+), 12 deletions(-) (limited to 'desktop/source/deployment') diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 676e94283661..0c2d527055a1 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -875,7 +875,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleOptionsBtn, Button*, void) if ( pFact ) { OUString sExtensionId = m_pExtensionBox->GetEntryData( nActive )->m_xPackage->getIdentifier().Value; - ScopedVclPtr pDlg(pFact->CreateOptionsDialog( this, sExtensionId, OUString() )); + ScopedVclPtr pDlg(pFact->CreateOptionsDialog( this, sExtensionId )); pDlg->Execute(); } diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index a7906c3694e1..ad372fa73297 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -215,7 +215,7 @@ BackendImpl::BackendImpl( //can be removed. This works now, because the extension manager is a singleton //and the backends are only create once per process. std::list folders = m_backendDb->getAllDataUrls(); - deleteUnusedFolders(OUString(), folders); + deleteUnusedFolders(folders); configmgrini_verify_init( xCmdEnv ); @@ -699,7 +699,7 @@ void BackendImpl::PackageImpl::processPackage_( ConfigurationBackendDb::Data data; if (!m_isSchema) { - const OUString sModFolder = that->createFolder(OUString(), xCmdEnv); + const OUString sModFolder = that->createFolder(xCmdEnv); bool out_replaced = false; url = replaceOrigin(url, sModFolder, xCmdEnv, that->getComponentContext(), out_replaced); if (out_replaced) @@ -755,7 +755,7 @@ void BackendImpl::PackageImpl::processPackage_( ConfigurationBackendDb::Data data; if (!schema) { - const OUString sModFolder = that->createFolder(OUString(), xCmdEnv); + const OUString sModFolder = that->createFolder(xCmdEnv); bool out_replaced = false; url_replaced = replaceOrigin( url2, sModFolder, xCmdEnv, that->getComponentContext(), out_replaced); diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 645f7df694d4..1e7de838735e 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -212,10 +212,9 @@ Reference PackageRegistryBackend::bindPackage( } OUString PackageRegistryBackend::createFolder( - OUString const & relUrl, Reference const & xCmdEnv) { - const OUString sDataFolder = makeURL(getCachePath(), relUrl); + const OUString sDataFolder = makeURL(getCachePath(), OUString()); //make sure the folder exist ucbhelper::Content dataContent; ::dp_misc::create_folder(&dataContent, sDataFolder, xCmdEnv); @@ -252,12 +251,11 @@ void PackageRegistryBackend::deleteTempFolder( //then created a Folder with a same name and a trailing '_' //If the folderURL has no '_' then there is no corresponding tmp file. void PackageRegistryBackend::deleteUnusedFolders( - OUString const & relUrl, std::list< OUString> const & usedFolders) { try { - const OUString sDataFolder = makeURL(getCachePath(), relUrl); + const OUString sDataFolder = makeURL(getCachePath(), OUString()); ::ucbhelper::Content tempFolder( sDataFolder, Reference(), m_xComponentContext); diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 4eba37cf3243..42c35400fd3f 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -148,7 +148,7 @@ BackendImpl::BackendImpl( //can be removed. This works now, because the extension manager is a singleton //and the backends are only create once per process. std::list folders = m_backendDb->getAllDataUrls(); - deleteUnusedFolders(OUString(), folders); + deleteUnusedFolders(folders); } } @@ -369,7 +369,7 @@ void BackendImpl::implProcessHelp( if (!package->extensionContainsCompiledHelp()) { #if HAVE_FEATURE_DESKTOP - const OUString sHelpFolder = createFolder(OUString(), xCmdEnv); + const OUString sHelpFolder = createFolder(xCmdEnv); data.dataUrl = sHelpFolder; Reference< ucb::XSimpleFileAccess3 > xSFA = getFileAccess(); diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index a315c143b070..2fc4c81a52a7 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -247,7 +247,6 @@ protected: at a location relative to that folder specified by url. */ OUString createFolder( - OUString const & relUrl, css::uno::Reference const & xCmdEnv); /* deletes folders and files. @@ -255,7 +254,6 @@ protected: not used are deleted. */ void deleteUnusedFolders( - OUString const & relUrl, std::list< OUString> const & usedFolders); /* deletes one folder with a "temporary" name and the corresponding tmp file, which was used to derive the folder name. -- cgit