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: numtotext_cjk.cxx,v $
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"
34 #define TRANSLITERATION_ALL
35 #include <numtotext_cjk.hxx>
37 #include <com/sun/star/i18n/NativeNumberMode.hpp>
39 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
41 #define TRANSLITERATION_NUMTOTEXT( name, number ) \
42 NumToText##name::NumToText##name() \
44 nNativeNumberMode = number; \
46 transliterationName = "NumToText"#name; \
47 implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
49 using namespace com::sun::star::i18n::NativeNumberMode
;
51 TRANSLITERATION_NUMTOTEXT( Lower_zh_CN
, NATNUM4
)
52 TRANSLITERATION_NUMTOTEXT( Upper_zh_CN
, NATNUM5
)
53 TRANSLITERATION_NUMTOTEXT( Lower_zh_TW
, NATNUM4
)
54 TRANSLITERATION_NUMTOTEXT( Upper_zh_TW
, NATNUM5
)
55 TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_CN
, NATNUM6
)
56 TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_TW
, NATNUM6
)
57 TRANSLITERATION_NUMTOTEXT( Fullwidth_ja_JP
, NATNUM6
)
58 TRANSLITERATION_NUMTOTEXT( Fullwidth_ko
, NATNUM6
)
59 TRANSLITERATION_NUMTOTEXT( FormalLower_ko
, NATNUM4
)
60 TRANSLITERATION_NUMTOTEXT( FormalUpper_ko
, NATNUM5
)
61 TRANSLITERATION_NUMTOTEXT( FormalHangul_ko
, NATNUM10
)
62 TRANSLITERATION_NUMTOTEXT( InformalLower_ko
, NATNUM7
)
63 TRANSLITERATION_NUMTOTEXT( InformalUpper_ko
, NATNUM8
)
64 TRANSLITERATION_NUMTOTEXT( InformalHangul_ko
, NATNUM11
)
65 TRANSLITERATION_NUMTOTEXT( KanjiLongTraditional_ja_JP
, NATNUM5
)
66 TRANSLITERATION_NUMTOTEXT( KanjiLongModern_ja_JP
, NATNUM4
)
67 TRANSLITERATION_NUMTOTEXT( Date_zh
, NATNUM7
)
68 TRANSLITERATION_NUMTOTEXT( KanjiShortTraditional_ja_JP
, NATNUM8
)
69 TRANSLITERATION_NUMTOTEXT( KanjiShortModern_ja_JP
, NATNUM7
)
70 #undef TRANSLITERATION_NUMTOTEXT
72 #define TRANSLITERATION_NUMTOTEXT( name, _table, recycle ) \
73 NumToText##name::NumToText##name() \
76 tableSize = sizeof(_table) / sizeof(sal_Unicode); \
77 recycleSymbol = recycle; \
78 transliterationName = "NumToText"#name; \
79 implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
82 TRANSLITERATION_NUMTOTEXT ( AIUFullWidth_ja_JP
, table_AIUFullWidth_ja_JP
, sal_True
)
83 TRANSLITERATION_NUMTOTEXT ( AIUHalfWidth_ja_JP
, table_AIUHalfWidth_ja_JP
, sal_True
)
84 TRANSLITERATION_NUMTOTEXT ( IROHAFullWidth_ja_JP
, table_IROHAFullWidth_ja_JP
, sal_True
)
85 TRANSLITERATION_NUMTOTEXT ( IROHAHalfWidth_ja_JP
, table_IROHAHalfWidth_ja_JP
, sal_True
)
86 TRANSLITERATION_NUMTOTEXT ( CircledNumber
, table_CircledNumber
, sal_False
)
87 TRANSLITERATION_NUMTOTEXT ( TianGan_zh
, table_TianGan_zh
, sal_False
)
88 TRANSLITERATION_NUMTOTEXT ( DiZi_zh
, table_DiZi_zh
, sal_False
)
89 TRANSLITERATION_NUMTOTEXT ( HangulJamo_ko
, table_HangulJamo_ko
, sal_True
)
90 TRANSLITERATION_NUMTOTEXT ( HangulSyllable_ko
, table_HangulSyllable_ko
, sal_True
)
91 TRANSLITERATION_NUMTOTEXT ( HangulCircledJamo_ko
, table_HangulCircledJamo_ko
, sal_True
)
92 TRANSLITERATION_NUMTOTEXT ( HangulCircledSyllable_ko
, table_HangulCircledSyllable_ko
, sal_True
)
93 #undef TRANSLITERATION_NUMTOTEXT