diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-08 14:33:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-08 18:32:33 +0200 |
commit | 11bdb6b9d9df991bb4ee48d4682458facaa2bdd5 (patch) | |
tree | 29180dbac55048e038c404769d059780f39f21a3 /chart2/source/tools/DiagramHelper.cxx | |
parent | c69e5e3cc08bfbb4a5f6c756c523e4016c8fd1dd (diff) |
improve loplugin:referencecasting
to catch a few more cases
Change-Id: I0323fba51bb2b4ba255e1db5aa0d890c5c6a2e1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93726
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/tools/DiagramHelper.cxx')
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index d9b1bf064cdf..ab93f06a8096 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -479,20 +479,18 @@ void DiagramHelper::setDimension( //change all coordinate systems: Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY_THROW ); - Sequence< Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() ); - for( sal_Int32 nCS = 0; nCS < aCooSysList.getLength(); ++nCS ) + const Sequence< Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() ); + for( Reference<XCoordinateSystem> const & xOldCooSys : aCooSysList ) { - Reference< XCoordinateSystem > xOldCooSys( aCooSysList[nCS], uno::UNO_QUERY ); Reference< XCoordinateSystem > xNewCooSys; Reference< XChartTypeContainer > xChartTypeContainer( xOldCooSys, uno::UNO_QUERY ); if( !xChartTypeContainer.is() ) continue; - Sequence< Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); - for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT ) + const Sequence< Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); + for( Reference< XChartType > const & xChartType : aChartTypeList ) { - Reference< XChartType > xChartType( aChartTypeList[nT], uno::UNO_QUERY ); bIsSupportingOnlyDeepStackingFor3D = ChartTypeHelper::isSupportingOnlyDeepStackingFor3D( xChartType ); if(!xNewCooSys.is()) { |