diff options
-rw-r--r-- | i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 1 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/data/arabic-zero-numbering.odt | bin | 0 -> 8730 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 13 |
3 files changed, 14 insertions, 0 deletions
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 372837595708..797d7360a283 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -1039,6 +1039,7 @@ static const Supported_NumberingType aSupportedTypes[] = {style::NumberingType::CHARS_PERSIAN_WORD, nullptr, LANG_CTL}, {style::NumberingType::CHARS_GREEK_UPPER_LETTER, C_GR_A ", " C_GR_B ", ... (gr)", LANG_ALL}, {style::NumberingType::CHARS_GREEK_LOWER_LETTER, S_GR_A ", " S_GR_B ", ... (gr)", LANG_ALL}, + {style::NumberingType::ARABIC_ZERO, "01, 02, 03, ...", LANG_ALL}, }; static const sal_Int32 nSupported_NumberingTypes = SAL_N_ELEMENTS(aSupportedTypes); diff --git a/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt b/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt Binary files differnew file mode 100644 index 000000000000..2a445b22748a --- /dev/null +++ b/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index cd7ec96315f4..0d5c28f07ebd 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2335,5 +2335,18 @@ DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt") CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int16>(xShape, "VertOrientRelation")); } +DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.odt") +{ + auto xNumberingRules + = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules"); + comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 64 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO), + aMap["NumberingType"].get<sal_uInt16>()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |