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

New commits:
commit d71bfcd55f7ea5dcdcfbd06f89ec32454e62b7e7
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri Oct 7 08:52:23 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Fri Oct 7 12:01:17 2022 +0200

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

diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 5975288c6cd7..68788fae1484 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -2190,10 +2190,10 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset 
const nOffset,
                         SwPaM pam(*pRedline, nullptr);
                         SwNodeOffset const nCurrentOffset(
                             nOrigIdx - aPam.Start()->GetNodeIndex());
-                        pam.GetPoint()->nNode += nCurrentOffset;
-                        
pam.GetPoint()->nContent.Assign(pam.GetPoint()->GetNode().GetContentNode(), 
pam.GetPoint()->GetContentIndex());
-                        pam.GetMark()->nNode += nCurrentOffset;
-                        
pam.GetMark()->nContent.Assign(pam.GetMark()->GetNode().GetContentNode(), 
pam.GetMark()->GetContentIndex());
+                        pam.GetPoint()->Assign(pam.GetPoint()->GetNodeIndex() 
+ nCurrentOffset,
+                                               
pam.GetPoint()->GetContentIndex());
+                        pam.GetMark()->Assign(pam.GetMark()->GetNodeIndex() + 
nCurrentOffset,
+                                              
pam.GetMark()->GetContentIndex());
 
                         pNewRedline = new SwRangeRedline( RedlineType::Delete, 
pam );
                     }

Reply via email to