summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2018-10-12 20:06:18 +0200
committerJulien Nabet <serval2412@yahoo.fr>2018-10-13 15:02:17 +0200
commit00e10ae3189a4407ffb1a48f836cd52dc9a1b6df (patch)
tree8da59257ef54f8843b0e12e44591f6e17e9b6d24 /vcl/unx/generic
parentb9234b43ed259a10cf9077032af0f79740f01d8b (diff)
use range based loops over B2DPolyPolygon in vcl
Change-Id: I98f17311822ba50b0c8eaa50fbdef088c76168d4 Reviewed-on: https://gerrit.libreoffice.org/61730 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 271ecc937850..0de4d5b0e129 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -587,9 +587,7 @@ bool X11SalGraphics::drawPolyPolygon(
return true;
}
- const sal_uInt32 nPolyCount(rPolyPolygon.count());
-
- if(nPolyCount <= 0)
+ if(rPolyPolygon.count() == 0)
{
return true;
}
@@ -620,14 +618,13 @@ bool X11SalGraphics::drawPolyPolygon(
cairo_t* cr = getCairoContext();
clipRegion(cr);
- for(sal_uInt32 a(0); a < nPolyCount; ++a)
+ for(auto const& rPolygon : aPolyPolygon)
{
- const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(a));
- const sal_uInt32 nPointCount(aPolygon.count());
+ const sal_uInt32 nPointCount(rPolygon.count());
if(nPointCount)
{
- const sal_uInt32 nEdgeCount(aPolygon.isClosed() ? nPointCount : nPointCount - 1);
+ const sal_uInt32 nEdgeCount(rPolygon.isClosed() ? nPointCount : nPointCount - 1);
if(nEdgeCount)
{
@@ -635,7 +632,7 @@ bool X11SalGraphics::drawPolyPolygon(
for(sal_uInt32 b = 0; b < nEdgeCount; ++b)
{
- aPolygon.getBezierSegment(b, aEdge);
+ rPolygon.getBezierSegment(b, aEdge);
if(!b)
{