diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2001-05-10 06:46:46 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2001-05-10 06:46:46 +0000 |
commit | a3145b6a2eb927a7a03714a1624ffd21346678ee (patch) | |
tree | e3074e55334db2ea2e00c87a89e6cd838477364d /ucbhelper | |
parent | bdf92a9d128f8ecdbafd90946d29d52173e98e58 (diff) |
Added: transferContent
Removed: both insertNewContent( const Content& rSourceContent, ... )
Diffstat (limited to 'ucbhelper')
-rw-r--r-- | ucbhelper/inc/ucbhelper/content.hxx | 57 | ||||
-rw-r--r-- | ucbhelper/source/client/content.cxx | 28 |
2 files changed, 25 insertions, 60 deletions
diff --git a/ucbhelper/inc/ucbhelper/content.hxx b/ucbhelper/inc/ucbhelper/content.hxx index d9e8f26b6129..28ebc38f5e10 100644 --- a/ucbhelper/inc/ucbhelper/content.hxx +++ b/ucbhelper/inc/ucbhelper/content.hxx @@ -2,9 +2,9 @@ * * $RCSfile: content.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: kso $ $Date: 2001-04-20 15:43:58 $ + * last change: $Author: kso $ $Date: 2001-05-10 07:46:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -754,8 +754,9 @@ public: ::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception ); /** - * This method creates, initializes and inserts ( commits ) a new content - * (i.e. it could be used to create a new file system folder). + * This method creates, initializes and inserts (commits) a new content + * inside this (the target folder) content. For example, it can be used to + * create a new file system folder. * Internally this method does a XContentCreator::createNewContent(...)- * XCommandProcessor::execute( "setPropertyValues", ... )- * XCommandProcessor::execute( "insert", ... ) calling sequence. @@ -790,8 +791,9 @@ public: ::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception ); /** - * This method creates, initializes and inserts ( commits ) a new content - * (i.e. it could be used to create a new file system folder). + * This method creates, initializes and inserts (commits) a new content + * inside this (the target folder) content. For example, it can be used to + * create a new file system folder. * Internally this method does a XContentCreator::createNewContent(...)- * XCommandProcessor::execute( "setPropertyValues", ... )- * XCommandProcessor::execute( "insert", ... ) calling sequence. @@ -826,10 +828,12 @@ public: ::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception ); /** - * This method creates, initializes and inserts ( commits ) a new content. - * The data for the new content will be taken from a given source content - * object. Internally this method executes the command "globalTransfer" - * at the UCB. + * This method transfers (copies/moves) a content. It creates a new + * resource inside this (the target folder) content. + * The implementation is able to do cross-provider transfers (like copying + * a file from the local file system to a directory located on an HTTP + * server). + * Internally this method executes the command "globalTransfer" at the UCB. * * @param rSourceContent is the content that contains the data for the * new UCB content. @@ -845,37 +849,12 @@ public: * will overwrite the clashing content and all its data, * NameClash::RENAME will generate and supply a non-clashing title. * @see com/sun/star/ucb/NameClash.idl - * @param rNewContent will be filled by the implementation of this method - * with the new content. */ sal_Bool - insertNewContent( const Content& rSourceContent, - InsertOperation eOperation, - const ::rtl::OUString & rTitle, - const sal_Int32 nNameClashAction, - Content& rNewContent ) - throw( ::com::sun::star::ucb::CommandAbortedException, - ::com::sun::star::uno::RuntimeException, - ::com::sun::star::uno::Exception ); - /** - * This method creates, initializes and inserts ( commits ) a new content. - * The data for the new content will be taken from a given source content - * object. Internally this method executes the command "globalTransfer" - * at the UCB. - * The operartion will be aborted if a content with a clashing name exists - * in the target folder. - * - * @param rSourceContent is the content that contains the data for the - * new UCB content. - * @param eOperation defines what shall be done with the source data - * ( COPY, MOVE, LINK ). - * @param rNewContent will be filled by the implementation of this method - * with the new content. - */ - sal_Bool - insertNewContent( const Content& rSourceContent, - InsertOperation eOperation, - Content& rNewContent ) + transferContent( const Content& rSourceContent, + InsertOperation eOperation, + const ::rtl::OUString & rTitle, + const sal_Int32 nNameClashAction ) throw( ::com::sun::star::ucb::CommandAbortedException, ::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception ); diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index 909743c81307..705a75a8f635 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -2,9 +2,9 @@ * * $RCSfile: content.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: kso $ $Date: 2001-04-20 15:44:14 $ + * last change: $Author: kso $ $Date: 2001-05-10 07:46:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1233,11 +1233,10 @@ sal_Bool Content::insertNewContent( const OUString& rContentType, } //========================================================================= -sal_Bool Content::insertNewContent( const Content& rSourceContent, - InsertOperation eOperation, - const OUString & rTitle, - const sal_Int32 nNameClashAction, - Content& rNewContent ) +sal_Bool Content::transferContent( const Content& rSourceContent, + InsertOperation eOperation, + const OUString & rTitle, + const sal_Int32 nNameClashAction ) throw( CommandAbortedException, RuntimeException, Exception ) { ucb::ContentBroker* pBroker = ucb::ContentBroker::get(); @@ -1275,7 +1274,7 @@ sal_Bool Content::insertNewContent( const Content& rSourceContent, GlobalTransferCommandArgument aTransferArg( eTransOp, rSourceContent.getURL(), // SourceURL - getURL(), // TargetURL, + getURL(), // TargetFolderURL, rTitle, nNameClashAction ); Command aCommand; @@ -1288,19 +1287,6 @@ sal_Bool Content::insertNewContent( const Content& rSourceContent, } //========================================================================= -sal_Bool Content::insertNewContent( const Content& rSourceContent, - InsertOperation eOperation, - Content& rNewContent ) - throw( CommandAbortedException, RuntimeException, Exception ) -{ - return insertNewContent( rSourceContent, - eOperation, - OUString(), - NameClash::ERROR, - rNewContent ); -} - -//========================================================================= sal_Bool Content::isFolder() throw( CommandAbortedException, RuntimeException, Exception ) { |