diff options
author | Daniel Rentz <dr@openoffice.org> | 2010-05-17 14:10:13 +0200 |
---|---|---|
committer | Daniel Rentz <dr@openoffice.org> | 2010-05-17 14:10:13 +0200 |
commit | ac07edec79149c8e90846b8a794a893e91c65c0d (patch) | |
tree | 9ec7b58bbe980286922a3d088bbc1809449a5d76 /oox/source/ole/olestorage.cxx | |
parent | a5858e6d95685ee5f54b0879b42529c3df49ee83 (diff) |
npower13_objectmodules: #i111007# do not close output stream of tempfile for OLE storage too early
Diffstat (limited to 'oox/source/ole/olestorage.cxx')
-rwxr-xr-x | oox/source/ole/olestorage.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx index 39ecbb84a062..0ca2992d47ad 100755 --- a/oox/source/ole/olestorage.cxx +++ b/oox/source/ole/olestorage.cxx @@ -252,8 +252,11 @@ void OleStorage::initStorage( const Reference< XInputStream >& rxInStream ) Reference< XStream > xTempFile( mxFactory->createInstance( CREATE_OUSTRING( "com.sun.star.io.TempFile" ) ), UNO_QUERY_THROW ); { Reference< XOutputStream > xOutStrm( xTempFile->getOutputStream(), UNO_SET_THROW ); - BinaryXOutputStream aOutStrm( xOutStrm, true ); // true = close output stream on destruction of aOutStrm - BinaryXInputStream aInStrm( xInStrm, false ); // false = do not close intput stream on destruction of aInStrm + /* Pass false to both binary stream objects to keep the UNO + streams alive. Life time of these streams is controlled by the + tempfile implementation. */ + BinaryXOutputStream aOutStrm( xOutStrm, false ); + BinaryXInputStream aInStrm( xInStrm, false ); aInStrm.copyToStream( aOutStrm ); } // scope closes output stream of tempfile xInStrm = xTempFile->getInputStream(); |