[Libreoffice-commits] core.git: sw/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 8 13:03:15 UTC 2020


 sw/qa/extras/ooxmlexport/data/tdf134260.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx   |   31 +++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

New commits:
commit e001e8a24c71cf2bdb455acb5bf54ac685bc1df7
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Jul 8 10:25:34 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Jul 8 15:02:27 2020 +0200

    tdf#134260: sw: Add unittest
    
    Change-Id: I719dac8528453b00219c5bdc621f7ce88cd40bde
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98318
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf134260.docx b/sw/qa/extras/ooxmlexport/data/tdf134260.docx
new file mode 100644
index 000000000000..98c4107f4804
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf134260.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 3ca1a456182f..f2e09af96bfa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -267,6 +267,37 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133000_numStyleFormatting, "tdf133000_numStyleFo
     CPPUNIT_ASSERT( nLevel1Margin < nLevel2Margin );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf134260, "tdf134260.docx")
+{
+    // Without the accompanying fix in place, this test would have failed with:
+    // - Expected: 0
+    // - Actual  : 1270
+
+    auto xNum1Levels
+        = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
+
+    CPPUNIT_ASSERT_EQUAL(
+        sal_Int32(0),
+        comphelper::SequenceAsHashMap(xNum1Levels->getByIndex(0))["ListtabStopPosition"]
+            .get<sal_Int32>());
+
+    auto xNum2Levels
+        = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(2), "NumberingRules");
+
+    CPPUNIT_ASSERT_EQUAL(
+        sal_Int32(0),
+        comphelper::SequenceAsHashMap(xNum2Levels->getByIndex(0))["ListtabStopPosition"]
+            .get<sal_Int32>());
+
+    auto xNum3Levels
+        = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(3), "NumberingRules");
+
+    CPPUNIT_ASSERT_EQUAL(
+        sal_Int32(0),
+        comphelper::SequenceAsHashMap(xNum3Levels->getByIndex(0))["ListtabStopPosition"]
+            .get<sal_Int32>());
+}
+
 DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.docx")
 {
     auto xNumberingRules


More information about the Libreoffice-commits mailing list