summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-11-02 13:43:24 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-11-02 13:43:24 +0000
commit923b6df32bf74e4c73971c731104e3af160dbc39 (patch)
tree85c2b776fa14724c69373b346479a541792ed05d /package
parent4b1ce6656ac753ede0aa80b94b172a1327a88ab9 (diff)
INTEGRATION: CWS sab012 (1.62.28); FILE MERGED
2004/10/12 20:24:18 sab 1.62.28.4: RESYNC: (1.66-1.69); FILE MERGED 2004/06/08 09:42:18 sab 1.62.28.3: RESYNC: (1.64-1.66); FILE MERGED 2004/02/18 11:19:18 sab 1.62.28.2: RESYNC: (1.62-1.64); FILE MERGED 2004/02/18 10:34:30 mav 1.62.28.1: #114338# solve conflict
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx53
1 files changed, 31 insertions, 22 deletions
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 81e2551c9dd3..ab75cd0fae55 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageFolder.cxx,v $
*
- * $Revision: 1.69 $
+ * $Revision: 1.70 $
*
- * last change: $Author: kz $ $Date: 2004-10-04 21:10:12 $
+ * last change: $Author: rt $ $Date: 2004-11-02 14:43:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -386,32 +386,41 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
Reference < XSeekable > xSeek ( xStream, UNO_QUERY );
- if ( xSeek.is() )
+ try
{
- // If the stream is a raw one, then we should be positioned
- // at the beginning of the actual data
- if ( !bToBeCompressed || bRawStream )
+ if ( xSeek.is() )
{
- xSeek->seek ( bRawStream ? pStream->GetMagicalHackPos() : 0 );
- ImplSetStoredData ( *pTempEntry, xStream );
- }
- else if ( bToBeEncrypted )
- pTempEntry->nSize = static_cast < sal_Int32 > ( xSeek->getLength() );
+ // If the stream is a raw one, then we should be positioned
+ // at the beginning of the actual data
+ if ( !bToBeCompressed || bRawStream )
+ {
+ xSeek->seek ( bRawStream ? pStream->GetMagicalHackPos() : 0 );
+ ImplSetStoredData ( *pTempEntry, xStream );
+ }
+ else if ( bToBeEncrypted )
+ pTempEntry->nSize = static_cast < sal_Int32 > ( xSeek->getLength() );
- xSeek->seek ( 0 );
- }
- else
- {
- // Okay, we don't have an xSeekable stream. This is possibly bad.
- // check if it's one of our own streams, if it is then we know that
- // each time we ask for it we'll get a new stream that will be
- // at position zero...otherwise, assert and skip this stream...
- if ( !pStream->IsPackageMember() )
+ xSeek->seek ( 0 );
+ }
+ else
{
- VOS_ENSURE( 0, "The package component requires that every stream either be FROM a package or it must support XSeekable!" );
- continue;
+ // Okay, we don't have an xSeekable stream. This is possibly bad.
+ // check if it's one of our own streams, if it is then we know that
+ // each time we ask for it we'll get a new stream that will be
+ // at position zero...otherwise, assert and skip this stream...
+ if ( !pStream->IsPackageMember() )
+ {
+ VOS_ENSURE( 0, "The package component requires that every stream either be FROM a package or it must support XSeekable!" );
+ continue;
+ }
}
}
+ catch ( Exception& )
+ {
+ VOS_ENSURE( 0, "The stream provided to the package component has problems!" );
+ bWritingFailed = sal_True;
+ continue;
+ }
if ( bToBeEncrypted || bRawStream )
{