From 8540c7b18bae9c9b46e6feb7658198a7fc62e811 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 23 Mar 2020 13:37:25 +0100 Subject: sw: add pad-to-5 numbering This is the last padded numbering type that is supported by Word but was not supported by Writer. Change-Id: Ica1a0843897c61a4b569105fd21e5bfe7b5012cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90912 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt | Bin 0 -> 8779 bytes sw/qa/extras/odfexport/odfexport.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt (limited to 'sw/qa/extras/odfexport') diff --git a/sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt b/sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt new file mode 100644 index 000000000000..3526ee8d7086 Binary files /dev/null and b/sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 052efd073ad5..7931ee55d6d8 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2383,5 +2383,18 @@ DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.odt") aMap["NumberingType"].get()); } +DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.odt") +{ + auto xNumberingRules + = getProperty>(getParagraph(1), "NumberingRules"); + comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 67 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO5. + CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO5), + aMap["NumberingType"].get()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3