[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/qa writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Aug 26 04:47:23 PDT 2014


 sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx |binary
 writerfilter/source/dmapper/StyleSheetTable.cxx      |    3 ++-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a0d22fdafd0e8f89196b7203afe9933811b92ea1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Aug 22 13:51:54 2014 +0200

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx b/sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx
new file mode 100644
index 0000000..60dae2a
Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/liststyle-gridbefore.docx differ
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 9e76b14..3442d1a3 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)


More information about the Libreoffice-commits mailing list