public static void openInOpenOffice(Component parent,final String fName, XFrame xFrame) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.io.IOException {
if (!Configuration.isUseExec()) {
String sLoadUrl = Util.fileNameToOOoURL(fName);
XComponentLoader loader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class,xFrame);
XComponent xComp = loader.loadComponentFromURL(sLoadUrl, "_blank", 0, new PropertyValue[0]);
XTextDocument aTextDocument = (XTextDocument)UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class, xComp);
} else {
// bad luck, we need to use direct method to run OO.org :-(
String cmd[] = {"open", Configuration.getPathForOOoExec(parent) , fName};
try {