summaryrefslogtreecommitdiff
path: root/chart2/source/controller/main/ObjectHierarchy.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-18 09:17:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-18 11:28:50 +0200
commit337a9a454c1bc95214111578d3f9c0622c55c509 (patch)
tree4eda99edf46e45ce804fcde98197cf0d96b7ac3d /chart2/source/controller/main/ObjectHierarchy.cxx
parent6089755d197528d071906846c58a397add0876a5 (diff)
use for-range on Sequence in chart2
Change-Id: Ief02e5d5284b0cbad26b04c0a282dccfee577b90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/main/ObjectHierarchy.cxx')
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 15b5392153b3..32762762e827 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -238,9 +238,9 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartD
if( !m_bOrderingForElementSelector )
{
// Axis Titles. Note: These are interpreted of being top level
- Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- for( sal_Int32 i=0; i<aAxes.getLength(); ++i )
- lcl_addAxisTitle( aAxes[i], aTopLevelContainer, xModel );
+ const Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
+ for( Reference< XAxis > const & axis : aAxes )
+ lcl_addAxisTitle( axis, aTopLevelContainer, xModel );
// Diagram
aTopLevelContainer.push_back( aDiaOID );
@@ -319,9 +319,8 @@ void ImplObjectHierarchy::createAxesTree(
aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram );
// Grids
Reference< frame::XModel > xChartModel = xChartDoc;
- for( sal_Int32 nA=0; nA<aAxes.getLength(); ++nA )
+ for( Reference< XAxis > const & xAxis : std::as_const(aAxes) )
{
- Reference< XAxis > xAxis( aAxes[nA] );
if(!xAxis.is())
continue;
@@ -339,7 +338,7 @@ void ImplObjectHierarchy::createAxesTree(
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierForObject( xAxis, xChartModel ) );
// axis title
- lcl_addAxisTitle( aAxes[nA], rContainer, xChartModel );
+ lcl_addAxisTitle( xAxis, rContainer, xChartModel );
}
Reference< beans::XPropertySet > xGridProperties( xAxis->getGridProperties() );