[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/qa writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri May 4 15:30:32 UTC 2018
sw/qa/extras/ooxmlexport/data/tdf116801.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 12 ++++++++++++
writerfilter/source/dmapper/StyleSheetTable.cxx | 4 ++--
3 files changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 2019109e20dc522dd3bd6a730bf639efc2c00309
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed May 2 22:04:08 2018 +0200
tdf#116801 DOCX import: char styles have no IsAutoUpdate property
See sw/source/core/unocore/unomapproperties.hxx:447,
UNO_NAME_IS_AUTO_UPDATE is part of the COMMON_PARA_STYLE_PROPERTIES
define. So it's not "list styles don't have this", but "only paragraph
styles have this".
(cherry picked from commit ebcf27d419e41a497242c98fcfec08a2088c0720)
Change-Id: I1c256b087cdc2e7e341f55d717ef8e678fc69fb4
Reviewed-on: https://gerrit.libreoffice.org/53773
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116801.docx b/sw/qa/extras/ooxmlexport/data/tdf116801.docx
new file mode 100644
index 000000000000..f904546cf38b
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf116801.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index bc7c15524778..7af6f0dc39e2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -218,6 +218,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116985, "tdf116985.docx")
CPPUNIT_ASSERT(nWidth > 4000);
}
+DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // This raised a lang::IndexOutOfBoundsException, table was missing from
+ // the import result.
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("D1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("D1"), xCell->getString());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 55996991a84a..d192eaa5ab53 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1197,8 +1197,8 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
xPropertySet->setPropertyValue("StyleInteropGrabBag", uno::makeAny(aGrabBag));
}
- // List styles don't support automatic update.
- if (pEntry->bAutoRedefine && !bListStyle)
+ // Only paragraph styles support automatic updates.
+ if (pEntry->bAutoRedefine && bParaStyle)
xPropertySet->setPropertyValue("IsAutoUpdate", uno::makeAny(true));
}
else if(pEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
More information about the Libreoffice-commits
mailing list