[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - i18npool/source sw/qa

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 3 08:42:53 UTC 2020


 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 36b257b17c3a6d6b79f3b0488808398e1b034551
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Mar 18 10:18:42 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Apr 3 10:42:23 2020 +0200

    sw pad-to-3 numbering: add ODF filter
    
    This makes the UI work as well.
    
    (cherry picked from commit 086bfde59232076644995ae862cd43865419ad98)
    
    Change-Id: I8d64b88e57ba3e4fd61afba892f0ee2267f1c8b2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91592
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 21a0eb8e7d7e..85b0b55bcc00 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -1045,6 +1045,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 afb17337be13..86c55f2a5984 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2241,6 +2241,19 @@ DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.odt")
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO),
                          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>());
+}
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list