[Libreoffice-commits] core.git: include/oox oox/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 24 07:28:11 UTC 2020


 include/oox/drawingml/chart/modelbase.hxx                  |   10 
 include/oox/dump/dumperbase.hxx                            |    6 
 include/oox/ppt/animationspersist.hxx                      |    2 
 include/oox/ppt/timenode.hxx                               |    2 
 oox/source/core/contexthandler2.cxx                        |    2 
 oox/source/core/filterbase.cxx                             |    4 
 oox/source/core/relations.cxx                              |    2 
 oox/source/core/xmlfilterbase.cxx                          |    8 
 oox/source/drawingml/chart/chartdrawingfragment.cxx        |   14 
 oox/source/drawingml/chart/converterbase.cxx               |    2 
 oox/source/drawingml/chart/objectformatter.cxx             |   10 
 oox/source/drawingml/diagram/datamodel.cxx                 |    8 
 oox/source/drawingml/diagram/datamodelcontext.cxx          |    6 
 oox/source/drawingml/diagram/diagram.cxx                   |   14 
 oox/source/drawingml/diagram/diagramdefinitioncontext.cxx  |    6 
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx        |    2 
 oox/source/drawingml/diagram/layoutatomvisitors.cxx        |    2 
 oox/source/drawingml/diagram/layoutnodecontext.cxx         |   18 -
 oox/source/drawingml/shape.cxx                             |   26 -
 oox/source/drawingml/shapegroupcontext.cxx                 |    2 
 oox/source/drawingml/spdefcontext.cxx                      |    2 
 oox/source/drawingml/table/predefined-table-styles.cxx     |  208 ++++++++-----
 oox/source/drawingml/table/tablebackgroundstylecontext.cxx |    2 
 oox/source/drawingml/table/tablecell.cxx                   |    2 
 oox/source/drawingml/table/tablecellcontext.cxx            |    2 
 oox/source/drawingml/table/tablecontext.cxx                |    2 
 oox/source/drawingml/table/tableproperties.cxx             |    2 
 oox/source/drawingml/table/tablestylecellstylecontext.cxx  |    4 
 oox/source/drawingml/textbodycontext.cxx                   |    4 
 oox/source/drawingml/textparagraphproperties.cxx           |    2 
 oox/source/drawingml/textparagraphpropertiescontext.cxx    |    2 
 oox/source/drawingml/themeelementscontext.cxx              |    4 
 oox/source/dump/dumperbase.cxx                             |    6 
 oox/source/dump/pptxdumper.cxx                             |   12 
 oox/source/export/chartexport.cxx                          |    2 
 oox/source/export/shapes.cxx                               |    2 
 oox/source/helper/progressbar.cxx                          |    4 
 oox/source/ole/axbinaryreader.cxx                          |   12 
 oox/source/ole/axbinarywriter.cxx                          |    4 
 oox/source/ole/vbacontrol.cxx                              |   56 +--
 oox/source/ole/vbaproject.cxx                              |    4 
 oox/source/ppt/pptgraphicshapecontext.cxx                  |    2 
 oox/source/ppt/pptimport.cxx                               |    2 
 oox/source/ppt/pptshape.cxx                                |    4 
 oox/source/ppt/pptshapecontext.cxx                         |    2 
 oox/source/ppt/pptshapegroupcontext.cxx                    |    8 
 oox/source/ppt/presentationfragmenthandler.cxx             |   38 +-
 oox/source/ppt/slidefragmenthandler.cxx                    |    8 
 oox/source/ppt/slidepersist.cxx                            |   10 
 oox/source/ppt/timenodelistcontext.cxx                     |    2 
 oox/source/shape/LockedCanvasContext.cxx                   |    4 
 oox/source/shape/ShapeContextHandler.cxx                   |   14 
 oox/source/shape/ShapeFilterBase.cxx                       |    4 
 oox/source/shape/WpgContext.cxx                            |    4 
 54 files changed, 324 insertions(+), 262 deletions(-)

New commits:
commit 09d56ba6d907199b124929272db9b5f61e0bb2d9
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jan 24 08:31:14 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 24 08:27:40 2020 +0100

    loplugin:makeshared in oox
    
    Change-Id: I6502e7be4881834b143ec7207c432881b2ae263c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87322
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/oox/drawingml/chart/modelbase.hxx b/include/oox/drawingml/chart/modelbase.hxx
index 312d3e35e2bf..ffac39507d63 100644
--- a/include/oox/drawingml/chart/modelbase.hxx
+++ b/include/oox/drawingml/chart/modelbase.hxx
@@ -42,15 +42,15 @@ public:
 
     bool         is() const { return this->get() != 0; }
 
-    ModelType&   create() { this->reset( new ModelType ); return **this; }
+    ModelType&   create() { (*this) = std::make_shared<ModelType>(); return **this; }
     template< typename Param1Type >
-    ModelType&   create( const Param1Type& rParam1 ) { this->reset( new ModelType( rParam1 ) ); return **this; }
+    ModelType&   create( const Param1Type& rParam1 ) { (*this) = std::make_shared<ModelType>( rParam1 ); return **this; }
     template< typename Param1Type, typename Param2Type >
-    ModelType&   create( const Param1Type& rParam1, const Param2Type& rParam2 ) { this->reset( new ModelType( rParam1, rParam2 ) ); return **this; }
+    ModelType&   create( const Param1Type& rParam1, const Param2Type& rParam2 ) { (*this) = std::make_shared<ModelType>( rParam1, rParam2 ); return **this; }
 
-    ModelType&   getOrCreate() { if( !*this ) this->reset( new ModelType ); return **this; }
+    ModelType&   getOrCreate() { if( !*this ) (*this) = std::make_shared<ModelType>(); return **this; }
     template< typename Param1Type >
-    ModelType&   getOrCreate( const Param1Type& rParam1 ) { if( !*this ) this->reset( new ModelType( rParam1 ) ); return **this; }
+    ModelType&   getOrCreate( const Param1Type& rParam1 ) { if( !*this ) (*this) = std::make_shared<ModelType>( rParam1 ); return **this; }
 };
 
 template< typename ModelType >
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index bab76313fe69..5fe8cc2b0b90 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -142,7 +142,7 @@ public:
                             ::oox::BinaryInputStreamRef( pInStrm ) {}
 
     /*implicit*/ BinaryInputStreamRef( const css::uno::Reference< css::io::XInputStream >& rxInStrm ) :
-                            ::oox::BinaryInputStreamRef( new BinaryXInputStream( rxInStrm, true ) ) {}
+                            ::oox::BinaryInputStreamRef( std::make_shared<BinaryXInputStream>( rxInStrm, true ) ) {}
 
     template< typename StreamType >
     /*implicit*/ BinaryInputStreamRef( const std::shared_ptr< StreamType >& rxInStrm ) :
@@ -814,7 +814,7 @@ std::shared_ptr< ListType > SharedConfigData::createNameList( const OUString& rL
     std::shared_ptr< ListType > xList;
     if( !rListName.isEmpty() )
     {
-        xList.reset( new ListType( *this ) );
+        xList = std::make_shared<ListType>( *this );
         setNameList( rListName, xList );
     }
     return xList;
@@ -1684,7 +1684,7 @@ private:
 class SequenceRecordObjectBase : public RecordObjectBase
 {
 protected:
-                        SequenceRecordObjectBase() : mxRecData( new StreamDataSequence ) {}
+                        SequenceRecordObjectBase() : mxRecData( std::make_shared<StreamDataSequence>() ) {}
 
     using               RecordObjectBase::construct;
     void                construct(
diff --git a/include/oox/ppt/animationspersist.hxx b/include/oox/ppt/animationspersist.hxx
index cd18b9101615..aa808b4908fc 100644
--- a/include/oox/ppt/animationspersist.hxx
+++ b/include/oox/ppt/animationspersist.hxx
@@ -98,7 +98,7 @@ namespace oox { namespace ppt {
         static css::uno::Any convertList(const SlidePersistPtr & pSlide, const AnimationConditionList & l);
 
         AnimTargetElementPtr &     getTarget()
-            { if(!mpTarget) mpTarget.reset( new AnimTargetElement ); return mpTarget; }
+            { if(!mpTarget) mpTarget = std::make_shared<AnimTargetElement>(); return mpTarget; }
         css::uno::Any              maValue;
         sal_Int32                  mnType;
     private:
diff --git a/include/oox/ppt/timenode.hxx b/include/oox/ppt/timenode.hxx
index d4794ae96dee..6d8ab4794c46 100644
--- a/include/oox/ppt/timenode.hxx
+++ b/include/oox/ppt/timenode.hxx
@@ -81,7 +81,7 @@ namespace oox { namespace ppt {
         AnimTargetElementPtr const & getTarget()
             {
                 if( !mpTarget )
-                    mpTarget.reset( new AnimTargetElement );
+                    mpTarget = std::make_shared<AnimTargetElement>();
                 return mpTarget;
             }
 
diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx
index 7de45ef56c8c..0d06647bfcd6 100644
--- a/oox/source/core/contexthandler2.cxx
+++ b/oox/source/core/contexthandler2.cxx
@@ -40,7 +40,7 @@ struct ElementInfo
 };
 
 ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace ) :
-    mxContextStack( new ContextStack ),
+    mxContextStack( std::make_shared<ContextStack>() ),
     mnRootStackSize( 0 ),
     mbEnableTrimSpace( bEnableTrimSpace )
 {
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 2c763ac6311f..6e63a5653e7b 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -348,14 +348,14 @@ GraphicHelper& FilterBase::getGraphicHelper() const
 ModelObjectHelper& FilterBase::getModelObjectHelper() const
 {
     if( !mxImpl->mxModelObjHelper )
-        mxImpl->mxModelObjHelper.reset( new ModelObjectHelper( mxImpl->mxModelFactory ) );
+        mxImpl->mxModelObjHelper = std::make_shared<ModelObjectHelper>( mxImpl->mxModelFactory );
     return *mxImpl->mxModelObjHelper;
 }
 
 OleObjectHelper& FilterBase::getOleObjectHelper() const
 {
     if( !mxImpl->mxOleObjHelper )
-        mxImpl->mxOleObjHelper.reset(new OleObjectHelper(mxImpl->mxModelFactory, mxImpl->mxModel));
+        mxImpl->mxOleObjHelper = std::make_shared<OleObjectHelper>(mxImpl->mxModelFactory, mxImpl->mxModel);
     return *mxImpl->mxOleObjHelper;
 }
 
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx
index 5b60c98f7f0d..e7442fd9ebb7 100644
--- a/oox/source/core/relations.cxx
+++ b/oox/source/core/relations.cxx
@@ -71,7 +71,7 @@ const Relation* Relations::getRelationFromFirstType( const OUString& rType ) con
 
 RelationsRef Relations::getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const
 {
-    RelationsRef xRelations( new Relations( maFragmentPath ) );
+    RelationsRef xRelations = std::make_shared<Relations>( maFragmentPath );
     for (auto const& elem : maMap)
         if( elem.second.maType.equalsIgnoreAsciiCase( createOfficeDocRelationTypeTransitional(rType) ) ||
                 elem.second.maType.equalsIgnoreAsciiCase( createOfficeDocRelationTypeStrict(rType) ))
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index aae8be89b9f7..f381beb3aec4 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -361,7 +361,7 @@ bool XmlFilterBase::importFragment( const rtl::Reference<FragmentHandler>& rxHan
 
             // create the input source and parse the stream
             RecordInputSource aSource;
-            aSource.mxInStream.reset( new BinaryXInputStream( xInStrm, true ) );
+            aSource.mxInStream = std::make_shared<BinaryXInputStream>( xInStrm, true );
             aSource.maSystemId = aFragmentPath;
             aParser.parseStream( aSource );
             return true;
@@ -481,7 +481,7 @@ RelationsRef XmlFilterBase::importRelations( const OUString& rFragmentPath )
     if( !rxRelations )
     {
         // import and cache relations
-        rxRelations.reset( new Relations( rFragmentPath ) );
+        rxRelations = std::make_shared<Relations>( rFragmentPath );
         importFragment( new RelationsFragment( *this, rxRelations ) );
     }
     return rxRelations;
@@ -934,12 +934,12 @@ bool XmlFilterBase::implFinalizeExport( MediaDescriptor& rMediaDescriptor )
 
 StorageRef XmlFilterBase::implCreateStorage( const Reference< XInputStream >& rxInStream ) const
 {
-    return StorageRef( new ZipStorage( getComponentContext(), rxInStream ) );
+    return std::make_shared<ZipStorage>( getComponentContext(), rxInStream );
 }
 
 StorageRef XmlFilterBase::implCreateStorage( const Reference< XStream >& rxOutStream ) const
 {
-    return StorageRef( new ZipStorage( getComponentContext(), rxOutStream ) );
+    return std::make_shared<ZipStorage>( getComponentContext(), rxOutStream );
 }
 
 bool XmlFilterBase::isMSO2007Document() const
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx
index 63f7837b091f..add6faa0912a 100644
--- a/oox/source/drawingml/chart/chartdrawingfragment.cxx
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -140,10 +140,10 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con
             switch( nElement )
             {
                 case CDR_TOKEN( absSizeAnchor ):
-                    mxAnchor.reset( new ShapeAnchor( false ) );
+                    mxAnchor = std::make_shared<ShapeAnchor>( false );
                     return this;
                 case CDR_TOKEN( relSizeAnchor ):
-                    mxAnchor.reset( new ShapeAnchor( true ) );
+                    mxAnchor = std::make_shared<ShapeAnchor>( true );
                     return this;
             }
         break;
@@ -153,21 +153,21 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con
             switch( nElement )
             {
                 case CDR_TOKEN( sp ):
-                    mxShape.reset( new Shape( "com.sun.star.drawing.CustomShape" ) );
+                    mxShape = std::make_shared<Shape>( "com.sun.star.drawing.CustomShape" );
                     return new ShapeContext( *this, ShapePtr(), mxShape );
                 case CDR_TOKEN( cxnSp ):
-                    mxShape.reset( new Shape( "com.sun.star.drawing.ConnectorShape" ) );
+                    mxShape = std::make_shared<Shape>( "com.sun.star.drawing.ConnectorShape" );
                     return new ConnectorShapeContext( *this, ShapePtr(), mxShape );
                 case CDR_TOKEN( pic ):
-                    mxShape.reset( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) );
+                    mxShape = std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" );
                     return new GraphicShapeContext( *this, ShapePtr(), mxShape );
                 case CDR_TOKEN( graphicFrame ):
                     if( !mbOleSupport )
                         return nullptr;
-                    mxShape.reset( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) );
+                    mxShape = std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" );
                     return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape, true );
                 case CDR_TOKEN( grpSp ):
-                    mxShape.reset( new Shape( "com.sun.star.drawing.GroupShape" ) );
+                    mxShape = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
                     return new ShapeGroupContext( *this, ShapePtr(), mxShape );
 
                 case CDR_TOKEN( from ):
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index 069b75bbe83a..8162e860f0dc 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -205,7 +205,7 @@ ConverterRoot::ConverterRoot(
         const ChartSpaceModel& rChartModel,
         const Reference< XChartDocument >& rxChartDoc,
         const awt::Size& rChartSize ) :
-    mxData( new ConverterData( rFilter, rChartConverter, rChartModel, rxChartDoc, rChartSize ) )
+    mxData( std::make_shared<ConverterData>( rFilter, rChartConverter, rChartModel, rxChartDoc, rChartSize ) )
 {
 }
 
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index db1045c5cc33..2d264c4d0b2f 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -818,7 +818,7 @@ LineFormatter::LineFormatter( ObjectFormatterData& rData, const AutoFormatEntry*
 {
     if( pAutoFormatEntry )
     {
-        mxAutoLine.reset( new LineProperties );
+        mxAutoLine = std::make_shared<LineProperties>();
         mxAutoLine->maLineFill.moFillType = XML_noFill;
         if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
             if( const LineProperties* pLineProps = pTheme->getLineStyle( pAutoFormatEntry->mnThemedIdx ) )
@@ -852,7 +852,7 @@ FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry*
 {
     if( pAutoFormatEntry )
     {
-        mxAutoFill.reset( new FillProperties );
+        mxAutoFill = std::make_shared<FillProperties>();
         if( eObjType != OBJECTTYPE_CHARTSPACE )
             mxAutoFill->moFillType = XML_noFill;
         if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
@@ -893,7 +893,7 @@ TextFormatter::TextFormatter( ObjectFormatterData& rData, const AutoTextEntry* p
 {
     if( pAutoTextEntry )
     {
-        mxAutoText.reset( new TextCharacterProperties );
+        mxAutoText = std::make_shared<TextCharacterProperties>();
         if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
             if( const TextCharacterProperties* pTextProps = pTheme->getFontStyle( pAutoTextEntry->mnThemedFont ) )
                 *mxAutoText = *pTextProps;
@@ -978,7 +978,7 @@ ObjectFormatterData::ObjectFormatterData( const XmlFilterBase& rFilter, const Re
     mnMaxSeriesIdx( -1 )
 {
     for(auto const &rEntry : spObjTypeFormatEntries)
-        maTypeFormatters[ rEntry.meObjType ].reset( new ObjectTypeFormatter( *this, rEntry, rChartSpace, rEntry.meObjType ) );
+        maTypeFormatters[ rEntry.meObjType ] = std::make_shared<ObjectTypeFormatter>( *this, rEntry, rChartSpace, rEntry.meObjType );
 
     try
     {
@@ -999,7 +999,7 @@ ObjectTypeFormatter* ObjectFormatterData::getTypeFormatter( ObjectType eObjType
 }
 
 ObjectFormatter::ObjectFormatter( const XmlFilterBase& rFilter, const Reference< XChartDocument >& rxChartDoc, const ChartSpaceModel& rChartSpace ) :
-    mxData( new ObjectFormatterData( rFilter, rxChartDoc, rChartSpace ) )
+    mxData( std::make_shared<ObjectFormatterData>( rFilter, rxChartDoc, rChartSpace ) )
 {
 }
 
diff --git a/oox/source/drawingml/diagram/datamodel.cxx b/oox/source/drawingml/diagram/datamodel.cxx
index b29d13d6668c..90e10010b897 100644
--- a/oox/source/drawingml/diagram/datamodel.cxx
+++ b/oox/source/drawingml/diagram/datamodel.cxx
@@ -60,7 +60,7 @@ void Point::dump() const
 } // dgm namespace
 
 DiagramData::DiagramData() :
-    mpFillProperties( new FillProperties )
+    mpFillProperties( std::make_shared<FillProperties>() )
 {
 }
 
@@ -177,9 +177,9 @@ OUString DiagramData::addNode(const OUString& rText)
     dgm::Point aDataPoint;
     aDataPoint.mnType = XML_node;
     aDataPoint.msModelId = sNewNodeId;
-    aDataPoint.mpShape.reset(new Shape());
+    aDataPoint.mpShape = std::make_shared<Shape>();
     aDataPoint.mpShape->setTextBody(std::make_shared<TextBody>());
-    TextRunPtr pTextRun(new TextRun());
+    TextRunPtr pTextRun = std::make_shared<TextRun>();
     pTextRun->getText() = rText;
     aDataPoint.mpShape->getTextBody()->addParagraph().addRun(pTextRun);
 
@@ -196,7 +196,7 @@ OUString DiagramData::addNode(const OUString& rText)
     dgm::Point aPresPoint;
     aPresPoint.mnType = XML_pres;
     aPresPoint.msModelId = OStringToOUString(comphelper::xml::generateGUIDString(), RTL_TEXTENCODING_UTF8);
-    aPresPoint.mpShape.reset(new Shape());
+    aPresPoint.mpShape = std::make_shared<Shape>();
     aPresPoint.msPresentationAssociationId = aDataPoint.msModelId;
     if (!sPresSibling.isEmpty())
     {
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx
index 1879408b9105..46324c183cab 100644
--- a/oox/source/drawingml/diagram/datamodelcontext.cxx
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -230,13 +230,13 @@ public:
                 return new PropertiesContext( *this, mrPoint, rAttribs );
             case DGM_TOKEN( spPr ):
                 if( !mrPoint.mpShape )
-                    mrPoint.mpShape.reset( new Shape() );
+                    mrPoint.mpShape = std::make_shared<Shape>();
                 return new ShapePropertiesContext( *this, *(mrPoint.mpShape) );
             case DGM_TOKEN( t ):
             {
-                TextBodyPtr xTextBody( new TextBody );
+                TextBodyPtr xTextBody = std::make_shared<TextBody>();
                 if( !mrPoint.mpShape )
-                    mrPoint.mpShape.reset( new Shape() );
+                    mrPoint.mpShape = std::make_shared<Shape>();
                 mrPoint.mpShape->setTextBody( xTextBody );
                 return new TextBodyContext( *this, *xTextBody );
             }
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index abe580e3c735..efe03fd6ff2f 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -105,7 +105,7 @@ void Diagram::addTo( const ShapePtr & pParentShape )
         sortChildrenByZOrder(pParentShape);
     }
 
-    ShapePtr pBackground(new Shape("com.sun.star.drawing.CustomShape"));
+    ShapePtr pBackground = std::make_shared<Shape>("com.sun.star.drawing.CustomShape");
     pBackground->setSubType(XML_rect);
     pBackground->getCustomShapeProperties()->setShapePresetType(XML_rect);
     pBackground->setSize(pParentShape->getSize());
@@ -225,12 +225,12 @@ void loadDiagram( ShapePtr const & pShape,
                   const OUString& rColorStylePath,
                   const oox::core::Relations& rRelations )
 {
-    DiagramPtr pDiagram( new Diagram );
+    DiagramPtr pDiagram = std::make_shared<Diagram>();
 
-    DiagramDataPtr pData( new DiagramData() );
+    DiagramDataPtr pData = std::make_shared<DiagramData>();
     pDiagram->setData( pData );
 
-    DiagramLayoutPtr pLayout( new DiagramLayout(*pDiagram) );
+    DiagramLayoutPtr pLayout = std::make_shared<DiagramLayout>(*pDiagram);
     pDiagram->setLayout( pLayout );
 
     // data
@@ -343,11 +343,11 @@ void loadDiagram(ShapePtr const& pShape,
                  const uno::Reference<xml::dom::XDocument>& colorDom,
                  core::XmlFilterBase& rFilter)
 {
-    DiagramPtr pDiagram(new Diagram);
+    DiagramPtr pDiagram = std::make_shared<Diagram>();
 
     pDiagram->setData(pDiagramData);
 
-    DiagramLayoutPtr pLayout(new DiagramLayout(*pDiagram));
+    DiagramLayoutPtr pLayout = std::make_shared<DiagramLayout>(*pDiagram);
     pDiagram->setLayout(pLayout);
 
     // layout
@@ -410,7 +410,7 @@ void reloadDiagram(SdrObject* pObj, core::XmlFilterBase& rFilter)
             rProp.Value >>= colorDom;
     }
 
-    ShapePtr pShape(new Shape());
+    ShapePtr pShape = std::make_shared<Shape>();
     pShape->setDiagramType();
     pShape->setSize(awt::Size(xShape->getSize().Width * EMU_PER_HMM,
                               xShape->getSize().Height * EMU_PER_HMM));
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
index 62e88806e8e8..02d3777036d4 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
@@ -68,7 +68,7 @@ DiagramDefinitionContext::onCreateContext( ::sal_Int32 aElement,
         break;
     case DGM_TOKEN( layoutNode ):
     {
-        LayoutNodePtr pNode( new LayoutNode(mpLayout->getDiagram()) );
+        LayoutNodePtr pNode = std::make_shared<LayoutNode>(mpLayout->getDiagram());
         mpLayout->getNode() = pNode;
         pNode->setChildOrder( rAttribs.getToken( XML_chOrder, XML_b ) );
         pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
@@ -79,10 +79,10 @@ DiagramDefinitionContext::onCreateContext( ::sal_Int32 aElement,
         // TODO, does not matter for the UI. skip.
         return nullptr;
     case DGM_TOKEN( sampData ):
-        mpLayout->getSampData().reset( new DiagramData );
+        mpLayout->getSampData() = std::make_shared<DiagramData>();
         return new DataModelContext( *this, mpLayout->getSampData() );
     case DGM_TOKEN( styleData ):
-        mpLayout->getStyleData().reset( new DiagramData );
+        mpLayout->getStyleData() = std::make_shared<DiagramData>();
         return new DataModelContext( *this, mpLayout->getStyleData() );
     case DGM_TOKEN( cat ):
     case DGM_TOKEN( catLst ):
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 5bdccda0d0c7..f047a2c2670e 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -1342,7 +1342,7 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode
                 TextBodyPtr pTextBody=rShape->getTextBody();
                 if( !pTextBody )
                 {
-                    pTextBody.reset( new TextBody() );
+                    pTextBody = std::make_shared<TextBody>();
 
                     // also copy text attrs
                     pTextBody->getTextListStyle() =
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
index 5207a6d9b532..4a2bf97a034f 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
@@ -170,7 +170,7 @@ void ShapeTemplateVisitor::visit(ShapeAtom& rAtom)
 
     // TODO(F3): cloned shape shares all properties by reference,
     // don't change them!
-    mpShape.reset(new Shape(pCurrShape));
+    mpShape = std::make_shared<Shape>(pCurrShape);
     // Fill properties have to be changed as sometimes only the presentation node contains the blip
     // fill, unshare those.
     mpShape->cloneFillProperties();
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 28e492130ab5..06973178a0c7 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -114,14 +114,14 @@ public:
             case DGM_TOKEN( if ):
             {
                 // CT_When
-                ConditionAtomPtr pNode( new ConditionAtom(mpNode->getLayoutNode(), false, rAttribs.getFastAttributeList()) );
+                ConditionAtomPtr pNode = std::make_shared<ConditionAtom>(mpNode->getLayoutNode(), false, rAttribs.getFastAttributeList());
                 LayoutAtom::connect(mpNode, pNode);
                 return new IfContext( *this, rAttribs, pNode );
             }
             case DGM_TOKEN( else ):
             {
                 // CT_Otherwise
-                ConditionAtomPtr pNode( new ConditionAtom(mpNode->getLayoutNode(), true, rAttribs.getFastAttributeList()) );
+                ConditionAtomPtr pNode = std::make_shared<ConditionAtom>(mpNode->getLayoutNode(), true, rAttribs.getFastAttributeList());
                 LayoutAtom::connect(mpNode, pNode);
                 return new IfContext( *this, rAttribs, pNode );
             }
@@ -196,7 +196,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
     {
     case DGM_TOKEN( layoutNode ):
     {
-        LayoutNodePtr pNode( new LayoutNode(mpNode->getLayoutNode().getDiagram()) );
+        LayoutNodePtr pNode = std::make_shared<LayoutNode>(mpNode->getLayoutNode().getDiagram());
         LayoutAtom::connect(mpNode, pNode);
         pNode->setChildOrder( rAttribs.getToken( XML_chOrder, XML_b ) );
         pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
@@ -209,7 +209,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
 
         if( rAttribs.hasAttribute( XML_type ) )
         {
-            pShape.reset( new Shape("com.sun.star.drawing.CustomShape") );
+            pShape = std::make_shared<Shape>("com.sun.star.drawing.CustomShape");
             if (!rAttribs.getBool(XML_hideGeom, false))
             {
                 const sal_Int32 nType(rAttribs.getToken( XML_type, XML_obj ));
@@ -219,14 +219,14 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
         }
         else
         {
-            pShape.reset( new Shape("com.sun.star.drawing.GroupShape") );
+            pShape = std::make_shared<Shape>("com.sun.star.drawing.GroupShape");
         }
 
         pShape->setDiagramRotation(rAttribs.getInteger(XML_rot, 0) * PER_DEGREE);
 
         pShape->setZOrderOff(rAttribs.getInteger(XML_zOrderOff, 0));
 
-        ShapeAtomPtr pAtom( new ShapeAtom(mpNode->getLayoutNode(), pShape) );
+        ShapeAtomPtr pAtom = std::make_shared<ShapeAtom>(mpNode->getLayoutNode(), pShape);
         LayoutAtom::connect(mpNode, pAtom);
         return new ShapeContext( *this, ShapePtr(), pShape );
     }
@@ -235,21 +235,21 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
     case DGM_TOKEN( alg ):
     {
         // CT_Algorithm
-        AlgAtomPtr pAtom( new AlgAtom(mpNode->getLayoutNode()) );
+        AlgAtomPtr pAtom = std::make_shared<AlgAtom>(mpNode->getLayoutNode());
         LayoutAtom::connect(mpNode, pAtom);
         return new AlgorithmContext( *this, rAttribs, pAtom );
     }
     case DGM_TOKEN( choose ):
     {
         // CT_Choose
-        LayoutAtomPtr pAtom( new ChooseAtom(mpNode->getLayoutNode()) );
+        LayoutAtomPtr pAtom = std::make_shared<ChooseAtom>(mpNode->getLayoutNode());
         LayoutAtom::connect(mpNode, pAtom);
         return new ChooseContext( *this, rAttribs, pAtom );
     }
     case DGM_TOKEN( forEach ):
     {
         // CT_ForEach
-        ForEachAtomPtr pAtom( new ForEachAtom(mpNode->getLayoutNode(), rAttribs.getFastAttributeList()) );
+        ForEachAtomPtr pAtom = std::make_shared<ForEachAtom>(mpNode->getLayoutNode(), rAttribs.getFastAttributeList());
         LayoutAtom::connect(mpNode, pAtom);
         return new ForEachContext( *this, rAttribs, pAtom );
     }
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index c679a869e4c8..d055513686bd 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -116,16 +116,16 @@ using namespace ::com::sun::star::style;
 namespace oox::drawingml {
 
 Shape::Shape( const char* pServiceName, bool bDefaultHeight )
-: mpLinePropertiesPtr( new LineProperties )
-, mpShapeRefLinePropPtr( new LineProperties )
-, mpFillPropertiesPtr( new FillProperties )
-, mpShapeRefFillPropPtr( new FillProperties )
-, mpGraphicPropertiesPtr( new GraphicProperties )
-, mpCustomShapePropertiesPtr( new CustomShapeProperties )
-, mp3DPropertiesPtr( new Shape3DProperties )
-, mpEffectPropertiesPtr( new EffectProperties )
-, mpShapeRefEffectPropPtr( new EffectProperties )
-, mpMasterTextListStyle( new TextListStyle )
+: mpLinePropertiesPtr( std::make_shared<LineProperties>() )
+, mpShapeRefLinePropPtr( std::make_shared<LineProperties>() )
+, mpFillPropertiesPtr( std::make_shared<FillProperties>() )
+, mpShapeRefFillPropPtr( std::make_shared<FillProperties>() )
+, mpGraphicPropertiesPtr( std::make_shared<GraphicProperties>() )
+, mpCustomShapePropertiesPtr( std::make_shared<CustomShapeProperties>() )
+, mp3DPropertiesPtr( std::make_shared<Shape3DProperties>() )
+, mpEffectPropertiesPtr( std::make_shared<EffectProperties>() )
+, mpShapeRefEffectPropPtr( std::make_shared<EffectProperties>() )
+, mpMasterTextListStyle( std::make_shared<TextListStyle>() )
 , mnSubType( 0 )
 , meFrameType( FRAMETYPE_GENERIC )
 , mnRotation( 0 )
@@ -199,7 +199,7 @@ Shape::~Shape()
 table::TablePropertiesPtr const & Shape::getTableProperties()
 {
     if ( !mpTablePropertiesPtr.get() )
-        mpTablePropertiesPtr.reset( new table::TableProperties() );
+        mpTablePropertiesPtr = std::make_shared<table::TableProperties>();
     return mpTablePropertiesPtr;
 }
 
@@ -221,7 +221,7 @@ void Shape::setDefaults(bool bHeight)
 {
     OSL_ENSURE( meFrameType == FRAMETYPE_GENERIC, "Shape::setOleObjectType - multiple frame types" );
     meFrameType = FRAMETYPE_OLEOBJECT;
-    mxOleObjectInfo.reset( new ::oox::vml::OleObjectInfo( true ) );
+    mxOleObjectInfo = std::make_shared<::oox::vml::OleObjectInfo>( true );
     return *mxOleObjectInfo;
 }
 
@@ -233,7 +233,7 @@ ChartShapeInfo& Shape::setChartType( bool bEmbedShapes )
         msServiceName = "com.sun.star.drawing.temporaryForXMLImportOLE2Shape";
     else
         msServiceName = "com.sun.star.drawing.OLE2Shape";
-    mxChartShapeInfo.reset( new ChartShapeInfo( bEmbedShapes ) );
+    mxChartShapeInfo = std::make_shared<ChartShapeInfo>( bEmbedShapes );
     return *mxChartShapeInfo;
 }
 
diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx
index c7f84cf7ef1c..24ff3ec36943 100644
--- a/oox/source/drawingml/shapegroupcontext.cxx
+++ b/oox/source/drawingml/shapegroupcontext.cxx
@@ -88,7 +88,7 @@ ContextHandlerRef ShapeGroupContext::onCreateContext( sal_Int32 aElementToken, c
 */
     case XML_cxnSp:         // connector shape
         {
-            ShapePtr pShape(new Shape("com.sun.star.drawing.ConnectorShape"));
+            ShapePtr pShape = std::make_shared<Shape>("com.sun.star.drawing.ConnectorShape");
             pShape->setLockedCanvas(mpGroupShapePtr->getLockedCanvas());
             return new ConnectorShapeContext( *this, mpGroupShapePtr, pShape );
         }
diff --git a/oox/source/drawingml/spdefcontext.cxx b/oox/source/drawingml/spdefcontext.cxx
index 660ba623a655..68b169919780 100644
--- a/oox/source/drawingml/spdefcontext.cxx
+++ b/oox/source/drawingml/spdefcontext.cxx
@@ -45,7 +45,7 @@ ContextHandlerRef spDefContext::onCreateContext( sal_Int32 aElementToken, const
             return new ShapePropertiesContext( *this, mrDefaultObject );
         case A_TOKEN( bodyPr ):
         {
-            TextBodyPtr xTextBody( new TextBody );
+            TextBodyPtr xTextBody = std::make_shared<TextBody>();
             mrDefaultObject.setTextBody( xTextBody );
             return new TextBodyPropertiesContext( *this, rAttribs, xTextBody->getTextProperties() );
         }
diff --git a/oox/source/drawingml/table/predefined-table-styles.cxx b/oox/source/drawingml/table/predefined-table-styles.cxx
index 69d944c4e5da..4a8aec4cef1a 100644
--- a/oox/source/drawingml/table/predefined-table-styles.cxx
+++ b/oox/source/drawingml/table/predefined-table-styles.cxx
@@ -222,81 +222,145 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId)
 
     // Fill properties definitions for table parts
 
-    oox::drawingml::FillPropertiesPtr pWholeTblFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pFirstRowFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pFirstColFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pLastRowFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pLastColFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pBand1HFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pBand1VFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pBand2HFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pBand2VFillProperties(new oox::drawingml::FillProperties);
-    oox::drawingml::FillPropertiesPtr pTblBgFillProperties(new oox::drawingml::FillProperties);
+    oox::drawingml::FillPropertiesPtr pWholeTblFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pFirstRowFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pFirstColFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pLastRowFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pLastColFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pBand1HFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pBand1VFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pBand2HFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pBand2VFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
+    oox::drawingml::FillPropertiesPtr pTblBgFillProperties
+        = std::make_shared<oox::drawingml::FillProperties>();
 
     // Start table border line properties definitions for table parts
 
-    oox::drawingml::LinePropertiesPtr pWholeTblLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pWholeTblRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pWholeTblTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pWholeTblBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pWholeTblInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pWholeTblInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pFirstRowLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstRowRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstRowTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstRowBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstRowInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstRowInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pFirstColLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstColRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstColTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstColBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstColInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pFirstColInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pLastColLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastColRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastColTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastColBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastColInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastColInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pLastRowLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastRowRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastRowTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastRowBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastRowInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pLastRowInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pBand1HLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1HRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1HTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1HBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1HInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1HInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pBand1VLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1VRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1VTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1VBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1VInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand1VInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pBand2HLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2HRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2HTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2HBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2HInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2HInsideVBorder(new oox::drawingml::LineProperties);
-
-    oox::drawingml::LinePropertiesPtr pBand2VLeftBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2VRightBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2VTopBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2VBottomBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2VInsideHBorder(new oox::drawingml::LineProperties);
-    oox::drawingml::LinePropertiesPtr pBand2VInsideVBorder(new oox::drawingml::LineProperties);
+    oox::drawingml::LinePropertiesPtr pWholeTblLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pWholeTblRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pWholeTblTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pWholeTblBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pWholeTblInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pWholeTblInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pFirstRowLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstRowRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstRowTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstRowBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstRowInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstRowInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pFirstColLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstColRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstColTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstColBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstColInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pFirstColInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pLastColLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastColRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastColTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastColBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastColInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastColInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pLastRowLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastRowRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastRowTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastRowBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastRowInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pLastRowInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pBand1HLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1HRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1HTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1HBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1HInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1HInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pBand1VLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1VRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1VTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1VBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1VInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand1VInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pBand2HLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2HRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2HTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2HBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2HInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2HInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+
+    oox::drawingml::LinePropertiesPtr pBand2VLeftBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2VRightBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2VTopBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2VBottomBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2VInsideHBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
+    oox::drawingml::LinePropertiesPtr pBand2VInsideVBorder
+        = std::make_shared<oox::drawingml::LineProperties>();
 
     // End table border line properties definitions for table parts
 
diff --git a/oox/source/drawingml/table/tablebackgroundstylecontext.cxx b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
index fc56ae48f205..ee48a8358f61 100644
--- a/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
+++ b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
@@ -50,7 +50,7 @@ TableBackgroundStyleContext::onCreateContext( ::sal_Int32 aElementToken, const A
         case A_TOKEN( fill ):       // CT_FillProperties
             {
                 std::shared_ptr< FillProperties >& rxFillProperties = mrTableStyle.getBackgroundFillProperties();
-                rxFillProperties.reset( new FillProperties );
+                rxFillProperties = std::make_shared<FillProperties>();
                 return new FillPropertiesContext( *this, *rxFillProperties );
             }
         case A_TOKEN( fillRef ):    // CT_StyleMatrixReference
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index f8abf8b6a4b5..01d1fe7f1d96 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -50,7 +50,7 @@ using ::com::sun::star::table::BorderLine2;
 namespace oox::drawingml::table {
 
 TableCell::TableCell()
-: mpTextBody( new TextBody() )
+: mpTextBody( std::make_shared<TextBody>() )
 , mnRowSpan ( 1 )
 , mnGridSpan( 1 )
 , mbhMerge( false )
diff --git a/oox/source/drawingml/table/tablecellcontext.cxx b/oox/source/drawingml/table/tablecellcontext.cxx
index 6a029150e50e..dde824fb72f9 100644
--- a/oox/source/drawingml/table/tablecellcontext.cxx
+++ b/oox/source/drawingml/table/tablecellcontext.cxx
@@ -55,7 +55,7 @@ TableCellContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeLis
     {
     case A_TOKEN( txBody ):     // CT_TextBody
         {
-            oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody );
+            oox::drawingml::TextBodyPtr xTextBody = std::make_shared<oox::drawingml::TextBody>();
             mrTableCell.setTextBody( xTextBody );
             return new oox::drawingml::TextBodyContext( *this, *xTextBody );
         }
diff --git a/oox/source/drawingml/table/tablecontext.cxx b/oox/source/drawingml/table/tablecontext.cxx
index a753a3401e49..7f5c7db8cabe 100644
--- a/oox/source/drawingml/table/tablecontext.cxx
+++ b/oox/source/drawingml/table/tablecontext.cxx
@@ -62,7 +62,7 @@ TableContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& r
     case A_TOKEN( tableStyle ):         // CT_TableStyle
         {
             std::shared_ptr< TableStyle >& rTableStyle = mrTableProperties.getTableStyle();
-            rTableStyle.reset( new TableStyle() );
+            rTableStyle = std::make_shared<TableStyle>();
             return new TableStyleContext( *this, rAttribs, *rTableStyle );
         }
     case A_TOKEN( tableStyleId ):       // ST_Guid
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index d5fa302f7c3d..47c9cefe7c9f 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -236,7 +236,7 @@ void TableProperties::pullFromTextBody(oox::drawingml::TextBodyPtr pTextBody, sa
     {
         rTableCells.emplace_back();
         oox::drawingml::table::TableCell& rTableCell = rTableCells.back();
-        TextBodyPtr pCellTextBody(new TextBody);
+        TextBodyPtr pCellTextBody = std::make_shared<TextBody>();
         rTableCell.setTextBody(pCellTextBody);
 
         // Copy properties provided by <a:lstStyle>.
diff --git a/oox/source/drawingml/table/tablestylecellstylecontext.cxx b/oox/source/drawingml/table/tablestylecellstylecontext.cxx
index 9093e99c75c9..608177f943c0 100644
--- a/oox/source/drawingml/table/tablestylecellstylecontext.cxx
+++ b/oox/source/drawingml/table/tablestylecellstylecontext.cxx
@@ -67,7 +67,7 @@ TableStyleCellStyleContext::onCreateContext( ::sal_Int32 aElementToken, const At
                 if ( mnLineType != XML_none )
                 {
                     std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& rLineBorders = mrTableStylePart.getLineBorders();
-                    ::oox::drawingml::LinePropertiesPtr pLineProperties( new oox::drawingml::LineProperties );
+                    ::oox::drawingml::LinePropertiesPtr pLineProperties = std::make_shared<oox::drawingml::LineProperties>();
                     rLineBorders[ mnLineType ] = pLineProperties;
                     return new LinePropertiesContext( *this, rAttribs, *pLineProperties );
                 }
@@ -88,7 +88,7 @@ TableStyleCellStyleContext::onCreateContext( ::sal_Int32 aElementToken, const At
         case A_TOKEN( fill ):       // CT_FillProperties
             {
                 FillPropertiesPtr& rxFillProperties = mrTableStylePart.getFillProperties();
-                rxFillProperties.reset( new FillProperties );
+                rxFillProperties = std::make_shared<FillProperties>();
                 return new FillPropertiesContext( *this, *rxFillProperties );
             }
         case A_TOKEN( fillRef ):    // CT_StyleMatrixReference
diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
index c3221df82d4f..32b08575bc8a 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -71,13 +71,13 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
         case A_TOKEN( r ):      // "CT_RegularTextRun" Regular Text Run.
         case W_TOKEN( r ):
         {
-            TextRunPtr pRun( new TextRun );
+            TextRunPtr pRun = std::make_shared<TextRun>();
             mrParagraph.addRun( pRun );
             return new RegularTextRunContext( *this, pRun );
         }
         case A_TOKEN( br ): // "CT_TextLineBreak" Soft return line break (vertical tab).
         {
-            TextRunPtr pRun( new TextRun );
+            TextRunPtr pRun = std::make_shared<TextRun>();
             pRun->setLineBreak();
             mrParagraph.addRun( pRun );
             return new RegularTextRunContext( *this, pRun );
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index b35a8e21ce39..02129a6f674f 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -60,7 +60,7 @@ using ::com::sun::star::awt::FontDescriptor;
 namespace oox::drawingml {
 
 BulletList::BulletList( )
-: maBulletColorPtr( new Color() )
+: maBulletColorPtr( std::make_shared<Color>() )
 {
 }
 
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index e4d066c78085..e59a2babb392 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -238,7 +238,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
             break;
         case A_TOKEN( buBlip ):         // CT_TextBlipBullet
             {
-                mxBlipProps.reset( new BlipFillProperties );
+                mxBlipProps = std::make_shared<BlipFillProperties>();
                 return new BlipFillContext( *this, rAttribs, *mxBlipProps );
             }
         case A_TOKEN( tabLst ):         // CT_TextTabStopList
diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx
index ab2c6f972a71..8f9968784c61 100644
--- a/oox/source/drawingml/themeelementscontext.cxx
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -167,11 +167,11 @@ ContextHandlerRef FontSchemeContext::onCreateContext( sal_Int32 nElement, const
     switch( nElement )
     {
         case A_TOKEN( majorFont ):
-            mxCharProps.reset( new TextCharacterProperties );
+            mxCharProps = std::make_shared<TextCharacterProperties>();
             mrFontScheme[ XML_major ] = mxCharProps;
             return this;
         case A_TOKEN( minorFont ):
-            mxCharProps.reset( new TextCharacterProperties );
+            mxCharProps = std::make_shared<TextCharacterProperties>();
             mrFontScheme[ XML_minor ] = mxCharProps;
             return this;
 
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 21b87b1b4a66..f1b783a5fc68 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1410,7 +1410,7 @@ void Config::construct( const char* pcEnvVar, const Reference< XComponentContext
 {
     if( pcEnvVar && rxRootStrg.get() && !rSysFileName.isEmpty() )
         if( const char* pcFileName = ::getenv( pcEnvVar ) )
-            mxCfgData.reset( new SharedConfigData( OUString::createFromAscii( pcFileName ), rxContext, rxRootStrg, rSysFileName ) );
+            mxCfgData = std::make_shared<SharedConfigData>( OUString::createFromAscii( pcFileName ), rxContext, rxRootStrg, rSysFileName );
 }
 
 const OUString& Config::getStringOption( const String& rKey, const OUString& rDefault ) const
@@ -1925,7 +1925,7 @@ void OutputObjectBase::construct( const ObjectBase& rParent, const OUString& rSy
     if( ObjectBase::implIsValid() )
     {
         maSysFileName = rSysFileName;
-        mxOut.reset( new Output( getContext(), rSysFileName + OOX_DUMP_DUMPEXT ) );
+        mxOut = std::make_shared<Output>( getContext(), rSysFileName + OOX_DUMP_DUMPEXT );
     }
 }
 
@@ -2318,7 +2318,7 @@ void TextStreamObjectBase::implDump()
 void TextStreamObjectBase::constructTextStrmObj( rtl_TextEncoding eTextEnc )
 {
     if( mxStrm.get() )
-        mxTextStrm.reset( new TextInputStream( getContext(), *mxStrm, eTextEnc ) );
+        mxTextStrm = std::make_shared<TextInputStream>( getContext(), *mxStrm, eTextEnc );
 }
 
 TextLineStreamObject::TextLineStreamObject( const ObjectBase& rParent,
diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx
index 695fc4dfe721..f63792ad850f 100644
--- a/oox/source/dump/pptxdumper.cxx
+++ b/oox/source/dump/pptxdumper.cxx
@@ -79,17 +79,17 @@ void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm,
     {
         if( rStrgPath == "ppt" && rStrmName == "vbaProject.bin" )
         {
-            StorageRef xStrg( new ::oox::ole::OleStorage( getContext(), rxStrm, false ) );
+            StorageRef xStrg = std::make_shared<::oox::ole::OleStorage>( getContext(), rxStrm, false );
             VbaProjectStorageObject( *this, xStrg, rSysFileName ).dump();
         }
         else if ( rStrgPath == "ppt/embeddings" )
         {
-            StorageRef xStrg( new ::oox::ole::OleStorage( getContext(), rxStrm, false ) );
+            StorageRef xStrg = std::make_shared<::oox::ole::OleStorage>( getContext(), rxStrm, false );
             OleStorageObject( *this, xStrg, rSysFileName ).dump();
         }
         else if ( rStrgPath == "ppt/activeX" )
         {
-            StorageRef xStrg( new ::oox::ole::OleStorage( getContext(), rxStrm, true ) );
+            StorageRef xStrg = std::make_shared<::oox::ole::OleStorage>( getContext(), rxStrm, true );
             ActiveXStorageObject( *this, xStrg, rSysFileName ).dump();
         }
         else
@@ -103,7 +103,7 @@ void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm,
 
 Dumper::Dumper( const FilterBase& rFilter )
 {
-    ConfigRef xCfg( new Config( DUMP_PPTX_CONFIG_ENVVAR, rFilter ) );
+    ConfigRef xCfg = std::make_shared<Config>( DUMP_PPTX_CONFIG_ENVVAR, rFilter );
     DumperBase::construct( xCfg );
 }
 
@@ -111,8 +111,8 @@ Dumper::Dumper( const Reference< XComponentContext >& rxContext, const Reference
 {
     if( rxContext.is() && rxInStrm.is() )
     {
-        StorageRef xStrg( new ZipStorage( rxContext, rxInStrm ) );
-        ConfigRef xCfg( new Config( DUMP_PPTX_CONFIG_ENVVAR, rxContext, xStrg, rSysFileName ) );
+        StorageRef xStrg = std::make_shared<ZipStorage>( rxContext, rxInStrm );
+        ConfigRef xCfg = std::make_shared<Config>( DUMP_PPTX_CONFIG_ENVVAR, rxContext, xStrg, rSysFileName );
         DumperBase::construct( xCfg );
     }
 }
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 035aedc54023..46dc2285f839 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -421,7 +421,7 @@ ChartExport::ChartExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, Reference< f
     , mnXmlNamespace( nXmlNamespace )
     , mnSeriesCount(0)
     , mxChartModel( xModel )
-    , mpURLTransformer(new URLTransformer)
+    , mpURLTransformer(std::make_shared<URLTransformer>())
     , mbHasCategoryLabels( false )
     , mbIsCategoryPositionShifted( false )
     , mbHasZAxis( false )
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 4ba651f91dbc..5dedd509d2ff 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -362,7 +362,7 @@ ShapeExport::ShapeExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, ShapeHashMap
     , maMapModeDest( MapUnit::MapInch, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) )
     , mpShapeMap( pShapeMap ? pShapeMap : &maShapeMap )
 {
-    mpURLTransformer.reset(new URLTransformer);
+    mpURLTransformer = std::make_shared<URLTransformer>();
 }
 
 void ShapeExport::SetURLTranslator(const std::shared_ptr<URLTransformer>& pTransformer)
diff --git a/oox/source/helper/progressbar.cxx b/oox/source/helper/progressbar.cxx
index 351b8e1422f5..b3651f510a48 100644
--- a/oox/source/helper/progressbar.cxx
+++ b/oox/source/helper/progressbar.cxx
@@ -125,7 +125,7 @@ ISegmentProgressBarRef SubSegment::createSegment( double fLength )
 {
     SAL_WARN_IF( (0.0 >= fLength) || (fLength > getFreeLength()), "oox", "SubSegment::createSegment - invalid length" );
     fLength = getLimitedValue< double >( fLength, 0.0, getFreeLength() );
-    ISegmentProgressBarRef xSegment( new prv::SubSegment( *this, mfFreeStart, fLength ) );
+    ISegmentProgressBarRef xSegment = std::make_shared<prv::SubSegment>( *this, mfFreeStart, fLength );
     mfFreeStart += fLength;
     return xSegment;
 }
@@ -157,7 +157,7 @@ ISegmentProgressBarRef SegmentProgressBar::createSegment( double fLength )
 {
     SAL_WARN_IF( (0.0 >= fLength) || (fLength > getFreeLength()), "oox", "SegmentProgressBar::createSegment - invalid length" );
     fLength = getLimitedValue< double >( fLength, 0.0, getFreeLength() );
-    ISegmentProgressBarRef xSegment( new prv::SubSegment( maProgress, mfFreeStart, fLength ) );
+    ISegmentProgressBarRef xSegment = std::make_shared<prv::SubSegment>( maProgress, mfFreeStart, fLength );
     mfFreeStart += fLength;
     return xSegment;
 }
diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx
index 04f020663087..0b34d410bdb3 100644
--- a/oox/source/ole/axbinaryreader.cxx
+++ b/oox/source/ole/axbinaryreader.cxx
@@ -195,7 +195,7 @@ void AxBinaryPropertyReader::readBoolProperty( bool& orbValue, bool bReverse )
 void AxBinaryPropertyReader::readPairProperty( AxPairData& orPairData )
 {
     if( startNextProperty() )
-        maLargeProps.push_back( ComplexPropVector::value_type( new PairProperty( orPairData ) ) );
+        maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<PairProperty>( orPairData ) ) );
 }
 
 void AxBinaryPropertyReader::readStringProperty( OUString& orValue )
@@ -203,7 +203,7 @@ void AxBinaryPropertyReader::readStringProperty( OUString& orValue )
     if( startNextProperty() )
     {
         sal_uInt32 nSize = maInStrm.readAligned< sal_uInt32 >();
-        maLargeProps.push_back( ComplexPropVector::value_type( new StringProperty( orValue, nSize ) ) );
+        maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<StringProperty>( orValue, nSize ) ) );
     }
 }
 
@@ -212,14 +212,14 @@ void AxBinaryPropertyReader::readArrayStringProperty( std::vector<OUString>& orV
     if( startNextProperty() )
     {
         sal_uInt32 nSize = maInStrm.readAligned< sal_uInt32 >();
-        maLargeProps.push_back( ComplexPropVector::value_type( new ArrayStringProperty( orValue, nSize ) ) );
+        maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<ArrayStringProperty>( orValue, nSize ) ) );
     }
 }
 
 void AxBinaryPropertyReader::readGuidProperty( OUString& orGuid )
 {
     if( startNextProperty() )
-        maLargeProps.push_back( ComplexPropVector::value_type( new GuidProperty( orGuid ) ) );
+        maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<GuidProperty>( orGuid ) ) );
 }
 
 void AxBinaryPropertyReader::readFontProperty( AxFontData& orFontData )
@@ -228,7 +228,7 @@ void AxBinaryPropertyReader::readFontProperty( AxFontData& orFontData )
     {
         sal_Int16 nData = maInStrm.readAligned< sal_Int16 >();
         if( ensureValid( nData == -1 ) )
-            maStreamProps.push_back( ComplexPropVector::value_type( new FontProperty( orFontData ) ) );
+            maStreamProps.push_back( ComplexPropVector::value_type( std::make_shared<FontProperty>( orFontData ) ) );
     }
 }
 
@@ -238,7 +238,7 @@ void AxBinaryPropertyReader::readPictureProperty( StreamDataSequence& orPicData
     {
         sal_Int16 nData = maInStrm.readAligned< sal_Int16 >();
         if( ensureValid( nData == -1 ) )
-            maStreamProps.push_back( ComplexPropVector::value_type( new PictureProperty( orPicData ) ) );
+            maStreamProps.push_back( ComplexPropVector::value_type( std::make_shared<PictureProperty>( orPicData ) ) );
     }
 }
 
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
index 7d76aefc9086..9fee02620002 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -138,7 +138,7 @@ void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue )
 void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData )
 {
     startNextProperty();
-    maLargeProps.push_back( ComplexPropVector::value_type( new PairProperty( orPairData ) ) );
+    maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<PairProperty>( orPairData ) ) );
 }
 
 void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue )
@@ -146,7 +146,7 @@ void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue )
     sal_uInt32 nSize = orValue.getLength() * 2;
     setFlag(  nSize, AX_STRING_COMPRESSED, false );
     maOutStrm.writeAligned< sal_uInt32 >( nSize );
-    maLargeProps.push_back( ComplexPropVector::value_type( new StringProperty( orValue, nSize ) ) );
+    maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<StringProperty>( orValue, nSize ) ) );
     startNextProperty();
 }
 
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 7ea5482e1e72..32c7ffc43a09 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -146,11 +146,11 @@ public:
 
 VbaDummyFormControl::VbaDummyFormControl( const OUString& rName )
 {
-    mxSiteModel.reset( new VbaSiteModel );
+    mxSiteModel = std::make_shared<VbaSiteModel>();
     mxSiteModel->importProperty( XML_Name, rName );
     mxSiteModel->importProperty( XML_VariousPropertyBits, OUString( '0' ) );
 
-    mxCtrlModel.reset( new AxLabelModel );
+    mxCtrlModel = std::make_shared<AxLabelModel>();
     mxCtrlModel->setAwtModelMode();
     mxCtrlModel->importProperty( XML_Size, "10;10" );
 }
@@ -243,23 +243,23 @@ ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTabl
     {
         switch( nTypeIndex )
         {
-            case VBA_SITE_COMMANDBUTTON:    xCtrlModel.reset( new AxCommandButtonModel );   break;
-            case VBA_SITE_LABEL:            xCtrlModel.reset( new AxLabelModel );           break;
-            case VBA_SITE_IMAGE:            xCtrlModel.reset( new AxImageModel );           break;
-            case VBA_SITE_TOGGLEBUTTON:     xCtrlModel.reset( new AxToggleButtonModel );    break;
-            case VBA_SITE_CHECKBOX:         xCtrlModel.reset( new AxCheckBoxModel );        break;
-            case VBA_SITE_OPTIONBUTTON:     xCtrlModel.reset( new AxOptionButtonModel );    break;
-            case VBA_SITE_TEXTBOX:          xCtrlModel.reset( new AxTextBoxModel );         break;
-            case VBA_SITE_LISTBOX:          xCtrlModel.reset( new AxListBoxModel );         break;
-            case VBA_SITE_COMBOBOX:         xCtrlModel.reset( new AxComboBoxModel );        break;
-            case VBA_SITE_SPINBUTTON:       xCtrlModel.reset( new AxSpinButtonModel );      break;
-            case VBA_SITE_SCROLLBAR:        xCtrlModel.reset( new AxScrollBarModel );       break;
-            case VBA_SITE_TABSTRIP:         xCtrlModel.reset( new AxTabStripModel );
+            case VBA_SITE_COMMANDBUTTON:    xCtrlModel= std::make_shared<AxCommandButtonModel>();   break;
+            case VBA_SITE_LABEL:            xCtrlModel= std::make_shared<AxLabelModel>();           break;
+            case VBA_SITE_IMAGE:            xCtrlModel= std::make_shared<AxImageModel>();           break;
+            case VBA_SITE_TOGGLEBUTTON:     xCtrlModel= std::make_shared<AxToggleButtonModel>();    break;
+            case VBA_SITE_CHECKBOX:         xCtrlModel= std::make_shared<AxCheckBoxModel>();        break;
+            case VBA_SITE_OPTIONBUTTON:     xCtrlModel= std::make_shared<AxOptionButtonModel>();    break;
+            case VBA_SITE_TEXTBOX:          xCtrlModel= std::make_shared<AxTextBoxModel>();         break;
+            case VBA_SITE_LISTBOX:          xCtrlModel= std::make_shared<AxListBoxModel>();         break;
+            case VBA_SITE_COMBOBOX:         xCtrlModel= std::make_shared<AxComboBoxModel>();        break;
+            case VBA_SITE_SPINBUTTON:       xCtrlModel= std::make_shared<AxSpinButtonModel>();      break;
+            case VBA_SITE_SCROLLBAR:        xCtrlModel= std::make_shared<AxScrollBarModel>();       break;
+            case VBA_SITE_TABSTRIP:         xCtrlModel= std::make_shared<AxTabStripModel>();
             break;
-            case VBA_SITE_FRAME:            xCtrlModel.reset( new AxFrameModel );           break;
-            case VBA_SITE_MULTIPAGE:        xCtrlModel.reset( new AxMultiPageModel );
+            case VBA_SITE_FRAME:            xCtrlModel= std::make_shared<AxFrameModel>();           break;
+            case VBA_SITE_MULTIPAGE:        xCtrlModel= std::make_shared<AxMultiPageModel>();
             break;
-            case VBA_SITE_FORM:             xCtrlModel.reset( new AxPageModel );
+            case VBA_SITE_FORM:             xCtrlModel= std::make_shared<AxPageModel>();
             break;
             default:    OSL_FAIL( "VbaSiteModel::createControlModel - unknown type index" );
         }
@@ -271,11 +271,11 @@ ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTabl
         if( pGuid )
         {
             if( *pGuid == COMCTL_GUID_SCROLLBAR_60 )
-                xCtrlModel.reset( new ComCtlScrollBarModel( 6 ) );
+                xCtrlModel = std::make_shared<ComCtlScrollBarModel>( 6 );
             else if( *pGuid == COMCTL_GUID_PROGRESSBAR_50 )
-                xCtrlModel.reset( new ComCtlProgressBarModel( 5 ) );
+                xCtrlModel = std::make_shared<ComCtlProgressBarModel>( 5 );
             else if( *pGuid == COMCTL_GUID_PROGRESSBAR_60 )
-                xCtrlModel.reset( new ComCtlProgressBarModel( 6 ) );
+                xCtrlModel = std::make_shared<ComCtlProgressBarModel>( 6 );
         }
     }
 
@@ -527,7 +527,7 @@ void VbaFormControl::createControlModel( const AxClassTable& rClassTable )
 
 bool VbaFormControl::importSiteModel( BinaryInputStream& rInStrm )
 {
-    mxSiteModel.reset( new VbaSiteModel );
+    mxSiteModel = std::make_shared<VbaSiteModel>();
     return mxSiteModel->importBinaryModel( rInStrm );
 }
 
@@ -570,7 +570,7 @@ void VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm )
     bool bValid = !rInStrm.isEof();
     for( nSiteIndex = 0; bValid && (nSiteIndex < nSiteCount); ++nSiteIndex )
     {
-        VbaFormControlRef xControl( new VbaFormControl );
+        VbaFormControlRef xControl = std::make_shared<VbaFormControl>();
         maControls.push_back( xControl );
         bValid = xControl->importSiteModel( rInStrm );
     }
@@ -634,13 +634,13 @@ void VbaFormControl::finalizeEmbeddedControls()
                     control is needed. */
                 if( bLastWasOptionButton )
                 {
-                    VbaFormControlVectorRef xDummyGroup( new VbaFormControlVector );
+                    VbaFormControlVectorRef xDummyGroup = std::make_shared<VbaFormControlVector>();
                     aControlGroups.push_back( xDummyGroup );
                     OUString aName = aControlNames.generateDummyName();
-                    VbaFormControlRef xDummyControl( new VbaDummyFormControl( aName ) );
+                    VbaFormControlRef xDummyControl = std::make_shared<VbaDummyFormControl>( aName );
                     xDummyGroup->push_back( xDummyControl );
                 }
-                rxOptionGroup.reset( new VbaFormControlVector );
+                rxOptionGroup = std::make_shared<VbaFormControlVector>();
                 aControlGroups.push_back( rxOptionGroup );
             }
             /*  Append the option button to the control group (which is now
@@ -654,7 +654,7 @@ void VbaFormControl::finalizeEmbeddedControls()
             // open a new control group, if the last group is an option group
             if( bLastWasOptionButton || aControlGroups.empty() )
             {
-                VbaFormControlVectorRef xControlGroup( new VbaFormControlVector );
+                VbaFormControlVectorRef xControlGroup = std::make_shared<VbaFormControlVector>();
                 aControlGroups.push_back( xControlGroup );
             }
             // append the control to the last control group
@@ -817,11 +817,11 @@ void VbaUserForm::importForm( const Reference< XNameContainer >& rxDialogLib,
         aFormName = rModuleName;
     if( aFormName.isEmpty() )
         return;
-    mxSiteModel.reset( new VbaSiteModel );
+    mxSiteModel = std::make_shared<VbaSiteModel>();
     mxSiteModel->importProperty( XML_Name, aFormName );
 
     // read the form properties (caption is contained in this '03VBFrame' stream, not in the 'f' stream)
-    mxCtrlModel.reset( new AxUserFormModel );
+    mxCtrlModel = std::make_shared<AxUserFormModel>();
     OUString aKey, aValue;
     bool bExitLoop = false;
     while( !bExitLoop && !aFrameTextStrm.isEof() )
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index d53fa0780e0c..cf9ad880ed9a 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -326,7 +326,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
                 OSL_ENSURE( !aName.isEmpty(), "VbaProject::importVba - invalid module name" );
                 OSL_ENSURE( !maModules.has( aName ), "VbaProject::importVba - multiple modules with the same name" );
                 VbaModuleMap::mapped_type& rxModule = maModules[ aName ];
-                rxModule.reset( new VbaModule( mxContext, mxDocModel, aName, eTextEnc, bExecutable ) );
+                rxModule = std::make_shared<VbaModule>( mxContext, mxDocModel, aName, eTextEnc, bExecutable );
                 // read all remaining records until the MODULEEND record
                 rxModule->importDirRecords( aDirStrm );
                 OSL_ENSURE( !maModulesByStrm.has( rxModule->getStreamName() ), "VbaProject::importVba - multiple modules with the same stream name" );
@@ -435,7 +435,7 @@ void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicH
     {
         OSL_ENSURE( !maModules.has( dummyModule.first ) && !aDummyModules.has( dummyModule.first ), "VbaProject::importVba - multiple modules with the same name" );
         VbaModuleMap::mapped_type& rxModule = aDummyModules[ dummyModule.first ];
-        rxModule.reset( new VbaModule( mxContext, mxDocModel, dummyModule.first, eTextEnc, bExecutable ) );
+        rxModule = std::make_shared<VbaModule>( mxContext, mxDocModel, dummyModule.first, eTextEnc, bExecutable );
         rxModule->setType( dummyModule.second );
     }
 
diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx
index 94638e2e5070..32483139746e 100644
--- a/oox/source/ppt/pptgraphicshapecontext.cxx
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
@@ -184,7 +184,7 @@ ContextHandlerRef PPTGraphicShapeContext::onCreateContext( sal_Int32 aElementTok
 
     case PPT_TOKEN(txBody):
     {
-        oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody );
+        oox::drawingml::TextBodyPtr xTextBody = std::make_shared<oox::drawingml::TextBody>();
         mpShapePtr->setTextBody( xTextBody );
         return new oox::drawingml::TextBodyContext( *this, *xTextBody );
     }
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 184d0e5b5976..1a2ef397febc 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -60,7 +60,7 @@ XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr;
 
 PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) :
     XmlFilterBase( rxContext ),
-    mxChartConv( new ::oox::drawingml::chart::ChartConverter )
+    mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() )
 
 {
 #if OSL_DEBUG_LEVEL > 0
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index e9610112e5ee..44bdb3e76cec 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -284,7 +284,7 @@ void PPTShape::addShape(
             }
             if (pPlaceholder.get()) {
                 PPTShape* pPPTPlaceholder = dynamic_cast< PPTShape* >( pPlaceholder.get() );
-                TextListStylePtr pNewTextListStyle ( new TextListStyle() );
+                TextListStylePtr pNewTextListStyle = std::make_shared<TextListStyle>();
 
                 if (pPlaceholder->getTextBody()) {
 
@@ -338,7 +338,7 @@ void PPTShape::addShape(
             }
 
             if( aMasterTextListStyle.get() && getTextBody().get() ) {
-                TextListStylePtr aCombinedTextListStyle (new TextListStyle());
+                TextListStylePtr aCombinedTextListStyle = std::make_shared<TextListStyle>();
 
                 aCombinedTextListStyle->apply( *aMasterTextListStyle );
 
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index fd9ccfba5f8c..76741bee3869 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -172,7 +172,7 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con
 
         case PPT_TOKEN( txBody ):
         {
-            oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody( mpShapePtr->getTextBody() ) );
+            oox::drawingml::TextBodyPtr xTextBody = std::make_shared<oox::drawingml::TextBody>( mpShapePtr->getTextBody() );
             xTextBody->getTextProperties().maPropertyMap.setProperty( PROP_FontIndependentLineSpacing, true );
             mpShapePtr->setTextBody( xTextBody );
             return new oox::drawingml::TextBodyContext( *this, mpShapePtr );
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index 8990a12bd3fa..ce9fd1cd7ab1 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -96,9 +96,9 @@ ContextHandlerRef PPTShapeGroupContext::onCreateContext( sal_Int32 aElementToken
         return new ShapeStyleContext( getParser() );
 */
     case PPT_TOKEN( cxnSp ):        // connector shape
-        return new oox::drawingml::ConnectorShapeContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.ConnectorShape" ) ) );
+        return new oox::drawingml::ConnectorShapeContext( *this, mpGroupShapePtr, std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.ConnectorShape" ) );
     case PPT_TOKEN( grpSp ):        // group shape
-        return new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) );
+        return new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
     case PPT_TOKEN( sp ):           // Shape
         {
             auto pShape = std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.CustomShape" );
@@ -135,10 +135,10 @@ ContextHandlerRef PPTShapeGroupContext::onCreateContext( sal_Int32 aElementToken
             return new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape );
         }
     case PPT_TOKEN( pic ):          // CT_Picture
-        return new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr,  oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) );
+        return new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr,  std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) );
     case PPT_TOKEN( graphicFrame ): // CT_GraphicalObjectFrame
         {
-            pGraphicShape = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) );
+            pGraphicShape = std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.OLE2Shape" );
             return new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, pGraphicShape, true );
         }
     }
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 63ac3ee10953..dcad8358bd49 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -84,7 +84,7 @@ static std::map<PredefinedClrSchemeId, sal_Int32> PredefinedClrTokens =
 
 PresentationFragmentHandler::PresentationFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath)
     : FragmentHandler2( rFilter, rFragmentPath )
-    , mpTextListStyle( new TextListStyle )
+    , mpTextListStyle( std::make_shared<TextListStyle>() )
     , mbCommentAuthorsRead(false)
 {
     TextParagraphPropertiesVector& rParagraphDefaultsVector( mpTextListStyle->getListStyle() );
@@ -249,8 +249,8 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
         if( !aSlideFragmentPath.isEmpty() )
         {
             SlidePersistPtr pMasterPersistPtr;
-            SlidePersistPtr pSlidePersistPtr( new SlidePersist( rFilter, false, false, xSlide,
-                                ShapePtr( new PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
+            SlidePersistPtr pSlidePersistPtr = std::make_shared<SlidePersist>( rFilter, false, false, xSlide,
+                                std::make_shared<PPTShape>( Slide, "com.sun.star.drawing.GroupShape" ), mpTextListStyle );
 
             FragmentHandlerRef xSlideFragmentHandler( new SlideFragmentHandler( rFilter, aSlideFragmentPath, pSlidePersistPtr, Slide ) );
 
@@ -294,7 +294,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
                         }
 
                         pMasterPersistPtr = std::make_shared<SlidePersist>( rFilter, true, false, xMasterPage,
-                            ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle );
+                            std::make_shared<PPTShape>( Master, "com.sun.star.drawing.GroupShape" ), mpTextListStyle );
                         pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath );
                         rFilter.getMasterPages().push_back( pMasterPersistPtr );
                         rFilter.setActualSlidePersist( pMasterPersistPtr );
@@ -308,7 +308,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
                             std::map< OUString, oox::drawingml::ThemePtr >::iterator aIter2( rThemes.find( aThemeFragmentPath ) );
                             if( aIter2 == rThemes.end() )
                             {
-                                oox::drawingml::ThemePtr pThemePtr( new oox::drawingml::Theme() );
+                                oox::drawingml::ThemePtr pThemePtr = std::make_shared<oox::drawingml::Theme>();
                                 pMasterPersistPtr->setTheme( pThemePtr );
                                 Reference<xml::dom::XDocument> xDoc=
                                     rFilter.importFragment(aThemeFragmentPath);
@@ -362,8 +362,8 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
                         Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
                         if ( xNotesPage.is() )
                         {
-                            SlidePersistPtr pNotesPersistPtr( new SlidePersist( rFilter, false, true, xNotesPage,
-                                ShapePtr( new PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
+                            SlidePersistPtr pNotesPersistPtr = std::make_shared<SlidePersist>( rFilter, false, true, xNotesPage,
+                                std::make_shared<PPTShape>( Slide, "com.sun.star.drawing.GroupShape" ), mpTextListStyle );
                             FragmentHandlerRef xNotesFragmentHandler( new SlideFragmentHandler( getFilter(), aNotesFragmentPath, pNotesPersistPtr, Slide ) );
                             rFilter.getNotesPages().push_back( pNotesPersistPtr );
                             rFilter.setActualSlidePersist( pNotesPersistPtr );
@@ -382,12 +382,11 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
                 OUString aCommentAuthorsFragmentPath = "ppt/commentAuthors.xml";
                 Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY );
                 Reference< XDrawPage > xCommentAuthorsPage( xPresentationPage->getNotesPage() );
-                SlidePersistPtr pCommentAuthorsPersistPtr(
-                    new SlidePersist( rFilter, false, true, xCommentAuthorsPage,
-                                      ShapePtr(
-                                          new PPTShape(
-                                              Slide, "com.sun.star.drawing.GroupShape" ) ),
-                                      mpTextListStyle ) );
+                SlidePersistPtr pCommentAuthorsPersistPtr =
+                    std::make_shared<SlidePersist>( rFilter, false, true, xCommentAuthorsPage,
+                                      std::make_shared<PPTShape>(
+                                              Slide, "com.sun.star.drawing.GroupShape" ),
+                                      mpTextListStyle );
                 FragmentHandlerRef xCommentAuthorsFragmentHandler(
                     new SlideFragmentHandler( getFilter(),
                                               aCommentAuthorsFragmentPath,
@@ -401,13 +400,12 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
             {
                 Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY );
                 Reference< XDrawPage > xCommentsPage( xPresentationPage->getNotesPage() );
-                SlidePersistPtr pCommentsPersistPtr(
-                    new SlidePersist(
+                SlidePersistPtr pCommentsPersistPtr =
+                    std::make_shared<SlidePersist>(
                         rFilter, false, true, xCommentsPage,
-                        ShapePtr(
-                            new PPTShape(
-                                Slide, "com.sun.star.drawing.GroupShape" ) ),
-                        mpTextListStyle ) );
+                        std::make_shared<PPTShape>(
+                                Slide, "com.sun.star.drawing.GroupShape" ),
+                        mpTextListStyle );
 
                 FragmentHandlerRef xCommentsFragmentHandler(
                     new SlideFragmentHandler(
@@ -521,7 +519,7 @@ void PresentationFragmentHandler::finalizeImport()
         uno::Reference<io::XInputStream> xInStrm = getFilter().openInputStream(aVbaFragmentPath);
         if (xInStrm.is())
         {
-            StorageRef xPrjStrg(new oox::ole::OleStorage(getFilter().getComponentContext(), xInStrm, false));
+            StorageRef xPrjStrg = std::make_shared<oox::ole::OleStorage>(getFilter().getComponentContext(), xInStrm, false);
             getFilter().getVbaProject().importVbaProject(*xPrjStrg);
         }
     }
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index a0872d365b5f..c3ab59d4e9ae 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -110,9 +110,9 @@ SlideFragmentHandler::~SlideFragmentHandler()
         }
         if( !bNotesFragmentPathFound && !mpSlidePersistPtr->getMasterPersist() )
         {
-            TextListStylePtr pTextListStyle(new TextListStyle);
+            TextListStylePtr pTextListStyle = std::make_shared<TextListStyle>();
             SlidePersistPtr pMasterPersistPtr = std::make_shared<SlidePersist>( rFilter, true, true, mpSlidePersistPtr->getPage(),
-                                ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpSlidePersistPtr->getNotesTextStyle() );
+                                std::make_shared<PPTShape>( Master, "com.sun.star.drawing.GroupShape" ), mpSlidePersistPtr->getNotesTextStyle() );
             pMasterPersistPtr->setPath( aNotesFragmentPath );
             rFilter.getMasterPages().push_back( pMasterPersistPtr );
             FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, aNotesFragmentPath, pMasterPersistPtr, Master ) );
@@ -131,7 +131,7 @@ SlideFragmentHandler::~SlideFragmentHandler()
         {
             return new PPTShapeGroupContext(
                 *this, mpSlidePersistPtr, meShapeLocation, mpSlidePersistPtr->getShapes(),
-                oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) );
+                std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
         }
         break;
 
@@ -159,7 +159,7 @@ SlideFragmentHandler::~SlideFragmentHandler()
         return this;
     case PPT_TOKEN( bgPr ):             // CT_BackgroundProperties
         {
-            FillPropertiesPtr pFillPropertiesPtr( new FillProperties );
+            FillPropertiesPtr pFillPropertiesPtr =std::make_shared<FillProperties>();
             mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
             return new BackgroundPropertiesContext( *this, *pFillPropertiesPtr );
         }
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index f9ee8ef91d5b..abfe49163745 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -53,17 +53,17 @@ namespace oox::ppt {
 SlidePersist::SlidePersist( XmlFilterBase& rFilter, bool bMaster, bool bNotes,
     const css::uno::Reference< css::drawing::XDrawPage >& rxPage,
         oox::drawingml::ShapePtr const & pShapesPtr, const drawingml::TextListStylePtr & pDefaultTextStyle )
-: mpDrawingPtr( new oox::vml::Drawing( rFilter, rxPage, oox::vml::VMLDRAWING_POWERPOINT ) )
+: mpDrawingPtr( std::make_shared<oox::vml::Drawing>( rFilter, rxPage, oox::vml::VMLDRAWING_POWERPOINT ) )
 , mxPage( rxPage )
 , maShapesPtr( pShapesPtr )
 , mnLayoutValueToken( 0 )
 , mbMaster( bMaster )
 , mbNotes ( bNotes )
 , maDefaultTextStylePtr( pDefaultTextStyle )
-, maTitleTextStylePtr( new oox::drawingml::TextListStyle )
-, maBodyTextStylePtr( new oox::drawingml::TextListStyle )
-, maNotesTextStylePtr( new oox::drawingml::TextListStyle )
-, maOtherTextStylePtr( new oox::drawingml::TextListStyle )
+, maTitleTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
+, maBodyTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
+, maNotesTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
+, maOtherTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
 {
 #if OSL_DEBUG_LEVEL > 0
     mxDebugPage = mxPage;
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index a50ac20fcb48..075d2fbb589e 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -1029,7 +1029,7 @@ namespace oox::ppt {
             break;
         }
 
-        TimeNodePtr pNode(new TimeNode(nNodeType));
+        TimeNodePtr pNode = std::make_shared<TimeNode>(nNodeType);
         maList.push_back( pNode );
         FragmentHandler2 * pContext = TimeNodeContext::makeContext( *this, aElementToken, rAttribs.getFastAttributeList(), pNode );
 
diff --git a/oox/source/shape/LockedCanvasContext.cxx b/oox/source/shape/LockedCanvasContext.cxx
index ad6c9a7ea48f..2633f33d1fcd 100644
--- a/oox/source/shape/LockedCanvasContext.cxx
+++ b/oox/source/shape/LockedCanvasContext.cxx
@@ -39,14 +39,14 @@ LockedCanvasContext::~LockedCanvasContext() = default;
     case XML_sp:
     {
         oox::drawingml::ShapePtr pMasterShape;
-        mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape"));
+        mpShape = std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.CustomShape");
         mpShape->setLockedCanvas(true);
         return new oox::drawingml::ShapeContext(*this, pMasterShape, mpShape);
     }
     case XML_grpSp:
     {
         oox::drawingml::ShapePtr pMasterShape;
-        mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape"));
+        mpShape = std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape");
         mpShape->setLockedCanvas(true);
         return new oox::drawingml::ShapeGroupContext(*this, pMasterShape, mpShape);
     }
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index b42669490bd2..8650cc3c8863 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -91,7 +91,7 @@ uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getCh
             {
                 std::unique_ptr<ContextHandler2Helper> pFragmentHandler(
                         new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
-                mpShape.reset(new Shape("com.sun.star.drawing.OLE2Shape" ));
+                mpShape = std::make_shared<Shape>("com.sun.star.drawing.OLE2Shape" );
                 mxChartShapeContext.set(new ChartGraphicDataContext(*pFragmentHandler, mpShape, true));
                 break;
             }
@@ -165,12 +165,12 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element )
         switch (Element & 0xffff)
         {
             case XML_graphic:
-                mpShape.reset(new Shape("com.sun.star.drawing.GraphicObjectShape" ));
+                mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
                 mxGraphicShapeContext.set
                 (new GraphicalObjectFrameContext(*pFragmentHandler, pMasterShape, mpShape, true));
                 break;
             case XML_pic:
-                mpShape.reset(new Shape("com.sun.star.drawing.GraphicObjectShape" ));
+                mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
                 mxGraphicShapeContext.set
                 (new GraphicShapeContext(*pFragmentHandler, pMasterShape, mpShape));
                 break;
@@ -187,7 +187,7 @@ ShapeContextHandler::getDrawingShapeContext()
 {
     if (!mxDrawingFragmentHandler.is())
     {
-        mpDrawing.reset( new oox::vml::Drawing( *mxFilterBase, mxDrawPage, oox::vml::VMLDRAWING_WORD ) );
+        mpDrawing = std::make_shared<oox::vml::Drawing>( *mxFilterBase, mxDrawPage, oox::vml::VMLDRAWING_WORD );
         mxDrawingFragmentHandler.set
           (static_cast<ContextHandler *>
            (new oox::vml::DrawingFragment
@@ -215,7 +215,7 @@ ShapeContextHandler::getDiagramShapeContext()
     if (!mxDiagramShapeContext.is())
     {
         auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxFilterBase, msRelationFragmentPath);
-        mpShape.reset(new Shape());
+        mpShape = std::make_shared<Shape>();
         mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape));
     }
 
@@ -263,7 +263,7 @@ void SAL_CALL ShapeContextHandler::startFastElement
 {
     mxFilterBase->filter(maMediaDescriptor);
 
-    mpThemePtr.reset(new Theme());
+    mpThemePtr = std::make_shared<Theme>();
 
     if (Element == DGM_TOKEN(relIds) || Element == LC_TOKEN(lockedCanvas) || Element == C_TOKEN(chart) ||
         Element == WPS_TOKEN(wsp) || Element == WPG_TOKEN(wgp) || Element == OOX_TOKEN(dmlPicture, pic))
@@ -426,7 +426,7 @@ ShapeContextHandler::getShape()
                     if (!pDiagramGraphicDataContext)
                         break;
                     OUString aFragmentPath(pDiagramGraphicDataContext->getFragmentPathFromRelId(extDrawing));
-                    oox::drawingml::ShapePtr pShapePtr( new Shape( "com.sun.star.drawing.GroupShape" ) );
+                    oox::drawingml::ShapePtr pShapePtr = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
                     pShapePtr->setDiagramType();
                     mxFilterBase->importFragment(new ShapeDrawingFragmentHandler(*mxFilterBase, aFragmentPath, pShapePtr));
                     pShapePtr->setDiagramDoms(mpShape->getDiagramDoms());
diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx
index 6bc9babac5cf..7a32e82c3310 100644
--- a/oox/source/shape/ShapeFilterBase.cxx
+++ b/oox/source/shape/ShapeFilterBase.cxx
@@ -33,7 +33,7 @@ using namespace ::com::sun::star;
 
 ShapeFilterBase::ShapeFilterBase( const uno::Reference< uno::XComponentContext >& rxContext ) :
     XmlFilterBase( rxContext ),
-    mxChartConv( new ::oox::drawingml::chart::ChartConverter )
+    mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() )
 {
 }
 
@@ -118,7 +118,7 @@ GraphicHelper* ShapeFilterBase::implCreateGraphicHelper() const
 
 void ShapeFilterBase::importTheme()
 {
-    drawingml::ThemePtr pTheme(new drawingml::Theme);
+    drawingml::ThemePtr pTheme = std::make_shared<drawingml::Theme>();
     uno::Reference<beans::XPropertySet> xPropSet(getModel(), uno::UNO_QUERY_THROW);
     uno::Sequence<beans::PropertyValue> aGrabBag;
     xPropSet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
diff --git a/oox/source/shape/WpgContext.cxx b/oox/source/shape/WpgContext.cxx
index 01484c50c361..f7e17d123fef 100644
--- a/oox/source/shape/WpgContext.cxx
+++ b/oox/source/shape/WpgContext.cxx
@@ -24,7 +24,7 @@ namespace oox::shape
 WpgContext::WpgContext(FragmentHandler2 const& rParent)
     : FragmentHandler2(rParent)
 {
-    mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape"));
+    mpShape = std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape");
     mpShape->setWps(true);
 }
 
@@ -43,7 +43,7 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken
         // Don't set default character height, Writer has its own way to set
         // the default, and if we don't set it here, editeng properly inherits
         // it.
-        oox::drawingml::ShapePtr pShape(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false));
+        oox::drawingml::ShapePtr pShape = std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false);
         return new oox::drawingml::ShapeContext(*this, mpShape, pShape);
         // return new oox::shape::WpsContext(*this, uno::Reference<drawing::XShape>(),
         //                                   mpShape, pShape);


More information about the Libreoffice-commits mailing list