diff options
Diffstat (limited to 'sw/source/core/undo/untblk.cxx')
-rw-r--r-- | sw/source/core/undo/untblk.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index fd5c3239c0..c8967178c2 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -390,6 +390,10 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext) rPam.GetPoint()->GetNodeIndex())); ::std::optional<SwNodeIndex> oMvBkwrd = MovePtBackward(rPam); + bool const isMoveFlyAnchors(!oMvBkwrd // equivalent to bCanMoveBack + || m_oUndoNodeIndex->GetNode().IsTextNode() + || (oMvBkwrd->GetNode().IsStartNode() + && m_oUndoNodeIndex->GetNode().IsSectionNode())); // re-insert content again (first detach m_oUndoNodeIndex!) SwNodeOffset const nMvNd = m_oUndoNodeIndex->GetIndex(); @@ -403,7 +407,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext) // at-char anchors post SplitNode are on index 0 of 2nd node and will // remain there - move them back to the start (end would also work?) - if (pFlysAtInsPos) + if (pFlysAtInsPos && isMoveFlyAnchors) { for (SwFrameFormat * pFly : *pFlysAtInsPos) { |