[Libreoffice-commits] core.git: chart2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jul 24 13:38:02 UTC 2018


 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx                           |    6 
 chart2/source/controller/chartapiwrapper/AreaWrapper.hxx                           |    2 
 chart2/source/controller/chartapiwrapper/AxisWrapper.cxx                           |   38 ++---
 chart2/source/controller/chartapiwrapper/AxisWrapper.hxx                           |    2 
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx                  |   30 ++--
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx                |   72 +++++-----
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx                |    2 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx                        |   28 +--
 chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx                        |    2 
 chart2/source/controller/chartapiwrapper/GridWrapper.cxx                           |    6 
 chart2/source/controller/chartapiwrapper/GridWrapper.hxx                           |    2 
 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx                         |   12 -
 chart2/source/controller/chartapiwrapper/LegendWrapper.hxx                         |    2 
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx                          |   10 -
 chart2/source/controller/chartapiwrapper/TitleWrapper.hxx                          |    2 
 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx                      |    8 -
 chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx                      |    2 
 chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx    |    9 -
 chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx    |    2 
 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx |   52 +++----
 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx |    6 
 chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx        |    8 -
 chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx        |    2 
 chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx          |    8 -
 chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx          |    4 
 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx                  |   34 ++--
 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx                  |    2 
 chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx            |    4 
 chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx            |    2 
 chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx                  |    4 
 chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx                  |    2 
 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx               |    8 -
 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx               |    2 
 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx            |   34 ++--
 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx            |    4 
 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx                |    6 
 chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx                |    2 
 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx               |   16 +-
 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx               |    4 
 chart2/source/controller/inc/ChartDocumentWrapper.hxx                              |    2 
 chart2/source/inc/WrappedIgnoreProperty.hxx                                        |    8 -
 chart2/source/inc/WrappedProperty.hxx                                              |    3 
 chart2/source/inc/WrappedPropertySet.hxx                                           |    2 
 chart2/source/tools/WrappedIgnoreProperty.cxx                                      |   52 +++----
 chart2/source/tools/WrappedPropertySet.cxx                                         |   43 +----
 45 files changed, 266 insertions(+), 285 deletions(-)

New commits:
commit ac8a1a146fa362ebe6849ae1a592a0629801971d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jul 23 14:45:22 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jul 24 15:37:37 2018 +0200

    pass WrappedProperty around by std::unique_ptr
    
    Change-Id: Ifcd9606541d1157027ca49a351dbbbe0bf153b12
    Reviewed-on: https://gerrit.libreoffice.org/57875
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index 069c26e6197a..66fed1b1b8be 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -146,11 +146,11 @@ const Sequence< beans::Property >& AreaWrapper::getPropertySequence()
     return *StaticAreaWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > AreaWrapper::createWrappedProperties()
+std::vector< std::unique_ptr<WrappedProperty> > AreaWrapper::createWrappedProperties()
 {
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
 
-    aWrappedProperties.push_back( new WrappedDirectStateProperty("LineStyle","LineStyle") );
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty("LineStyle","LineStyle") );
 
     return aWrappedProperties;
 }
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
index 90acc01e5d79..897450351b0e 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
@@ -73,7 +73,7 @@ public:
 protected:
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
 private:
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index fd03ae35f55c..c7efa0182005 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -604,23 +604,23 @@ const Sequence< beans::Property >& AxisWrapper::getPropertySequence()
     return *StaticAxisWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > AxisWrapper::createWrappedProperties()
-{
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
-
-    aWrappedProperties.push_back( new WrappedTextRotationProperty() );
-    aWrappedProperties.push_back( new WrappedProperty("Marks","MajorTickmarks") );
-    aWrappedProperties.push_back( new WrappedProperty("HelpMarks","MinorTickmarks") );
-    aWrappedProperties.push_back( new WrappedProperty("TextCanOverlap","TextOverlap") );
-    aWrappedProperties.push_back( new WrappedProperty("ArrangeOrder","ArrangeOrder") );
-    aWrappedProperties.push_back( new WrappedProperty("Visible","Show") );
-    aWrappedProperties.push_back( new WrappedDirectStateProperty("DisplayLabels","DisplayLabels") );
-    aWrappedProperties.push_back( new WrappedDirectStateProperty("TryStaggeringFirst","TryStaggeringFirst") );
-    aWrappedProperties.push_back( new WrappedDirectStateProperty("TextBreak","TextBreak") );
-    aWrappedProperties.push_back( new WrappedNumberFormatProperty(m_spChart2ModelContact) );
-    aWrappedProperties.push_back( new WrappedLinkNumberFormatProperty );
-    aWrappedProperties.push_back( new WrappedProperty("StackedText","StackCharacters") );
-    aWrappedProperties.push_back( new WrappedDirectStateProperty("CrossoverPosition","CrossoverPosition") );
+std::vector< std::unique_ptr<WrappedProperty> > AxisWrapper::createWrappedProperties()
+{
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
+
+    aWrappedProperties.emplace_back( new WrappedTextRotationProperty() );
+    aWrappedProperties.emplace_back( new WrappedProperty("Marks","MajorTickmarks") );
+    aWrappedProperties.emplace_back( new WrappedProperty("HelpMarks","MinorTickmarks") );
+    aWrappedProperties.emplace_back( new WrappedProperty("TextCanOverlap","TextOverlap") );
+    aWrappedProperties.emplace_back( new WrappedProperty("ArrangeOrder","ArrangeOrder") );
+    aWrappedProperties.emplace_back( new WrappedProperty("Visible","Show") );
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty("DisplayLabels","DisplayLabels") );
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty("TryStaggeringFirst","TryStaggeringFirst") );
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty("TextBreak","TextBreak") );
+    aWrappedProperties.emplace_back( new WrappedNumberFormatProperty(m_spChart2ModelContact) );
+    aWrappedProperties.emplace_back( new WrappedLinkNumberFormatProperty );
+    aWrappedProperties.emplace_back( new WrappedProperty("StackedText","StackCharacters") );
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty("CrossoverPosition","CrossoverPosition") );
     {
         WrappedGapwidthProperty* pWrappedGapwidthProperty( new WrappedGapwidthProperty( m_spChart2ModelContact ) );
         WrappedBarOverlapProperty* pWrappedBarOverlapProperty( new WrappedBarOverlapProperty( m_spChart2ModelContact ) );
@@ -632,8 +632,8 @@ const std::vector< WrappedProperty* > AxisWrapper::createWrappedProperties()
             nAxisIndex = 1;
         pWrappedGapwidthProperty->setDimensionAndAxisIndex( nDimensionIndex, nAxisIndex );
         pWrappedBarOverlapProperty->setDimensionAndAxisIndex( nDimensionIndex, nAxisIndex );
-        aWrappedProperties.push_back( pWrappedGapwidthProperty );
-        aWrappedProperties.push_back( pWrappedBarOverlapProperty );
+        aWrappedProperties.emplace_back( pWrappedGapwidthProperty );
+        aWrappedProperties.emplace_back( pWrappedBarOverlapProperty );
     }
 
     WrappedScaleProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
index 49ddd3c32319..6260249c9140 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
@@ -104,7 +104,7 @@ public:
 protected:
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
 private: //methods
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 7b91382525ab..2c54837a80cf 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1399,21 +1399,21 @@ const Sequence< beans::Property >& ChartDocumentWrapper::getPropertySequence()
     return *StaticChartDocumentWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > ChartDocumentWrapper::createWrappedProperties()
-{
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
-    aWrappedProperties.push_back( new WrappedDataSourceLabelsInFirstRowProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedDataSourceLabelsInFirstColumnProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedHasLegendProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedHasMainTitleProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedHasSubTitleProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedAddInProperty( *this ) );
-    aWrappedProperties.push_back( new WrappedBaseDiagramProperty( *this ) );
-    aWrappedProperties.push_back( new WrappedAdditionalShapesProperty( *this ) );
-    aWrappedProperties.push_back( new WrappedRefreshAddInAllowedProperty( *this ) );
-    aWrappedProperties.push_back( new WrappedIgnoreProperty("NullDate",Any() ) ); // i99104
-    aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableComplexChartTypes", uno::Any(true) ) );
-    aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableDataTableDialog", uno::Any(true) ) );
+std::vector< std::unique_ptr<WrappedProperty> > ChartDocumentWrapper::createWrappedProperties()
+{
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
+    aWrappedProperties.emplace_back( new WrappedDataSourceLabelsInFirstRowProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedDataSourceLabelsInFirstColumnProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedHasLegendProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedHasMainTitleProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedHasSubTitleProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedAddInProperty( *this ) );
+    aWrappedProperties.emplace_back( new WrappedBaseDiagramProperty( *this ) );
+    aWrappedProperties.emplace_back( new WrappedAdditionalShapesProperty( *this ) );
+    aWrappedProperties.emplace_back( new WrappedRefreshAddInAllowedProperty( *this ) );
+    aWrappedProperties.emplace_back( new WrappedIgnoreProperty("NullDate",Any() ) ); // i99104
+    aWrappedProperties.emplace_back( new WrappedIgnoreProperty("EnableComplexChartTypes", uno::Any(true) ) );
+    aWrappedProperties.emplace_back( new WrappedIgnoreProperty("EnableDataTableDialog", uno::Any(true) ) );
 
     return aWrappedProperties;
 }
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index ad989990613f..da0ca6a3131f 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -703,19 +703,19 @@ const Sequence< beans::Property >& DataSeriesPointWrapper::getPropertySequence()
         return *StaticPointWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedProperties()
+std::vector< std::unique_ptr<WrappedProperty> > DataSeriesPointWrapper::createWrappedProperties()
 {
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
 
     WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
 
     if( m_eType == DATA_SERIES )
     {
         WrappedStatisticProperties::addWrappedPropertiesForSeries( aWrappedProperties, m_spChart2ModelContact );
-        aWrappedProperties.push_back( new WrappedAttachedAxisProperty( m_spChart2ModelContact ) );
+        aWrappedProperties.emplace_back( new WrappedAttachedAxisProperty( m_spChart2ModelContact ) );
 
-        aWrappedProperties.push_back( new WrappedNumberFormatProperty(m_spChart2ModelContact) );
-        aWrappedProperties.push_back( new WrappedLinkNumberFormatProperty );
+        aWrappedProperties.emplace_back( new WrappedNumberFormatProperty(m_spChart2ModelContact) );
+        aWrappedProperties.emplace_back( new WrappedLinkNumberFormatProperty );
     }
 
     WrappedSymbolProperties::addWrappedPropertiesForSeries( aWrappedProperties, m_spChart2ModelContact );
@@ -724,39 +724,39 @@ const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedPrope
 
     //add unnamed line properties (different inner names here)
 
-    aWrappedProperties.push_back( new WrappedProperty("FillColor","Color") );
-    aWrappedProperties.push_back( new WrappedLineStyleProperty( this ) );
-    aWrappedProperties.push_back( new WrappedLineColorProperty( this ) );
-    aWrappedProperties.push_back( new WrappedSeriesAreaOrLineProperty("LineDashName","BorderDashName","LineDashName", this ) );
-    aWrappedProperties.push_back( new WrappedSeriesAreaOrLineProperty("LineTransparence","BorderTransparency","Transparency", this ) );
-    aWrappedProperties.push_back( new WrappedSeriesAreaOrLineProperty("LineWidth","BorderWidth","LineWidth", this ) );
-    aWrappedProperties.push_back( new WrappedProperty("FillStyle","FillStyle" ) );
-    aWrappedProperties.push_back( new WrappedProperty("FillTransparence","Transparency") );
-
-    aWrappedProperties.push_back( new WrappedIgnoreProperty("LineJoint", uno::Any( drawing::LineJoint_ROUND ) ) );
-    aWrappedProperties.push_back( new WrappedProperty("FillTransparenceGradientName","TransparencyGradientName") );
-    aWrappedProperties.push_back( new WrappedProperty("FillGradientName","GradientName") );
-    aWrappedProperties.push_back( new WrappedProperty("FillGradientStepCount","GradientStepCount") );
-    aWrappedProperties.push_back( new WrappedProperty("FillHatchName","HatchName") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapName","FillBitmapName") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBackground","FillBackground") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillColor","Color") );
+    aWrappedProperties.emplace_back( new WrappedLineStyleProperty( this ) );
+    aWrappedProperties.emplace_back( new WrappedLineColorProperty( this ) );
+    aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineDashName","BorderDashName","LineDashName", this ) );
+    aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineTransparence","BorderTransparency","Transparency", this ) );
+    aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineWidth","BorderWidth","LineWidth", this ) );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillStyle","FillStyle" ) );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillTransparence","Transparency") );
+
+    aWrappedProperties.emplace_back( new WrappedIgnoreProperty("LineJoint", uno::Any( drawing::LineJoint_ROUND ) ) );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillTransparenceGradientName","TransparencyGradientName") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillGradientName","GradientName") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillGradientStepCount","GradientStepCount") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillHatchName","HatchName") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapName","FillBitmapName") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBackground","FillBackground") );
 
     //bitmap properties
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapMode","FillBitmapMode") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapSizeX","FillBitmapSizeX") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapSizeY","FillBitmapSizeY") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapLogicalSize","FillBitmapLogicalSize") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapOffsetX","FillBitmapOffsetX") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapOffsetY","FillBitmapOffsetY") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapRectanglePoint","FillBitmapRectanglePoint") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapPositionOffsetX","FillBitmapPositionOffsetX") );
-    aWrappedProperties.push_back( new WrappedProperty("FillBitmapPositionOffsetY","FillBitmapPositionOffsetY") );
-
-    aWrappedProperties.push_back( new WrappedProperty("SolidType","Geometry3D") );
-    aWrappedProperties.push_back( new WrappedSegmentOffsetProperty() );
-    aWrappedProperties.push_back( new WrappedProperty("D3DPercentDiagonal","PercentDiagonal") );
-
-    aWrappedProperties.push_back( new WrappedTextRotationProperty() );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapMode","FillBitmapMode") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapSizeX","FillBitmapSizeX") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapSizeY","FillBitmapSizeY") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapLogicalSize","FillBitmapLogicalSize") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapOffsetX","FillBitmapOffsetX") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapOffsetY","FillBitmapOffsetY") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapRectanglePoint","FillBitmapRectanglePoint") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapPositionOffsetX","FillBitmapPositionOffsetX") );
+    aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapPositionOffsetY","FillBitmapPositionOffsetY") );
+
+    aWrappedProperties.emplace_back( new WrappedProperty("SolidType","Geometry3D") );
+    aWrappedProperties.emplace_back( new WrappedSegmentOffsetProperty() );
+    aWrappedProperties.emplace_back( new WrappedProperty("D3DPercentDiagonal","PercentDiagonal") );
+
+    aWrappedProperties.emplace_back( new WrappedTextRotationProperty() );
 
     return aWrappedProperties;
 }
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
index a8fe2c55421f..38a981791483 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
@@ -94,7 +94,7 @@ private:
 
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
     virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 1a4dbfc8cb5f..1e6960a6bc29 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1838,9 +1838,9 @@ const Sequence< beans::Property >& DiagramWrapper::getPropertySequence()
     return *StaticDiagramWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
+std::vector< std::unique_ptr<WrappedProperty> > DiagramWrapper::createWrappedProperties()
 {
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
 
     WrappedAxisAndGridExistenceProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
     WrappedAxisTitleExistenceProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
@@ -1855,18 +1855,18 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
     WrappedStockProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
     WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
 
-    aWrappedProperties.push_back( new WrappedDataRowSourceProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedStackingProperty( StackMode::YStacked,m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedStackingProperty( StackMode::YStackedPercent, m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedStackingProperty( StackMode::ZStacked, m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedDim3DProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedVerticalProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedNumberOfLinesProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedAttributedDataPointsProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedProperty( "StackedBarsConnected", "ConnectBars" ) );
-    aWrappedProperties.push_back( new WrappedSolidTypeProperty( m_spChart2ModelContact ) );
-    aWrappedProperties.push_back( new WrappedAutomaticSizeProperty() );
-    aWrappedProperties.push_back( new WrappedIncludeHiddenCellsProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedDataRowSourceProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedStackingProperty( StackMode::YStacked,m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedStackingProperty( StackMode::YStackedPercent, m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedStackingProperty( StackMode::ZStacked, m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedDim3DProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedVerticalProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedNumberOfLinesProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedAttributedDataPointsProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedProperty( "StackedBarsConnected", "ConnectBars" ) );
+    aWrappedProperties.emplace_back( new WrappedSolidTypeProperty( m_spChart2ModelContact ) );
+    aWrappedProperties.emplace_back( new WrappedAutomaticSizeProperty() );
+    aWrappedProperties.emplace_back( new WrappedIncludeHiddenCellsProperty( m_spChart2ModelContact ) );
 
     return aWrappedProperties;
 }
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
index 7452ae50ebff..d58e17fb471d 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
@@ -188,7 +188,7 @@ public:
 protected:
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
 private:
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index b5327cf740c6..d4df5f2cb025 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -158,11 +158,11 @@ const Sequence< beans::Property >& GridWrapper::getPropertySequence()
     return *StaticGridWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > GridWrapper::createWrappedProperties()
+std::vector< std::unique_ptr<WrappedProperty> > GridWrapper::createWrappedProperties()
 {
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
 
-    aWrappedProperties.push_back( new WrappedDefaultProperty( "LineColor", "LineColor", uno::Any( sal_Int32( 0x000000) ) ) ); // black
+    aWrappedProperties.emplace_back( new WrappedDefaultProperty( "LineColor", "LineColor", uno::Any( sal_Int32( 0x000000) ) ) ); // black
 
     return aWrappedProperties;
 }
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.hxx b/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
index a0a314da75ef..be84adc2eaec 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
@@ -72,7 +72,7 @@ public:
 protected:
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
 private:
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 0614d4844151..7eca9ea364fc 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -383,16 +383,16 @@ const Sequence< beans::Property >& LegendWrapper::getPropertySequence()
     return *StaticLegendWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > LegendWrapper::createWrappedProperties()
+std::vector< std::unique_ptr<WrappedProperty> > LegendWrapper::createWrappedProperties()
 {
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
 
-    aWrappedProperties.push_back( new WrappedLegendAlignmentProperty() );
-    aWrappedProperties.push_back( new WrappedProperty( "Expansion", "Expansion"));
+    aWrappedProperties.emplace_back( new WrappedLegendAlignmentProperty() );
+    aWrappedProperties.emplace_back( new WrappedProperty( "Expansion", "Expansion"));
     WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
     //same problem as for wall: the defaults in the old chart are different for different charttypes, so we need to export explicitly
-    aWrappedProperties.push_back( new WrappedDirectStateProperty("FillStyle", "FillStyle"));
-    aWrappedProperties.push_back( new WrappedDirectStateProperty("FillColor", "FillColor"));
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty("FillStyle", "FillStyle"));
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty("FillColor", "FillColor"));
     WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
     WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
 
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
index 049eb589b4ec..0e7082156766 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
@@ -81,7 +81,7 @@ public:
 protected:
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
 private:
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 01b9d8209a3d..90187cca0391 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -462,13 +462,13 @@ const Sequence< beans::Property >& TitleWrapper::getPropertySequence()
     return *StaticTitleWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > TitleWrapper::createWrappedProperties()
+std::vector< std::unique_ptr<WrappedProperty> > TitleWrapper::createWrappedProperties()
 {
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
 
-    aWrappedProperties.push_back( new WrappedTitleStringProperty( m_spChart2ModelContact->m_xContext ) );
-    aWrappedProperties.push_back( new WrappedTextRotationProperty( true ) );
-    aWrappedProperties.push_back( new WrappedStackedTextProperty() );
+    aWrappedProperties.emplace_back( new WrappedTitleStringProperty( m_spChart2ModelContact->m_xContext ) );
+    aWrappedProperties.emplace_back( new WrappedTextRotationProperty( true ) );
+    aWrappedProperties.emplace_back( new WrappedStackedTextProperty() );
     WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
     WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
     WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
index 8419c7d0b37d..cf94d36b66af 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
@@ -96,7 +96,7 @@ private:
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
 
     css::uno::Reference< css::beans::XPropertySet > getFirstCharacterPropertySet();
 
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index a05b3965b174..513a37ff2f56 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -135,16 +135,16 @@ const Sequence< beans::Property >& WallFloorWrapper::getPropertySequence()
     return *StaticWallFloorWrapperPropertyArray::get();
 }
 
-const std::vector< WrappedProperty* > WallFloorWrapper::createWrappedProperties()
+std::vector< std::unique_ptr<WrappedProperty> > WallFloorWrapper::createWrappedProperties()
 {
-    std::vector< ::chart::WrappedProperty* > aWrappedProperties;
+    std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
 
     // use direct state always, so that in XML the value is always
     // exported. Because in the old chart the defaults is as follows:
     // Floor: SOLID (new and old model default), Wall: NONE, except for some chart types (line, scatter)
     if( m_bWall )
-        aWrappedProperties.push_back( new WrappedDirectStateProperty( "FillStyle", "FillStyle" ));
-    aWrappedProperties.push_back( new WrappedDirectStateProperty( "FillColor", "FillColor" ));
+        aWrappedProperties.emplace_back( new WrappedDirectStateProperty( "FillStyle", "FillStyle" ));
+    aWrappedProperties.emplace_back( new WrappedDirectStateProperty( "FillColor", "FillColor" ));
 
     return aWrappedProperties;
 }
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
index 6572471a4901..5352d353eb46 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
@@ -59,7 +59,7 @@ public:
 protected:
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
 private:
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
index 52d52d159cab..5762f5fea185 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
@@ -98,11 +98,6 @@ enum
     PROP_CHART_AUTOMATIC_POSITION = FAST_PROPERTY_ID_START_CHART_AUTOPOSITION_PROP
 };
 
-void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList )
-{
-    rList.push_back( new WrappedAutomaticPositionProperty() );
-}
-
 }//anonymous namespace
 
 void WrappedAutomaticPositionProperties::addProperties( std::vector< Property > & rOutProperties )
@@ -114,9 +109,9 @@ void WrappedAutomaticPositionProperties::addProperties( std::vector< Property >
                   | beans::PropertyAttribute::MAYBEDEFAULT );
 }
 
-void WrappedAutomaticPositionProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList )
+void WrappedAutomaticPositionProperties::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList )
 {
-    lcl_addWrappedProperties( rList );
+    rList.emplace_back( new WrappedAutomaticPositionProperty() );
 }
 
 } //namespace wrapper
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
index ced3ae1a3a5e..35dc3f20e3f2 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
@@ -32,7 +32,7 @@ class WrappedAutomaticPositionProperties
 {
 public:
     static void addProperties( std::vector< css::beans::Property >& rOutProperties );
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList );
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList );
 };
 
 } //namespace wrapper
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index 72b8a48a3dce..538a65d49bb2 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -50,22 +50,22 @@ private: //member
     sal_Int32   m_nDimensionIndex;
 };
 
-void WrappedAxisAndGridExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedAxisAndGridExistenceProperties::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
             , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( true, true, 0, spChart2ModelContact ) );//x axis
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( true, false, 0, spChart2ModelContact ) );//x secondary axis
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( false, true, 0, spChart2ModelContact ) );//x grid
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( false, false, 0, spChart2ModelContact ) );//x help grid
-
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( true, true, 1, spChart2ModelContact ) );//y axis
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( true, false, 1, spChart2ModelContact ) );//y secondary axis
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( false, true, 1, spChart2ModelContact ) );//y grid
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( false, false, 1, spChart2ModelContact ) );//y help grid
-
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( true, true, 2, spChart2ModelContact ) );//z axis
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( false, true, 2, spChart2ModelContact ) );//z grid
-    rList.push_back( new WrappedAxisAndGridExistenceProperty( false, false, 2, spChart2ModelContact ) );//z help grid
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( true, true, 0, spChart2ModelContact ) );//x axis
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( true, false, 0, spChart2ModelContact ) );//x secondary axis
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( false, true, 0, spChart2ModelContact ) );//x grid
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( false, false, 0, spChart2ModelContact ) );//x help grid
+
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( true, true, 1, spChart2ModelContact ) );//y axis
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( true, false, 1, spChart2ModelContact ) );//y secondary axis
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( false, true, 1, spChart2ModelContact ) );//y grid
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( false, false, 1, spChart2ModelContact ) );//y help grid
+
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( true, true, 2, spChart2ModelContact ) );//z axis
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( false, true, 2, spChart2ModelContact ) );//z grid
+    rList.emplace_back( new WrappedAxisAndGridExistenceProperty( false, false, 2, spChart2ModelContact ) );//z help grid
 }
 
 WrappedAxisAndGridExistenceProperty::WrappedAxisAndGridExistenceProperty( bool bAxis, bool bMain, sal_Int32 nDimensionIndex
@@ -204,14 +204,14 @@ private: //member
     TitleHelper::eTitleType             m_eTitleType;
 };
 
-void WrappedAxisTitleExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedAxisTitleExistenceProperties::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
             , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedAxisTitleExistenceProperty( 0, spChart2ModelContact ) );//x axis title
-    rList.push_back( new WrappedAxisTitleExistenceProperty( 1, spChart2ModelContact ) );//y axis title
-    rList.push_back( new WrappedAxisTitleExistenceProperty( 2, spChart2ModelContact ) );//z axis title
-    rList.push_back( new WrappedAxisTitleExistenceProperty( 3, spChart2ModelContact ) );//secondary x axis title
-    rList.push_back( new WrappedAxisTitleExistenceProperty( 4, spChart2ModelContact ) );//secondary y axis title
+    rList.emplace_back( new WrappedAxisTitleExistenceProperty( 0, spChart2ModelContact ) );//x axis title
+    rList.emplace_back( new WrappedAxisTitleExistenceProperty( 1, spChart2ModelContact ) );//y axis title
+    rList.emplace_back( new WrappedAxisTitleExistenceProperty( 2, spChart2ModelContact ) );//z axis title
+    rList.emplace_back( new WrappedAxisTitleExistenceProperty( 3, spChart2ModelContact ) );//secondary x axis title
+    rList.emplace_back( new WrappedAxisTitleExistenceProperty( 4, spChart2ModelContact ) );//secondary y axis title
 }
 
 WrappedAxisTitleExistenceProperty::WrappedAxisTitleExistenceProperty(sal_Int32 nTitleIndex
@@ -307,14 +307,14 @@ private: //member
     sal_Int32   m_nDimensionIndex;
 };
 
-void WrappedAxisLabelExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedAxisLabelExistenceProperties::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
             , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedAxisLabelExistenceProperty( true, 0, spChart2ModelContact ) );//x axis
-    rList.push_back( new WrappedAxisLabelExistenceProperty( true, 1, spChart2ModelContact ) );//y axis
-    rList.push_back( new WrappedAxisLabelExistenceProperty( true, 2, spChart2ModelContact ) );//z axis
-    rList.push_back( new WrappedAxisLabelExistenceProperty( false, 0, spChart2ModelContact ) );//secondary x axis
-    rList.push_back( new WrappedAxisLabelExistenceProperty( false, 1, spChart2ModelContact ) );//secondary y axis
+    rList.emplace_back( new WrappedAxisLabelExistenceProperty( true, 0, spChart2ModelContact ) );//x axis
+    rList.emplace_back( new WrappedAxisLabelExistenceProperty( true, 1, spChart2ModelContact ) );//y axis
+    rList.emplace_back( new WrappedAxisLabelExistenceProperty( true, 2, spChart2ModelContact ) );//z axis
+    rList.emplace_back( new WrappedAxisLabelExistenceProperty( false, 0, spChart2ModelContact ) );//secondary x axis
+    rList.emplace_back( new WrappedAxisLabelExistenceProperty( false, 1, spChart2ModelContact ) );//secondary y axis
 }
 
 WrappedAxisLabelExistenceProperty::WrappedAxisLabelExistenceProperty(bool bMain, sal_Int32 nDimensionIndex
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx
index 2f3d363ec9cd..3d8c715963cc 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx
@@ -34,21 +34,21 @@ namespace wrapper
 class WrappedAxisAndGridExistenceProperties
 {
 public:
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
         , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
 class WrappedAxisTitleExistenceProperties
 {
 public:
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
         , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
 class WrappedAxisLabelExistenceProperties
 {
 public:
-   static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+   static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
        , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
index a1a2a99796a8..9163af43cbe8 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
@@ -41,12 +41,12 @@ WrappedCharacterHeightProperty_Base::~WrappedCharacterHeightProperty_Base()
 {
 }
 
-void WrappedCharacterHeightProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedCharacterHeightProperty::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
             , ReferenceSizePropertyProvider* pRefSizePropProvider  )
 {
-    rList.push_back( new WrappedCharacterHeightProperty( pRefSizePropProvider ) );
-    rList.push_back( new WrappedAsianCharacterHeightProperty( pRefSizePropProvider ) );
-    rList.push_back( new WrappedComplexCharacterHeightProperty( pRefSizePropProvider ) );
+    rList.emplace_back( new WrappedCharacterHeightProperty( pRefSizePropProvider ) );
+    rList.emplace_back( new WrappedAsianCharacterHeightProperty( pRefSizePropProvider ) );
+    rList.emplace_back( new WrappedComplexCharacterHeightProperty( pRefSizePropProvider ) );
 }
 
 void WrappedCharacterHeightProperty_Base::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
index e8c1d6c2f137..5e43b37aee17 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
@@ -58,7 +58,7 @@ public:
     explicit WrappedCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider );
     virtual ~WrappedCharacterHeightProperty() override;
 
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList, ReferenceSizePropertyProvider* pRefSizePropProvider );
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList, ReferenceSizePropertyProvider* pRefSizePropProvider );
 };
 
 class WrappedAsianCharacterHeightProperty : public WrappedCharacterHeightProperty_Base
diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
index 65588cfb3b60..c9d637179ba0 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
@@ -85,14 +85,14 @@ chart2::DataPointLabel lcl_CaptionToLabel( sal_Int32 nCaption )
     return aLabel;
 }
 
-void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
+void lcl_addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact
                                     , tSeriesOrDiagramPropertyType ePropertyType )
 {
     //if !spChart2ModelContact.get() is then the created properties do belong to a single series or single datapoint
     //otherwise they do belong to the whole diagram
 
-    rList.push_back( new WrappedDataCaptionProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedDataCaptionProperty( spChart2ModelContact, ePropertyType ) );
 }
 
 }//anonymous namespace
@@ -106,13 +106,13 @@ void WrappedDataCaptionProperties::addProperties( std::vector< Property > & rOut
                   | beans::PropertyAttribute::MAYBEDEFAULT );
 }
 
-void WrappedDataCaptionProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
+void WrappedDataCaptionProperties::addWrappedPropertiesForSeries( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
     lcl_addWrappedProperties( rList, spChart2ModelContact, DATA_SERIES );
 }
 
-void WrappedDataCaptionProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
+void WrappedDataCaptionProperties::addWrappedPropertiesForDiagram( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
     lcl_addWrappedProperties( rList, spChart2ModelContact, DIAGRAM );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx
index b430c563fa32..e92959aef66a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx
@@ -34,9 +34,9 @@ class WrappedDataCaptionProperties
 {
 public:
     static void addProperties( std::vector< css::beans::Property > & rOutProperties );
-    static void addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
+    static void addWrappedPropertiesForSeries( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
-    static void addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
+    static void addWrappedPropertiesForDiagram( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index acc994787c12..c8411df3dd33 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -103,25 +103,25 @@ WrappedScaleProperty::~WrappedScaleProperty()
 {
 }
 
-void WrappedScaleProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedScaleProperty::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
             , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_MAX, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_MIN, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_ORIGIN, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_STEPMAIN, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_STEPHELP, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_STEPHELP_COUNT, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_MAX, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_MIN, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_ORIGIN, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPMAIN, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPHELP, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AXIS_TYPE, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_DATE_INCREMENT, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_EXPLICIT_DATE_INCREMENT, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_LOGARITHMIC, spChart2ModelContact ) );
-    rList.push_back( new WrappedScaleProperty( SCALE_PROP_REVERSEDIRECTION, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_MAX, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_MIN, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_ORIGIN, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_STEPMAIN, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_STEPHELP, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_STEPHELP_COUNT, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_AUTO_MAX, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_AUTO_MIN, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_AUTO_ORIGIN, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPMAIN, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPHELP, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_AXIS_TYPE, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_DATE_INCREMENT, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_EXPLICIT_DATE_INCREMENT, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_LOGARITHMIC, spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleProperty( SCALE_PROP_REVERSEDIRECTION, spChart2ModelContact ) );
 }
 
 void WrappedScaleProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
index 3c4a1358b651..95de67dfcc51 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
@@ -56,7 +56,7 @@ public:
     WrappedScaleProperty(tScaleProperty eScaleProperty, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
     virtual ~WrappedScaleProperty() override;
 
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList, const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList, const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 
     virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index fa92ef88339d..863d109bf5ca 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -121,10 +121,10 @@ void WrappedScaleTextProperties::addProperties( std::vector< Property > & rOutPr
                   | beans::PropertyAttribute::MAYBEDEFAULT );
 }
 
-void WrappedScaleTextProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedScaleTextProperties::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                  , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedScaleTextProperty( spChart2ModelContact ) );
+    rList.emplace_back( new WrappedScaleTextProperty( spChart2ModelContact ) );
 }
 
 } //namespace wrapper
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
index 81e02427d8c1..c10df5a0d2cc 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
@@ -35,7 +35,7 @@ class WrappedScaleTextProperties
 {
 public:
     static void addProperties( std::vector< css::beans::Property >& rOutProperties );
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
index 46fe265a171d..b475a1004378 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
@@ -31,10 +31,10 @@ namespace chart
 namespace wrapper
 {
 
-void WrappedSceneProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedSceneProperty::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                 , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedD3DTransformMatrixProperty( spChart2ModelContact ) );
+    rList.emplace_back( new WrappedD3DTransformMatrixProperty( spChart2ModelContact ) );
 }
 
 WrappedD3DTransformMatrixProperty::WrappedD3DTransformMatrixProperty(
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
index 3a8b65412a63..d1dfc2a98ffd 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
@@ -33,7 +33,7 @@ namespace wrapper
 class WrappedSceneProperty
 {
 public:
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
         , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index 25ca7282567b..c47eb30ce54b 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -198,15 +198,15 @@ void WrappedSplineProperties::addProperties( std::vector< Property > & rOutPrope
                   | beans::PropertyAttribute::MAYBEVOID );
 }
 
-void WrappedSplineProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedSplineProperties::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedSplineTypeProperty( spChart2ModelContact ) );
-    rList.push_back(
+    rList.emplace_back( new WrappedSplineTypeProperty( spChart2ModelContact ) );
+    rList.emplace_back(
         new WrappedSplineProperty<sal_Int32>(
             CHART_UNONAME_SPLINE_ORDER, CHART_UNONAME_SPLINE_ORDER,
             uno::Any(sal_Int32(3)), spChart2ModelContact));
-    rList.push_back(
+    rList.emplace_back(
         new WrappedSplineProperty<sal_Int32>(
             CHART_UNONAME_SPLINE_RESOLUTION, CHART_UNONAME_CURVE_RESOLUTION,
             uno::Any(sal_Int32(20)), spChart2ModelContact));
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx
index 42526e6219a7..2614c67202f0 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx
@@ -34,7 +34,7 @@ class WrappedSplineProperties
 {
 public:
     static void addProperties( std::vector< css::beans::Property > & rOutProperties );
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index ed91053b1944..f71cb2977d66 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -911,26 +911,26 @@ enum
                series, if false, it is for the whole diagram, i.e. for all
                series
  */
-void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
+void lcl_addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
             , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact
             , tSeriesOrDiagramPropertyType ePropertyType )
 {
-    rList.push_back( new WrappedConstantErrorLowProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedConstantErrorHighProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedMeanValueProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedErrorCategoryProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedErrorBarStyleProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedPercentageErrorProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedErrorMarginProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedErrorIndicatorProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedErrorBarRangePositiveProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedErrorBarRangeNegativeProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedRegressionCurvesProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedStatisticPropertySetProperty(
+    rList.emplace_back( new WrappedConstantErrorLowProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedConstantErrorHighProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedMeanValueProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedErrorCategoryProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedErrorBarStyleProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedPercentageErrorProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedErrorMarginProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedErrorIndicatorProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedErrorBarRangePositiveProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedErrorBarRangeNegativeProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedRegressionCurvesProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedStatisticPropertySetProperty(
                          WrappedStatisticPropertySetProperty::PROPERTY_SET_TYPE_REGRESSION, spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedStatisticPropertySetProperty(
+    rList.emplace_back( new WrappedStatisticPropertySetProperty(
                          WrappedStatisticPropertySetProperty::PROPERTY_SET_TYPE_ERROR_BAR,  spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedStatisticPropertySetProperty(
+    rList.emplace_back( new WrappedStatisticPropertySetProperty(
                          WrappedStatisticPropertySetProperty::PROPERTY_SET_TYPE_MEAN_VALUE, spChart2ModelContact, ePropertyType ) );
 }
 
@@ -1014,13 +1014,13 @@ void WrappedStatisticProperties::addProperties( std::vector< Property > & rOutPr
                   | beans::PropertyAttribute::MAYBEVOID );
 }
 
-void WrappedStatisticProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
+void WrappedStatisticProperties::addWrappedPropertiesForSeries( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
     lcl_addWrappedProperties( rList, spChart2ModelContact, DATA_SERIES );
 }
 
-void WrappedStatisticProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
+void WrappedStatisticProperties::addWrappedPropertiesForDiagram( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
     lcl_addWrappedProperties( rList, spChart2ModelContact, DIAGRAM  );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx
index 0cf09984b867..250d9255f55d 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx
@@ -34,9 +34,9 @@ class WrappedStatisticProperties
 {
 public:
     static void addProperties( std::vector< css::beans::Property > & rOutProperties );
-    static void addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
+    static void addWrappedPropertiesForSeries( std::vector< std::unique_ptr<WrappedProperty> >& rList
                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
-    static void addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
+    static void addWrappedPropertiesForDiagram( std::vector< std::unique_ptr<WrappedProperty> >& rList
                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
index a7db7ce4e8fc..7986298ba744 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -257,11 +257,11 @@ void WrappedStockProperties::addProperties( std::vector< Property > & rOutProper
                   | beans::PropertyAttribute::MAYBEVOID );
 }
 
-void WrappedStockProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
+void WrappedStockProperties::addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
-    rList.push_back( new WrappedVolumeProperty( spChart2ModelContact ) );
-    rList.push_back( new WrappedUpDownProperty( spChart2ModelContact ) );
+    rList.emplace_back( new WrappedVolumeProperty( spChart2ModelContact ) );
+    rList.emplace_back( new WrappedUpDownProperty( spChart2ModelContact ) );
 }
 
 } //namespace wrapper
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx
index f15320d41b22..14fbd39f445d 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx
@@ -34,7 +34,7 @@ class WrappedStockProperties
 {
 public:
     static void addProperties( std::vector< css::beans::Property > & rOutProperties );
-    static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+    static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
             , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 8ec8cb51464b..01e7c07bb562 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -159,15 +159,15 @@ void lcl_setSymbolTypeToSymbol( sal_Int32 nSymbolType, chart2::Symbol& rSymbol )
     }
 }
 
-void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
+void lcl_addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact
                                     , tSeriesOrDiagramPropertyType ePropertyType )
 {
-    rList.push_back( new WrappedSymbolTypeProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedSymbolBitmapURLProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedSymbolBitmapProperty( spChart2ModelContact, ePropertyType ) );
-    rList.push_back( new WrappedSymbolSizeProperty( spChart2ModelContact, ePropertyType  ) );
-    rList.push_back( new WrappedSymbolAndLinesProperty( spChart2ModelContact, ePropertyType  ) );
+    rList.emplace_back( new WrappedSymbolTypeProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedSymbolBitmapURLProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedSymbolBitmapProperty( spChart2ModelContact, ePropertyType ) );
+    rList.emplace_back( new WrappedSymbolSizeProperty( spChart2ModelContact, ePropertyType  ) );
+    rList.emplace_back( new WrappedSymbolAndLinesProperty( spChart2ModelContact, ePropertyType  ) );
 }
 
 }//anonymous namespace
@@ -205,13 +205,13 @@ void WrappedSymbolProperties::addProperties( std::vector< Property > & rOutPrope
                   | beans::PropertyAttribute::MAYBEDEFAULT );
 }
 
-void WrappedSymbolProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
+void WrappedSymbolProperties::addWrappedPropertiesForSeries( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
     lcl_addWrappedProperties( rList, spChart2ModelContact, DATA_SERIES );
 }
 
-void WrappedSymbolProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
+void WrappedSymbolProperties::addWrappedPropertiesForDiagram( std::vector< std::unique_ptr<WrappedProperty> >& rList
                                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
 {
     lcl_addWrappedProperties( rList, spChart2ModelContact, DIAGRAM );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx
index 1b94f5753b09..29eb04ea4957 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx
@@ -34,9 +34,9 @@ class WrappedSymbolProperties
 {
 public:
     static void addProperties( std::vector< css::beans::Property > & rOutProperties );
-    static void addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
+    static void addWrappedPropertiesForSeries( std::vector< std::unique_ptr<WrappedProperty> >& rList
                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
-    static void addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
+    static void addWrappedPropertiesForDiagram( std::vector< std::unique_ptr<WrappedProperty> >& rList
                     , const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
 };
 
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
index 1fb605aed2f4..8b4945c34d50 100644
--- a/chart2/source/controller/inc/ChartDocumentWrapper.hxx
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -138,7 +138,7 @@ protected:
 
     // ____ WrappedPropertySet ____
     virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
-    virtual const std::vector< WrappedProperty* > createWrappedProperties() override;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
 
 private: //methods
diff --git a/chart2/source/inc/WrappedIgnoreProperty.hxx b/chart2/source/inc/WrappedIgnoreProperty.hxx
index 2dfed48aa838..185e06d663a5 100644
--- a/chart2/source/inc/WrappedIgnoreProperty.hxx
+++ b/chart2/source/inc/WrappedIgnoreProperty.hxx
@@ -51,11 +51,11 @@ private:
 class OOO_DLLPUBLIC_CHARTTOOLS WrappedIgnoreProperties
 {
 public:
-    static void addIgnoreLineProperties( std::vector< WrappedProperty* >& rList );
+    static void addIgnoreLineProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList );
 
-    static void addIgnoreFillProperties( std::vector< WrappedProperty* >& rList );
-    SAL_DLLPRIVATE static void addIgnoreFillProperties_without_BitmapProperties( std::vector< WrappedProperty* >& rList );
-    SAL_DLLPRIVATE static void addIgnoreFillProperties_only_BitmapProperties( std::vector< WrappedProperty* >& rList );
+    static void addIgnoreFillProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList );
+    SAL_DLLPRIVATE static void addIgnoreFillProperties_without_BitmapProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList );
+    SAL_DLLPRIVATE static void addIgnoreFillProperties_only_BitmapProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList );
 };
 
 } //namespace chart
diff --git a/chart2/source/inc/WrappedProperty.hxx b/chart2/source/inc/WrappedProperty.hxx
index cae7f323652e..b11ee8af312b 100644
--- a/chart2/source/inc/WrappedProperty.hxx
+++ b/chart2/source/inc/WrappedProperty.hxx
@@ -24,6 +24,7 @@
 #include "charttoolsdllapi.hxx"
 
 #include <map>
+#include <memory>
 
 namespace chart
 {
@@ -74,7 +75,7 @@ protected:
     OUString             m_aInnerName;
 };
 
-typedef std::map< sal_Int32, const WrappedProperty* > tWrappedPropertyMap;
+typedef std::map< sal_Int32, std::unique_ptr<const WrappedProperty> > tWrappedPropertyMap;
 
 } //namespace chart
 
diff --git a/chart2/source/inc/WrappedPropertySet.hxx b/chart2/source/inc/WrappedPropertySet.hxx
index a0398bafe180..25ea8f5cbf92 100644
--- a/chart2/source/inc/WrappedPropertySet.hxx
+++ b/chart2/source/inc/WrappedPropertySet.hxx
@@ -92,7 +92,7 @@ protected: //methods
     The base class 'WrappedPropertySet' will take ownership on the contained pointer.
     It is not allowed to have duplicate entries in this list.
     */
-    virtual const std::vector< WrappedProperty* > createWrappedProperties()=0;
+    virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties()=0;
 
     virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() = 0;
     SAL_DLLPRIVATE css::uno::Reference< css::beans::XPropertyState > getInnerPropertyState();
diff --git a/chart2/source/tools/WrappedIgnoreProperty.cxx b/chart2/source/tools/WrappedIgnoreProperty.cxx
index 292bcf15598a..c76a4ac10393 100644
--- a/chart2/source/tools/WrappedIgnoreProperty.cxx
+++ b/chart2/source/tools/WrappedIgnoreProperty.cxx
@@ -71,44 +71,44 @@ beans::PropertyState WrappedIgnoreProperty::getPropertyState( const Reference< b
              : beans::PropertyState_DIRECT_VALUE );
 }
 
-void WrappedIgnoreProperties::addIgnoreLineProperties( std::vector< WrappedProperty* >& rList )
+void WrappedIgnoreProperties::addIgnoreLineProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList )
 {
-    rList.push_back( new WrappedIgnoreProperty( "LineStyle", uno::Any( drawing::LineStyle_SOLID ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "LineDashName", uno::Any( OUString() ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "LineColor", uno::Any( sal_Int32(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "LineTransparence", uno::Any( sal_Int16(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "LineWidth", uno::Any( sal_Int32(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "LineJoint", uno::Any( drawing::LineJoint_ROUND ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "LineStyle", uno::Any( drawing::LineStyle_SOLID ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "LineDashName", uno::Any( OUString() ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "LineColor", uno::Any( sal_Int32(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "LineTransparence", uno::Any( sal_Int16(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "LineWidth", uno::Any( sal_Int32(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "LineJoint", uno::Any( drawing::LineJoint_ROUND ) ) );
 }
 
-void WrappedIgnoreProperties::addIgnoreFillProperties( std::vector< WrappedProperty* >& rList )
+void WrappedIgnoreProperties::addIgnoreFillProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList )
 {
     addIgnoreFillProperties_without_BitmapProperties( rList );
     addIgnoreFillProperties_only_BitmapProperties( rList );
 }
 
-void WrappedIgnoreProperties::addIgnoreFillProperties_without_BitmapProperties( std::vector< WrappedProperty* >& rList )
+void WrappedIgnoreProperties::addIgnoreFillProperties_without_BitmapProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList )
 {
-    rList.push_back( new WrappedIgnoreProperty( "FillStyle", uno::Any( drawing::FillStyle_SOLID ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillColor", uno::Any( sal_Int32(-1) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillTransparence", uno::Any( sal_Int16(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillTransparenceGradientName", uno::Any( OUString() ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillGradientName", uno::Any( OUString() ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillHatchName", uno::Any( OUString() ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillBackground", uno::Any( false ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillStyle", uno::Any( drawing::FillStyle_SOLID ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillColor", uno::Any( sal_Int32(-1) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillTransparence", uno::Any( sal_Int16(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillTransparenceGradientName", uno::Any( OUString() ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillGradientName", uno::Any( OUString() ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillHatchName", uno::Any( OUString() ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBackground", uno::Any( false ) ) );
 }
 
-void WrappedIgnoreProperties::addIgnoreFillProperties_only_BitmapProperties( std::vector< WrappedProperty* >& rList )
+void WrappedIgnoreProperties::addIgnoreFillProperties_only_BitmapProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList )
 {
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapOffsetX", uno::Any( sal_Int16(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapOffsetY", uno::Any( sal_Int16(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapPositionOffsetX", uno::Any( sal_Int16(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapPositionOffsetY", uno::Any( sal_Int16(0) ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapRectanglePoint", uno::Any( drawing::RectanglePoint_LEFT_TOP ) ) );
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapLogicalSize", uno::Any( false ) ) );//todo correct default?
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapSizeX", uno::Any( sal_Int32(10) ) ) );//todo which default?
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapSizeY", uno::Any( sal_Int32(10) ) ) );//todo which default?
-    rList.push_back( new WrappedIgnoreProperty( "FillBitmapMode", uno::Any( drawing::BitmapMode_REPEAT ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapOffsetX", uno::Any( sal_Int16(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapOffsetY", uno::Any( sal_Int16(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapPositionOffsetX", uno::Any( sal_Int16(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapPositionOffsetY", uno::Any( sal_Int16(0) ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapRectanglePoint", uno::Any( drawing::RectanglePoint_LEFT_TOP ) ) );
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapLogicalSize", uno::Any( false ) ) );//todo correct default?
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapSizeX", uno::Any( sal_Int32(10) ) ) );//todo which default?
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapSizeY", uno::Any( sal_Int32(10) ) ) );//todo which default?
+    rList.emplace_back( new WrappedIgnoreProperty( "FillBitmapMode", uno::Any( drawing::BitmapMode_REPEAT ) ) );
 }
 
 } //namespace chart
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index 4884716fa71b..3857343885d1 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -52,16 +52,6 @@ void WrappedPropertySet::clearWrappedPropertySet()
 {
     ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
 
-    //delete all wrapped properties
-    if(m_pWrappedPropertyMap)
-    {
-        for (auto const& elem : *m_pWrappedPropertyMap)
-        {
-            const WrappedProperty* pWrappedProperty = elem.second;
-            DELETEZ(pWrappedProperty);
-        }
-    }
-
     m_pPropertyArrayHelper.reset();
     m_pWrappedPropertyMap.reset();
 
@@ -313,7 +303,7 @@ const WrappedProperty* WrappedPropertySet::getWrappedProperty( sal_Int32 nHandle
 {
     tWrappedPropertyMap::const_iterator aFound( getWrappedPropertyMap().find( nHandle ) );
     if( aFound != getWrappedPropertyMap().end() )
-        return (*aFound).second;
+        return (*aFound).second.get();
     return nullptr;
 }
 
@@ -422,29 +412,24 @@ tWrappedPropertyMap& WrappedPropertySet::getWrappedPropertyMap()
         p = m_pWrappedPropertyMap.get();
         if(!p)
         {
-            std::vector< WrappedProperty* > aPropList( createWrappedProperties() );
+            std::vector< std::unique_ptr<WrappedProperty> > aPropList( createWrappedProperties() );
             p = new tWrappedPropertyMap;
 
-            for (auto const& elem : aPropList)
+            for (auto & elem : aPropList)
             {
-                if(elem)
-                {
-                    sal_Int32 nHandle = getInfoHelper().getHandleByName( elem->getOuterName() );
+                sal_Int32 nHandle = getInfoHelper().getHandleByName( elem->getOuterName() );
 
-                    if( nHandle == -1 )
-                    {
-                        OSL_FAIL( "missing property in property list" );
-                        delete elem;//we are owner or the created WrappedProperties
-                    }
-                    else if( p->find( nHandle ) != p->end() )
-                    {
-                        //duplicate Wrapped property
-                        OSL_FAIL( "duplicate Wrapped property" );
-                        delete elem;//we are owner or the created WrappedProperties
-                    }
-                    else
-                        (*p)[ nHandle ] = elem;
+                if( nHandle == -1 )
+                {
+                    OSL_FAIL( "missing property in property list" );
+                }
+                else if( p->find( nHandle ) != p->end() )
+                {
+                    //duplicate Wrapped property
+                    OSL_FAIL( "duplicate Wrapped property" );
                 }
+                else
+                    (*p)[ nHandle ] = std::move(elem);
             }
 
             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();


More information about the Libreoffice-commits mailing list