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

New commits:
commit ffe488c38741f4391b2f19440a8d20f4ed38a886
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Aug 30 09:58:06 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Aug 30 11:20:32 2022 +0200

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

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index e757f1ec7ba1..95d4fcc040ec 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -139,18 +139,18 @@ namespace
 
     SwNodeIndex InitDelCount(SwPaM const& rSourcePaM, SwNodeOffset & rDelCount)
     {
-        SwNodeIndex const& rStart(rSourcePaM.Start()->nNode);
+        SwPosition const& rStart(*rSourcePaM.Start());
         // Special handling for SwDoc::AppendDoc
         if (rSourcePaM.GetDoc().GetNodes().GetEndOfExtras().GetIndex() + 1
-                == rStart.GetIndex())
+                == rStart.GetNodeIndex())
         {
             rDelCount = SwNodeOffset(1);
-            return SwNodeIndex(rStart, +1);
+            return SwNodeIndex(rStart.GetNode(), +1);
         }
         else
         {
             rDelCount = SwNodeOffset(0);
-            return rStart;
+            return SwNodeIndex(rStart.GetNode());
         }
     }
 

Reply via email to