summaryrefslogtreecommitdiff
path: root/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/model/template/ColumnLineChartTypeTemplate.cxx')
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index 8b357a852e8b..560332b81e98 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -284,27 +284,27 @@ sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate(
Reference< XCoordinateSystemContainer > xCooSysCnt(
xDiagram, uno::UNO_QUERY_THROW );
- Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
+ const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
xCooSysCnt->getCoordinateSystems());
- for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i )
+ for( Reference< XCoordinateSystem > const & coords : aCooSysSeq )
{
- Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW );
- Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
- for( sal_Int32 j=0; j<aChartTypeSeq.getLength(); ++j )
+ Reference< XChartTypeContainer > xCTCnt( coords, uno::UNO_QUERY_THROW );
+ const Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
+ for( Reference< XChartType > const & chartType : aChartTypeSeq )
{
- if( aChartTypeSeq[j].is())
+ if( chartType.is())
{
++nNumberOfChartTypes;
if( nNumberOfChartTypes > 2 )
break;
- OUString aCTService = aChartTypeSeq[j]->getChartType();
+ OUString aCTService = chartType->getChartType();
if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )
{
- xColumnChartType.set( aChartTypeSeq[j] );
- xColumnChartCooSys.set( aCooSysSeq[i] );
+ xColumnChartType.set( chartType );
+ xColumnChartCooSys.set( coords );
}
else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_LINE )
- xLineChartType.set( aChartTypeSeq[j] );
+ xLineChartType.set( chartType );
}
}
if( nNumberOfChartTypes > 2 )