diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-07-10 20:56:43 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-07-11 09:32:08 +0200 |
commit | d98c817cc71e62a2beecc7142062f9ef33a7149b (patch) | |
tree | b204588f46e938c5549c2a4ff4b87d8e71bc9591 /svx/source/svdraw/svdoashp.cxx | |
parent | d5dd1216804afae35d7fe7dbb1d37b0ca1fcce88 (diff) |
Allow to move only callout handle with shift key (cp#1000084)
When line callout was used, you couldn't move the point next to
the rectangle.
Now it's possible with shift key pressed.
Change-Id: I70565e4e3f80daf0e1007031ef7d49036fb0e26b
Diffstat (limited to 'svx/source/svdraw/svdoashp.cxx')
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 26c563c8d6f8..b3941f910041 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -37,6 +37,7 @@ #include <svx/svddrag.hxx> #include <svx/xpool.hxx> #include <svx/xpoly.hxx> +#include <svx/svddrgmt.hxx> #include <svx/svdmodel.hxx> #include <svx/svdpage.hxx> #include "svx/svditer.hxx" @@ -2069,7 +2070,8 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect, SdrObj } } -void SdrObjCustomShape::DragMoveCustomShapeHdl( const Point aDestination, const sal_uInt16 nCustomShapeHdlNum, SdrObjCustomShape* pObj ) const +void SdrObjCustomShape::DragMoveCustomShapeHdl( const Point aDestination, + const sal_uInt16 nCustomShapeHdlNum, SdrObjCustomShape* pObj, bool bMoveCalloutRectangle ) const { std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles( pObj ) ); if ( nCustomShapeHdlNum < aInteractionHandles.size() ) @@ -2080,7 +2082,7 @@ void SdrObjCustomShape::DragMoveCustomShapeHdl( const Point aDestination, const try { com::sun::star::awt::Point aPt( aDestination.X(), aDestination.Y() ); - if ( aInteractionHandle.nMode & CUSTOMSHAPE_HANDLE_MOVE_SHAPE ) + if ( aInteractionHandle.nMode & CUSTOMSHAPE_HANDLE_MOVE_SHAPE && bMoveCalloutRectangle ) { sal_Int32 nXDiff = aPt.X - aInteractionHandle.aPosition.X; sal_Int32 nYDiff = aPt.Y - aInteractionHandle.aPosition.Y; @@ -2120,7 +2122,7 @@ bool SdrObjCustomShape::applySpecialDrag(SdrDragStat& rDrag) case HDL_CUSTOMSHAPE1 : { rDrag.SetEndDragChangesGeoAndAttributes(true); - DragMoveCustomShapeHdl( rDrag.GetNow(), (sal_uInt16)pHdl->GetPointNum(), this ); + DragMoveCustomShapeHdl( rDrag.GetNow(), (sal_uInt16)pHdl->GetPointNum(), this, !rDrag.GetDragMethod()->IsShiftPressed() ); SetRectsDirty(); InvalidateRenderGeometry(); SetChanged(); |