diff options
Diffstat (limited to 'sfx2/source/doc/graphhelp.cxx')
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index f9c9feb256be..c2bd23e05a76 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -87,13 +87,13 @@ void* GraphicHelper::getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta ) OUString aMetaFile = aTempFile.GetFileName(); OUString aMetaURL = aTempFile.GetURL(); - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMetaURL, StreamMode::STD_READWRITE ); + std::unique_ptr<SvStream> pStream = ::utl::UcbStreamHelper::CreateStream( aMetaURL, StreamMode::STD_READWRITE ); if ( pStream ) { Graphic aGraph( *pGDIMeta ); ErrCode nFailed = GraphicConverter::Export( *pStream, aGraph, ConvertDataFormat::EMF ); pStream->Flush(); - delete pStream; + pStream.reset(); if ( !nFailed ) pResult = GetEnhMetaFileW( o3tl::toW(aMetaFile.getStr()) ); |