summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlflywriter.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-23 09:24:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-24 08:32:56 +0200
commitdba5dccfc5606ed6c6c888524460c9546143aaef (patch)
treed882efce0801e2f202bced80884a53582f3bd9cc /sw/source/filter/html/htmlflywriter.cxx
parent0b7fe7b2ceff8056b619b994fc765eb827f29bf3 (diff)
loplugin:useuniqueptr in SwHTMLWriter
Change-Id: I67f3dd615e798f8ac865b57332f6153530d81929 Reviewed-on: https://gerrit.libreoffice.org/57863 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/html/htmlflywriter.cxx')
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 79b111405704..5d13d8854556 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -345,7 +345,7 @@ void SwHTMLWriter::CollectFlyFrames()
}
if( !m_pHTMLPosFlyFrames )
- m_pHTMLPosFlyFrames = new SwHTMLPosFlyFrames;
+ m_pHTMLPosFlyFrames.reset(new SwHTMLPosFlyFrames);
SwHTMLPosFlyFrame *pNew = new SwHTMLPosFlyFrame(**aIter, pSdrObj, nMode);
m_pHTMLPosFlyFrames->insert( pNew );
@@ -385,8 +385,7 @@ bool SwHTMLWriter::OutFlyFrame( sal_uLong nNdIdx, sal_Int32 nContentIdx, HtmlPos
i--;
if( m_pHTMLPosFlyFrames->empty() )
{
- delete m_pHTMLPosFlyFrames;
- m_pHTMLPosFlyFrames = nullptr;
+ m_pHTMLPosFlyFrames.reset();
bRestart = true; // not really, only exit the loop
}