diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2001-09-12 09:03:35 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2001-09-12 09:03:35 +0000 |
commit | ee34aa4aabda1c138652a09c84c717cd218e1003 (patch) | |
tree | 36fb04a95260bfa2ad85e9d930555781b6f112cb /ucb | |
parent | 40d36c0e8a6529958bb541e0caf93c6389145f67 (diff) |
#92075# - Adaptions for new (stricter) Solaris Compiler.
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/ucbcmds.cxx | 224 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 88 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 112 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonInputStream.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonInputStream.hxx | 6 |
5 files changed, 222 insertions, 214 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 81066aa90804..452d399d3cad 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ucbcmds.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: sb $ $Date: 2001-08-30 13:01:20 $ + * last change: $Author: kso $ $Date: 2001-09-12 10:03:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -202,8 +202,10 @@ public: // XInterface methods virtual uno::Any SAL_CALL queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ); - virtual void SAL_CALL acquire(); - virtual void SAL_CALL release(); + virtual void SAL_CALL acquire() + throw(); + virtual void SAL_CALL release() + throw(); // XActiveDataSink methods. virtual void SAL_CALL setInputStream( @@ -227,6 +229,7 @@ uno::Any SAL_CALL ActiveDataSink::queryInterface( const uno::Type & rType ) //========================================================================= // virtual void SAL_CALL ActiveDataSink::acquire() + throw() { OWeakObject::acquire(); } @@ -234,6 +237,7 @@ void SAL_CALL ActiveDataSink::acquire() //========================================================================= // virtual void SAL_CALL ActiveDataSink::release() + throw() { OWeakObject::release(); } @@ -273,8 +277,10 @@ public: // XInterface methods virtual uno::Any SAL_CALL queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ); - virtual void SAL_CALL acquire(); - virtual void SAL_CALL release(); + virtual void SAL_CALL acquire() + throw(); + virtual void SAL_CALL release() + throw(); // XCommandInfo methods virtual uno::Sequence< star::ucb::CommandInfo > SAL_CALL getCommands() @@ -332,6 +338,7 @@ uno::Any SAL_CALL CommandProcessorInfo::queryInterface( //========================================================================= // virtual void SAL_CALL CommandProcessorInfo::acquire() + throw() { OWeakObject::acquire(); } @@ -339,6 +346,7 @@ void SAL_CALL CommandProcessorInfo::acquire() //========================================================================= // virtual void SAL_CALL CommandProcessorInfo::release() + throw() { OWeakObject::release(); } @@ -434,16 +442,16 @@ static uno::Reference< star::ucb::XContent > createNew( if ( !xCreator.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_CREATE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Folder")), -1, uno::makeAny(rContext.aArg.TargetURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_CREATE, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Target is no XContentCreator!" ), rContext.xProcessor ); @@ -456,16 +464,16 @@ static uno::Reference< star::ucb::XContent > createNew( sal_Int32 nCount = aTypesInfo.getLength(); if ( !nCount ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_CREATE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Folder")), -1, uno::makeAny(rContext.aArg.TargetURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_CREATE, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "No types creatable!" ), rContext.xProcessor ); @@ -551,17 +559,17 @@ static uno::Reference< star::ucb::XContent > createNew( if ( !xNew.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_CREATE, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Folder")), -1, uno::makeAny(rContext.aArg.TargetURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_CREATE, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "createNewContent failed!" ), @@ -593,16 +601,16 @@ static void transferProperties( if ( !xInfo.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rContext.aArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Unable to get propertyset info from source object!" ), @@ -623,16 +631,16 @@ static void transferProperties( if ( !xRow1.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rContext.aArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Unable to get properties from source object!" ), @@ -912,16 +920,16 @@ static void globalTransfer( bSourceIsLink ); if ( !xNew.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_CREATE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Folder")), -1, uno::makeAny(rContext.aArg.TargetURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_CREATE, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "No matching content type at target!" ), @@ -939,18 +947,18 @@ static void globalTransfer( xNew, uno::UNO_QUERY ); if ( !xCommandProcessorN.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny( xNew->getIdentifier()-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "New content is not a XCommandProcessor!" ), @@ -964,16 +972,16 @@ static void globalTransfer( xSource, uno::UNO_QUERY ); if ( !xCommandProcessorS.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rContext.aArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Source content is not a XCommandProcessor!" ), @@ -1100,10 +1108,8 @@ static void globalTransfer( if ( !xRow.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Uri")), @@ -1111,8 +1117,10 @@ static void globalTransfer( uno::makeAny( xNew->getIdentifier()-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Unable to get properties from new object!" ), @@ -1206,10 +1214,8 @@ static void globalTransfer( rContext, xCommandProcessorS ); if ( !xInputStream.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -1219,8 +1225,10 @@ static void globalTransfer( xNew-> getIdentifier()-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Got no data stream from source!" ), @@ -1305,17 +1313,17 @@ static void globalTransfer( if ( !xChildRow.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rContext.aArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Unable to get properties from children of source!" ), @@ -1328,17 +1336,17 @@ static void globalTransfer( if ( !xChildAccess.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rContext.aArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), rContext.xEnv, rtl::OUString::createFromAscii( "Unable to get children of source!" ), @@ -1427,16 +1435,16 @@ void UniversalContentBroker::globalTransfer( if ( !xTarget.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rArg.TargetURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Can't instanciate target object!" ), @@ -1451,17 +1459,17 @@ void UniversalContentBroker::globalTransfer( xTarget, uno::UNO_QUERY ); if ( !xCommandProcessor.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rArg.TargetURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Target content is not a XCommandProcessor!" ), @@ -1520,16 +1528,16 @@ void UniversalContentBroker::globalTransfer( if ( !xSource.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Can't instanciate source object!" ), @@ -1541,16 +1549,16 @@ void UniversalContentBroker::globalTransfer( xSource, uno::UNO_QUERY ); if ( !xCommandProcessor.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Source content is not a XCommandProcessor!" ), @@ -1579,16 +1587,16 @@ void UniversalContentBroker::globalTransfer( if ( !xRow.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(rArg.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Unable to get properties from source object!" ), diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 5780f72d7478..a196bbf33167 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -2,9 +2,9 @@ * * $RCSfile: hierarchycontent.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: sb $ $Date: 2001-08-29 13:37:57 $ + * last change: $Author: kso $ $Date: 2001-09-12 10:03:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -602,18 +602,18 @@ uno::Any SAL_CALL HierarchyContent::execute( // Remove own and all children's persistent data. if ( !removeData() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), Environment, rtl::OUString::createFromAscii( "Cannot remove persistent data!" ), @@ -1533,18 +1533,18 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { if ( !storeData() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot store persistent data!" ), @@ -1684,17 +1684,17 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( !storeData() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot store persistent data!" ), this ); @@ -1817,16 +1817,16 @@ void HierarchyContent::transfer( if ( aId.compareTo( rInfo.SourceURL, rInfo.SourceURL.getLength() ) == 0 ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_RECURSIVE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(rInfo.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_RECURSIVE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Target is equal to or is a child of source!" ), @@ -1858,16 +1858,16 @@ void HierarchyContent::transfer( if ( !xSource.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(xId->getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot instanciate source object!" ), @@ -1893,16 +1893,16 @@ void HierarchyContent::transfer( createNewContent( aInfo ).get() ); if ( !xTarget.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_CREATE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Folder")), -1, uno::makeAny(aId), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_CREATE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "XContentCreator::createNewContent failed!" ), @@ -2025,10 +2025,8 @@ void HierarchyContent::transfer( // Remove all persistent data of source and its children. if ( !xSource->removeData() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), @@ -2036,8 +2034,10 @@ void HierarchyContent::transfer( uno::makeAny( xSource->m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot remove persistent data of source object!" ), diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 7e57436f88ca..16e5e0a00b1b 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -2,9 +2,9 @@ * * $RCSfile: pkgcontent.cxx,v $ * - * $Revision: 1.35 $ + * $Revision: 1.36 $ * - * last change: $Author: sb $ $Date: 2001-08-29 13:38:57 $ + * last change: $Author: kso $ $Date: 2001-09-12 10:03:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -650,18 +650,18 @@ uno::Any SAL_CALL Content::execute( // Remove own and all children's persistent data. if ( !removeData() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), Environment, rtl::OUString::createFromAscii( "Cannot remove persistent data!" ), @@ -1548,18 +1548,18 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { if ( !storeData( uno::Reference< io::XInputStream >() ) ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot store persistent data!" ), @@ -1621,18 +1621,18 @@ uno::Any Content::open( if ( !xIn.is() ) { // No interaction if we are not persistent! - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), m_eState == PERSISTENT ? xEnv : uno::Reference< star::ucb::XCommandEnvironment >(), @@ -1681,18 +1681,18 @@ uno::Any Content::open( if ( !xIn.is() ) { // No interaction if we are not persistent! - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), m_eState == PERSISTENT ? xEnv : uno::Reference< @@ -1853,17 +1853,17 @@ void Content::insert( if ( !storeData( xStream ) ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot store persistent data!" ), this ); @@ -1974,16 +1974,16 @@ void Content::transfer( if ( aId.compareTo( rInfo.SourceURL, rInfo.SourceURL.getLength() ) == 0 ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_RECURSIVE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(rInfo.SourceURL), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_RECURSIVE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Target is equal to or is a child of source!" ), @@ -2015,16 +2015,16 @@ void Content::transfer( if ( !xSource.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_READ, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), -1, uno::makeAny(xId->getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_READ, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot instanciate source object!" ), @@ -2049,16 +2049,16 @@ void Content::transfer( = static_cast< Content * >( createNewContent( aInfo ).get() ); if ( !xTarget.is() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_CREATE, - uno::Sequence< uno::Any >( - &uno::makeAny(beans::PropertyValue( + uno::Any aProps + = uno::makeAny(beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Folder")), -1, uno::makeAny(aId), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_CREATE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "XContentCreator::createNewContent failed!" ), @@ -2210,10 +2210,8 @@ void Content::transfer( // Remove all persistent data of source and its children. if ( !xSource->removeData() ) { - ucbhelper::cancelCommandExecution( - star::ucb::IOErrorCode_CANT_WRITE, - uno::Sequence< uno::Any >( - &uno::makeAny( + uno::Any aProps + = uno::makeAny( beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri")), @@ -2221,8 +2219,10 @@ void Content::transfer( uno::makeAny( xSource->m_xIdentifier-> getContentIdentifier()), - beans::PropertyState_DIRECT_VALUE)), - 1), + beans::PropertyState_DIRECT_VALUE)); + ucbhelper::cancelCommandExecution( + star::ucb::IOErrorCode_CANT_WRITE, + uno::Sequence< uno::Any >(&aProps, 1), xEnv, rtl::OUString::createFromAscii( "Cannot remove persistent data of source object!" ), diff --git a/ucb/source/ucp/webdav/NeonInputStream.cxx b/ucb/source/ucp/webdav/NeonInputStream.cxx index 3ca9b3333df6..83a59efc9602 100644 --- a/ucb/source/ucp/webdav/NeonInputStream.cxx +++ b/ucb/source/ucp/webdav/NeonInputStream.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonInputStream.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: kso $ $Date: 2001-03-08 12:52:12 $ + * last change: $Author: kso $ $Date: 2001-09-12 10:03:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -181,7 +181,7 @@ void SAL_CALL NeonInputStream::skipBytes( sal_Int32 nBytesToSkip ) // ------------------------------------------------------------------- sal_Int32 SAL_CALL NeonInputStream::available( ) throw( ::com::sun::star::io::NotConnectedException, - ::com::sun::star::io::BufferSizeExceededException, + ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ) { return mLen - mPos; diff --git a/ucb/source/ucp/webdav/NeonInputStream.hxx b/ucb/source/ucp/webdav/NeonInputStream.hxx index 4a88fa80fc2b..2fcbce8f3e4c 100644 --- a/ucb/source/ucp/webdav/NeonInputStream.hxx +++ b/ucb/source/ucp/webdav/NeonInputStream.hxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonInputStream.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: kso $ $Date: 2001-06-25 08:51:54 $ + * last change: $Author: kso $ $Date: 2001-09-12 10:03:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -142,7 +142,7 @@ class NeonInputStream : public ::com::sun::star::io::XInputStream, virtual sal_Int32 SAL_CALL available( void ) throw( ::com::sun::star::io::NotConnectedException, - ::com::sun::star::io::BufferSizeExceededException, + ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL closeInput( void ) |