public static XFrame createNewFrame(XMultiServiceFactory xMSF, XTerminateListener listener) {
return createNewFrame(xMSF, listener, "_blank");
}
public static XFrame createNewFrame(XMultiServiceFactory xMSF, XTerminateListener listener, String FrameName) {
XFrame xFrame = null;
if (FrameName.equalsIgnoreCase("WIZARD_LIVE_PREVIEW")) {
xFrame = createNewPreviewFrame(xMSF, listener);
} else {
XFrame xF = (XFrame) UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xMSF));
xFrame = xF.findFrame(FrameName, 0);
if (listener != null) {
XFramesSupplier xFS = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xF);
XFrames xFF = xFS.getFrames();
xFF.remove(xFrame);
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xF);