String expected = testdata.get("expected");
String output = "";
int storageId = getStorageId(location);
XModel ctx = null;
if (!context.equals("null"))
ctx = loadDocument(context);
HashMap map = new HashMap();
map.put("SCRIPTING_DOC_STORAGE_ID", new Integer(storageId));
map.put("SCRIPTING_DOC_URI", "hahaha");
if (ctx != null)
map.put("SCRIPTING_DOC_REF", ctx);
Parameters params = new Parameters(map);
Object[] args = new Object[0];
Object[][] result = new Object[1][0];
result[0] = new Object[0];
short[][] num = new short[1][0];
num[0] = new short[0];
log.println(description + ": " + logicalname);
try {
Object ret = oObj.invoke(logicalname, params, args, num, result);
log.println("return type is: " + ret.getClass().getName() +
", value is: " + ret.toString());
output = "success";
}
catch (com.sun.star.lang.IllegalArgumentException iae) {
log.println("Couldn't invoke script:" + iae);
output = "com.sun.star.lang.IllegalArgumentException";
}
catch (com.sun.star.script.CannotConvertException cce) {
log.println("Couldn't invoke script:" + cce);
output = "com.sun.star.script.CannotConvertException";
}
catch (com.sun.star.reflection.InvocationTargetException ite) {
log.println("Couldn't invoke script:" + ite);
output = "com.sun.star.reflection.InvocationTargetException";
}
catch (com.sun.star.uno.RuntimeException re) {
log.println("Couldn't invoke script:" + re);
output = "com.sun.star.uno.RuntimeException";
}
if (ctx != null)
ctx.dispose();
log.println("expected: " + expected + ", output: " + output);
if (output.equals(expected))
return true;
else