diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-11-09 14:33:38 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-11-09 14:33:38 +0000 |
commit | e27a46c7cc071c5a94f5da0d7ccee4c40b37587c (patch) | |
tree | 9a4fc6f73f935582d2838bdedc3bd32c102b38fd /ucb/source | |
parent | 490369e61ab020950b824855ba03bbd0cec7d551 (diff) |
INTEGRATION: CWS tdoc3 (1.2.52); FILE MERGED
2004/11/03 15:48:29 kso 1.2.52.1: #i36025# - streams cannot longer be created as children of document root
storage (but folders can). Document would throw those away
on saving.
Issue number:
Submitted by:
Reviewed by:
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_contentcaps.cxx | 76 |
1 files changed, 73 insertions, 3 deletions
diff --git a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx index 7493984305cc..181202602101 100644 --- a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx +++ b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tdoc_contentcaps.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hr $ $Date: 2004-04-14 13:41:06 $ + * last change: $Author: rt $ $Date: 2004-11-09 15:33:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,11 +81,15 @@ getPropertySetInfo x x x x x x getPropertyValues x x x x x x setPropertyValues x x x x x x - insert - - x x x x + insert - - x x x(*) x(*) delete - - x - x - open x x x - x - transfer - x x - - - +#ifdef NO_STREAM_CREATION_WITHIN_DOCUMENT_ROOT + (*) not supported by streams that are direct children of document +#endif + *************************************************************************/ #include "com/sun/star/beans/Property.hpp" @@ -359,6 +363,72 @@ uno::Sequence< star::ucb::CommandInfo > Content::getCommands( if ( m_aProps.getType() == STREAM ) { +#ifdef NO_STREAM_CREATION_WITHIN_DOCUMENT_ROOT + Uri aUri( m_xIdentifier->getContentIdentifier() ); + Uri aParentUri( aUri.getParentUri() ); + + if ( aParentUri.isDocument() ) + { + //================================================================= + // + // Stream, that is a child of a document: Supported commands + // + //================================================================= + + static star::ucb::CommandInfo aStreamCommandInfoTable1[] = + { + /////////////////////////////////////////////////////////// + // Mandatory commands + /////////////////////////////////////////////////////////// + star::ucb::CommandInfo( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), + -1, + getCppuVoidType() + ), + star::ucb::CommandInfo( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), + -1, + getCppuVoidType() + ), + star::ucb::CommandInfo( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), + -1, + getCppuType( + static_cast< uno::Sequence< beans::Property > * >( 0 ) ) + ), + star::ucb::CommandInfo( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), + -1, + getCppuType( + static_cast< + uno::Sequence< beans::PropertyValue > * >( 0 ) ) + ), + /////////////////////////////////////////////////////////// + // Optional standard commands + /////////////////////////////////////////////////////////// + star::ucb::CommandInfo( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ), + -1, + getCppuBooleanType() + ), + star::ucb::CommandInfo( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), + -1, + getCppuType( + static_cast< star::ucb::OpenCommandArgument2 * >( 0 ) ) + ) + /////////////////////////////////////////////////////////// + // New commands + /////////////////////////////////////////////////////////// + }; + return uno::Sequence< + star::ucb::CommandInfo >( aStreamCommandInfoTable1, 6 ); + } +#endif //================================================================= // // Stream: Supported commands |