summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sb@openoffice.org>2001-08-29 12:38:57 +0000
committerStephan Bergmann <sb@openoffice.org>2001-08-29 12:38:57 +0000
commit3838845c0548c0e1f795e451d531496037dcd57c (patch)
tree65d84f49b11b849a809e9ece9d50e6e57a06ad68 /ucb
parentc58455a5eb653bcd5ea5f420b724617229e137ce (diff)
#91676# Removed obsolete versions of cancelCommandExecution().
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/ucbcmds.cxx331
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx167
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx205
3 files changed, 501 insertions, 202 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index d2ab8fe3da94..e79fb2e0b39c 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ucbcmds.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: kso $ $Date: 2001-06-25 08:50:27 $
+ * last change: $Author: sb $ $Date: 2001-08-29 13:36:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,6 +71,15 @@
#ifndef _CPPUHELPER_WEAK_HXX_
#include <cppuhelper/weak.hxx>
#endif
+#ifndef _RTL_USTRING_H_
+#include <rtl/ustring.h>
+#endif
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
#endif
@@ -131,6 +140,12 @@
#ifndef _COM_SUN_STAR_UCB_XDYNAMICRESULTSET_HPP_
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#endif
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
#ifndef _UCBHELPER_COMMANDENVIRONMENTPROXY_HXX
#include <ucbhelper/commandenvironmentproxy.hxx>
@@ -419,13 +434,19 @@ static uno::Reference< star::ucb::XContent > createNew(
if ( !xCreator.is() )
{
- ucbhelper::cancelCommandExecution( star::ucb::IOErrorCode_CANT_CREATE,
- rtl::OUString(), // new URL
- rContext.aArg.TargetURL,
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "Target is no XContentCreator!" ),
- rContext.xProcessor );
+ ucbhelper::cancelCommandExecution(
+ star::ucb::IOErrorCode_CANT_CREATE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Folder")),
+ -1,
+ uno::makeAny(rContext.aArg.TargetURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii( "Target is no XContentCreator!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -435,13 +456,19 @@ static uno::Reference< star::ucb::XContent > createNew(
sal_Int32 nCount = aTypesInfo.getLength();
if ( !nCount )
{
- ucbhelper::cancelCommandExecution( star::ucb::IOErrorCode_CANT_CREATE,
- rtl::OUString(), // new URL
- rContext.aArg.TargetURL,
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "No types creatable!" ),
- rContext.xProcessor );
+ ucbhelper::cancelCommandExecution(
+ star::ucb::IOErrorCode_CANT_CREATE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Folder")),
+ -1,
+ uno::makeAny(rContext.aArg.TargetURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii( "No types creatable!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -525,13 +552,20 @@ static uno::Reference< star::ucb::XContent > createNew(
if ( !xNew.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_CREATE,
- rtl::OUString(), // new URL
- rContext.aArg.TargetURL,
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "createNewContent failed!" ),
- rContext.xProcessor );
+ star::ucb::IOErrorCode_CANT_CREATE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Folder")),
+ -1,
+ uno::makeAny(rContext.aArg.TargetURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii(
+ "createNewContent failed!" ),
+ rContext.xProcessor );
// Unreachable
}
break;
@@ -560,12 +594,19 @@ static void transferProperties(
if ( !xInfo.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rContext.aArg.SourceURL,
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "Unable to get propertyset info from source object!" ),
- rContext.xProcessor );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rContext.aArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii(
+ "Unable to get propertyset info from source object!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -583,12 +624,19 @@ static void transferProperties(
if ( !xRow1.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rContext.aArg.SourceURL,
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "Unable to get properties from source object!" ),
- rContext.xProcessor );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rContext.aArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii(
+ "Unable to get properties from source object!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -865,13 +913,19 @@ static void globalTransfer(
if ( !xNew.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_CREATE,
- rtl::OUString(), // new URL
- rContext.aArg.TargetURL,
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "No matching content type at target!" ),
- rContext.xProcessor );
+ star::ucb::IOErrorCode_CANT_CREATE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Folder")),
+ -1,
+ uno::makeAny(rContext.aArg.TargetURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii(
+ "No matching content type at target!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -886,12 +940,21 @@ static void globalTransfer(
if ( !xCommandProcessorN.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- xNew->getIdentifier()->getContentIdentifier(),
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "New content is not a XCommandProcessor!" ),
- rContext.xProcessor );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(
+ xNew->getIdentifier()->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii(
+ "New content is not a XCommandProcessor!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -902,12 +965,19 @@ static void globalTransfer(
if ( !xCommandProcessorS.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rContext.aArg.SourceURL,
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "Source content is not a XCommandProcessor!" ),
- rContext.xProcessor );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rContext.aArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii(
+ "Source content is not a XCommandProcessor!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -1031,12 +1101,22 @@ static void globalTransfer(
if ( !xRow.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- xNew->getIdentifier()->getContentIdentifier(),
- rContext.xEnv,
- rtl::OUString::createFromAscii(
- "Unable to get properties from new object!" ),
- rContext.xProcessor );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Uri")),
+ -1,
+ uno::makeAny(
+ xNew->getIdentifier()->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ rContext.xEnv,
+ rtl::OUString::createFromAscii(
+ "Unable to get properties from new object!" ),
+ rContext.xProcessor );
// Unreachable
}
@@ -1128,8 +1208,19 @@ static void globalTransfer(
{
ucbhelper::cancelCommandExecution(
star::ucb::IOErrorCode_CANT_READ,
- xNew->getIdentifier()
- ->getContentIdentifier(),
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(
+ xNew->
+ getIdentifier()->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
rContext.xEnv,
rtl::OUString::createFromAscii(
"Got no data stream from source!" ),
@@ -1216,7 +1307,15 @@ static void globalTransfer(
{
ucbhelper::cancelCommandExecution(
star::ucb::IOErrorCode_CANT_READ,
- rContext.aArg.SourceURL,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rContext.aArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
rContext.xEnv,
rtl::OUString::createFromAscii(
"Unable to get properties from children of source!" ),
@@ -1231,7 +1330,15 @@ static void globalTransfer(
{
ucbhelper::cancelCommandExecution(
star::ucb::IOErrorCode_CANT_READ,
- rContext.aArg.SourceURL,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rContext.aArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
rContext.xEnv,
rtl::OUString::createFromAscii(
"Unable to get children of source!" ),
@@ -1321,12 +1428,19 @@ void UniversalContentBroker::globalTransfer(
if ( !xTarget.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rArg.TargetURL,
- xEnv,
- rtl::OUString::createFromAscii(
- "Can't instanciate target object!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rArg.TargetURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Can't instanciate target object!" ),
+ this );
// Unreachable
}
@@ -1338,12 +1452,20 @@ void UniversalContentBroker::globalTransfer(
if ( !xCommandProcessor.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rArg.TargetURL,
- xEnv,
- rtl::OUString::createFromAscii(
- "Target content is not a XCommandProcessor!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rArg.TargetURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Target content is not a XCommandProcessor!" ),
+ this );
// Unreachable
}
@@ -1399,12 +1521,19 @@ void UniversalContentBroker::globalTransfer(
if ( !xSource.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rArg.SourceURL,
- xEnv,
- rtl::OUString::createFromAscii(
- "Can't instanciate source object!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Can't instanciate source object!" ),
+ this );
// Unreachable
}
@@ -1413,12 +1542,19 @@ void UniversalContentBroker::globalTransfer(
if ( !xCommandProcessor.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rArg.SourceURL,
- xEnv,
- rtl::OUString::createFromAscii(
- "Source content is not a XCommandProcessor!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Source content is not a XCommandProcessor!" ),
+ this );
// Unreachable
}
@@ -1444,12 +1580,19 @@ void UniversalContentBroker::globalTransfer(
if ( !xRow.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- rArg.SourceURL,
- xEnv,
- rtl::OUString::createFromAscii(
- "Unable to get properties from source object!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any <(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(rArg.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Unable to get properties from source object!" ),
+ this );
// Unreachable
}
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 07384d4dc35a..5780f72d7478 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.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: kso $ $Date: 2001-07-06 09:34:20 $
+ * last change: $Author: sb $ $Date: 2001-08-29 13:37:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,9 +80,21 @@
#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
#endif
+#ifndef _RTL_USTRING_H_
+#include <rtl/ustring.h>
+#endif
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_
#include <com/sun/star/beans/XPropertyAccess.hpp>
#endif
@@ -125,6 +137,12 @@
#ifndef _COM_SUN_STAR_UCB_XPERSISTENTPROPERTYSET_HPP_
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
#endif
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
#ifndef _UCBHELPER_CONTENTIDENTIFIER_HXX
#include <ucbhelper/contentidentifier.hxx>
#endif
@@ -585,12 +603,21 @@ uno::Any SAL_CALL HierarchyContent::execute(
if ( !removeData() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- m_xIdentifier->getContentIdentifier(),
- Environment,
- rtl::OUString::createFromAscii(
- "Cannot remove persistent data!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ Environment,
+ rtl::OUString::createFromAscii(
+ "Cannot remove persistent data!" ),
+ this );
// Unreachable
}
@@ -1507,12 +1534,21 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
if ( !storeData() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- m_xIdentifier->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot store persistent data!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Cannot store persistent data!" ),
+ this );
// Unreachable
}
}
@@ -1649,12 +1685,19 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
if ( !storeData() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- m_xIdentifier->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot store persistent data!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii( "Cannot store persistent data!" ),
+ this );
// Unreachable
}
@@ -1774,17 +1817,20 @@ void HierarchyContent::transfer(
if ( aId.compareTo(
rInfo.SourceURL, rInfo.SourceURL.getLength() ) == 0 )
{
- uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= rInfo.SourceURL;
- aArgs[ 1 ] <<= aId;
-
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_RECURSIVE,
- aArgs,
- xEnv,
- rtl::OUString::createFromAscii(
- "Target is equal to or is a child of source!" ),
- this );
+ star::ucb::IOErrorCode_RECURSIVE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Uri")),
+ -1,
+ uno::makeAny(rInfo.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Target is equal to or is a child of source!" ),
+ this );
// Unreachable
}
}
@@ -1813,12 +1859,19 @@ void HierarchyContent::transfer(
if ( !xSource.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- xId->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot instanciate source object!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(xId->getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Cannot instanciate source object!" ),
+ this );
// Unreachable
}
@@ -1841,13 +1894,19 @@ void HierarchyContent::transfer(
if ( !xTarget.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_CREATE,
- rtl::OUString(), // new URL
- aId,
- xEnv,
- rtl::OUString::createFromAscii(
- "XContentCreator::createNewContent failed!" ),
- this );
+ star::ucb::IOErrorCode_CANT_CREATE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Folder")),
+ -1,
+ uno::makeAny(aId),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "XContentCreator::createNewContent failed!" ),
+ this );
// Unreachable
}
@@ -1967,12 +2026,22 @@ void HierarchyContent::transfer(
if ( !xSource->removeData() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- xSource->m_xIdentifier->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot remove persistent data of source object!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(
+ xSource->m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Cannot remove persistent data of source object!" ),
+ this );
// Unreachable
}
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 38ce218de857..7e57436f88ca 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.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: kso $ $Date: 2001-07-06 09:32:34 $
+ * last change: $Author: sb $ $Date: 2001-08-29 13:38:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,10 +67,22 @@
#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
#endif
+#ifndef _RTL_USTRING_H_
+#include <rtl/ustring.h>
+#endif
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_
#include <com/sun/star/beans/XPropertyAccess.hpp>
#endif
@@ -146,6 +158,12 @@
#ifndef _COM_SUN_STAR_UTIL_XCHANGESBATCH_HPP_
#include <com/sun/star/util/XChangesBatch.hpp>
#endif
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
#ifndef _UCBHELPER_CONTENTIDENTIFIER_HXX
#include <ucbhelper/contentidentifier.hxx>
#endif
@@ -633,12 +651,21 @@ uno::Any SAL_CALL Content::execute(
if ( !removeData() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- m_xIdentifier->getContentIdentifier(),
- Environment,
- rtl::OUString::createFromAscii(
- "Cannot remove persistent data!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ Environment,
+ rtl::OUString::createFromAscii(
+ "Cannot remove persistent data!" ),
+ this );
// Unreachable
}
@@ -1522,12 +1549,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( !storeData( uno::Reference< io::XInputStream >() ) )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- m_xIdentifier->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot store persistent data!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Cannot store persistent data!" ),
+ this );
// Unreachable
}
}
@@ -1587,7 +1623,16 @@ uno::Any Content::open(
// No interaction if we are not persistent!
ucbhelper::cancelCommandExecution(
star::ucb::IOErrorCode_CANT_READ,
- m_xIdentifier->getContentIdentifier(),
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
m_eState == PERSISTENT
? xEnv
: uno::Reference< star::ucb::XCommandEnvironment >(),
@@ -1637,15 +1682,24 @@ uno::Any Content::open(
{
// No interaction if we are not persistent!
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- m_xIdentifier->getContentIdentifier(),
- m_eState == PERSISTENT
- ? xEnv
- : uno::Reference<
- star::ucb::XCommandEnvironment >(),
- rtl::OUString::createFromAscii(
- "Got no data stream!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ m_eState == PERSISTENT
+ ? xEnv
+ : uno::Reference<
+ star::ucb::XCommandEnvironment >(),
+ rtl::OUString::createFromAscii(
+ "Got no data stream!" ),
+ this );
// Unreachable
}
@@ -1800,12 +1854,19 @@ void Content::insert(
if ( !storeData( xStream ) )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- m_xIdentifier->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot store persistent data!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii( "Cannot store persistent data!" ),
+ this );
// Unreachable
}
@@ -1913,17 +1974,20 @@ void Content::transfer(
if ( aId.compareTo(
rInfo.SourceURL, rInfo.SourceURL.getLength() ) == 0 )
{
- uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= rInfo.SourceURL;
- aArgs[ 1 ] <<= aId;
-
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_RECURSIVE,
- aArgs,
- xEnv,
- rtl::OUString::createFromAscii(
- "Target is equal to or is a child of source!" ),
- this );
+ star::ucb::IOErrorCode_RECURSIVE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Uri")),
+ -1,
+ uno::makeAny(rInfo.SourceURL),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Target is equal to or is a child of source!" ),
+ this );
// Unreachable
}
}
@@ -1952,12 +2016,19 @@ void Content::transfer(
if ( !xSource.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_READ,
- xId->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot instanciate source object!" ),
- this );
+ star::ucb::IOErrorCode_CANT_READ,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(xId->getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Cannot instanciate source object!" ),
+ this );
// Unreachable
}
@@ -1979,13 +2050,19 @@ void Content::transfer(
if ( !xTarget.is() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_CREATE,
- rtl::OUString(), // new URL
- aId,
- xEnv,
- rtl::OUString::createFromAscii(
- "XContentCreator::createNewContent failed!" ),
- this );
+ star::ucb::IOErrorCode_CANT_CREATE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Folder")),
+ -1,
+ uno::makeAny(aId),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "XContentCreator::createNewContent failed!" ),
+ this );
// Unreachable
}
@@ -2134,12 +2211,22 @@ void Content::transfer(
if ( !xSource->removeData() )
{
ucbhelper::cancelCommandExecution(
- star::ucb::IOErrorCode_CANT_WRITE,
- xSource->m_xIdentifier->getContentIdentifier(),
- xEnv,
- rtl::OUString::createFromAscii(
- "Cannot remove persistent data of source object!" ),
- this );
+ star::ucb::IOErrorCode_CANT_WRITE,
+ uno::Sequence< uno::Any >(
+ &uno::makeAny(
+ beans::PropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Uri")),
+ -1,
+ uno::makeAny(
+ xSource->m_xIdentifier->
+ getContentIdentifier()),
+ beans::PropertyState_DIRECT_VALUE)),
+ 1),
+ xEnv,
+ rtl::OUString::createFromAscii(
+ "Cannot remove persistent data of source object!" ),
+ this );
// Unreachable
}