sw/inc/ndarr.hxx                 |    2 +-
 sw/source/core/docnode/ndtbl.cxx |    6 +++---
 sw/source/core/undo/untbl.cxx    |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 4ea594c7012ee27bdc02ab27e909ea9dbbfc5718
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Aug 10 19:05:27 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Aug 13 10:13:29 2022 +0200

    pass SwNode instead of SwNodeIndex to SwNodes::SplitTable
    
    part of the process of hiding the internals of SwPosition
    
    Change-Id: I23b23f23f2aeb559861f1328a2d795de5c54a013
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138220
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 386b01aae663..d2f87e36d834 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -290,7 +290,7 @@ public:
        tables is calculated from the Maximum of the boxes, provided
        SSize is set "absolute" (LONG_MAX).
        (Momentarily this is needed only for the RTF-parser.) */
-    SwTableNode* SplitTable( const SwNodeIndex& rPos, bool bAfter = true,
+    SwTableNode* SplitTable( SwNode& rPos, bool bAfter = true,
                                 bool bCalcNewSize = false );
     /// Two Tables that are following one another are merged.
     bool MergeTable( SwNode& rPos, bool bWithPrev = true,
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 7b0641da54dc..d010194fd24b 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -3154,7 +3154,7 @@ void SwDoc::SplitTable( const SwPosition& rPos, 
SplitTable_HeadlineOption eHdlnM
     aFndBox.SetTableLines( rTable );
     aFndBox.DelFrames( rTable );
 
-    SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, false, bCalcNewSize 
);
+    SwTableNode* pNew = GetNodes().SplitTable( rPos.GetNode(), false, 
bCalcNewSize );
 
     if( pNew )
     {
@@ -3348,10 +3348,10 @@ static void lcl_SplitTable_CpyBox( SwTableBox* pBox, 
SplitTable_Para* pPara )
             lcl_SplitTable_CpyLine( pLine, pPara );
 }
 
-SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter,
+SwTableNode* SwNodes::SplitTable( SwNode& rPos, bool bAfter,
                                     bool bCalcNewSize )
 {
-    SwNode* pNd = &rPos.GetNode();
+    SwNode* pNd = &rPos;
     SwTableNode* pTNd = pNd->FindTableNode();
     if( !pTNd || pNd->IsTableNode() )
         return nullptr;
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index e27f534bd8a4..f17c8419741c 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2987,7 +2987,7 @@ void SwUndoMergeTable::UndoImpl(::sw::UndoRedoContext & 
rContext)
     aFndBox.DelFrames( *pTable );
     // ? TL_CHART2: notification or locking of controller required ?
 
-    SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx );
+    SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx.GetNode() );
 
     // update layout
     aFndBox.MakeFrames( *pTable );

Reply via email to