avoid crash when no table grid is given
The document may contain just <w:tblGrid/> and <w:tblW w:w="0" w:type="auto"/> . It appears we do not handle the auto width properly at all, but at least don't crash. Change-Id: Ibdc9d1ad69c13456acd347a151ec8739bcb98855
This commit is contained in:
@@ -584,6 +584,10 @@ void DomainMapperTableManager::endOfRowAction()
|
|||||||
text::TableColumnSeparator* pSeparators = aSeparators.getArray();
|
text::TableColumnSeparator* pSeparators = aSeparators.getArray();
|
||||||
sal_Int16 nSum = 0;
|
sal_Int16 nSum = 0;
|
||||||
sal_uInt32 nPos = 0;
|
sal_uInt32 nPos = 0;
|
||||||
|
// Avoid divide by zero (if there's no grid, position using cell widths).
|
||||||
|
if( nFullWidthRelative == 0 )
|
||||||
|
for (sal_uInt32 i = 0; i < pCellWidths->size(); ++i)
|
||||||
|
nFullWidthRelative += (*pCellWidths.get())[i];
|
||||||
|
|
||||||
for (sal_uInt32 i = 0; i < pCellWidths->size() - 1; ++i)
|
for (sal_uInt32 i = 0; i < pCellWidths->size() - 1; ++i)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user