From 88dde756eb18d4b65283008b940aa432f6146e50 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 1 Feb 2017 15:20:53 +0200 Subject: Revert "cancelCommandExecution - no need to pass exception by Any" This reverts commit 4739b31dafc5154a2c7d6b3f0ee90686863656f0. Apparently, passing a param of type css::uno::Exception to Any will record precisely a css::uno::Exception in that Any, losing any subtype information, which this commit changed. --- xmlhelp/source/cxxhelp/provider/content.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'xmlhelp') diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx index 0f188ea7bb29..fbc0eb7a035c 100644 --- a/xmlhelp/source/cxxhelp/provider/content.cxx +++ b/xmlhelp/source/cxxhelp/provider/content.cxx @@ -226,7 +226,8 @@ uno::Any SAL_CALL Content::execute( uno::Sequence< beans::Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) { - ucbhelper::cancelCommandExecution(lang::IllegalArgumentException(), Environment); + aRet <<= lang::IllegalArgumentException(); + ucbhelper::cancelCommandExecution(aRet,Environment); } aRet <<= getPropertyValues( Properties ); @@ -236,7 +237,8 @@ uno::Any SAL_CALL Content::execute( uno::Sequence propertyValues; if( ! ( aCommand.Argument >>= propertyValues ) ) { - ucbhelper::cancelCommandExecution(lang::IllegalArgumentException(), Environment); + aRet <<= lang::IllegalArgumentException(); + ucbhelper::cancelCommandExecution(aRet,Environment); } uno::Sequence< uno::Any > ret(propertyValues.getLength()); @@ -268,7 +270,8 @@ uno::Any SAL_CALL Content::execute( ucb::OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) { - ucbhelper::cancelCommandExecution(lang::IllegalArgumentException(), Environment); + aRet <<= lang::IllegalArgumentException(); + ucbhelper::cancelCommandExecution(aRet,Environment); } uno::Reference< io::XActiveDataSink > xActiveDataSink( @@ -284,7 +287,8 @@ uno::Any SAL_CALL Content::execute( aOpenCommand.Sink, uno::UNO_QUERY); if(xActiveDataStreamer.is()) { - ucbhelper::cancelCommandExecution(ucb::UnsupportedDataSinkException(), Environment); + aRet <<= ucb::UnsupportedDataSinkException(); + ucbhelper::cancelCommandExecution(aRet,Environment); } uno::Reference< io::XOutputStream > xOutputStream( @@ -328,7 +332,8 @@ uno::Any SAL_CALL Content::execute( else { // Unsupported command - ucbhelper::cancelCommandExecution(ucb::UnsupportedCommandException(), Environment); + aRet <<= ucb::UnsupportedCommandException(); + ucbhelper::cancelCommandExecution(aRet,Environment); } return aRet; -- cgit