diff options
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 6 |
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) ); } } } |