i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |    1 
 sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt                |binary
 sw/qa/extras/odfexport/odfexport.cxx                                  |   13 
++++++++++
 3 files changed, 14 insertions(+)

New commits:
commit 086bfde59232076644995ae862cd43865419ad98
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Mar 18 10:18:42 2020 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Mar 18 11:06:55 2020 +0100

    sw pad-to-3 numbering: add ODF filter
    
    This makes the UI work as well.
    
    Change-Id: I8d64b88e57ba3e4fd61afba892f0ee2267f1c8b2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90683
    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 86b64a3d23ad..9abb5ae5c051 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -1044,6 +1044,7 @@ static const Supported_NumberingType aSupportedTypes[] =
         {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},
+        {style::NumberingType::ARABIC_ZERO3, "001, 002, 003, ...", LANG_ALL},
 };
 static const sal_Int32 nSupported_NumberingTypes = 
SAL_N_ELEMENTS(aSupportedTypes);
 
diff --git a/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt 
b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt
new file mode 100644
index 000000000000..0bdca270eece
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index a89e916a2749..3c1403473515 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2357,5 +2357,18 @@ DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, 
"arabic-zero-numbering.odt")
                          aMap["NumberingType"].get<sal_uInt16>());
 }
 
+DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-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: 65
+    // - Actual  : 4
+    // i.e. numbering type was ARABIC, not ARABIC_ZERO3.
+    
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO3),
+                         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

Reply via email to