summaryrefslogtreecommitdiff
path: root/chart2/source/view/charttypes/VSeriesPlotter.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/view/charttypes/VSeriesPlotter.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/view/charttypes/VSeriesPlotter.cxx')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 484fa4362261..063a87eb78ee 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -581,9 +581,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
}
}
- for( sal_Int32 nN = 0; nN < aTextList.getLength(); ++nN )
+ for( auto const & line : std::as_const(aTextList) )
{
- if( !aTextList[nN].isEmpty() )
+ if( !line.isEmpty() )
{
++nLineCountForSymbolsize;
}
@@ -864,11 +864,10 @@ double lcl_getErrorBarLogicLength(
{
double fMaxValue;
::rtl::math::setInf(&fMaxValue, true);
- const double* pValues = rData.getConstArray();
- for(sal_Int32 i=0; i<rData.getLength(); ++i, ++pValues)
+ for(double d : rData)
{
- if(fMaxValue<*pValues)
- fMaxValue=*pValues;
+ if(fMaxValue < d)
+ fMaxValue = d;
}
if( std::isfinite( fMaxValue ) &&
std::isfinite( fPercent ))
@@ -1399,7 +1398,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
xScalingY.set( aScales[1].Scaling );
}
- uno::Sequence< geometry::RealPoint2D > aCalculatedPoints(
+ const uno::Sequence< geometry::RealPoint2D > aCalculatedPoints(
xCalculator->getCurveValues(
fMinX, fMaxX, nPointCount,
xScalingX, xScalingY, bMaySkipPoints ));
@@ -1416,10 +1415,10 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
sal_Int32 nRealPointCount = 0;
- for(sal_Int32 nP = 0; nP < aCalculatedPoints.getLength(); ++nP)
+ for(geometry::RealPoint2D const & p : aCalculatedPoints)
{
- double fLogicX = aCalculatedPoints[nP].X;
- double fLogicY = aCalculatedPoints[nP].Y;
+ double fLogicX = p.X;
+ double fLogicY = p.Y;
double fLogicZ = 0.0; //dummy
// fdo#51656: don't scale mean value lines