[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - include/svx sc/source sd/source svx/source sw/source
Matúš Kukan
matus.kukan at collabora.com
Mon Jul 14 09:30:34 PDT 2014
include/svx/svddrgmt.hxx | 3 +++
include/svx/svdoashp.hxx | 3 ++-
sc/source/ui/drawfunc/fusel.cxx | 4 +++-
sd/source/ui/func/fusel.cxx | 5 ++++-
svx/source/svdraw/svddrgmt.cxx | 3 ++-
svx/source/svdraw/svdoashp.cxx | 8 +++++---
sw/source/core/frmedt/feshview.cxx | 6 ++++--
sw/source/ui/wrtsh/select.cxx | 6 +++---
8 files changed, 26 insertions(+), 12 deletions(-)
New commits:
commit a32f8c730ae39d7c791f6c884df8773dac23b420
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Mon Jul 14 18:08:51 2014 +0200
Related cp#1000084: Make this work for other apps too and set proper default
Extend d98c817cc71e62a2beecc7142062f9ef33a7149b and fix default.
(cherry picked from commit 37c3cf70c724b7402588d1d32d3aa76a965ee41b)
Conflicts:
sc/source/ui/drawfunc/fusel.cxx
sd/source/ui/func/fusel.cxx
Change-Id: I79ad35bd5ad6fbd6e7d260864d4bf40fafb6b604
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 13e1d30..7c928bd 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -21,6 +21,7 @@
#include <editeng/eeitem.hxx>
#include <editeng/flditem.hxx>
+#include <svx/svddrgmt.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdotext.hxx>
#include <sfx2/dispatch.hxx>
@@ -146,7 +147,8 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if ( bDrag )
{
aDragTimer.Start();
- pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
+ if (pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl))
+ pView->GetDragMethod()->SetShiftPressed( rMEvt.IsShift() );
bReturn = sal_True;
}
}
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index b1cfce3..a3764e9 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -19,6 +19,7 @@
#include "fusel.hxx"
#include <basic/sbstar.hxx>
+#include <svx/svddrgmt.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdogrp.hxx>
#include <svx/polysc3d.hxx>
@@ -225,7 +226,8 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
if ( ! rMEvt.IsRight())
- mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
+ if (mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog))
+ mpView->GetDragMethod()->SetShiftPressed( rMEvt.IsShift() );
bReturn = sal_True;
}
else
@@ -488,6 +490,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
mpView->MarkPoint(*pHdl);
if ( ! rMEvt.IsRight())
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
+
}
}
else
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 5a6cba4..a54c3d2 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -639,7 +639,8 @@ SdrDragMethod::SdrDragMethod(SdrDragView& rNewView)
maOverlayObjectList(),
mrSdrDragView(rNewView),
mbMoveOnly(false),
- mbSolidDraggingActive(getSdrDragView().IsSolidDragging())
+ mbSolidDraggingActive(getSdrDragView().IsSolidDragging()),
+ mbShiftPressed(false)
{
if(mbSolidDraggingActive && Application::GetSettings().GetStyleSettings().GetHighContrastMode())
{
commit f48d1e36c01ad9a433a916bfabb9eeb963a04d0e
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Jul 10 20:56:43 2014 +0200
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.
(cherry picked from commit d98c817cc71e62a2beecc7142062f9ef33a7149b)
Conflicts:
include/svx/svddrgmt.hxx
sw/source/core/frmedt/feshview.cxx
sw/source/uibase/wrtsh/select.cxx
Change-Id: I70565e4e3f80daf0e1007031ef7d49036fb0e26b
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index e5f9e0d..6595432 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -127,6 +127,7 @@ private:
// bitfield
unsigned mbMoveOnly : 1;
unsigned mbSolidDraggingActive : 1;
+ unsigned mbShiftPressed : 1;
protected:
// access for derivated classes to maSdrDragEntries
@@ -193,6 +194,8 @@ public:
void Show();
void Hide();
+ bool IsShiftPressed() { return mbShiftPressed; }
+ void SetShiftPressed(bool bShiftPressed) { mbShiftPressed = bShiftPressed; }
virtual void TakeSdrDragComment(OUString& rStr) const=0;
virtual bool BeginSdrDrag()=0;
virtual void MoveSdrDrag(const Point& rPnt)=0;
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index ac78bc5..f982881 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -110,7 +110,8 @@ public:
SVX_DLLPRIVATE void DragCreateObject( SdrDragStat& rDrag );
SVX_DLLPRIVATE void DragResizeCustomShape( const Rectangle& rNewRect, SdrObjCustomShape* pObj ) const;
- SVX_DLLPRIVATE void DragMoveCustomShapeHdl( const Point aDestination, const sal_uInt16 nCustomShapeHdlNum, SdrObjCustomShape* pObj ) const;
+ SVX_DLLPRIVATE void DragMoveCustomShapeHdl( const Point aDestination,
+ const sal_uInt16 nCustomShapeHdlNum, SdrObjCustomShape* pObj, bool bMoveCalloutRectangle ) const;
// #i37011# centralize throw-away of render geometry
void InvalidateRenderGeometry();
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 783f046..93d6951 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"
@@ -2049,7 +2050,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() )
@@ -2060,7 +2062,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;
@@ -2100,7 +2102,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();
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 782c645..61b6513 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -20,6 +20,7 @@
#include "hintids.hxx"
#include <svx/sdrobjectfilter.hxx>
+#include <svx/svddrgmt.hxx>
#include <svx/svditer.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdouno.hxx>
@@ -613,14 +614,15 @@ void SwFEShell::SetDragMode( sal_uInt16 eDragMode )
|*
*************************************************************************/
-long SwFEShell::BeginDrag( const Point* pPt, sal_Bool )
+long SwFEShell::BeginDrag( const Point* pPt, sal_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/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index f60d86f..449bed3 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -662,16 +662,16 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode )
// Edit frame
-long SwWrtShell::BeginFrmDrag(const Point *pPt, sal_Bool)
+long SwWrtShell::BeginFrmDrag(const Point *pPt, sal_Bool bIsShift)
{
fnDrag = &SwFEShell::Drag;
if(bStartDrag)
{
Point aTmp( nStartDragX, nStartDragY );
- SwFEShell::BeginDrag( &aTmp, sal_False );
+ SwFEShell::BeginDrag( &aTmp, bIsShift );
}
else
- SwFEShell::BeginDrag( pPt, sal_False );
+ SwFEShell::BeginDrag( pPt, bIsShift );
return 1;
}
More information about the Libreoffice-commits
mailing list