[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/inc sw/source

Michael Stahl mstahl at redhat.com
Wed Apr 19 14:22:40 UTC 2017


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

New commits:
commit 0ae1b76c3a90226ba588eb75837ab2f494ac5d5f
Author: Michael Stahl <mstahl at 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
    (cherry picked from commit c72b9c1dc5683a132bf00659e0c8556253340c97)
    Reviewed-on: https://gerrit.libreoffice.org/36670
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 0f9ab9fb3f7a..3216db3316a9 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 69ca21f80fc7..274a501f4856 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2072,7 +2072,13 @@ bool SwCursorShell::Pop( bool bOldCursor )
         if( !m_pCurrentCursor->IsInProtectTable( true ) &&
             !m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
                                  nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
+        {
             UpdateCursor(); // update current cursor
+            if (m_pTableCursor)
+            { // tdf#106929 ensure m_pCurrentCursor ring is recreated from table
+                m_pTableCursor->SetChgd();
+            }
+        }
     }
     return true;
 }


More information about the Libreoffice-commits mailing list