[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 23 09:54:52 UTC 2021
sw/source/core/inc/UndoTable.hxx | 2 +-
sw/source/core/undo/untbl.cxx | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit b18bffb5b4948bbdaece90a68a4c9341ad9df084
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Mar 18 20:59:36 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 23 10:54:19 2021 +0100
Related: tdf#133933 sw: fix assertion failure in the SwIndexReg dtor
Make sure that by the time we delete a text node, no SwIndexes point to
us.
Change-Id: I9248a2ebe529e5a0aab0e37bf676e669b9bddb1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112698
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
(cherry picked from commit e782937228479054336b564a4c34697a12530469)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112950
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 15bb1dc85bea..472f9fdd65d5 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -273,7 +273,7 @@ class SwUndoTableCpyTable : public SwUndo
//b6341295: When redlining is active, PrepareRedline has to create the
//redlining attributes for the new and the old table cell content
static std::unique_ptr<SwUndo> PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
- const SwPosition& rPos, bool& rJoin, bool bRedo );
+ SwPosition& rPos, bool& rJoin, bool bRedo );
public:
SwUndoTableCpyTable(const SwDoc& rDoc);
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index a07d8cb7df69..85a797d5f509 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2501,7 +2501,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
// Otherwise aInsIdx has been moved during the Undo operation
if( pEntry->bJoin )
{
- SwPaM const& rLastPam =
+ SwPaM& rLastPam =
rContext.GetCursorSupplier().GetCurrentShellCursor();
pUndo = PrepareRedline( &rDoc, rBox, *rLastPam.GetPoint(),
pEntry->bJoin, true );
@@ -2616,7 +2616,7 @@ void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex
// rJoin is true if Redo() is calling and the content has already been merged
std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
- const SwPosition& rPos, bool& rJoin, bool bRedo )
+ SwPosition& rPos, bool& rJoin, bool bRedo )
{
std::unique_ptr<SwUndo> pUndo;
// b62341295: Redline for copying tables
@@ -2640,6 +2640,10 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const
if( !bRedo && rPos.nNode.GetNode().GetTextNode() )
{ // Try to merge, if not called by Redo()
rJoin = true;
+
+ // Park this somewhere else so nothing points to the to-be-deleted node.
+ rPos.nContent.Assign(pText, 0);
+
pText->JoinNext();
}
}
More information about the Libreoffice-commits
mailing list