diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-07 22:14:17 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 21:52:29 +0200 |
commit | 74bccf73fd6d83145a750e1532da708c57c4df79 (patch) | |
tree | 49455ad41049c0f9864f8ff4a1fda2a547ce26cd /svx | |
parent | d19757d7884571535c20b88350387e43c794075a (diff) |
Remove pnMarkNum parameter: either NULL or pointed data is not read
Change-Id: I213a097616275765478a5f21a5f8e9645470a1e8
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svddrgv.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 13 | ||||
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 4 |
3 files changed, 6 insertions, 14 deletions
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 0b047d5af76f..4830f0325c2a 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -735,8 +735,7 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt) bool bRet=false; SdrObject* pObj; SdrPageView* pPV; - size_t nMarkNum; - if (PickMarkedObj(rPnt,pObj,pPV,&nMarkNum,SDRSEARCH_PASS2BOUND)) + if (PickMarkedObj(rPnt,pObj,pPV,SDRSEARCH_PASS2BOUND)) { BrkAction(); UnmarkAllGluePoints(); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 2dff6dc6f9b1..acf38ab54a3f 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1695,14 +1695,13 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions) const { - return PickObj(rPnt,nTol,rpObj,rpPV,nOptions,NULL,NULL,NULL); + return PickObj(rPnt,nTol,rpObj,rpPV,nOptions,NULL,NULL); } -bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions, SdrObject** ppRootObj, size_t* pnMarkNum, sal_uInt16* pnPassNum) const +bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions, SdrObject** ppRootObj, sal_uInt16* pnPassNum) const { // TODO: lacks a Pass2,Pass3 SortMarkedObjects(); if (ppRootObj!=NULL) *ppRootObj=NULL; - if (pnMarkNum!=NULL) *pnMarkNum=CONTAINER_ENTRY_NOTFOUND; if (pnPassNum!=NULL) *pnPassNum=0; rpObj=NULL; rpPV=NULL; @@ -1817,14 +1816,13 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP return rpObj!=NULL; } -bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, size_t* pnMarkNum, sal_uIntPtr nOptions) const +bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions) const { SortMarkedObjects(); bool bBoundCheckOn2ndPass=(nOptions & SDRSEARCH_PASS2BOUND) !=0; bool bCheckNearestOn3rdPass=(nOptions & SDRSEARCH_PASS3NEAREST) !=0; rpObj=NULL; rpPV=NULL; - if (pnMarkNum!=NULL) *pnMarkNum=CONTAINER_ENTRY_NOTFOUND; Point aPt(rPnt); sal_uInt16 nTol=(sal_uInt16)nHitTolLog; bool bFnd=false; @@ -1838,13 +1836,11 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie if (bFnd) { rpObj=pObj; rpPV=pPV; - if (pnMarkNum!=NULL) *pnMarkNum=nMarkNum; } } if ((bBoundCheckOn2ndPass || bCheckNearestOn3rdPass) && !bFnd) { SdrObject* pBestObj=NULL; SdrPageView* pBestPV=NULL; - size_t nBestMarkNum=0; sal_uIntPtr nBestDist=ULONG_MAX; for (size_t nMarkNum=nMarkAnz; nMarkNum>0 && !bFnd;) { --nMarkNum; @@ -1860,7 +1856,6 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie bFnd=true; rpObj=pObj; rpPV=pPV; - if (pnMarkNum!=NULL) *pnMarkNum=nMarkNum; } else if (bCheckNearestOn3rdPass) { sal_uIntPtr nDist=0; if (aPt.X()<aRect.Left()) nDist+=aRect.Left()-aPt.X(); @@ -1870,14 +1865,12 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie if (nDist<nBestDist) { pBestObj=pObj; pBestPV=pPV; - nBestMarkNum=nMarkNum; } } } if (bCheckNearestOn3rdPass && !bFnd) { rpObj=pBestObj; rpPV=pBestPV; - if (pnMarkNum!=NULL) *pnMarkNum=nBestMarkNum; bFnd=pBestObj!=NULL; } } diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index a446cb75b3e7..dbaee9279103 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -364,7 +364,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co { eHit=SDRHIT_GLUEPOINT; // deselected glue point hit } - else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_MARKED,&pObj,NULL,&nHitPassNum)) + else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_MARKED,&pObj,&nHitPassNum)) { eHit=SDRHIT_MARKEDOBJECT; ::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( pObj ); @@ -384,7 +384,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co } } } - else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE,&pObj,NULL,&nHitPassNum)) + else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE,&pObj,&nHitPassNum)) { // MasterPages and WholePage for Macro and URL eHit=SDRHIT_UNMARKEDOBJECT; |