summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCzeber László Ádám <czeber.laszloadam@nisz.hu>2023-04-13 08:48:05 +0200
committerLászló Németh <nemeth@numbertext.org>2023-04-21 10:53:04 +0200
commite6a08aa351815b7be3bd094320c589026582454b (patch)
treead24218ff91f5872d3af89d2c463a69f373d0dbf
parent4232907e0a8a5bd87c673afd9df0031dce74d798 (diff)
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>
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133363.docxbin0 -> 13891 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport19.cxx11
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx5
3 files changed, 15 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133363.docx b/sw/qa/extras/ooxmlexport/data/tdf133363.docx
new file mode 100644
index 000000000000..937554facde6
--- /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 94a2c57c00ea..9e01ca72ca17 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 3bca3186ca82..6cb0c1d90d28 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;