diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-03 12:54:07 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-03 19:20:53 +0100 |
commit | ba7191ed0d4da2f5a2ebd2ef40387b26145860f1 (patch) | |
tree | e019dbd2dcc947c155e63841c2ec3a53eca427fb /chart2/source/controller/itemsetwrapper | |
parent | 301514183d471cfeb085673eb4563f8c310162b7 (diff) |
Use for-range loops in chart2 (part1)
Change-Id: I9310a6dc79d47f9058df8a3b463667389af1b2cb
Reviewed-on: https://gerrit.libreoffice.org/50672
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'chart2/source/controller/itemsetwrapper')
-rw-r--r-- | chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx index 29019f2c13ff..b9e75ea51111 100644 --- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx +++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx @@ -106,19 +106,18 @@ AllDataLabelItemConverter::AllDataLabelItemConverter( std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList( ::chart::ChartModelHelper::getDataSeries( xChartModel )); - std::vector< uno::Reference< chart2::XDataSeries > >::const_iterator aIt; - for( aIt = aSeriesList.begin(); aIt != aSeriesList.end(); ++aIt ) + for (auto const& series : aSeriesList) { - uno::Reference< beans::XPropertySet > xObjectProperties( *aIt, uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xObjectProperties(series, uno::UNO_QUERY); uno::Reference< uno::XComponentContext> xContext(nullptr);//do not need Context for label properties - sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( xObjectProperties, *aIt, -1/*nPointIndex*/, ChartModelHelper::findDiagram( xChartModel ) ); + sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( xObjectProperties, series, -1/*nPointIndex*/, ChartModelHelper::findDiagram( xChartModel ) ); sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel( xObjectProperties,uno::Reference< util::XNumberFormatsSupplier >(xChartModel, uno::UNO_QUERY)); m_aConverters.push_back( new ::chart::wrapper::DataPointItemConverter( - xChartModel, xContext, xObjectProperties, *aIt, rItemPool, rDrawModel, + xChartModel, xContext, xObjectProperties, series, rItemPool, rDrawModel, xNamedPropertyContainerFactory, GraphicObjectType::FilledDataPoint, nullptr, true, false, 0, true, nNumberFormat, nPercentNumberFormat)); } @@ -171,10 +170,9 @@ AllSeriesStatisticsConverter::AllSeriesStatisticsConverter( std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList( ::chart::ChartModelHelper::getDataSeries( xChartModel )); - std::vector< uno::Reference< chart2::XDataSeries > >::const_iterator aIt; - for( aIt = aSeriesList.begin(); aIt != aSeriesList.end(); ++aIt ) + for (auto const& series : aSeriesList) { - uno::Reference< beans::XPropertySet > xObjectProperties( *aIt, uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xObjectProperties(series, uno::UNO_QUERY); m_aConverters.push_back( new ::chart::wrapper::StatisticsItemConverter( xChartModel, xObjectProperties, rItemPool )); } |