summaryrefslogtreecommitdiff
path: root/canvas/source/vcl/textlayout.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-02-26 19:53:16 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-02-27 07:21:01 +0100
commit10b6529a2abe78aeb650c5e027cdbad4c2a72219 (patch)
tree0b4885deb0fbb0e6d09c4058e1c77a0eed8c7eab /canvas/source/vcl/textlayout.cxx
parent96d551636e9179eb6874a5156b191ef3bff0a10c (diff)
Use for-range loops (canvas)
Change-Id: I6a3b0b7bd6d4d3f432877e9fab0aadc041a4e8e9 Reviewed-on: https://gerrit.libreoffice.org/50389 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'canvas/source/vcl/textlayout.cxx')
-rw-r--r--canvas/source/vcl/textlayout.cxx22
1 files changed, 7 insertions, 15 deletions
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index df6e69407d4d..1a659f463ab7 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -132,15 +132,11 @@ namespace vclcanvas
{
aOutlineSequence.reserve(aOutlines.size());
sal_Int32 nIndex (0);
- for (::basegfx::B2DPolyPolygonVector::const_iterator
- iOutline(aOutlines.begin()),
- iEnd(aOutlines.end());
- iOutline!=iEnd;
- ++iOutline)
+ for (auto const& outline : aOutlines)
{
aOutlineSequence[nIndex++] = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
mxDevice,
- *iOutline);
+ outline);
}
}
@@ -182,17 +178,13 @@ namespace vclcanvas
{
aBoundingBoxes.realloc(aMetricVector.size());
sal_Int32 nIndex (0);
- for (MetricVector::const_iterator
- iMetric(aMetricVector.begin()),
- iEnd(aMetricVector.end());
- iMetric!=iEnd;
- ++iMetric)
+ for (auto const& metric : aMetricVector)
{
aBoundingBoxes[nIndex++] = geometry::RealRectangle2D(
- iMetric->getX(),
- iMetric->getY(),
- iMetric->getX() + iMetric->getWidth(),
- iMetric->getY() + iMetric->getHeight());
+ metric.getX(),
+ metric.getY(),
+ metric.getX() + metric.getWidth(),
+ metric.getY() + metric.getHeight());
}
}
return aBoundingBoxes;