Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #define TRANSLITERATION_ALL
22 : #include <numtotext_cjk.hxx>
23 : #include <bullet.h>
24 : #include <com/sun/star/i18n/NativeNumberMode.hpp>
25 :
26 : namespace com { namespace sun { namespace star { namespace i18n {
27 :
28 : #define TRANSLITERATION_NUMTOTEXT( name, number ) \
29 : NumToText##name::NumToText##name() \
30 : { \
31 : nNativeNumberMode = number; \
32 : tableSize = 0; \
33 : transliterationName = "NumToText"#name; \
34 : implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
35 : }
36 : using namespace com::sun::star::i18n::NativeNumberMode;
37 :
38 0 : TRANSLITERATION_NUMTOTEXT( Lower_zh_CN, NATNUM4)
39 0 : TRANSLITERATION_NUMTOTEXT( Upper_zh_CN, NATNUM5)
40 0 : TRANSLITERATION_NUMTOTEXT( Lower_zh_TW, NATNUM4)
41 0 : TRANSLITERATION_NUMTOTEXT( Upper_zh_TW, NATNUM5)
42 0 : TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_CN, NATNUM6)
43 0 : TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_TW, NATNUM6)
44 0 : TRANSLITERATION_NUMTOTEXT( Fullwidth_ja_JP, NATNUM6)
45 0 : TRANSLITERATION_NUMTOTEXT( Fullwidth_ko, NATNUM6)
46 0 : TRANSLITERATION_NUMTOTEXT( FormalLower_ko, NATNUM4)
47 0 : TRANSLITERATION_NUMTOTEXT( FormalUpper_ko, NATNUM5)
48 0 : TRANSLITERATION_NUMTOTEXT( FormalHangul_ko, NATNUM10)
49 0 : TRANSLITERATION_NUMTOTEXT( InformalLower_ko, NATNUM7)
50 0 : TRANSLITERATION_NUMTOTEXT( InformalUpper_ko, NATNUM8)
51 0 : TRANSLITERATION_NUMTOTEXT( InformalHangul_ko, NATNUM11)
52 0 : TRANSLITERATION_NUMTOTEXT( KanjiLongTraditional_ja_JP, NATNUM5)
53 0 : TRANSLITERATION_NUMTOTEXT( KanjiLongModern_ja_JP, NATNUM4)
54 0 : TRANSLITERATION_NUMTOTEXT( Date_zh, NATNUM7)
55 0 : TRANSLITERATION_NUMTOTEXT( KanjiShortTraditional_ja_JP, NATNUM8)
56 0 : TRANSLITERATION_NUMTOTEXT( KanjiShortModern_ja_JP, NATNUM7)
57 : #undef TRANSLITERATION_NUMTOTEXT
58 :
59 : #define TRANSLITERATION_NUMTOTEXT( name, _table, recycle ) \
60 : NumToText##name::NumToText##name() \
61 : { \
62 : table = _table;\
63 : tableSize = sizeof(_table) / sizeof(sal_Unicode); \
64 : recycleSymbol = recycle; \
65 : transliterationName = "NumToText"#name; \
66 : implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
67 : }
68 :
69 0 : TRANSLITERATION_NUMTOTEXT ( AIUFullWidth_ja_JP, table_AIUFullWidth_ja_JP, sal_True)
70 0 : TRANSLITERATION_NUMTOTEXT ( AIUHalfWidth_ja_JP, table_AIUHalfWidth_ja_JP, sal_True)
71 0 : TRANSLITERATION_NUMTOTEXT ( IROHAFullWidth_ja_JP, table_IROHAFullWidth_ja_JP, sal_True)
72 0 : TRANSLITERATION_NUMTOTEXT ( IROHAHalfWidth_ja_JP, table_IROHAHalfWidth_ja_JP, sal_True)
73 0 : TRANSLITERATION_NUMTOTEXT ( CircledNumber, table_CircledNumber, sal_False)
74 0 : TRANSLITERATION_NUMTOTEXT ( TianGan_zh, table_TianGan_zh, sal_False)
75 0 : TRANSLITERATION_NUMTOTEXT ( DiZi_zh, table_DiZi_zh, sal_False)
76 0 : TRANSLITERATION_NUMTOTEXT ( HangulJamo_ko, table_HangulJamo_ko, sal_True)
77 0 : TRANSLITERATION_NUMTOTEXT ( HangulSyllable_ko, table_HangulSyllable_ko, sal_True)
78 0 : TRANSLITERATION_NUMTOTEXT ( HangulCircledJamo_ko, table_HangulCircledJamo_ko, sal_True)
79 0 : TRANSLITERATION_NUMTOTEXT ( HangulCircledSyllable_ko, table_HangulCircledSyllable_ko, sal_True)
80 : #undef TRANSLITERATION_NUMTOTEXT
81 :
82 : } } } }
83 :
84 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|