diff options
author | Armin Le Grand <alg@apache.org> | 2013-09-27 11:20:23 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-09-27 11:20:23 +0000 |
commit | 14a9ddcf6966a9c49e188189051968f5f01f01b3 (patch) | |
tree | 16cb03133a6849d436b53e49e6b219d3f0fe8403 /sd/source/ui/animations/motionpathtag.cxx | |
parent | dbd1dea45083d76235568f6b93e86a8ac15f2b97 (diff) |
in-between co with recent changes to have an anchor point for a critical change, not complete
Diffstat (limited to 'sd/source/ui/animations/motionpathtag.cxx')
-rw-r--r-- | sd/source/ui/animations/motionpathtag.cxx | 73 |
1 files changed, 40 insertions, 33 deletions
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 0d84ee176a9f..95405bc2cec9 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -752,48 +752,55 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt ) if(pHdl) { - // now move the Handle (fX, fY) - const basegfx::B2DPoint aStartPoint(pHdl->getPosition()); - const basegfx::B2DPoint aEndPoint(aStartPoint + basegfx::B2DPoint(fX, fY)); - - // start dragging + // move the Handle (fX, fY) rtl::Reference< MotionPathTag > xTag( this ); SdrDragMethod* pDragMethod = 0; - if( (pHdl->GetKind() == HDL_MOVE) || (pHdl->GetKind() == HDL_SMARTTAG) ) + + if(HDL_MOVE == pHdl->GetKind() || HDL_SMARTTAG == pHdl->GetKind()) { - pDragMethod = new PathDragMove( mrView, xTag ); + pDragMethod = new PathDragMove(mrView, xTag); } - else if( pHdl->GetKind() == HDL_POLY ) + else if(HDL_POLY == pHdl->GetKind()) { - pDragMethod = new PathDragObjOwn( mrView ); + pDragMethod = new PathDragObjOwn(mrView); } - else if( pHdl->GetKind() != HDL_BWGT ) + else if(HDL_BWGT != pHdl->GetKind()) { - pDragMethod = new PathDragResize( mrView, xTag ); + pDragMethod = new PathDragResize(mrView, xTag); } - mrView.BegDragObj(aStartPoint, pHdl, 0.0, pDragMethod); - - if(mrView.IsDragObj()) - { - const bool bWasNoSnap(mrView.GetDragStat().IsNoSnap()); - const bool bWasSnapEnabled(mrView.IsSnapEnabled()); - - // switch snapping off - if(!bWasNoSnap) - ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(true); - if(bWasSnapEnabled) - mrView.SetSnapEnabled(false); - - mrView.MovAction(aEndPoint); - mrView.EndDragObj(); - - // restore snap - if(!bWasNoSnap) - ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(bWasNoSnap); - if(bWasSnapEnabled) - mrView.SetSnapEnabled(bWasSnapEnabled); - } + mrView.MoveHandleByVector(*pHdl, basegfx::B2DVector(fX, fY), 0, pDragMethod); + + // TTTT:HANDLE + //const basegfx::B2DPoint aStartPoint(pHdl->getPosition()); + //const basegfx::B2DPoint aEndPoint(aStartPoint + basegfx::B2DPoint(fX, fY)); + // + //// start dragging + //rtl::Reference< MotionPathTag > xTag( this ); + //SdrDragMethod* pDragMethod = 0; + // + //mrView.BegDragObj(aStartPoint, pHdl, 0.0, pDragMethod); + // + //if(mrView.IsDragObj()) + //{ + // const bool bWasNoSnap(mrView.GetDragStat().IsNoSnap()); + // const bool bWasSnapEnabled(mrView.IsSnapEnabled()); + // + // // switch snapping off + // if(!bWasNoSnap) + // ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(true); + // if(bWasSnapEnabled) + // mrView.SetSnapEnabled(false); + // + // mrView.MovAction(aEndPoint); + // mrView.EndDragObj(); + // + // // restore snap + // if(!bWasNoSnap) + // ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(bWasNoSnap); + // if(bWasSnapEnabled) + // mrView.SetSnapEnabled(bWasSnapEnabled); + //} } else { |