diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-12 10:52:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-13 07:47:12 +0100 |
commit | cf4cf3ed0d9f57981b3fd15d64ef1c53bc16c0f1 (patch) | |
tree | 37fd4e39366cfa8db1940ee93f908e53906ba39d /svx | |
parent | 8782ea036e97c383e0a979ed30c8da955c56877b (diff) |
sal_uIntPtr->sal_Int32 in SdrDragStat
also fix the
X& X()
methods to be normal
void SetX(X const &)
methods
Change-Id: Id2999b09535ce560110eda646d3d5bbbedf87326
Reviewed-on: https://gerrit.libreoffice.org/46309
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/engine3d/dragmt3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svddrag.cxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 58 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 22 |
5 files changed, 48 insertions, 48 deletions
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index 159126fb1f5d..1f9c9f92c634 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -114,7 +114,7 @@ bool E3dDragMethod::BeginSdrDrag() if(E3dDragConstraint::Z == meConstraint) { const sal_uInt32 nCnt(maGrp.size()); - DragStat().Ref1() = maFullBound.Center(); + DragStat().SetRef1( maFullBound.Center() ); for(sal_uInt32 nOb(0); nOb < nCnt; nOb++) { diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx index 6d16aa3ccb0f..e2d5cb5e5d39 100644 --- a/svx/source/svdraw/svddrag.cxx +++ b/svx/source/svdraw/svddrag.cxx @@ -58,30 +58,30 @@ void SdrDragStat::Reset() void SdrDragStat::Reset(const Point& rPnt) { Reset(); - Start()=rPnt; + SetStart(rPnt); aPos0=rPnt; - RealNow()=rPnt; + SetRealNow(rPnt); } void SdrDragStat::NextMove(const Point& rPnt) { aPos0=GetNow(); - RealNow()=rPnt; - Now()=GetRealNow(); + SetRealNow(rPnt); + SetNow(GetRealNow()); } void SdrDragStat::NextPoint() { Point aPnt(GetNow()); mvPnts.emplace_back(GetRealNow()); - Prev()=aPnt; + SetPrev(aPnt); } void SdrDragStat::PrevPoint() { if (mvPnts.size()>=2) { // one has to remain at all times mvPnts.erase(mvPnts.begin()+mvPnts.size()-2); - Now() = GetRealNow(); + SetNow( GetRealNow() ); } } diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index a12282d804f9..536c27e1b271 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -949,7 +949,7 @@ bool SdrDragMovHdl::BeginSdrDrag() if( !GetDragHdl() ) return false; - DragStat().Ref1()=GetDragHdl()->GetPos(); + DragStat().SetRef1(GetDragHdl()->GetPos()); DragStat().SetShown(!DragStat().IsShown()); SdrHdlKind eKind=GetDragHdl()->GetKind(); SdrHdl* pH1=GetHdlList().GetHdl(SdrHdlKind::Ref1); @@ -1808,7 +1808,7 @@ bool SdrDragResize::BeginSdrDrag() if (pRefHdl!=nullptr && !getSdrDragView().IsResizeAtCenter()) { // Calc hack to adjust for calc grid - DragStat().Ref1()=pRefHdl->GetPos() - getSdrDragView().GetGridOffset(); + DragStat().SetRef1(pRefHdl->GetPos() - getSdrDragView().GetGridOffset()); } else { @@ -1817,11 +1817,11 @@ bool SdrDragResize::BeginSdrDrag() if (pRef1!=nullptr && pRef2!=nullptr) { - DragStat().Ref1()=tools::Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center(); + DragStat().SetRef1(tools::Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center()); } else { - DragStat().Ref1()=GetMarkedRect().Center(); + DragStat().SetRef1(GetMarkedRect().Center()); } } @@ -1833,9 +1833,9 @@ bool SdrDragResize::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragResize::getCurrentTransformation() { basegfx::B2DHomMatrix aRetval(basegfx::utils::createTranslateB2DHomMatrix( - -DragStat().Ref1().X(), -DragStat().Ref1().Y())); + -DragStat().GetRef1().X(), -DragStat().GetRef1().Y())); aRetval.scale(double(aXFact), double(aYFact)); - aRetval.translate(DragStat().Ref1().X(), DragStat().Ref1().Y()); + aRetval.translate(DragStat().GetRef1().X(), DragStat().GetRef1().Y()); return aRetval; } @@ -2023,7 +2023,7 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) void SdrDragResize::applyCurrentTransformationToSdrObject(SdrObject& rTarget) { - rTarget.Resize(DragStat().Ref1(),aXFact,aYFact); + rTarget.Resize(DragStat().GetRef1(),aXFact,aYFact); } bool SdrDragResize::EndSdrDrag(bool bCopy) @@ -2032,15 +2032,15 @@ bool SdrDragResize::EndSdrDrag(bool bCopy) if (IsDraggingPoints()) { - getSdrDragView().ResizeMarkedPoints(DragStat().Ref1(),aXFact,aYFact); + getSdrDragView().ResizeMarkedPoints(DragStat().GetRef1(),aXFact,aYFact); } else if (IsDraggingGluePoints()) { - getSdrDragView().ResizeMarkedGluePoints(DragStat().Ref1(),aXFact,aYFact,bCopy); + getSdrDragView().ResizeMarkedGluePoints(DragStat().GetRef1(),aXFact,aYFact,bCopy); } else { - getSdrDragView().ResizeMarkedObj(DragStat().Ref1(),aXFact,aYFact,bCopy); + getSdrDragView().ResizeMarkedObj(DragStat().GetRef1(),aXFact,aYFact,bCopy); } return true; @@ -2100,7 +2100,7 @@ bool SdrDragRotate::BeginSdrDrag() if (nullptr != pH) { Show(); - DragStat().Ref1()=pH->GetPos(); + DragStat().SetRef1(pH->GetPos()); nAngle0=GetAngle(DragStat().GetStart()-DragStat().GetRef1()); return true; } @@ -2112,7 +2112,7 @@ bool SdrDragRotate::BeginSdrDrag() if(!aLocalMarkRect.IsEmpty()) { Show(); - DragStat().Ref1() = aLocalMarkRect.Center(); + DragStat().SetRef1(aLocalMarkRect.Center()); nAngle0=GetAngle(DragStat().GetStart()-DragStat().GetRef1()); return true; } @@ -2255,7 +2255,7 @@ bool SdrDragShear::BeginSdrDrag() if (pRefHdl!=nullptr) { - DragStat().Ref1()=pRefHdl->GetPos(); + DragStat().SetRef1(pRefHdl->GetPos()); nAngle0=GetAngle(DragStat().GetStart()-DragStat().GetRef1()); } else @@ -2528,8 +2528,8 @@ bool SdrDragMirror::BeginSdrDrag() if (pH1!=nullptr && pH2!=nullptr) { - DragStat().Ref1()=pH1->GetPos(); - DragStat().Ref2()=pH2->GetPos(); + DragStat().SetRef1(pH1->GetPos()); + DragStat().SetRef2(pH2->GetPos()); Ref1()=pH1->GetPos(); Ref2()=pH2->GetPos(); aDif=pH2->GetPos()-pH1->GetPos(); @@ -2633,8 +2633,8 @@ bool SdrDragGradient::BeginSdrDrag() if(pIAOHandle) { // save old values - DragStat().Ref1() = pIAOHandle->GetPos(); - DragStat().Ref2() = pIAOHandle->Get2ndPos(); + DragStat().SetRef1( pIAOHandle->GetPos() ); + DragStat().SetRef2( pIAOHandle->Get2ndPos() ); // what was hit? bool bHit(false); @@ -2706,27 +2706,27 @@ void SdrDragGradient::MoveSdrDrag(const Point& rPnt) { if(pIAOHandle->IsMoveFirstHandle()) { - pIAOHandle->SetPos(DragStat().Ref1() + aMoveDiff); + pIAOHandle->SetPos(DragStat().GetRef1() + aMoveDiff); if(pIAOHandle->GetColorHdl1()) - pIAOHandle->GetColorHdl1()->SetPos(DragStat().Ref1() + aMoveDiff); + pIAOHandle->GetColorHdl1()->SetPos(DragStat().GetRef1() + aMoveDiff); } else { - pIAOHandle->Set2ndPos(DragStat().Ref2() + aMoveDiff); + pIAOHandle->Set2ndPos(DragStat().GetRef2() + aMoveDiff); if(pIAOHandle->GetColorHdl2()) - pIAOHandle->GetColorHdl2()->SetPos(DragStat().Ref2() + aMoveDiff); + pIAOHandle->GetColorHdl2()->SetPos(DragStat().GetRef2() + aMoveDiff); } } else { - pIAOHandle->SetPos(DragStat().Ref1() + aMoveDiff); - pIAOHandle->Set2ndPos(DragStat().Ref2() + aMoveDiff); + pIAOHandle->SetPos(DragStat().GetRef1() + aMoveDiff); + pIAOHandle->Set2ndPos(DragStat().GetRef2() + aMoveDiff); if(pIAOHandle->GetColorHdl1()) - pIAOHandle->GetColorHdl1()->SetPos(DragStat().Ref1() + aMoveDiff); + pIAOHandle->GetColorHdl1()->SetPos(DragStat().GetRef1() + aMoveDiff); if(pIAOHandle->GetColorHdl2()) - pIAOHandle->GetColorHdl2()->SetPos(DragStat().Ref2() + aMoveDiff); + pIAOHandle->GetColorHdl2()->SetPos(DragStat().GetRef2() + aMoveDiff); } // new state @@ -2748,14 +2748,14 @@ bool SdrDragGradient::EndSdrDrag(bool /*bCopy*/) void SdrDragGradient::CancelSdrDrag() { // restore old values - pIAOHandle->SetPos(DragStat().Ref1()); - pIAOHandle->Set2ndPos(DragStat().Ref2()); + pIAOHandle->SetPos(DragStat().GetRef1()); + pIAOHandle->Set2ndPos(DragStat().GetRef2()); if(pIAOHandle->GetColorHdl1()) - pIAOHandle->GetColorHdl1()->SetPos(DragStat().Ref1()); + pIAOHandle->GetColorHdl1()->SetPos(DragStat().GetRef1()); if(pIAOHandle->GetColorHdl2()) - pIAOHandle->GetColorHdl2()->SetPos(DragStat().Ref2()); + pIAOHandle->GetColorHdl2()->SetPos(DragStat().GetRef2()); // new state pIAOHandle->FromIAOToItem(getSdrDragView().GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(), true, false); diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 2f6152df4d9b..c8ea551e235a 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -958,7 +958,7 @@ bool SdrMeasureObj::MovCreate(SdrDragStat& rStat) aPt2=rStat.GetNow(); if (pView!=nullptr && pView->IsCreate1stPointAsCenter()) { aPt1+=aPt1; - aPt1-=rStat.Now(); + aPt1-=rStat.GetNow(); } SetTextDirty(); SetBoundRectDirty(); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index b6344c3ad804..d9bc1287e904 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -730,8 +730,8 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const // let the alternative that allows fewer correction win if (nX1<nX2) bPnt2=false; else bPnt1=false; } - if (bPnt1) rDrag.Now()=aNeuPos1; - if (bPnt2) rDrag.Now()=aNeuPos2; + if (bPnt1) rDrag.SetNow(aNeuPos1); + if (bPnt2) rDrag.SetNow(aNeuPos2); } rDrag.SetActionRect(tools::Rectangle(rDrag.GetNow(),rDrag.GetNow())); @@ -752,7 +752,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const aPt=mpSdrPathDragData->aXP[nNextPnt]; aPt+=mpSdrPathDragData->aXP[nPrevPnt]; aPt/=2; - rDrag.Now()=aPt; + rDrag.SetNow(aPt); } } @@ -1326,12 +1326,12 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) bool bFreeHand=IsFreeHand(pU->eAktKind); rStat.SetNoSnap(bFreeHand); rStat.SetOrtho8Possible(pU->eAktKind!=OBJ_CARC && pU->eAktKind!=OBJ_RECT && (!pU->bMixedCreate || pU->eAktKind!=OBJ_LINE)); - rXPoly[nActPoint]=rStat.Now(); + rXPoly[nActPoint]=rStat.GetNow(); if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE && rXPoly.GetPointCount()>=1) { - Point aPt(rStat.Start()); + Point aPt(rStat.GetStart()); if (pView!=nullptr && pView->IsCreate1stPointAsCenter()) { aPt+=aPt; - aPt-=rStat.Now(); + aPt-=rStat.GetNow(); } rXPoly[0]=aPt; } @@ -1346,7 +1346,7 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) if (nMinDist<1) nMinDist=1; Point aPt0(rXPoly[nActPoint-1]); - Point aPt1(rStat.Now()); + Point aPt1(rStat.GetNow()); long dx=aPt0.X()-aPt1.X(); if (dx<0) dx=-dx; long dy=aPt0.Y()-aPt1.Y(); if (dy<0) dy=-dy; if (dx<nMinDist && dy<nMinDist) return false; @@ -1364,7 +1364,7 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) rXPoly.SetFlags(nActPoint-3,PolyFlags::Smooth); } } - rXPoly[nActPoint+1]=rStat.Now(); + rXPoly[nActPoint+1]=rStat.GetNow(); rStat.NextPoint(); } else { pU->nBezierStartPoint=nActPoint; @@ -1400,7 +1400,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) bool bIncomp=pView!=nullptr && pView->IsUseIncompatiblePathCreateInterface(); XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1]; sal_uInt16 nActPoint=rXPoly.GetPointCount()-1; - rXPoly[nActPoint]=rStat.Now(); + rXPoly[nActPoint]=rStat.GetNow(); if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE) { if (rStat.GetPointCount()>=2) eCmd=SdrCreateCmd::ForceEnd; bRet = eCmd==SdrCreateCmd::ForceEnd; @@ -1422,7 +1422,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) } if (eCmd==SdrCreateCmd::NextPoint || eCmd==SdrCreateCmd::NextObject) { // don't allow two consecutive points to occupy the same position - if (nActPoint==0 || rStat.Now()!=rXPoly[nActPoint-1]) { + if (nActPoint==0 || rStat.GetNow()!=rXPoly[nActPoint-1]) { if (bIncomp) { if (pU->nBezierStartPoint>nActPoint) pU->nBezierStartPoint=nActPoint; if (IsBezier(pU->eAktKind) && nActPoint-pU->nBezierStartPoint>=3 && ((nActPoint-pU->nBezierStartPoint)%3)==0) { @@ -1536,7 +1536,7 @@ bool ImpPathForDragAndCreate::BckCreate(SdrDragStat& rStat) sal_uInt16 nLocalActPoint=rLocalXPoly.GetPointCount(); if (nLocalActPoint>0) { nLocalActPoint--; - rLocalXPoly[nLocalActPoint]=rStat.Now(); + rLocalXPoly[nLocalActPoint]=rStat.GetNow(); } } } |