summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/i18n
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/ifc/i18n')
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java4
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XCalendar.java18
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XCharacterClassification.java4
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XCollator.java2
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java26
-rwxr-xr-xqadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java50
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java10
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XIndexEntrySupplier.java2
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XLocaleData.java2
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XNumberFormatCode.java2
-rw-r--r--qadevOOo/tests/java/ifc/i18n/_XTransliteration.java2
11 files changed, 61 insertions, 61 deletions
diff --git a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java
index 7589bc8774c8..9ab9fe9ef5cd 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.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
@@ -152,7 +152,7 @@ public class _XBreakIterator extends MultiMethodTest {
public void _previousCharacters() {
short nCharacterIteratorMode =
com.sun.star.i18n.CharacterIteratorMode.SKIPCHARACTER;
-
+
//Start from position : Travel ... chars : Actual position after :
//How many chars traveled
diff --git a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
index 5453eefa49cb..cc0fd80aaef4 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XCalendar.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
@@ -93,7 +93,7 @@ public class _XCalendar extends MultiMethodTest {
count = new int[installed_locales.length];
oObj.loadDefaultCalendar(installed_locales[0]);
aOriginalDTime = oObj.getDateTime();
-
+
debug = tParam.getBool("DebugIsActive");
}
@@ -105,7 +105,7 @@ public class _XCalendar extends MultiMethodTest {
oObj.loadDefaultCalendar(installed_locales[0]);
oObj.setDateTime(aOriginalDTime);
}
-
+
/**
* Loads default calendar for different locales. <p>
* Has <b> OK </b> status if method loads calendar, that is
@@ -250,7 +250,7 @@ public class _XCalendar extends MultiMethodTest {
public void _setDateTime() {
boolean res = true;
-
+
for (int i=0; i<installed_locales.length; i++) {
String lang = "Language: "+installed_locales[i].Language +
", Country: "+ installed_locales[i].Country +
@@ -320,15 +320,15 @@ public class _XCalendar extends MultiMethodTest {
CalendarFieldIndex.MONTH
};
for (int k=0; k<fields.length;k++) {
-
+
oObj.setDateTime(0.0);
-
+
// save the current values for debug purposes
short[] oldValues = new short[fields.length];
for (int n=0; n < oldValues.length; n++){
oldValues[n] = oObj.getValue(fields[n]);
}
-
+
short set = oObj.getValue(fields[k]);
if (fields[k] == CalendarFieldIndex.MONTH) set = newValue;
oObj.setValue(fields[k],set);
@@ -344,7 +344,7 @@ public class _XCalendar extends MultiMethodTest {
for (int n=0; n < fields.length;n++){
log.println(names[n] + ":" + oObj.getValue(fields[n]));
}
-
+
error += "failed for "+names[k]+" expected "+
set+" gained "+get+" ; \n";
}
@@ -539,7 +539,7 @@ public class _XCalendar extends MultiMethodTest {
*/
public void _isValid() {
boolean res = true;
-
+
oObj.loadDefaultCalendar(installed_locales[0]);
oObj.setValue(CalendarFieldIndex.MONTH, (short) 37);
res &= !oObj.isValid();
diff --git a/qadevOOo/tests/java/ifc/i18n/_XCharacterClassification.java b/qadevOOo/tests/java/ifc/i18n/_XCharacterClassification.java
index e81b8aa68307..0b6ee05ca44c 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XCharacterClassification.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XCharacterClassification.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
@@ -111,7 +111,7 @@ public class _XCharacterClassification extends MultiMethodTest {
public void _toUpper() {
boolean res = true;
char[] characters = new char[]{586,65,97,498,721,4588,772,8413,3404};
- String toCheck = new String(characters);
+ String toCheck = new String(characters);
String get = "";
String exp = "";
diff --git a/qadevOOo/tests/java/ifc/i18n/_XCollator.java b/qadevOOo/tests/java/ifc/i18n/_XCollator.java
index 1905ca9a68ea..b5cd552a74d6 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XCollator.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XCollator.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
diff --git a/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java b/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java
index 8004a4eb97b0..9240ee792c56 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.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
@@ -64,7 +64,7 @@ public class _XExtendedCalendar extends MultiMethodTest {
Locale lo = installed_locales[0];
for (int i=0; i<installed_locales.length; i++) {
// search for "en" and "US"
- if (installed_locales[i].Language.equals("en") &&
+ if (installed_locales[i].Language.equals("en") &&
installed_locales[i].Country.equals("US")) {
lo = installed_locales[i];
useUSENLocale = true;
@@ -73,8 +73,8 @@ public class _XExtendedCalendar extends MultiMethodTest {
log.println("Choose Locale: '" + lo.Language + "', '" + lo.Country + "'");
oObj.loadDefaultCalendar(lo);
}
-
-
+
+
public void _getDisplayString() {
// against regression: the current state is the right one.
boolean result = true;
@@ -83,13 +83,13 @@ public class _XExtendedCalendar extends MultiMethodTest {
String[] expectedStringResult = new String[6];
Calendar cal = new GregorianCalendar();
Date actualDate = cal.getTime();
-
+
SimpleDateFormat sdf = getSDF("yy");
expectedStringResult[0] = "AD" + sdf.format(actualDate);
-
+
sdf = getSDF("yyyy");
expectedStringResult[1] = "AD" + sdf.format(actualDate);
-
+
sdf = getSDF("MM");
expectedStringResult[2] = sdf.format(actualDate);
@@ -101,36 +101,36 @@ public class _XExtendedCalendar extends MultiMethodTest {
else if (month > 10 && month < 13) {quarter = "Q4"; longQuarter = "4th quarter"; }
expectedStringResult[3] = quarter;
expectedStringResult[4] = longQuarter;
-
+
sdf = getSDF("MMMM");
expectedStringResult[5] = sdf.format(actualDate);
-
+
displayString[0] = oObj.getDisplayString(CalendarDisplayCode.SHORT_YEAR_AND_ERA, NativeNumberMode.NATNUM0);
displayString[1] = oObj.getDisplayString(CalendarDisplayCode.LONG_YEAR_AND_ERA, NativeNumberMode.NATNUM0);
displayString[2] = oObj.getDisplayString(CalendarDisplayCode.LONG_MONTH, NativeNumberMode.NATNUM0);
displayString[3] = oObj.getDisplayString(CalendarDisplayCode.SHORT_QUARTER, NativeNumberMode.NATNUM0);
displayString[4] = oObj.getDisplayString(CalendarDisplayCode.LONG_QUARTER, NativeNumberMode.NATNUM0);
displayString[5] = oObj.getDisplayString(CalendarDisplayCode.LONG_MONTH_NAME, NativeNumberMode.NATNUM0);
-
+
for (int i=0; i<displayString.length; i++) {
boolean locResult = false;
if (useUSENLocale) {
locResult = displayString[i].equals(expectedStringResult[i]);
if (!locResult)
- log.println("getDisplayString() result " + i + ": '" + displayString[i]
+ log.println("getDisplayString() result " + i + ": '" + displayString[i]
+ "', expected: '" + expectedStringResult[i] + "'");
result &= locResult;
}
else { // no defaults for other locales, just expect a String
locResult &= displayString[i] != null;
if (!locResult)
- log.println("getDisplayString() result " + i + " was 'null'");
+ log.println("getDisplayString() result " + i + " was 'null'");
result &= locResult;
}
}
tRes.tested("getDisplayString()", result);
}
-
+
private SimpleDateFormat getSDF(String format){
if (useUSENLocale) return new SimpleDateFormat(format, java.util.Locale.US);
return new SimpleDateFormat(format);
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";
diff --git a/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java b/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java
index caea6c06541a..087710c79420 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.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
@@ -38,11 +38,11 @@ public class _XExtendedTransliteration extends MultiMethodTest {
public XExtendedTransliteration oObj = null;
// private Locale loc = new Locale("ja", "JP", "") ;
private Locale loc = new Locale("en", "US", "") ;
-
+
public void before() {
oObj.loadModule(TransliterationModules.LOWERCASE_UPPERCASE, loc);
}
-
+
/**
* Check lowercase - uppercase conversion of chars
*/
@@ -62,7 +62,7 @@ public class _XExtendedTransliteration extends MultiMethodTest {
}
tRes.tested("transliterateChar2Char()", result);
}
-
+
/**
* Check lowercase - uppercase conversion of char to string
*/
@@ -77,7 +77,7 @@ public class _XExtendedTransliteration extends MultiMethodTest {
result &= out.equals("$");
tRes.tested("transliterateChar2String()", result);
}
-
+
/**
* Check lowercase - uppercase conversion of strings
*/
diff --git a/qadevOOo/tests/java/ifc/i18n/_XIndexEntrySupplier.java b/qadevOOo/tests/java/ifc/i18n/_XIndexEntrySupplier.java
index 903068b152aa..124004934271 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XIndexEntrySupplier.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XIndexEntrySupplier.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
diff --git a/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java b/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java
index fcb1f4b266a5..9df9a573715b 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XLocaleData.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
diff --git a/qadevOOo/tests/java/ifc/i18n/_XNumberFormatCode.java b/qadevOOo/tests/java/ifc/i18n/_XNumberFormatCode.java
index 0566e27112c4..7f35409a3f89 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XNumberFormatCode.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XNumberFormatCode.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
diff --git a/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java b/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java
index ea8502d31f29..b7c0893e878c 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XTransliteration.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