sw/qa/extras/ooxmlexport/data/tdf133363.docx      |binary
 sw/qa/extras/ooxmlexport/ooxmlexport19.cxx        |   11 +++++++++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    5 ++++-
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit e6a08aa351815b7be3bd094320c589026582454b
Author:     Czeber László Ádám <czeber.laszloa...@nisz.hu>
AuthorDate: Thu Apr 13 08:48:05 2023 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Fri Apr 21 10:53:04 2023 +0200

    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 <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@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 000000000000..937554facde6
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133363.docx 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;

Reply via email to