summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-05-26 11:49:58 +0200
committerAndras Timar <andras.timar@collabora.com>2017-05-31 15:32:00 +0200
commit632170bfc3ee64913f408f93ebfae3fd4e733735 (patch)
tree9936df88e703ff08b943101b6fcbb84e71ac2ebe
parent6bbefb0acaa4a9cadab0a7018efa6c19d3f39712 (diff)
tdf#106131 no global drag when anchor drag active
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 1b27bed2d5b6915cda408c6f8d27d15bf13cc9be) Reviewed-on: https://gerrit.libreoffice.org/38188 Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de> (cherry picked from commit c3c208e1fdfd60b95fc09ed48d9ee975bddb214d) Reviewed-on: https://gerrit.libreoffice.org/38209 Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 78f84a9a92f8dcd50747480d931f60c58b2344ec)
-rw-r--r--sw/source/uibase/docvw/edtdd.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index 4a496dacba7d..62ab5bfb0cb5 100644
--- a/sw/source/uibase/docvw/edtdd.cxx
+++ b/sw/source/uibase/docvw/edtdd.cxx
@@ -88,11 +88,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() &&