sw/source/core/doc/doc.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
New commits: commit 352ff49be44cdb438aab9d54364eeee393a14ebe Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Mon Aug 29 18:46:05 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Aug 29 20:54:43 2022 +0200 use more SwPosition::Assign part of hiding the internals of SwPosition Change-Id: Ib3f8f40edd3d9a93460bf7dcd081af0b0bd4a6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 6a82869b619b..0372528a324e 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1503,14 +1503,11 @@ bool SwDoc::RemoveInvisibleContent() pSectNd->EndOfSectionIndex() + 1 ) { // only delete the content - SwContentNode* pCNd = GetNodes().GoNext( - &aPam.GetPoint()->nNode ); - aPam.GetPoint()->nContent.Assign( pCNd, 0 ); + SwContentNode* pCNd = GetNodes().GoNext( aPam.GetPoint() ); aPam.SetMark(); - aPam.GetPoint()->nNode = *pSectNd->EndOfSectionNode(); - pCNd = SwNodes::GoPrevious( - &aPam.GetPoint()->nNode ); - aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); + aPam.GetPoint()->Assign( *pSectNd->EndOfSectionNode() ); + pCNd = SwNodes::GoPrevious( aPam.GetPoint() ); + aPam.GetPoint()->SetContent( pCNd->Len() ); getIDocumentContentOperations().DeleteRange( aPam ); } @@ -1518,7 +1515,7 @@ bool SwDoc::RemoveInvisibleContent() { // delete the whole section aPam.SetMark(); - aPam.GetPoint()->nNode = *pSectNd->EndOfSectionNode(); + aPam.GetPoint()->Assign( *pSectNd->EndOfSectionNode() ); getIDocumentContentOperations().DelFullPara( aPam ); } @@ -1632,7 +1629,7 @@ bool SwDoc::ConvertFieldsToText(SwRootFrame const& rLayout) if (pFieldAtEnd && pFieldAtEnd->Which() == RES_TXTATR_INPUTFIELD) { SwPosition &rEndPos = *aInsertPam.GetPoint(); - rEndPos.nContent = SwCursorShell::EndOfInputFieldAtPos( *aInsertPam.End() ); + rEndPos.SetContent( SwCursorShell::EndOfInputFieldAtPos( *aInsertPam.End() ) ); } else {