summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-04-19 10:44:53 +0200
committerMichael Stahl <mstahl@redhat.com>2017-04-19 11:11:30 +0200
commitc72b9c1dc5683a132bf00659e0c8556253340c97 (patch)
tree79c75b0ee727d0271a31d32be35cb8814e75d53b
parentd9e6002b70eadd47fe70ff5ef53a55e5fa32d846 (diff)
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
-rw-r--r--sw/inc/swcrsr.hxx1
-rw-r--r--sw/source/core/crsr/crsrsh.cxx6
2 files changed, 7 insertions, 0 deletions
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;
}