22#include <com/sun/star/i18n/NativeNumberMode.hpp>
23#include <com/sun/star/lang/IllegalArgumentException.hpp>
24#include <com/sun/star/style/NumberingType.hpp>
25#include <com/sun/star/beans/PropertyValue.hpp>
26#include <com/sun/star/configuration/theDefaultProvider.hpp>
27#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
28#include <osl/diagnose.h>
37#define C_CYR_A "\xD0\x90"
38#define C_CYR_B "\xD0\x91"
40#define S_CYR_A "\xD0\xB0"
41#define S_CYR_B "\xD0\xB1"
44#define C_GR_A "\xCE\x91"
45#define C_GR_B "\xCE\x92"
47#define S_GR_A "\xCE\xB1"
48#define S_GR_B "\xCE\xB2"
51#define S_HE_ALEPH "\xD7\x90"
52#define S_HE_YOD "\xD7\x99"
53#define S_HE_QOF "\xD7\xA7"
56#define S_AR_ONE "\xd9\xa1"
57#define S_AR_TWO "\xd9\xa2"
58#define S_AR_THREE "\xd9\xa3"
61#define S_FA_ONE "\xDB\xB1"
62#define S_FA_TWO "\xDB\xB2"
63#define S_FA_THREE "\xDB\xB3"
66#define S_HI_ONE "\xDB\xB1"
67#define S_HI_TWO "\xDB\xB2"
68#define S_HI_THREE "\xDB\xB3"
71#define S_DAGGER "\xE2\x80\xA0"
72#define S_DBL_DAGGER "\xE2\x80\xA1"
73#define S_SECTION "\xC2\xA7"
76#include <rtl/ustring.hxx>
77#include <rtl/ustrbuf.hxx>
89 0x0623, 0x0628, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E,
90 0x062F, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635,
91 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0x0641, 0x0642,
92 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649
96 0x0627, 0x0628, 0x062c, 0x062f, 0x0647, 0x0648, 0x0632, 0x062d,
97 0x0637, 0x064a, 0x0643, 0x0644, 0x0645, 0x0646, 0x0633, 0x0639,
98 0x0641, 0x0635, 0x0642, 0x0631, 0x0634, 0x062a, 0x062b, 0x062e,
99 0x0630, 0x0636, 0x0638, 0x063a
103 0x0E01, 0x0E02, 0x0E04, 0x0E07,
104 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
105 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
106 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
107 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
108 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E
112 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
113 0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE, 0x05E0, 0x05E1, 0x05E2,
114 0x05E4, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA
118 0x0915, 0x0916, 0x0917, 0x0918, 0x0919, 0x091A, 0x091B, 0x091C,
119 0x091D, 0x091E, 0x091F, 0x0920, 0x0921, 0x0922, 0x0923, 0x0924,
120 0x0925, 0x0926, 0x0927, 0x0928, 0x092A, 0x092B, 0x092C, 0x092D,
121 0x092E, 0x092F, 0x0930, 0x0932, 0x0935, 0x0936, 0x0937, 0x0938,
126 0x1780, 0x1781, 0x1782, 0x1783, 0x1784, 0x1785, 0x1786, 0x1787,
127 0x1788, 0x1789, 0x178A, 0x178B, 0x178C, 0x178D, 0x178E, 0x178F,
128 0x1790, 0x1791, 0x1792, 0x1793, 0x1794, 0x1795, 0x1796, 0x1797,
129 0x1798, 0x1799, 0x179A, 0x179B, 0x179C, 0x179F,
130 0x17A0, 0x17A1, 0x17A2
134 0x0E81, 0x0E82, 0x0E84, 0x0E87, 0x0E88, 0x0E8A, 0x0E8D, 0x0E94,
135 0x0E95, 0x0E96, 0x0E97, 0x0E99, 0x0E9A, 0x0E9B, 0x0E9C,
136 0x0E9D, 0x0E9E, 0x0E9F, 0x0EA1, 0x0EA2, 0x0EA3, 0x0EA5, 0x0EA7,
137 0x0EAA, 0x0EAB, 0x0EAD, 0x0EAE, 0x0EAF, 0x0EAE, 0x0EDC, 0x0EDD
141 0x0F40, 0x0F41, 0x0F42, 0x0F44, 0x0F45, 0x0F46, 0x0F47, 0x0F49,
142 0x0F4F, 0x0F50, 0x0F51, 0x0F53, 0x0F54, 0x0F55, 0x0F56, 0x0F58,
143 0x0F59, 0x0F5A, 0x0F5B, 0x0F5D, 0x0F5E, 0x0F5F, 0x0F60, 0x0F61,
144 0x0F62, 0x0F63, 0x0F64, 0x0F66, 0x0F67, 0x0F68
148 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007,
149 0x1008,0x100A, 0x100B, 0x100C, 0x100D, 0x100E, 0x100F,
150 0x1010, 0x1011, 0x1012, 0x1013, 0x1014, 0x1015, 0x1016, 0x1017,
151 0x1018, 0x1019, 0x101A, 0x101B, 0x101C, 0x101D, 0x101E, 0x101F,
157 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418,
158 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422,
159 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042E,
165 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438,
166 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442,
167 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044E,
173 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
174 0x0418, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x0420,
175 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428,
176 0x0429, 0x042B, 0x042D, 0x042E, 0x042F
181 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
182 0x0438, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x0440,
183 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448,
184 0x0449, 0x044B, 0x044D, 0x044E, 0x044F
189 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0402, 0x0415, 0x0416,
190 0x0417, 0x0418, 0x0408, 0x041A, 0x041B, 0x0409, 0x041C, 0x041D,
191 0x040A, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x040B, 0x0423,
192 0x0424, 0x0425, 0x0426, 0x0427, 0x040F, 0x0428
197 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0452, 0x0435, 0x0436,
198 0x0437, 0x0438, 0x0458, 0x043A, 0x043B, 0x0459, 0x043C, 0x043D,
199 0x045A, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x045B, 0x0443,
200 0x0444, 0x0445, 0x0446, 0x0447, 0x045F, 0x0448
204 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x03DB, 0x0396, 0x0397, 0x0398,
205 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03DF,
206 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03E0
210 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03DB, 0x03B6, 0x03B7, 0x03B8,
211 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03DF,
212 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03E1
216 0x0622, 0x0628, 0x067E, 0x062A, 0x062B, 0x062C, 0x0686, 0x062D,
217 0x062E, 0x062F, 0x0630, 0x0631, 0x0632, 0x0698, 0x0633, 0x0634,
218 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x0640, 0x0641, 0x0642,
219 0x06A9, 0x06AF, 0x0644, 0x0645, 0x0646, 0x0648, 0x0647, 0x06CC
223 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
224 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52,
225 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A
229 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
230 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72,
231 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A
235 0x002a, 0x2020, 0x2021, 0x00a7
244 {0x0686, 0x0647, 0x0627, 0x0631, 0},
245 {0x067e, 0x0646, 0x062c, 0},
247 {0x0647, 0x0641, 0x062a, 0},
248 {0x0647, 0x0634, 0x062a, 0},
251 {0x06cc, 0x0627, 0x0632, 0x062f, 0x0647, 0},
252 {0x062f, 0x0648, 0x0627, 0x0632, 0x062f, 0x0647, 0},
253 {0x0633, 0x06cc, 0x0632, 0x062f, 0x0647, 0},
254 {0x0686, 0x0647, 0x0627, 0x0631, 0x062f, 0x0647, 0},
255 {0x067e, 0x0627, 0x0646, 0x0632, 0x062f, 0x0647, 0},
256 {0x0634, 0x0627, 0x0646, 0x0632, 0x062f, 0x0647, 0},
257 {0x0647, 0x0641, 0x062f, 0x0647, 0},
258 {0x0647, 0x062c, 0x062f, 0x0647, 0},
259 {0x0646, 0x0648, 0x0632, 0x062f, 0x0647, 0}
263 {0x0628, 0x06cc, 0x0633, 0x062a, 0},
265 {0x0686, 0x0647, 0x0644, 0},
266 {0x067e, 0x0646, 0x062c, 0x0627, 0x0647, 0},
267 {0x0634, 0x0635, 0x062a, 0},
268 {0x0647, 0x0641, 0x062a, 0x0627, 0x062f, 0},
269 {0x0647, 0x0634, 0x062a, 0x0627, 0x062f, 0},
270 {0x0646, 0x0648, 0x062f, 0}
275 {0x062f, 0x0648, 0x06cc, 0x0633, 0x062a, 0},
276 {0x0633, 0x06cc, 0x0635, 0x062f, 0},
277 {0x0686, 0x0647, 0x0627, 0x0631, 0x0635, 0x062f, 0},
278 {0x067e, 0x0627, 0x0646, 0x0635, 0x062f, 0},
279 {0x0634, 0x0635, 0x062f, 0},
280 {0x0647, 0x0641, 0x062a, 0x0635, 0x062f, 0},
281 {0x0647, 0x0634, 0x062a, 0x0635, 0x062f, 0},
282 {0x0646, 0x0647, 0x0635, 0x062f, 0}
286 {0x0647, 0x0632, 0x0627, 0x0631, 0},
287 {0x0645, 0x06cc, 0x0644, 0x06cc, 0x0648, 0x0646, 0},
288 {0x0645, 0x06cc, 0x0644, 0x06cc, 0x0627, 0x0631, 0x062f, 0}
341 static const char coRomanArr[] =
"MDCLXVI--";
342 const char* cRomanStr = coRomanArr;
343 sal_uInt16 nMask = 1000;
344 sal_uInt32 nOver1000 =
n / nMask;
345 n -= ( nOver1000 * nMask );
349 sTmp.append(*coRomanArr);
360 sTmp.append(*(cRomanStr-1));
366 case 3: sTmp.append(*cRomanStr); [[fallthrough]];
367 case 2: sTmp.append(*cRomanStr); [[fallthrough]];
368 case 1: sTmp.append(*cRomanStr);
break;
369 case 4: sTmp.append(*cRomanStr).append(*(cRomanStr-nDiff));
break;
370 case 5: sTmp.append(*(cRomanStr-nDiff));
break;
376 return sTmp.makeStringAndClear();
390 s += OUStringChar(
table[
n % tableSize ] );
400 int repeat_count =
n / tableSize + 1;
402 for(
int i=0;
i<repeat_count;
i++ )
403 s += OUStringChar(
table[
n%tableSize ] );
414 lcl_formatChars2( table_capital, table_small, tableSize, (
n-tableSize)/tableSize, s );
415 s += OUStringChar( table_small[
n % tableSize ] );
417 s += OUStringChar( table_capital[
n % tableSize ] );
426 int repeat_count =
n / tableSize + 1;
427 s += OUStringChar( table_capital[
n%tableSize ] );
429 for(
int i=1;
i<repeat_count;
i++ )
430 s += OUStringChar( table_small[
n%tableSize ] );
444 OUStringBuffer aTemp(64);
445 static constexpr OUStringLiteral asPersianWord_conjunction_data =
u" \u0648 ";
446 OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
447 unsigned char nSection = 0;
449 while (
int nPart = nNumber % 1000)
454 throw IllegalArgumentException();
459 if ((nDigit = nPart % 100) < 20)
461 if (!aTemp.isEmpty())
462 aTemp.insert( 0,
u' ');
467 if ((nDigit = nPart % 10) != 0)
469 if (!aTemp.isEmpty())
470 aTemp.insert( 0, asPersianWord_conjunction);
473 if ((nDigit = (nPart / 10) % 10) != 0)
475 if (!aTemp.isEmpty())
476 aTemp.insert( 0, asPersianWord_conjunction);
481 if ((nDigit = nPart / 100) != 0)
483 if (!aTemp.isEmpty())
484 aTemp.insert( 0, asPersianWord_conjunction);
495 OUStringBuffer aTemp(64);
496 int digit1 = nNumber % 10;
497 int digit2 = nNumber / 10;
502 rsResult += aTemp.makeStringAndClear();
508#define STIGMA u'\x03DB'
509#define LEFT_KERAIA u'\x0375'
510#define MYRIAD_SYM u'\x039C'
512#define SIGMA_OFFSET 19
526 throw IllegalArgumentException();
530 for (
int v =
n;
v > 0;
v /= 10,
i++) {
547 return sb.makeStringAndClear();
557 if (
n > divisor - 1) {
566 for (
int i = 0;
i < myriadPower;
i++)
585 return s ==
u" " || (!s.empty() && s[0]==0);
594 OUString aRet = OUString::number(nNumber);
595 sal_Int32 nDiff = nLimit - aRet.getLength();
604 for (sal_Int32
i = 0;
i < nDiff; ++
i)
609 return aBuffer.makeStringAndClear();
617 [&
name](
const beans::PropertyValue& rProp) { return rProp.Name.equalsAscii(name); });
620 throw IllegalArgumentException();
626 const Locale& aLocale )
645 sal_Int16 natNum = 0;
646 sal_Int16 tableSize = 0;
648 bool bRecycleSymbol =
false;
649 OUString sNatNumParams;
653 sal_Int16 numType = -1;
655 sal_Int32 number = -1;
662 if (prop.Name ==
"Prefix")
664 else if (prop.Name ==
"Suffix")
665 prop.Value >>= suffix;
666 else if (prop.Name ==
"NumberingType")
667 prop.Value >>= numType;
668 else if (prop.Name ==
"Value")
669 prop.Value >>= number;
673 throw IllegalArgumentException();
682 using namespace style::NumberingType;
685 case CHARS_UPPER_LETTER:
688 case CHARS_LOWER_LETTER:
692 natNum = NativeNumberMode::NATNUM12;
693 sNatNumParams =
"capitalize ordinal-number";
697 natNum = NativeNumberMode::NATNUM12;
698 sNatNumParams =
"capitalize";
702 natNum = NativeNumberMode::NATNUM12;
703 sNatNumParams =
"capitalize ordinal";
713 result += OUString::number( number );
720 case PAGE_DESCRIPTOR:
723 throw IllegalArgumentException();
724 case CHARS_UPPER_LETTER_N:
727 case CHARS_LOWER_LETTER_N:
730 case TRANSLITERATION:
732 const OUString &tmp = OUString::number( number );
733 OUString transliteration;
737 translit->loadModuleByImplName(transliteration, aLocale);
738 result +=
translit->transliterateString2String(tmp, 0, tmp.getLength());
741 result += OUString::number( number );
746 case NATIVE_NUMBERING:
747 natNum = NativeNumberMode::NATNUM1;
750 case FULLWIDTH_ARABIC:
751 natNum = NativeNumberMode::NATNUM3;
754 case NUMBER_LOWER_ZH:
755 natNum = NativeNumberMode::NATNUM12;
756 locale.Language =
"zh";
758 case NUMBER_UPPER_ZH:
759 natNum = NativeNumberMode::NATNUM5;
760 locale.Language =
"zh";
762 case NUMBER_UPPER_ZH_TW:
763 natNum = NativeNumberMode::NATNUM5;
764 locale.Language =
"zh";
765 locale.Country =
"TW";
767 case NUMBER_TRADITIONAL_JA:
768 natNum = NativeNumberMode::NATNUM8;
769 locale.Language =
"ja";
771 case NUMBER_UPPER_KO:
772 natNum = NativeNumberMode::NATNUM8;
773 locale.Language =
"ko";
775 case NUMBER_HANGUL_KO:
776 natNum = NativeNumberMode::NATNUM11;
777 locale.Language =
"ko";
779 case NUMBER_DIGITAL_KO:
780 natNum = NativeNumberMode::NATNUM9;
781 locale.Language =
"ko";
783 case NUMBER_DIGITAL2_KO:
784 natNum = NativeNumberMode::NATNUM1;
785 locale.Language =
"ko";
787 case NUMBER_LEGAL_KO:
788 if (number < 1 || number >= 100)
790 natNum = NativeNumberMode::NATNUM11;
791 locale.Language =
"ko";
811 case AIU_FULLWIDTH_JA:
814 bRecycleSymbol =
true;
816 case AIU_HALFWIDTH_JA:
819 bRecycleSymbol =
true;
821 case IROHA_FULLWIDTH_JA:
824 bRecycleSymbol =
true;
826 case IROHA_HALFWIDTH_JA:
829 bRecycleSymbol =
true;
834 bRecycleSymbol =
true;
836 case HANGUL_SYLLABLE_KO:
839 bRecycleSymbol =
true;
841 case HANGUL_CIRCLED_JAMO_KO:
844 bRecycleSymbol =
true;
846 case HANGUL_CIRCLED_SYLLABLE_KO:
849 bRecycleSymbol =
true;
854 case CHARS_ARABIC_ABJAD:
857 case NUMBER_ARABIC_INDIC:
858 natNum = NativeNumberMode::NATNUM1;
859 locale.Language =
"ar";
861 case NUMBER_EAST_ARABIC_INDIC:
862 natNum = NativeNumberMode::NATNUM1;
863 locale.Language =
"fa";
865 case NUMBER_INDIC_DEVANAGARI:
866 natNum = NativeNumberMode::NATNUM1;
867 locale.Language =
"hi";
876 natNum = NativeNumberMode::NATNUM1;
877 locale.Language =
"he";
894 case CHARS_CYRILLIC_UPPER_LETTER_BG:
900 case CHARS_CYRILLIC_LOWER_LETTER_BG:
905 case CHARS_CYRILLIC_UPPER_LETTER_N_BG:
911 case CHARS_CYRILLIC_LOWER_LETTER_N_BG:
916 case CHARS_CYRILLIC_UPPER_LETTER_RU:
922 case CHARS_CYRILLIC_LOWER_LETTER_RU:
927 case CHARS_CYRILLIC_UPPER_LETTER_N_RU:
933 case CHARS_CYRILLIC_LOWER_LETTER_N_RU:
938 case CHARS_CYRILLIC_UPPER_LETTER_SR:
944 case CHARS_CYRILLIC_LOWER_LETTER_SR:
949 case CHARS_CYRILLIC_UPPER_LETTER_N_SR:
955 case CHARS_CYRILLIC_LOWER_LETTER_N_SR:
961 case CHARS_GREEK_LOWER_LETTER:
965 case CHARS_GREEK_UPPER_LETTER:
973 case CHARS_PERSIAN_WORD:
998 natNum = NativeNumberMode::NATNUM12;
999 locale.Language =
"hu-Hung";
1004 throw IllegalArgumentException();
1010 result +=
mxNatNum->getNativeNumberStringParams(OUString::number(number), locale,
1011 natNum, sNatNumParams);
1012 }
else if (tableSize) {
1013 if ( number > tableSize && !bRecycleSymbol)
1014 result += OUString::number( number);
1016 result += OUStringChar(
table[--number % tableSize]);
1025#define LANG_ALL (1 << 0)
1026#define LANG_CJK (1 << 1)
1027#define LANG_CTL (1 << 2)
1039 {style::NumberingType::CHARS_UPPER_LETTER,
"A",
LANG_ALL},
1040 {style::NumberingType::CHARS_LOWER_LETTER,
"a",
LANG_ALL},
1041 {style::NumberingType::ROMAN_UPPER,
"I",
LANG_ALL},
1042 {style::NumberingType::ROMAN_LOWER,
"i",
LANG_ALL},
1043 {style::NumberingType::ARABIC,
"1",
LANG_ALL},
1044 {style::NumberingType::NUMBER_NONE,
"''",
LANG_ALL},
1045 {style::NumberingType::CHAR_SPECIAL,
"Bullet",
LANG_ALL},
1046 {style::NumberingType::PAGE_DESCRIPTOR,
"Page",
LANG_ALL},
1047 {style::NumberingType::BITMAP,
"Bitmap",
LANG_ALL},
1049 {style::NumberingType::TEXT_NUMBER,
"1st",
LANG_ALL},
1050 {style::NumberingType::TEXT_CARDINAL,
"One",
LANG_ALL},
1051 {style::NumberingType::TEXT_ORDINAL,
"First",
LANG_ALL},
1052 {style::NumberingType::CHARS_UPPER_LETTER_N,
"AAA",
LANG_ALL},
1053 {style::NumberingType::CHARS_LOWER_LETTER_N,
"aaa",
LANG_ALL},
1054 {style::NumberingType::NATIVE_NUMBERING,
"Native Numbering",
LANG_CJK|
LANG_CTL},
1055 {style::NumberingType::FULLWIDTH_ARABIC,
nullptr,
LANG_CJK},
1056 {style::NumberingType::CIRCLE_NUMBER,
nullptr,
LANG_CJK},
1059 {style::NumberingType::NUMBER_LOWER_ZH,
"一, 二, 三, ...",
LANG_CJK},
1060 {style::NumberingType::NUMBER_UPPER_ZH,
nullptr,
LANG_CJK},
1061 {style::NumberingType::NUMBER_UPPER_ZH_TW,
nullptr,
LANG_CJK},
1062 {style::NumberingType::TIAN_GAN_ZH,
nullptr,
LANG_CJK},
1063 {style::NumberingType::DI_ZI_ZH,
nullptr,
LANG_CJK},
1064 {style::NumberingType::NUMBER_TRADITIONAL_JA,
nullptr,
LANG_CJK},
1065 {style::NumberingType::AIU_FULLWIDTH_JA,
nullptr,
LANG_CJK},
1066 {style::NumberingType::AIU_HALFWIDTH_JA,
nullptr,
LANG_CJK},
1067 {style::NumberingType::IROHA_FULLWIDTH_JA,
nullptr,
LANG_CJK},
1068 {style::NumberingType::IROHA_HALFWIDTH_JA,
nullptr,
LANG_CJK},
1069 {style::NumberingType::NUMBER_UPPER_KO,
nullptr,
LANG_CJK},
1070 {style::NumberingType::NUMBER_HANGUL_KO,
nullptr,
LANG_CJK},
1071 {style::NumberingType::HANGUL_JAMO_KO,
nullptr,
LANG_CJK},
1072 {style::NumberingType::HANGUL_SYLLABLE_KO,
nullptr,
LANG_CJK},
1073 {style::NumberingType::HANGUL_CIRCLED_JAMO_KO,
nullptr,
LANG_CJK},
1074 {style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO,
nullptr,
LANG_CJK},
1075 {style::NumberingType::NUMBER_LEGAL_KO,
nullptr,
LANG_CJK},
1076 {style::NumberingType::NUMBER_DIGITAL_KO,
nullptr,
LANG_CJK},
1077 {style::NumberingType::NUMBER_DIGITAL2_KO,
nullptr,
LANG_CJK},
1078 {style::NumberingType::CHARS_ARABIC,
nullptr,
LANG_CTL},
1079 {style::NumberingType::CHARS_ARABIC_ABJAD,
nullptr,
LANG_CTL},
1083 {style::NumberingType::CHARS_THAI,
nullptr,
LANG_CTL},
1084 {style::NumberingType::CHARS_HEBREW,
nullptr,
LANG_CTL},
1086 {style::NumberingType::CHARS_NEPALI,
nullptr,
LANG_CTL},
1087 {style::NumberingType::CHARS_KHMER,
nullptr,
LANG_CTL},
1088 {style::NumberingType::CHARS_LAO,
nullptr,
LANG_CTL},
1089 {style::NumberingType::CHARS_MYANMAR,
nullptr,
LANG_CTL},
1090 {style::NumberingType::CHARS_TIBETAN,
nullptr,
LANG_CTL},
1103 {style::NumberingType::CHARS_PERSIAN,
nullptr,
LANG_CTL},
1104 {style::NumberingType::CHARS_PERSIAN_WORD,
nullptr,
LANG_CTL},
1105 {style::NumberingType::SZEKELY_ROVAS,
nullptr,
LANG_CTL},
1108 {style::NumberingType::ARABIC_ZERO,
"01, 02, 03, ...",
LANG_ALL},
1109 {style::NumberingType::ARABIC_ZERO3,
"001, 002, 003, ...",
LANG_ALL},
1110 {style::NumberingType::ARABIC_ZERO4,
"0001, 0002, 0003, ...",
LANG_ALL},
1111 {style::NumberingType::ARABIC_ZERO5,
"00001, 00002, 00003, ...",
LANG_ALL},
1124 Locale aLocale(
"en", OUString(), OUString());
1126 auto aPropertiesRange = asNonConstRange(
aProperties);
1127 aPropertiesRange[0].Name =
"NumberingType";
1129 aPropertiesRange[1].Name =
"Value";
1130 for (sal_Int32 j = 1; j <= 3; j++) {
1131 aPropertiesRange[1].Value <<= j;
1142 case css::style::NumberingType::NUMBER_DIGITAL_KO:
1144 result.append(
" (ko-x-digital)");
1146 case css::style::NumberingType::NUMBER_DIGITAL2_KO:
1153 return result.makeStringAndClear();
1162 configuration::theDefaultProvider::get(
m_xContext);
1164 if (! xConfigProvider.is())
1169 {
"nodepath",
uno::Any(OUString(
"/org.openoffice.Office.Common/I18N"))}
1173 "com.sun.star.configuration.ConfigurationAccess", aArgs);
1180 bool enabled =
false;
1182 aEnabled >>= enabled;
1190 sal_Int16* pArray = aRet.getArray();
1208 return it->second->nType;
1242 return "com.sun.star.text.DefaultNumberingProvider";
1258extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
1260 css::uno::XComponentContext *context,
1261 css::uno::Sequence<css::uno::Any>
const &)
Reference< XComponentContext > m_xContext
PropertiesInfo aProperties
std::map< OUString, const Supported_NumberingType * > maSupportedTypesCache
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedNumberingTypes() override
virtual OUString SAL_CALL getNumberingIdentifier(sal_Int16 NumberingType) override
bool isScriptFlagEnabled(const OUString &aName)
virtual sal_Bool SAL_CALL hasNumberingType(const OUString &NumberingIdentifier) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
css::uno::Reference< css::container::XHierarchicalNameAccess > xHierarchicalNameAccess
DefaultNumberingProvider(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual sal_Int16 SAL_CALL getNumberingType(const OUString &NumberingIdentifier) override
OUString makeNumberingIdentifier(sal_Int16 index)
virtual ~DefaultNumberingProvider() override
rtl::Reference< TransliterationImpl > translit
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
rtl::Reference< NativeNumberSupplierService > mxNatNum
virtual css::uno::Sequence< css::uno::Reference< css::container::XIndexAccess > > SAL_CALL getDefaultOutlineNumberings(const css::lang::Locale &aLocale) override
virtual OUString SAL_CALL makeNumberingString(const css::uno::Sequence< css::beans::PropertyValue > &aProperties, const css::lang::Locale &aLocale) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getDefaultContinuousNumberingLevels(const css::lang::Locale &aLocale) override
static rtl::Reference< LocaleDataImpl > get()
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_text_DefaultNumberingProvider_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
#define SAL_N_ELEMENTS(arr)
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Constant values shared between i18npool and, for example, the number formatter.
static void lcl_formatChars1(const sal_Unicode table[], int tableSize, int n, OUString &s)
const sal_Unicode lowerLetter[]
const sal_Unicode table_PersianWord_decade2[][6]
const sal_Unicode table_PersianWord_decadeX[][8]
const sal_Unicode table_CyrillicLowerLetter_sr[]
const sal_Unicode table_HangulCircledJamo_ko[]
const sal_Unicode table_CyrillicLowerLetter_ru[]
const Supported_NumberingType aSupportedTypes[]
const sal_Unicode table_Alphabet_my[]
static void lcl_formatChars3(const sal_Unicode table_capital[], const sal_Unicode table_small[], int tableSize, int n, OUString &s)
const sal_Unicode table_HangulCircledSyllable_ko[]
const sal_Unicode table_Alphabet_fa[]
const sal_Unicode table_TianGan_zh[]
const sal_Unicode table_CyrillicUpperLetter_ru[]
const sal_Unicode table_GreekUpperLetter[]
const sal_Unicode table_IROHAFullWidth_ja_JP[]
static bool should_ignore(std::u16string_view s)
const sal_Unicode table_AIUHalfWidth_ja_JP[]
const sal_Unicode table_Alphabet_lo[]
static OUString toRoman(sal_Int32 n)
const sal_Unicode table_HangulJamo_ko[]
const sal_Unicode table_Alphabet_ar[]
const sal_Unicode table_KoreanLegalWord_decade1[][3]
const sal_Unicode table_PersianWord_decade1[][7]
const sal_Unicode table_KoreanLegalWord_decade2[][3]
const sal_Unicode table_AIUFullWidth_ja_JP[]
const sal_Unicode table_PersianWord_decade3[][7]
const sal_Int32 nSupported_NumberingTypes
const sal_Unicode table_Alphabet_he[]
static void lcl_formatChars(const sal_Unicode table[], int tableSize, int n, OUString &s)
const sal_Unicode table_Alphabet_km[]
const sal_Unicode table_Alphabet_ne[]
static void lcl_formatPersianWord(sal_Int32 nNumber, OUString &rsResult)
Returns number's representation in persian words up to 999999999999 respectively limited by sal_Int32...
const sal_Unicode table_HangulSyllable_ko[]
const sal_Unicode table_CyrillicUpperLetter_sr[]
const sal_Unicode table_CyrillicLowerLetter_bg[]
static void lcl_formatCharsGR(const sal_Unicode table[], int n, OUString &s)
static OUString lcl_formatArabicZero(sal_Int32 nNumber, sal_Int32 nLimit)
Turn nNumber into a string and pad the result to nLimit by inserting zero characters at the start.
static void lcl_formatChars2(const sal_Unicode table_capital[], const sal_Unicode table_small[], int tableSize, int n, OUString &s)
static OUString gr_smallNum(const sal_Unicode table[], int n)
const sal_Unicode table_Alphabet_dz[]
const sal_Unicode upperLetter[]
const sal_Unicode table_Alphabet_ar_abjad[]
const sal_Unicode table_IROHAHalfWidth_ja_JP[]
const sal_Unicode table_DiZi_zh[]
const sal_Unicode table_GreekLowerLetter[]
static void lcl_formatKoreanLegalWord(sal_Int32 nNumber, OUString &rsResult)
const sal_Unicode table_Alphabet_th[]
const sal_Unicode table_CircledNumber[]
const sal_Unicode table_Chicago[]
const sal_Unicode table_CyrillicUpperLetter_bg[]
static Any getPropertyByName(const Sequence< beans::PropertyValue > &aProperties, const char *name)
Supported_NumberingType(sal_Int16 nType_, const char *pSymbol, sal_Int16 opt)
std::unique_ptr< char[]> aBuffer