summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 14:15:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 21:17:20 +0200
commit53491f8a66d72176aab332983f9aff47ecd3d654 (patch)
tree628d8539e19bfad27fcc2b7902b08409afef222e /desktop
parente6538f5bdd876911ea30f84a6512c03908e620fd (diff)
loplugin:returnconstant in ucbhelper,drawinglayer
Change-Id: I4e84c570fe0e555a3aeb1f11632715de466d6e0e Reviewed-on: https://gerrit.libreoffice.org/58192 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_updateinstalldialog.cxx5
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx10
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx13
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx2
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx14
5 files changed, 17 insertions, 27 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 4a0090456217..8ab299c8b46a 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -598,9 +598,10 @@ bool UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update
const OUString sTitle( StrTitle::getTitle( sourceContent ) );
- if (destFolderContent.transferContent(
+ destFolderContent.transferContent(
sourceContent, ::ucbhelper::InsertOperation::Copy,
- sTitle, css::ucb::NameClash::OVERWRITE ))
+ sTitle, css::ucb::NameClash::OVERWRITE );
+
{
//the user may have cancelled the dialog because downloading took to long
SolarMutexGuard g;
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 3618ec5cd4eb..3b6e66598c81 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -635,10 +635,9 @@ OUString PackageManagerImpl::insertToActivationLayer(
sourceContent = ::ucbhelper::Content(
buf.makeStringAndClear(), xCmdEnv, m_xComponentContext );
}
- if (! destFolderContent.transferContent(
+ destFolderContent.transferContent(
sourceContent, ::ucbhelper::InsertOperation::Copy,
- title, NameClash::OVERWRITE ))
- throw RuntimeException( "UCB transferContent() failed!", nullptr );
+ title, NameClash::OVERWRITE );
// write to DB:
@@ -746,11 +745,10 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
::ucbhelper::Content docFolderContent;
create_folder( &docFolderContent, m_context, xCmdEnv );
// copy into document, first:
- if (! docFolderContent.transferContent(
+ docFolderContent.transferContent(
sourceContent, ::ucbhelper::InsertOperation::Copy,
OUString(),
- NameClash::ASK /* xxx todo: ASK not needed? */))
- throw RuntimeException("UCB transferContent() failed!", nullptr );
+ NameClash::ASK /* xxx todo: ASK not needed? */);
// set media-type:
::ucbhelper::Content docContent(
makeURL( m_context, title_enc ), xCmdEnv, m_xComponentContext );
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 40ccfd8f6bef..e92dffe5c52d 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -425,13 +425,9 @@ void BackendImpl::initServiceRdbFiles()
m_commonRDB = m_commonRDB_orig == "common.rdb" ? OUString("common_.rdb") : OUString("common.rdb");
if (oldRDB.get().is())
{
- if (! cacheDir.transferContent(
+ cacheDir.transferContent(
oldRDB, ::ucbhelper::InsertOperation::Copy,
- m_commonRDB, NameClash::OVERWRITE ))
- {
-
- throw RuntimeException( "UCB transferContent() failed!", nullptr );
- }
+ m_commonRDB, NameClash::OVERWRITE );
oldRDB = ::ucbhelper::Content();
}
// switch native rdb:
@@ -446,10 +442,9 @@ void BackendImpl::initServiceRdbFiles()
m_nativeRDB = (m_nativeRDB_orig == plt_rdb ) ? plt_rdb_ : plt_rdb;
if (oldRDB.get().is())
{
- if (! cacheDir.transferContent(
+ cacheDir.transferContent(
oldRDB, ::ucbhelper::InsertOperation::Copy,
- m_nativeRDB, NameClash::OVERWRITE ))
- throw RuntimeException( "UCB transferContent() failed!", nullptr );
+ m_nativeRDB, NameClash::OVERWRITE );
}
// UNO is bootstrapped, flush for next process start:
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 31ad83643550..98029f2a2bb2 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -538,7 +538,7 @@ void Package::exportTo(
bool bOk=true;
try
{
- bOk = destFolder.transferContent(
+ destFolder.transferContent(
sourceContent, ::ucbhelper::InsertOperation::Copy,
newTitle, nameClashAction);
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index ff7a245f6519..efe49cdb50fb 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1027,11 +1027,9 @@ void BackendImpl::PackageImpl::exportTo(
Reference<ucb::XContentAccess>(
xResultSet, UNO_QUERY_THROW )->queryContent(),
xCmdEnv, getMyBackend()->getComponentContext() );
- if (! destFolderContent.transferContent(
+ destFolderContent.transferContent(
subContent, ::ucbhelper::InsertOperation::Copy,
- OUString(), ucb::NameClash::OVERWRITE ))
- throw RuntimeException( "UCB transferContent() failed!",
- static_cast<OWeakObject *>(this) );
+ OUString(), ucb::NameClash::OVERWRITE );
progress.update( Any() ); // animating progress bar
}
}
@@ -1131,12 +1129,10 @@ void BackendImpl::PackageImpl::exportTo(
return;
}
- if (metainfFolderContent.transferContent(
+ metainfFolderContent.transferContent(
manifestContent, ::ucbhelper::InsertOperation::Copy,
- OUString(), ucb::NameClash::OVERWRITE ))
- {
- bSuccess = true;
- }
+ OUString(), ucb::NameClash::OVERWRITE );
+ bSuccess = true;
}
catch (const css::ucb::ContentCreationException &e)
{