diff options
-rw-r--r-- | i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 8 | ||||
-rw-r--r-- | include/editeng/svxenum.hxx | 1 | ||||
-rw-r--r-- | offapi/com/sun/star/style/NumberingType.idl | 6 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/data/rovas-numbering.odt | bin | 0 -> 8786 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 14 |
5 files changed, 28 insertions, 1 deletions
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 936f1620ad73..119cc76b4f61 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -942,6 +942,11 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal result += lcl_formatArabicZero(number, 5); break; + case SZEKELY_ROVAS: // Old Hungarian + natNum = NativeNumberMode::NATNUM12; + locale.Language = "hu-Hung"; + break; + default: OSL_ASSERT(false); throw IllegalArgumentException(); @@ -1036,8 +1041,9 @@ const Supported_NumberingType aSupportedTypes[] = {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_SR, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_A S_CYR_B ", ... (sr)", LANG_ALL}, {style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_SR, C_CYR_A ", " C_CYR_B ", .., " C_CYR_A S_CYR_A ", " C_CYR_B S_CYR_B ", ... (sr)", LANG_ALL}, {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_SR, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_B S_CYR_B ", ... (sr)", LANG_ALL}, - {style::NumberingType::CHARS_PERSIAN, nullptr, LANG_CTL}, + {style::NumberingType::CHARS_PERSIAN, nullptr, LANG_CTL}, {style::NumberingType::CHARS_PERSIAN_WORD, nullptr, LANG_CTL}, + {style::NumberingType::SZEKELY_ROVAS, 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}, diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx index fb614738366e..6c02165607d7 100644 --- a/include/editeng/svxenum.hxx +++ b/include/editeng/svxenum.hxx @@ -210,6 +210,7 @@ enum SvxNumType : sal_Int16 SVX_NUM_ARABIC_ZERO3 = css::style::NumberingType::ARABIC_ZERO3, SVX_NUM_ARABIC_ZERO4 = css::style::NumberingType::ARABIC_ZERO4, SVX_NUM_ARABIC_ZERO5 = css::style::NumberingType::ARABIC_ZERO5, + SVX_NUM_SZEKELY_ROVAS = css::style::NumberingType::SZEKELY_ROVAS }; #endif diff --git a/offapi/com/sun/star/style/NumberingType.idl b/offapi/com/sun/star/style/NumberingType.idl index 230103695bda..fd19e087f7b9 100644 --- a/offapi/com/sun/star/style/NumberingType.idl +++ b/offapi/com/sun/star/style/NumberingType.idl @@ -520,6 +520,12 @@ published constants NumberingType @since LibreOffice 7.0 */ const short ARABIC_ZERO5 = 67; + + /** Numbering is in Szekely rovas (Old Hungarian) numerals + + @since LibreOffice 7.1 + */ + const short SZEKELY_ROVAS = 68; }; diff --git a/sw/qa/extras/odfexport/data/rovas-numbering.odt b/sw/qa/extras/odfexport/data/rovas-numbering.odt Binary files differnew file mode 100644 index 000000000000..72cb8895a95a --- /dev/null +++ b/sw/qa/extras/odfexport/data/rovas-numbering.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 4f0a04cf69f8..f74980ebc51b 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2537,6 +2537,20 @@ DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.odt") aMap["NumberingType"].get<sal_uInt16>()); } +DECLARE_ODFEXPORT_TEST(testRovasNumbering, "rovas-numbering.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + 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: 68 + // - Actual : 4 + // i.e. numbering type was ARABIC, not SZEKELY_ROVAS. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(style::NumberingType::SZEKELY_ROVAS), + aMap["NumberingType"].get<sal_uInt16>()); +} + DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt") { CPPUNIT_ASSERT_EQUAL(1, getShapes()); |