sw/source/core/doc/DocumentContentOperationsManager.cxx |    4 ++--
 sw/source/core/doc/docedt.cxx                           |    6 +++---
 sw/source/core/inc/mvsave.hxx                           |    2 +-
 sw/source/core/undo/unredln.cxx                         |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit b0c9f07151a6e4549b158482b4f83cfa1677ac66
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Aug 10 13:57:33 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Aug 12 17:13:37 2022 +0200

    pass SwNode to RestFlyInRange instead of SwNodeIndex
    
    part of the process of hiding the internals of SwPosition
    
    Change-Id: Id56cbeaa67cdbfc620d26c8590f1c9eeaea26281
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138172
    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 86f49874452e..fabffeeac236 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2532,7 +2532,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& 
rPaM, SwPosition& rPos,
     // note: rPos is at the end here; can't really tell flys that used to be
     // at the start of rPam from flys that used to be at the end of rPam
     // unfortunately, so some of them are going to end up with wrong anchor...
-    RestFlyInRange( aSaveFlyArr, *rPaM.Start(), &(rPos.nNode) );
+    RestFlyInRange( aSaveFlyArr, *rPaM.Start(), &rPos.GetNode() );
 
     // restore redlines (if DOC_MOVEREDLINES is used)
     if( !aSaveRedl.empty() )
@@ -4593,7 +4593,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( 
SwPaM& rPam, const OUSt
             pCursor->SetMark();
             *pCursor->GetPoint() = *aDelPam.GetPoint();
             m_rDoc.getIDocumentRedlineAccess().AppendRedline( new 
SwRangeRedline( RedlineType::Delete, aDelPam ), true);
-            RestFlyInRange(flys, *aDelPam.End(), &aDelPam.End()->nNode, true);
+            RestFlyInRange(flys, *aDelPam.End(), &aDelPam.End()->GetNode(), 
true);
             sw::UpdateFramesForAddDeleteRedline(m_rDoc, *pCursor);
 
             *rPam.GetMark() = *aDelPam.GetMark();
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 122260ad1aab..21817f688005 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::i18n;
 
 
 void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos,
-                      const SwNodeIndex* pInsertPos, bool const 
isForceToStartPos)
+                      const SwNode* pInsertPos, bool const isForceToStartPos)
 {
     SwPosition aPos(rStartPos);
     for(const SaveFly & rSave : rArr)
@@ -66,8 +66,8 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& 
rStartPos,
             {
                 if (aAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA)
                 {
-                    assert(pInsertPos->GetNode().GetContentNode());
-                    aPos.Assign( *pInsertPos->GetNode().GetContentNode(),
+                    assert(pInsertPos->GetContentNode());
+                    aPos.Assign( *pInsertPos->GetContentNode(),
                         rSave.nContentIndex);
                 }
                 else
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index ab0593db6173..dffac84ff422 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -117,7 +117,7 @@ struct SaveFly
 typedef std::deque< SaveFly > SaveFlyArr;
 
 void RestFlyInRange( SaveFlyArr& rArr, const SwPosition& rSttIdx,
-                     const SwNodeIndex* pInsPos, bool isForceToStartPos = 
false);
+                     const SwNode* pInsPos, bool isForceToStartPos = false);
 void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr );
 void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos,
         SaveFlyArr& rArr, bool bMoveAllFlys, SwHistory * pHistory = nullptr);
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 9117ddeadd62..7ab685d1c3e9 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -234,7 +234,7 @@ void SwUndoRedlineDelete::InitHistory(SwPaM const& rRedline)
     // backspacing/deleting consecutive characters
     SaveFlyArr flys;
     SaveFlyInRange(rRedline, *rRedline.GetMark(), flys, false, 
m_pHistory.get());
-    RestFlyInRange(flys, *rRedline.GetPoint(), &rRedline.GetPoint()->nNode, 
true);
+    RestFlyInRange(flys, *rRedline.GetPoint(), 
&rRedline.GetPoint()->GetNode(), true);
     if (m_pHistory->Count())
     {
         m_bCanGroup = false; // how to group history?

Reply via email to