diff options
-rw-r--r-- | sw/inc/ndarr.hxx | 2 | ||||
-rw-r--r-- | sw/qa/core/data/rtf/fail/table-3.rtf | bin | 0 -> 3355 bytes | |||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 2 |
4 files changed, 3 insertions, 3 deletions
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 620ffe1fb132..978d814dfe4b 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -259,7 +259,7 @@ public: SwTextFormatColl* pTextColl, SwUndoTextToTable* pUndo ); - static SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange); + SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange); /// create a table from a vector of NodeRanges - API support SwTableNode* TextToTable( const TableRanges_t& rTableNodes, diff --git a/sw/qa/core/data/rtf/fail/table-3.rtf b/sw/qa/core/data/rtf/fail/table-3.rtf Binary files differnew file mode 100644 index 000000000000..ea07218bdcba --- /dev/null +++ b/sw/qa/core/data/rtf/fail/table-3.rtf diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 53105ad2151f..3acbead57778 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1316,7 +1316,7 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) } SwNode * pNode = &aIndex.GetNode(); - while (pNode->IsEndNode()) + while (pNode->IsEndNode() && aIndex < Count() - 1) { SwNode * pStartNode = pNode->StartOfSectionNode(); SwNodeIndex aStartIndex(*pStartNode); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index b692531e1e8c..baf80081d18b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1839,7 +1839,7 @@ void SwXText::Impl::ConvertCell( SwNodeRange aTmpRange(aStartCellPam.Start()->nNode, aEndCellPam.End()->nNode); SwNodeRange * pCorrectedRange = - SwNodes::ExpandRangeForTableBox(aTmpRange); + m_pDoc->GetNodes().ExpandRangeForTableBox(aTmpRange); if (pCorrectedRange != nullptr) { |