From c72a1a74b5b1064fc9cdf9994b11fce26d866e26 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 19 Sep 2017 09:17:25 +0200 Subject: Related: tdf#112211 DOCX import: fix handling of missing first ind in Usually a DOCX numbering definition has multiple levels, each level containing a element. When this is missing, we should default to the Word default, not to the Writer one. This makes the DOCX version of tdf#106953 imported correctly, in preparation of dropping the original fix that helped RTF only. [ The DOC version of the bugdoc is still not imported correctly. ] Change-Id: Ib7fc1de55316a73188c023665a585ac7056341f7 Reviewed-on: https://gerrit.libreoffice.org/42447 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/qa/extras/ooxmlexport/data/tdf106953.docx | Bin 0 -> 13833 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 sw/qa/extras/ooxmlexport/data/tdf106953.docx (limited to 'sw/qa/extras') diff --git a/sw/qa/extras/ooxmlexport/data/tdf106953.docx b/sw/qa/extras/ooxmlexport/data/tdf106953.docx new file mode 100644 index 000000000000..31dc0e28e42f Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf106953.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 57b41c224b84..3dd23fbf5eaf 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -845,6 +845,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf44986, "tdf44986.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength()); } +DECLARE_OOXMLEXPORT_TEST(testTdf106953, "tdf106953.docx") +{ + uno::Reference xRules = getProperty< uno::Reference >(getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules"); + // This was -635, so the tab of the numbering expanded to a small value instead of matching Word's larger value. + CPPUNIT_ASSERT_EQUAL(static_cast(0), comphelper::SequenceAsHashMap(xRules->getByIndex(0))["FirstLineIndent"].get()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit