private boolean checkXConversionDictionaryList(Object list) {
boolean res = true;
XConversionDictionaryList xCList = (XConversionDictionaryList) UnoRuntime.queryInterface(
XConversionDictionaryList.class,
list);
XConversionDictionary xDict = null;
try {
xDict = xCList.addNewDictionary("addNewDictionary", aLocale,
dictType);
} catch (com.sun.star.lang.NoSupportException e) {
res = false;
assure("Couldn't add Dictionary", false);
} catch (com.sun.star.container.ElementExistException e) {
res = false;
assure("Couldn't add Dictionary", false);
}
try {
xCList.addNewDictionary("addNewDictionary", aLocale, dictType);
res = false;
assure("wrong exception while adding Dictionary again", false);
} catch (com.sun.star.lang.NoSupportException e) {
res = false;
assure("wrong exception while adding Dictionary again", false);
} catch (com.sun.star.container.ElementExistException e) {
}
boolean localRes = checkNameContainer(xCList.getDictionaryContainer());
res &= localRes;
assure("getDictionaryContainer didn't work as expected", localRes);
String FileToLoad = util.utils.getFullTestURL("hangulhanja.sxc");
XComponent xDoc = DesktopTools.loadDoc(xMSF, FileToLoad,
new PropertyValue[] { });
XSpreadsheet xSheet = getSheet(xDoc);
boolean done = false;
int counter = 0;
int numberOfWords = 0;
String wordToCheck = "";
String expectedConversion = "";
while (!done) {
String[] HangulHanja = getLeftAndRight(counter, xSheet);
done = (HangulHanja[0].equals(""));
counter++;
if (!done) {
numberOfWords++;
try {
xDict.addEntry(HangulHanja[0], HangulHanja[1]);
wordToCheck += HangulHanja[0];
expectedConversion += HangulHanja[1];
} catch (com.sun.star.lang.IllegalArgumentException e) {
e.printStackTrace();
res = false;
assure("Exception while checking adding entry", false);
} catch (com.sun.star.container.ElementExistException e) {
//ignored
}
}
}
try {
xDict.addEntry(wordToCheck, expectedConversion);
} catch (com.sun.star.lang.IllegalArgumentException e) {
e.printStackTrace();
res = false;
assure("Exception while checking adding entry", false);
} catch (com.sun.star.container.ElementExistException e) {