chart2/source/inc/OPropertySet.hxx                           |    5 +++-
 chart2/source/model/inc/BaseCoordinateSystem.hxx             |    2 -
 chart2/source/model/inc/DataSeries.hxx                       |    2 -
 chart2/source/model/inc/Diagram.hxx                          |    2 -
 chart2/source/model/inc/StockBar.hxx                         |    2 -
 chart2/source/model/main/Axis.cxx                            |    7 +++--
 chart2/source/model/main/Axis.hxx                            |    2 -
 chart2/source/model/main/BaseCoordinateSystem.cxx            |    7 +++--
 chart2/source/model/main/DataPoint.cxx                       |    7 +++--
 chart2/source/model/main/DataPoint.hxx                       |    2 -
 chart2/source/model/main/DataSeries.cxx                      |    7 +++--
 chart2/source/model/main/Diagram.cxx                         |    7 +++--
 chart2/source/model/main/FormattedString.cxx                 |    7 +++--
 chart2/source/model/main/FormattedString.hxx                 |    2 -
 chart2/source/model/main/GridProperties.cxx                  |    7 +++--
 chart2/source/model/main/GridProperties.hxx                  |    2 -
 chart2/source/model/main/Legend.cxx                          |    7 +++--
 chart2/source/model/main/Legend.hxx                          |    2 -
 chart2/source/model/main/PageBackground.cxx                  |    7 +++--
 chart2/source/model/main/PageBackground.hxx                  |    2 -
 chart2/source/model/main/StockBar.cxx                        |    7 +++--
 chart2/source/model/main/Title.cxx                           |    7 +++--
 chart2/source/model/main/Title.hxx                           |    2 -
 chart2/source/model/main/Wall.cxx                            |    7 +++--
 chart2/source/model/main/Wall.hxx                            |    2 -
 chart2/source/model/template/AreaChartTypeTemplate.cxx       |    7 +++--
 chart2/source/model/template/AreaChartTypeTemplate.hxx       |    2 -
 chart2/source/model/template/BarChartTypeTemplate.cxx        |    7 +++--
 chart2/source/model/template/BarChartTypeTemplate.hxx        |    2 -
 chart2/source/model/template/BubbleChartType.cxx             |    7 +++--
 chart2/source/model/template/BubbleChartType.hxx             |    2 -
 chart2/source/model/template/BubbleChartTypeTemplate.cxx     |    7 +++--
 chart2/source/model/template/BubbleChartTypeTemplate.hxx     |    2 -
 chart2/source/model/template/CandleStickChartType.cxx        |    7 +++--
 chart2/source/model/template/CandleStickChartType.hxx        |    2 -
 chart2/source/model/template/ChartType.cxx                   |    4 +--
 chart2/source/model/template/ChartType.hxx                   |    2 -
 chart2/source/model/template/ColumnChartType.cxx             |    7 +++--
 chart2/source/model/template/ColumnChartType.hxx             |    2 -
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx |    7 +++--
 chart2/source/model/template/ColumnLineChartTypeTemplate.hxx |    2 -
 chart2/source/model/template/LineChartType.cxx               |    7 +++--
 chart2/source/model/template/LineChartType.hxx               |    2 -
 chart2/source/model/template/LineChartTypeTemplate.cxx       |    8 ++++--
 chart2/source/model/template/LineChartTypeTemplate.hxx       |    2 -
 chart2/source/model/template/NetChartType.cxx                |    4 +--
 chart2/source/model/template/NetChartType.hxx                |    2 -
 chart2/source/model/template/PieChartType.cxx                |    7 +++--
 chart2/source/model/template/PieChartType.hxx                |    2 -
 chart2/source/model/template/PieChartTypeTemplate.cxx        |    7 +++--
 chart2/source/model/template/PieChartTypeTemplate.hxx        |    2 -
 chart2/source/model/template/ScatterChartType.cxx            |    7 +++--
 chart2/source/model/template/ScatterChartType.hxx            |    2 -
 chart2/source/model/template/ScatterChartTypeTemplate.cxx    |    7 +++--
 chart2/source/model/template/ScatterChartTypeTemplate.hxx    |    2 -
 chart2/source/model/template/StockChartTypeTemplate.cxx      |    8 ++++--
 chart2/source/model/template/StockChartTypeTemplate.hxx      |    2 -
 chart2/source/tools/OPropertySet.cxx                         |   13 ++++++-----
 chart2/source/tools/RegressionCurveModel.cxx                 |    7 +++--
 chart2/source/tools/RegressionCurveModel.hxx                 |    2 -
 chart2/source/tools/RegressionEquation.cxx                   |    7 +++--
 chart2/source/tools/RegressionEquation.hxx                   |    2 -
 62 files changed, 160 insertions(+), 124 deletions(-)

New commits:
commit cba21368d8297e4039c907ff847a3074ece09599
Author:     Noel Grandin <[email protected]>
AuthorDate: Sun Dec 5 14:06:09 2021 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Dec 5 19:57:01 2021 +0100

    speed up property access in charts
    
    uno::Any copy and assign is fairly hot, so try and do those operations
    in one step
    
    Change-Id: I110566ba98788d5a658d229433de291c8cdf146c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126377
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/chart2/source/inc/OPropertySet.hxx 
b/chart2/source/inc/OPropertySet.hxx
index 52cf2e782e28..346e89b99c94 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -55,11 +55,14 @@ protected:
     /** implement this method to provide default values for all properties
         supporting defaults.  If a property does not have a default value, you
         may throw an UnknownPropertyException.
+        We pass the any by reference because this code is very hot and doing
+        it this way is cheaper than the two step process of constructing a new
+        any and then assigning to via a return value.
 
         @throws css::beans::UnknownPropertyException
         @throws css::uno::RuntimeException
      */
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const = 0;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const = 0;
 
     /** The InfoHelper table contains all property names and types of
         this object.
diff --git a/chart2/source/model/inc/BaseCoordinateSystem.hxx 
b/chart2/source/model/inc/BaseCoordinateSystem.hxx
index 5e00a442ccb0..29bf6276249d 100644
--- a/chart2/source/model/inc/BaseCoordinateSystem.hxx
+++ b/chart2/source/model/inc/BaseCoordinateSystem.hxx
@@ -57,7 +57,7 @@ public:
     virtual ~BaseCoordinateSystem() override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
diff --git a/chart2/source/model/inc/DataSeries.hxx 
b/chart2/source/model/inc/DataSeries.hxx
index 35e7725aa06b..805bd0a326ed 100644
--- a/chart2/source/model/inc/DataSeries.hxx
+++ b/chart2/source/model/inc/DataSeries.hxx
@@ -99,7 +99,7 @@ private:
     virtual css::uno::Sequence< css::uno::Reference< 
css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() 
override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual void SAL_CALL getFastPropertyValue( css::uno::Any& rValue, 
sal_Int32 nHandle ) const override;
     virtual void SAL_CALL setFastPropertyValue_NoBroadcast
         ( sal_Int32 nHandle,
diff --git a/chart2/source/model/inc/Diagram.hxx 
b/chart2/source/model/inc/Diagram.hxx
index 4e32b48b895c..cf828b903662 100644
--- a/chart2/source/model/inc/Diagram.hxx
+++ b/chart2/source/model/inc/Diagram.hxx
@@ -77,7 +77,7 @@ private:
     explicit Diagram( const Diagram & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/inc/StockBar.hxx 
b/chart2/source/model/inc/StockBar.hxx
index 91437751bfc1..b642479e1d9d 100644
--- a/chart2/source/model/inc/StockBar.hxx
+++ b/chart2/source/model/inc/StockBar.hxx
@@ -55,7 +55,7 @@ private:
     explicit StockBar( const StockBar & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
diff --git a/chart2/source/model/main/Axis.cxx 
b/chart2/source/model/main/Axis.cxx
index bfdccbd54e2f..a39647e9181c 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -575,13 +575,14 @@ void Axis::fireModifyEvent()
 }
 
 // ____ OPropertySet ____
-uno::Any Axis::GetDefaultValue( sal_Int32 nHandle ) const
+void Axis::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = *StaticAxisDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL Axis::getInfoHelper()
diff --git a/chart2/source/model/main/Axis.hxx 
b/chart2/source/model/main/Axis.hxx
index 3ee419a7fec7..0f3be76cbf19 100644
--- a/chart2/source/model/main/Axis.hxx
+++ b/chart2/source/model/main/Axis.hxx
@@ -71,7 +71,7 @@ private:
     void Init();
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx 
b/chart2/source/model/main/BaseCoordinateSystem.cxx
index f44f565fa86c..94d9eef33e78 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -330,13 +330,14 @@ void BaseCoordinateSystem::fireModifyEvent()
 }
 
 // ____ OPropertySet ____
-uno::Any BaseCoordinateSystem::GetDefaultValue( sal_Int32 nHandle ) const
+void BaseCoordinateSystem::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny 
) const
 {
     const tPropertyValueMap& rStaticDefaults = *StaticCooSysDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/main/DataPoint.cxx 
b/chart2/source/model/main/DataPoint.cxx
index 6e9f6d483ccc..adde50ff466b 100644
--- a/chart2/source/model/main/DataPoint.cxx
+++ b/chart2/source/model/main/DataPoint.cxx
@@ -165,17 +165,18 @@ void SAL_CALL DataPoint::setParent(
 }
 
 // ____ OPropertySet ____
-uno::Any DataPoint::GetDefaultValue( sal_Int32 nHandle ) const
+void DataPoint::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     // the value set at the data series is the default
     uno::Reference< beans::XFastPropertySet > xFast( 
m_xParentProperties.get(), uno::UNO_QUERY );
     if( !xFast.is())
     {
         OSL_ENSURE( m_bNoParentPropAllowed, "data point needs a parent 
property set to provide values correctly" );
-        return uno::Any();
+        rAny.clear();
+        return;
     }
 
-    return xFast->getFastPropertyValue( nHandle );
+    rAny = xFast->getFastPropertyValue( nHandle );
 }
 
 void SAL_CALL DataPoint::setFastPropertyValue_NoBroadcast(
diff --git a/chart2/source/model/main/DataPoint.hxx 
b/chart2/source/model/main/DataPoint.hxx
index 4171571a1755..2139ec84d3bd 100644
--- a/chart2/source/model/main/DataPoint.hxx
+++ b/chart2/source/model/main/DataPoint.hxx
@@ -64,7 +64,7 @@ private:
     explicit DataPoint( const DataPoint & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
     virtual void SAL_CALL setFastPropertyValue_NoBroadcast
         ( sal_Int32 nHandle,
diff --git a/chart2/source/model/main/DataSeries.cxx 
b/chart2/source/model/main/DataSeries.cxx
index b873c19650b9..70e8d5b565d4 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -230,13 +230,14 @@ uno::Reference< util::XCloneable > SAL_CALL 
DataSeries::createClone()
 }
 
 // ____ OPropertySet ____
-uno::Any DataSeries::GetDefaultValue( sal_Int32 nHandle ) const
+void DataSeries::GetDefaultValue( sal_Int32 nHandle, uno::Any& rDest ) const
 {
     const tPropertyValueMap& rStaticDefaults = StaticDataSeriesDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rDest.clear();
+    else
+        rDest = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 8255115bead1..8fb6027c0d65 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -567,13 +567,14 @@ void Diagram::fireModifyEvent()
 }
 
 // ____ OPropertySet ____
-uno::Any Diagram::GetDefaultValue( sal_Int32 nHandle ) const
+void Diagram::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = StaticDiagramDefaults();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/main/FormattedString.cxx 
b/chart2/source/model/main/FormattedString.cxx
index 782729294789..b4bcf51c05d8 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -257,13 +257,14 @@ void FormattedString::fireModifyEvent()
 }
 
 // ____ OPropertySet ____
-uno::Any FormattedString::GetDefaultValue( sal_Int32 nHandle ) const
+void FormattedString::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) 
const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticFormattedStringDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/main/FormattedString.hxx 
b/chart2/source/model/main/FormattedString.hxx
index bd7415fb921a..a9c8cd33d790 100644
--- a/chart2/source/model/main/FormattedString.hxx
+++ b/chart2/source/model/main/FormattedString.hxx
@@ -93,7 +93,7 @@ private:
     virtual void SAL_CALL setCellRange( const OUString& cellRange ) override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/main/GridProperties.cxx 
b/chart2/source/model/main/GridProperties.cxx
index 44d3fffd8c67..1f835d7f13a9 100644
--- a/chart2/source/model/main/GridProperties.cxx
+++ b/chart2/source/model/main/GridProperties.cxx
@@ -142,13 +142,14 @@ GridProperties::~GridProperties()
 {}
 
 // ____ OPropertySet ____
-uno::Any GridProperties::GetDefaultValue( sal_Int32 nHandle ) const
+void GridProperties::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = *StaticGridDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL GridProperties::getInfoHelper()
diff --git a/chart2/source/model/main/GridProperties.hxx 
b/chart2/source/model/main/GridProperties.hxx
index 4e90d36176b9..16342c260a55 100644
--- a/chart2/source/model/main/GridProperties.hxx
+++ b/chart2/source/model/main/GridProperties.hxx
@@ -64,7 +64,7 @@ private:
     explicit GridProperties( const GridProperties & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
diff --git a/chart2/source/model/main/Legend.cxx 
b/chart2/source/model/main/Legend.cxx
index 4c3b9f0e5167..e56453c70bc3 100644
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -254,13 +254,14 @@ void Legend::firePropertyChangeEvent()
 }
 
 // ____ OPropertySet ____
-Any Legend::GetDefaultValue( sal_Int32 nHandle ) const
+void Legend::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = *StaticLegendDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL Legend::getInfoHelper()
diff --git a/chart2/source/model/main/Legend.hxx 
b/chart2/source/model/main/Legend.hxx
index 4e1a943277bd..1adb49cd3b1f 100644
--- a/chart2/source/model/main/Legend.hxx
+++ b/chart2/source/model/main/Legend.hxx
@@ -65,7 +65,7 @@ private:
     explicit Legend( const Legend & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/main/PageBackground.cxx 
b/chart2/source/model/main/PageBackground.cxx
index 5dda4cb5a7b4..ae3e46692a0e 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -132,13 +132,14 @@ uno::Reference< util::XCloneable > SAL_CALL 
PageBackground::createClone()
 }
 
 // ____ OPropertySet ____
-uno::Any PageBackground::GetDefaultValue( sal_Int32 nHandle ) const
+void PageBackground::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticPageBackgroundDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL PageBackground::getInfoHelper()
diff --git a/chart2/source/model/main/PageBackground.hxx 
b/chart2/source/model/main/PageBackground.hxx
index 7624fbf8e215..80bfd3fd9f70 100644
--- a/chart2/source/model/main/PageBackground.hxx
+++ b/chart2/source/model/main/PageBackground.hxx
@@ -62,7 +62,7 @@ private:
     explicit PageBackground( const PageBackground & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/main/StockBar.cxx 
b/chart2/source/model/main/StockBar.cxx
index 22e082ad06b3..00e28e49f7aa 100644
--- a/chart2/source/model/main/StockBar.cxx
+++ b/chart2/source/model/main/StockBar.cxx
@@ -139,13 +139,14 @@ uno::Reference< util::XCloneable > SAL_CALL 
StockBar::createClone()
 }
 
 // ____ OPropertySet ____
-uno::Any StockBar::GetDefaultValue( sal_Int32 nHandle ) const
+void StockBar::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = *StaticStockBarDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL StockBar::getInfoHelper()
diff --git a/chart2/source/model/main/Title.cxx 
b/chart2/source/model/main/Title.cxx
index a42374ce5f51..1ce25dd2a419 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -283,13 +283,14 @@ void SAL_CALL Title::setText( const uno::Sequence< 
uno::Reference< chart2::XForm
 }
 
 // ____ OPropertySet ____
-uno::Any Title::GetDefaultValue( sal_Int32 nHandle ) const
+void Title::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = *StaticTitleDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL Title::getInfoHelper()
diff --git a/chart2/source/model/main/Title.hxx 
b/chart2/source/model/main/Title.hxx
index c700827cbb74..104cb92c37e2 100644
--- a/chart2/source/model/main/Title.hxx
+++ b/chart2/source/model/main/Title.hxx
@@ -65,7 +65,7 @@ private:
     explicit Title( const Title & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/main/Wall.cxx 
b/chart2/source/model/main/Wall.cxx
index 5ba8aaf18401..8c23ab64f7b5 100644
--- a/chart2/source/model/main/Wall.cxx
+++ b/chart2/source/model/main/Wall.cxx
@@ -127,13 +127,14 @@ uno::Reference< util::XCloneable > SAL_CALL 
Wall::createClone()
 }
 
 // ____ OPropertySet ____
-uno::Any Wall::GetDefaultValue( sal_Int32 nHandle ) const
+void Wall::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = *StaticWallDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL Wall::getInfoHelper()
diff --git a/chart2/source/model/main/Wall.hxx 
b/chart2/source/model/main/Wall.hxx
index b63a754853b0..e186ba06e59c 100644
--- a/chart2/source/model/main/Wall.hxx
+++ b/chart2/source/model/main/Wall.hxx
@@ -55,7 +55,7 @@ private:
     explicit Wall( const Wall & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx 
b/chart2/source/model/template/AreaChartTypeTemplate.cxx
index 401dc6971dc9..6087c21251fb 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.cxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx
@@ -130,13 +130,14 @@ AreaChartTypeTemplate::~AreaChartTypeTemplate()
 {}
 
 // ____ OPropertySet ____
-uno::Any AreaChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+void AreaChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny 
) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticAreaChartTypeTemplateDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL AreaChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx 
b/chart2/source/model/template/AreaChartTypeTemplate.hxx
index dd5c62a3df8f..51479a15d73b 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.hxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.hxx
@@ -48,7 +48,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx 
b/chart2/source/model/template/BarChartTypeTemplate.cxx
index dce1ffbb09d9..f4534a27071a 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.cxx
@@ -224,13 +224,14 @@ Reference< chart2::XChartType > SAL_CALL 
BarChartTypeTemplate::getChartTypeForNe
 }
 
 // ____ OPropertySet ____
-uno::Any BarChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+void BarChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny 
) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticBarChartTypeTemplateDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL BarChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx 
b/chart2/source/model/template/BarChartTypeTemplate.hxx
index 350a62517965..9c23b692af07 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.hxx
@@ -55,7 +55,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/BubbleChartType.cxx 
b/chart2/source/model/template/BubbleChartType.cxx
index 1998eb9e4dc7..3373a369e956 100644
--- a/chart2/source/model/template/BubbleChartType.cxx
+++ b/chart2/source/model/template/BubbleChartType.cxx
@@ -161,13 +161,14 @@ OUString SAL_CALL 
BubbleChartType::getRoleOfSequenceForSeriesLabel()
 }
 
 // ____ OPropertySet ____
-uno::Any BubbleChartType::GetDefaultValue( sal_Int32 nHandle ) const
+void BubbleChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) 
const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticBubbleChartTypeDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/template/BubbleChartType.hxx 
b/chart2/source/model/template/BubbleChartType.hxx
index a7d75ea94088..4be938b66a88 100644
--- a/chart2/source/model/template/BubbleChartType.hxx
+++ b/chart2/source/model/template/BubbleChartType.hxx
@@ -50,7 +50,7 @@ private:
     virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel() override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx 
b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
index 90ec1a75db21..3d7416b288cd 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
@@ -108,13 +108,14 @@ BubbleChartTypeTemplate::~BubbleChartTypeTemplate()
 {}
 
 // ____ OPropertySet ____
-uno::Any BubbleChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+void BubbleChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& 
rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticBubbleChartTypeTemplateDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL 
BubbleChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.hxx 
b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
index 1a75035cd0d3..d2681414e745 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
@@ -44,7 +44,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/CandleStickChartType.cxx 
b/chart2/source/model/template/CandleStickChartType.cxx
index af0c1f04f52b..065b8d8ca736 100644
--- a/chart2/source/model/template/CandleStickChartType.cxx
+++ b/chart2/source/model/template/CandleStickChartType.cxx
@@ -263,13 +263,14 @@ OUString SAL_CALL 
CandleStickChartType::getRoleOfSequenceForSeriesLabel()
 }
 
 // ____ OPropertySet ____
-uno::Any CandleStickChartType::GetDefaultValue( sal_Int32 nHandle ) const
+void CandleStickChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny 
) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticCandleStickChartTypeDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/template/CandleStickChartType.hxx 
b/chart2/source/model/template/CandleStickChartType.hxx
index 13dfb30db47f..eac57a5b6496 100644
--- a/chart2/source/model/template/CandleStickChartType.hxx
+++ b/chart2/source/model/template/CandleStickChartType.hxx
@@ -50,7 +50,7 @@ private:
     virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel() override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/template/ChartType.cxx 
b/chart2/source/model/template/ChartType.cxx
index 5eb0adca0f06..b2764b31ce85 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -188,9 +188,9 @@ void SAL_CALL ChartType::setDataSeries( const Sequence< 
Reference< chart2::XData
 }
 
 // ____ OPropertySet ____
-uno::Any ChartType::GetDefaultValue( sal_Int32 /* nHandle */ ) const
+void ChartType::GetDefaultValue( sal_Int32 /* nHandle */, uno::Any& rAny ) 
const
 {
-    return uno::Any();
+    rAny.clear();
 }
 
 namespace
diff --git a/chart2/source/model/template/ChartType.hxx 
b/chart2/source/model/template/ChartType.hxx
index 9606275abd64..89817d13cd91 100644
--- a/chart2/source/model/template/ChartType.hxx
+++ b/chart2/source/model/template/ChartType.hxx
@@ -100,7 +100,7 @@ protected:
     void fireModifyEvent();
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     virtual void firePropertyChangeEvent() override;
diff --git a/chart2/source/model/template/ColumnChartType.cxx 
b/chart2/source/model/template/ColumnChartType.cxx
index 36eb72b33623..3553e289985e 100644
--- a/chart2/source/model/template/ColumnChartType.cxx
+++ b/chart2/source/model/template/ColumnChartType.cxx
@@ -151,13 +151,14 @@ uno::Sequence< OUString > 
ColumnChartType::getSupportedPropertyRoles()
 }
 
 // ____ OPropertySet ____
-uno::Any ColumnChartType::GetDefaultValue( sal_Int32 nHandle ) const
+void ColumnChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) 
const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticColumnChartTypeDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL ColumnChartType::getInfoHelper()
diff --git a/chart2/source/model/template/ColumnChartType.hxx 
b/chart2/source/model/template/ColumnChartType.hxx
index 3245185650da..d304092cbfc0 100644
--- a/chart2/source/model/template/ColumnChartType.hxx
+++ b/chart2/source/model/template/ColumnChartType.hxx
@@ -45,7 +45,7 @@ private:
         getSupportedPropertyRoles() override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx 
b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index 889ca43f40e7..fad59386b2b3 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -136,13 +136,14 @@ 
ColumnLineChartTypeTemplate::~ColumnLineChartTypeTemplate()
 {}
 
 // ____ OPropertySet ____
-uno::Any ColumnLineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) 
const
+void ColumnLineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, 
uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticColumnLineChartTypeTemplateDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL 
ColumnLineChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx 
b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
index c3c6f1c00851..0e23061cf869 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
@@ -48,7 +48,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/LineChartType.cxx 
b/chart2/source/model/template/LineChartType.cxx
index 64b2fe9c146f..f0d595f27102 100644
--- a/chart2/source/model/template/LineChartType.cxx
+++ b/chart2/source/model/template/LineChartType.cxx
@@ -158,13 +158,14 @@ OUString SAL_CALL LineChartType::getChartType()
 }
 
 // ____ OPropertySet ____
-uno::Any LineChartType::GetDefaultValue( sal_Int32 nHandle ) const
+void LineChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticLineChartTypeDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL LineChartType::getInfoHelper()
diff --git a/chart2/source/model/template/LineChartType.hxx 
b/chart2/source/model/template/LineChartType.hxx
index 7be0b6ad3d04..a655670d852e 100644
--- a/chart2/source/model/template/LineChartType.hxx
+++ b/chart2/source/model/template/LineChartType.hxx
@@ -43,7 +43,7 @@ private:
     virtual OUString SAL_CALL getChartType() override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx 
b/chart2/source/model/template/LineChartTypeTemplate.cxx
index 7989a743529a..bbde1bebc3f1 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.cxx
@@ -162,14 +162,16 @@ LineChartTypeTemplate::LineChartTypeTemplate(
 
 LineChartTypeTemplate::~LineChartTypeTemplate()
 {}
+
 // ____ OPropertySet ____
-uno::Any LineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+void LineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny 
) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticLineChartTypeTemplateDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL LineChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx 
b/chart2/source/model/template/LineChartTypeTemplate.hxx
index 216961fa3fc1..129b587ed900 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.hxx
@@ -49,7 +49,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/NetChartType.cxx 
b/chart2/source/model/template/NetChartType.cxx
index 95de304b6ae1..5305111fd5bc 100644
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -81,9 +81,9 @@ Reference< XCoordinateSystem > SAL_CALL
 }
 
 // ____ OPropertySet ____
-uno::Any NetChartType_Base::GetDefaultValue( sal_Int32 /*nHandle*/ ) const
+void NetChartType_Base::GetDefaultValue( sal_Int32 /*nHandle*/, uno::Any& rAny 
) const
 {
-    return uno::Any();
+    rAny.clear();
 }
 
 namespace
diff --git a/chart2/source/model/template/NetChartType.hxx 
b/chart2/source/model/template/NetChartType.hxx
index f675af0c94ba..7f1c16d60dd8 100644
--- a/chart2/source/model/template/NetChartType.hxx
+++ b/chart2/source/model/template/NetChartType.hxx
@@ -37,7 +37,7 @@ protected:
         createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
diff --git a/chart2/source/model/template/PieChartType.cxx 
b/chart2/source/model/template/PieChartType.cxx
index eb7c10a5e834..f7074afdf1bf 100644
--- a/chart2/source/model/template/PieChartType.cxx
+++ b/chart2/source/model/template/PieChartType.cxx
@@ -186,13 +186,14 @@ uno::Sequence< OUString > 
PieChartType::getSupportedPropertyRoles()
 }
 
 // ____ OPropertySet ____
-uno::Any PieChartType::GetDefaultValue( sal_Int32 nHandle ) const
+void PieChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticPieChartTypeDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/template/PieChartType.hxx 
b/chart2/source/model/template/PieChartType.hxx
index f00793119507..c3164d4308a6 100644
--- a/chart2/source/model/template/PieChartType.hxx
+++ b/chart2/source/model/template/PieChartType.hxx
@@ -47,7 +47,7 @@ private:
         getSupportedPropertyRoles() override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx 
b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 0848f0e98239..218ee48ff520 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -167,13 +167,14 @@ PieChartTypeTemplate::~PieChartTypeTemplate()
 {}
 
 // ____ OPropertySet ____
-uno::Any PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+void PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny 
) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticPieChartTypeTemplateDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL PieChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx 
b/chart2/source/model/template/PieChartTypeTemplate.hxx
index 863fb2219705..bdde9e9a6f52 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.hxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.hxx
@@ -49,7 +49,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/ScatterChartType.cxx 
b/chart2/source/model/template/ScatterChartType.cxx
index a68c9eaee1cf..dd78db8e1e6b 100644
--- a/chart2/source/model/template/ScatterChartType.cxx
+++ b/chart2/source/model/template/ScatterChartType.cxx
@@ -196,13 +196,14 @@ uno::Sequence< OUString > SAL_CALL 
ScatterChartType::getSupportedMandatoryRoles(
 }
 
 // ____ OPropertySet ____
-uno::Any ScatterChartType::GetDefaultValue( sal_Int32 nHandle ) const
+void ScatterChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) 
const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticScatterChartTypeDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 // ____ OPropertySet ____
diff --git a/chart2/source/model/template/ScatterChartType.hxx 
b/chart2/source/model/template/ScatterChartType.hxx
index faefa3a872fe..da14efb0df3f 100644
--- a/chart2/source/model/template/ScatterChartType.hxx
+++ b/chart2/source/model/template/ScatterChartType.hxx
@@ -47,7 +47,7 @@ private:
         createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx 
b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index e0dc1cd1183a..cf22e22c6d55 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -163,13 +163,14 @@ ScatterChartTypeTemplate::~ScatterChartTypeTemplate()
 {}
 
 // ____ OPropertySet ____
-uno::Any ScatterChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+void ScatterChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& 
rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = 
*StaticScatterChartTypeTemplateDefaults::get();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL 
ScatterChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.hxx 
b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
index f0a676cc5dc2..cf8e51ee30b3 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
@@ -47,7 +47,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx 
b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 464325ef10d1..9f54c44cbca4 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -145,14 +145,16 @@ StockChartTypeTemplate::StockChartTypeTemplate(
 
 StockChartTypeTemplate::~StockChartTypeTemplate()
 {}
+
 // ____ OPropertySet ____
-uno::Any StockChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+void StockChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& 
rAny ) const
 {
     const tPropertyValueMap& rStaticDefaults = 
GetStaticStockChartTypeTemplateDefaults();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL StockChartTypeTemplate::getInfoHelper()
diff --git a/chart2/source/model/template/StockChartTypeTemplate.hxx 
b/chart2/source/model/template/StockChartTypeTemplate.hxx
index 01bd6f089797..a31473c856e2 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.hxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.hxx
@@ -62,7 +62,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 
     // ____ XPropertySet ____
diff --git a/chart2/source/tools/OPropertySet.cxx 
b/chart2/source/tools/OPropertySet.cxx
index 3eb99caf0f12..cb48610c359b 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -157,7 +157,9 @@ Any SAL_CALL
 {
     cppu::IPropertyArrayHelper & rPH = getInfoHelper();
 
-    return GetDefaultValue( rPH.getHandleByName( aPropertyName ) );
+    Any any;
+    GetDefaultValue( rPH.getHandleByName( aPropertyName ), any );
+    return any;
 }
 
 // ____ XMultiPropertyStates ____
@@ -198,8 +200,9 @@ Sequence< Any > SAL_CALL
 
     for( ; nI < nElements; ++nI )
     {
-        pResultArray[ nI ] = GetDefaultValue(
-            rPH.getHandleByName( aPropertyNames[ nI ] ));
+        GetDefaultValue(
+            rPH.getHandleByName( aPropertyNames[ nI ] ),
+            pResultArray[ nI ]);
     }
 
     return aResult;
@@ -256,7 +259,7 @@ void SAL_CALL OPropertySet::setFastPropertyValue_NoBroadcast
     Any aDefault;
     try
     {
-        aDefault = GetDefaultValue( nHandle );
+        GetDefaultValue( nHandle, aDefault );
     }
     catch( const beans::UnknownPropertyException& )
     {
@@ -337,7 +340,7 @@ void SAL_CALL OPropertySet::getFastPropertyValue
         // => take the default value
         try
         {
-            rValue = GetDefaultValue( nHandle );
+            GetDefaultValue( nHandle, rValue );
         }
         catch( const beans::UnknownPropertyException& )
         {
diff --git a/chart2/source/tools/RegressionCurveModel.cxx 
b/chart2/source/tools/RegressionCurveModel.cxx
index 03ff810fe1ef..ff6b0332e1c8 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -264,13 +264,14 @@ void RegressionCurveModel::fireModifyEvent()
 }
 
 // ____ OPropertySet ____
-uno::Any RegressionCurveModel::GetDefaultValue( sal_Int32 nHandle ) const
+void RegressionCurveModel::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny 
) const
 {
     const tPropertyValueMap& rStaticDefaults = GetStaticXXXDefaults();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL RegressionCurveModel::getInfoHelper()
diff --git a/chart2/source/tools/RegressionCurveModel.hxx 
b/chart2/source/tools/RegressionCurveModel.hxx
index c20e773601a4..f87ceb620e59 100644
--- a/chart2/source/tools/RegressionCurveModel.hxx
+++ b/chart2/source/tools/RegressionCurveModel.hxx
@@ -75,7 +75,7 @@ public:
 
 protected:
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
diff --git a/chart2/source/tools/RegressionEquation.cxx 
b/chart2/source/tools/RegressionEquation.cxx
index 021ad686af6f..18739ec56257 100644
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -185,13 +185,14 @@ uno::Reference< util::XCloneable > SAL_CALL 
RegressionEquation::createClone()
 }
 
 // ____ OPropertySet ____
-uno::Any RegressionEquation::GetDefaultValue( sal_Int32 nHandle ) const
+void RegressionEquation::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) 
const
 {
     const tPropertyValueMap& rStaticDefaults = 
GetStaticRegressionEquationDefaults();
     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) 
);
     if( aFound == rStaticDefaults.end() )
-        return uno::Any();
-    return (*aFound).second;
+        rAny.clear();
+    else
+        rAny = (*aFound).second;
 }
 
 ::cppu::IPropertyArrayHelper & SAL_CALL RegressionEquation::getInfoHelper()
diff --git a/chart2/source/tools/RegressionEquation.hxx 
b/chart2/source/tools/RegressionEquation.hxx
index 03d1a7f295e5..e5bbbf108601 100644
--- a/chart2/source/tools/RegressionEquation.hxx
+++ b/chart2/source/tools/RegressionEquation.hxx
@@ -70,7 +70,7 @@ private:
     explicit RegressionEquation( const RegressionEquation & rOther );
 
     // ____ OPropertySet ____
-    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+    virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 
const override;
 
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
 

Reply via email to