sw/source/core/doc/docnum.cxx |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 415bdf0c0aaa791122d5ef5f81a5409974dd646c
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Sep 25 19:22:15 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Sep 25 21:00:40 2022 +0200

    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.gran...@collabora.co.uk>

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() );
         }
     }
 

Reply via email to