1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_i18npool.hxx"
26 
27 #define TRANSLITERATION_ALL
28 #include <numtotext_cjk.hxx>
29 #include <bullet.h>
30 #include <com/sun/star/i18n/NativeNumberMode.hpp>
31 
32 namespace com { namespace sun { namespace star { namespace i18n {
33 
34 #define TRANSLITERATION_NUMTOTEXT( name, number ) \
35 NumToText##name::NumToText##name() \
36 { \
37         nNativeNumberMode = number; \
38         tableSize = 0; \
39         transliterationName = "NumToText"#name; \
40         implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
41 }
42 using namespace com::sun::star::i18n::NativeNumberMode;
43 
44 TRANSLITERATION_NUMTOTEXT( Lower_zh_CN, NATNUM4)
45 TRANSLITERATION_NUMTOTEXT( Upper_zh_CN, NATNUM5)
46 TRANSLITERATION_NUMTOTEXT( Lower_zh_TW, NATNUM4)
47 TRANSLITERATION_NUMTOTEXT( Upper_zh_TW, NATNUM5)
48 TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_CN, NATNUM6)
49 TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_TW, NATNUM6)
50 TRANSLITERATION_NUMTOTEXT( Fullwidth_ja_JP, NATNUM6)
51 TRANSLITERATION_NUMTOTEXT( Fullwidth_ko, NATNUM6)
52 TRANSLITERATION_NUMTOTEXT( FormalLower_ko, NATNUM4)
53 TRANSLITERATION_NUMTOTEXT( FormalUpper_ko, NATNUM5)
54 TRANSLITERATION_NUMTOTEXT( FormalHangul_ko, NATNUM10)
55 TRANSLITERATION_NUMTOTEXT( InformalLower_ko, NATNUM7)
56 TRANSLITERATION_NUMTOTEXT( InformalUpper_ko, NATNUM8)
57 TRANSLITERATION_NUMTOTEXT( InformalHangul_ko, NATNUM11)
58 TRANSLITERATION_NUMTOTEXT( KanjiLongTraditional_ja_JP, NATNUM5)
59 TRANSLITERATION_NUMTOTEXT( KanjiLongModern_ja_JP, NATNUM4)
60 TRANSLITERATION_NUMTOTEXT( Date_zh, NATNUM7)
61 TRANSLITERATION_NUMTOTEXT( KanjiShortTraditional_ja_JP, NATNUM8)
62 TRANSLITERATION_NUMTOTEXT( KanjiShortModern_ja_JP, NATNUM7)
63 #undef TRANSLITERATION_NUMTOTEXT
64 
65 #define TRANSLITERATION_NUMTOTEXT( name, _table, recycle ) \
66 NumToText##name::NumToText##name() \
67 { \
68         table = _table;\
69         tableSize = sizeof(_table) / sizeof(sal_Unicode); \
70         recycleSymbol = recycle; \
71         transliterationName = "NumToText"#name; \
72         implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
73 }
74 
75 TRANSLITERATION_NUMTOTEXT ( AIUFullWidth_ja_JP, table_AIUFullWidth_ja_JP, sal_True)
76 TRANSLITERATION_NUMTOTEXT ( AIUHalfWidth_ja_JP, table_AIUHalfWidth_ja_JP, sal_True)
77 TRANSLITERATION_NUMTOTEXT ( IROHAFullWidth_ja_JP, table_IROHAFullWidth_ja_JP, sal_True)
78 TRANSLITERATION_NUMTOTEXT ( IROHAHalfWidth_ja_JP, table_IROHAHalfWidth_ja_JP, sal_True)
79 TRANSLITERATION_NUMTOTEXT ( CircledNumber, table_CircledNumber, sal_False)
80 TRANSLITERATION_NUMTOTEXT ( TianGan_zh, table_TianGan_zh, sal_False)
81 TRANSLITERATION_NUMTOTEXT ( DiZi_zh, table_DiZi_zh, sal_False)
82 TRANSLITERATION_NUMTOTEXT ( HangulJamo_ko, table_HangulJamo_ko, sal_True)
83 TRANSLITERATION_NUMTOTEXT ( HangulSyllable_ko, table_HangulSyllable_ko, sal_True)
84 TRANSLITERATION_NUMTOTEXT ( HangulCircledJamo_ko, table_HangulCircledJamo_ko, sal_True)
85 TRANSLITERATION_NUMTOTEXT ( HangulCircledSyllable_ko, table_HangulCircledSyllable_ko, sal_True)
86 #undef TRANSLITERATION_NUMTOTEXT
87 
88 } } } }
89