Kaydet (Commit) 4ee3eabd authored tarafından Caolán McNamara's avatar Caolán McNamara

avoid crashing on load of fdo54724-1.rtf

Change-Id: I3df326eadc2f137c75e87835caf12266dbd011b5
üst f2cbe51f
This diff is collapsed.
......@@ -2238,12 +2238,17 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
for (sal_Int32 nCell = 0; nCell < nCells; ++nCell)
{
SwNodeRange *const pLastCell(
(nCell == 0)
? ((nRow == 0) ? nullptr : &*aTableNodes.rbegin()->rbegin())
: &*aRowNodes.rbegin());
m_pImpl->ConvertCell(pRow[nCell],
aRowNodes, pLastCell, bExcept);
SwNodeRange *pLastCell;
if (nCell == 0 && nRow == 0)
{
pLastCell = nullptr;
}
else
{
std::vector<SwNodeRange>& rRowOfPrevCell = nCell ? aRowNodes : *aTableNodes.rbegin();
pLastCell = !rRowOfPrevCell.empty() ? &*rRowOfPrevCell.rbegin() : nullptr;
}
m_pImpl->ConvertCell(pRow[nCell], aRowNodes, pLastCell, bExcept);
}
aTableNodes.push_back(aRowNodes);
}
......
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