diff options
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 9c8eb82e6020..f6540bbf337e 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1302,7 +1302,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 49f2cbe5f2fb..37ec4681d715 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) { |