summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-04-19 10:44:53 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-04-19 16:22:16 +0200
commit0ae1b76c3a90226ba588eb75837ab2f494ac5d5f (patch)
tree966532132597c1ca5cf4efc47a8e583beca6d02d
parentbbdaac9c5d03d59c55dc8ec1d9c34df502c11dea (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 (cherry picked from commit c72b9c1dc5683a132bf00659e0c8556253340c97) Reviewed-on: https://gerrit.libreoffice.org/36670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-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 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;
}