tdf#165130 sc: prevent pane's topLeftCell from being in frozen zone
[LibreOffice.git] / i18npool / qa / cppunit / test_defaultnumberingprovider.cxx
blobd18bd49848149749b16d08623acc2621385675e5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <test/bootstrapfixture.hxx>
12 #include <com/sun/star/style/NumberingType.hpp>
13 #include <com/sun/star/text/DefaultNumberingProvider.hpp>
14 #include <com/sun/star/text/XNumberingFormatter.hpp>
15 #include <com/sun/star/text/XNumberingTypeInfo.hpp>
17 #include <comphelper/propertyvalue.hxx>
19 #include <unordered_map>
21 using namespace ::com::sun::star;
23 /// i18npool defaultnumberingprovider tests.
24 class I18npoolDefaultnumberingproviderTest : public test::BootstrapFixture
28 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testNumberingIdentifiers)
30 // All numbering identifiers must be unique.
31 std::unordered_map<OUString, sal_Int16> aMap;
32 std::vector<OString> aFail;
34 uno::Reference<text::XNumberingTypeInfo> xFormatter(
35 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
37 // Do not use getSupportedNumberingTypes() because it depends on
38 // configuration whether CTL and CJK numberings are included or not.
39 // Also do not test for known values of
40 // offapi/com/sun/star/style/NumberingType.idl and miss newly added values.
41 // Instead, enumerate until an empty ID is returned but also check there
42 // are at least the known NumberingType values covered, just in case the
43 // table wasn't maintained. So this may have to be adapted from time to
44 // time.
45 constexpr sal_Int16 kLastKnown = css::style::NumberingType::NUMBER_LEGAL_KO;
46 for (sal_Int16 i = 0; i < SAL_MAX_INT16; ++i)
48 OUString aID(xFormatter->getNumberingIdentifier(i));
49 if (aID.isEmpty() && i > kLastKnown)
50 break; // for
52 switch (i)
54 case css::style::NumberingType::TRANSLITERATION:
55 // TODO: why does this have no identifier?
56 case css::style::NumberingType::NUMBER_UPPER_KO:
57 // FIXME: duplicate of NUMBER_UPPER_ZH_TW
58 case css::style::NumberingType::NUMBER_INDIC_DEVANAGARI:
59 // FIXME: duplicate of NUMBER_EAST_ARABIC_INDIC
60 break;
61 default:
62 if (aID.isEmpty() || !aMap.insert(std::pair(aID, i)).second)
64 aFail.emplace_back(
65 "Numbering: " + OString::number(i) + " \"" + aID.toUtf8() + "\""
66 + (aID.isEmpty() ? ""_ostr
67 : OString(" duplicate of " + OString::number(aMap[aID])))
68 + "\n");
73 if (!aFail.empty())
75 OString aMsg("Not unique numbering identifiers:\n"_ostr);
76 for (auto const& r : aFail)
77 aMsg += r;
78 CPPUNIT_ASSERT_MESSAGE(aMsg.getStr(), false);
82 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero)
84 // 1 -> "01"
85 uno::Reference<text::XNumberingFormatter> xFormatter(
86 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
87 uno::Sequence<beans::PropertyValue> aProperties = {
88 comphelper::makePropertyValue(u"NumberingType"_ustr,
89 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO)),
90 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(1)),
92 lang::Locale aLocale;
93 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
94 // Without the accompanying fix in place, this test would have failed with a
95 // lang.IllegalArgumentException, support for ARABIC_ZERO was missing.
96 CPPUNIT_ASSERT_EQUAL(u"01"_ustr, aActual);
98 // 10 -> "10"
99 aProperties = {
100 comphelper::makePropertyValue(u"NumberingType"_ustr,
101 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO)),
102 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(10)),
104 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
105 CPPUNIT_ASSERT_EQUAL(u"10"_ustr, aActual);
108 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero3)
110 // 10 -> "010"
111 uno::Reference<text::XNumberingFormatter> xFormatter(
112 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
113 uno::Sequence<beans::PropertyValue> aProperties = {
114 comphelper::makePropertyValue(u"NumberingType"_ustr,
115 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO3)),
116 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(10)),
118 lang::Locale aLocale;
119 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
120 // Without the accompanying fix in place, this test would have failed with a
121 // lang.IllegalArgumentException, support for ARABIC_ZERO3 was missing.
122 CPPUNIT_ASSERT_EQUAL(u"010"_ustr, aActual);
124 // 100 -> "100"
125 aProperties = {
126 comphelper::makePropertyValue(u"NumberingType"_ustr,
127 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO3)),
128 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(100)),
130 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
131 CPPUNIT_ASSERT_EQUAL(u"100"_ustr, aActual);
134 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero4)
136 // 100 -> "0100"
137 uno::Reference<text::XNumberingFormatter> xFormatter(
138 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
139 uno::Sequence<beans::PropertyValue> aProperties = {
140 comphelper::makePropertyValue(u"NumberingType"_ustr,
141 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO4)),
142 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(100)),
144 lang::Locale aLocale;
145 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
146 // Without the accompanying fix in place, this test would have failed with a
147 // lang.IllegalArgumentException, support for ARABIC_ZERO4 was missing.
148 CPPUNIT_ASSERT_EQUAL(u"0100"_ustr, aActual);
150 // 1000 -> "1000"
151 aProperties = {
152 comphelper::makePropertyValue(u"NumberingType"_ustr,
153 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO4)),
154 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(1000)),
156 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
157 CPPUNIT_ASSERT_EQUAL(u"1000"_ustr, aActual);
160 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero5)
162 // 1000 -> "01000"
163 uno::Reference<text::XNumberingFormatter> xFormatter(
164 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
165 uno::Sequence<beans::PropertyValue> aProperties = {
166 comphelper::makePropertyValue(u"NumberingType"_ustr,
167 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO5)),
168 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(1000)),
170 lang::Locale aLocale;
171 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
172 // Without the accompanying fix in place, this test would have failed with a
173 // lang.IllegalArgumentException, support for ARABIC_ZERO5 was missing.
174 CPPUNIT_ASSERT_EQUAL(u"01000"_ustr, aActual);
176 // 10000 -> "10000"
177 aProperties = {
178 comphelper::makePropertyValue(u"NumberingType"_ustr,
179 static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO5)),
180 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(10000)),
182 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
183 CPPUNIT_ASSERT_EQUAL(u"10000"_ustr, aActual);
186 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting)
188 // 1 -> "일"
189 uno::Reference<text::XNumberingFormatter> xFormatter(
190 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
191 uno::Sequence<beans::PropertyValue> aProperties = {
192 comphelper::makePropertyValue(
193 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_HANGUL_KO)),
194 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(1)),
196 lang::Locale aLocale;
197 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
198 // Without the accompanying fix in place, this test would have failed with a
199 // lang.IllegalArgumentException, support for NUMBER_HANGUL_KO was missing.
200 CPPUNIT_ASSERT_EQUAL(u"\uc77c"_ustr, aActual);
202 // 10 -> "십"
203 aProperties = {
204 comphelper::makePropertyValue(
205 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_HANGUL_KO)),
206 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(10)),
208 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
209 CPPUNIT_ASSERT_EQUAL(u"\uc2ed"_ustr, aActual);
211 // 100 -> "백"
212 aProperties = {
213 comphelper::makePropertyValue(
214 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_HANGUL_KO)),
215 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(100)),
217 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
218 CPPUNIT_ASSERT_EQUAL(u"\ubc31"_ustr, aActual);
221 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
223 // 1 -> "하나"
224 uno::Reference<text::XNumberingFormatter> xFormatter(
225 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
226 uno::Sequence<beans::PropertyValue> aProperties = {
227 comphelper::makePropertyValue(
228 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
229 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(1)),
231 lang::Locale aLocale;
232 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
233 // Without the accompanying fix in place, this test would have failed with a
234 // lang.IllegalArgumentException, support for NUMBER_LEGAL_KO was missing.
235 CPPUNIT_ASSERT_EQUAL(u"\ud558\ub098"_ustr, aActual);
237 // 2 -> "둘"
238 aProperties = {
239 comphelper::makePropertyValue(
240 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
241 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(2)),
243 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
244 CPPUNIT_ASSERT_EQUAL(u"\ub458"_ustr, aActual);
246 // 3 -> "셋"
247 aProperties = {
248 comphelper::makePropertyValue(
249 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
250 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(3)),
252 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
253 CPPUNIT_ASSERT_EQUAL(u"\uc14b"_ustr, aActual);
255 // 4 -> "넷"
256 aProperties = {
257 comphelper::makePropertyValue(
258 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
259 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(4)),
261 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
262 CPPUNIT_ASSERT_EQUAL(u"\ub137"_ustr, aActual);
264 // 5 -> "다섯"
265 aProperties = {
266 comphelper::makePropertyValue(
267 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
268 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(5)),
270 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
271 CPPUNIT_ASSERT_EQUAL(u"\ub2e4\uc12f"_ustr, aActual);
272 // 6 -> "여섯
273 aProperties = {
274 comphelper::makePropertyValue(
275 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
276 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(6)),
278 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
279 CPPUNIT_ASSERT_EQUAL(u"\uc5ec\uc12f"_ustr, aActual);
280 // 7 -> "일곱"
281 aProperties = {
282 comphelper::makePropertyValue(
283 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
284 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(7)),
286 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
287 CPPUNIT_ASSERT_EQUAL(u"\uc77c\uacf1"_ustr, aActual);
289 // 8 -> "여덟"
290 aProperties = {
291 comphelper::makePropertyValue(
292 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
293 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(8)),
295 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
296 CPPUNIT_ASSERT_EQUAL(u"\uc5ec\ub35f"_ustr, aActual);
298 // 9 -> "아홉"
299 aProperties = {
300 comphelper::makePropertyValue(
301 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
302 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(9)),
304 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
305 CPPUNIT_ASSERT_EQUAL(u"\uc544\ud649"_ustr, aActual);
307 // 10 -> "열"
308 aProperties = {
309 comphelper::makePropertyValue(
310 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
311 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(10)),
313 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
314 CPPUNIT_ASSERT_EQUAL(u"\uc5f4"_ustr, aActual);
316 // 21 -> "스물하나"
317 aProperties = {
318 comphelper::makePropertyValue(
319 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
320 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(21)),
322 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
323 CPPUNIT_ASSERT_EQUAL(u"\uc2a4\ubb3c\ud558\ub098"_ustr, aActual);
325 // 32 -> "서른둘"
326 aProperties = {
327 comphelper::makePropertyValue(
328 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
329 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(32)),
331 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
332 CPPUNIT_ASSERT_EQUAL(u"\uc11c\ub978\ub458"_ustr, aActual);
334 // 43 -> "마흔셋"
335 aProperties = {
336 comphelper::makePropertyValue(
337 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
338 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(43)),
340 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
341 CPPUNIT_ASSERT_EQUAL(u"\ub9c8\ud754\uc14b"_ustr, aActual);
343 // 54 -> "쉰넷"
344 aProperties = {
345 comphelper::makePropertyValue(
346 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
347 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(54)),
349 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
350 CPPUNIT_ASSERT_EQUAL(u"\uc270\ub137"_ustr, aActual);
352 // 65 -> "예순다섯"
353 aProperties = {
354 comphelper::makePropertyValue(
355 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
356 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(65)),
358 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
359 CPPUNIT_ASSERT_EQUAL(u"\uc608\uc21c\ub2e4\uc12f"_ustr, aActual);
361 // 76 -> "일흔여섯"
362 aProperties = {
363 comphelper::makePropertyValue(
364 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
365 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(76)),
367 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
368 CPPUNIT_ASSERT_EQUAL(u"\uc77c\ud754\uc5ec\uc12f"_ustr, aActual);
370 // 87 -> "여든일곱"
371 aProperties = {
372 comphelper::makePropertyValue(
373 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
374 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(87)),
376 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
377 CPPUNIT_ASSERT_EQUAL(u"\uc5ec\ub4e0\uc77c\uacf1"_ustr, aActual);
379 // 98 -> "아흔여덟"
380 aProperties = {
381 comphelper::makePropertyValue(
382 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
383 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(98)),
385 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
386 CPPUNIT_ASSERT_EQUAL(u"\uc544\ud754\uc5ec\ub35f"_ustr, aActual);
388 // 99 -> "아흔아홉"
389 aProperties = {
390 comphelper::makePropertyValue(
391 u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
392 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(99)),
394 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
395 CPPUNIT_ASSERT_EQUAL(u"\uc544\ud754\uc544\ud649"_ustr, aActual);
398 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital)
400 // 1 -> "일"
401 uno::Reference<text::XNumberingFormatter> xFormatter(
402 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
403 uno::Sequence<beans::PropertyValue> aProperties = {
404 comphelper::makePropertyValue(
405 u"NumberingType"_ustr,
406 static_cast<sal_uInt16>(style::NumberingType::NUMBER_DIGITAL_KO)),
407 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(1)),
409 lang::Locale aLocale;
410 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
411 // Without the accompanying fix in place, this test would have failed with a
412 // lang.IllegalArgumentException, support for NUMBER_DIGITAL_KO was missing.
413 CPPUNIT_ASSERT_EQUAL(u"\uc77c"_ustr, aActual);
415 // 10 -> "일영"
416 aProperties = {
417 comphelper::makePropertyValue(
418 u"NumberingType"_ustr,
419 static_cast<sal_uInt16>(style::NumberingType::NUMBER_DIGITAL_KO)),
420 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(10)),
422 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
423 CPPUNIT_ASSERT_EQUAL(u"\uc77c\uc601"_ustr, aActual);
425 // 100 -> "일영영"
426 aProperties = {
427 comphelper::makePropertyValue(
428 u"NumberingType"_ustr,
429 static_cast<sal_uInt16>(style::NumberingType::NUMBER_DIGITAL_KO)),
430 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(100)),
432 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
433 CPPUNIT_ASSERT_EQUAL(u"\uc77c\uc601\uc601"_ustr, aActual);
436 CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2)
438 // 1 -> "一"
439 uno::Reference<text::XNumberingFormatter> xFormatter(
440 text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
441 uno::Sequence<beans::PropertyValue> aProperties = {
442 comphelper::makePropertyValue(
443 u"NumberingType"_ustr,
444 static_cast<sal_uInt16>(style::NumberingType::NUMBER_DIGITAL2_KO)),
445 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(1)),
447 lang::Locale aLocale;
448 OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
449 // Without the accompanying fix in place, this test would have failed with a
450 // lang.IllegalArgumentException, support for NUMBER_DIGITAL2_KO was missing.
451 CPPUNIT_ASSERT_EQUAL(u"\u4e00"_ustr, aActual);
453 // 10 -> "一零"
454 aProperties = {
455 comphelper::makePropertyValue(
456 u"NumberingType"_ustr,
457 static_cast<sal_uInt16>(style::NumberingType::NUMBER_DIGITAL2_KO)),
458 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(10)),
460 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
461 CPPUNIT_ASSERT_EQUAL(u"\u4e00\u96f6"_ustr, aActual);
463 // 100 -> "一零零"
464 aProperties = {
465 comphelper::makePropertyValue(
466 u"NumberingType"_ustr,
467 static_cast<sal_uInt16>(style::NumberingType::NUMBER_DIGITAL2_KO)),
468 comphelper::makePropertyValue(u"Value"_ustr, static_cast<sal_Int32>(100)),
470 aActual = xFormatter->makeNumberingString(aProperties, aLocale);
471 CPPUNIT_ASSERT_EQUAL(u"\u4e00\u96f6\u96f6"_ustr, aActual);
474 CPPUNIT_PLUGIN_IMPLEMENT();
476 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */