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