i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 1 sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt |binary sw/qa/extras/odfexport/odfexport.cxx | 13 ++++++++++ 3 files changed, 14 insertions(+)
New commits: commit 5b071c10d36371d1f9ce14ab13230bfd703d0245 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Fri Mar 20 17:27:21 2020 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Mar 20 21:46:35 2020 +0100 sw pad-to-4 numbering: add ODF filter This makes the UI work as well. Change-Id: I4e94b85097cc359b257b07ba7517edfab3011093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90827 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 17d398077ce0..ea308fcaefe9 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -1049,6 +1049,7 @@ static const Supported_NumberingType aSupportedTypes[] = {style::NumberingType::CHARS_GREEK_LOWER_LETTER, S_GR_A ", " S_GR_B ", ... (gr)", LANG_ALL}, {style::NumberingType::ARABIC_ZERO, "01, 02, 03, ...", LANG_ALL}, {style::NumberingType::ARABIC_ZERO3, "001, 002, 003, ...", LANG_ALL}, + {style::NumberingType::ARABIC_ZERO4, "0001, 0002, 0003, ...", LANG_ALL}, }; static const sal_Int32 nSupported_NumberingTypes = SAL_N_ELEMENTS(aSupportedTypes); diff --git a/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt b/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt new file mode 100644 index 000000000000..2eb9b49cedaa Binary files /dev/null and b/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 3c1403473515..052efd073ad5 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2370,5 +2370,18 @@ DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.odt") aMap["NumberingType"].get<sal_uInt16>()); } +DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-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: 66 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO4. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO4), + aMap["NumberingType"].get<sal_uInt16>()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits