summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/ndtbl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-26 10:58:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-26 18:54:47 +0200
commit96844af26402e4ab26ff7ba02e52989c3b294095 (patch)
treed33bb8f30c8bbb304a50ccbfe95600f39e07f252 /sw/source/core/docnode/ndtbl.cxx
parent4e6327c673075ab4a44f497a06a8dbf759c1a72a (diff)
elide some temporaries when constructing SwPosition
because the resulting pointer manipulation is not free, the temporary has to be attached to a linked list and then immediately de-linked Also add some asserts to catch SwPosition being created with mis-matching nodes in the SwNodeIndex and SwContentIndex. Which flushes out some bugs in SwHTMLParser::NewDivision SwIntrnlSectRefLink::DataChanged where it was creating a SwPosition with the SwNodeIndex and the SwContentIndex pointing at different nodes. Change-Id: Iea69f5ffc5860eb654435e161bc544b412d4c245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137411 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/docnode/ndtbl.cxx')
-rw-r--r--sw/source/core/docnode/ndtbl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index ebb7f41daf09..635476cf3f9a 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1061,7 +1061,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
rTable.GetTabLines().insert(rTable.GetTabLines().begin() + nLines, pLine);
SwStartNode* pSttNd;
- SwPosition aCntPos( aSttIdx, SwContentIndex( pTextNd ));
+ SwPosition aCntPos( aSttIdx, pTextNd, 0);
const std::shared_ptr< sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create());
pContentStore->Save(rDoc, aSttIdx.GetIndex(), SAL_MAX_INT32);