diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-22 13:51:54 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-26 06:47:00 -0500 |
commit | a0d22fdafd0e8f89196b7203afe9933811b92ea1 (patch) | |
tree | a9f820cfaf0d3ecfad40d725cc5673b930d597f1 | |
parent | a628ea1cd72585b889d591052680ebf79887dcef (diff) |
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 cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle
w:gridBefore by faking cells (fdo#38414), 2014-04-23), but that commit
just made the previously hidden problem visible.
(cherry picked from commit 7c02c7b0216f642074b690cce889f1a02a2ef6b0)
Change-Id: I788cb6b4a2c7b7efbfa48297c658bb26450bf583
Reviewed-on: https://gerrit.libreoffice.org/11068
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx | bin | 0 -> 11441 bytes | |||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 3 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx b/sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx Binary files differnew file mode 100644 index 000000000000..60dae2aad445 --- /dev/null +++ b/sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 9e76b141f541..3442d1a3fe1a 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1161,7 +1161,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) |