summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-12-03 18:43:21 +0100
committerKurt Zenker <kz@openoffice.org>2009-12-03 18:43:21 +0100
commit267e9e5dab81ad457e30822eef00bed15d8c4bd9 (patch)
tree651c5a80d373b901b80f61988ca38be1ad454609 /package
parent1c55076d45178d0284122c04c50b7a87e9117e49 (diff)
parent5c705ef113ed3f626aa943691986d5e83c724cbd (diff)
CWS-TOOLING: integrate CWS fwk125_DEV300
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackage.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 3e1c615d8..874efb711 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1370,6 +1370,16 @@ void SAL_CALL ZipPackage::commitChanges()
{
uno::Reference< io::XSeekable > xTempSeek( xTempInStream, uno::UNO_QUERY_THROW );
+ try
+ {
+ xTempSeek->seek( 0 );
+ }
+ catch( uno::Exception& r )
+ {
+ throw WrappedTargetException( OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Temporary file should be seekable!" ) ),
+ static_cast < OWeakObject * > ( this ), makeAny ( r ) );
+ }
+
// switch to the new temporary stream only after the transfer
PostinitializationGuard aPostInitGuard( xTempInStream, *this );
@@ -1381,8 +1391,6 @@ void SAL_CALL ZipPackage::commitChanges()
// preparation for copy step
try
{
- xTempSeek->seek( 0 );
-
xOutputStream = m_xStream->getOutputStream();
uno::Reference < XTruncate > xTruncate ( xOutputStream, UNO_QUERY );
if ( !xTruncate.is() )