diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-21 12:41:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-22 18:52:14 +0200 |
commit | 688a520111a2dd3ab4cb3b846b561936d8a887bf (patch) | |
tree | dd3b298776d21ae85ec8715a00507d66f9c19489 /oox/source/ppt | |
parent | 4048ddc65a36fe0b8940019ded4fd1d58f907bcc (diff) |
use more make_shared in oox
Change-Id: I54c085a0720a381cf8bc27b2a4b4d2a3b2900918
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92620
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/ppt')
-rw-r--r-- | oox/source/ppt/slidefragmenthandler.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx index 58a9a60c09f2..d316c53f3b49 100644 --- a/oox/source/ppt/slidefragmenthandler.cxx +++ b/oox/source/ppt/slidefragmenthandler.cxx @@ -164,7 +164,10 @@ SlideFragmentHandler::~SlideFragmentHandler() const FillProperties *pFillProperties = nullptr; if( mpSlidePersistPtr->getTheme() ) pFillProperties = mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) ); - FillPropertiesPtr pFillPropertiesPtr( pFillProperties ? new FillProperties( *pFillProperties ) : new FillProperties ); + FillPropertiesPtr pFillPropertiesPtr = + pFillProperties + ? std::make_shared<FillProperties>( *pFillProperties ) + : std::make_shared<FillProperties>(); mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr ); ContextHandlerRef ret = new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() ); return ret; @@ -174,7 +177,10 @@ SlideFragmentHandler::~SlideFragmentHandler() case A_TOKEN( overrideClrMapping ): case PPT_TOKEN( clrMap ): // CT_ColorMapping { - oox::drawingml::ClrMapPtr pClrMapPtr( ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() || !mpSlidePersistPtr->getClrMap().get() ) ? new oox::drawingml::ClrMap : new oox::drawingml::ClrMap( *mpSlidePersistPtr->getClrMap() ) ); + oox::drawingml::ClrMapPtr pClrMapPtr = + ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() || !mpSlidePersistPtr->getClrMap().get() ) + ? std::make_shared<oox::drawingml::ClrMap>() + : std::make_shared<oox::drawingml::ClrMap>( *mpSlidePersistPtr->getClrMap() ); ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, rAttribs, *pClrMapPtr ); mpSlidePersistPtr->setClrMap( pClrMapPtr ); return ret; |