diff options
Diffstat (limited to 'sot/source/sdstor/storage.cxx')
-rw-r--r-- | sot/source/sdstor/storage.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 65f9d8a54416..3848fd941585 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -304,7 +304,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode ) } // check the stream - m_pStorStm = ::utl::UcbStreamHelper::CreateStream( m_aName, nMode ); + m_pStorStm = ::utl::UcbStreamHelper::CreateStream( m_aName, nMode ).release(); if ( m_pStorStm && m_pStorStm->GetError() ) DELETEZ( m_pStorStm ); @@ -730,7 +730,7 @@ SotStorage* SotStorage::OpenOLEStorage( const css::uno::Reference < css::embed:: if ( nMode & StreamMode::NOCREATE ) nEleMode |= embed::ElementModes::NOCREATE; - SvStream* pStream = nullptr; + std::unique_ptr<SvStream> pStream; try { uno::Reference < io::XStream > xStream = xStorage->openStreamElement( rEleName, nEleMode ); @@ -748,11 +748,11 @@ SotStorage* SotStorage::OpenOLEStorage( const css::uno::Reference < css::embed:: catch ( uno::Exception& ) { //TODO/LATER: ErrorHandling - pStream = new SvMemoryStream; + pStream.reset( new SvMemoryStream ); pStream->SetError( ERRCODE_IO_GENERAL ); } - return new SotStorage( pStream, true ); + return new SotStorage( pStream.release(), true ); } SotClipboardFormatId SotStorage::GetFormatID( const css::uno::Reference < css::embed::XStorage >& xStorage ) |