sw/source/core/unocore/unoobj.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 9a9cd0104c5d60f156b974f0c297088c20ba9c5e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Aug 26 15:36:23 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Aug 26 18:05:29 2022 +0200

    use more SwPosition::Assign
    
    as part of the process of hiding the internals of SwPosition
    
    Change-Id: If411d65658bc42055527eb2ba3508b0997361db3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138874
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index 74007e60eca4..3c1bfa01008a 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -992,7 +992,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand)
         SwTableNode * pTableNode = rUnoCursor.GetPointNode().FindTableNode();
         while (pTableNode)
         {
-            rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
+            rUnoCursor.GetPoint()->Assign( *pTableNode->EndOfSectionNode() );
             SwContentNode* pCNode = 
GetDoc()->GetNodes().GoNext(rUnoCursor.GetPoint());
             pTableNode = pCNode ? pCNode->FindTableNode() : nullptr;
         }
@@ -2849,19 +2849,19 @@ SwXTextCursor::sort(const uno::Sequence< 
beans::PropertyValue >& rDescriptor)
 
     // update selection
     rUnoCursor.DeleteMark();
-    rUnoCursor.GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
+    rUnoCursor.GetPoint()->Assign( aPrevIdx.GetNode(), SwNodeOffset(1) );
     SwContentNode *const pCNd = rUnoCursor.GetPointContentNode();
     sal_Int32 nLen = pCNd->Len();
     if (nLen > nCntStt)
     {
         nLen = nCntStt;
     }
-    rUnoCursor.GetPoint()->nContent.Assign(pCNd, nLen );
+    rUnoCursor.GetPoint()->SetContent( nLen );
     rUnoCursor.SetMark();
 
-    rUnoCursor.GetPoint()->nNode += nOffset;
+    rUnoCursor.GetPoint()->Adjust(nOffset);
     SwContentNode *const pCNd2 = rUnoCursor.GetPointContentNode();
-    rUnoCursor.GetPoint()->nContent.Assign( pCNd2, pCNd2->Len() );
+    rUnoCursor.GetPoint()->SetContent( pCNd2->Len() );
 
 }
 

Reply via email to