summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18npool/source/collator/makefile.mk7
-rw-r--r--i18npool/source/indexentry/data/indexdata_ja_phonetic.h147
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx73
-rw-r--r--i18npool/source/indexentry/makefile.mk5
-rw-r--r--i18npool/source/localedata/data/ja_JP.xml4
-rw-r--r--i18npool/source/registerservices/registerservices.cxx12
6 files changed, 239 insertions, 9 deletions
diff --git a/i18npool/source/collator/makefile.mk b/i18npool/source/collator/makefile.mk
index 9a2e15b087ab..026366cc1e5a 100644
--- a/i18npool/source/collator/makefile.mk
+++ b/i18npool/source/collator/makefile.mk
@@ -2,9 +2,9 @@
#*
#* $RCSfile: makefile.mk,v $
#*
-#* $Revision: 1.2 $
+#* $Revision: 1.3 $
#*
-#* last change: $Author: er $ $Date: 2002-03-26 17:02:11 $
+#* last change: $Author: khong $ $Date: 2002-05-24 22:31:36 $
#*
#* The Contents of this file are made available subject to the terms of
#* either of the following licenses
@@ -91,7 +91,8 @@ SLOFILES= \
$(SLO)$/collator_zh_TW_charset.obj \
$(SLO)$/collator_ko_dict.obj \
$(SLO)$/collator_ko_charset.obj \
- $(SLO)$/collator_ja_charset.obj
+ $(SLO)$/collator_ja_charset.obj \
+ $(SLO)$/collator_ja_phonetic.obj
# --- Targets ------------------------------------------------------
diff --git a/i18npool/source/indexentry/data/indexdata_ja_phonetic.h b/i18npool/source/indexentry/data/indexdata_ja_phonetic.h
new file mode 100644
index 000000000000..717b263743bf
--- /dev/null
+++ b/i18npool/source/indexentry/data/indexdata_ja_phonetic.h
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * $RCSfile: indexdata_ja_phonetic.h,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: khong $ $Date: 2002-05-24 22:34:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <sal/types.h>
+
+static sal_Unicode idxStr[] = {
+ 0x0000, 0x0000, // ( 0)
+ 0x3042, 0x0000, // ( 2)
+ 0x3044, 0x0000, // ( 4)
+ 0x3046, 0x0000, // ( 6)
+ 0x3048, 0x0000, // ( 8)
+ 0x304A, 0x0000, // (10)
+ 0x304B, 0x0000, // (12)
+ 0x304D, 0x0000, // (14)
+ 0x304F, 0x0000, // (16)
+ 0x3051, 0x0000, // (18)
+ 0x3053, 0x0000, // (20)
+ 0x3055, 0x0000, // (22)
+ 0x3057, 0x0000, // (24)
+ 0x3059, 0x0000, // (26)
+ 0x305B, 0x0000, // (28)
+ 0x305D, 0x0000, // (30)
+ 0x305F, 0x0000, // (32)
+ 0x3061, 0x0000, // (34)
+ 0x3064, 0x0000, // (36)
+ 0x3066, 0x0000, // (38)
+ 0x3068, 0x0000, // (40)
+ 0x306A, 0x0000, // (42)
+ 0x306B, 0x0000, // (44)
+ 0x306C, 0x0000, // (46)
+ 0x306D, 0x0000, // (48)
+ 0x306E, 0x0000, // (50)
+ 0x306F, 0x0000, // (52)
+ 0x3072, 0x0000, // (54)
+ 0x3075, 0x0000, // (56)
+ 0x3078, 0x0000, // (58)
+ 0x307B, 0x0000, // (60)
+ 0x307E, 0x0000, // (62)
+ 0x307F, 0x0000, // (64)
+ 0x3080, 0x0000, // (66)
+ 0x3081, 0x0000, // (68)
+ 0x3082, 0x0000, // (70)
+ 0x3084, 0x0000, // (72)
+ 0x3086, 0x0000, // (74)
+ 0x3088, 0x0000, // (76)
+ 0x3089, 0x0000, // (78)
+ 0x308A, 0x0000, // (80)
+ 0x308B, 0x0000, // (82)
+ 0x308C, 0x0000, // (84)
+ 0x308D, 0x0000, // (86)
+ 0x308F, 0x0000, // (88)
+ 0x3090, 0x0000, // (90)
+ 0x3091, 0x0000, // (92)
+ 0x3092, 0x0000, // (94)
+ 0x3093, 0x0000, // (96)
+};
+
+static sal_uInt16 idx1[] = {
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // 0000
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // 1000
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // 2000
+ 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // 3000
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFF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FF, 0xFFFF, // b000
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // c000
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // d000
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // e000
+ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0100, // f000
+};
+static sal_uInt16 idx2[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3000
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3010
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3020
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3030
+ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, // 3040
+ 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, // 3050
+ 32, 34, 34, 36, 36, 36, 38, 38, 40, 40, 42, 44, 46, 48, 50, 52, // 3060
+ 52, 52, 54, 54, 54, 56, 56, 56, 58, 58, 58, 60, 60, 60, 62, 64, // 3070
+ 66, 68, 70, 72, 72, 74, 74, 76, 76, 78, 80, 82, 84, 86, 88, 88, // 3080
+ 90, 92, 94, 96, 6, 12, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3090
+ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, // 30a0
+ 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, // 30b0
+ 32, 34, 34, 36, 36, 36, 38, 38, 40, 40, 42, 44, 46, 48, 50, 52, // 30c0
+ 52, 52, 54, 54, 54, 56, 56, 56, 58, 58, 58, 60, 60, 60, 62, 64, // 30d0
+ 66, 68, 70, 72, 72, 74, 74, 76, 76, 78, 80, 82, 84, 86, 88, 88, // 30e0
+ 90, 92, 94, 96, 6, 12, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 30f0
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ff00
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ff10
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ff20
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ff30
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ff40
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ff50
+ 0, 0, 0, 0, 0, 0, 94, 2, 4, 6, 8, 10, 72, 74, 76, 36, // ff60
+ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, // ff70
+ 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, // ff80
+ 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 96, 0, 0, // ff90
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ffa0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ffb0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ffc0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ffd0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ffe0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // fff0
+};
+
diff --git a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
new file mode 100644
index 000000000000..b1d3954b9460
--- /dev/null
+++ b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * $RCSfile: indexentrysupplier_ja_phonetic.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: khong $Date: $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define INDEXENTRYSUPPLIER_ja_phonetic
+#include <indexentrysupplier_asian.hxx>
+#include <data/indexdata_ja_phonetic.h>
+
+namespace com { namespace sun { namespace star { namespace i18n {
+
+rtl::OUString SAL_CALL IndexEntrySupplier_ja_phonetic::getIndexCharacter( const rtl::OUString& rIndexEntry,
+ const lang::Locale& rLocale, const rtl::OUString& rSortAlgorithm ) throw (com::sun::star::uno::RuntimeException) {
+ return getIndexString(rIndexEntry, idxStr, idx1, idx2);
+}
+
+} } } }
diff --git a/i18npool/source/indexentry/makefile.mk b/i18npool/source/indexentry/makefile.mk
index 745df4befc30..488c96268b93 100644
--- a/i18npool/source/indexentry/makefile.mk
+++ b/i18npool/source/indexentry/makefile.mk
@@ -2,9 +2,9 @@
#*
#* $RCSfile: makefile.mk,v $
#*
-#* $Revision: 1.9 $
+#* $Revision: 1.10 $
#*
-#* last change: $Author: khong $ $Date: 2002-05-13 21:53:36 $
+#* last change: $Author: khong $ $Date: 2002-05-24 22:36:59 $
#*
#* The Contents of this file are made available subject to the terms of
#* either of the following licenses
@@ -84,6 +84,7 @@ SLOFILES= \
$(SLO)$/indexentrysupplier_zh_TW_radical.obj \
$(SLO)$/indexentrysupplier_zh_TW_stroke.obj \
$(SLO)$/indexentrysupplier_ko_dict.obj \
+ $(SLO)$/indexentrysupplier_ja_phonetic.obj \
$(SLO)$/indexentrysupplier_western.obj \
$(SLO)$/indexentrysupplier_alphanumeric.obj \
$(SLO)$/indexentrysupplier_da_alphanumeric.obj \
diff --git a/i18npool/source/localedata/data/ja_JP.xml b/i18npool/source/localedata/data/ja_JP.xml
index e32d9a37068e..8d0ed234447e 100644
--- a/i18npool/source/localedata/data/ja_JP.xml
+++ b/i18npool/source/localedata/data/ja_JP.xml
@@ -181,8 +181,8 @@
</FormatElement>
</LC_FORMAT>
<LC_COLLATION>
-<Collator unoid="charset" default="true">
-</Collator>
+<Collator unoid="charset" default="true"/>
+<Collator unoid="phonetic" default="false"/>
<CollationOptions>
<TransliterationModules>IGNORE_CASE</TransliterationModules>
</CollationOptions>
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index 9ed47f400889..8224494ebbb6 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: registerservices.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: khong $ $Date: 2002-05-20 23:15:34 $
+ * last change: $Author: khong $ $Date: 2002-05-24 22:38:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -179,6 +179,7 @@ IMPL_CREATEINSTANCE( IndexEntrySupplier_zh_zhuyin )
IMPL_CREATEINSTANCE( IndexEntrySupplier_zh_TW_radical )
IMPL_CREATEINSTANCE( IndexEntrySupplier_zh_TW_stroke )
IMPL_CREATEINSTANCE( IndexEntrySupplier_ko_dict )
+IMPL_CREATEINSTANCE( IndexEntrySupplier_ja_phonetic )
IMPL_CREATEINSTANCE( IndexEntrySupplier_alphanumeric )
IMPL_CREATEINSTANCE( IndexEntrySupplier_nl_alphanumeric )
IMPL_CREATEINSTANCE( IndexEntrySupplier_da_alphanumeric )
@@ -216,6 +217,7 @@ IMPL_CREATEINSTANCE( Collator_ko_dict )
IMPL_CREATEINSTANCE( Collator_ko_charset )
IMPL_CREATEINSTANCE( Collator_zh_charset )
IMPL_CREATEINSTANCE( Collator_ja_charset )
+IMPL_CREATEINSTANCE( Collator_ja_phonetic )
IMPL_CREATEINSTANCE( Collator_zh_TW_charset )
IMPL_CREATEINSTANCE( Collator_de_phonebook )
@@ -364,6 +366,9 @@ static const struct InstancesArray {
{ "com.sun.star.i18n.IndexEntrySupplier_ko_charset",
"com.sun.star.i18n.IndexEntrySupplier_ko_charset",
&IndexEntrySupplier_ko_dict_CreateInstance }, // share same table with ko_dict
+ { "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic",
+ "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic",
+ &IndexEntrySupplier_ja_phonetic_CreateInstance },
{ "com.sun.star.i18n.IndexEntrySupplier_da_alphanumeric",
"com.sun.star.i18n.IndexEntrySupplier_da_alphanumeric",
&IndexEntrySupplier_da_alphanumeric_CreateInstance },
@@ -469,6 +474,9 @@ static const struct InstancesArray {
{ "com.sun.star.i18n.Collator_ko_charset",
"com.sun.star.i18n.Collator_ko_charset",
&Collator_ko_charset_CreateInstance },
+ { "com.sun.star.i18n.Collator_ja_phonetic",
+ "com.sun.star.i18n.Collator_ja_phonetic",
+ &Collator_ja_phonetic_CreateInstance },
{ "com.sun.star.i18n.Collator_ja_charset",
"com.sun.star.i18n.Collator_ja_charset",
&Collator_ja_charset_CreateInstance },