diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-15 09:56:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-15 14:00:48 +0200 |
commit | 898cbb22f07a2c1487700326f134fe54e7a13f4d (patch) | |
tree | d5bdd749ca565f74976653c7cac90e1eaecc74d6 /canvas | |
parent | 10cdeed12ef834f5df3b6577c1d9efcc811d6938 (diff) |
use for-range on Sequence in basctl..canvas
Change-Id: Idad3d8fbe785c7b1b8b287a3227372adb2757de8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94260
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/directx/dx_impltools.cxx | 9 | ||||
-rw-r--r-- | canvas/source/tools/canvastools.cxx | 6 | ||||
-rw-r--r-- | canvas/source/tools/parametricpolypolygon.cxx | 4 |
3 files changed, 9 insertions, 10 deletions
diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx index 18113ee34394..21778b4843fb 100644 --- a/canvas/source/directx/dx_impltools.cxx +++ b/canvas/source/directx/dx_impltools.cxx @@ -408,10 +408,9 @@ namespace dxcanvas GraphicsPathSharedPtr pRes = std::make_shared<Gdiplus::GraphicsPath>(); std::vector< Gdiplus::PointF > aPoints; - sal_Int32 nCurrPoly; - for( nCurrPoly=0; nCurrPoly<points.getLength(); ++nCurrPoly ) + for( uno::Sequence< geometry::RealPoint2D > const & seqPoints : points ) { - const sal_Int32 nCurrSize( points[nCurrPoly].getLength() ); + const sal_Int32 nCurrSize( seqPoints.getLength() ); if( nCurrSize ) { aPoints.resize( nCurrSize ); @@ -419,8 +418,8 @@ namespace dxcanvas // TODO(F1): Closed/open polygons // convert from RealPoint2D array to Gdiplus::PointF array - std::transform( points[nCurrPoly].getConstArray(), - points[nCurrPoly].getConstArray()+nCurrSize, + std::transform( seqPoints.getConstArray(), + seqPoints.getConstArray()+nCurrSize, aPoints.begin(), implGdiPlusPointFromRealPoint2D ); diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx index 2ca1b5081724..53ab7e71f0c5 100644 --- a/canvas/source/tools/canvastools.cxx +++ b/canvas/source/tools/canvastools.cxx @@ -1314,10 +1314,10 @@ namespace canvas::tools void extractExtraFontProperties(const uno::Sequence<beans::PropertyValue>& rExtraFontProperties, sal_uInt32 &rEmphasisMark) { - for(sal_Int32 nIdx = 0; nIdx < rExtraFontProperties.getLength(); ++nIdx) + for(const beans::PropertyValue& rPropVal : rExtraFontProperties) { - if (rExtraFontProperties[nIdx].Name == "EmphasisMark") - rExtraFontProperties[nIdx].Value >>= rEmphasisMark; + if (rPropVal.Name == "EmphasisMark") + rPropVal.Value >>= rEmphasisMark; } } diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx index 5bbd50576f2e..a0a9a7880219 100644 --- a/canvas/source/tools/parametricpolypolygon.cxx +++ b/canvas/source/tools/parametricpolypolygon.cxx @@ -58,10 +58,10 @@ namespace canvas colorStops[1] = 1; // extract args - for( sal_Int32 i=0; i<rArgs.getLength(); ++i ) + for( const uno::Any& rArg : rArgs ) { beans::PropertyValue aProp; - if( rArgs[i] >>= aProp ) + if( rArg >>= aProp ) { if ( aProp.Name == "Colors" ) { |