summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svddrgmt.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-11-18 13:43:28 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-18 17:36:54 +0100
commit587ef41f75b8ea0bcd03366178d42a324dcf481c (patch)
treea672c557221d4fec8abbaf83568ed9e7242323a5 /svx/source/svdraw/svddrgmt.cxx
parent8b83659bb8f3368a1df949d5bc84d7b2dd0370b4 (diff)
Simplify containers iterations in svx/source/[s-u]*
Use range-based loop or replace with STL functions Change-Id: I2ec3e58cc46c9286ef863c732912ca7a729bab62 Reviewed-on: https://gerrit.libreoffice.org/63522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svddrgmt.cxx')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index cb0c3d1fa2c5..2c89ca4aabcb 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -476,10 +476,9 @@ void SdrDragMethod::createSdrDragEntries_PointDrag()
if(aPathXPP.count())
{
- for(SdrUShortCont::const_iterator it = rPts.begin(); it != rPts.end(); ++it)
+ for(const sal_uInt16 nObjPt : rPts)
{
sal_uInt32 nPolyNum, nPointNum;
- const sal_uInt16 nObjPt = *it;
if(sdr::PolyPolygonEditor::GetRelativePolyPoint(aPathXPP, nObjPt, nPolyNum, nPointNum))
{
@@ -518,9 +517,8 @@ void SdrDragMethod::createSdrDragEntries_GlueDrag()
if (pGPL)
{
- for(SdrUShortCont::const_iterator it = rPts.begin(); it != rPts.end(); ++it)
+ for(const sal_uInt16 nObjPt : rPts)
{
- const sal_uInt16 nObjPt = *it;
const sal_uInt16 nGlueNum(pGPL->FindGluePoint(nObjPt));
if(SDRGLUEPOINT_NOTFOUND != nGlueNum)
@@ -1620,9 +1618,8 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
const SdrGluePointList* pGPL=pObj->GetGluePointList();
tools::Rectangle aBound(pObj->GetCurrentBoundRect());
- for (SdrUShortCont::const_iterator it = rPts.begin(); it != rPts.end(); ++it)
+ for (sal_uInt16 nId : rPts)
{
- sal_uInt16 nId = *it;
sal_uInt16 nGlueNum=pGPL->FindGluePoint(nId);
if (nGlueNum!=SDRGLUEPOINT_NOTFOUND)