sw/source/filter/ww8/ww8graf.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit ca35cd1136f30fa862ac24c6b3cf1c181450c3fa Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Sep 15 17:07:55 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Sep 18 10:35:39 2018 +0200 loplugin:useuniqueptr in SwWW8ImplReader::InsertAttrsAsDrawingAttrs Change-Id: I5aa8602ae56f60bf3f03fa3456e98fd7a90a49ba Reviewed-on: https://gerrit.libreoffice.org/60610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 4f538c6eb565..9c9588b418e7 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -609,7 +609,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(WW8_CP nStartCp, WW8_CP nEndCp, bool bDoingSymbol = false; sal_Unicode cReplaceSymbol = m_cSymbol; - SfxItemSet *pS = new SfxItemSet(m_pDrawEditEngine->GetEmptyItemSet()); + std::unique_ptr<SfxItemSet> pS(new SfxItemSet(m_pDrawEditEngine->GetEmptyItemSet())); WW8PLCFManResult aRes; std::deque<Chunk> aChunks; @@ -743,13 +743,12 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(WW8_CP nStartCp, WW8_CP nEndCp, { m_pDrawEditEngine->QuickSetAttribs( *pS, GetESelection(*m_pDrawEditEngine, nTextStart - nStartCp, nEnd - nStartCp ) ); - delete pS; - pS = new SfxItemSet(m_pDrawEditEngine->GetEmptyItemSet()); + pS.reset( new SfxItemSet(m_pDrawEditEngine->GetEmptyItemSet()) ); } } nStart = nNext; } - delete pS; + pS.reset(); // pop off as far as recorded location just in case there were some left // unclosed _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits