summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-30 13:54:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-31 07:33:55 +0100
commitcdb750653e680c4c30239423ed201ed7a03eda8b (patch)
treebab7ad0a5bc7a4fce3e03d282f001bf312355090 /sd
parent2a8f860a7199585ad8ae61cfacdc39f2ac3afdb8 (diff)
loplugin:useuniqueptr in ParagraphObj::ParagraphObj
Change-Id: I4c5dcdad18988381b64479cad077234978437795 Reviewed-on: https://gerrit.libreoffice.org/62661 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index c6c538437ee8..eef5558dbed3 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -724,11 +724,9 @@ ParagraphObj::ParagraphObj(css::uno::Reference< css::text::XTextContent > const
css::uno::Any aAny( aXTextPortionE->nextElement() );
if ( aAny >>= aXCursorText )
{
- PortionObj* pPortionObj = new PortionObj( aXCursorText, !aXTextPortionE->hasMoreElements(), rFontCollection );
+ std::unique_ptr<PortionObj> pPortionObj(new PortionObj( aXCursorText, !aXTextPortionE->hasMoreElements(), rFontCollection ));
if ( pPortionObj->Count() )
- mvPortions.push_back( std::unique_ptr<PortionObj>(pPortionObj) );
- else
- delete pPortionObj;
+ mvPortions.push_back( std::move(pPortionObj) );
}
}
}