[Libreoffice-commits] core.git: dbaccess/source include/ucbhelper ucbhelper/source ucb/source xmlhelp/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Feb 1 13:23:26 UTC 2017


 dbaccess/source/core/dataaccess/ContentHelper.cxx      |   16 -
 dbaccess/source/core/dataaccess/documentcontainer.cxx  |   12 -
 dbaccess/source/core/dataaccess/documentdefinition.cxx |   16 -
 include/ucbhelper/cancelcommandexecution.hxx           |    2 
 ucb/source/core/ucb.cxx                                |   12 -
 ucb/source/core/ucbcmds.cxx                            |   25 +-
 ucb/source/ucp/cmis/cmis_content.cxx                   |   70 +++----
 ucb/source/ucp/cmis/cmis_content.hxx                   |    2 
 ucb/source/ucp/cmis/cmis_repo_content.cxx              |    6 
 ucb/source/ucp/cmis/cmis_repo_content.hxx              |    2 
 ucb/source/ucp/ext/ucpext_content.cxx                  |   20 +-
 ucb/source/ucp/file/filglob.cxx                        |   42 ++--
 ucb/source/ucp/ftp/ftpcontent.cxx                      |  104 +++++-----
 ucb/source/ucp/gio/gio_content.cxx                     |  165 +++++++++--------
 ucb/source/ucp/gio/gio_content.hxx                     |    6 
 ucb/source/ucp/hierarchy/hierarchycontent.cxx          |   67 +++---
 ucb/source/ucp/package/pkgcontent.cxx                  |   73 +++----
 ucb/source/ucp/tdoc/tdoc_content.cxx                   |  109 +++++------
 ucb/source/ucp/webdav-neon/webdavcontent.cxx           |  153 ++++++++-------
 ucb/source/ucp/webdav-neon/webdavcontent.hxx           |    2 
 ucb/source/ucp/webdav/webdavcontent.cxx                |    4 
 ucb/source/ucp/webdav/webdavcontent.hxx                |    2 
 ucbhelper/source/client/content.cxx                    |   12 -
 ucbhelper/source/provider/cancelcommandexecution.cxx   |    8 
 xmlhelp/source/cxxhelp/provider/content.cxx            |   15 +
 25 files changed, 508 insertions(+), 437 deletions(-)

New commits:
commit 88dde756eb18d4b65283008b940aa432f6146e50
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Feb 1 15:20:53 2017 +0200

    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.

diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 7de44a4..4eea9fe 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -165,10 +165,10 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
         {
             OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -183,10 +183,10 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
         {
             OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -195,10 +195,10 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
         {
             OSL_FAIL( "No properties!" );
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -221,9 +221,9 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
         OSL_FAIL( "Content::execute - unsupported command!" );
 
         ucbhelper::cancelCommandExecution(
-            UnsupportedCommandException(
+            makeAny( UnsupportedCommandException(
                             OUString(),
-                            static_cast< cppu::OWeakObject * >( this ) ),
+                            static_cast< cppu::OWeakObject * >( this ) ) ),
             Environment );
         // Unreachable
     }
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index d8a14c8..c7ddcb6 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -402,10 +402,10 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
         {
             OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -429,10 +429,10 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
         {
             // Unsupported.
             ucbhelper::cancelCommandExecution(
-                UnsupportedOpenModeException(
+                makeAny( UnsupportedOpenModeException(
                                 OUString(),
                                 static_cast< cppu::OWeakObject * >( this ),
-                                sal_Int16( aOpenCommand.Mode ) ),
+                                sal_Int16( aOpenCommand.Mode ) ) ),
                 Environment );
                 // Unreachable
         }
@@ -446,10 +446,10 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
         {
               OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 29c531c..8818e68 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -883,10 +883,10 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
     {
         // not supported
         ucbhelper::cancelCommandExecution(
-                UnsupportedOpenModeException(
+                makeAny( UnsupportedOpenModeException(
                                 OUString(),
                                 static_cast< cppu::OWeakObject * >( this ),
-                                sal_Int16( nOpenMode ) ),
+                                sal_Int16( nOpenMode ) ) ),
                 _rxEnvironment );
         // Unreachable
         OSL_FAIL( "unreachable" );
@@ -1018,10 +1018,10 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
         {
             OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -1044,10 +1044,10 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
         {
             OSL_FAIL( "Wrong argument count!" );
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -1161,10 +1161,10 @@ void ODocumentDefinition::onCommandInsert( const OUString& _sURL, const Referenc
 
         Sequence<OUString> aProps { PROPERTY_URL };
         ucbhelper::cancelCommandExecution(
-            MissingPropertiesException(
+            makeAny( MissingPropertiesException(
                                 OUString(),
                                 static_cast< cppu::OWeakObject * >( this ),
-                                aProps ),
+                                aProps ) ),
             Environment );
         // Unreachable
     }
diff --git a/include/ucbhelper/cancelcommandexecution.hxx b/include/ucbhelper/cancelcommandexecution.hxx
index 95c78c2..381d63c 100644
--- a/include/ucbhelper/cancelcommandexecution.hxx
+++ b/include/ucbhelper/cancelcommandexecution.hxx
@@ -53,7 +53,7 @@ namespace ucbhelper
 
     @throws css::uno::Exception
  */
-UCBHELPER_DLLPUBLIC void cancelCommandExecution( const css::uno::Exception & rException,
+UCBHELPER_DLLPUBLIC void cancelCommandExecution( const css::uno::Any & rException,
                              const css::uno::Reference<
                                 css::ucb::XCommandEnvironment > &
                                     xEnv );
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 9449061..d363044 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -637,10 +637,10 @@ Any SAL_CALL UniversalContentBroker::execute(
             if ( !( aCommand.Argument >>= aArg ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    IllegalArgumentException(
+                    makeAny( IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                     Environment );
                 // Unreachable
             }
@@ -661,10 +661,10 @@ Any SAL_CALL UniversalContentBroker::execute(
         if ( !( aCommand.Argument >>= aCheckinArg ) )
         {
             ucbhelper::cancelCommandExecution(
-                IllegalArgumentException(
+                makeAny( IllegalArgumentException(
                                 "Wrong argument type!",
                                 static_cast< cppu::OWeakObject * >( this ),
-                                -1 ),
+                                -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -677,9 +677,9 @@ Any SAL_CALL UniversalContentBroker::execute(
 
 
         ucbhelper::cancelCommandExecution(
-            UnsupportedCommandException(
+            makeAny( UnsupportedCommandException(
                             OUString(),
-                            static_cast< cppu::OWeakObject * >( this ) ),
+                            static_cast< cppu::OWeakObject * >( this ) ) ),
             Environment );
         // Unreachable
     }
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 20fa1c5..988efa3 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -640,10 +640,10 @@ uno::Reference< ucb::XContent > createNew(
         else
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                         "Unknown transfer operation!",
                                         rContext.xProcessor,
-                                        -1 ),
+                                        -1 ) ),
                               rContext.xOrigEnv );
             // Unreachable
         }
@@ -1027,9 +1027,9 @@ void handleNameClashRename(
     if ( aOldTitle.isEmpty() )
     {
         ucbhelper::cancelCommandExecution(
-            beans::UnknownPropertyException(
+            uno::makeAny( beans::UnknownPropertyException(
                             "Unable to get property 'Title' from new object!",
-                            rContext.xProcessor ),
+                            rContext.xProcessor ) ),
             rContext.xOrigEnv );
         // Unreachable
     }
@@ -1141,10 +1141,11 @@ void handleNameClashRename(
     if ( nTry == 50 )
     {
         ucbhelper::cancelCommandExecution(
+            uno::makeAny(
                 ucb::UnsupportedNameClashException(
                     "Unable to resolve name clash!",
                     rContext.xProcessor,
-                    ucb::NameClash::RENAME ),
+                    ucb::NameClash::RENAME ) ),
             rContext.xOrigEnv );
         // Unreachable
     }
@@ -1162,9 +1163,9 @@ void globalTransfer_(
     if ( !bSourceIsFolder && xSourceProps->wasNull() )
     {
         ucbhelper::cancelCommandExecution(
-            beans::UnknownPropertyException(
+            uno::makeAny( beans::UnknownPropertyException(
                             "Unable to get property 'IsFolder' from source object!",
-                            rContext.xProcessor ),
+                            rContext.xProcessor ) ),
             rContext.xOrigEnv );
         // Unreachable
     }
@@ -1174,9 +1175,9 @@ void globalTransfer_(
     if ( !bSourceIsDocument && xSourceProps->wasNull() )
     {
         ucbhelper::cancelCommandExecution(
-            beans::UnknownPropertyException(
+            uno::makeAny( beans::UnknownPropertyException(
                             "Unable to get property 'IsDocument' from source object!",
-                            rContext.xProcessor ),
+                            rContext.xProcessor ) ),
             rContext.xOrigEnv );
         // Unreachable
     }
@@ -1360,11 +1361,12 @@ void globalTransfer_(
                 case ucb::NameClash::OVERWRITE:
                 {
                     ucbhelper::cancelCommandExecution(
+                        uno::makeAny(
                             ucb::UnsupportedNameClashException(
                                 "BUG: insert + replace == true MUST NOT "
                                 "throw NameClashException.",
                                 rContext.xProcessor,
-                                rContext.aArg.NameClash ),
+                                rContext.aArg.NameClash ) ),
                         rContext.xOrigEnv );
                     SAL_FALLTHROUGH; // Unreachable
                 }
@@ -1455,11 +1457,12 @@ void globalTransfer_(
                 default:
                 {
                     ucbhelper::cancelCommandExecution(
+                        uno::makeAny(
                             ucb::UnsupportedNameClashException(
                                 "default action, don't know how to "
                                 "handle name clash",
                                 rContext.xProcessor,
-                                rContext.aArg.NameClash ),
+                                rContext.aArg.NameClash ) ),
                         rContext.xOrigEnv );
                     // Unreachable
                 }
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index fbc0e07..6818f6d 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -592,11 +592,11 @@ namespace cmis
         return bIsFolder;
     }
 
-    lang::IllegalArgumentException Content::getBadArgExcept()
+    uno::Any Content::getBadArgExcept()
     {
-        return lang::IllegalArgumentException(
+        return uno::makeAny( lang::IllegalArgumentException(
             "Wrong argument type!",
-            static_cast< cppu::OWeakObject * >( this ), -1);
+            static_cast< cppu::OWeakObject * >( this ), -1) );
     }
 
     libcmis::ObjectPtr Content::updateProperties(
@@ -980,12 +980,13 @@ namespace cmis
         {
             uno::Sequence< uno::Any > aArgs( 1 );
             aArgs[ 0 ] <<= m_xIdentifier->getContentIdentifier();
-
-            ucbhelper::cancelCommandExecution(
+            uno::Any aErr = uno::makeAny(
                 ucb::InteractiveAugmentedIOException(OUString(), static_cast< cppu::OWeakObject * >( this ),
                     task::InteractionClassification_ERROR,
-                    bIsFolder ? ucb::IOErrorCode_NOT_EXISTING_PATH : ucb::IOErrorCode_NOT_EXISTING, aArgs),
-                xEnv);
+                    bIsFolder ? ucb::IOErrorCode_NOT_EXISTING_PATH : ucb::IOErrorCode_NOT_EXISTING, aArgs)
+            );
+
+            ucbhelper::cancelCommandExecution(aErr, xEnv);
         }
 
         uno::Any aRet;
@@ -1010,9 +1011,9 @@ namespace cmis
                )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedOpenModeException
+                    uno::makeAny ( ucb::UnsupportedOpenModeException
                         ( OUString(), static_cast< cppu::OWeakObject * >( this ),
-                          sal_Int16( rOpenCommand.Mode ) ),
+                          sal_Int16( rOpenCommand.Mode ) ) ),
                         xEnv );
             }
 
@@ -1024,9 +1025,9 @@ namespace cmis
                 SAL_INFO( "ucb.ucp.cmis", "Failed to copy data to sink" );
 
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedDataSinkException
+                    uno::makeAny (ucb::UnsupportedDataSinkException
                         ( OUString(), static_cast< cppu::OWeakObject * >( this ),
-                          rOpenCommand.Sink ),
+                          rOpenCommand.Sink ) ),
                         xEnv );
             }
         }
@@ -1269,9 +1270,10 @@ namespace cmis
             if ( sSrcBindingUrl != m_aURL.getBindingUrl( ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::InteractiveBadTransferURLException(
+                    uno::makeAny(
+                        ucb::InteractiveBadTransferURLException(
                             "Unsupported URL scheme!",
-                            static_cast< cppu::OWeakObject * >( this ) ),
+                            static_cast< cppu::OWeakObject * >( this ) ) ),
                     xEnv );
             }
         }
@@ -1285,9 +1287,9 @@ namespace cmis
     {
         if ( !xInputStream.is() )
         {
-            ucbhelper::cancelCommandExecution(
-                ucb::MissingInputStreamException
-                  ( OUString(), static_cast< cppu::OWeakObject * >( this ) ),
+            ucbhelper::cancelCommandExecution( uno::makeAny
+                ( ucb::MissingInputStreamException
+                  ( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ),
                 xEnv );
         }
 
@@ -1312,9 +1314,9 @@ namespace cmis
                 map< string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" );
                 if ( it == m_pObjectProps.end( ) )
                 {
-                    ucbhelper::cancelCommandExecution(
-                        uno::RuntimeException( "Missing name property",
-                            static_cast< cppu::OWeakObject * >( this ) ),
+                    ucbhelper::cancelCommandExecution( uno::makeAny
+                        ( uno::RuntimeException( "Missing name property",
+                            static_cast< cppu::OWeakObject * >( this ) ) ),
                         xEnv );
                 }
                 string newName = it->second->getStrings( ).front( );
@@ -1340,9 +1342,9 @@ namespace cmis
                     // Are the base type matching?
                     if ( object->getBaseType( ) != m_pObjectType->getBaseType( )->getId() )
                     {
-                        ucbhelper::cancelCommandExecution(
-                            uno::RuntimeException( "Can't change a folder into a document and vice-versa.",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                        ucbhelper::cancelCommandExecution( uno::makeAny
+                            ( uno::RuntimeException( "Can't change a folder into a document and vice-versa.",
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
                             xEnv );
                     }
 
@@ -1359,9 +1361,9 @@ namespace cmis
                         }
                         catch ( const libcmis::Exception& )
                         {
-                            ucbhelper::cancelCommandExecution(
-                                uno::RuntimeException( "Error when setting document content",
-                                    static_cast< cppu::OWeakObject * >( this ) ),
+                            ucbhelper::cancelCommandExecution( uno::makeAny
+                                ( uno::RuntimeException( "Error when setting document content",
+                                    static_cast< cppu::OWeakObject * >( this ) ) ),
                                 xEnv );
                         }
                     }
@@ -1381,9 +1383,9 @@ namespace cmis
                         }
                         catch ( const libcmis::Exception& )
                         {
-                            ucbhelper::cancelCommandExecution(
-                                uno::RuntimeException( "Error when creating folder",
-                                    static_cast< cppu::OWeakObject * >( this ) ),
+                            ucbhelper::cancelCommandExecution( uno::makeAny
+                                ( uno::RuntimeException( "Error when creating folder",
+                                    static_cast< cppu::OWeakObject * >( this ) ) ),
                                 xEnv );
                         }
                     }
@@ -1399,9 +1401,9 @@ namespace cmis
                         }
                         catch ( const libcmis::Exception& )
                         {
-                            ucbhelper::cancelCommandExecution(
-                                uno::RuntimeException( "Error when creating document",
-                                    static_cast< cppu::OWeakObject * >( this ) ),
+                            ucbhelper::cancelCommandExecution( uno::makeAny
+                                ( uno::RuntimeException( "Error when creating document",
+                                    static_cast< cppu::OWeakObject * >( this ) ) ),
                                 xEnv );
                         }
                     }
@@ -1883,10 +1885,10 @@ namespace cmis
         {
             SAL_INFO( "ucb.ucp.cmis", "Unknown command to execute" );
 
-            ucbhelper::cancelCommandExecution(
-                ucb::UnsupportedCommandException
+            ucbhelper::cancelCommandExecution
+                ( uno::makeAny( ucb::UnsupportedCommandException
                   ( OUString(),
-                    static_cast< cppu::OWeakObject * >( this ) ),
+                    static_cast< cppu::OWeakObject * >( this ) ) ),
                   xEnv );
         }
 
diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx
index 357845c..366b1a4 100644
--- a/ucb/source/ucp/cmis/cmis_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_content.hxx
@@ -81,7 +81,7 @@ private:
     void setCmisProperty(const std::string& rName, const std::string& rValue,
             const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
 
-    css::lang::IllegalArgumentException getBadArgExcept();
+    css::uno::Any getBadArgExcept();
 
     css::uno::Reference< css::sdbc::XRow >
         getPropertyValues(
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 552532b..f130b83 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -69,11 +69,11 @@ namespace cmis
     {
     }
 
-    lang::IllegalArgumentException RepoContent::getBadArgExcept()
+    uno::Any RepoContent::getBadArgExcept()
     {
-        return lang::IllegalArgumentException(
+        return uno::makeAny( lang::IllegalArgumentException(
             "Wrong argument type!",
-            static_cast< cppu::OWeakObject * >( this ), -1);
+            static_cast< cppu::OWeakObject * >( this ), -1) );
     }
 
     uno::Reference< sdbc::XRow > RepoContent::getPropertyValues(
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.hxx b/ucb/source/ucp/cmis/cmis_repo_content.hxx
index 2ce3b5d..4be969e 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.hxx
@@ -57,7 +57,7 @@ private:
 
 private:
 
-    css::lang::IllegalArgumentException getBadArgExcept();
+    css::uno::Any getBadArgExcept();
 
     css::uno::Reference< css::sdbc::XRow >
         getPropertyValues(
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 562d810..950a953 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -191,8 +191,8 @@ namespace ucb { namespace ucp { namespace ext
             Sequence< Property > Properties;
             if ( !( aCommand.Argument >>= Properties ) )
             {
-                ::ucbhelper::cancelCommandExecution( IllegalArgumentException(
-                    OUString(), *this, -1 ),
+                ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+                    OUString(), *this, -1 ) ),
                     i_rEvironment );
                 // unreachable
             }
@@ -204,16 +204,16 @@ namespace ucb { namespace ucp { namespace ext
             Sequence< PropertyValue > aProperties;
             if ( !( aCommand.Argument >>= aProperties ) )
             {
-                ::ucbhelper::cancelCommandExecution( IllegalArgumentException(
-                    OUString(), *this, -1 ),
+                ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+                    OUString(), *this, -1 ) ),
                     i_rEvironment );
                 // unreachable
             }
 
             if ( !aProperties.getLength() )
             {
-                ::ucbhelper::cancelCommandExecution( IllegalArgumentException(
-                    OUString(), *this, -1 ),
+                ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+                    OUString(), *this, -1 ) ),
                     i_rEvironment );
                 // unreachable
             }
@@ -235,8 +235,8 @@ namespace ucb { namespace ucp { namespace ext
             OpenCommandArgument2 aOpenCommand;
               if ( !( aCommand.Argument >>= aOpenCommand ) )
             {
-                ::ucbhelper::cancelCommandExecution( IllegalArgumentException(
-                    OUString(), *this, -1 ),
+                ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+                    OUString(), *this, -1 ) ),
                     i_rEvironment );
                 // unreachable
             }
@@ -263,8 +263,8 @@ namespace ucb { namespace ucp { namespace ext
 
         else
         {
-            ::ucbhelper::cancelCommandExecution( UnsupportedCommandException(
-                OUString(), *this ),
+            ::ucbhelper::cancelCommandExecution( makeAny( UnsupportedCommandException(
+                OUString(), *this ) ),
                 i_rEvironment );
             // unreachable
         }
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 782407b..32010eb 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -245,11 +245,13 @@ namespace fileaccess {
         bool isHandled )
     {
         Reference<XCommandProcessor> xComProc(pContent);
+        Any aAny;
         IOErrorCode ioErrorCode;
 
         if( errorCode ==  TASKHANDLER_UNSUPPORTED_COMMAND )
         {
-            cancelCommandExecution( UnsupportedCommandException( OSL_LOG_PREFIX ), xEnv );
+            aAny <<= UnsupportedCommandException( OSL_LOG_PREFIX );
+            cancelCommandExecution( aAny,xEnv );
         }
         else if( errorCode == TASKHANDLING_WRONG_SETPROPERTYVALUES_ARGUMENT ||
                  errorCode == TASKHANDLING_WRONG_GETPROPERTYVALUES_ARGUMENT ||
@@ -261,13 +263,13 @@ namespace fileaccess {
         {
             IllegalArgumentException excep;
             excep.ArgumentPosition = 0;
-            cancelCommandExecution(excep, xEnv);
+            cancelCommandExecution(Any(excep), xEnv);
         }
         else if( errorCode == TASKHANDLING_UNSUPPORTED_OPEN_MODE )
         {
             UnsupportedOpenModeException excep;
             excep.Mode = sal::static_int_cast< sal_Int16 >(minorCode);
-            cancelCommandExecution( excep,xEnv );
+            cancelCommandExecution( Any(excep),xEnv );
         }
         else if(errorCode == TASKHANDLING_DELETED_STATE_IN_OPEN_COMMAND  ||
                 errorCode == TASKHANDLING_INSERTED_STATE_IN_OPEN_COMMAND ||
@@ -503,12 +505,11 @@ namespace fileaccess {
                 OUString("Title")               :
                 OUString("ContentType");
 
-            cancelCommandExecution(
-                MissingPropertiesException(
-                    "a property is missing, necessary to create a content",
-                    xComProc,
-                    aSeq),
-                xEnv);
+            aAny <<= MissingPropertiesException(
+                "a property is missing, necessary to create a content",
+                xComProc,
+                aSeq);
+            cancelCommandExecution(aAny,xEnv);
         }
         else if( errorCode == TASKHANDLING_FILESIZE_FOR_WRITE )
         {
@@ -534,11 +535,11 @@ namespace fileaccess {
         }
         else if(errorCode == TASKHANDLING_INPUTSTREAM_FOR_WRITE)
         {
-            cancelCommandExecution(
+            aAny <<=
                 MissingInputStreamException(
                     "the inputstream is missing, necessary to create a content",
-                    xComProc),
-                xEnv);
+                    xComProc);
+            cancelCommandExecution(aAny,xEnv);
         }
         else if( errorCode == TASKHANDLING_NOREPLACE_FOR_WRITE )
             // Overwrite = false and file exists
@@ -548,7 +549,7 @@ namespace fileaccess {
             excep.Classification = InteractionClassification_ERROR;
             excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
             excep.Message = "file exists and overwrite forbidden";
-            cancelCommandExecution( excep, xEnv );
+            cancelCommandExecution( Any(excep), xEnv );
         }
         else if( errorCode == TASKHANDLING_INVALID_NAME_MKDIR )
         {
@@ -572,7 +573,7 @@ namespace fileaccess {
             if(isHandled)
                 throw excep;
             else {
-                cancelCommandExecution( excep, xEnv );
+                cancelCommandExecution( Any(excep), xEnv );
             }
 //              ioErrorCode = IOErrorCode_INVALID_CHARACTER;
 //              cancelCommandExecution(
@@ -592,7 +593,7 @@ namespace fileaccess {
             if(isHandled)
                 throw excep;
             else {
-                cancelCommandExecution( excep, xEnv );
+                cancelCommandExecution( Any(excep), xEnv );
             }
 //              ioErrorCode = IOErrorCode_ALREADY_EXISTING;
 //              cancelCommandExecution(
@@ -778,11 +779,10 @@ namespace fileaccess {
         }
         else if( errorCode == TASKHANDLING_TRANSFER_INVALIDSCHEME )
         {
-            cancelCommandExecution(
-                InteractiveBadTransferURLException(
+            aAny <<= InteractiveBadTransferURLException(
                         "bad transfer url",
-                        xComProc),
-                xEnv );
+                        xComProc);
+            cancelCommandExecution( aAny,xEnv );
         }
         else if( errorCode == TASKHANDLING_OVERWRITE_FOR_MOVE      ||
                  errorCode == TASKHANDLING_OVERWRITE_FOR_COPY      ||
@@ -845,7 +845,7 @@ namespace fileaccess {
             excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
             excep.Message = "name clash during copy or move";
 
-            cancelCommandExecution(excep, xEnv);
+            cancelCommandExecution(Any(excep), xEnv);
         }
         else if( errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_MOVE   ||
                  errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_COPY )
@@ -855,7 +855,7 @@ namespace fileaccess {
             excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
             excep.Message = "name clash value not supported during copy or move";
 
-            cancelCommandExecution(excep, xEnv);
+            cancelCommandExecution(Any(excep), xEnv);
         }
         else
         {
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 846a612..6fcea52 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -296,6 +296,21 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                 aRet = p->getRequest();
             }
 
+//              if(aCommand.Name.equalsAscii(
+//                  "getPropertyValues") &&
+//                 action != NOACTION) {
+//                  // It is not allowed to throw if
+//                  // command is getPropertyValues
+//                  rtl::Reference<ucbhelper::PropertyValueSet> xRow =
+//                      new ucbhelper::PropertyValueSet(m_xSMgr);
+//                  Sequence<Property> Properties;
+//                  aCommand.Argument >>= Properties;
+//                  for(int i = 0; i < Properties.getLength(); ++i)
+//                      xRow->appendVoid(Properties[i]);
+//                  aRet <<= Reference<XRow>(xRow.get());
+//                  return aRet;
+//              }
+
             switch (action)
             {
             case NOACTION:
@@ -303,7 +318,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
 
             case THROWAUTHENTICATIONREQUEST:
                 ucbhelper::cancelCommandExecution(
-                    aRet.get<css::uno::Exception>(),
+                    aRet,
                     Reference<XCommandEnvironment>(nullptr));
                 break;
 
@@ -326,8 +341,9 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                 {
                     InteractiveNetworkConnectException excep;
                     excep.Server = m_aFTPURL.host();
+                    aRet <<= excep;
                     ucbhelper::cancelCommandExecution(
-                        excep,
+                        aRet,
                         Environment);
                     break;
                 }
@@ -335,8 +351,9 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                 {
                     InteractiveNetworkResolveNameException excep;
                     excep.Server = m_aFTPURL.host();
+                    aRet <<= excep;
                     ucbhelper::cancelCommandExecution(
-                        excep,
+                        aRet,
                         Environment);
                     break;
                 }
@@ -368,12 +385,11 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                 Sequence<Property> Properties;
                 if(!(aCommand.Argument >>= Properties))
                 {
-                    ucbhelper::cancelCommandExecution(
-                        IllegalArgumentException(
+                    aRet <<= IllegalArgumentException(
                                 "Wrong argument type!",
                                 static_cast< cppu::OWeakObject * >(this),
-                                -1),
-                        Environment);
+                                -1);
+                    ucbhelper::cancelCommandExecution(aRet,Environment);
                 }
 
                 aRet <<= getPropertyValues(Properties,Environment);
@@ -383,12 +399,11 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                 Sequence<PropertyValue> propertyValues;
 
                 if( ! ( aCommand.Argument >>= propertyValues ) ) {
-                    ucbhelper::cancelCommandExecution(
-                        IllegalArgumentException(
+                    aRet <<= IllegalArgumentException(
                                 "Wrong argument type!",
                                 static_cast< cppu::OWeakObject * >(this),
-                                -1),
-                        Environment);
+                                -1);
+                    ucbhelper::cancelCommandExecution(aRet,Environment);
                 }
 
                 aRet <<= setPropertyValues(propertyValues);
@@ -405,12 +420,11 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
             {
                 InsertCommandArgument aInsertArgument;
                 if ( ! ( aCommand.Argument >>= aInsertArgument ) ) {
-                    ucbhelper::cancelCommandExecution(
-                        IllegalArgumentException(
+                    aRet <<= IllegalArgumentException(
                                 "Wrong argument type!",
                                 static_cast< cppu::OWeakObject * >(this),
-                                -1),
-                        Environment);
+                                -1);
+                    ucbhelper::cancelCommandExecution(aRet,Environment);
                 }
                 insert(aInsertArgument,Environment);
             }
@@ -421,12 +435,12 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
             else if(aCommand.Name == "open") {
                 OpenCommandArgument2 aOpenCommand;
                 if ( !( aCommand.Argument >>= aOpenCommand ) ) {
-                    ucbhelper::cancelCommandExecution(
-                        IllegalArgumentException(
+                    aRet <<= IllegalArgumentException(
                                 "Wrong argument type!",
                                 static_cast< cppu::OWeakObject * >(this),
-                                -1),
-                        Environment);
+                                -1);
+
+                    ucbhelper::cancelCommandExecution(aRet,Environment);
                 }
 
                 if(aOpenCommand.Mode == OpenMode::DOCUMENT) {
@@ -477,12 +491,11 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                         }
                     }
                     else {
-                        ucbhelper::cancelCommandExecution(
-                            UnsupportedDataSinkException(
-                                OUString(),
-                                static_cast< cppu::OWeakObject * >(this),
-                                aOpenCommand.Sink),
-                            Environment);
+                        aRet <<= UnsupportedDataSinkException(
+                            OUString(),
+                            static_cast< cppu::OWeakObject * >(this),
+                            aOpenCommand.Sink);
+                        ucbhelper::cancelCommandExecution(aRet,Environment);
                     }
                 }
                 else if(aOpenCommand.Mode == OpenMode::ALL ||
@@ -505,39 +518,38 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                         aOpenCommand.Mode ==
                         OpenMode::DOCUMENT_SHARE_DENY_WRITE) {
                     // Unsupported OpenMode
-                    ucbhelper::cancelCommandExecution(
-                        UnsupportedOpenModeException(
-                            OUString(),
-                            static_cast< cppu::OWeakObject * >(this),
-                            static_cast< sal_Int16 >(aOpenCommand.Mode)),
-                        Environment);
+                    aRet <<= UnsupportedOpenModeException(
+                        OUString(),
+                        static_cast< cppu::OWeakObject * >(this),
+                        static_cast< sal_Int16 >(aOpenCommand.Mode));
+                    ucbhelper::cancelCommandExecution(aRet,Environment);
                 }
                 else {
-                    ucbhelper::cancelCommandExecution(
-                        IllegalArgumentException(
+                    aRet <<= IllegalArgumentException(
                                 "Unexpected OpenMode!",
                                 static_cast< cppu::OWeakObject * >(this),
-                                -1),
-                        Environment);
+                                -1);
+
+                    ucbhelper::cancelCommandExecution(aRet,Environment);
                 }
             } else if(aCommand.Name == "createNewContent") {
                 ContentInfo aArg;
                 if (!(aCommand.Argument >>= aArg)) {
                     ucbhelper::cancelCommandExecution(
-                        IllegalArgumentException(
+                        makeAny(
+                            IllegalArgumentException(
                                 "Wrong argument type!",
                                 static_cast< cppu::OWeakObject * >(this),
-                                -1),
+                                -1)),
                         Environment);
                     // Unreachable
                 }
                 aRet <<= createNewContent(aArg);
             } else {
-                ucbhelper::cancelCommandExecution(
-                    UnsupportedCommandException(
-                        aCommand.Name,
-                        static_cast< cppu::OWeakObject * >(this)),
-                    Environment);
+                aRet <<= UnsupportedCommandException(
+                    aCommand.Name,
+                    static_cast< cppu::OWeakObject * >(this));
+                ucbhelper::cancelCommandExecution(aRet,Environment);
             }
 
             return aRet;
@@ -676,7 +688,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
         MissingPropertiesException excep;
         excep.Properties.realloc(1);
         excep.Properties[0] = "Title";
-        ucbhelper::cancelCommandExecution(excep, Env);
+        ucbhelper::cancelCommandExecution(Any(excep), Env);
     }
 
     if(m_bInserted &&
@@ -684,7 +696,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
        !aInsertCommand.Data.is())
     {
         MissingInputStreamException excep;
-        ucbhelper::cancelCommandExecution(excep, Env);
+        ucbhelper::cancelCommandExecution(Any(excep), Env);
     }
 
     bool bReplace(aInsertCommand.ReplaceExisting);
@@ -702,7 +714,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
             // Deprecated, not used anymore:
             NameClashException excep;
             excep.Name = m_aFTPURL.child();
-            ucbhelper::cancelCommandExecution(excep, Env);
+            ucbhelper::cancelCommandExecution(Any(excep), Env);
         } else if(e.code() == FOLDER_MIGHT_EXIST_DURING_INSERT ||
                   e.code() == FILE_MIGHT_EXIST_DURING_INSERT) {
             // Interact
@@ -714,7 +726,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
             excep.NameClash = 0; //NameClash::ERROR;
 
             if(!xInt.is()) {
-                ucbhelper::cancelCommandExecution(excep, Env);
+                ucbhelper::cancelCommandExecution(Any(excep), Env);
             }
 
             XInteractionRequestImpl request;
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index 61d8c0a..a6467d5 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -139,13 +139,13 @@ OUString SAL_CALL Content::getContentType()
 
 #define EXCEPT(aExcept) \
 do { \
-    aRet.reset(new aExcept); \
-    if (bThrow) throw *aRet;\
+    if (bThrow) throw aExcept;\
+    aRet = uno::makeAny( aExcept );\
 } while(false)
 
-std::unique_ptr<uno::Exception> convertToException(GError *pError, const uno::Reference< uno::XInterface >& rContext, bool bThrow)
+uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterface >& rContext, bool bThrow)
 {
-    std::unique_ptr<uno::Exception> aRet;
+    uno::Any aRet;
 
     gint eCode = pError->code;
     OUString sMessage(pError->message, strlen(pError->message), RTL_TEXTENCODING_UTF8);
@@ -160,88 +160,108 @@ std::unique_ptr<uno::Exception> convertToException(GError *pError, const uno::Re
     switch (eCode)
     {
         case G_IO_ERROR_FAILED:
-            EXCEPT(io::IOException(sMessage, rContext));
+            { io::IOException aExcept(sMessage, rContext);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_NOT_MOUNTED:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING_PATH, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING_PATH, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_NOT_FOUND:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_EXISTS:
-            EXCEPT( ucb::NameClashException(sMessage, rContext,
-                task::InteractionClassification_ERROR, sName));
+            { ucb::NameClashException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, sName);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_INVALID_ARGUMENT:
-            EXCEPT( lang::IllegalArgumentException(sMessage, rContext, -1 ) );
+            { lang::IllegalArgumentException aExcept(sMessage, rContext, -1 );
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_PERMISSION_DENIED:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_ACCESS_DENIED, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_ACCESS_DENIED, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_IS_DIRECTORY:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_NOT_REGULAR_FILE:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_NOT_DIRECTORY:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_DIRECTORY, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_DIRECTORY, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_FILENAME_TOO_LONG:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_NAME_TOO_LONG, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_NAME_TOO_LONG, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_PENDING:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_PENDING, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_PENDING, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_CLOSED:
         case G_IO_ERROR_CANCELLED:
         case G_IO_ERROR_TOO_MANY_LINKS:
         case G_IO_ERROR_WRONG_ETAG:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_GENERAL, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_GENERAL, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_NOT_SUPPORTED:
         case G_IO_ERROR_CANT_CREATE_BACKUP:
         case G_IO_ERROR_WOULD_MERGE:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_SUPPORTED, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_SUPPORTED, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_NO_SPACE:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_OUT_OF_DISK_SPACE, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_OUT_OF_DISK_SPACE, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_INVALID_FILENAME:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_INVALID_CHARACTER, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_INVALID_CHARACTER, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_READ_ONLY:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_WRITE_PROTECTED, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_WRITE_PROTECTED, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_TIMED_OUT:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_DEVICE_NOT_READY, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_DEVICE_NOT_READY, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_WOULD_RECURSE:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_RECURSIVE, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_RECURSIVE, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_BUSY:
         case G_IO_ERROR_WOULD_BLOCK:
-            EXCEPT( ucb::InteractiveAugmentedIOException(sMessage, rContext,
-                task::InteractionClassification_ERROR, ucb::IOErrorCode_LOCKING_VIOLATION, aArgs));
+            { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, ucb::IOErrorCode_LOCKING_VIOLATION, aArgs);
+            EXCEPT(aExcept); }
             break;
         case G_IO_ERROR_HOST_NOT_FOUND:
-            EXCEPT( ucb::InteractiveNetworkResolveNameException(sMessage, rContext,
-                task::InteractionClassification_ERROR, sHost));
+            { ucb::InteractiveNetworkResolveNameException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR, sHost);
+              EXCEPT(aExcept);}
             break;
         default:
         case G_IO_ERROR_ALREADY_MOUNTED:
@@ -249,8 +269,9 @@ std::unique_ptr<uno::Exception> convertToException(GError *pError, const uno::Re
         case G_IO_ERROR_NOT_SYMBOLIC_LINK:
         case G_IO_ERROR_NOT_MOUNTABLE_FILE:
         case G_IO_ERROR_FAILED_HANDLED:
-            EXCEPT( ucb::InteractiveNetworkGeneralException(sMessage, rContext,
-                task::InteractionClassification_ERROR));
+            { ucb::InteractiveNetworkGeneralException aExcept(sMessage, rContext,
+                task::InteractionClassification_ERROR);
+              EXCEPT(aExcept);}
             break;
     }
     return aRet;
@@ -279,19 +300,19 @@ void convertToIOException(GError *pError, const uno::Reference< uno::XInterface
     }
 }
 
-std::unique_ptr<uno::Exception> Content::mapGIOError( GError *pError )
+uno::Any Content::mapGIOError( GError *pError )
 {
     if (!pError)
-        return std::unique_ptr<uno::Exception>(new lang::IllegalArgumentException(getBadArgExcept()));
+        return getBadArgExcept();
 
     return convertToException(pError, static_cast< cppu::OWeakObject * >(this), false);
 }
 
-lang::IllegalArgumentException Content::getBadArgExcept()
+uno::Any Content::getBadArgExcept()
 {
-    return lang::IllegalArgumentException(
+    return uno::makeAny( lang::IllegalArgumentException(
         "Wrong argument type!",
-        static_cast< cppu::OWeakObject * >( this ), -1);
+        static_cast< cppu::OWeakObject * >( this ), -1) );
 }
 
 class MountOperation
@@ -635,7 +656,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
     else
     {
         if (!mbTransient)
-            ucbhelper::cancelCommandExecution(*mapGIOError(pError), xEnv);
+            ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv);
         else
         {
             if (pError)
@@ -724,7 +745,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
             if ((bOk = doSetFileInfo(pNewInfo)))
             {
                 for (sal_Int32 i = 0; i < nChanged; ++i)
-                    aRet[ i ] = uno::Any(getBadArgExcept());
+                    aRet[ i ] = getBadArgExcept();
             }
         }
 
@@ -838,11 +859,13 @@ uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand,
     {
         uno::Sequence< uno::Any > aArgs( 1 );
         aArgs[ 0 ] <<= m_xIdentifier->getContentIdentifier();
-        ucbhelper::cancelCommandExecution(
+        uno::Any aErr = uno::makeAny(
             ucb::InteractiveAugmentedIOException(OUString(), static_cast< cppu::OWeakObject * >( this ),
                 task::InteractionClassification_ERROR,
-                bIsFolder ? ucb::IOErrorCode_NOT_EXISTING_PATH : ucb::IOErrorCode_NOT_EXISTING, aArgs),
-            xEnv);
+                bIsFolder ? ucb::IOErrorCode_NOT_EXISTING_PATH : ucb::IOErrorCode_NOT_EXISTING, aArgs)
+        );
+
+        ucbhelper::cancelCommandExecution(aErr, xEnv);
     }
 
     uno::Any aRet;
@@ -867,10 +890,10 @@ uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand,
            )
         {
             ucbhelper::cancelCommandExecution(
-                ucb::UnsupportedOpenModeException
+                uno::makeAny ( ucb::UnsupportedOpenModeException
                     ( OUString(), static_cast< cppu::OWeakObject * >( this ),
-                      sal_Int16( rOpenCommand.Mode ) ),
-                xEnv );
+                      sal_Int16( rOpenCommand.Mode ) ) ),
+                    xEnv );
         }
 
         if ( !feedSink( rOpenCommand.Sink, xEnv ) )
@@ -881,10 +904,10 @@ uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand,
             SAL_WARN("ucb.ucp.gio", "Failed to load data from '" << m_xIdentifier->getContentIdentifier() << "'");
 
             ucbhelper::cancelCommandExecution(
-                ucb::UnsupportedDataSinkException(
-                    OUString(), static_cast< cppu::OWeakObject * >( this ),
-                    rOpenCommand.Sink ),
-                xEnv );
+                uno::makeAny (ucb::UnsupportedDataSinkException
+                    ( OUString(), static_cast< cppu::OWeakObject * >( this ),
+                      rOpenCommand.Sink ) ),
+                    xEnv );
         }
     }
     else
@@ -961,7 +984,7 @@ uno::Any SAL_CALL Content::execute(
         {
             GError *pError = nullptr;
             if (!g_file_delete( getGFile(), nullptr, &pError))
-                ucbhelper::cancelCommandExecution(*mapGIOError(pError), xEnv);
+                ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv);
         }
 
         destroy( bDeletePhysical );
@@ -971,9 +994,9 @@ uno::Any SAL_CALL Content::execute(
         SAL_WARN("ucb.ucp.gio", "Unknown command " << aCommand.Name << "\n");
 
         ucbhelper::cancelCommandExecution
-            ( ucb::UnsupportedCommandException
+            ( uno::makeAny( ucb::UnsupportedCommandException
               ( OUString(),
-                static_cast< cppu::OWeakObject * >( this ) ),
+                static_cast< cppu::OWeakObject * >( this ) ) ),
               xEnv );
     }
 
@@ -1011,15 +1034,15 @@ void Content::insert(const uno::Reference< io::XInputStream > &xInputStream,
     {
         SAL_INFO("ucb.ucp.gio", "Make directory");
         if( !g_file_make_directory( getGFile(), nullptr, &pError))
-            ucbhelper::cancelCommandExecution(*mapGIOError(pError), xEnv);
+            ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv);
         return;
     }
 
     if ( !xInputStream.is() )
     {
-        ucbhelper::cancelCommandExecution(
-            ucb::MissingInputStreamException
-              ( OUString(), static_cast< cppu::OWeakObject * >( this ) ),
+        ucbhelper::cancelCommandExecution( uno::makeAny
+            ( ucb::MissingInputStreamException
+              ( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
     }
 
@@ -1027,12 +1050,12 @@ void Content::insert(const uno::Reference< io::XInputStream > &xInputStream,
     if ( bReplaceExisting )
     {
         if (!(pOutStream = g_file_replace(getGFile(), nullptr, false, G_FILE_CREATE_PRIVATE, nullptr, &pError)))
-            ucbhelper::cancelCommandExecution(*mapGIOError(pError), xEnv);
+            ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv);
     }
     else
     {
         if (!(pOutStream = g_file_create (getGFile(), G_FILE_CREATE_PRIVATE, nullptr, &pError)))
-            ucbhelper::cancelCommandExecution(*mapGIOError(pError), xEnv);
+            ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv);
     }
 
     uno::Reference < io::XOutputStream > xOutput = new ::gio::OutputStream(pOutStream);
@@ -1071,7 +1094,7 @@ void Content::transfer( const ucb::TransferInfo& aTransferInfo, const uno::Refer
     g_object_unref(pSource);
     g_object_unref(pDest);
     if (!bSuccess)
-        ucbhelper::cancelCommandExecution(*mapGIOError(pError), xEnv);
+        ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv);
 }
 
 uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo(
diff --git a/ucb/source/ucp/gio/gio_content.hxx b/ucb/source/ucp/gio/gio_content.hxx
index d76de9d..366eb72 100644
--- a/ucb/source/ucp/gio/gio_content.hxx
+++ b/ucb/source/ucp/gio/gio_content.hxx
@@ -53,7 +53,7 @@ namespace gio
 #define GIO_FILE_TYPE   "application/vnd.sun.staroffice.gio-file"
 #define GIO_FOLDER_TYPE "application/vnd.sun.staroffice.gio-folder"
 
-std::unique_ptr<css::uno::Exception> convertToException(GError *pError,
+css::uno::Any convertToException(GError *pError,
     const css::uno::Reference< css::uno::XInterface >& rContext, bool bThrow=true);
 /// @throws css::io::IOException
 /// @throws css::uno::RuntimeException
@@ -73,8 +73,8 @@ private:
         GError **ppError=nullptr);
     bool isFolder(const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv);
 
-    std::unique_ptr<css::uno::Exception> mapGIOError( GError *error );
-    css::lang::IllegalArgumentException getBadArgExcept();
+    css::uno::Any mapGIOError( GError *error );
+    css::uno::Any getBadArgExcept();
 
     css::uno::Reference< css::sdbc::XRow >
         getPropertyValues(
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 08be764..db8da99 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(
-                lang::IllegalArgumentException(
+                uno::makeAny( 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(
-                lang::IllegalArgumentException(
+                uno::makeAny( 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(
-                lang::IllegalArgumentException(
+                uno::makeAny( 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(
-                lang::IllegalArgumentException(
+                uno::makeAny( 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(
-                lang::IllegalArgumentException(
+                uno::makeAny( 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(
-                lang::IllegalArgumentException(
+                uno::makeAny( 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(
-                lang::IllegalArgumentException(
+                uno::makeAny( 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(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( 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(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( 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(
-            ucb::MissingPropertiesException(
+            uno::makeAny( ucb::MissingPropertiesException(
                                 OUString(),
                                 static_cast< cppu::OWeakObject * >( this ),
-                                aProps ),
+                                aProps ) ),
             xEnv );
         // Unreachable
     }
@@ -1391,11 +1391,12 @@ 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
             }
@@ -1423,10 +1424,11 @@ 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
                 }
@@ -1446,10 +1448,11 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
             if ( hasData( xId ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedNameClashException(
+                    uno::makeAny(
+                        ucb::UnsupportedNameClashException(
                                 OUString(),
                                 static_cast< cppu::OWeakObject * >( this ),
-                                nNameClashResolve ),
+                                nNameClashResolve ) ),
                     xEnv );
                 // Unreachable
             }
@@ -1503,9 +1506,9 @@ void HierarchyContent::destroy( bool bDeletePhysical,
     if ( m_eState != PERSISTENT )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 "Not persistent!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1514,9 +1517,9 @@ void HierarchyContent::destroy( bool bDeletePhysical,
     if ( m_eKind == ROOT )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 "Not supported by root folder!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1555,9 +1558,9 @@ void HierarchyContent::transfer(
     if ( m_eState != PERSISTENT )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 "Not persistent!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1566,9 +1569,9 @@ void HierarchyContent::transfer(
     if ( !rInfo.SourceURL.startsWith( HIERARCHY_URL_SCHEME ":/" ) )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::InteractiveBadTransferURLException(
+            uno::makeAny( ucb::InteractiveBadTransferURLException(
                             OUString(),
-                            static_cast< cppu::OWeakObject * >( this ) ),
+                            static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 6f179a8..2fe01f0 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -437,10 +437,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= Properties ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -457,10 +457,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aProperties ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -468,10 +468,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !aProperties.getLength() )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "No properties!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -506,10 +506,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aOpenCommand ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -526,10 +526,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aArg ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -583,10 +583,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aInfo ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -605,10 +605,10 @@ uno::Any SAL_CALL Content::execute(
         {
             OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -648,9 +648,9 @@ uno::Any SAL_CALL Content::execute(
 
 
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 OUString(),
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             Environment );
         // Unreachable
     }
@@ -1418,10 +1418,10 @@ uno::Any Content::open(
         {
             // Currently(?) unsupported.
             ucbhelper::cancelCommandExecution(
-                ucb::UnsupportedOpenModeException(
+                uno::makeAny( ucb::UnsupportedOpenModeException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    sal_Int16( rArg.Mode ) ),
+                                    sal_Int16( rArg.Mode ) ) ),
                 xEnv );
             // Unreachable
         }
@@ -1522,10 +1522,11 @@ uno::Any Content::open(
                 //       implementation. Support for this type of
                 //       sink is optional...
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedDataSinkException(
+                    uno::makeAny(
+                        ucb::UnsupportedDataSinkException(
                                 OUString(),
                                 static_cast< cppu::OWeakObject * >( this ),
-                                rArg.Sink ),
+                                rArg.Sink ) ),
                     xEnv );
                 // Unreachable
             }
@@ -1558,9 +1559,9 @@ void Content::insert(
         if ( !xStream.is() )
         {
             ucbhelper::cancelCommandExecution(
-                ucb::MissingInputStreamException(
+                uno::makeAny( ucb::MissingInputStreamException(
                                 OUString(),
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
                 xEnv );
             // Unreachable
         }
@@ -1585,11 +1586,11 @@ void Content::insert(
             if ( hasData( aNewUri ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::NameClashException(
+                    uno::makeAny( ucb::NameClashException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
                                     task::InteractionClassification_ERROR,
-                                    m_aProps.aTitle ),
+                                    m_aProps.aTitle ) ),
                     xEnv );
                 // Unreachable
             }
@@ -1617,11 +1618,12 @@ void Content::insert(
                 if ( nTry == 1000 )
                 {
                     ucbhelper::cancelCommandExecution(
-                        ucb::UnsupportedNameClashException(
+                        uno::makeAny(
+                            ucb::UnsupportedNameClashException(
                                 "Unable to resolve name clash!",
                                 static_cast< cppu::OWeakObject * >( this ),
-                                nNameClashResolve ),
-                        xEnv );
+                                nNameClashResolve ) ),
+                    xEnv );
                     // Unreachable
                 }
                 else
@@ -1638,10 +1640,11 @@ void Content::insert(
             if ( hasData( aNewUri ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedNameClashException(
+                    uno::makeAny(
+                        ucb::UnsupportedNameClashException(
                             OUString(),
                             static_cast< cppu::OWeakObject * >( this ),
-                            nNameClashResolve ),
+                            nNameClashResolve ) ),
                     xEnv );
                 // Unreachable
             }
@@ -1706,9 +1709,9 @@ void Content::destroy(
     if ( m_eState != PERSISTENT )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 "Not persistent!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1747,9 +1750,9 @@ void Content::transfer(
     if ( m_eState != PERSISTENT )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 "Not persistent!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1760,9 +1763,9 @@ void Content::transfer(
             m_aUri.getUri(), PACKAGE_URL_SCHEME_LENGTH + 3 ) != 0 ) )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::InteractiveBadTransferURLException(
+            uno::makeAny( ucb::InteractiveBadTransferURLException(
                                 OUString(),
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index fdf6331..39fec06 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -362,10 +362,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= Properties ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -382,10 +382,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aProperties ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -393,10 +393,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !aProperties.getLength() )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "No properties!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -429,10 +429,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aOpenCommand ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -449,10 +449,10 @@ uno::Any SAL_CALL Content::execute(
         if ( ( eType != FOLDER ) && ( eType != STREAM ) )
         {
             ucbhelper::cancelCommandExecution(
-                ucb::UnsupportedCommandException(
+                uno::makeAny( ucb::UnsupportedCommandException(
                                 "insert command only supported by "
                                 "folders and streams!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
                 Environment );
             // Unreachable
         }
@@ -464,12 +464,12 @@ uno::Any SAL_CALL Content::execute(
             if ( aParentUri.isDocument() )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedCommandException(
+                    uno::makeAny( ucb::UnsupportedCommandException(
                                     "insert command not supported by "
                                     "streams that are direct children "
                                     "of document root!",
                                     static_cast< cppu::OWeakObject * >(
-                                        this ) ),
+                                        this ) ) ),
                     Environment );
                 // Unreachable
             }
@@ -479,10 +479,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aArg ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -505,11 +505,11 @@ uno::Any SAL_CALL Content::execute(
             if ( ( eType != FOLDER ) && ( eType != STREAM ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedCommandException(
+                    uno::makeAny( ucb::UnsupportedCommandException(
                                     "delete command only supported by "
                                     "folders and streams!",
                                     static_cast< cppu::OWeakObject * >(
-                                        this ) ),
+                                        this ) ) ),
                     Environment );
                 // Unreachable
             }
@@ -555,11 +555,11 @@ uno::Any SAL_CALL Content::execute(
             if ( ( eType != FOLDER ) && ( eType != DOCUMENT ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedCommandException(
+                    uno::makeAny( ucb::UnsupportedCommandException(
                                     "transfer command only supported "
                                     "by folders and documents!",
                                     static_cast< cppu::OWeakObject * >(
-                                        this ) ),
+                                        this ) ) ),
                     Environment );
                 // Unreachable
             }
@@ -570,10 +570,10 @@ uno::Any SAL_CALL Content::execute(
         {
             OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -593,12 +593,12 @@ uno::Any SAL_CALL Content::execute(
             if ( ( eType != FOLDER ) && ( eType != DOCUMENT ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedCommandException(
+                    uno::makeAny( ucb::UnsupportedCommandException(
                                     "createNewContent command only "
                                     "supported by folders and "
                                     "documents!",
                                     static_cast< cppu::OWeakObject * >(
-                                        this ) ),
+                                        this ) ) ),
                     Environment );
                 // Unreachable
             }
@@ -609,10 +609,10 @@ uno::Any SAL_CALL Content::execute(
         {
             OSL_FAIL( "Wrong argument type!" );
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -626,9 +626,9 @@ uno::Any SAL_CALL Content::execute(
 
 
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 OUString(),
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             Environment );
         // Unreachable
     }
@@ -1391,10 +1391,10 @@ uno::Any Content::open(
         {
             // Currently(?) unsupported.
             ucbhelper::cancelCommandExecution(
-                ucb::UnsupportedOpenModeException(
+                uno::makeAny( ucb::UnsupportedOpenModeException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    sal_Int16( rArg.Mode ) ),
+                                    sal_Int16( rArg.Mode ) ) ),
                 xEnv );
             // Unreachable
         }
@@ -1530,10 +1530,11 @@ uno::Any Content::open(
                 else
                 {
                     ucbhelper::cancelCommandExecution(
-                        ucb::UnsupportedDataSinkException(
+                        uno::makeAny(
+                            ucb::UnsupportedDataSinkException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    rArg.Sink ),
+                                    rArg.Sink ) ),
                         xEnv );
                     // Unreachable
                 }
@@ -1584,9 +1585,9 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
         if ( !xData.is() )
         {
             ucbhelper::cancelCommandExecution(
-                ucb::MissingInputStreamException(
+                uno::makeAny( ucb::MissingInputStreamException(
                                 OUString(),
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
                 xEnv );
             // Unreachable
         }
@@ -1609,11 +1610,11 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
             if ( hasData( aNewUri ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::NameClashException(
+                    uno::makeAny( ucb::NameClashException(
                                     OUString(),
                                     static_cast< cppu::OWeakObject * >( this ),
                                     task::InteractionClassification_ERROR,
-                                    m_aProps.getTitle() ),
+                                    m_aProps.getTitle() ) ),
                     xEnv );
                 // Unreachable
             }
@@ -1641,10 +1642,11 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
                 if ( nTry == 1000 )
                 {
                     ucbhelper::cancelCommandExecution(
+                        uno::makeAny(
                             ucb::UnsupportedNameClashException(
                                 "Unable to resolve name clash!",
                                 static_cast< cppu::OWeakObject * >( this ),
-                                nNameClashResolve ),
+                                nNameClashResolve ) ),
                         xEnv );
                     // Unreachable
                 }
@@ -1664,10 +1666,11 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
             if ( hasData( aNewUri ) )
             {
                 ucbhelper::cancelCommandExecution(
-                    ucb::UnsupportedNameClashException(
+                    uno::makeAny(
+                        ucb::UnsupportedNameClashException(
                             OUString(),
                             static_cast< cppu::OWeakObject * >( this ),
-                            nNameClashResolve ),
+                            nNameClashResolve ) ),
                     xEnv );
                 // Unreachable
             }
@@ -1732,9 +1735,9 @@ void Content::destroy( bool bDeletePhysical,
     if ( m_eState != PERSISTENT )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 "Not persistent!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1871,9 +1874,9 @@ void Content::transfer(
     if ( m_eState != PERSISTENT )
     {
         ucbhelper::cancelCommandExecution(
-            ucb::UnsupportedCommandException(
+            uno::makeAny( ucb::UnsupportedCommandException(
                                 "Not persistent!",
-                                static_cast< cppu::OWeakObject * >( this ) ),
+                                static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1884,9 +1887,9 @@ void Content::transfer(
     {
         // Invalid length (to short).
         ucbhelper::cancelCommandExecution(
-            ucb::InteractiveBadTransferURLException(
+            uno::makeAny( ucb::InteractiveBadTransferURLException(
                             OUString(),
-                            static_cast< cppu::OWeakObject * >( this ) ),
+                            static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1898,9 +1901,9 @@ void Content::transfer(
     {
         // Invalid scheme.
         ucbhelper::cancelCommandExecution(
-            ucb::InteractiveBadTransferURLException(
+            uno::makeAny( ucb::InteractiveBadTransferURLException(
                             OUString(),
-                            static_cast< cppu::OWeakObject * >( this ) ),
+                            static_cast< cppu::OWeakObject * >( this ) ) ),
             xEnv );
         // Unreachable
     }
@@ -1910,10 +1913,10 @@ void Content::transfer(
     if ( !aSourceUri.isValid() )
     {
         ucbhelper::cancelCommandExecution(
-            lang::IllegalArgumentException(
+            uno::makeAny( lang::IllegalArgumentException(
                                 "Invalid source URI! Syntax!",
                                 static_cast< cppu::OWeakObject * >( this ),
-                                -1 ),
+                                -1 ) ),
             xEnv );
         // Unreachable
     }
@@ -1921,10 +1924,10 @@ void Content::transfer(
     if ( aSourceUri.isRoot() || aSourceUri.isDocument() )
     {
         ucbhelper::cancelCommandExecution(
-            lang::IllegalArgumentException(
+            uno::makeAny( lang::IllegalArgumentException(
                                 "Invalid source URI! Must describe a folder or stream!",
                                 static_cast< cppu::OWeakObject * >( this ),
-                                -1 ),
+                                -1 ) ),
             xEnv );
         // Unreachable
     }
@@ -1972,13 +1975,13 @@ void Content::transfer(
                 if ( xStorage->isStreamElement( aSourceUri.getDecodedName() ) )
                 {
                     ucbhelper::cancelCommandExecution(
-                        lang::IllegalArgumentException(
+                        uno::makeAny( lang::IllegalArgumentException(
                                         "Invalid source URI! "
                                         "Streams cannot be created as "
                                         "children of document root!",
                                         static_cast< cppu::OWeakObject * >(
                                             this ),
-                                        -1 ),
+                                        -1 ) ),
                         xEnv );
                     // Unreachable
                 }
@@ -2001,10 +2004,10 @@ void Content::transfer(
         if ( !bOK )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Invalid source URI! Unable to determine source type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 xEnv );
             // Unreachable
         }
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index b82ddde..c825798 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -39,7 +39,6 @@
 #include <rtl/uri.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <officecfg/Inet.hxx>
-#include <o3tl/make_unique.hxx>
 #include <ucbhelper/contentidentifier.hxx>
 #include <ucbhelper/propertyvalueset.hxx>
 #include <ucbhelper/simpleinteractionrequest.hxx>
@@ -508,10 +507,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= Properties ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -528,10 +527,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aProperties ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -539,10 +538,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !aProperties.getLength() )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "No properties!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -579,10 +578,10 @@ uno::Any SAL_CALL Content::execute(
         if ( !( aCommand.Argument >>= aTmp ) )
         {
             ucbhelper::cancelCommandExecution(
-                lang::IllegalArgumentException(
+                uno::makeAny( lang::IllegalArgumentException(
                                     "Wrong argument type!",
                                     static_cast< cppu::OWeakObject * >( this ),
-                                    -1 ),
+                                    -1 ) ),
                 Environment );
             // Unreachable
         }
@@ -609,10 +608,10 @@ uno::Any SAL_CALL Content::execute(

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list