tdf#133363 sw DOCX import: remove extra auto space in mixed list
Remove extra auto space even for mixed list styles. For mixed
style lists, it has not removed all the extra space needed.
See also commit 9cca15204af9cc44a8a9528ccf2f36616fb70e69
"tdf#133052: DOCX import: fix top auto margin of subitems".
Change-Id: I15e58616d5810ea57ac9339bdd8e4b5859f09c81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150313
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133363.docx b/sw/qa/extras/ooxmlexport/data/tdf133363.docx
new file mode 100644
index 0000000..937554f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133363.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
index 94a2c57..9e01ca7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
@@ -883,6 +883,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105875_VmlShapeRotationWithFlip,
}
}
CPPUNIT_TEST_FIXTURE(Test, testTdf133363)
{
loadAndSave("tdf133363.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// tdf#133363: remove extra auto space between first and second list elements
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[2]/w:pPr/w:spacing", "before",
"0");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[3]/w:pPr/w:spacing", "after",
"0");
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 3bca318..6cb0c1d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2498,7 +2498,10 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
m_xPreviousParagraph->getPropertyValue("NumberingStyleName") >>= aPreviousNumberingName;
}
if (!aPreviousNumberingName.isEmpty() && aCurrentNumberingName == aPreviousNumberingName)
// tdf#133363: remove extra auto space even for mixed list styles
if (!aPreviousNumberingName.isEmpty()
&& (aCurrentNumberingName == aPreviousNumberingName
|| !isNumberingViaRule))
{
uno::Sequence<beans::PropertyValue> aPrevPropertiesSeq;
m_xPreviousParagraph->getPropertyValue("ParaInteropGrabBag") >>= aPrevPropertiesSeq;