1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
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.
14  *
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).
20  *
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.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_i18npool.hxx"
30 
31 #define TRANSLITERATION_ALL
32 #include <numtotext_cjk.hxx>
33 #include <bullet.h>
34 #include <com/sun/star/i18n/NativeNumberMode.hpp>
35 
36 namespace com { namespace sun { namespace star { namespace i18n {
37 
38 #define TRANSLITERATION_NUMTOTEXT( name, number ) \
39 NumToText##name::NumToText##name() \
40 { \
41         nNativeNumberMode = number; \
42         tableSize = 0; \
43         transliterationName = "NumToText"#name; \
44         implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
45 }
46 using namespace com::sun::star::i18n::NativeNumberMode;
47 
48 TRANSLITERATION_NUMTOTEXT( Lower_zh_CN, NATNUM4)
49 TRANSLITERATION_NUMTOTEXT( Upper_zh_CN, NATNUM5)
50 TRANSLITERATION_NUMTOTEXT( Lower_zh_TW, NATNUM4)
51 TRANSLITERATION_NUMTOTEXT( Upper_zh_TW, NATNUM5)
52 TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_CN, NATNUM6)
53 TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_TW, NATNUM6)
54 TRANSLITERATION_NUMTOTEXT( Fullwidth_ja_JP, NATNUM6)
55 TRANSLITERATION_NUMTOTEXT( Fullwidth_ko, NATNUM6)
56 TRANSLITERATION_NUMTOTEXT( FormalLower_ko, NATNUM4)
57 TRANSLITERATION_NUMTOTEXT( FormalUpper_ko, NATNUM5)
58 TRANSLITERATION_NUMTOTEXT( FormalHangul_ko, NATNUM10)
59 TRANSLITERATION_NUMTOTEXT( InformalLower_ko, NATNUM7)
60 TRANSLITERATION_NUMTOTEXT( InformalUpper_ko, NATNUM8)
61 TRANSLITERATION_NUMTOTEXT( InformalHangul_ko, NATNUM11)
62 TRANSLITERATION_NUMTOTEXT( KanjiLongTraditional_ja_JP, NATNUM5)
63 TRANSLITERATION_NUMTOTEXT( KanjiLongModern_ja_JP, NATNUM4)
64 TRANSLITERATION_NUMTOTEXT( Date_zh, NATNUM7)
65 TRANSLITERATION_NUMTOTEXT( KanjiShortTraditional_ja_JP, NATNUM8)
66 TRANSLITERATION_NUMTOTEXT( KanjiShortModern_ja_JP, NATNUM7)
67 #undef TRANSLITERATION_NUMTOTEXT
68 
69 #define TRANSLITERATION_NUMTOTEXT( name, _table, recycle ) \
70 NumToText##name::NumToText##name() \
71 { \
72         table = _table;\
73         tableSize = sizeof(_table) / sizeof(sal_Unicode); \
74         recycleSymbol = recycle; \
75         transliterationName = "NumToText"#name; \
76         implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
77 }
78 
79 TRANSLITERATION_NUMTOTEXT ( AIUFullWidth_ja_JP, table_AIUFullWidth_ja_JP, sal_True)
80 TRANSLITERATION_NUMTOTEXT ( AIUHalfWidth_ja_JP, table_AIUHalfWidth_ja_JP, sal_True)
81 TRANSLITERATION_NUMTOTEXT ( IROHAFullWidth_ja_JP, table_IROHAFullWidth_ja_JP, sal_True)
82 TRANSLITERATION_NUMTOTEXT ( IROHAHalfWidth_ja_JP, table_IROHAHalfWidth_ja_JP, sal_True)
83 TRANSLITERATION_NUMTOTEXT ( CircledNumber, table_CircledNumber, sal_False)
84 TRANSLITERATION_NUMTOTEXT ( TianGan_zh, table_TianGan_zh, sal_False)
85 TRANSLITERATION_NUMTOTEXT ( DiZi_zh, table_DiZi_zh, sal_False)
86 TRANSLITERATION_NUMTOTEXT ( HangulJamo_ko, table_HangulJamo_ko, sal_True)
87 TRANSLITERATION_NUMTOTEXT ( HangulSyllable_ko, table_HangulSyllable_ko, sal_True)
88 TRANSLITERATION_NUMTOTEXT ( HangulCircledJamo_ko, table_HangulCircledJamo_ko, sal_True)
89 TRANSLITERATION_NUMTOTEXT ( HangulCircledSyllable_ko, table_HangulCircledSyllable_ko, sal_True)
90 #undef TRANSLITERATION_NUMTOTEXT
91 
92 } } } }
93