Kaydet (Commit) b30499e2 authored tarafından Matteo Casalin's avatar Matteo Casalin

mnHitTolLog is already sal_uInt16

Change-Id: I4a0e55818ad8e2f61845484a71b6283e0a7c326a
üst 541f369f
...@@ -1913,7 +1913,6 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie ...@@ -1913,7 +1913,6 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
bool bCheckNearestOn3rdPass(nOptions & SdrSearchOptions::PASS3NEAREST); bool bCheckNearestOn3rdPass(nOptions & SdrSearchOptions::PASS3NEAREST);
rpObj=nullptr; rpObj=nullptr;
rpPV=nullptr; rpPV=nullptr;
sal_uInt16 nTol=(sal_uInt16)mnHitTolLog;
bool bFnd=false; bool bFnd=false;
const size_t nMarkCount=GetMarkedObjectCount(); const size_t nMarkCount=GetMarkedObjectCount();
for (size_t nMarkNum=nMarkCount; nMarkNum>0 && !bFnd;) { for (size_t nMarkNum=nMarkCount; nMarkNum>0 && !bFnd;) {
...@@ -1921,7 +1920,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie ...@@ -1921,7 +1920,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SdrMark* pM=GetSdrMarkByIndex(nMarkNum); SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
SdrPageView* pPV=pM->GetPageView(); SdrPageView* pPV=pM->GetPageView();
SdrObject* pObj=pM->GetMarkedSdrObj(); SdrObject* pObj=pM->GetMarkedSdrObj();
bFnd = nullptr != CheckSingleSdrObjectHit(rPnt,nTol,pObj,pPV,SdrSearchOptions::TESTMARKABLE,nullptr); bFnd = nullptr != CheckSingleSdrObjectHit(rPnt,mnHitTolLog,pObj,pPV,SdrSearchOptions::TESTMARKABLE,nullptr);
if (bFnd) { if (bFnd) {
rpObj=pObj; rpObj=pObj;
rpPV=pPV; rpPV=pPV;
...@@ -1937,10 +1936,10 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie ...@@ -1937,10 +1936,10 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SdrPageView* pPV=pM->GetPageView(); SdrPageView* pPV=pM->GetPageView();
SdrObject* pObj=pM->GetMarkedSdrObj(); SdrObject* pObj=pM->GetMarkedSdrObj();
tools::Rectangle aRect(pObj->GetCurrentBoundRect()); tools::Rectangle aRect(pObj->GetCurrentBoundRect());
aRect.Left ()-=nTol; aRect.Left ()-=mnHitTolLog;
aRect.Top ()-=nTol; aRect.Top ()-=mnHitTolLog;
aRect.Right ()+=nTol; aRect.Right ()+=mnHitTolLog;
aRect.Bottom()+=nTol; aRect.Bottom()+=mnHitTolLog;
if (aRect.IsInside(rPnt)) { if (aRect.IsInside(rPnt)) {
bFnd=true; bFnd=true;
rpObj=pObj; rpObj=pObj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment