sw/source/core/edit/acorrect.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 4b697b15a4985160fbe5b384411aa6b9c0b11b60
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Sep 28 09:30:13 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Sep 28 10:47:16 2022 +0200

    use more SwPosition::SetContent
    
    part of the process of hiding the internals of SwPosition
    
    Change-Id: Iede060702cefc3c2b0a5c5268ece07affa1e3a83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140669
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 130e9aa4f580..9359420785b8 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -206,7 +206,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 
nSourceLength, const
 
     SwPaM* pPam = &m_rCursor;
     if (pPam->GetPoint()->GetNode() != *pos.first
-        || pPam->GetPoint()->nContent != pos.second)
+        || pPam->GetPoint()->GetContentIndex() != pos.second)
     {
         pPam = new SwPaM(*pos.first, pos.second);
     }
@@ -250,8 +250,8 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 
nSourceLength, const
                 PaMIntoCursorShellRing aTmp( m_rEditSh, m_rCursor, *pPam );
 
                 pPam->SetMark();
-                pPam->GetPoint()->nContent = std::min<sal_Int32>(
-                    pos.first->GetText().getLength(), pos.second + 
nSourceLength);
+                pPam->GetPoint()->SetContent( std::min<sal_Int32>(
+                    pos.first->GetText().getLength(), pos.second + 
nSourceLength) );
                 pDoc->getIDocumentContentOperations().ReplaceRange( *pPam, 
rText, false );
                 pPam->Exchange();
                 pPam->DeleteMark();
@@ -260,8 +260,8 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 
nSourceLength, const
         else
         {
             pPam->SetMark();
-            pPam->GetPoint()->nContent = std::min<sal_Int32>(
-                pos.first->GetText().getLength(), pos.second + nSourceLength);
+            pPam->GetPoint()->SetContent( std::min<sal_Int32>(
+                pos.first->GetText().getLength(), pos.second + nSourceLength) 
);
             pDoc->getIDocumentContentOperations().ReplaceRange( *pPam, rText, 
false );
             pPam->Exchange();
             pPam->DeleteMark();
@@ -476,10 +476,10 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, 
sal_Int32 nEndPos,
                 aCpyPam.SetMark();
 
                 // then until the end of the Nodes Array
-                aCpyPam.GetPoint()->nNode.Assign( 
pAutoDoc->GetNodes().GetEndOfContent(), -1 );
+                aCpyPam.GetPoint()->Assign( 
pAutoDoc->GetNodes().GetEndOfContent(), SwNodeOffset(-1) );
                 pContentNd = aCpyPam.GetPointContentNode();
-                aCpyPam.GetPoint()->nContent.Assign(
-                       pContentNd, pContentNd ? pContentNd->Len() : 0);
+                if (pContentNd)
+                    aCpyPam.GetPoint()->SetContent( pContentNd->Len() );
 
                 SwDontExpandItem aExpItem;
                 aExpItem.SaveDontExpandItems( *aPam.GetPoint() );

Reply via email to