sw/source/core/undo/unattr.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 57ecd472d7078f9e540cccd4873355d6250fc21f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Oct 1 09:41:39 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Oct 2 17:29:28 2022 +0200 use more SwPosition::SetContent part of the process of hiding the internals of SwPosition Change-Id: I7a1900352a9404b64987d71c9b9f44d07e2a176b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 5d3341960dbb..50e4670bfbfc 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -409,7 +409,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) SwPosition aPos( *pNd ); if ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) || (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) { - aPos.nContent.Assign( static_cast<SwTextNode*>(pNd), rAnchor.GetPageNum() ); + aPos.SetContent( rAnchor.GetPageNum() ); if ( aPos.GetContentIndex() > pNd->GetTextNode()->GetText().getLength()) { // #i35443# - invalid position. // Thus, anchor attribute not restored @@ -724,7 +724,7 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext) aPam.DeleteMark(); aPam.GetPoint()->Assign( m_nNodeIndex, m_nSttContent ); aPam.SetMark(); - ++aPam.GetPoint()->nContent; + aPam.GetPoint()->AdjustContent(+1); pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any); } else { // remove all format redlines, will be recreated if needed