[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/source

Armin Le Grand Armin.Le.Grand at cib.de
Wed Aug 16 07:51:57 UTC 2017


 sw/source/uibase/docvw/edtdd.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 0758ef6d0a74a1a5587b38e190c1e5257f908c87
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri May 26 11:49:58 2017 +0200

    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 at libreoffice.org>
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>

diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index ca93e3e3d727..16abd656cd8d 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)
 
+            // #i106131# *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() &&


More information about the Libreoffice-commits mailing list