diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-26 18:50:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-27 07:41:05 +0100 |
commit | e82192764485e7599af43c002d658b7b15c01f94 (patch) | |
tree | ed96e63ba2fe98d3e98d5505d8a0a47e335dafba /chart2 | |
parent | 93933e5f4ec1d8109717f89deb4029a8472d17ff (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/inc/ObjectIdentifier.hxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/ObjectIdentifier.cxx | 11 |
2 files changed, 7 insertions, 7 deletions
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; |