chart2/source/inc/DataSourceHelper.hxx   |    2 +-
 chart2/source/tools/DataSourceHelper.cxx |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 8c558549b7dc3348da207627663824043eed6204
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Thu Jan 27 17:57:53 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jan 28 18:08:59 2022 +0100

    use more concrete types in chart2, ChartModel
    
    Change-Id: I0f1c50448f6ab744e40d8744340685f59f139261
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129109
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/inc/DataSourceHelper.hxx 
b/chart2/source/inc/DataSourceHelper.hxx
index 892412cc8d63..3956ab9d05b5 100644
--- a/chart2/source/inc/DataSourceHelper.hxx
+++ b/chart2/source/inc/DataSourceHelper.hxx
@@ -77,7 +77,7 @@ public:
             , bool& bUseColumns, bool& bFirstCellAsLabel, bool& bHasCategories 
);
 
         static css::uno::Reference< css::chart2::data::XDataSource >
-            pressUsedDataIntoRectangularFormat( const css::uno::Reference< 
css::chart2::XChartDocument >& xChartDoc );
+            pressUsedDataIntoRectangularFormat( const rtl::Reference< 
::chart::ChartModel >& xChartDoc );
 
         SAL_DLLPRIVATE static css::uno::Sequence< OUString > getUsedDataRanges(
             const rtl::Reference< ::chart::Diagram > & xDiagram );
diff --git a/chart2/source/tools/DataSourceHelper.cxx 
b/chart2/source/tools/DataSourceHelper.cxx
index eda39aa7de78..37a1fc666057 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -220,14 +220,12 @@ void DataSourceHelper::readArguments( const 
uno::Sequence< beans::PropertyValue
 }
 
 uno::Reference< chart2::data::XDataSource > 
DataSourceHelper::pressUsedDataIntoRectangularFormat(
-        const uno::Reference< chart2::XChartDocument >& xChartDoc )
+        const rtl::Reference< ChartModel >& xChartDoc )
 {
     std::vector< Reference< chart2::data::XLabeledDataSequence > > 
aResultVector;
 
     //categories are always the first sequence
-    auto pModel = dynamic_cast<ChartModel*>(xChartDoc.get());
-    assert(pModel);
-    rtl::Reference< Diagram > xDiagram( pModel->getFirstChartDiagram());
+    rtl::Reference< Diagram > xDiagram( xChartDoc->getFirstChartDiagram());
 
     Reference< chart2::data::XLabeledDataSequence > xCategories( 
DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
     if( xCategories.is() )

Reply via email to