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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/select.cxx | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 7cb37cccf3d6..75b3d3342765 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -19,6 +19,7 @@ #include "hintids.hxx" #include <svx/sdrobjectfilter.hxx> +#include <svx/svddrgmt.hxx> #include <svx/svditer.hxx> #include <svx/svdobj.hxx> #include <svx/svdouno.hxx> @@ -599,14 +600,15 @@ void SwFEShell::SetDragMode( sal_uInt16 eDragMode ) Imp()->GetDrawView()->SetDragMode( (SdrDragMode)eDragMode ); } -long SwFEShell::BeginDrag( const Point* pPt, bool ) +long SwFEShell::BeginDrag( const Point* pPt, bool bIsShift) { SdrView *pView = Imp()->GetDrawView(); if ( pView && pView->AreObjectsMarked() ) { delete pChainFrom; delete pChainTo; pChainFrom = pChainTo = 0; SdrHdl* pHdl = pView->PickHandle( *pPt ); - pView->BegDragObj( *pPt, 0, pHdl ); + if (pView->BegDragObj( *pPt, 0, pHdl )) + pView->GetDragMethod()->SetShiftPressed( bIsShift ); ::FrameNotify( this, FLY_DRAG ); return 1; } diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 29fa6c402aca..8e058602f1bd 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -648,16 +648,16 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode ) // Edit frame -long SwWrtShell::BeginFrmDrag(const Point *pPt, bool) +long SwWrtShell::BeginFrmDrag(const Point *pPt, bool bIsShift) { fnDrag = &SwFEShell::Drag; if(bStartDrag) { Point aTmp( nStartDragX, nStartDragY ); - SwFEShell::BeginDrag( &aTmp, false ); + SwFEShell::BeginDrag( &aTmp, bIsShift ); } else - SwFEShell::BeginDrag( pPt, false ); + SwFEShell::BeginDrag( pPt, bIsShift ); return 1; } |