summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-08-13 19:07:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-13 20:23:26 +0200
commitdf3b7599f5ad92337a495224f53a1299cc82e97e (patch)
tree2861688055ffe7e9be3c923005d38e8643041814
parent89581c26be049b5af5bda96f21e908df81a1a194 (diff)
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.grandin@collabora.co.uk>
-rw-r--r--sw/inc/ndarr.hxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx8
2 files changed, 5 insertions, 5 deletions
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;