diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-07-08 10:25:34 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-07-08 15:02:27 +0200 |
commit | e001e8a24c71cf2bdb455acb5bf54ac685bc1df7 (patch) | |
tree | 35d55cb8d002e2bb0ac8e2f8e9a183aa87ca3c6f /sw | |
parent | 646cf598633bacc3959fc126c9117f06f3d0f9e3 (diff) |
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@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf134260.docx | bin | 0 -> 14233 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 31 |
2 files changed, 31 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134260.docx b/sw/qa/extras/ooxmlexport/data/tdf134260.docx Binary files differnew file mode 100644 index 000000000000..98c4107f4804 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf134260.docx 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 |