diff options
author | Mikhail Voitenko <mav@openoffice.org> | 2009-11-25 12:17:36 +0000 |
---|---|---|
committer | Mikhail Voitenko <mav@openoffice.org> | 2009-11-25 12:17:36 +0000 |
commit | a92312c2256c52910216824e27ad37a4bbe430df (patch) | |
tree | e7de27f1c5585ad8e060c9aa03c3b3da1a8dfb79 /package | |
parent | c8d9c46813f38fd26d212e10d307cd9d1d61aefb (diff) |
#i105719# switch to temporary file ealier to allow storing to the same location
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 759f7d4d7d03..a692586681b5 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -135,25 +135,6 @@ sal_Bool isLocalFile_Impl( ::rtl::OUString aURL ) return ( aSystemPath.getLength() != 0 ); } -class PostinitializationGuard -{ - uno::Reference< io::XInputStream > m_xTempStream; - - ZipPackage& m_rZipPackage; - -public: - PostinitializationGuard( const uno::Reference< io::XInputStream >& xTempStream, - ZipPackage& rZipPackage ) - : m_xTempStream( xTempStream ) - , m_rZipPackage( rZipPackage ) - {} - - virtual ~PostinitializationGuard() - { - m_rZipPackage.ConnectTo( m_xTempStream ); - } -}; - } //=========================================================================== @@ -1380,8 +1361,8 @@ void SAL_CALL ZipPackage::commitChanges() static_cast < OWeakObject * > ( this ), makeAny ( r ) ); } - // switch to the new temporary stream only after the transfer - PostinitializationGuard aPostInitGuard( xTempInStream, *this ); + // connect to the temporary stream + ConnectTo( xTempInStream ); if ( m_eMode == e_IMode_XStream ) { |