summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-16 10:32:07 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-16 12:23:00 +0100
commit68880a3004623553bf1920ad8a4a4d2be4bca234 (patch)
tree79d304985973abd4e7a1bfd5c41a333ea56d5c6f
parent5edc23dbc53773536265fd6a54319d9cd1cd9e99 (diff)
tdf#121031 sw_redlinehide: fix SwUndoDelete of table: create table frames
(regression from 723728cd358693b8f4bc9d913541aa4479f2bd48) Change-Id: I7a52b8499f05e9e8cbf81330ea264fbbfe3bac87 Reviewed-on: https://gerrit.libreoffice.org/63462 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--sw/source/core/undo/undel.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 950349c54fda..5b7d5366bae1 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -1113,10 +1113,13 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
// create frames after SetSaveData has recreated redlines
if (0 != m_nNode)
{
+ // tdf#121031 if the start node is a text node, it already has a frame;
+ // if it's a table, it does not
+ SwNodeIndex const start(rDoc.GetNodes(), nSttNode +
+ ((m_bDelFullPara || !rDoc.GetNodes()[nSttNode]->IsTextNode()) ? 0 : 1));
// don't include end node in the range: it may have been merged already
// by the start node, or it may be merged by one of the moved nodes,
// but if it isn't merged, its current frame(s) should be good...
- SwNodeIndex const start(rDoc.GetNodes(), nSttNode + (m_bDelFullPara ? 0 : 1));
SwNodeIndex const end(rDoc.GetNodes(), m_bDelFullPara ? delFullParaEndNode : nEndNode);
::MakeFrames(&rDoc, start, end);
}