diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-25 08:56:23 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-25 08:56:23 +0100 |
commit | f372e6625bf10b5233fa204da4291131371cf3c3 (patch) | |
tree | 3c5ab2b86a5f686a8c073d7f6e3e62257c4aa373 /ucb | |
parent | 667e864a12c4a0c2c90e49080e3000fc9cb26cb2 (diff) |
slidecopy: delegate the request to open a document content to the wrapped content
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/ext/ucpext_content.cxx | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 1611fe579dbd..1dc49990c73d 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -279,49 +279,9 @@ namespace ucb { namespace ucp { namespace ext if ( aOpenCommand.Sink.is() ) { - // Open document - supply document data stream. - - // Check open mode - if ( ( aOpenCommand.Mode == OpenMode::DOCUMENT_SHARE_DENY_NONE ) - || ( aOpenCommand.Mode == OpenMode::DOCUMENT_SHARE_DENY_WRITE ) - ) - { - // unsupported. - ::ucbhelper::cancelCommandExecution( makeAny( UnsupportedOpenModeException( - ::rtl::OUString(), *this, sal_Int16( aOpenCommand.Mode ) ) ), - i_rEvironment ); - // unreachable - } - - ::rtl::OUString aURL = m_xIdentifier->getContentIdentifier(); - Reference< XOutputStream > xOut( aOpenCommand.Sink, UNO_QUERY ); - if ( xOut.is() ) - { - OSL_ENSURE( false, "Content::execute( open->out ): not implemented!" ); - // TODO: write data into xOut - } - else - { - Reference< XActiveDataSink > xDataSink( aOpenCommand.Sink, UNO_QUERY ); - if ( xDataSink.is() ) - { - Reference< XInputStream > xIn - /* @@@ your XInputStream + XSeekable impl. object */; - // TODO - OSL_ENSURE( false, "Content::execute( open->sink ): not implemented!" ); - xDataSink->setInputStream( xIn ); - } - else - { - // Note: aOpenCommand.Sink may contain an XStream - // implementation. Support for this type of - // sink is optional... - ::ucbhelper::cancelCommandExecution( makeAny( UnsupportedDataSinkException( - ::rtl::OUString(), *this, aOpenCommand.Sink ) ), - i_rEvironment ); - // unreachable - } - } + const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); + ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment ); + aRet = aRequestedContent.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), makeAny( aOpenCommand ) ); } } |