summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-12 15:32:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-15 08:45:17 +0200
commit5e7583fe864c4491c5a19d2896b6555448146ad8 (patch)
treed7b34190055d5d2348346cdeaf139f5318ba5e78 /sfx2
parent4582acb3eeb2af0411ab8598ec17d74381225acf (diff)
loplugin:useuniqueptr
ignore SAL_LOG type stuff in the destructor Change-Id: If014382ca0c96edd3f2b325a28451d83b3d1f278 Reviewed-on: https://gerrit.libreoffice.org/37539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 70c2741d408e..6499f58430ad 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -78,7 +78,6 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, bool bIsNewDoc,
SfxHTMLParser::~SfxHTMLParser()
{
DBG_ASSERT( !pDLMedium, "Here is a File Download that has got stuck" );
- delete pDLMedium;
}
bool SfxHTMLParser::ParseMapOptions(
@@ -227,7 +226,7 @@ void SfxHTMLParser::StartFileDownload(const OUString& rURL)
if( pDLMedium )
return;
- pDLMedium = new SfxMedium( rURL, SFX_STREAM_READONLY );
+ pDLMedium.reset( new SfxMedium( rURL, SFX_STREAM_READONLY ) );
pDLMedium->Download();
}
@@ -250,8 +249,7 @@ bool SfxHTMLParser::FinishFileDownload( OUString& rStr )
rStr = OStringToOUString( sBuffer, RTL_TEXTENCODING_UTF8 );
}
- delete pDLMedium;
- pDLMedium = nullptr;
+ pDLMedium.reset();
return bOK;
}