sw/source/core/undo/unovwr.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e7218379295630a3310efca69058c0e776d85969
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Sep 29 12:49:06 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Sep 29 13:51:05 2022 +0200

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

diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 5f93bab0b62b..7d14c8977933 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -150,7 +150,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc& rDoc, SwPosition& 
rPos,
         if (rPos.GetContentIndex() < pDelTextNd->GetText().getLength())
         {
             m_aDelStr += OUStringChar( 
pDelTextNd->GetText()[rPos.GetContentIndex()] );
-            ++rPos.nContent;
+            rPos.AdjustContent(+1);
         }
         else
             m_bInsChar = true;
@@ -167,7 +167,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc& rDoc, SwPosition& 
rPos,
 
     if( !m_bInsChar )
     {
-        const SwContentIndex aTmpIndex( rPos.nContent, -2 );
+        const SwContentIndex aTmpIndex( rPos.GetContentNode(), 
rPos.GetContentIndex() - 2 );
         pDelTextNd->EraseText( aTmpIndex, 1 );
     }
     pDelTextNd->SetIgnoreDontExpand( bOldExpFlg );
@@ -235,7 +235,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & 
rContext)
     if( rCurrentPam.GetMark()->GetContentIndex() != m_nStartContent )
     {
         rCurrentPam.SetMark();
-        rCurrentPam.GetMark()->nContent = m_nStartContent;
+        rCurrentPam.GetMark()->SetContent( m_nStartContent );
     }
 
     if( m_pRedlSaveData )
@@ -305,7 +305,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & 
rContext)
     if( rCurrentPam.GetMark()->GetContentIndex() != m_nStartContent )
     {
         rCurrentPam.SetMark();
-        rCurrentPam.GetMark()->nContent = m_nStartContent;
+        rCurrentPam.GetMark()->SetContent( m_nStartContent );
     }
 }
 

Reply via email to