You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/12/24 09:41:46 UTC

[Issue 126752] New: window can't be closed

https://bz.apache.org/ooo/show_bug.cgi?id=126752

          Issue ID: 126752
        Issue Type: DEFECT
           Summary: window can't be closed
           Product: App Dev
           Version: 4.1.1
          Hardware: All
                OS: Windows 10
            Status: UNCONFIRMED
          Severity: Major
          Priority: P5 (lowest)
         Component: scripting
          Assignee: issues@openoffice.apache.org
          Reporter: 276451132@qq.com

when I use XToolkit create a window , the window can't be closed. here is the
code.


public static void main(String[] args) {
        try {
            XComponentContext xContext;
            XMultiComponentFactory xMCF;
            xContext = Bootstrap.bootstrap();
            if (xContext == null) {
                System.err.println("ERROR: Could not bootstrap default
Office.");
            }
            xMCF = xContext.getServiceManager();
            Object oToolkit =
xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", xContext);
            XToolkit xToolkit = (XToolkit)
UnoRuntime.queryInterface(XToolkit.class, oToolkit);
            com.sun.star.awt.WindowDescriptor aWindowDescriptor = new
com.sun.star.awt.WindowDescriptor();
            aWindowDescriptor.Type = WindowClass.TOP; 
            aWindowDescriptor.Bounds = new Rectangle(200,200,800,600);
            aWindowDescriptor.WindowAttributes =WindowAttribute.MOVEABLE
|WindowAttribute.SIZEABLE |WindowAttribute.CLOSEABLE;
            XWindowPeer xWindowPeer = xToolkit.createWindow(aWindowDescriptor);
        }
        catch (java.lang.Exception e){
            e.printStackTrace();
        }
        finally {
            System.exit( 0 );
        }
    }

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126752] window can't be closed

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126752

--- Comment #1 from xuesuyu <27...@qq.com> ---
here is the code. 
public static void main(String[] args) {
        try {
            XComponentContext xContext;
            XMultiComponentFactory xMCF;
            xContext = Bootstrap.bootstrap();
            if (xContext == null) {
                System.err.println("ERROR: Could not bootstrap default
Office.");
            }
            xMCF = xContext.getServiceManager();
            Object oToolkit =
xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", xContext);
            XToolkit xToolkit = (XToolkit)
UnoRuntime.queryInterface(XToolkit.class, oToolkit);
            com.sun.star.awt.WindowDescriptor aWindowDescriptor = new
com.sun.star.awt.WindowDescriptor();
            aWindowDescriptor.Type = WindowClass.TOP; 
            aWindowDescriptor.Bounds = new Rectangle(200,200,800,600);
            aWindowDescriptor.WindowAttributes =WindowAttribute.MOVEABLE
|WindowAttribute.SIZEABLE |WindowAttribute.CLOSEABLE;
            XWindowPeer xWindowPeer = xToolkit.createWindow(aWindowDescriptor);
            XWindow xwindow = (XWindow)
UnoRuntime.queryInterface(XWindow.class, xWindowPeer);
            xwindow.setVisible(true);
        }
        catch (java.lang.Exception e){
            e.printStackTrace();
        }
        finally {
            System.exit( 0 );
        }
    }

-- 
You are receiving this mail because:
You are the assignee for the issue.