summaryrefslogtreecommitdiffstats
path: root/sw/source/core/undo
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:09:28 +0000
commit97ac77f067910fa5e8206d75160fa63546a9358d (patch)
treee6fa64b43e8150ef65578afa4f1f40f3e19f7fa3 /sw/source/core/undo
parentReleasing progress-linux version 4:24.2.2-3~progress7.99u1. (diff)
downloadlibreoffice-97ac77f067910fa5e8206d75160fa63546a9358d.tar.xz
libreoffice-97ac77f067910fa5e8206d75160fa63546a9358d.zip
Merging upstream version 4:24.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/core/undo')
-rw-r--r--sw/source/core/undo/untbl.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 72f1c809e2..52157df0ca 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2599,11 +2599,17 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent
if( bDelContent )
{
SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 );
- pDoc->GetNodes().MakeTextNode( aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl() );
+ SwTextNode *const pNewNode(pDoc->GetNodes().MakeTextNode(aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl()));
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() );
if( !pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
+ {
+ { // move cursors to new node which precedes aPam
+ SwPosition const pos(*pNewNode, 0);
+ ::PaMCorrAbs(aPam, pos);
+ }
pEntry->pUndo = std::make_unique<SwUndoDelete>(aPam, SwDeleteFlags::Default, true);
+ }
}
pEntry->pBoxNumAttr = std::make_unique<SfxItemSetFixed<
@@ -2627,6 +2633,13 @@ void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex
SwDoc* pDoc = rBox.GetFrameFormat()->GetDoc();
DEBUG_REDLINE( pDoc )
+ { // move cursors to first node which was inserted
+ SwPaM pam(SwNodeIndex(*rBox.GetSttNd(), 1));
+ assert(pam.GetPoint()->GetNode().IsTextNode());
+ pam.SetMark();
+ pam.Move(fnMoveForward, GoInContent);
+ ::PaMCorrAbs(pam, *pam.GetPoint());
+ }
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
{
SwPosition aTmpPos( rIdx );