sw/qa/extras/ww8export/data/tdf120629.odt |binary
 sw/qa/extras/ww8export/ww8export4.cxx     |   16 ++++++++++++++++
 2 files changed, 16 insertions(+)

New commits:
commit c60fdc26f1ade0c6a1f8404baf749f5dab6abd84
Author:     Adam Seskunas <adamsesku...@gmail.com>
AuthorDate: Tue Aug 20 13:25:52 2024 -0700
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Aug 29 11:09:24 2024 +0200

    tdf#120629 Add Unit test
    
    Change-Id: I2f5ee20bfe16c8da414504a717a6fdcfbaf6eeca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172558
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/sw/qa/extras/ww8export/data/tdf120629.odt 
b/sw/qa/extras/ww8export/data/tdf120629.odt
new file mode 100644
index 000000000000..36d7feaa2722
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf120629.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export4.cxx 
b/sw/qa/extras/ww8export/ww8export4.cxx
index 7d2474f758d7..b50bd53854d4 100644
--- a/sw/qa/extras/ww8export/ww8export4.cxx
+++ b/sw/qa/extras/ww8export/ww8export4.cxx
@@ -603,6 +603,22 @@ nde muito parto na água. Tb posso fazer porcentagem de 
atendimento..."_ustr);
     saveAndReload(mpFilter);
     verify();
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf120629)
+{
+    createSwDoc("tdf120629.odt");
+
+    sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(56), numFormat);
+
+    saveAndReload("MS Word 97");
+    sal_Int16 numFormat_after = getNumberingTypeOfParagraph(1);
+    // Without the fix in place this fails with
+    // Expected: 56
+    // Actual:   4
+    // i.e. numbering type gets changed to ARABIC, should stay the same
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(56), numFormat_after);
+}
 } // end of anonymous namespace
 CPPUNIT_PLUGIN_IMPLEMENT();
 

Reply via email to