summaryrefslogtreecommitdiff
path: root/chart2/source/tools/ChartModelHelper.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/tools/ChartModelHelper.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/tools/ChartModelHelper.cxx')
-rw-r--r--chart2/source/tools/ChartModelHelper.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index c6a294fe8a15..2d684b059355 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -254,13 +254,13 @@ bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, ChartMod
if( xUsedData.is() )
{
uno::Reference< beans::XPropertySet > xProp;
- uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aData( xUsedData->getDataSequences());
- for( sal_Int32 i=0; i<aData.getLength(); ++i )
+ const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aData( xUsedData->getDataSequences());
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labeledData : aData )
{
- xProp.set( uno::Reference< beans::XPropertySet >( aData[i]->getValues(), uno::UNO_QUERY ) );
+ xProp.set( uno::Reference< beans::XPropertySet >( labeledData->getValues(), uno::UNO_QUERY ) );
if(xProp.is())
xProp->setPropertyValue("IncludeHiddenCells", aNewValue );
- xProp.set( uno::Reference< beans::XPropertySet >( aData[i]->getLabel(), uno::UNO_QUERY ) );
+ xProp.set( uno::Reference< beans::XPropertySet >( labeledData->getLabel(), uno::UNO_QUERY ) );
if(xProp.is())
xProp->setPropertyValue("IncludeHiddenCells", aNewValue );
}