bump product version to 6.3.0.0.beta1
[LibreOffice.git] / i18npool / source / registerservices / registerservices.cxx
blobf6c187c83a56905b1abd6cfdc3bbd786006359cd
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <config_locales.h>
22 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
24 #include <comphelper/processfactory.hxx>
25 #include <cppuhelper/factory.hxx>
26 #include <cppuhelper/weak.hxx>
28 #include <servicename.hxx>
30 #include <transliteration_body.hxx>
31 #include <transliteration_OneToOne.hxx>
32 #include <textToPronounce_zh.hxx>
33 #include <numtotext_cjk.hxx>
34 #include <numtochar.hxx>
35 #include <texttonum.hxx>
36 #include <chartonum.hxx>
38 #include <calendarImpl.hxx>
39 #include <calendar_gregorian.hxx>
40 #include <calendar_hijri.hxx>
41 #include <calendar_jewish.hxx>
43 #include <breakiterator_cjk.hxx>
44 #include <breakiterator_th.hxx>
46 #include <indexentrysupplier.hxx>
47 #include <indexentrysupplier_asian.hxx>
48 #include <indexentrysupplier_ja_phonetic.hxx>
49 #include <indexentrysupplier_default.hxx>
51 #include <chaptercollator.hxx>
52 #include <collator_unicode.hxx>
54 #include <inputsequencechecker_th.hxx>
55 #include <inputsequencechecker_hi.hxx>
57 #include <textconversion.hxx>
59 using namespace ::com::sun::star;
60 using namespace ::com::sun::star::i18n;
61 using namespace i18npool;
63 #define IMPL_CREATEINSTANCE( ImplName ) \
64 static uno::Reference< uno::XInterface > \
65 ImplName##_CreateInstance( \
66 SAL_UNUSED_PARAMETER const uno::Reference< \
67 lang::XMultiServiceFactory >& ) \
68 { \
69 return uno::Reference < \
70 uno::XInterface >( static_cast<cppu::OWeakObject*>( \
71 new ImplName) ); \
74 #define IMPL_CREATEINSTANCE_CTX( ImplName ) \
75 static uno::Reference< uno::XInterface > \
76 ImplName##_CreateInstance( \
77 const uno::Reference< \
78 lang::XMultiServiceFactory >& rxMSF ) \
79 { \
80 return uno::Reference < \
81 uno::XInterface >( static_cast<cppu::OWeakObject*>( \
82 new ImplName( comphelper::getComponentContext(rxMSF) )) ); \
85 typedef uno::Reference<
86 uno::XInterface > (*FN_CreateInstance)(
87 const uno::Reference<
88 lang::XMultiServiceFactory >& );
90 #define IMPL_TRANSLITERATION_ITEM( implName ) \
91 { TRLT_SERVICELNAME_L10N, \
92 TRLT_IMPLNAME_PREFIX #implName, \
93 &implName##_CreateInstance }
96 // At least for iOS it doesn't hurt if we have lots of functions here
97 // generated by these lovely macros that get compiled, but then no
98 // references to them thanks to the WITH_LOCALE ifdefs for the
99 // aInstances table below. The -dead_strip linker option will take
100 // care of not linking these functions in. Presumably the same holds
101 // for Android, too, as we use -ffunction-sections and
102 // -Wl,--gc_sections. It's mainly for iOS and Android that the
103 // --with-locales option is intended anyway.
105 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier )
106 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_asian )
107 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable )
108 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant )
109 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable )
110 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant )
111 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_Unicode )
112 IMPL_CREATEINSTANCE_CTX( CalendarImpl )
113 IMPL_CREATEINSTANCE( Calendar_gregorian )
114 IMPL_CREATEINSTANCE( Calendar_hanja )
115 IMPL_CREATEINSTANCE( Calendar_gengou )
116 IMPL_CREATEINSTANCE( Calendar_ROC )
117 IMPL_CREATEINSTANCE( Calendar_hijri )
118 IMPL_CREATEINSTANCE( Calendar_jewish )
119 IMPL_CREATEINSTANCE( Calendar_buddhist )
120 IMPL_CREATEINSTANCE( BreakIterator_ja )
121 IMPL_CREATEINSTANCE( BreakIterator_zh )
122 IMPL_CREATEINSTANCE( BreakIterator_zh_TW )
123 IMPL_CREATEINSTANCE( BreakIterator_ko )
124 IMPL_CREATEINSTANCE( BreakIterator_th )
125 IMPL_CREATEINSTANCE_CTX( ChapterCollator )
126 IMPL_CREATEINSTANCE( Collator_Unicode )
128 IMPL_CREATEINSTANCE( InputSequenceChecker_th )
129 IMPL_CREATEINSTANCE( InputSequenceChecker_hi )
131 IMPL_CREATEINSTANCE_CTX( TextConversion_ko )
132 IMPL_CREATEINSTANCE_CTX( TextConversion_zh )
134 IMPL_CREATEINSTANCE( Transliteration_u2l )
135 IMPL_CREATEINSTANCE( Transliteration_l2u )
136 IMPL_CREATEINSTANCE( Transliteration_sentencecase )
137 IMPL_CREATEINSTANCE( Transliteration_titlecase )
138 IMPL_CREATEINSTANCE( Transliteration_togglecase )
139 IMPL_CREATEINSTANCE( hiraganaToKatakana )
140 IMPL_CREATEINSTANCE( katakanaToHiragana )
141 IMPL_CREATEINSTANCE( fullwidthToHalfwidth )
142 IMPL_CREATEINSTANCE( halfwidthToFullwidth )
144 IMPL_CREATEINSTANCE( smallToLarge_ja_JP)
145 IMPL_CREATEINSTANCE( largeToSmall_ja_JP)
146 IMPL_CREATEINSTANCE( ignoreTraditionalKanji_ja_JP)
147 IMPL_CREATEINSTANCE( ignoreTraditionalKana_ja_JP)
148 IMPL_CREATEINSTANCE( ignoreMinusSign_ja_JP)
149 IMPL_CREATEINSTANCE( ignoreIterationMark_ja_JP)
150 IMPL_CREATEINSTANCE( ignoreSeparator_ja_JP)
151 IMPL_CREATEINSTANCE( ignoreZiZu_ja_JP)
152 IMPL_CREATEINSTANCE( ignoreBaFa_ja_JP)
153 IMPL_CREATEINSTANCE( ignoreTiJi_ja_JP)
154 IMPL_CREATEINSTANCE( ignoreHyuByu_ja_JP)
155 IMPL_CREATEINSTANCE( ignoreSeZe_ja_JP)
156 IMPL_CREATEINSTANCE( ignoreIandEfollowedByYa_ja_JP)
157 IMPL_CREATEINSTANCE( ignoreKiKuFollowedBySa_ja_JP)
158 IMPL_CREATEINSTANCE( ignoreSize_ja_JP)
159 IMPL_CREATEINSTANCE( ignoreProlongedSoundMark_ja_JP)
160 IMPL_CREATEINSTANCE( ignoreMiddleDot_ja_JP)
161 IMPL_CREATEINSTANCE( ignoreSpace_ja_JP)
162 IMPL_CREATEINSTANCE( ignoreDiacritics_CTL)
163 IMPL_CREATEINSTANCE( ignoreKashida_CTL)
165 IMPL_CREATEINSTANCE( TextToChuyin_zh_TW )
166 IMPL_CREATEINSTANCE( TextToPinyin_zh_CN )
168 IMPL_CREATEINSTANCE( NumToCharLower_zh_CN )
169 IMPL_CREATEINSTANCE( NumToCharUpper_zh_CN )
170 IMPL_CREATEINSTANCE( NumToCharLower_zh_TW )
171 IMPL_CREATEINSTANCE( NumToCharUpper_zh_TW )
172 IMPL_CREATEINSTANCE( NumToCharHalfwidth )
173 IMPL_CREATEINSTANCE( NumToCharFullwidth )
174 IMPL_CREATEINSTANCE( NumToCharKanjiShort_ja_JP )
175 IMPL_CREATEINSTANCE( NumToCharKanjiTraditional_ja_JP )
176 IMPL_CREATEINSTANCE( NumToCharHangul_ko )
177 IMPL_CREATEINSTANCE( NumToCharLower_ko )
178 IMPL_CREATEINSTANCE( NumToCharUpper_ko )
179 IMPL_CREATEINSTANCE( NumToCharIndic_ar )
180 IMPL_CREATEINSTANCE( NumToCharEastIndic_ar )
181 IMPL_CREATEINSTANCE( NumToCharIndic_hi )
182 IMPL_CREATEINSTANCE( NumToChar_th )
184 IMPL_CREATEINSTANCE( CharToNumLower_zh_CN )
185 IMPL_CREATEINSTANCE( CharToNumUpper_zh_CN )
186 IMPL_CREATEINSTANCE( CharToNumLower_zh_TW )
187 IMPL_CREATEINSTANCE( CharToNumUpper_zh_TW )
188 IMPL_CREATEINSTANCE( CharToNumFullwidth )
189 IMPL_CREATEINSTANCE( CharToNumKanjiShort_ja_JP )
190 IMPL_CREATEINSTANCE( CharToNumKanjiTraditional_ja_JP )
191 IMPL_CREATEINSTANCE( CharToNumHangul_ko )
192 IMPL_CREATEINSTANCE( CharToNumLower_ko )
193 IMPL_CREATEINSTANCE( CharToNumUpper_ko )
194 IMPL_CREATEINSTANCE( CharToNumIndic_ar )
195 IMPL_CREATEINSTANCE( CharToNumEastIndic_ar )
196 IMPL_CREATEINSTANCE( CharToNumIndic_hi )
197 IMPL_CREATEINSTANCE( CharToNum_th )
199 IMPL_CREATEINSTANCE( NumToTextLower_zh_CN )
200 IMPL_CREATEINSTANCE( NumToTextUpper_zh_CN )
201 IMPL_CREATEINSTANCE( NumToTextLower_zh_TW )
202 IMPL_CREATEINSTANCE( NumToTextUpper_zh_TW )
203 IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_CN )
204 IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_TW )
205 IMPL_CREATEINSTANCE( NumToTextFullwidth_ja_JP )
206 IMPL_CREATEINSTANCE( NumToTextFullwidth_ko )
207 IMPL_CREATEINSTANCE( NumToTextKanjiLongModern_ja_JP )
208 IMPL_CREATEINSTANCE( NumToTextKanjiLongTraditional_ja_JP )
209 IMPL_CREATEINSTANCE( NumToTextKanjiShortModern_ja_JP )
210 IMPL_CREATEINSTANCE( NumToTextKanjiShortTraditional_ja_JP )
211 IMPL_CREATEINSTANCE( NumToTextFormalHangul_ko )
212 IMPL_CREATEINSTANCE( NumToTextFormalLower_ko )
213 IMPL_CREATEINSTANCE( NumToTextFormalUpper_ko )
214 IMPL_CREATEINSTANCE( NumToTextInformalHangul_ko )
215 IMPL_CREATEINSTANCE( NumToTextInformalUpper_ko )
216 IMPL_CREATEINSTANCE( NumToTextInformalLower_ko )
218 IMPL_CREATEINSTANCE( TextToNumLower_zh_CN )
219 IMPL_CREATEINSTANCE( TextToNumUpper_zh_CN )
220 IMPL_CREATEINSTANCE( TextToNumLower_zh_TW )
221 IMPL_CREATEINSTANCE( TextToNumUpper_zh_TW )
222 IMPL_CREATEINSTANCE( TextToNumKanjiLongModern_ja_JP )
223 IMPL_CREATEINSTANCE( TextToNumKanjiLongTraditional_ja_JP )
224 IMPL_CREATEINSTANCE( TextToNumFormalHangul_ko )
225 IMPL_CREATEINSTANCE( TextToNumFormalLower_ko )
226 IMPL_CREATEINSTANCE( TextToNumFormalUpper_ko )
227 IMPL_CREATEINSTANCE( TextToNumInformalHangul_ko )
228 IMPL_CREATEINSTANCE( TextToNumInformalUpper_ko )
229 IMPL_CREATEINSTANCE( TextToNumInformalLower_ko )
231 IMPL_CREATEINSTANCE( NumToTextDate_zh )
232 IMPL_CREATEINSTANCE( NumToTextAIUFullWidth_ja_JP )
233 IMPL_CREATEINSTANCE( NumToTextAIUHalfWidth_ja_JP )
234 IMPL_CREATEINSTANCE( NumToTextIROHAFullWidth_ja_JP )
235 IMPL_CREATEINSTANCE( NumToTextIROHAHalfWidth_ja_JP )
236 IMPL_CREATEINSTANCE( NumToTextCircledNumber )
237 IMPL_CREATEINSTANCE( NumToTextHangulJamo_ko )
238 IMPL_CREATEINSTANCE( NumToTextHangulSyllable_ko )
239 IMPL_CREATEINSTANCE( NumToTextHangulCircledJamo_ko )
240 IMPL_CREATEINSTANCE( NumToTextHangulCircledSyllable_ko )
241 IMPL_CREATEINSTANCE( NumToTextTianGan_zh )
242 IMPL_CREATEINSTANCE( NumToTextDiZi_zh )
244 IMPL_CREATEINSTANCE( fullwidthKatakanaToHalfwidthKatakana )
245 IMPL_CREATEINSTANCE( halfwidthKatakanaToFullwidthKatakana )
246 IMPL_CREATEINSTANCE( fullwidthToHalfwidthLikeASC )
247 IMPL_CREATEINSTANCE( halfwidthToFullwidthLikeJIS )
249 static const struct InstancesArray {
250 const sal_Char* pServiceNm;
251 const sal_Char* pImplementationNm;
252 FN_CreateInstance pFn;
253 } aInstances[] = {
254 { "com.sun.star.i18n.IndexEntrySupplier",
255 "com.sun.star.i18n.IndexEntrySupplier",
256 &IndexEntrySupplier_CreateInstance },
257 { "com.sun.star.i18n.IndexEntrySupplier_asian",
258 "com.sun.star.i18n.IndexEntrySupplier_asian",
259 &IndexEntrySupplier_asian_CreateInstance },
260 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
261 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
262 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
263 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance },
264 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
265 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
266 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance },
267 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
268 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
269 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance },
270 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
271 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
272 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant_CreateInstance },
273 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
274 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
275 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance },
276 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
277 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
278 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant_CreateInstance },
279 #endif
280 { "com.sun.star.i18n.IndexEntrySupplier_Unicode",
281 "com.sun.star.i18n.IndexEntrySupplier_Unicode",
282 &IndexEntrySupplier_Unicode_CreateInstance },
283 { "com.sun.star.i18n.LocaleCalendar",
284 "com.sun.star.i18n.CalendarImpl",
285 &CalendarImpl_CreateInstance },
286 { "com.sun.star.i18n.LocaleCalendar2",
287 "com.sun.star.i18n.CalendarImpl",
288 &CalendarImpl_CreateInstance },
289 { "com.sun.star.i18n.Calendar_gregorian",
290 "com.sun.star.i18n.Calendar_gregorian",
291 &Calendar_gregorian_CreateInstance },
292 { "com.sun.star.i18n.Calendar_gengou",
293 "com.sun.star.i18n.Calendar_gengou",
294 &Calendar_gengou_CreateInstance },
295 { "com.sun.star.i18n.Calendar_ROC",
296 "com.sun.star.i18n.Calendar_ROC",
297 &Calendar_ROC_CreateInstance },
298 { "com.sun.star.i18n.Calendar_hanja_yoil",
299 "com.sun.star.i18n.Calendar_hanja_yoil",
300 &Calendar_hanja_CreateInstance },
301 { "com.sun.star.i18n.Calendar_hanja",
302 "com.sun.star.i18n.Calendar_hanja",
303 &Calendar_hanja_CreateInstance },
304 { "com.sun.star.i18n.Calendar_hijri",
305 "com.sun.star.i18n.Calendar_hijri",
306 &Calendar_hijri_CreateInstance },
307 { "com.sun.star.i18n.Calendar_jewish",
308 "com.sun.star.i18n.Calendar_jewish",
309 &Calendar_jewish_CreateInstance },
310 { "com.sun.star.i18n.Calendar_buddhist",
311 "com.sun.star.i18n.Calendar_buddhist",
312 &Calendar_buddhist_CreateInstance },
313 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
314 { "com.sun.star.i18n.BreakIterator_ja",
315 "com.sun.star.i18n.BreakIterator_ja",
316 &BreakIterator_ja_CreateInstance },
317 #endif
318 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
319 { "com.sun.star.i18n.BreakIterator_zh",
320 "com.sun.star.i18n.BreakIterator_zh",
321 &BreakIterator_zh_CreateInstance },
322 { "com.sun.star.i18n.BreakIterator_zh_TW",
323 "com.sun.star.i18n.BreakIterator_zh_TW",
324 &BreakIterator_zh_TW_CreateInstance },
325 #endif
326 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
327 { "com.sun.star.i18n.BreakIterator_ko",
328 "com.sun.star.i18n.BreakIterator_ko",
329 &BreakIterator_ko_CreateInstance },
330 #endif
331 #if WITH_LOCALE_ALL || WITH_LOCALE_th
332 { "com.sun.star.i18n.BreakIterator_th",
333 "com.sun.star.i18n.BreakIterator_th",
334 &BreakIterator_th_CreateInstance },
335 #endif
336 { "com.sun.star.i18n.ChapterCollator",
337 "com.sun.star.i18n.ChapterCollator",
338 &ChapterCollator_CreateInstance },
339 { "com.sun.star.i18n.Collator_Unicode",
340 "com.sun.star.i18n.Collator_Unicode",
341 &Collator_Unicode_CreateInstance },
342 #if WITH_LOCALE_ALL || WITH_LOCALE_th
343 { "com.sun.star.i18n.InputSequenceChecker_th",
344 "com.sun.star.i18n.InputSequenceChecker_th",
345 &InputSequenceChecker_th_CreateInstance },
346 #endif
347 #if WITH_LOCALE_ALL || WITH_LOCALE_hi
348 { "com.sun.star.i18n.InputSequenceChecker_hi",
349 "com.sun.star.i18n.InputSequenceChecker_hi",
350 &InputSequenceChecker_hi_CreateInstance },
351 #endif
352 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
353 { "com.sun.star.i18n.TextConversion_ko",
354 "com.sun.star.i18n.TextConversion_ko",
355 &TextConversion_ko_CreateInstance },
356 #endif
357 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
358 { "com.sun.star.i18n.TextConversion_zh",
359 "com.sun.star.i18n.TextConversion_zh",
360 &TextConversion_zh_CreateInstance },
361 #endif
362 { TRLT_SERVICELNAME_L10N,
363 TRLT_IMPLNAME_PREFIX "UPPERCASE_LOWERCASE",
364 &Transliteration_u2l_CreateInstance },
365 { TRLT_SERVICELNAME_L10N,
366 TRLT_IMPLNAME_PREFIX "LOWERCASE_UPPERCASE",
367 &Transliteration_l2u_CreateInstance },
368 { TRLT_SERVICELNAME_L10N,
369 TRLT_IMPLNAME_PREFIX "SENTENCE_CASE",
370 &Transliteration_sentencecase_CreateInstance },
371 { TRLT_SERVICELNAME_L10N,
372 TRLT_IMPLNAME_PREFIX "TITLE_CASE",
373 &Transliteration_titlecase_CreateInstance },
374 { TRLT_SERVICELNAME_L10N,
375 TRLT_IMPLNAME_PREFIX "TOGGLE_CASE",
376 &Transliteration_togglecase_CreateInstance },
377 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
378 { TRLT_SERVICELNAME_L10N,
379 TRLT_IMPLNAME_PREFIX "HIRAGANA_KATAKANA",
380 &hiraganaToKatakana_CreateInstance },
381 { TRLT_SERVICELNAME_L10N,
382 TRLT_IMPLNAME_PREFIX "KATAKANA_HIRAGANA",
383 &katakanaToHiragana_CreateInstance },
384 { TRLT_SERVICELNAME_L10N,
385 TRLT_IMPLNAME_PREFIX "FULLWIDTH_HALFWIDTH",
386 &fullwidthToHalfwidth_CreateInstance },
387 { TRLT_SERVICELNAME_L10N,
388 TRLT_IMPLNAME_PREFIX "HALFWIDTH_FULLWIDTH",
389 &halfwidthToFullwidth_CreateInstance },
390 #endif
391 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
392 IMPL_TRANSLITERATION_ITEM (smallToLarge_ja_JP),
393 IMPL_TRANSLITERATION_ITEM (largeToSmall_ja_JP),
394 IMPL_TRANSLITERATION_ITEM (ignoreTraditionalKanji_ja_JP),
395 IMPL_TRANSLITERATION_ITEM (ignoreTraditionalKana_ja_JP),
396 IMPL_TRANSLITERATION_ITEM (ignoreMinusSign_ja_JP),
397 IMPL_TRANSLITERATION_ITEM (ignoreIterationMark_ja_JP),
398 IMPL_TRANSLITERATION_ITEM (ignoreSeparator_ja_JP),
399 IMPL_TRANSLITERATION_ITEM (ignoreZiZu_ja_JP),
400 IMPL_TRANSLITERATION_ITEM (ignoreBaFa_ja_JP),
401 IMPL_TRANSLITERATION_ITEM (ignoreTiJi_ja_JP),
402 IMPL_TRANSLITERATION_ITEM (ignoreHyuByu_ja_JP),
403 IMPL_TRANSLITERATION_ITEM (ignoreSeZe_ja_JP),
404 IMPL_TRANSLITERATION_ITEM (ignoreIandEfollowedByYa_ja_JP),
405 IMPL_TRANSLITERATION_ITEM (ignoreKiKuFollowedBySa_ja_JP),
406 IMPL_TRANSLITERATION_ITEM (ignoreSize_ja_JP),
407 IMPL_TRANSLITERATION_ITEM (ignoreProlongedSoundMark_ja_JP),
408 IMPL_TRANSLITERATION_ITEM (ignoreMiddleDot_ja_JP),
409 IMPL_TRANSLITERATION_ITEM (ignoreSpace_ja_JP),
410 #endif
411 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
412 IMPL_TRANSLITERATION_ITEM (TextToPinyin_zh_CN),
413 IMPL_TRANSLITERATION_ITEM (TextToChuyin_zh_TW),
414 #endif
415 IMPL_TRANSLITERATION_ITEM( ignoreDiacritics_CTL),
416 IMPL_TRANSLITERATION_ITEM (ignoreKashida_CTL),
418 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
419 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_zh_CN),
420 IMPL_TRANSLITERATION_ITEM (NumToCharLower_zh_CN),
421 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_zh_TW),
422 IMPL_TRANSLITERATION_ITEM (NumToCharLower_zh_TW),
423 #endif
424 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
425 IMPL_TRANSLITERATION_ITEM (NumToCharHalfwidth),
426 IMPL_TRANSLITERATION_ITEM (NumToCharFullwidth),
427 IMPL_TRANSLITERATION_ITEM (NumToCharKanjiShort_ja_JP),
428 IMPL_TRANSLITERATION_ITEM (NumToCharKanjiTraditional_ja_JP),
429 #endif
430 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
431 IMPL_TRANSLITERATION_ITEM (NumToCharLower_ko),
432 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_ko),
433 IMPL_TRANSLITERATION_ITEM (NumToCharHangul_ko),
434 #endif
435 IMPL_TRANSLITERATION_ITEM (NumToCharIndic_ar),
436 IMPL_TRANSLITERATION_ITEM (NumToCharEastIndic_ar),
437 #if WITH_LOCALE_ALL || WITH_LOCALE_hi
438 IMPL_TRANSLITERATION_ITEM (NumToCharIndic_hi),
439 #endif
440 #if WITH_LOCALE_ALL || WITH_LOCALE_th
441 IMPL_TRANSLITERATION_ITEM (NumToChar_th),
442 #endif
444 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
445 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_zh_CN),
446 IMPL_TRANSLITERATION_ITEM (CharToNumLower_zh_CN),
447 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_zh_TW),
448 IMPL_TRANSLITERATION_ITEM (CharToNumLower_zh_TW),
449 #endif
450 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
451 IMPL_TRANSLITERATION_ITEM (CharToNumFullwidth),
452 IMPL_TRANSLITERATION_ITEM (CharToNumKanjiShort_ja_JP),
453 IMPL_TRANSLITERATION_ITEM (CharToNumKanjiTraditional_ja_JP),
454 #endif
455 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
456 IMPL_TRANSLITERATION_ITEM (CharToNumLower_ko),
457 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_ko),
458 IMPL_TRANSLITERATION_ITEM (CharToNumHangul_ko),
459 #endif
460 IMPL_TRANSLITERATION_ITEM (CharToNumIndic_ar),
461 IMPL_TRANSLITERATION_ITEM (CharToNumEastIndic_ar),
462 #if WITH_LOCALE_ALL || WITH_LOCALE_hi
463 IMPL_TRANSLITERATION_ITEM (CharToNumIndic_hi),
464 #endif
465 #if WITH_LOCALE_ALL || WITH_LOCALE_th
466 IMPL_TRANSLITERATION_ITEM (CharToNum_th),
467 #endif
469 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
470 IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_CN),
471 IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_CN),
472 IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_TW),
473 IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_TW),
474 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_CN),
475 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_TW),
476 #endif
477 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
478 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_ja_JP),
479 #endif
480 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
481 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_ko),
482 #endif
483 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
484 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiLongModern_ja_JP),
485 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiLongTraditional_ja_JP),
486 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiShortModern_ja_JP),
487 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiShortTraditional_ja_JP),
488 #endif
489 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
490 IMPL_TRANSLITERATION_ITEM (NumToTextInformalHangul_ko),
491 IMPL_TRANSLITERATION_ITEM (NumToTextInformalLower_ko),
492 IMPL_TRANSLITERATION_ITEM (NumToTextInformalUpper_ko),
493 IMPL_TRANSLITERATION_ITEM (NumToTextFormalHangul_ko),
494 IMPL_TRANSLITERATION_ITEM (NumToTextFormalLower_ko),
495 IMPL_TRANSLITERATION_ITEM (NumToTextFormalUpper_ko),
496 #endif
498 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
499 IMPL_TRANSLITERATION_ITEM (TextToNumUpper_zh_CN),
500 IMPL_TRANSLITERATION_ITEM (TextToNumLower_zh_CN),
501 IMPL_TRANSLITERATION_ITEM (TextToNumUpper_zh_TW),
502 IMPL_TRANSLITERATION_ITEM (TextToNumLower_zh_TW),
503 #endif
504 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
505 IMPL_TRANSLITERATION_ITEM (TextToNumKanjiLongModern_ja_JP),
506 IMPL_TRANSLITERATION_ITEM (TextToNumKanjiLongTraditional_ja_JP),
507 #endif
508 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
509 IMPL_TRANSLITERATION_ITEM (TextToNumInformalHangul_ko),
510 IMPL_TRANSLITERATION_ITEM (TextToNumInformalLower_ko),
511 IMPL_TRANSLITERATION_ITEM (TextToNumInformalUpper_ko),
512 IMPL_TRANSLITERATION_ITEM (TextToNumFormalHangul_ko),
513 IMPL_TRANSLITERATION_ITEM (TextToNumFormalLower_ko),
514 IMPL_TRANSLITERATION_ITEM (TextToNumFormalUpper_ko),
515 #endif
517 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
518 IMPL_TRANSLITERATION_ITEM (NumToTextDate_zh),
519 #endif
520 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
521 IMPL_TRANSLITERATION_ITEM (NumToTextAIUFullWidth_ja_JP),
522 IMPL_TRANSLITERATION_ITEM (NumToTextAIUHalfWidth_ja_JP),
523 IMPL_TRANSLITERATION_ITEM (NumToTextIROHAFullWidth_ja_JP),
524 IMPL_TRANSLITERATION_ITEM (NumToTextIROHAHalfWidth_ja_JP),
525 #endif
526 IMPL_TRANSLITERATION_ITEM (NumToTextCircledNumber),
527 #if WITH_LOCALE_ALL || WITH_LOCALE_ko
528 IMPL_TRANSLITERATION_ITEM (NumToTextHangulJamo_ko),
529 IMPL_TRANSLITERATION_ITEM (NumToTextHangulSyllable_ko),
530 IMPL_TRANSLITERATION_ITEM (NumToTextHangulCircledJamo_ko),
531 IMPL_TRANSLITERATION_ITEM (NumToTextHangulCircledSyllable_ko),
532 #endif
533 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
534 IMPL_TRANSLITERATION_ITEM (NumToTextTianGan_zh),
535 IMPL_TRANSLITERATION_ITEM (NumToTextDiZi_zh),
536 #endif
538 #if WITH_LOCALE_ALL || WITH_LOCALE_ja
539 { TRLT_SERVICELNAME_L10N,
540 TRLT_IMPLNAME_PREFIX "FULLWIDTHKATAKANA_HALFWIDTHKATAKANA",
541 &fullwidthKatakanaToHalfwidthKatakana_CreateInstance },
542 { TRLT_SERVICELNAME_L10N,
543 TRLT_IMPLNAME_PREFIX "HALFWIDTHKATAKANA_FULLWIDTHKATAKANA",
544 &halfwidthKatakanaToFullwidthKatakana_CreateInstance },
545 { TRLT_SERVICELNAME_L10N,
546 TRLT_IMPLNAME_PREFIX "FULLWIDTH_HALFWIDTH_LIKE_ASC",
547 &fullwidthToHalfwidthLikeASC_CreateInstance },
548 { TRLT_SERVICELNAME_L10N,
549 TRLT_IMPLNAME_PREFIX "HALFWIDTH_FULLWIDTH_LIKE_JIS",
550 &halfwidthToFullwidthLikeJIS_CreateInstance },
551 #endif
552 // add here new services !!
553 { nullptr, nullptr, nullptr }
557 extern "C"
560 SAL_DLLPUBLIC_EXPORT void* i18npool_component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, SAL_UNUSED_PARAMETER void* /*_pRegistryKey*/ )
562 void* pRet = nullptr;
564 lang::XMultiServiceFactory* pServiceManager =
565 static_cast< lang::XMultiServiceFactory* >( _pServiceManager );
566 uno::Reference< lang::XSingleServiceFactory > xFactory;
568 for( const InstancesArray* pArr = aInstances; pArr->pServiceNm; ++pArr )
570 if( 0 == rtl_str_compare( sImplementationName, pArr->pImplementationNm ) )
572 uno::Sequence< OUString > aServiceNames {
573 OUString::createFromAscii( pArr->pServiceNm ) };
574 xFactory = ::cppu::createSingleFactory(
575 pServiceManager,
576 OUString::createFromAscii( pArr->pImplementationNm ),
577 *pArr->pFn, aServiceNames );
578 break;
582 if ( xFactory.is() )
584 xFactory->acquire();
585 pRet = xFactory.get();
588 return pRet;
591 } // "C"
593 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */