Examples of XDesktop


Examples of com.sun.star.frame.XDesktop

        try {
     
            XMultiServiceFactory xMSF = tParam.getMSF();
           
            Object xInterface = xMSF.createInstance( "com.sun.star.frame.Desktop" );
            XDesktop dtop = ( XDesktop )UnoRuntime.queryInterface( XDesktop.class,
                xInterface );

            XModel model = dtop.getCurrentFrame().getController().getModel();
            oObj  =
                (XInterface)xMSF.createInstanceWithArguments( "drafts.com.sun.star.script.framework.provider.FunctionProvider", new Object[]{ model } );
           
           
        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.frame.XDesktop

                frameSup = SOF.createTextDoc( null );

                Object oDsk = (
                    (XMultiServiceFactory)tParam.getMSF()).createInstance
                    ("com.sun.star.frame.Desktop") ;
                XDesktop dsk = (XDesktop) UnoRuntime.queryInterface
                    (XDesktop.class, oDsk) ;
                frame = dsk.getCurrentFrame() ;

                Object o = (
                    (XMultiServiceFactory)tParam.getMSF()).createInstance
                    ("com.sun.star.util.URLTransformer") ;
                xURLTrans = (XURLTransformer) UnoRuntime.queryInterface
View Full Code Here

Examples of com.sun.star.frame.XDesktop

    public void _dispose() {
        disposed = false;
        executeMethod("removeEventListener()");

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

Examples of com.sun.star.frame.XDesktop

        }
       
        task.advance(true); //3
       
        if (!isSODocument && isSOOpenable) { //for other documents which are openable through SO, use DocumentInfo service.
            XDesktop desktop = Desktop.getDesktop(xmsf);
            PropertyValue[] props = new PropertyValue[3];
            props[0] = Properties.createProperty("Hidden", Boolean.TRUE);
            props[1] = Properties.createProperty("MacroExecutionMode", new Short(MacroExecMode.NEVER_EXECUTE));
            props[2] = Properties.createProperty("UpdateDocMode", new Short(UpdateDocMode.NO_UPDATE));
            XComponent component = ((XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class,desktop)).loadComponentFromURL(cp_URL,"_default",0,props);
View Full Code Here

Examples of com.sun.star.frame.XDesktop

        this.buildStep6();
        this.buildStep7(proxies, exclamationURL);
        buildStepX();

        this.xMSF = xMSF;
        XDesktop xDesktop = Desktop.getDesktop(xMSF);
        myFrame = OfficeDocument.createNewFrame(xMSF, this);
        Object doc = OfficeDocument.createNewDocument( myFrame, "swriter", false, true );

        loadSettings(doc);
        setSaveSessionName(settings.cp_DefaultSession);
View Full Code Here

Examples of com.sun.star.frame.XDesktop

            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);
                xDesktop.addTerminateListener(listener);
            }
        }
        return xFrame;
    }
View Full Code Here

Examples of com.sun.star.frame.XDesktop

  public static XComponent getActiveComponent(XMultiServiceFactory msf) {
    XComponent ac = null;
    try {
        Object desk = msf.createInstance("com.sun.star.frame.Desktop");
        XDesktop xDesk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,desk);
        ac = xDesk.getCurrentComponent();
    } catch (com.sun.star.uno.Exception e) {
        System.out.println("Couldn't get active Component");
    }
    return ac;
  }
View Full Code Here

Examples of com.sun.star.frame.XDesktop

  }

  public static XFrame getActiveFrame(XMultiServiceFactory msf) {
    try {
        Object desk = msf.createInstance("com.sun.star.frame.Desktop");
        XDesktop xDesk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,desk);
        return xDesk.getCurrentFrame();
    } catch (com.sun.star.uno.Exception e) {
        System.out.println("Couldn't get active Component");
    }

    return null;
View Full Code Here

Examples of com.sun.star.frame.XDesktop

        XMultiServiceFactory msf = (XMultiServiceFactory) param.getMSF();

        if (msf == null) {
            return true;
        } else {
            XDesktop desk = null;

            try {
                desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,
                    msf.createInstance(
                    "com.sun.star.frame.Desktop"));
            } catch (com.sun.star.uno.Exception ue) {
                return false;
            }

            msf = null;

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

                return true;
            } else {
                return false;
            }
View Full Code Here

Examples of com.sun.star.frame.XDesktop

        return msf;
    }

    private synchronized boolean disposeOffice(XMultiServiceFactory msf,
        TestParameters param) {
        XDesktop desk = null;

        debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);

        boolean result = true;

        if (msf != null) {
            try {
                desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,
                    msf.createInstance(
                    "com.sun.star.frame.Desktop"));
                msf = null;

                if (desk != null) {
                    final boolean allClosed = closeAllWindows(desk);

                    if (!allClosed) {
                        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);
                        dbg("the Office has " + closeTime / 1000 + " seconds for closing...");
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.