sw/source/core/crsr/trvlfnfl.cxx |    2 +-
 sw/source/core/crsr/trvlreg.cxx  |   20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit f9e415c87763b8d025764921df13e24a9449c4c0
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Mon Aug 29 18:55:20 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Aug 29 20:56:15 2022 +0200

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

diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 752ecfa0462c..369e6041340f 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -72,7 +72,7 @@ bool SwCursor::GotoFootnoteText()
     if (pFootnote)
     {
         SwCursorSaveState aSaveState( *this );
-        GetPoint()->nNode = 
*static_cast<SwTextFootnote*>(pFootnote)->GetStartNode();
+        GetPoint()->Assign( 
*static_cast<SwTextFootnote*>(pFootnote)->GetStartNode() );
 
         SwContentNode* pCNd = GetDoc().GetNodes().GoNextSection(
                                             GetPoint(),
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index db4b5e3f44cd..6ae638bd040a 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -80,7 +80,7 @@ bool GotoPrevRegion( SwPaM& rCurrentCursor, 
SwMoveFnCollection const & fnPosRegi
                     --aIdx;
                     continue;
                 }
-                rCurrentCursor.GetPoint()->nContent.Assign( pCNd, 0 );
+                rCurrentCursor.GetPoint()->SetContent( 0 );
             }
             else
             {
@@ -92,9 +92,9 @@ bool GotoPrevRegion( SwPaM& rCurrentCursor, 
SwMoveFnCollection const & fnPosRegi
                     aIdx.Assign( *pNd, - 1 );
                     continue;
                 }
-                rCurrentCursor.GetPoint()->nContent.Assign( pCNd, pCNd->Len() 
);
+                rCurrentCursor.GetPoint()->SetContent( pCNd->Len() );
             }
-            rCurrentCursor.GetPoint()->nNode = aIdx;
+            rCurrentCursor.GetPoint()->Assign( aIdx );
             return true;
         }
     } while( true );
@@ -155,7 +155,7 @@ bool GotoNextRegion( SwPaM& rCurrentCursor, 
SwMoveFnCollection const & fnPosRegi
                     aIdx.Assign( *pNd->EndOfSectionNode(), +1 );
                     continue;
                 }
-                rCurrentCursor.GetPoint()->nContent.Assign( pCNd, 0 );
+                rCurrentCursor.GetPoint()->SetContent( 0 );
             }
             else
             {
@@ -167,9 +167,9 @@ bool GotoNextRegion( SwPaM& rCurrentCursor, 
SwMoveFnCollection const & fnPosRegi
                     ++aIdx;
                     continue;
                 }
-                rCurrentCursor.GetPoint()->nContent.Assign( pCNd, pCNd->Len() 
);
+                rCurrentCursor.GetPoint()->SetContent( pCNd->Len() );
             }
-            rCurrentCursor.GetPoint()->nNode = aIdx;
+            rCurrentCursor.GetPoint()->Assign( aIdx );
             return true;
         }
     } while( true );
@@ -198,7 +198,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, 
SwMoveFnCollection const & fn
             pCNd = SwNodes::GoPrevSection( &aIdx, true, !bInReadOnly );
             if( !pCNd )
                 return false;
-            pPos->nNode = aIdx;
+            pPos->Assign( aIdx );
         }
         else
         {
@@ -206,10 +206,10 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, 
SwMoveFnCollection const & fn
             pCNd = pNd->GetNodes().GoNextSection( &aIdx, true, !bInReadOnly );
             if( !pCNd )
                 return false;
-            pPos->nNode = aIdx;
+            pPos->Assign( aIdx );
         }
 
-        pPos->nContent.Assign( pCNd, bMoveBackward ? pCNd->Len() : 0 );
+        pPos->SetContent( bMoveBackward ? pCNd->Len() : 0 );
 
         if( &pPos->GetNode() != &rCurrNd ||
             pPos->GetContentIndex() != nCurrCnt )
@@ -258,7 +258,7 @@ bool SwCursor::GotoRegion( std::u16string_view rName )
                 // area in normal nodes array
                 SwCursorSaveState aSaveState( *this );
 
-                GetPoint()->nNode = *pIdx;
+                GetPoint()->Assign( *pIdx );
                 Move( fnMoveForward, GoInContent );
                 bRet = !IsSelOvr();
             }

Reply via email to