1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: registerservices.cxx,v $
10 * $Revision: 1.44.16.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_i18npool.hxx"
33 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
34 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35 #include <com/sun/star/registry/XRegistryKey.hpp>
37 #include <cppuhelper/factory.hxx>
38 #include <cppuhelper/weak.hxx>
39 #include <osl/mutex.hxx>
41 #include <localedata.hxx>
42 #include <numberformatcode.hxx>
43 #include <nativenumbersupplier.hxx>
44 #include <defaultnumberingprovider.hxx>
45 #include <servicename.hxx>
47 #define TRANSLITERATION_ALL
48 #include <transliterationImpl.hxx>
49 #include <transliteration_body.hxx>
50 #include <transliteration_caseignore.hxx>
51 #include <transliteration_Ignore.hxx>
52 #include <transliteration_OneToOne.hxx>
53 #include <textToPronounce_zh.hxx>
54 #include <numtotext_cjk.hxx>
55 #include <numtochar.hxx>
56 #include <texttonum.hxx>
57 #include <chartonum.hxx>
59 #include <calendarImpl.hxx>
60 #include <calendar_gregorian.hxx>
61 #include <calendar_hijri.hxx>
62 #include <calendar_jewish.hxx>
64 #define BREAKITERATOR_ALL
65 #include <breakiteratorImpl.hxx>
66 #include <breakiterator_cjk.hxx>
67 #include <breakiterator_th.hxx>
68 #include <breakiterator_unicode.hxx>
70 #include <indexentrysupplier.hxx>
71 #include <indexentrysupplier_asian.hxx>
72 #include <indexentrysupplier_ja_phonetic.hxx>
73 #include <indexentrysupplier_common.hxx>
74 #include <indexentrysupplier_default.hxx>
77 #include <characterclassificationImpl.hxx>
78 #include <scripttypedetector.hxx>
79 #include <cclass_unicode.hxx>
82 #include <collatorImpl.hxx>
83 #include <chaptercollator.hxx>
84 #include <collator_unicode.hxx>
86 #include <inputsequencechecker.hxx>
87 #include <inputsequencechecker_th.hxx>
88 #include <inputsequencechecker_hi.hxx>
90 #include <textconversionImpl.hxx>
91 #include <textconversion.hxx>
93 #include <ordinalsuffix.hxx>
95 #define IMPL_CREATEINSTANCE( ImplName ) \
96 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > \
97 SAL_CALL ImplName##_CreateInstance( \
98 const ::com::sun::star::uno::Reference< \
99 ::com::sun::star::lang::XMultiServiceFactory >& ) \
101 return ::com::sun::star::uno::Reference < \
102 ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) \
106 #define IMPL_CREATEINSTANCE_MSF( ImplName ) \
107 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > \
108 SAL_CALL ImplName##_CreateInstance( \
109 const ::com::sun::star::uno::Reference< \
110 ::com::sun::star::lang::XMultiServiceFactory >& rxMSF ) \
112 return ::com::sun::star::uno::Reference < \
113 ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) \
114 new ImplName( rxMSF ) ); \
117 typedef ::com::sun::star::uno::Reference
<
118 ::com::sun::star::uno::XInterface
> (SAL_CALL
*FN_CreateInstance
)(
119 const ::com::sun::star::uno::Reference
<
120 ::com::sun::star::lang::XMultiServiceFactory
>& );
122 #define IMPL_TRANSLITERATION_ITEM( implName ) \
123 { TRLT_SERVICELNAME_L10N, \
124 TRLT_IMPLNAME_PREFIX #implName, \
125 &implName##_CreateInstance }
127 // -------------------------------------------------------------------------------------
129 using namespace ::com::sun::star::i18n
;
131 IMPL_CREATEINSTANCE_MSF( NumberFormatCodeMapper
)
132 IMPL_CREATEINSTANCE( NativeNumberSupplier
)
133 IMPL_CREATEINSTANCE( LocaleData
)
134 IMPL_CREATEINSTANCE_MSF( DefaultNumberingProvider
)
135 IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier
)
136 IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_asian
)
137 IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable
)
138 IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant
)
139 IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable
)
140 IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant
)
141 IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_Unicode
)
142 IMPL_CREATEINSTANCE_MSF( CalendarImpl
)
143 IMPL_CREATEINSTANCE( Calendar_gregorian
)
144 IMPL_CREATEINSTANCE( Calendar_hanja
)
145 IMPL_CREATEINSTANCE( Calendar_gengou
)
146 IMPL_CREATEINSTANCE( Calendar_ROC
)
147 IMPL_CREATEINSTANCE( Calendar_hijri
)
148 IMPL_CREATEINSTANCE( Calendar_jewish
)
149 IMPL_CREATEINSTANCE( Calendar_buddhist
)
150 IMPL_CREATEINSTANCE_MSF( BreakIteratorImpl
)
151 IMPL_CREATEINSTANCE( BreakIterator_Unicode
)
152 IMPL_CREATEINSTANCE( BreakIterator_ja
)
153 IMPL_CREATEINSTANCE( BreakIterator_zh
)
154 IMPL_CREATEINSTANCE( BreakIterator_zh_TW
)
155 IMPL_CREATEINSTANCE( BreakIterator_ko
)
156 IMPL_CREATEINSTANCE( BreakIterator_th
)
157 IMPL_CREATEINSTANCE_MSF( ChapterCollator
)
158 IMPL_CREATEINSTANCE_MSF( CollatorImpl
)
159 IMPL_CREATEINSTANCE( Collator_Unicode
)
161 IMPL_CREATEINSTANCE_MSF( CharacterClassificationImpl
)
162 IMPL_CREATEINSTANCE_MSF( cclass_Unicode
)
163 IMPL_CREATEINSTANCE_MSF( TransliterationImpl
)
164 IMPL_CREATEINSTANCE( ScriptTypeDetector
)
166 IMPL_CREATEINSTANCE_MSF( InputSequenceCheckerImpl
)
167 IMPL_CREATEINSTANCE( InputSequenceChecker_th
)
168 IMPL_CREATEINSTANCE( InputSequenceChecker_hi
)
170 IMPL_CREATEINSTANCE_MSF( TextConversionImpl
)
171 IMPL_CREATEINSTANCE_MSF( TextConversion_ko
)
172 IMPL_CREATEINSTANCE_MSF( TextConversion_zh
)
174 IMPL_CREATEINSTANCE( Transliteration_u2l
)
175 IMPL_CREATEINSTANCE( Transliteration_l2u
)
176 IMPL_CREATEINSTANCE( Transliteration_caseignore
)
177 IMPL_CREATEINSTANCE( hiraganaToKatakana
)
178 IMPL_CREATEINSTANCE( katakanaToHiragana
)
179 IMPL_CREATEINSTANCE( ignoreKana
)
180 IMPL_CREATEINSTANCE( fullwidthToHalfwidth
)
181 IMPL_CREATEINSTANCE( halfwidthToFullwidth
)
182 IMPL_CREATEINSTANCE( ignoreWidth
)
184 IMPL_CREATEINSTANCE( smallToLarge_ja_JP
)
185 IMPL_CREATEINSTANCE( largeToSmall_ja_JP
)
186 IMPL_CREATEINSTANCE( ignoreTraditionalKanji_ja_JP
)
187 IMPL_CREATEINSTANCE( ignoreTraditionalKana_ja_JP
)
188 IMPL_CREATEINSTANCE( ignoreMinusSign_ja_JP
)
189 IMPL_CREATEINSTANCE( ignoreIterationMark_ja_JP
)
190 IMPL_CREATEINSTANCE( ignoreSeparator_ja_JP
)
191 IMPL_CREATEINSTANCE( ignoreZiZu_ja_JP
)
192 IMPL_CREATEINSTANCE( ignoreBaFa_ja_JP
)
193 IMPL_CREATEINSTANCE( ignoreTiJi_ja_JP
)
194 IMPL_CREATEINSTANCE( ignoreHyuByu_ja_JP
)
195 IMPL_CREATEINSTANCE( ignoreSeZe_ja_JP
)
196 IMPL_CREATEINSTANCE( ignoreIandEfollowedByYa_ja_JP
)
197 IMPL_CREATEINSTANCE( ignoreKiKuFollowedBySa_ja_JP
)
198 IMPL_CREATEINSTANCE( ignoreSize_ja_JP
)
199 IMPL_CREATEINSTANCE( ignoreProlongedSoundMark_ja_JP
)
200 IMPL_CREATEINSTANCE( ignoreMiddleDot_ja_JP
)
201 IMPL_CREATEINSTANCE( ignoreSpace_ja_JP
)
203 IMPL_CREATEINSTANCE( TextToChuyin_zh_TW
)
204 IMPL_CREATEINSTANCE( TextToPinyin_zh_CN
)
206 IMPL_CREATEINSTANCE( NumToCharLower_zh_CN
)
207 IMPL_CREATEINSTANCE( NumToCharUpper_zh_CN
)
208 IMPL_CREATEINSTANCE( NumToCharLower_zh_TW
)
209 IMPL_CREATEINSTANCE( NumToCharUpper_zh_TW
)
210 IMPL_CREATEINSTANCE( NumToCharFullwidth
)
211 IMPL_CREATEINSTANCE( NumToCharKanjiShort_ja_JP
)
212 IMPL_CREATEINSTANCE( NumToCharKanjiTraditional_ja_JP
)
213 IMPL_CREATEINSTANCE( NumToCharHangul_ko
)
214 IMPL_CREATEINSTANCE( NumToCharLower_ko
)
215 IMPL_CREATEINSTANCE( NumToCharUpper_ko
)
216 IMPL_CREATEINSTANCE( NumToCharIndic_ar
)
217 IMPL_CREATEINSTANCE( NumToCharEastIndic_ar
)
218 IMPL_CREATEINSTANCE( NumToCharIndic_hi
)
219 IMPL_CREATEINSTANCE( NumToChar_th
)
221 IMPL_CREATEINSTANCE( CharToNumLower_zh_CN
)
222 IMPL_CREATEINSTANCE( CharToNumUpper_zh_CN
)
223 IMPL_CREATEINSTANCE( CharToNumLower_zh_TW
)
224 IMPL_CREATEINSTANCE( CharToNumUpper_zh_TW
)
225 IMPL_CREATEINSTANCE( CharToNumFullwidth
)
226 IMPL_CREATEINSTANCE( CharToNumKanjiShort_ja_JP
)
227 IMPL_CREATEINSTANCE( CharToNumKanjiTraditional_ja_JP
)
228 IMPL_CREATEINSTANCE( CharToNumHangul_ko
)
229 IMPL_CREATEINSTANCE( CharToNumLower_ko
)
230 IMPL_CREATEINSTANCE( CharToNumUpper_ko
)
231 IMPL_CREATEINSTANCE( CharToNumIndic_ar
)
232 IMPL_CREATEINSTANCE( CharToNumEastIndic_ar
)
233 IMPL_CREATEINSTANCE( CharToNumIndic_hi
)
234 IMPL_CREATEINSTANCE( CharToNum_th
)
236 IMPL_CREATEINSTANCE( NumToTextLower_zh_CN
)
237 IMPL_CREATEINSTANCE( NumToTextUpper_zh_CN
)
238 IMPL_CREATEINSTANCE( NumToTextLower_zh_TW
)
239 IMPL_CREATEINSTANCE( NumToTextUpper_zh_TW
)
240 IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_CN
)
241 IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_TW
)
242 IMPL_CREATEINSTANCE( NumToTextFullwidth_ja_JP
)
243 IMPL_CREATEINSTANCE( NumToTextFullwidth_ko
)
244 IMPL_CREATEINSTANCE( NumToTextKanjiLongModern_ja_JP
)
245 IMPL_CREATEINSTANCE( NumToTextKanjiLongTraditional_ja_JP
)
246 IMPL_CREATEINSTANCE( NumToTextKanjiShortModern_ja_JP
)
247 IMPL_CREATEINSTANCE( NumToTextKanjiShortTraditional_ja_JP
)
248 IMPL_CREATEINSTANCE( NumToTextFormalHangul_ko
)
249 IMPL_CREATEINSTANCE( NumToTextFormalLower_ko
)
250 IMPL_CREATEINSTANCE( NumToTextFormalUpper_ko
)
251 IMPL_CREATEINSTANCE( NumToTextInformalHangul_ko
)
252 IMPL_CREATEINSTANCE( NumToTextInformalUpper_ko
)
253 IMPL_CREATEINSTANCE( NumToTextInformalLower_ko
)
255 IMPL_CREATEINSTANCE( TextToNumLower_zh_CN
)
256 IMPL_CREATEINSTANCE( TextToNumUpper_zh_CN
)
257 IMPL_CREATEINSTANCE( TextToNumLower_zh_TW
)
258 IMPL_CREATEINSTANCE( TextToNumUpper_zh_TW
)
259 IMPL_CREATEINSTANCE( TextToNumKanjiLongModern_ja_JP
)
260 IMPL_CREATEINSTANCE( TextToNumKanjiLongTraditional_ja_JP
)
261 IMPL_CREATEINSTANCE( TextToNumFormalHangul_ko
)
262 IMPL_CREATEINSTANCE( TextToNumFormalLower_ko
)
263 IMPL_CREATEINSTANCE( TextToNumFormalUpper_ko
)
264 IMPL_CREATEINSTANCE( TextToNumInformalHangul_ko
)
265 IMPL_CREATEINSTANCE( TextToNumInformalUpper_ko
)
266 IMPL_CREATEINSTANCE( TextToNumInformalLower_ko
)
268 IMPL_CREATEINSTANCE( NumToTextDate_zh
)
269 IMPL_CREATEINSTANCE( NumToTextAIUFullWidth_ja_JP
)
270 IMPL_CREATEINSTANCE( NumToTextAIUHalfWidth_ja_JP
)
271 IMPL_CREATEINSTANCE( NumToTextIROHAFullWidth_ja_JP
)
272 IMPL_CREATEINSTANCE( NumToTextIROHAHalfWidth_ja_JP
)
273 IMPL_CREATEINSTANCE( NumToTextCircledNumber
)
274 IMPL_CREATEINSTANCE( NumToTextHangulJamo_ko
)
275 IMPL_CREATEINSTANCE( NumToTextHangulSyllable_ko
)
276 IMPL_CREATEINSTANCE( NumToTextHangulCircledJamo_ko
)
277 IMPL_CREATEINSTANCE( NumToTextHangulCircledSyllable_ko
)
278 IMPL_CREATEINSTANCE( NumToTextTianGan_zh
)
279 IMPL_CREATEINSTANCE( NumToTextDiZi_zh
)
281 IMPL_CREATEINSTANCE( fullwidthKatakanaToHalfwidthKatakana
)
282 IMPL_CREATEINSTANCE( halfwidthKatakanaToFullwidthKatakana
)
283 IMPL_CREATEINSTANCE( fullwidthToHalfwidthLikeASC
)
284 IMPL_CREATEINSTANCE( halfwidthToFullwidthLikeJIS
)
286 IMPL_CREATEINSTANCE_MSF( OrdinalSuffix
)
288 static const struct InstancesArray
{
289 const sal_Char
* pServiceNm
;
290 const sal_Char
* pImplementationNm
;
291 FN_CreateInstance pFn
;
293 { "com.sun.star.i18n.LocaleData",
294 "com.sun.star.i18n.LocaleData",
295 & LocaleData_CreateInstance
},
296 { "com.sun.star.i18n.NumberFormatMapper",
297 "com.sun.star.i18n.NumberFormatCodeMapper",
298 & NumberFormatCodeMapper_CreateInstance
},
299 { "com.sun.star.i18n.NativeNumberSupplier",
300 "com.sun.star.i18n.NativeNumberSupplier",
301 & NativeNumberSupplier_CreateInstance
},
302 { "com.sun.star.text.DefaultNumberingProvider",
303 "com.sun.star.text.DefaultNumberingProvider",
304 &DefaultNumberingProvider_CreateInstance
},
305 { "com.sun.star.i18n.IndexEntrySupplier",
306 "com.sun.star.i18n.IndexEntrySupplier",
307 &IndexEntrySupplier_CreateInstance
},
308 { "com.sun.star.i18n.IndexEntrySupplier_asian",
309 "com.sun.star.i18n.IndexEntrySupplier_asian",
310 &IndexEntrySupplier_asian_CreateInstance
},
311 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
312 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
313 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance
},
314 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
315 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
316 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance
},
317 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
318 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
319 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance
},
320 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
321 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
322 &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant_CreateInstance
},
323 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
324 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
325 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance
},
326 { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
327 "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
328 &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant_CreateInstance
},
329 { "com.sun.star.i18n.IndexEntrySupplier_Unicode",
330 "com.sun.star.i18n.IndexEntrySupplier_Unicode",
331 &IndexEntrySupplier_Unicode_CreateInstance
},
332 { "com.sun.star.i18n.LocaleCalendar",
333 "com.sun.star.i18n.CalendarImpl",
334 &CalendarImpl_CreateInstance
},
335 { "com.sun.star.i18n.Calendar_gregorian",
336 "com.sun.star.i18n.Calendar_gregorian",
337 &Calendar_gregorian_CreateInstance
},
338 { "com.sun.star.i18n.Calendar_gengou",
339 "com.sun.star.i18n.Calendar_gengou",
340 &Calendar_gengou_CreateInstance
},
341 { "com.sun.star.i18n.Calendar_ROC",
342 "com.sun.star.i18n.Calendar_ROC",
343 &Calendar_ROC_CreateInstance
},
344 { "com.sun.star.i18n.Calendar_hanja_yoil",
345 "com.sun.star.i18n.Calendar_hanja_yoil",
346 &Calendar_hanja_CreateInstance
},
347 { "com.sun.star.i18n.Calendar_hanja",
348 "com.sun.star.i18n.Calendar_hanja",
349 &Calendar_hanja_CreateInstance
},
350 { "com.sun.star.i18n.Calendar_hijri",
351 "com.sun.star.i18n.Calendar_hijri",
352 &Calendar_hijri_CreateInstance
},
353 { "com.sun.star.i18n.Calendar_jewish",
354 "com.sun.star.i18n.Calendar_jewish",
355 &Calendar_jewish_CreateInstance
},
356 { "com.sun.star.i18n.Calendar_buddhist",
357 "com.sun.star.i18n.Calendar_buddhist",
358 &Calendar_buddhist_CreateInstance
},
359 { "com.sun.star.i18n.BreakIterator",
360 "com.sun.star.i18n.BreakIterator",
361 &BreakIteratorImpl_CreateInstance
},
362 { "com.sun.star.i18n.BreakIterator_Unicode",
363 "com.sun.star.i18n.BreakIterator_Unicode",
364 &BreakIterator_Unicode_CreateInstance
},
365 { "com.sun.star.i18n.BreakIterator_ja",
366 "com.sun.star.i18n.BreakIterator_ja",
367 &BreakIterator_ja_CreateInstance
},
368 { "com.sun.star.i18n.BreakIterator_zh",
369 "com.sun.star.i18n.BreakIterator_zh",
370 &BreakIterator_zh_CreateInstance
},
371 { "com.sun.star.i18n.BreakIterator_zh_TW",
372 "com.sun.star.i18n.BreakIterator_zh_TW",
373 &BreakIterator_zh_TW_CreateInstance
},
374 { "com.sun.star.i18n.BreakIterator_ko",
375 "com.sun.star.i18n.BreakIterator_ko",
376 &BreakIterator_ko_CreateInstance
},
377 { "com.sun.star.i18n.BreakIterator_th",
378 "com.sun.star.i18n.BreakIterator_th",
379 &BreakIterator_th_CreateInstance
},
380 { "com.sun.star.i18n.Collator",
381 "com.sun.star.i18n.Collator",
382 &CollatorImpl_CreateInstance
},
383 { "com.sun.star.i18n.ChapterCollator",
384 "com.sun.star.i18n.ChapterCollator",
385 &ChapterCollator_CreateInstance
},
386 { "com.sun.star.i18n.Collator_Unicode",
387 "com.sun.star.i18n.Collator_Unicode",
388 &Collator_Unicode_CreateInstance
},
389 { "com.sun.star.i18n.ScriptTypeDetector",
390 "com.sun.star.i18n.ScriptTypeDetector",
391 &ScriptTypeDetector_CreateInstance
},
392 { "com.sun.star.i18n.CharacterClassification",
393 "com.sun.star.i18n.CharacterClassification",
394 &CharacterClassificationImpl_CreateInstance
},
395 { "com.sun.star.i18n.CharacterClassification_Unicode",
396 "com.sun.star.i18n.CharacterClassification_Unicode",
397 &cclass_Unicode_CreateInstance
},
398 { "com.sun.star.i18n.InputSequenceChecker",
399 "com.sun.star.i18n.InputSequenceChecker",
400 &InputSequenceCheckerImpl_CreateInstance
},
401 { "com.sun.star.i18n.InputSequenceChecker_th",
402 "com.sun.star.i18n.InputSequenceChecker_th",
403 &InputSequenceChecker_th_CreateInstance
},
404 { "com.sun.star.i18n.InputSequenceChecker_hi",
405 "com.sun.star.i18n.InputSequenceChecker_hi",
406 &InputSequenceChecker_hi_CreateInstance
},
407 { "com.sun.star.i18n.TextConversion",
408 "com.sun.star.i18n.TextConversion",
409 &TextConversionImpl_CreateInstance
},
410 { "com.sun.star.i18n.TextConversion_ko",
411 "com.sun.star.i18n.TextConversion_ko",
412 &TextConversion_ko_CreateInstance
},
413 { "com.sun.star.i18n.TextConversion_zh",
414 "com.sun.star.i18n.TextConversion_zh",
415 &TextConversion_zh_CreateInstance
},
418 &TransliterationImpl_CreateInstance
},
419 { TRLT_SERVICELNAME_L10N
,
420 TRLT_IMPLNAME_PREFIX
"UPPERCASE_LOWERCASE",
421 &Transliteration_u2l_CreateInstance
},
422 { TRLT_SERVICELNAME_L10N
,
423 TRLT_IMPLNAME_PREFIX
"LOWERCASE_UPPERCASE",
424 &Transliteration_l2u_CreateInstance
},
425 { TRLT_SERVICELNAME_L10N
,
426 TRLT_IMPLNAME_PREFIX
"IGNORE_CASE",
427 &Transliteration_caseignore_CreateInstance
},
428 { TRLT_SERVICELNAME_L10N
,
429 TRLT_IMPLNAME_PREFIX
"HIRAGANA_KATAKANA",
430 &hiraganaToKatakana_CreateInstance
},
431 { TRLT_SERVICELNAME_L10N
,
432 TRLT_IMPLNAME_PREFIX
"KATAKANA_HIRAGANA",
433 &katakanaToHiragana_CreateInstance
},
434 { TRLT_SERVICELNAME_L10N
,
435 TRLT_IMPLNAME_PREFIX
"IGNORE_KANA",
436 &ignoreKana_CreateInstance
},
437 { TRLT_SERVICELNAME_L10N
,
438 TRLT_IMPLNAME_PREFIX
"FULLWIDTH_HALFWIDTH",
439 &fullwidthToHalfwidth_CreateInstance
},
440 { TRLT_SERVICELNAME_L10N
,
441 TRLT_IMPLNAME_PREFIX
"HALFWIDTH_FULLWIDTH",
442 &halfwidthToFullwidth_CreateInstance
},
443 { TRLT_SERVICELNAME_L10N
,
444 TRLT_IMPLNAME_PREFIX
"IGNORE_WIDTH",
445 &ignoreWidth_CreateInstance
},
446 IMPL_TRANSLITERATION_ITEM (smallToLarge_ja_JP
),
447 IMPL_TRANSLITERATION_ITEM (largeToSmall_ja_JP
),
448 IMPL_TRANSLITERATION_ITEM (ignoreTraditionalKanji_ja_JP
),
449 IMPL_TRANSLITERATION_ITEM (ignoreTraditionalKana_ja_JP
),
450 IMPL_TRANSLITERATION_ITEM (ignoreKana
),
451 IMPL_TRANSLITERATION_ITEM (ignoreMinusSign_ja_JP
),
452 IMPL_TRANSLITERATION_ITEM (ignoreIterationMark_ja_JP
),
453 IMPL_TRANSLITERATION_ITEM (ignoreSeparator_ja_JP
),
454 IMPL_TRANSLITERATION_ITEM (ignoreZiZu_ja_JP
),
455 IMPL_TRANSLITERATION_ITEM (ignoreBaFa_ja_JP
),
456 IMPL_TRANSLITERATION_ITEM (ignoreTiJi_ja_JP
),
457 IMPL_TRANSLITERATION_ITEM (ignoreHyuByu_ja_JP
),
458 IMPL_TRANSLITERATION_ITEM (ignoreSeZe_ja_JP
),
459 IMPL_TRANSLITERATION_ITEM (ignoreIandEfollowedByYa_ja_JP
),
460 IMPL_TRANSLITERATION_ITEM (ignoreKiKuFollowedBySa_ja_JP
),
461 IMPL_TRANSLITERATION_ITEM (ignoreSize_ja_JP
),
462 IMPL_TRANSLITERATION_ITEM (ignoreProlongedSoundMark_ja_JP
),
463 IMPL_TRANSLITERATION_ITEM (ignoreMiddleDot_ja_JP
),
464 IMPL_TRANSLITERATION_ITEM (ignoreSpace_ja_JP
),
465 IMPL_TRANSLITERATION_ITEM (TextToPinyin_zh_CN
),
466 IMPL_TRANSLITERATION_ITEM (TextToChuyin_zh_TW
),
468 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_zh_CN
),
469 IMPL_TRANSLITERATION_ITEM (NumToCharLower_zh_CN
),
470 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_zh_TW
),
471 IMPL_TRANSLITERATION_ITEM (NumToCharLower_zh_TW
),
472 IMPL_TRANSLITERATION_ITEM (NumToCharFullwidth
),
473 IMPL_TRANSLITERATION_ITEM (NumToCharKanjiShort_ja_JP
),
474 IMPL_TRANSLITERATION_ITEM (NumToCharKanjiTraditional_ja_JP
),
475 IMPL_TRANSLITERATION_ITEM (NumToCharLower_ko
),
476 IMPL_TRANSLITERATION_ITEM (NumToCharUpper_ko
),
477 IMPL_TRANSLITERATION_ITEM (NumToCharHangul_ko
),
478 IMPL_TRANSLITERATION_ITEM (NumToCharIndic_ar
),
479 IMPL_TRANSLITERATION_ITEM (NumToCharEastIndic_ar
),
480 IMPL_TRANSLITERATION_ITEM (NumToCharIndic_hi
),
481 IMPL_TRANSLITERATION_ITEM (NumToChar_th
),
483 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_zh_CN
),
484 IMPL_TRANSLITERATION_ITEM (CharToNumLower_zh_CN
),
485 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_zh_TW
),
486 IMPL_TRANSLITERATION_ITEM (CharToNumLower_zh_TW
),
487 IMPL_TRANSLITERATION_ITEM (CharToNumFullwidth
),
488 IMPL_TRANSLITERATION_ITEM (CharToNumKanjiShort_ja_JP
),
489 IMPL_TRANSLITERATION_ITEM (CharToNumKanjiTraditional_ja_JP
),
490 IMPL_TRANSLITERATION_ITEM (CharToNumLower_ko
),
491 IMPL_TRANSLITERATION_ITEM (CharToNumUpper_ko
),
492 IMPL_TRANSLITERATION_ITEM (CharToNumHangul_ko
),
493 IMPL_TRANSLITERATION_ITEM (CharToNumIndic_ar
),
494 IMPL_TRANSLITERATION_ITEM (CharToNumEastIndic_ar
),
495 IMPL_TRANSLITERATION_ITEM (CharToNumIndic_hi
),
496 IMPL_TRANSLITERATION_ITEM (CharToNum_th
),
498 IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_CN
),
499 IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_CN
),
500 IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_TW
),
501 IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_TW
),
502 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_CN
),
503 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_TW
),
504 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_ja_JP
),
505 IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_ko
),
506 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiLongModern_ja_JP
),
507 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiLongTraditional_ja_JP
),
508 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiShortModern_ja_JP
),
509 IMPL_TRANSLITERATION_ITEM (NumToTextKanjiShortTraditional_ja_JP
),
510 IMPL_TRANSLITERATION_ITEM (NumToTextInformalHangul_ko
),
511 IMPL_TRANSLITERATION_ITEM (NumToTextInformalLower_ko
),
512 IMPL_TRANSLITERATION_ITEM (NumToTextInformalUpper_ko
),
513 IMPL_TRANSLITERATION_ITEM (NumToTextFormalHangul_ko
),
514 IMPL_TRANSLITERATION_ITEM (NumToTextFormalLower_ko
),
515 IMPL_TRANSLITERATION_ITEM (NumToTextFormalUpper_ko
),
517 IMPL_TRANSLITERATION_ITEM (TextToNumUpper_zh_CN
),
518 IMPL_TRANSLITERATION_ITEM (TextToNumLower_zh_CN
),
519 IMPL_TRANSLITERATION_ITEM (TextToNumUpper_zh_TW
),
520 IMPL_TRANSLITERATION_ITEM (TextToNumLower_zh_TW
),
521 IMPL_TRANSLITERATION_ITEM (TextToNumKanjiLongModern_ja_JP
),
522 IMPL_TRANSLITERATION_ITEM (TextToNumKanjiLongTraditional_ja_JP
),
523 IMPL_TRANSLITERATION_ITEM (TextToNumInformalHangul_ko
),
524 IMPL_TRANSLITERATION_ITEM (TextToNumInformalLower_ko
),
525 IMPL_TRANSLITERATION_ITEM (TextToNumInformalUpper_ko
),
526 IMPL_TRANSLITERATION_ITEM (TextToNumFormalHangul_ko
),
527 IMPL_TRANSLITERATION_ITEM (TextToNumFormalLower_ko
),
528 IMPL_TRANSLITERATION_ITEM (TextToNumFormalUpper_ko
),
530 IMPL_TRANSLITERATION_ITEM (NumToTextDate_zh
),
531 IMPL_TRANSLITERATION_ITEM (NumToTextAIUFullWidth_ja_JP
),
532 IMPL_TRANSLITERATION_ITEM (NumToTextAIUHalfWidth_ja_JP
),
533 IMPL_TRANSLITERATION_ITEM (NumToTextIROHAFullWidth_ja_JP
),
534 IMPL_TRANSLITERATION_ITEM (NumToTextIROHAHalfWidth_ja_JP
),
535 IMPL_TRANSLITERATION_ITEM (NumToTextCircledNumber
),
536 IMPL_TRANSLITERATION_ITEM (NumToTextHangulJamo_ko
),
537 IMPL_TRANSLITERATION_ITEM (NumToTextHangulSyllable_ko
),
538 IMPL_TRANSLITERATION_ITEM (NumToTextHangulCircledJamo_ko
),
539 IMPL_TRANSLITERATION_ITEM (NumToTextHangulCircledSyllable_ko
),
540 IMPL_TRANSLITERATION_ITEM (NumToTextTianGan_zh
),
541 IMPL_TRANSLITERATION_ITEM (NumToTextDiZi_zh
),
543 { "com.sun.star.i18n.OrdinalSuffix",
544 "com.sun.star.i18n.OrdinalSuffix",
545 & OrdinalSuffix_CreateInstance
},
547 { TRLT_SERVICELNAME_L10N
,
548 TRLT_IMPLNAME_PREFIX
"FULLWIDTHKATAKANA_HALFWIDTHKATAKANA",
549 &fullwidthKatakanaToHalfwidthKatakana_CreateInstance
},
550 { TRLT_SERVICELNAME_L10N
,
551 TRLT_IMPLNAME_PREFIX
"HALFWIDTHKATAKANA_FULLWIDTHKATAKANA",
552 &halfwidthKatakanaToFullwidthKatakana_CreateInstance
},
553 { TRLT_SERVICELNAME_L10N
,
554 TRLT_IMPLNAME_PREFIX
"FULLWIDTH_HALFWIDTH_LIKE_ASC",
555 &fullwidthToHalfwidthLikeASC_CreateInstance
},
556 { TRLT_SERVICELNAME_L10N
,
557 TRLT_IMPLNAME_PREFIX
"HALFWIDTH_FULLWIDTH_LIKE_JIS",
558 &halfwidthToFullwidthLikeJIS_CreateInstance
},
559 // add here new services !!
567 void SAL_CALL
component_getImplementationEnvironment( const sal_Char
** ppEnvTypeName
, uno_Environment
** /*ppEnv*/ )
569 *ppEnvTypeName
= CPPU_CURRENT_LANGUAGE_BINDING_NAME
;
572 sal_Bool SAL_CALL
component_writeInfo( void* /*_pServiceManager*/, void* _pRegistryKey
)
576 ::com::sun::star::registry::XRegistryKey
* pRegistryKey
=
577 reinterpret_cast< ::com::sun::star::registry::XRegistryKey
* >(
579 ::com::sun::star::uno::Reference
<
580 ::com::sun::star::registry::XRegistryKey
> xNewKey
;
582 for( const InstancesArray
* pArr
= aInstances
; pArr
->pServiceNm
; ++pArr
)
584 xNewKey
= pRegistryKey
->createKey(
585 ::rtl::OUString::createFromAscii( pArr
->pImplementationNm
) );
586 xNewKey
= xNewKey
->createKey(
587 ::rtl::OUString::createFromAscii( "/UNO/SERVICES" ) );
589 ::rtl::OUString::createFromAscii( pArr
->pServiceNm
) );
595 void* SAL_CALL
component_getFactory( const sal_Char
* sImplementationName
, void* _pServiceManager
, void* /*_pRegistryKey*/ )
599 ::com::sun::star::lang::XMultiServiceFactory
* pServiceManager
=
600 reinterpret_cast< ::com::sun::star::lang::XMultiServiceFactory
* >
601 ( _pServiceManager
);
602 ::com::sun::star::uno::Reference
<
603 ::com::sun::star::lang::XSingleServiceFactory
> xFactory
;
605 for( const InstancesArray
* pArr
= aInstances
; pArr
->pServiceNm
; ++pArr
)
607 if( 0 == rtl_str_compare( sImplementationName
, pArr
->pImplementationNm
) )
609 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> aServiceNames(1);
610 aServiceNames
.getArray()[0] =
611 ::rtl::OUString::createFromAscii( pArr
->pServiceNm
);
612 xFactory
= ::cppu::createSingleFactory(
613 pServiceManager
, aServiceNames
.getArray()[0],
614 *pArr
->pFn
, aServiceNames
);
622 pRet
= xFactory
.get();