summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-10-30 08:48:49 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-10-30 08:48:49 +0000
commit5a3273019ae6a566067723dd15e7c57db95a8e11 (patch)
treebac5d0aa58c3c430e0dfadf954b02974c2a03b3b /package
parent74042322ee5115526e9adbc0c7c1c0cb19cf9a41 (diff)
INTEGRATION: CWS mav08 (1.33.10); FILE MERGED
2003/10/15 08:03:59 mav 1.33.10.1: #i21121# seek the stream to 0 when return it
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 1c5aa7688c87..c46e5fc13daa 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageStream.cxx,v $
*
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
- * last change: $Author: kz $ $Date: 2003-09-11 10:18:07 $
+ * last change: $Author: rt $ $Date: 2003-10-30 09:48:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -346,7 +346,15 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream()
else if ( m_nStreamMode == PACKAGE_STREAM_RAW )
return ZipFile::StaticGetDataFromRawStream( xStream, xEncryptionData );
else
+ {
+ Reference< io::XSeekable > xSeek( xStream, UNO_QUERY );
+ if ( !xSeek.is() )
+ throw RuntimeException( OUString::createFromAscii( "The stream must support XSeekable!" ),
+ Reference< XInterface >() );
+
+ xSeek->seek( 0 );
return xStream;
+ }
}
//--------------------------------------------------------------------------