bump product version to 4.1.6.2
[LibreOffice.git] / i18npool / source / registerservices / registerservices.cxx
blobb9c19b082bc5c666258f641d063e68d8907e1c81
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 <com/sun/star/lang/XSingleServiceFactory.hpp>
21 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
22 #include <com/sun/star/registry/XRegistryKey.hpp>
24 #include <comphelper/processfactory.hxx>
25 #include <cppuhelper/factory.hxx>
26 #include <cppuhelper/weak.hxx>
27 #include <osl/mutex.hxx>
29 #include <localedata.hxx>
30 #include <numberformatcode.hxx>
31 #include <nativenumbersupplier.hxx>
32 #include <defaultnumberingprovider.hxx>
33 #include <servicename.hxx>
35 #define TRANSLITERATION_ALL
36 #include <transliterationImpl.hxx>
37 #include <transliteration_body.hxx>
38 #include <transliteration_caseignore.hxx>
39 #include <transliteration_Ignore.hxx>
40 #include <transliteration_OneToOne.hxx>
41 #include <textToPronounce_zh.hxx>
42 #include <numtotext_cjk.hxx>
43 #include <numtochar.hxx>
44 #include <texttonum.hxx>
45 #include <chartonum.hxx>
47 #include <calendarImpl.hxx>
48 #include <calendar_gregorian.hxx>
49 #include <calendar_hijri.hxx>
50 #include <calendar_jewish.hxx>
52 #define BREAKITERATOR_ALL
53 #include <breakiteratorImpl.hxx>
54 #include <breakiterator_cjk.hxx>
55 #include <breakiterator_th.hxx>
56 #include <breakiterator_unicode.hxx>
58 #include <indexentrysupplier.hxx>
59 #include <indexentrysupplier_asian.hxx>
60 #include <indexentrysupplier_ja_phonetic.hxx>
61 #include <indexentrysupplier_common.hxx>
62 #include <indexentrysupplier_default.hxx>
64 #include <characterclassificationImpl.hxx>
65 #include <unoscripttypedetector.hxx>
66 #include <cclass_unicode.hxx>
68 #include <collatorImpl.hxx>
69 #include <chaptercollator.hxx>
70 #include <collator_unicode.hxx>
72 #include <inputsequencechecker.hxx>
73 #include <inputsequencechecker_th.hxx>
74 #include <inputsequencechecker_hi.hxx>
76 #include <textconversionImpl.hxx>
77 #include <textconversion.hxx>
79 #include <ordinalsuffix.hxx>
81 using namespace ::com::sun::star;
83 #define IMPL_CREATEINSTANCE( ImplName ) \
84 uno::Reference< uno::XInterface > \
85 SAL_CALL ImplName##_CreateInstance( \
86 SAL_UNUSED_PARAMETER const uno::Reference< \
87 lang::XMultiServiceFactory >& ) \
88 { \
89 return uno::Reference < \
90 uno::XInterface >( ( ::cppu::OWeakObject* ) \
91 new ImplName ); \
94 #define IMPL_CREATEINSTANCE_CTX( ImplName ) \
95 uno::Reference< uno::XInterface > \
96 SAL_CALL ImplName##_CreateInstance( \
97 const uno::Reference< \
98 lang::XMultiServiceFactory >& rxMSF ) \
99 { \
100 return uno::Reference < \
101 uno::XInterface >( ( ::cppu::OWeakObject* ) \
102 new ImplName( comphelper::getComponentContext(rxMSF) ) ); \
105 typedef uno::Reference<
106 uno::XInterface > (SAL_CALL *FN_CreateInstance)(
107 const uno::Reference<
108 lang::XMultiServiceFactory >& );
110 #define IMPL_TRANSLITERATION_ITEM( implName ) \
111 { TRLT_SERVICELNAME_L10N, \
112 TRLT_IMPLNAME_PREFIX #implName, \
113 &implName##_CreateInstance }
115 // -------------------------------------------------------------------------------------
117 using namespace i18n;
119 IMPL_CREATEINSTANCE_CTX( NumberFormatCodeMapper )
120 IMPL_CREATEINSTANCE( NativeNumberSupplier )
121 IMPL_CREATEINSTANCE( LocaleData )
122 IMPL_CREATEINSTANCE_CTX( DefaultNumberingProvider )
123 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier )
124 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_asian )
125 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable )
126 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant )
127 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable )
128 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant )
129 IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_Unicode )
130 IMPL_CREATEINSTANCE_CTX( CalendarImpl )
131 IMPL_CREATEINSTANCE( Calendar_gregorian )
132 IMPL_CREATEINSTANCE( Calendar_hanja )
133 IMPL_CREATEINSTANCE( Calendar_gengou )
134 IMPL_CREATEINSTANCE( Calendar_ROC )
135 IMPL_CREATEINSTANCE( Calendar_hijri )
136 IMPL_CREATEINSTANCE( Calendar_jewish )
137 IMPL_CREATEINSTANCE( Calendar_buddhist )
138 IMPL_CREATEINSTANCE_CTX( BreakIteratorImpl )
139 IMPL_CREATEINSTANCE( BreakIterator_Unicode )
140 IMPL_CREATEINSTANCE( BreakIterator_ja )
141 IMPL_CREATEINSTANCE( BreakIterator_zh )
142 IMPL_CREATEINSTANCE( BreakIterator_zh_TW )
143 IMPL_CREATEINSTANCE( BreakIterator_ko )
144 IMPL_CREATEINSTANCE( BreakIterator_th )
145 IMPL_CREATEINSTANCE_CTX( ChapterCollator )
146 IMPL_CREATEINSTANCE_CTX( CollatorImpl )
147 IMPL_CREATEINSTANCE( Collator_Unicode )
149 IMPL_CREATEINSTANCE_CTX( CharacterClassificationImpl )
150 IMPL_CREATEINSTANCE_CTX( cclass_Unicode )
151 IMPL_CREATEINSTANCE_CTX( TransliterationImpl )
152 IMPL_CREATEINSTANCE( UnoScriptTypeDetector )
154 IMPL_CREATEINSTANCE_CTX( InputSequenceCheckerImpl )
155 IMPL_CREATEINSTANCE( InputSequenceChecker_th )
156 IMPL_CREATEINSTANCE( InputSequenceChecker_hi )
158 IMPL_CREATEINSTANCE_CTX( TextConversionImpl )
159 IMPL_CREATEINSTANCE_CTX( TextConversion_ko )
160 IMPL_CREATEINSTANCE_CTX( TextConversion_zh )
162 IMPL_CREATEINSTANCE( Transliteration_u2l )
163 IMPL_CREATEINSTANCE( Transliteration_l2u )
164 IMPL_CREATEINSTANCE( Transliteration_sentencecase )
165 IMPL_CREATEINSTANCE( Transliteration_titlecase )
166 IMPL_CREATEINSTANCE( Transliteration_togglecase )
167 IMPL_CREATEINSTANCE( Transliteration_caseignore )
168 IMPL_CREATEINSTANCE( hiraganaToKatakana )
169 IMPL_CREATEINSTANCE( katakanaToHiragana )
170 IMPL_CREATEINSTANCE( ignoreKana )
171 IMPL_CREATEINSTANCE( fullwidthToHalfwidth )
172 IMPL_CREATEINSTANCE( halfwidthToFullwidth )
173 IMPL_CREATEINSTANCE( ignoreWidth )
175 IMPL_CREATEINSTANCE( smallToLarge_ja_JP)
176 IMPL_CREATEINSTANCE( largeToSmall_ja_JP)
177 IMPL_CREATEINSTANCE( ignoreTraditionalKanji_ja_JP)
178 IMPL_CREATEINSTANCE( ignoreTraditionalKana_ja_JP)
179 IMPL_CREATEINSTANCE( ignoreMinusSign_ja_JP)
180 IMPL_CREATEINSTANCE( ignoreIterationMark_ja_JP)
181 IMPL_CREATEINSTANCE( ignoreSeparator_ja_JP)
182 IMPL_CREATEINSTANCE( ignoreZiZu_ja_JP)
183 IMPL_CREATEINSTANCE( ignoreBaFa_ja_JP)
184 IMPL_CREATEINSTANCE( ignoreTiJi_ja_JP)
185 IMPL_CREATEINSTANCE( ignoreHyuByu_ja_JP)
186 IMPL_CREATEINSTANCE( ignoreSeZe_ja_JP)
187 IMPL_CREATEINSTANCE( ignoreIandEfollowedByYa_ja_JP)
188 IMPL_CREATEINSTANCE( ignoreKiKuFollowedBySa_ja_JP)
189 IMPL_CREATEINSTANCE( ignoreSize_ja_JP)
190 IMPL_CREATEINSTANCE( ignoreProlongedSoundMark_ja_JP)
191 IMPL_CREATEINSTANCE( ignoreMiddleDot_ja_JP)
192 IMPL_CREATEINSTANCE( ignoreSpace_ja_JP)
194 IMPL_CREATEINSTANCE( TextToChuyin_zh_TW )
195 IMPL_CREATEINSTANCE( TextToPinyin_zh_CN )
197 IMPL_CREATEINSTANCE( NumToCharLower_zh_CN )
198 IMPL_CREATEINSTANCE( NumToCharUpper_zh_CN )
199 IMPL_CREATEINSTANCE( NumToCharLower_zh_TW )
200 IMPL_CREATEINSTANCE( NumToCharUpper_zh_TW )
201 IMPL_CREATEINSTANCE( NumToCharHalfwidth )
202 IMPL_CREATEINSTANCE( NumToCharFullwidth )
203 IMPL_CREATEINSTANCE( NumToCharKanjiShort_ja_JP )
204 IMPL_CREATEINSTANCE( NumToCharKanjiTraditional_ja_JP )
205 IMPL_CREATEINSTANCE( NumToCharHangul_ko )
206 IMPL_CREATEINSTANCE( NumToCharLower_ko )
207 IMPL_CREATEINSTANCE( NumToCharUpper_ko )
208 IMPL_CREATEINSTANCE( NumToCharIndic_ar )
209 IMPL_CREATEINSTANCE( NumToCharEastIndic_ar )
210 IMPL_CREATEINSTANCE( NumToCharIndic_hi )
211 IMPL_CREATEINSTANCE( NumToChar_th )
213 IMPL_CREATEINSTANCE( CharToNumLower_zh_CN )
214 IMPL_CREATEINSTANCE( CharToNumUpper_zh_CN )
215 IMPL_CREATEINSTANCE( CharToNumLower_zh_TW )
216 IMPL_CREATEINSTANCE( CharToNumUpper_zh_TW )
217 IMPL_CREATEINSTANCE( CharToNumFullwidth )
218 IMPL_CREATEINSTANCE( CharToNumKanjiShort_ja_JP )
219 IMPL_CREATEINSTANCE( CharToNumKanjiTraditional_ja_JP )
220 IMPL_CREATEINSTANCE( CharToNumHangul_ko )
221 IMPL_CREATEINSTANCE( CharToNumLower_ko )
222 IMPL_CREATEINSTANCE( CharToNumUpper_ko )
223 IMPL_CREATEINSTANCE( CharToNumIndic_ar )
224 IMPL_CREATEINSTANCE( CharToNumEastIndic_ar )
225 IMPL_CREATEINSTANCE( CharToNumIndic_hi )
226 IMPL_CREATEINSTANCE( CharToNum_th )
228 IMPL_CREATEINSTANCE( NumToTextLower_zh_CN )
229 IMPL_CREATEINSTANCE( NumToTextUpper_zh_CN )
230 IMPL_CREATEINSTANCE( NumToTextLower_zh_TW )
231 IMPL_CREATEINSTANCE( NumToTextUpper_zh_TW )
232 IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_CN )
233 IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_TW )
234 IMPL_CREATEINSTANCE( NumToTextFullwidth_ja_JP )
235 IMPL_CREATEINSTANCE( NumToTextFullwidth_ko )
236 IMPL_CREATEINSTANCE( NumToTextKanjiLongModern_ja_JP )
237 IMPL_CREATEINSTANCE( NumToTextKanjiLongTraditional_ja_JP )
238 IMPL_CREATEINSTANCE( NumToTextKanjiShortModern_ja_JP )
239 IMPL_CREATEINSTANCE( NumToTextKanjiShortTraditional_ja_JP )
240 IMPL_CREATEINSTANCE( NumToTextFormalHangul_ko )
241 IMPL_CREATEINSTANCE( NumToTextFormalLower_ko )
242 IMPL_CREATEINSTANCE( NumToTextFormalUpper_ko )
243 IMPL_CREATEINSTANCE( NumToTextInformalHangul_ko )
244 IMPL_CREATEINSTANCE( NumToTextInformalUpper_ko )
245 IMPL_CREATEINSTANCE( NumToTextInformalLower_ko )
247 IMPL_CREATEINSTANCE( TextToNumLower_zh_CN )
248 IMPL_CREATEINSTANCE( TextToNumUpper_zh_CN )
249 IMPL_CREATEINSTANCE( TextToNumLower_zh_TW )
250 IMPL_CREATEINSTANCE( TextToNumUpper_zh_TW )
251 IMPL_CREATEINSTANCE( TextToNumKanjiLongModern_ja_JP )
252 IMPL_CREATEINSTANCE( TextToNumKanjiLongTraditional_ja_JP )
253 IMPL_CREATEINSTANCE( TextToNumFormalHangul_ko )
254 IMPL_CREATEINSTANCE( TextToNumFormalLower_ko )
255 IMPL_CREATEINSTANCE( TextToNumFormalUpper_ko )
256 IMPL_CREATEINSTANCE( TextToNumInformalHangul_ko )
257 IMPL_CREATEINSTANCE( TextToNumInformalUpper_ko )
258 IMPL_CREATEINSTANCE( TextToNumInformalLower_ko )
260 IMPL_CREATEINSTANCE( NumToTextDate_zh )
261 IMPL_CREATEINSTANCE( NumToTextAIUFullWidth_ja_JP )
262 IMPL_CREATEINSTANCE( NumToTextAIUHalfWidth_ja_JP )
263 IMPL_CREATEINSTANCE( NumToTextIROHAFullWidth_ja_JP )
264 IMPL_CREATEINSTANCE( NumToTextIROHAHalfWidth_ja_JP )
265 IMPL_CREATEINSTANCE( NumToTextCircledNumber )
266 IMPL_CREATEINSTANCE( NumToTextHangulJamo_ko )
267 IMPL_CREATEINSTANCE( NumToTextHangulSyllable_ko )
268 IMPL_CREATEINSTANCE( NumToTextHangulCircledJamo_ko )
269 IMPL_CREATEINSTANCE( NumToTextHangulCircledSyllable_ko )
270 IMPL_CREATEINSTANCE( NumToTextTianGan_zh )
271 IMPL_CREATEINSTANCE( NumToTextDiZi_zh )
273 IMPL_CREATEINSTANCE( fullwidthKatakanaToHalfwidthKatakana )
274 IMPL_CREATEINSTANCE( halfwidthKatakanaToFullwidthKatakana )
275 IMPL_CREATEINSTANCE( fullwidthToHalfwidthLikeASC )
276 IMPL_CREATEINSTANCE( halfwidthToFullwidthLikeJIS )
278 IMPL_CREATEINSTANCE( OrdinalSuffix )
280 static const struct InstancesArray {
281 const sal_Char* pServiceNm;
282 const sal_Char* pImplementationNm;
283 FN_CreateInstance pFn;
284 } aInstances[] = {
285 { "com.sun.star.i18n.LocaleData",
286 "com.sun.star.i18n.LocaleData",
287 & LocaleData_CreateInstance },
288 { "com.sun.star.i18n.NumberFormatMapper",
289 "com.sun.star.i18n.NumberFormatCodeMapper",
290 & NumberFormatCodeMapper_CreateInstance },
291 { "com.sun.star.i18n.NativeNumberSupplier",
292 "com.sun.star.i18n.NativeNumberSupplier",
293 & NativeNumberSupplier_CreateInstance },
294 { "com.sun.star.text.DefaultNumberingProvider",
295 "com.sun.star.text.DefaultNumberingProvider",
296 &DefaultNumberingProvider_CreateInstance },
297 { "com.sun.star.i18n.IndexEntrySupplier",
298 "com.sun.star.i18n.IndexEntrySupplier",
299 &IndexEntrySupplier_CreateInstance },
300 { "com.sun.star.i18n.IndexEntrySupplier_asian",
301 "com.sun.star.i18n.IndexEntrySupplier_asian",
302 &IndexEntrySupplier_asian_CreateInstance },
303 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
304 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
305 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance },
306 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
307 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
308 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance },
309 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
310 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
311 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance },
312 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
313 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
314 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant_CreateInstance },
315 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
316 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
317 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance },
318 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
319 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
320 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant_CreateInstance },
321 { "com.sun.star.i18n.IndexEntrySupplier_Unicode",
322 "com.sun.star.i18n.IndexEntrySupplier_Unicode",
323 &IndexEntrySupplier_Unicode_CreateInstance },
324 { "com.sun.star.i18n.LocaleCalendar",
325 "com.sun.star.i18n.CalendarImpl",
326 &CalendarImpl_CreateInstance },
327 { "com.sun.star.i18n.Calendar_gregorian",
328 "com.sun.star.i18n.Calendar_gregorian",
329 &Calendar_gregorian_CreateInstance },
330 { "com.sun.star.i18n.Calendar_gengou",
331 "com.sun.star.i18n.Calendar_gengou",
332 &Calendar_gengou_CreateInstance },
333 { "com.sun.star.i18n.Calendar_ROC",
334 "com.sun.star.i18n.Calendar_ROC",
335 &Calendar_ROC_CreateInstance },
336 { "com.sun.star.i18n.Calendar_hanja_yoil",
337 "com.sun.star.i18n.Calendar_hanja_yoil",
338 &Calendar_hanja_CreateInstance },
339 { "com.sun.star.i18n.Calendar_hanja",
340 "com.sun.star.i18n.Calendar_hanja",
341 &Calendar_hanja_CreateInstance },
342 { "com.sun.star.i18n.Calendar_hijri",
343 "com.sun.star.i18n.Calendar_hijri",
344 &Calendar_hijri_CreateInstance },
345 { "com.sun.star.i18n.Calendar_jewish",
346 "com.sun.star.i18n.Calendar_jewish",
347 &Calendar_jewish_CreateInstance },
348 { "com.sun.star.i18n.Calendar_buddhist",
349 "com.sun.star.i18n.Calendar_buddhist",
350 &Calendar_buddhist_CreateInstance },
351 { "com.sun.star.i18n.BreakIterator",
352 "com.sun.star.i18n.BreakIterator",
353 &BreakIteratorImpl_CreateInstance },
354 { "com.sun.star.i18n.BreakIterator_Unicode",
355 "com.sun.star.i18n.BreakIterator_Unicode",
356 &BreakIterator_Unicode_CreateInstance },
357 { "com.sun.star.i18n.BreakIterator_ja",
358 "com.sun.star.i18n.BreakIterator_ja",
359 &BreakIterator_ja_CreateInstance },
360 { "com.sun.star.i18n.BreakIterator_zh",
361 "com.sun.star.i18n.BreakIterator_zh",
362 &BreakIterator_zh_CreateInstance },
363 { "com.sun.star.i18n.BreakIterator_zh_TW",
364 "com.sun.star.i18n.BreakIterator_zh_TW",
365 &BreakIterator_zh_TW_CreateInstance },
366 { "com.sun.star.i18n.BreakIterator_ko",
367 "com.sun.star.i18n.BreakIterator_ko",
368 &BreakIterator_ko_CreateInstance },
369 { "com.sun.star.i18n.BreakIterator_th",
370 "com.sun.star.i18n.BreakIterator_th",
371 &BreakIterator_th_CreateInstance },
372 { "com.sun.star.i18n.Collator",
373 "com.sun.star.i18n.Collator",
374 &CollatorImpl_CreateInstance },
375 { "com.sun.star.i18n.ChapterCollator",
376 "com.sun.star.i18n.ChapterCollator",
377 &ChapterCollator_CreateInstance },
378 { "com.sun.star.i18n.Collator_Unicode",
379 "com.sun.star.i18n.Collator_Unicode",
380 &Collator_Unicode_CreateInstance },
381 { "com.sun.star.i18n.ScriptTypeDetector",
382 "com.sun.star.i18n.ScriptTypeDetector",
383 &UnoScriptTypeDetector_CreateInstance },
384 { "com.sun.star.i18n.CharacterClassification",
385 "com.sun.star.i18n.CharacterClassification",
386 &CharacterClassificationImpl_CreateInstance },
387 { "com.sun.star.i18n.CharacterClassification_Unicode",
388 "com.sun.star.i18n.CharacterClassification_Unicode",
389 &cclass_Unicode_CreateInstance },
390 { "com.sun.star.i18n.InputSequenceChecker",
391 "com.sun.star.i18n.InputSequenceChecker",
392 &InputSequenceCheckerImpl_CreateInstance },
393 { "com.sun.star.i18n.InputSequenceChecker_th",
394 "com.sun.star.i18n.InputSequenceChecker_th",
395 &InputSequenceChecker_th_CreateInstance },
396 { "com.sun.star.i18n.InputSequenceChecker_hi",
397 "com.sun.star.i18n.InputSequenceChecker_hi",
398 &InputSequenceChecker_hi_CreateInstance },
399 { "com.sun.star.i18n.TextConversion",
400 "com.sun.star.i18n.TextConversion",
401 &TextConversionImpl_CreateInstance },
402 { "com.sun.star.i18n.TextConversion_ko",
403 "com.sun.star.i18n.TextConversion_ko",
404 &TextConversion_ko_CreateInstance },
405 { "com.sun.star.i18n.TextConversion_zh",
406 "com.sun.star.i18n.TextConversion_zh",
407 &TextConversion_zh_CreateInstance },
408 { TRLT_SERVICELNAME,
409 TRLT_IMPLNAME ,
410 &TransliterationImpl_CreateInstance },
411 { TRLT_SERVICELNAME_L10N,
412 TRLT_IMPLNAME_PREFIX "UPPERCASE_LOWERCASE",
413 &Transliteration_u2l_CreateInstance },
414 { TRLT_SERVICELNAME_L10N,
415 TRLT_IMPLNAME_PREFIX "LOWERCASE_UPPERCASE",
416 &Transliteration_l2u_CreateInstance },
417 { TRLT_SERVICELNAME_L10N,
418 TRLT_IMPLNAME_PREFIX "SENTENCE_CASE",
419 &Transliteration_sentencecase_CreateInstance },
420 { TRLT_SERVICELNAME_L10N,
421 TRLT_IMPLNAME_PREFIX "TITLE_CASE",
422 &Transliteration_titlecase_CreateInstance },
423 { TRLT_SERVICELNAME_L10N,
424 TRLT_IMPLNAME_PREFIX "TOGGLE_CASE",
425 &Transliteration_togglecase_CreateInstance },
426 { TRLT_SERVICELNAME_L10N,
427 TRLT_IMPLNAME_PREFIX "IGNORE_CASE",
428 &Transliteration_caseignore_CreateInstance },
429 { TRLT_SERVICELNAME_L10N,
430 TRLT_IMPLNAME_PREFIX "HIRAGANA_KATAKANA",
431 &hiraganaToKatakana_CreateInstance },
432 { TRLT_SERVICELNAME_L10N,
433 TRLT_IMPLNAME_PREFIX "KATAKANA_HIRAGANA",
434 &katakanaToHiragana_CreateInstance },
435 { TRLT_SERVICELNAME_L10N,
436 TRLT_IMPLNAME_PREFIX "IGNORE_KANA",
437 &ignoreKana_CreateInstance },
438 { TRLT_SERVICELNAME_L10N,
439 TRLT_IMPLNAME_PREFIX "FULLWIDTH_HALFWIDTH",
440 &fullwidthToHalfwidth_CreateInstance },
441 { TRLT_SERVICELNAME_L10N,
442 TRLT_IMPLNAME_PREFIX "HALFWIDTH_FULLWIDTH",
443 &halfwidthToFullwidth_CreateInstance },
444 { TRLT_SERVICELNAME_L10N,
445 TRLT_IMPLNAME_PREFIX "IGNORE_WIDTH",
446 &ignoreWidth_CreateInstance },
447 IMPL_TRANSLITERATION_ITEM (smallToLarge_ja_JP),
448 IMPL_TRANSLITERATION_ITEM (largeToSmall_ja_JP),
449 IMPL_TRANSLITERATION_ITEM (ignoreTraditionalKanji_ja_JP),
450 IMPL_TRANSLITERATION_ITEM (ignoreTraditionalKana_ja_JP),
451 IMPL_TRANSLITERATION_ITEM (ignoreKana),
452 IMPL_TRANSLITERATION_ITEM (ignoreMinusSign_ja_JP),
453 IMPL_TRANSLITERATION_ITEM (ignoreIterationMark_ja_JP),
454 IMPL_TRANSLITERATION_ITEM (ignoreSeparator_ja_JP),
455 IMPL_TRANSLITERATION_ITEM (ignoreZiZu_ja_JP),
456 IMPL_TRANSLITERATION_ITEM (ignoreBaFa_ja_JP),
457 IMPL_TRANSLITERATION_ITEM (ignoreTiJi_ja_JP),
458 IMPL_TRANSLITERATION_ITEM (ignoreHyuByu_ja_JP),
459 IMPL_TRANSLITERATION_ITEM (ignoreSeZe_ja_JP),
460 IMPL_TRANSLITERATION_ITEM (ignoreIandEfollowedByYa_ja_JP),
461 IMPL_TRANSLITERATION_ITEM (ignoreKiKuFollowedBySa_ja_JP),
462 IMPL_TRANSLITERATION_ITEM (ignoreSize_ja_JP),
463 IMPL_TRANSLITERATION_ITEM (ignoreProlongedSoundMark_ja_JP),
464 IMPL_TRANSLITERATION_ITEM (ignoreMiddleDot_ja_JP),
465 IMPL_TRANSLITERATION_ITEM (ignoreSpace_ja_JP),
466 IMPL_TRANSLITERATION_ITEM (TextToPinyin_zh_CN),
467 IMPL_TRANSLITERATION_ITEM (TextToChuyin_zh_TW),
469 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_zh_CN),
470 IMPL_TRANSLITERATION_ITEM (NumToCharLower_zh_CN),
471 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_zh_TW),
472 IMPL_TRANSLITERATION_ITEM (NumToCharLower_zh_TW),
473 IMPL_TRANSLITERATION_ITEM (NumToCharHalfwidth),
474 IMPL_TRANSLITERATION_ITEM (NumToCharFullwidth),
475 IMPL_TRANSLITERATION_ITEM (NumToCharKanjiShort_ja_JP),
476 IMPL_TRANSLITERATION_ITEM (NumToCharKanjiTraditional_ja_JP),
477 IMPL_TRANSLITERATION_ITEM (NumToCharLower_ko),
478 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_ko),
479 IMPL_TRANSLITERATION_ITEM (NumToCharHangul_ko),
480 IMPL_TRANSLITERATION_ITEM (NumToCharIndic_ar),
481 IMPL_TRANSLITERATION_ITEM (NumToCharEastIndic_ar),
482 IMPL_TRANSLITERATION_ITEM (NumToCharIndic_hi),
483 IMPL_TRANSLITERATION_ITEM (NumToChar_th),
485 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_zh_CN),
486 IMPL_TRANSLITERATION_ITEM (CharToNumLower_zh_CN),
487 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_zh_TW),
488 IMPL_TRANSLITERATION_ITEM (CharToNumLower_zh_TW),
489 IMPL_TRANSLITERATION_ITEM (CharToNumFullwidth),
490 IMPL_TRANSLITERATION_ITEM (CharToNumKanjiShort_ja_JP),
491 IMPL_TRANSLITERATION_ITEM (CharToNumKanjiTraditional_ja_JP),
492 IMPL_TRANSLITERATION_ITEM (CharToNumLower_ko),
493 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_ko),
494 IMPL_TRANSLITERATION_ITEM (CharToNumHangul_ko),
495 IMPL_TRANSLITERATION_ITEM (CharToNumIndic_ar),
496 IMPL_TRANSLITERATION_ITEM (CharToNumEastIndic_ar),
497 IMPL_TRANSLITERATION_ITEM (CharToNumIndic_hi),
498 IMPL_TRANSLITERATION_ITEM (CharToNum_th),
500 IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_CN),
501 IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_CN),
502 IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_TW),
503 IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_TW),
504 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_CN),
505 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_TW),
506 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_ja_JP),
507 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_ko),
508 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiLongModern_ja_JP),
509 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiLongTraditional_ja_JP),
510 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiShortModern_ja_JP),
511 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiShortTraditional_ja_JP),
512 IMPL_TRANSLITERATION_ITEM (NumToTextInformalHangul_ko),
513 IMPL_TRANSLITERATION_ITEM (NumToTextInformalLower_ko),
514 IMPL_TRANSLITERATION_ITEM (NumToTextInformalUpper_ko),
515 IMPL_TRANSLITERATION_ITEM (NumToTextFormalHangul_ko),
516 IMPL_TRANSLITERATION_ITEM (NumToTextFormalLower_ko),
517 IMPL_TRANSLITERATION_ITEM (NumToTextFormalUpper_ko),
519 IMPL_TRANSLITERATION_ITEM (TextToNumUpper_zh_CN),
520 IMPL_TRANSLITERATION_ITEM (TextToNumLower_zh_CN),
521 IMPL_TRANSLITERATION_ITEM (TextToNumUpper_zh_TW),
522 IMPL_TRANSLITERATION_ITEM (TextToNumLower_zh_TW),
523 IMPL_TRANSLITERATION_ITEM (TextToNumKanjiLongModern_ja_JP),
524 IMPL_TRANSLITERATION_ITEM (TextToNumKanjiLongTraditional_ja_JP),
525 IMPL_TRANSLITERATION_ITEM (TextToNumInformalHangul_ko),
526 IMPL_TRANSLITERATION_ITEM (TextToNumInformalLower_ko),
527 IMPL_TRANSLITERATION_ITEM (TextToNumInformalUpper_ko),
528 IMPL_TRANSLITERATION_ITEM (TextToNumFormalHangul_ko),
529 IMPL_TRANSLITERATION_ITEM (TextToNumFormalLower_ko),
530 IMPL_TRANSLITERATION_ITEM (TextToNumFormalUpper_ko),
532 IMPL_TRANSLITERATION_ITEM (NumToTextDate_zh),
533 IMPL_TRANSLITERATION_ITEM (NumToTextAIUFullWidth_ja_JP),
534 IMPL_TRANSLITERATION_ITEM (NumToTextAIUHalfWidth_ja_JP),
535 IMPL_TRANSLITERATION_ITEM (NumToTextIROHAFullWidth_ja_JP),
536 IMPL_TRANSLITERATION_ITEM (NumToTextIROHAHalfWidth_ja_JP),
537 IMPL_TRANSLITERATION_ITEM (NumToTextCircledNumber),
538 IMPL_TRANSLITERATION_ITEM (NumToTextHangulJamo_ko),
539 IMPL_TRANSLITERATION_ITEM (NumToTextHangulSyllable_ko),
540 IMPL_TRANSLITERATION_ITEM (NumToTextHangulCircledJamo_ko),
541 IMPL_TRANSLITERATION_ITEM (NumToTextHangulCircledSyllable_ko),
542 IMPL_TRANSLITERATION_ITEM (NumToTextTianGan_zh),
543 IMPL_TRANSLITERATION_ITEM (NumToTextDiZi_zh),
545 { "com.sun.star.i18n.OrdinalSuffix",
546 "com.sun.star.i18n.OrdinalSuffix",
547 & OrdinalSuffix_CreateInstance },
549 { TRLT_SERVICELNAME_L10N,
550 TRLT_IMPLNAME_PREFIX "FULLWIDTHKATAKANA_HALFWIDTHKATAKANA",
551 &fullwidthKatakanaToHalfwidthKatakana_CreateInstance },
552 { TRLT_SERVICELNAME_L10N,
553 TRLT_IMPLNAME_PREFIX "HALFWIDTHKATAKANA_FULLWIDTHKATAKANA",
554 &halfwidthKatakanaToFullwidthKatakana_CreateInstance },
555 { TRLT_SERVICELNAME_L10N,
556 TRLT_IMPLNAME_PREFIX "FULLWIDTH_HALFWIDTH_LIKE_ASC",
557 &fullwidthToHalfwidthLikeASC_CreateInstance },
558 { TRLT_SERVICELNAME_L10N,
559 TRLT_IMPLNAME_PREFIX "HALFWIDTH_FULLWIDTH_LIKE_JIS",
560 &halfwidthToFullwidthLikeJIS_CreateInstance },
561 // add here new services !!
562 { 0, 0, 0 }
566 extern "C"
569 SAL_DLLPUBLIC_EXPORT void* SAL_CALL i18npool_component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, SAL_UNUSED_PARAMETER void* /*_pRegistryKey*/ )
571 void* pRet = NULL;
573 lang::XMultiServiceFactory* pServiceManager =
574 reinterpret_cast< lang::XMultiServiceFactory* >( _pServiceManager );
575 uno::Reference< lang::XSingleServiceFactory > xFactory;
577 for( const InstancesArray* pArr = aInstances; pArr->pServiceNm; ++pArr )
579 if( 0 == rtl_str_compare( sImplementationName, pArr->pImplementationNm ) )
581 uno::Sequence< OUString > aServiceNames(1);
582 aServiceNames.getArray()[0] =
583 OUString::createFromAscii( pArr->pServiceNm );
584 xFactory = ::cppu::createSingleFactory(
585 pServiceManager,
586 OUString::createFromAscii( pArr->pImplementationNm ),
587 *pArr->pFn, aServiceNames );
588 break;
592 if ( xFactory.is() )
594 xFactory->acquire();
595 pRet = xFactory.get();
598 return pRet;
601 } // "C"
603 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */