summaryrefslogtreecommitdiffstats
path: root/i18npool/source/transliteration/numtotext_cjk.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /i18npool/source/transliteration/numtotext_cjk.cxx
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'i18npool/source/transliteration/numtotext_cjk.cxx')
-rw-r--r--i18npool/source/transliteration/numtotext_cjk.cxx85
1 files changed, 85 insertions, 0 deletions
diff --git a/i18npool/source/transliteration/numtotext_cjk.cxx b/i18npool/source/transliteration/numtotext_cjk.cxx
new file mode 100644
index 000000000..f60561f21
--- /dev/null
+++ b/i18npool/source/transliteration/numtotext_cjk.cxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/i18n/NativeNumberMode.hpp>
+
+#include <numtotext_cjk.hxx>
+#include <bullet.h>
+
+namespace i18npool {
+
+#define TRANSLITERATION_NUMTOTEXT( name, number ) \
+NumToText##name::NumToText##name() \
+{ \
+ nNativeNumberMode = number; \
+ tableSize = 0; \
+ transliterationName = "NumToText"#name; \
+ implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
+}
+using namespace com::sun::star::i18n::NativeNumberMode;
+
+TRANSLITERATION_NUMTOTEXT( Lower_zh_CN, NATNUM4)
+TRANSLITERATION_NUMTOTEXT( Upper_zh_CN, NATNUM5)
+TRANSLITERATION_NUMTOTEXT( Lower_zh_TW, NATNUM4)
+TRANSLITERATION_NUMTOTEXT( Upper_zh_TW, NATNUM5)
+TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_CN, NATNUM6)
+TRANSLITERATION_NUMTOTEXT( Fullwidth_zh_TW, NATNUM6)
+TRANSLITERATION_NUMTOTEXT( Fullwidth_ja_JP, NATNUM6)
+TRANSLITERATION_NUMTOTEXT( Fullwidth_ko, NATNUM6)
+TRANSLITERATION_NUMTOTEXT( FormalLower_ko, NATNUM4)
+TRANSLITERATION_NUMTOTEXT( FormalUpper_ko, NATNUM5)
+TRANSLITERATION_NUMTOTEXT( FormalHangul_ko, NATNUM10)
+TRANSLITERATION_NUMTOTEXT( InformalLower_ko, NATNUM7)
+TRANSLITERATION_NUMTOTEXT( InformalUpper_ko, NATNUM8)
+TRANSLITERATION_NUMTOTEXT( InformalHangul_ko, NATNUM11)
+TRANSLITERATION_NUMTOTEXT( KanjiLongTraditional_ja_JP, NATNUM5)
+TRANSLITERATION_NUMTOTEXT( KanjiLongModern_ja_JP, NATNUM4)
+TRANSLITERATION_NUMTOTEXT( Date_zh, NATNUM7)
+TRANSLITERATION_NUMTOTEXT( KanjiShortTraditional_ja_JP, NATNUM8)
+TRANSLITERATION_NUMTOTEXT( KanjiShortModern_ja_JP, NATNUM7)
+
+#undef TRANSLITERATION_NUMTOTEXT
+
+#define TRANSLITERATION_NUMTOTEXT( name, _table, recycle ) \
+NumToText##name::NumToText##name() \
+{ \
+ table = _table;\
+ tableSize = SAL_N_ELEMENTS(_table); \
+ recycleSymbol = recycle; \
+ transliterationName = "NumToText"#name; \
+ implementationName = "com.sun.star.i18n.Transliteration.NumToText"#name; \
+}
+
+TRANSLITERATION_NUMTOTEXT ( AIUFullWidth_ja_JP, table_AIUFullWidth_ja_JP, true)
+TRANSLITERATION_NUMTOTEXT ( AIUHalfWidth_ja_JP, table_AIUHalfWidth_ja_JP, true)
+TRANSLITERATION_NUMTOTEXT ( IROHAFullWidth_ja_JP, table_IROHAFullWidth_ja_JP, true)
+TRANSLITERATION_NUMTOTEXT ( IROHAHalfWidth_ja_JP, table_IROHAHalfWidth_ja_JP, true)
+TRANSLITERATION_NUMTOTEXT ( CircledNumber, table_CircledNumber, false)
+TRANSLITERATION_NUMTOTEXT ( TianGan_zh, table_TianGan_zh, false)
+TRANSLITERATION_NUMTOTEXT ( DiZi_zh, table_DiZi_zh, false)
+TRANSLITERATION_NUMTOTEXT ( HangulJamo_ko, table_HangulJamo_ko, true)
+TRANSLITERATION_NUMTOTEXT ( HangulSyllable_ko, table_HangulSyllable_ko, true)
+TRANSLITERATION_NUMTOTEXT ( HangulCircledJamo_ko, table_HangulCircledJamo_ko, true)
+TRANSLITERATION_NUMTOTEXT ( HangulCircledSyllable_ko, table_HangulCircledSyllable_ko, true)
+
+#undef TRANSLITERATION_NUMTOTEXT
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */