diff options
author | Mathias Bauer <mba@openoffice.org> | 2002-01-29 14:23:09 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2002-01-29 14:23:09 +0000 |
commit | 9141b8012ad947cf798cfff5c7da69825f7091df (patch) | |
tree | ddf08eb1bd938c62fce9c51b34994333f2c82b4f /sot/source/sdstor/ucbstorage.cxx | |
parent | 8f705c9e9111ec2405c5693e02cf09722a171077 (diff) |
#94532#: unbuffered package access, fixed
Diffstat (limited to 'sot/source/sdstor/ucbstorage.cxx')
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 1cb44d561580..38fb4ec22fc2 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ucbstorage.cxx,v $ * - * $Revision: 1.62 $ + * $Revision: 1.63 $ * - * last change: $Author: mba $ $Date: 2002-01-28 15:40:20 $ + * last change: $Author: mba $ $Date: 2002-01-29 15:23:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -347,7 +347,6 @@ void FileStreamWrapper_Impl::checkConnected() throw NotConnectedException(::rtl::OUString(), const_cast<XWeak*>(static_cast<const XWeak*>(this))); if ( !m_pSvStream ) { - m_pSvStream = new SvFileStream( m_aURL, STREAM_STD_READ ); m_pSvStream = ::utl::UcbStreamHelper::CreateStream( m_aURL, STREAM_STD_READ ); #ifdef DEBUG ++nOpenFiles; @@ -755,12 +754,16 @@ Reference<XInputStream> UCBStorageStream_Impl::GetXInputStream() if( Init() ) { CopySourceToTemporary(); - aResult = new ::utl::OInputStreamWrapper( m_pStream ); + + // owner transfer of stream to wrapper + aResult = new ::utl::OInputStreamWrapper( m_pStream, TRUE ); + m_pStream->Seek(0); if( aResult.is() ) { // temporary stream can not be used here any more // and can not be opened untill wrapper is closed + // stream is deleted by wrapper after use m_pStream = NULL; m_nRepresentMode = xinputstream; } @@ -809,7 +812,7 @@ BOOL UCBStorageStream_Impl::Init() if ( !m_aTempURL.Len() ) m_aTempURL = ::utl::TempFile().GetURL(); - m_pStream = ::utl::UcbStreamHelper::CreateStream( m_aTempURL, STREAM_WRITE ); + m_pStream = ::utl::UcbStreamHelper::CreateStream( m_aTempURL, STREAM_STD_READWRITE ); #ifdef DEBUG ++nOpenFiles; #endif |