diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-29 14:16:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-29 17:46:42 +0200 |
commit | c1cf478e77db23f688d697112ea31c6d470b2539 (patch) | |
tree | d0ad5c59e5d9f4ede8f7d2875a815cce2ec03871 | |
parent | b3e07612eb6536aa14f2108484705068fc8e30d8 (diff) |
use more SwPosition::SetContent
part of the process of hiding the internals of SwPosition
Change-Id: Ib643b5ea126ada9edb7c2ec07ea3536fc93d36d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 34492a2f5a71..bae8f8a367ef 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -275,19 +275,19 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, SwTextNode* pTNd; if( pEndPos->GetNodeIndex() == pSttPos->GetNodeIndex() ) { - --pSttPos->nNode; - --pEndPos->nNode; + pSttPos->Adjust(SwNodeOffset(-1)); + pEndPos->Adjust(SwNodeOffset(-1)); pTNd = pSttPos->GetNode().GetTextNode(); - pSttPos->nContent.Assign( pTNd, nContent ); + pSttPos->SetContent( nContent ); } else { // Set to the end of the previous - --pEndPos->nNode; + pEndPos->Adjust(SwNodeOffset(-1)); pTNd = pEndPos->GetNode().GetTextNode(); } nContent = pTNd ? pTNd->GetText().getLength() : 0; - pEndPos->nContent.Assign( pTNd, nContent ); + pEndPos->SetContent( nContent ); } } pNewSectNode = GetNodes().InsertTextSection( |