diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-09-25 19:22:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-25 21:00:40 +0200 |
commit | 415bdf0c0aaa791122d5ef5f81a5409974dd646c (patch) | |
tree | 60ad925ef658bf75d6fd3f9b121706291bdd4ff7 /sw | |
parent | 1988782c8131d307aff14bdaf7feabd8a5bc3214 (diff) |
use more SwPosition::Assign
part of the process of hiding the internals of SwPosition
Change-Id: I69f153abdc9789f327a7b5373560a97e90d622a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140575
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docnum.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 7462b608df99..5975288c6cd7 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1582,15 +1582,9 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext, if( !bRet && !bOverUpper && pLast ) // do not iterate over higher numbers, but still to the end { if( bNext ) - { - rPos.nNode = aIdx; - if( aIdx.GetNode().IsContentNode() ) - rPos.nContent.Assign( aIdx.GetNode().GetContentNode(), 0 ); - } + rPos.Assign(aIdx); else - { rPos.Assign( *pLast ); - } bRet = true; } @@ -2376,9 +2370,10 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, } if( pREnd->GetNodeIndex() != nRedlEndNd ) { - pREnd->nNode = nRedlEndNd; + pREnd->Assign(nRedlEndNd); SwContentNode* pCNd = pREnd->GetNode().GetContentNode(); - pREnd->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 ); + if(pCNd) + pREnd->SetContent( pCNd->Len() ); } } |