summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java')
-rwxr-xr-xqadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java50
1 files changed, 25 insertions, 25 deletions
diff --git a/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java b/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java
index 2443156b0baf..abdce31d7dc6 100755
--- a/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
short result1 = oObj.compareIndexEntry(val1, "", locale, val1, "", locale);
short result2 = oObj.compareIndexEntry(val1, "", locale, val2, "", locale);
short result3 = oObj.compareIndexEntry(val2, "", locale, val1, "", locale);
-
+
tRes.tested("compareIndexEntry()", result1 == 0 && result2 + result3 == 0);
}
@@ -60,21 +60,21 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
requiredMethod("getLocaleList()");
boolean result = true;
- boolean locResult = false;
-
+ boolean locResult = false;
+
for (int i = 0; i < locales.length; i++) {
String[] algNames = oObj.getAlgorithmList(locales[i]);
algorithms.put(new Integer(i), algNames);
locResult = algNames != null && algNames.length > 0;
System.out.println("Locale " + i + ": " + locales[i].Country+","+locales[i].Language);
-
+
for (int j=0; j<algNames.length; j++) {
System.out.println("\tAlgorithm " + j + ": " + algNames[j]);
}
-
+
if (!locResult) {
- log.println("No Algorithm found for " + locales[i].Country +
+ log.println("No Algorithm found for " + locales[i].Country +
"," + locales[i].Language);
}
@@ -94,10 +94,10 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
for (int j = 0; j < algorithms.size(); j++) {
String[] algs = (String[])algorithms.get(new Integer(j));
for (int k=0;k<algs.length;k++) {
- log.println("\t Algorythm :" +
+ log.println("\t Algorythm :" +
algs[k]);
oObj.loadAlgorithm(locales[i], algs[k], CollatorOptions.CollatorOptions_IGNORE_CASE);
- log.println("\t\t Get: " +
+ log.println("\t\t Get: " +
oObj.getIndexKey(getIndexFor, "", locales[i]));
}
}
@@ -123,8 +123,8 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
boolean res = true;
Locale loc = new Locale("zh", "CN", "");
-
- for (int i = 0;i<UnicodeStringPair.getValCount();i++) {
+
+ for (int i = 0;i<UnicodeStringPair.getValCount();i++) {
char[] c = new char[]{UnicodeStringPair.getUnicodeValue(i)};
@@ -144,8 +144,8 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
}
/*
- * loads all algorithms available in all language.
- * Is OK if no exception occurs and the method returns
+ * loads all algorithms available in all language.
+ * Is OK if no exception occurs and the method returns
* true for each valid algorithm and false otherwise
*/
public void _loadAlgorithm() {
@@ -155,13 +155,13 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
for (int i = 0; i < algorithms.size(); i++) {
String[] names = (String[]) algorithms.get(new Integer(i));
- log.println("loading algorithms for " + locales[i].Country +
+ log.println("loading algorithms for " + locales[i].Country +
"," + locales[i].Language);
for (int j = 0; j < names.length; j++) {
log.println("\t Loading " + names[j]);
- boolean localres = oObj.loadAlgorithm(locales[i], names[j],
+ boolean localres = oObj.loadAlgorithm(locales[i], names[j],
CollatorOptions.CollatorOptions_IGNORE_CASE);
if (!localres) {
@@ -175,7 +175,7 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
/* log.println("\tTrying to load 'dummy' algorithm");
- boolean localres = !oObj.loadAlgorithm(locales[i], "dummy",
+ boolean localres = !oObj.loadAlgorithm(locales[i], "dummy",
CollatorOptions.CollatorOptions_IGNORE_WIDTH);
if (!localres) {
@@ -191,7 +191,7 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
}
/*
- * checks the method usePhoneticEntry(). Only the languages ja, ko and zh
+ * checks the method usePhoneticEntry(). Only the languages ja, ko and zh
* should return true. Has OK state if exactly this is the case.
*/
public void _usePhoneticEntry() {
@@ -202,8 +202,8 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
for (int i = 0; i < locales.length; i++) {
boolean expected = false;
- if (locales[i].Language.equals("ja") ||
- locales[i].Language.equals("ko") ||
+ if (locales[i].Language.equals("ja") ||
+ locales[i].Language.equals("ko") ||
locales[i].Language.equals("zh")) {
expected = true;
}
@@ -221,7 +221,7 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
tRes.tested("usePhoneticEntry()", res);
}
-
+
/**
* Helper class to handle the phonetic equivalence of unicode characters
* This class delivers an amount oif unicode characters and the equivalent phonetics
@@ -231,27 +231,27 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest {
final static int valCount = 78;
static String[] sStringEquivalence = null;
static char[] iUnicodeEquivalence = null;
-
+
static {
sStringEquivalence = new String[valCount];
iUnicodeEquivalence = new char[valCount];
fillValues();
}
-
+
public static int getValCount() {
return valCount;
}
-
+
public static String getExpectedPhoneticString(int index) {
if (index >= valCount) return null;
return sStringEquivalence[index];
}
-
+
public static char getUnicodeValue(int index) {
if (index > valCount) return 0;
return iUnicodeEquivalence[index];
}
-
+
private static void fillValues() {
iUnicodeEquivalence[0] = 20049; sStringEquivalence[0] = "zhong";
iUnicodeEquivalence[1] = 19968; sStringEquivalence[1] = "yi";