DOCX import: list styles don't support automatic updates

The problem was the following: setPropertyValue("IsAutoUpdate") on the
style failed -> a number of styles was not imported in
StyleSheetTable::ApplyStyleSheets() due to the exception, then when we
tried to use one of the not imported styles, we also got an exception in
DomainMapper_Impl::finishParagraph(), which resulted in not calling
DomainMapperTableManager::handle(), so multiple cells of the same table
wanted the same range for cell contents, and that resulted in a crash.

Regression from cf33af732e (handle
w:gridBefore by faking cells (fdo#38414), 2014-04-23), but that commit
just made the previously hidden problem visible.

Change-Id: I788cb6b4a2c7b7efbfa48297c658bb26450bf583
This commit is contained in:
Miklos Vajna 2014-08-22 13:51:54 +02:00
parent 2a029e5f4e
commit 7c02c7b021
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View file

@ -1203,7 +1203,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
xPropertySet->setPropertyValue("StyleInteropGrabBag", uno::makeAny(aGrabBag));
}
if (pEntry->bAutoRedefine)
// List styles don't support automatic update.
if (pEntry->bAutoRedefine && !bListStyle)
xPropertySet->setPropertyValue("IsAutoUpdate", uno::makeAny(sal_True));
}
else if(pEntry->nStyleTypeCode == STYLE_TYPE_TABLE)