Skip to content

Commit

Permalink
tdf#106131 no global drag when anchor drag active
Browse files Browse the repository at this point in the history
If in Writer dragging the anchor is already active
it is not allowed to enter global object drag mode.
This check was missing and may lead to various
inconsistencies

Change-Id: I7d8dd2a62737e6d5d72f69747ceb21bcb73c45ed
Reviewed-on: https://gerrit.libreoffice.org/38059
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
(cherry picked from commit 1b27bed)
Reviewed-on: https://gerrit.libreoffice.org/38188
Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de>
  • Loading branch information
Armin Le Grand authored and Armin Le Grand committed May 30, 2017
1 parent a987fd3 commit c3c208e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sw/source/uibase/docvw/edtdd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,17 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
//We are not selecting and aren't at a selection
bStart = true;
else if ( !g_bFrameDrag && rSh.IsSelFrameMode() &&
rSh.IsInsideSelectedObj( aDocPos ) )
rSh.IsInsideSelectedObj( aDocPos ) &&
nullptr == m_pAnchorMarker)
{
//We are not dragging internally and are not at an
//object (frame, draw object)

// tdf#106131 *and* AnchorDrag is *not* active: When active,
// entering global drag mode will destroy the AnchorHdl but
// keep the now invalid ptr in place, next access will crash.
// It is indeed wrong to enter drag mode when AnchorDrag is
// already active
bStart = true;
}
else if( !g_bFrameDrag && m_rView.GetDocShell()->IsReadOnly() &&
Expand Down

0 comments on commit c3c208e

Please sign in to comment.