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

New commits:
commit df3b7599f5ad92337a495224f53a1299cc82e97e
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Aug 13 19:07:53 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Aug 13 20:23:26 2022 +0200

    pass SwNode instead of SwNodeIndex to InsertTable
    
    part of the process of hiding the internals of SwPosition
    
    Change-Id: I58e20facfb8987a31e354542a9a5e7824daa0b26
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138235
    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 b50b98b571b8..41180ed19ee1 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -247,7 +247,7 @@ public:
        adjust in pContentTextColl or pHeadlineTextColl this adjust item
        overrides the item in pAttrSet. */
 
-    static SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
+    static SwTableNode* InsertTable( SwNode& rNd,
                         sal_uInt16 nBoxes, SwTextFormatColl* pContentTextColl,
                         sal_uInt16 nLines, sal_uInt16 nRepeat,
                         SwTextFormatColl* pHeadlineTextColl,
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 591cee8e611a..9d345c9dcd56 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -393,7 +393,7 @@ const SwTable* SwDoc::InsertTable( const 
SwInsertTableOptions& rInsTableOpts,
         SwNodes::InsertTable to propagate an adjust item if
         necessary. */
     SwTableNode *pTableNd = SwNodes::InsertTable(
-        rPos.nNode,
+        rPos.GetNode(),
         nCols,
         pBodyColl,
         nRows,
@@ -560,7 +560,7 @@ const SwTable* SwDoc::InsertTable( const 
SwInsertTableOptions& rInsTableOpts,
     return &rNdTable;
 }
 
-SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
+SwTableNode* SwNodes::InsertTable( SwNode& rNd,
                                    sal_uInt16 nBoxes,
                                    SwTextFormatColl* pContentTextColl,
                                    sal_uInt16 nLines,
@@ -575,8 +575,8 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& 
rNdIdx,
     if( !pHeadlineTextColl || !nLines )
         pHeadlineTextColl = pContentTextColl;
 
-    SwTableNode * pTableNd = new SwTableNode( rNdIdx.GetNode() );
-    SwEndNode* pEndNd = new SwEndNode( rNdIdx.GetNode(), *pTableNd );
+    SwTableNode * pTableNd = new SwTableNode( rNd );
+    SwEndNode* pEndNd = new SwEndNode( rNd, *pTableNd );
 
     if( !nLines ) // For the for loop
         ++nLines;

Reply via email to