sw/inc/ftnidx.hxx                                       |    3 ++-
 sw/source/core/crsr/trvlfnfl.cxx                        |    4 ++--
 sw/source/core/doc/DocumentContentOperationsManager.cxx |    2 +-
 sw/source/core/doc/docftn.cxx                           |    2 +-
 sw/source/core/doc/ftnidx.cxx                           |    2 +-
 sw/source/core/docnode/ndsect.cxx                       |    2 +-
 sw/source/core/docnode/node.cxx                         |    2 +-
 sw/source/core/undo/undobj.cxx                          |    2 +-
 8 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 71ce0e354437db3086d6d746b0e9edbc693ddcca
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Aug 5 16:06:16 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Aug 6 15:05:36 2022 +0200

    make SeekEntry take a SwNode, not an SwNodeIndex
    
    as part of the process of hiding the internals of SwPosition
    
    Change-Id: Id43211f221f3b90c46629bedec25f9078c7bf9dd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137894
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
index 39acdf0a96a0..7d5a22a01359 100644
--- a/sw/inc/ftnidx.hxx
+++ b/sw/inc/ftnidx.hxx
@@ -27,6 +27,7 @@ class IDocumentRedlineAccess;
 class SwTextFootnote;
 class SwNodeIndex;
 class SwSectionNode;
+class SwNode;
 
 // Everywhere where NodeIndex is used, the header files missing here
 // are already included. Therefore put here as defines only and
@@ -46,7 +47,7 @@ public:
     void UpdateFootnote( const SwNodeIndex& rStt ); // Update all from pos.
     void UpdateAllFootnote();                       // Update all footnotes.
 
-    SwTextFootnote* SeekEntry( const SwNodeIndex& rIdx, size_t* pPos = nullptr 
) const;
+    SwTextFootnote* SeekEntry( const SwNode& rNd, size_t* pPos = nullptr ) 
const;
 };
 
 class SwUpdFootnoteEndNtAtEnd
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 714750477d14..11ede589747c 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -206,7 +206,7 @@ bool SwCursor::GotoNextFootnoteAnchor()
         return false;
     }
 
-    if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ))
+    if( rFootnoteArr.SeekEntry( GetPoint()->GetNode(), &nPos ))
     {
         // there is a footnote with this index, so search also for the next one
         if( nPos < rFootnoteArr.size() )
@@ -278,7 +278,7 @@ bool SwCursor::GotoPrevFootnoteAnchor()
         return false;
     }
 
-    if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ) )
+    if( rFootnoteArr.SeekEntry( GetPoint()->GetNode(), &nPos ) )
     {
         // there is a footnote with this index, so search also for the next one
         SwNodeOffset nNdPos = GetPoint()->GetNodeIndex();
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 37e21b5506c6..b95740932b07 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -976,7 +976,7 @@ namespace
         {
 
             size_t nPos = 0;
-            rFootnoteArr.SeekEntry( rSttNd, &nPos );
+            rFootnoteArr.SeekEntry( rSttNd.GetNode(), &nPos );
             SwTextFootnote* pSrch;
             const SwNode* pFootnoteNd;
 
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 59ef1da0aede..61dbe5071cd2 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -442,7 +442,7 @@ bool SwDoc::SetCurFootnote( const SwPaM& rPam, const 
OUString& rNumStr,
     const sal_Int32 nEndCnt = pEnd->GetContentIndex();
 
     size_t nPos = 0;
-    rFootnoteArr.SeekEntry( pStt->nNode, &nPos );
+    rFootnoteArr.SeekEntry( pStt->GetNode(), &nPos );
 
     std::unique_ptr<SwUndoChangeFootNote> pUndo;
     if (GetIDocumentUndoRedo().DoesUndo())
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 778a6ed388ee..7a1fb7d89f12 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -405,7 +405,7 @@ void SwFootnoteIdxs::UpdateAllFootnote()
             aLayout->UpdateFootnoteNums();
 }
 
-SwTextFootnote* SwFootnoteIdxs::SeekEntry( const SwNodeIndex& rPos, size_t* 
pFndPos ) const
+SwTextFootnote* SwFootnoteIdxs::SeekEntry( const SwNode& rPos, size_t* pFndPos 
) const
 {
     SwNodeOffset nIdx = rPos.GetIndex();
 
diff --git a/sw/source/core/docnode/ndsect.cxx 
b/sw/source/core/docnode/ndsect.cxx
index a285d0a0829f..a9fa873e7748 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -751,7 +751,7 @@ void sw_DeleteFootnote( SwSectionNode *pNd, SwNodeOffset 
nStt, SwNodeOffset nEnd
         return;
 
     size_t nPos = 0;
-    rFootnoteArr.SeekEntry( SwNodeIndex( *pNd ), &nPos );
+    rFootnoteArr.SeekEntry( *pNd, &nPos );
     SwTextFootnote* pSrch;
 
     // Delete all succeeding Footnotes
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 05007410add3..4723337cd289 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -474,7 +474,7 @@ bool SwNode::IsProtect() const
     if( nullptr != pSttNd )
     {
         const SwTextFootnote* pTFootnote = 
GetDoc().GetFootnoteIdxs().SeekEntry(
-                                SwNodeIndex( *pSttNd ) );
+                                *pSttNd );
         if( pTFootnote )
             return pTFootnote->GetTextNode().IsProtect();
     }
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index dce1ef41d575..947a26ec41da 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -881,7 +881,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& 
rMark,
         {
             const SwNode* pFootnoteNd;
             size_t nPos = 0;
-            rFootnoteArr.SeekEntry( pStt->nNode, &nPos );
+            rFootnoteArr.SeekEntry( pStt->GetNode(), &nPos );
             SwTextFootnote* pSrch;
 
             // for now delete all that come afterwards

Reply via email to