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 | |
parent | a5858e6d95685ee5f54b0879b42529c3df49ee83 (diff) |
npower13_objectmodules: #i111007# do not close output stream of tempfile for OLE storage too early
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/dump/oledumper.cxx | 2 | ||||
-rwxr-xr-x | oox/source/ole/olestorage.cxx | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index 4e358801a513..cc49ee050ea6 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -942,7 +942,7 @@ void ComCtlTreeViewObject::implDumpProperties() mnStringFlags = dumpHex< sal_uInt32 >( "string-flags", "COMCTL-TREEVIEW-STRINGFLAGS" ); } -void ComCtlTreeViewObject::implDumpCommonExtra( sal_Int64 nEndPos ) +void ComCtlTreeViewObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ ) { dumpOleColor( "text-color" ); dumpOleColor( "back-color" ); 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(); |