chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |    2 -
 chart2/source/inc/Diagram.hxx                               |    2 +
 chart2/source/inc/DiagramHelper.hxx                         |    4 ---
 chart2/source/model/main/Diagram.cxx                        |   13 +++++++++++
 chart2/source/tools/DiagramHelper.cxx                       |   14 ------------
 5 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit b209507a57e4ff01c6a06a20d741083b3ddef69d
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Mar 15 16:01:18 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Mar 16 17:00:07 2023 +0000

    move setGeometry3D inside chart2::Diagram
    
    Change-Id: I3825349e3889c45bbb5cbc467dad2f100ccd2298
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148952
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 332c018d786b..b778e49af878 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1693,7 +1693,7 @@ void WrappedSolidTypeProperty::setPropertyValue( const 
Any& rOuterValue, const R
     bool bAmbiguous = false;
     sal_Int32 nOldSolidType = DiagramHelper::getGeometry3D( xDiagram, bFound, 
bAmbiguous );
     if( bFound && ( nOldSolidType != nNewSolidType || bAmbiguous ) )
-        DiagramHelper::setGeometry3D( xDiagram, nNewSolidType );
+        xDiagram->setGeometry3D( nNewSolidType );
 }
 
 Any WrappedSolidTypeProperty::getPropertyValue( const Reference< 
beans::XPropertySet >& /*xInnerPropertySet*/ ) const
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 99d9dc3aee65..a63afad3786d 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -172,6 +172,8 @@ public:
     sal_Int32 getCorrectedMissingValueTreatment(
             const rtl::Reference< ::chart::ChartType >& xChartType );
 
+    void setGeometry3D( sal_Int32 nNewGeometry );
+
 private:
     // ____ XModifyListener ____
     virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index 3555155556cf..254c27387bd6 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -271,10 +271,6 @@ public:
         const rtl::Reference< ::chart::Diagram > & xDiagram,
         bool& rbFound, bool& rbAmbiguous );
 
-    static void setGeometry3D(
-        const rtl::Reference< ::chart::Diagram > & xDiagram,
-        sal_Int32 nNewGeometry );
-
     static bool setDiagramPositioning( const 
rtl::Reference<::chart::ChartModel>& xChartModel,
         const css::awt::Rectangle& rPosRect /*100th mm*/ );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index bcbef67f5b41..ec7272a28da8 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -21,6 +21,7 @@
 #include <ChartTypeHelper.hxx>
 #include <ChartTypeManager.hxx>
 #include <ChartTypeTemplate.hxx>
+#include <DataSeriesHelper.hxx>
 #include <PropertyHelper.hxx>
 #include "Wall.hxx"
 #include <ModifyListenerHelper.hxx>
@@ -748,6 +749,18 @@ sal_Int32 Diagram::getCorrectedMissingValueTreatment(
     return nResult;
 }
 
+void Diagram::setGeometry3D( sal_Int32 nNewGeometry )
+{
+    std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+        DiagramHelper::getDataSeriesFromDiagram( this );
+
+    for (auto const& series : aSeriesVec)
+    {
+        DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(
+            series, "Geometry3D", uno::Any( nNewGeometry ));
+    }
+}
+
 
 } //  namespace chart
 
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index d5cbf8b0bf7c..ec11f8c8799e 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1398,20 +1398,6 @@ sal_Int32 DiagramHelper::getGeometry3D(
     return nCommonGeom;
 }
 
-void DiagramHelper::setGeometry3D(
-    const rtl::Reference< Diagram > & xDiagram,
-    sal_Int32 nNewGeometry )
-{
-    std::vector< rtl::Reference< DataSeries > > aSeriesVec =
-        DiagramHelper::getDataSeriesFromDiagram( xDiagram );
-
-    for (auto const& series : aSeriesVec)
-    {
-        DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(
-            series, "Geometry3D", uno::Any( nNewGeometry ));
-    }
-}
-
 static void lcl_ensureRange0to1( double& rValue )
 {
     if(rValue<0.0)

Reply via email to