summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-01-20 09:11:05 +0000
committerOliver Bolte <obo@openoffice.org>2006-01-20 09:11:05 +0000
commit40ea4c93ce6c49449d5f10037db731a541e182ed (patch)
tree44d3340f44cd828c905e16d10a881787526ce1e5
parent46f2471863171d8d33a033dc56ac17bb5a8b23cc (diff)
INTEGRATION: CWS tbe25 (1.31.8); FILE MERGED
2005/10/25 10:36:59 tbe 1.31.8.1: #i56598# ucb::Content class doesn't handle empty input stream correctly
-rw-r--r--ucbhelper/source/client/content.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index c616d0ab31a3..b2ca25c5d0e6 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: content.cxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 16:33:57 $
+ * last change: $Author: obo $ $Date: 2006-01-20 10:11:05 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1360,11 +1360,8 @@ void Content::writeStream( const Reference< XInputStream >& rStream,
sal_Bool bReplaceExisting )
throw( CommandAbortedException, RuntimeException, Exception )
{
- if ( !rStream.is() )
- return;
-
InsertCommandArgument aArg;
- aArg.Data = rStream;
+ aArg.Data = rStream.is() ? rStream : new EmptyInputStream;
aArg.ReplaceExisting = bReplaceExisting;
Command aCommand;
@@ -1440,7 +1437,7 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
aNewContent.executeCommand( rtl::OUString::createFromAscii( "insert" ),
makeAny(
InsertCommandArgument(
- rData,
+ rData.is() ? rData : new EmptyInputStream,
sal_False /* ReplaceExisting */ ) ) );
aNewContent.m_xImpl->inserted();
@@ -1481,7 +1478,7 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
aNewContent.executeCommand( rtl::OUString::createFromAscii( "insert" ),
makeAny(
InsertCommandArgument(
- rData,
+ rData.is() ? rData : new EmptyInputStream,
sal_False /* ReplaceExisting */ ) ) );
aNewContent.m_xImpl->inserted();