diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-01-29 11:57:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-01 12:17:56 +0000 |
commit | 4739b31dafc5154a2c7d6b3f0ee90686863656f0 (patch) | |
tree | 0437d82f929131f3c900b5feb74cee4b1595499b /ucb/source/ucp/hierarchy | |
parent | 385c207e3a0b2d946ff29a9003b36f81a8946c55 (diff) |
cancelCommandExecution - no need to pass exception by Any
all the call sites are passing an uno::Exception subtype
Change-Id: I6de1f00810e063e75ef620314561d7e2d6445ada
Reviewed-on: https://gerrit.libreoffice.org/33657
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp/hierarchy')
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 67 |
1 files changed, 32 insertions, 35 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index db8da992afde..08be7646aff8 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -342,10 +342,10 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= Properties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), - -1 ) ), + -1 ), Environment ); // Unreachable } @@ -362,10 +362,10 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= aProperties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), - -1 ) ), + -1 ), Environment ); // Unreachable } @@ -373,10 +373,10 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !aProperties.getLength() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + lang::IllegalArgumentException( "No properties!", static_cast< cppu::OWeakObject * >( this ), - -1 ) ), + -1 ), Environment ); // Unreachable } @@ -409,10 +409,10 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= aOpenCommand ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), - -1 ) ), + -1 ), Environment ); // Unreachable } @@ -432,10 +432,10 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= aArg ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), - -1 ) ), + -1 ), Environment ); // Unreachable } @@ -491,10 +491,10 @@ uno::Any SAL_CALL HierarchyContent::execute( { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), - -1 ) ), + -1 ), Environment ); // Unreachable } @@ -513,10 +513,10 @@ uno::Any SAL_CALL HierarchyContent::execute( { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), - -1 ) ), + -1 ), Environment ); // Unreachable } @@ -530,9 +530,9 @@ uno::Any SAL_CALL HierarchyContent::execute( ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + ucb::UnsupportedCommandException( OUString(), - static_cast< cppu::OWeakObject * >( this ) ) ), + static_cast< cppu::OWeakObject * >( this ) ), Environment ); // Unreachable } @@ -1357,9 +1357,9 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( m_eKind == ROOT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + ucb::UnsupportedCommandException( "Not supported by root folder!", - static_cast< cppu::OWeakObject * >( this ) ) ), + static_cast< cppu::OWeakObject * >( this ) ), xEnv ); // Unreachable } @@ -1369,10 +1369,10 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, { uno::Sequence<OUString> aProps { "Title" }; ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::MissingPropertiesException( + ucb::MissingPropertiesException( OUString(), static_cast< cppu::OWeakObject * >( this ), - aProps ) ), + aProps ), xEnv ); // Unreachable } @@ -1391,12 +1391,11 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( hasData( xId ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::NameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_aProps.getTitle() ) ), + m_aProps.getTitle() ), xEnv ); // Unreachable } @@ -1424,11 +1423,10 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( nTry == 1000 ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedNameClashException( "Unable to resolve name clash!", static_cast< cppu::OWeakObject * >( this ), - nNameClashResolve ) ), + nNameClashResolve ), xEnv ); // Unreachable } @@ -1448,11 +1446,10 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( hasData( xId ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( - ucb::UnsupportedNameClashException( + ucb::UnsupportedNameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), - nNameClashResolve ) ), + nNameClashResolve ), xEnv ); // Unreachable } @@ -1506,9 +1503,9 @@ void HierarchyContent::destroy( bool bDeletePhysical, if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + ucb::UnsupportedCommandException( "Not persistent!", - static_cast< cppu::OWeakObject * >( this ) ) ), + static_cast< cppu::OWeakObject * >( this ) ), xEnv ); // Unreachable } @@ -1517,9 +1514,9 @@ void HierarchyContent::destroy( bool bDeletePhysical, if ( m_eKind == ROOT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + ucb::UnsupportedCommandException( "Not supported by root folder!", - static_cast< cppu::OWeakObject * >( this ) ) ), + static_cast< cppu::OWeakObject * >( this ) ), xEnv ); // Unreachable } @@ -1558,9 +1555,9 @@ void HierarchyContent::transfer( if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + ucb::UnsupportedCommandException( "Not persistent!", - static_cast< cppu::OWeakObject * >( this ) ) ), + static_cast< cppu::OWeakObject * >( this ) ), xEnv ); // Unreachable } @@ -1569,9 +1566,9 @@ void HierarchyContent::transfer( if ( !rInfo.SourceURL.startsWith( HIERARCHY_URL_SCHEME ":/" ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::InteractiveBadTransferURLException( + ucb::InteractiveBadTransferURLException( OUString(), - static_cast< cppu::OWeakObject * >( this ) ) ), + static_cast< cppu::OWeakObject * >( this ) ), xEnv ); // Unreachable } |