else {
szArgs = new PropertyValue [0];
}
// get the current active window
XFrame xCurFrame = (XFrame)UnoRuntime.queryInterface(XFrame.class, xCompLoader);
// create a new frame
XFrame xFrame = xCurFrame.findFrame("_blank", FrameSearchFlag.CREATE);
// load document in this frame
XComponentLoader xFrameLoader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class, xFrame);
xComp = xFrameLoader.loadComponentFromURL(
docName, "_self", 0, szArgs);
// wait for the document to load.
try {
Thread.sleep(10000);
}
catch(java.lang.InterruptedException e) {}
xWin = xFrame.getContainerWindow();
xWin.addWindowListener(wl);
}
catch(com.sun.star.io.IOException e) {
e.printStackTrace();
return null;