diff options
-rw-r--r-- | include/svx/svdmrkv.hxx | 4 | ||||
-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 |
4 files changed, 8 insertions, 16 deletions
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index cd585a3348cf..5de8fa0db933 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -280,12 +280,12 @@ public: // SDRSEARCH_DEEP SDRSEARCH_ALSOONMASTER SDRSEARCH_TESTMARKABLE SDRSEARCH_TESTTEXTEDIT // SDRSEARCH_WITHTEXT SDRSEARCH_TESTTEXTAREA SDRSEARCH_BACKWARD SDRSEARCH_MARKED // SDRSEARCH_WHOLEPAGE - bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions, SdrObject** ppRootObj, size_t* pnMarkNum=NULL, sal_uInt16* pnPassNum=NULL) const; + bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions, SdrObject** ppRootObj, sal_uInt16* pnPassNum=NULL) const; bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions=0) const; bool MarkObj(const Point& rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false); // Pick: Supported options for nOptions are SDRSEARCH_PASS2BOUND und SDRSEARCH_PASS3NEAREST - bool PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, size_t* pnMarkNum=NULL, sal_uIntPtr nOptions=0) const; + bool PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions=0) const; // Selects the most upper of the marked objects (O1) and scans from there // towards bottom direction, selecting the first non-marked object (O2). 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; |