summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdglue.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-16 15:12:13 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-17 08:08:22 +0000
commitc23757066d914ac04a39abcd72279c7c3d8919d5 (patch)
treee391a6f83a6e6ad89785e79cc39d0f503ed5fa53 /svx/source/svdraw/svdglue.cxx
parentf6a0ed20ba79c72788fa029fe99572e2d5a666e7 (diff)
loplugin:constantparam in svx
Change-Id: I50fa7e4c7525d2f8107a11d8203957a47680eb80 Reviewed-on: https://gerrit.libreoffice.org/23303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx/source/svdraw/svdglue.cxx')
-rw-r--r--svx/source/svdraw/svdglue.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 946b26dd7966..27f9f68afa25 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -350,20 +350,16 @@ sal_uInt16 SdrGluePointList::FindGluePoint(sal_uInt16 nId) const
return nRet;
}
-sal_uInt16 SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, bool bBack, bool bNext, sal_uInt16 nId0) const
+sal_uInt16 SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const
{
- sal_uInt16 nCount=GetCount();
- sal_uInt16 nRet=SDRGLUEPOINT_NOTFOUND;
- sal_uInt16 nNum=bBack ? 0 : nCount;
- while ((bBack ? nNum<nCount : nNum>0) && nRet==SDRGLUEPOINT_NOTFOUND) {
- if (!bBack) nNum--;
- const SdrGluePoint* pGP=GetObject(nNum);
- if (bNext) {
- if (pGP->GetId()==nId0) bNext=false;
- } else {
- if (pGP->IsHit(rPnt,rOut,pObj)) nRet=nNum;
- }
- if (bBack) nNum++;
+ sal_uInt16 nCount = GetCount();
+ sal_uInt16 nRet = SDRGLUEPOINT_NOTFOUND;
+ sal_uInt16 nNum = nCount;
+ while ((nNum>0) && nRet==SDRGLUEPOINT_NOTFOUND) {
+ nNum--;
+ const SdrGluePoint* pGP = GetObject(nNum);
+ if (pGP->IsHit(rPnt,rOut,pObj))
+ nRet = nNum;
}
return nRet;
}