chart2/source/inc/ObjectIdentifier.hxx   |    3 ++-
 chart2/source/tools/ObjectIdentifier.cxx |   11 +++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e82192764485e7599af43c002d658b7b15c01f94
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Jan 26 18:50:07 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jan 27 07:41:05 2022 +0100

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

diff --git a/chart2/source/inc/ObjectIdentifier.hxx 
b/chart2/source/inc/ObjectIdentifier.hxx
index f4ba59a2191c..3410476083d9 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -42,6 +42,7 @@ namespace com::sun::star::uno { class XInterface; }
 
 namespace chart
 {
+class BaseCoordinateSystem;
 class Diagram;
 
 enum ObjectType
@@ -124,7 +125,7 @@ public:
     SAL_DLLPRIVATE static OUString createParticleForDiagram();
 
     static OUString createParticleForCoordinateSystem(
-          const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+          const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
         , const rtl::Reference<::chart::ChartModel>& xChartModel );
 
     static OUString createParticleForAxis(
diff --git a/chart2/source/tools/ObjectIdentifier.cxx 
b/chart2/source/tools/ObjectIdentifier.cxx
index 5d17de7ac5aa..691e7f475c26 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -327,7 +327,7 @@ OUString 
ObjectIdentifier::createClassifiedIdentifierForObject(
         Reference< XAxis > xAxis( xObject, uno::UNO_QUERY );
         if( xAxis.is() )
         {
-            Reference< XCoordinateSystem > xCooSys( 
AxisHelper::getCoordinateSystemOfAxis( xAxis, ChartModelHelper::findDiagram( 
xChartModel ) ) );
+            rtl::Reference< BaseCoordinateSystem > xCooSys( 
AxisHelper::getCoordinateSystemOfAxis( xAxis, ChartModelHelper::findDiagram( 
xChartModel ) ) );
             OUString aCooSysParticle( createParticleForCoordinateSystem( 
xCooSys, xChartModel ) );
             sal_Int32 nDimensionIndex=-1;
             sal_Int32 nAxisIndex=-1;
@@ -414,7 +414,7 @@ OUString ObjectIdentifier::createParticleForDiagram()
 }
 
 OUString ObjectIdentifier::createParticleForCoordinateSystem(
-          const Reference< XCoordinateSystem >& xCooSys
+          const rtl::Reference< BaseCoordinateSystem >& xCooSys
         , const rtl::Reference<::chart::ChartModel>& xChartModel )
 {
     OUString aRet;
@@ -423,11 +423,10 @@ OUString 
ObjectIdentifier::createParticleForCoordinateSystem(
     if( xDiagram.is() )
     {
         sal_Int32 nCooSysIndex = 0;
-        uno::Sequence< Reference< XCoordinateSystem > > aCooSysList( 
xDiagram->getCoordinateSystems() );
-        for( ; nCooSysIndex < aCooSysList.getLength(); ++nCooSysIndex )
+        const std::vector< rtl::Reference< BaseCoordinateSystem > > & 
aCooSysList( xDiagram->getBaseCoordinateSystems() );
+        for( ; nCooSysIndex < static_cast<sal_Int32>(aCooSysList.size()); 
++nCooSysIndex )
         {
-            Reference< XCoordinateSystem > xCurrentCooSys( 
aCooSysList[nCooSysIndex] );
-            if( xCooSys == xCurrentCooSys )
+            if( xCooSys == aCooSysList[nCooSysIndex] )
             {
                 aRet = ObjectIdentifier::createParticleForDiagram() + ":CS=" + 
OUString::number( nCooSysIndex );
                 break;

Reply via email to