Kaydet (Commit) 82f25d5d authored tarafından Caolán McNamara's avatar Caolán McNamara

crashtesting: assert on loading certain rtf

Change-Id: I17acf270f552571fec898e19fa2d000ec4c00df5
üst 872cf486
...@@ -259,7 +259,7 @@ public: ...@@ -259,7 +259,7 @@ public:
SwTextFormatColl* pTextColl, SwTextFormatColl* pTextColl,
SwUndoTextToTable* pUndo ); SwUndoTextToTable* pUndo );
static SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange); SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange);
/// create a table from a vector of NodeRanges - API support /// create a table from a vector of NodeRanges - API support
SwTableNode* TextToTable( const TableRanges_t& rTableNodes, SwTableNode* TextToTable( const TableRanges_t& rTableNodes,
......
...@@ -1302,7 +1302,7 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) ...@@ -1302,7 +1302,7 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange)
} }
SwNode * pNode = &aIndex.GetNode(); SwNode * pNode = &aIndex.GetNode();
while (pNode->IsEndNode()) while (pNode->IsEndNode() && aIndex < Count() - 1)
{ {
SwNode * pStartNode = pNode->StartOfSectionNode(); SwNode * pStartNode = pNode->StartOfSectionNode();
SwNodeIndex aStartIndex(*pStartNode); SwNodeIndex aStartIndex(*pStartNode);
......
...@@ -1839,7 +1839,7 @@ void SwXText::Impl::ConvertCell( ...@@ -1839,7 +1839,7 @@ void SwXText::Impl::ConvertCell(
SwNodeRange aTmpRange(aStartCellPam.Start()->nNode, SwNodeRange aTmpRange(aStartCellPam.Start()->nNode,
aEndCellPam.End()->nNode); aEndCellPam.End()->nNode);
SwNodeRange * pCorrectedRange = SwNodeRange * pCorrectedRange =
SwNodes::ExpandRangeForTableBox(aTmpRange); m_pDoc->GetNodes().ExpandRangeForTableBox(aTmpRange);
if (pCorrectedRange != nullptr) if (pCorrectedRange != nullptr)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment