}
catch(com.sun.star.uno.Exception e) {
failed("Could not create a desktop instance.");
}
XComponentLoader xDesktopLoader = (XComponentLoader)
UnoRuntime.queryInterface(XComponentLoader.class, xDesktop);
System.out.println("xDektopLoader is null: " + (xDesktopLoader == null));
PropertyValue[] val = new PropertyValue[0];
String workingDir = (String)param.get("WorkingDir") + System.getProperty("file.separator") + mFileName;
System.out.println("Working dir: " + workingDir);
String fileUrl = util.utils.getFullURL(workingDir);
System.out.println("File Url: " + fileUrl);
try {
xDesktopLoader.loadComponentFromURL(fileUrl, "_blank", 0, val);
}
catch(com.sun.star.io.IOException e) {
failed("Could not load document");
}
catch(com.sun.star.lang.IllegalArgumentException e) {
failed("Could not load document");
}
// try again: headless mode defect now?
try {
xDesktopLoader.loadComponentFromURL(fileUrl, "_blank", 0, val);
}
catch(com.sun.star.io.IOException e) {
failed("Could not load document");
}
catch(com.sun.star.lang.IllegalArgumentException e) {