summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-12-18 22:29:04 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-12-19 23:43:43 +0100
commitfeb043331207ae66e1ac6cce613ff052f96d4f02 (patch)
tree610a5fdd5ec8f103bd4519a015c18d660fb00dd3 /sw
parentaea7d5682ccfa886812baece60ece4ee296e8a69 (diff)
tdf#113547 DOCX import: fix handling of stub numbering overrides
Regression from commit c72a1a74b5b1064fc9cdf9994b11fce26d866e26 (Related: tdf#112211 DOCX import: fix handling of missing first ind in <w:lvl>, 2017-09-19), now that a numbering level can have default properties, we need to differentiate between the case when the level has real properties or it has only default properties. Merging of properties is not necessary when the abstract numbering has properties, but the "override" has default properties only. (cherry picked from commit a0bf35f7c0eedbe04783285a4a7071e68baeb7fe) Change-Id: Idbcbd0f66932514612e11fe82377f2b68ac9e403 Reviewed-on: https://gerrit.libreoffice.org/46777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113547.docxbin0 -> 14424 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113547.docx b/sw/qa/extras/ooxmlexport/data/tdf113547.docx
new file mode 100644
index 000000000000..7b35ad72ba44
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113547.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 6aca7e81b2cd..e2af3250cb07 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -109,6 +109,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113183, "tdf113183.docx")
"HoriOrientPosition"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf113547, "tdf113547.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aProps(xLevels->getByIndex(0)); // 1st level
+ // This was 0, first-line left margin of the numbering was lost.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-635), aProps["FirstLineIndent"].get<sal_Int32>());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */