diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-12-03 18:43:21 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-12-03 18:43:21 +0100 |
commit | 2c09bcf173a6dfe7e647bbf215f9af0b92c1a536 (patch) | |
tree | d0301ad470899d9fc7ef9a8c25a4e9d46688c632 /package | |
parent | 496c1ec119eb0c82f93c742b7c4f9977aac864d1 (diff) | |
parent | 425eb5d131b40020dcafe3204cd52a0a0f1c6b1a (diff) |
CWS-TOOLING: integrate CWS fwk125_DEV300
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 6ca9981d2291..759f7d4d7d03 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() ) |