diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-03 16:00:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-03 21:54:58 +0200 |
commit | fb58fc19c0c6e3c00f94161276a4f5dbe9db9096 (patch) | |
tree | b5be5f4419eeb4b49a61f1ef61fc0e3909540a2b /ucb/source/ucp/package | |
parent | c82dae439e8081fdcbfe68b2f2bc04190077a111 (diff) |
loplugin:flatten in ucb
Change-Id: Ica7e5d3b5a5cec065f35f99d62b3b6604323601a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100009
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp/package')
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 19f2017716bb..127c1cfb63e7 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -1909,29 +1909,29 @@ void Content::transfer( // 5) Destroy source ( when moving only ) . - if ( rInfo.MoveData ) - { - xSource->destroy( true, xEnv ); + if ( !rInfo.MoveData ) + return; - // Remove all persistent data of source and its children. - if ( !xSource->removeData() ) - { - uno::Sequence<uno::Any> aArgs(comphelper::InitAnyPropertySequence( - { - {"Uri", uno::Any(xSource->m_xIdentifier->getContentIdentifier())} - })); - ucbhelper::cancelCommandExecution( - ucb::IOErrorCode_CANT_WRITE, - aArgs, - xEnv, - "Cannot remove persistent data of source object!", - this ); - // Unreachable - } + xSource->destroy( true, xEnv ); - // Remove own and all children's Additional Core Properties. - xSource->removeAdditionalPropertySet(); + // Remove all persistent data of source and its children. + if ( !xSource->removeData() ) + { + uno::Sequence<uno::Any> aArgs(comphelper::InitAnyPropertySequence( + { + {"Uri", uno::Any(xSource->m_xIdentifier->getContentIdentifier())} + })); + ucbhelper::cancelCommandExecution( + ucb::IOErrorCode_CANT_WRITE, + aArgs, + xEnv, + "Cannot remove persistent data of source object!", + this ); + // Unreachable } + + // Remove own and all children's Additional Core Properties. + xSource->removeAdditionalPropertySet(); } |