LibreOffice Module i18npool (master) 1
numtotext_cjk.cxx
Go to the documentation of this file.
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#include <com/sun/star/i18n/NativeNumberMode.hpp>
21
22#include <numtotext_cjk.hxx>
23#include <bullet.h>
24
25namespace i18npool {
26
27#define TRANSLITERATION_NUMTOTEXT( name, number ) \
28NumToText##name::NumToText##name() \
29{ \
30 nNativeNumberMode = number; \
31 tableSize = 0; \
32 transliterationName = "NumToText"#name; \
33 implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
34}
35using namespace com::sun::star::i18n::NativeNumberMode;
36
37TRANSLITERATION_NUMTOTEXT( Lower_zh_CN, NATNUM4)
38TRANSLITERATION_NUMTOTEXT( Upper_zh_CN, NATNUM5)
39TRANSLITERATION_NUMTOTEXT( Lower_zh_TW, NATNUM4)
40TRANSLITERATION_NUMTOTEXT( Upper_zh_TW, NATNUM5)
41TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_CN, NATNUM6)
42TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_TW, NATNUM6)
43TRANSLITERATION_NUMTOTEXT( Fullwidth_ja_JP, NATNUM6)
44TRANSLITERATION_NUMTOTEXT( Fullwidth_ko, NATNUM6)
45TRANSLITERATION_NUMTOTEXT( FormalLower_ko, NATNUM4)
46TRANSLITERATION_NUMTOTEXT( FormalUpper_ko, NATNUM5)
47TRANSLITERATION_NUMTOTEXT( FormalHangul_ko, NATNUM10)
48TRANSLITERATION_NUMTOTEXT( InformalLower_ko, NATNUM7)
49TRANSLITERATION_NUMTOTEXT( InformalUpper_ko, NATNUM8)
50TRANSLITERATION_NUMTOTEXT( InformalHangul_ko, NATNUM11)
51TRANSLITERATION_NUMTOTEXT( KanjiLongTraditional_ja_JP, NATNUM5)
52TRANSLITERATION_NUMTOTEXT( KanjiLongModern_ja_JP, NATNUM4)
53TRANSLITERATION_NUMTOTEXT( Date_zh, NATNUM7)
54TRANSLITERATION_NUMTOTEXT( KanjiShortTraditional_ja_JP, NATNUM8)
55TRANSLITERATION_NUMTOTEXT( KanjiShortModern_ja_JP, NATNUM7)
56
57#undef TRANSLITERATION_NUMTOTEXT
58
59#define TRANSLITERATION_NUMTOTEXT( name, _table, recycle ) \
60NumToText##name::NumToText##name() \
61{ \
62 table = _table;\
63 tableSize = SAL_N_ELEMENTS(_table); \
64 recycleSymbol = recycle; \
65 transliterationName = "NumToText"#name; \
66 implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
67}
68
69TRANSLITERATION_NUMTOTEXT ( AIUFullWidth_ja_JP, table_AIUFullWidth_ja_JP, true)
70TRANSLITERATION_NUMTOTEXT ( AIUHalfWidth_ja_JP, table_AIUHalfWidth_ja_JP, true)
71TRANSLITERATION_NUMTOTEXT ( IROHAFullWidth_ja_JP, table_IROHAFullWidth_ja_JP, true)
72TRANSLITERATION_NUMTOTEXT ( IROHAHalfWidth_ja_JP, table_IROHAHalfWidth_ja_JP, true)
77TRANSLITERATION_NUMTOTEXT ( HangulSyllable_ko, table_HangulSyllable_ko, true)
78TRANSLITERATION_NUMTOTEXT ( HangulCircledJamo_ko, table_HangulCircledJamo_ko, true)
79TRANSLITERATION_NUMTOTEXT ( HangulCircledSyllable_ko, table_HangulCircledSyllable_ko, true)
80
81#undef TRANSLITERATION_NUMTOTEXT
82
83}
84
85/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Constant values shared between i18npool and, for example, the number formatter.
const sal_Unicode table_HangulCircledJamo_ko[]
Definition: bullet.h:314
const sal_Unicode table_HangulCircledSyllable_ko[]
Definition: bullet.h:332
const sal_Unicode table_TianGan_zh[]
Definition: bullet.h:349
const sal_Unicode table_IROHAFullWidth_ja_JP[]
Definition: bullet.h:124
const sal_Unicode table_AIUHalfWidth_ja_JP[]
Definition: bullet.h:75
const sal_Unicode table_HangulJamo_ko[]
Definition: bullet.h:279
const sal_Unicode table_AIUFullWidth_ja_JP[]
Definition: bullet.h:26
const sal_Unicode table_HangulSyllable_ko[]
Definition: bullet.h:296
const sal_Unicode table_IROHAHalfWidth_ja_JP[]
Definition: bullet.h:175
const sal_Unicode table_DiZi_zh[]
Definition: bullet.h:353
const sal_Unicode table_CircledNumber[]
Definition: bullet.h:226
#define TRANSLITERATION_NUMTOTEXT(name, number)