sw/inc/swcrsr.hxx              |    1 +
 sw/source/core/crsr/crsrsh.cxx |    6 ++++++
 2 files changed, 7 insertions(+)

New commits:
commit c72b9c1dc5683a132bf00659e0c8556253340c97
Author: Michael Stahl <mst...@redhat.com>
Date:   Wed Apr 19 10:44:53 2017 +0200

    tdf#106929 sw: SwCursorShell::Pop() ensure cursor ring is recreated
    
    ... from table cursor.  The problem is that in this case, between
    Push() and Pop() there is no call to ClearMark() or any of the other
    functions that sets the SwTableCursor::m_bChanged flag, so MakeBoxSels()
    is never called for the m_pCurrentCursor after Pop() and there is no
    cursor ring selecting all table cells.
    
    (regression from b227a8e4d65e4bbfe991aed9342fe3e30eca8639)
    
    Change-Id: I5bce18b71fed60a926f4ddf9938dfb7d1ddf4e92

diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index f41c96c5c5c0..401ab4549001 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -300,6 +300,7 @@ public:
     }
 
     bool IsChgd() const { return m_bChanged; }
+    void SetChgd() { m_bChanged = true; }
 
     // Park table cursor at start node of boxes.
     void ParkCursor();
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index b4bd0c79c738..4d44568b6d94 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2078,7 +2078,13 @@ bool SwCursorShell::Pop( bool bOldCursor )
         if( !m_pCurrentCursor->IsInProtectTable( true ) &&
             !m_pCurrentCursor->IsSelOvr( SwCursorSelOverFlags::Toggle |
                                  SwCursorSelOverFlags::ChangePos ) )
+        {
             UpdateCursor(); // update current cursor
+            if (m_pTableCursor)
+            { // tdf#106929 ensure m_pCurrentCursor ring is recreated from 
table
+                m_pTableCursor->SetChgd();
+            }
+        }
     }
     return true;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to