summaryrefslogtreecommitdiff
path: root/sw/source/core/undo/undel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo/undel.cxx')
-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);
}