summaryrefslogtreecommitdiff
path: root/svgio/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-02-07 09:07:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-02-07 11:27:01 +0100
commit10cc0f3d2ddaa5d7f6ee18042dacfc67c1be96af (patch)
treef9784755b22e42b741669a816ec4c21b5dc0cceb /svgio/source
parent093d174f959f8f9524d288c2a593f3a764a8a73c (diff)
simplify some Primitive2DContainer accesses
Change-Id: I217489db2f66049dfb0908f2f2a07a2f585302ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163070 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio/source')
-rw-r--r--svgio/source/svgreader/svgtextpathnode.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index 9ccdb93f599d..ee197f9d68fd 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -393,13 +393,12 @@ namespace svgio::svgreader
if(fPosition < 0.0)
return;
- const sal_Int32 nLength(rPathContent.size());
- sal_Int32 nCurrent(0);
+ auto pathContentIt = rPathContent.begin();
- while(fPosition < fBasegfxPathLength && nCurrent < nLength)
+ while(fPosition < fBasegfxPathLength && pathContentIt != rPathContent.end())
{
const drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pCandidate = nullptr;
- const drawinglayer::primitive2d::Primitive2DReference xReference(rPathContent[nCurrent]);
+ const drawinglayer::primitive2d::Primitive2DReference xReference(*pathContentIt);
if(xReference.is())
{
@@ -427,7 +426,7 @@ namespace svgio::svgreader
fPosition = aPathTextBreakupHelper.getPosition();
}
- nCurrent++;
+ ++pathContentIt;
}
}