summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorYuki Joou <yukijoou@kemonomimi.gay>2024-06-12 00:30:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-07-14 12:24:14 +0200
commitcfe6ce1656754776568be5b30217efc08aa70dc0 (patch)
tree1c1692456ac5c3c6d04331203daefaeaf987e084 /editeng
parent63fe0d6c07eed6a4b125c6ee0fb2d53ed689385f (diff)
tdf#145538 - related: Make tools::PolyPolygon iterable
This patch allows tools::PolyPolygon to be iterated using c++11's fancy range-based for-loops. It also upgrades a bunch of old-style for-loops iterating over polypolygons to the new style to make code more readable. Note that not all for-loops iterating over polypolygons have been upgraded, as I didn't find a way to automatically find those. I just did a few I found manually. Change-Id: Ifa8d0d44e6f0aa28fdcfd87d70058b12f48c1349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168730 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/txtrange.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index 2f02a1150f91..02e452209876 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -305,9 +305,8 @@ void SvxBoundArgs::Calc( const tools::PolyPolygon& rPoly )
{
sal_uInt16 nCount;
nAct = 0;
- for( sal_uInt16 i = 0; i < rPoly.Count(); ++i )
+ for( auto const& rPol : rPoly )
{
- const tools::Polygon& rPol = rPoly[ i ];
nCount = rPol.GetSize();
if( nCount )
{