Package com.sun.star.frame

Examples of com.sun.star.frame.XDesktop.terminate()


                 "is still running, we are at work"));
    
            // no longer at work
            atWork = false;
            // once more: try to terminate
            terminated = xDesktop.terminate();
            System.out.println("The Office " +
                (terminated == true ?
                    "has been terminated" :
                    "is still running. Someone else prevents termination, " +
                    "e.g. the quickstarter"));
View Full Code Here


            msf = null;

            if (desk != null)
            {
                desk.terminate();

                return true;
            }
            else
            {
View Full Code Here

                        dbg("Couldn't close all office windows!");
                    }

                    dbg("Trying to terminate the desktop");

                    desk.terminate();
                    dbg("Desktop terminated");

                    try
                    {
                        final int closeTime = param.getInt(util.PropertyName.OFFICE_CLOSE_TIME_OUT);
View Full Code Here

        disposed = false;

        log.println( "begin dispose" + Thread.currentThread());
        XDesktop oDesk = (XDesktop) tEnv.get("Desktop");
        if (oDesk !=null) {
            oDesk.terminate();
        }
        else {
            if (altDispose == null)
                oObj.dispose();
            else
View Full Code Here

            XDesktop desk = null;
            desk = (XDesktop) UnoRuntime.queryInterface(
                    XDesktop.class, xMSF.createInstance(
                    "com.sun.star.frame.Desktop"));
            xMSF = null;
            desk.terminate();
            log.println("Waiting " + iOfficeCloseTime + " milliseconds for the Office to close down");
            try {
                Thread.sleep(iOfficeCloseTime);
            }
            catch(java.lang.InterruptedException e) {}
View Full Code Here

            failed("Could not create a desktop instance.");
        }
        int step = 0;
        try {
            log.println("Start the termination of the Office.");
            xDesktop.terminate();
            for ( ; step<10000; step++ ) {
                Object o = xMSF.createInstance("com.sun.star.frame.Desktop");
            }
        }
        catch(com.sun.star.lang.DisposedException e) {
View Full Code Here

        try {
            XDesktop desk = null;
            desk = (XDesktop) UnoRuntime.queryInterface(
                    XDesktop.class, xMSF.createInstance(
                    "com.sun.star.frame.Desktop"));
            desk.terminate();
            log.println("Waiting " + iOfficeCloseTime + " milliseconds for the Office to close down");
            try {
                Thread.sleep(iOfficeCloseTime);
            }
            catch(java.lang.InterruptedException e) {}
View Full Code Here

                 "is still running, we are at work"));
    
            // no longer at work
            atWork = false;
            // once more: try to terminate
            terminated = xDesktop.terminate();
            System.out.println("The Office " +
                (terminated == true ?
                    "has been terminated" :
                    "is still running. Someone else prevents termination, " +
                    "e.g. the quickstarter"));
View Full Code Here

            TerminateListener terminateListener = new TerminateListener();
            xDesktop.addTerminateListener(terminateListener);
           
            atWork = true;
            // try to terminate while we are at work
            boolean terminated = xDesktop.terminate();
            System.out.println("The Office " +
                (terminated == true ?
                 "has been terminated" :
                 "is still running, we are at work"));
    
View Full Code Here

            XComponentContext xRemoteContext = getRemoteContext(xUrlResolver);

            // get desktop to terminate office
            Object desktop = xRemoteContext.getServiceManager().createInstanceWithContext("com.sun.star.frame.Desktop",xRemoteContext);
            XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, desktop);
            xDesktop.terminate();
        }
        catch (Exception e) {
            // Bad luck, unable to terminate office
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.