summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-26 14:36:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 12:16:53 +0200
commit928dfebe109794eb079469a46f549e25b3b1e89d (patch)
tree2b3c438c25bc4f46ea22ada901699fe204d8b28c /svl
parentbd28564be85ee51dc08cb2591840e1cb00263e28 (diff)
loplugin:returnconstant in svl,svtools
Change-Id: Id297a513f3313e10531f0ccd99a16277e4e37fa1 Reviewed-on: https://gerrit.libreoffice.org/58111 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/fsstor/fsstorage.cxx5
-rw-r--r--svl/source/misc/filenotation.cxx6
2 files changed, 5 insertions, 6 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 6a28dc07d422..f01d7c583b9e 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -700,11 +700,10 @@ void SAL_CALL FSStorage::renameElement( const OUString& aElementName, const OUSt
uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
::ucbhelper::Content aSourceContent( aOldURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
- if ( !GetContent()->transferContent( aSourceContent,
+ GetContent()->transferContent( aSourceContent,
::ucbhelper::InsertOperation::Move,
aNewName,
- ucb::NameClash::ERROR ) )
- throw io::IOException(); // TODO: error handling
+ ucb::NameClash::ERROR );
}
catch( embed::InvalidStorageException& )
{
diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx
index bc3f5ccf946c..c4337708bc8b 100644
--- a/svl/source/misc/filenotation.cxx
+++ b/svl/source/misc/filenotation.cxx
@@ -70,11 +70,10 @@ namespace svt
return bSuccess;
}
- bool OFileNotation::implInitWithURLNotation( const OUString& _rURL )
+ void OFileNotation::implInitWithURLNotation( const OUString& _rURL )
{
m_sFileURL = _rURL;
osl_getSystemPathFromFileURL( _rURL.pData, &m_sSystem.pData );
- return true;
}
void OFileNotation::construct( const OUString& _rUrlOrPath )
@@ -86,7 +85,8 @@ namespace svt
{
case INetProtocol::File:
// file URL
- bSuccess = implInitWithURLNotation( _rUrlOrPath );
+ implInitWithURLNotation( _rUrlOrPath );
+ bSuccess = true;
break;
case INetProtocol::NotValid: