Package complex.persistent_window_states

Examples of complex.persistent_window_states.DocumentHandle


                continue;
      }
            String cfg = settings[1];

            // load a document
            DocumentHandle handle = loadDocument(xMSF, settings[0]);

            // first size
            Rectangle rect1 = handle.getDocumentPosSize();

            // resize
            handle.resizeDocument();
            // after resize
            Rectangle rect2 = handle.getDocumentPosSize();

            // disposeManager and start a new office
            if (!disconnect()) return;

            if (!connect()) return;

            // get configuration
            settings = getConfigurationAndLoader(xMSF, els[i]);

            String newCfg = settings[1];

            // load a document
            handle = loadDocument(xMSF, settings[0]);

            Rectangle newRect = handle.getDocumentPosSize();

            // print the settings and window sizes
            log.println("----------------------------");
            log.println("Initial Config String      : " + cfg);
            log.println("Config String after restart: " + newCfg);
View Full Code Here


     * @param docLoader A documet loader
     * @return A handle to the document
     */
    private DocumentHandle loadDocument(XMultiServiceFactory xMSF,
                                                            String docLoader) {
        DocumentHandle docHandle = null;
        try {
            // create component loaader
            XComponentLoader xCompLoader = (XComponentLoader)
                                UnoRuntime.queryInterface(
                                XComponentLoader.class, xMSF.createInstance(
                                "com.sun.star.frame.Desktop"));
            XFramesSupplier xFrameSupp = (XFramesSupplier)UnoRuntime.queryInterface(XFramesSupplier.class, xCompLoader);
            // close all existing frames
            XFrames xFrames = xFrameSupp.getFrames();
            XIndexAccess xAcc = (XIndexAccess)UnoRuntime.queryInterface(XIndexAccess.class, xFrames);
            for ( int i=0; i<xAcc.getCount(); i++ ) {
                XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xAcc.getByIndex(i));
                try {
                    if ( xClose != null ) {
                        xClose.close(false);
                    }
                    else  {
                        failed("Could not query frame for XCloseable!");
                    }
                }
                catch( com.sun.star.uno.Exception e ) {
                    e.printStackTrace((java.io.PrintWriter)log);
                    failed("Could not query frame for XCloseable!");
                }
            }
            docHandle = new DocumentHandle(xCompLoader);
            docHandle.loadDocument(docLoader, false);
        }
        catch(com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
        catch(java.lang.Exception e) {
View Full Code Here

                continue;
      }
            String cfg = settings[1];

            // load a document
            DocumentHandle handle = loadDocument(xMSF, settings[0]);

            // first size
            Rectangle rect1 = handle.getDocumentPosSize();

            // resize
            handle.resizeDocument();
            // after resize
            Rectangle rect2 = handle.getDocumentPosSize();

            // disposeManager and start a new office
            if (!disconnect()) return;

            if (!connect()) return;

            // get configuration
            settings = getConfigurationAndLoader(xMSF, els[i]);

            String newCfg = settings[1];

            // load a document
            handle = loadDocument(xMSF, settings[0]);

            Rectangle newRect = handle.getDocumentPosSize();

            // print the settings and window sizes
            log.println("----------------------------");
            log.println("Initial Config String      : " + cfg);
            log.println("Config String after restart: " + newCfg);
View Full Code Here

     * @param docLoader A documet loader
     * @return A handle to the document
     */
    private DocumentHandle loadDocument(XMultiServiceFactory xMSF,
                                                            String docLoader) {
        DocumentHandle docHandle = null;
        try {
            // create component loaader
            XComponentLoader xCompLoader = (XComponentLoader)
                                UnoRuntime.queryInterface(
                                XComponentLoader.class, xMSF.createInstance(
                                "com.sun.star.frame.Desktop"));
            XFramesSupplier xFrameSupp = (XFramesSupplier)UnoRuntime.queryInterface(XFramesSupplier.class, xCompLoader);
            // close all existing frames
            XFrames xFrames = xFrameSupp.getFrames();
            XIndexAccess xAcc = (XIndexAccess)UnoRuntime.queryInterface(XIndexAccess.class, xFrames);
            for ( int i=0; i<xAcc.getCount(); i++ ) {
                XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xAcc.getByIndex(i));
                try {
                    if ( xClose != null ) {
                        xClose.close(false);
                    }
                    else  {
                        failed("Could not query frame for XCloseable!");
                    }
                }
                catch( com.sun.star.uno.Exception e ) {
                    e.printStackTrace((java.io.PrintWriter)log);
                    failed("Could not query frame for XCloseable!");
                }
            }
            docHandle = new DocumentHandle(xCompLoader);
            docHandle.loadDocument(docLoader, false);
        }
        catch(com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
        catch(java.lang.Exception e) {
View Full Code Here

                continue;
      }
            String cfg = settings[1];

            // load a document
            DocumentHandle handle = loadDocument(xMSF, settings[0]);

            // first size
            Rectangle rect1 = handle.getDocumentPosSize();

            // resize
            handle.resizeDocument();
            // after resize
            Rectangle rect2 = handle.getDocumentPosSize();

            // disposeManager and start a new office
            if (!disconnect()) return;

            if (!connect()) return;

            // get configuration
            settings = getConfigurationAndLoader(xMSF, els[i]);

            String newCfg = settings[1];

            // load a document
            handle = loadDocument(xMSF, settings[0]);

            Rectangle newRect = handle.getDocumentPosSize();

            // print the settings and window sizes
            log.println("----------------------------");
            log.println("Initial Config String      : " + cfg);
            log.println("Config String after restart: " + newCfg);
View Full Code Here

     * @param docLoader A documet loader
     * @return A handle to the document
     */
    private DocumentHandle loadDocument(XMultiServiceFactory xMSF,
                                                            String docLoader) {
        DocumentHandle docHandle = null;
        try {
            // create component loaader
            XComponentLoader xCompLoader = (XComponentLoader)
                                UnoRuntime.queryInterface(
                                XComponentLoader.class, xMSF.createInstance(
                                "com.sun.star.frame.Desktop"));
            XFramesSupplier xFrameSupp = (XFramesSupplier)UnoRuntime.queryInterface(XFramesSupplier.class, xCompLoader);
            // close all existing frames
            XFrames xFrames = xFrameSupp.getFrames();
            XIndexAccess xAcc = (XIndexAccess)UnoRuntime.queryInterface(XIndexAccess.class, xFrames);
            for ( int i=0; i<xAcc.getCount(); i++ ) {
                XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xAcc.getByIndex(i));
                try {
                    if ( xClose != null ) {
                        xClose.close(false);
                    }
                    else  {
                        failed("Could not query frame for XCloseable!");
                    }
                }
                catch( com.sun.star.uno.Exception e ) {
                    e.printStackTrace((java.io.PrintWriter)log);
                    failed("Could not query frame for XCloseable!");
                }
            }
            docHandle = new DocumentHandle(xCompLoader);
            docHandle.loadDocument(docLoader, false);
        }
        catch(com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
        catch(java.lang.Exception e) {
View Full Code Here

                continue;
      }
            String cfg = settings[1];

            // load a document
            DocumentHandle handle = loadDocument(xMSF, settings[0]);

            // first size
            Rectangle rect1 = handle.getDocumentPosSize();

            // resize
            handle.resizeDocument();
            // after resize
            Rectangle rect2 = handle.getDocumentPosSize();

            // disposeManager and start a new office
            if (!disconnect()) return;

            if (!connect()) return;

            // get configuration
            settings = getConfigurationAndLoader(xMSF, els[i]);

            String newCfg = settings[1];

            // load a document
            handle = loadDocument(xMSF, settings[0]);

            Rectangle newRect = handle.getDocumentPosSize();

            // print the settings and window sizes
            log.println("----------------------------");
            log.println("Initial Config String      : " + cfg);
            log.println("Config String after restart: " + newCfg);
View Full Code Here

     * @param docLoader A documet loader
     * @return A handle to the document
     */
    private DocumentHandle loadDocument(XMultiServiceFactory xMSF,
                                                            String docLoader) {
        DocumentHandle docHandle = null;
        try {
            // create component loaader
            XComponentLoader xCompLoader = (XComponentLoader)
                                UnoRuntime.queryInterface(
                                XComponentLoader.class, xMSF.createInstance(
                                "com.sun.star.frame.Desktop"));
            XFramesSupplier xFrameSupp = (XFramesSupplier)UnoRuntime.queryInterface(XFramesSupplier.class, xCompLoader);
            // close all existing frames
            XFrames xFrames = xFrameSupp.getFrames();
            XIndexAccess xAcc = (XIndexAccess)UnoRuntime.queryInterface(XIndexAccess.class, xFrames);
            for ( int i=0; i<xAcc.getCount(); i++ ) {
                XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xAcc.getByIndex(i));
                try {
                    if ( xClose != null ) {
                        xClose.close(false);
                    }
                    else  {
                        failed("Could not query frame for XCloseable!");
                    }
                }
                catch( com.sun.star.uno.Exception e ) {
                    e.printStackTrace((java.io.PrintWriter)log);
                    failed("Could not query frame for XCloseable!");
                }
            }
            docHandle = new DocumentHandle(xCompLoader);
            docHandle.loadDocument(docLoader, false);
        }
        catch(com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
        catch(java.lang.Exception e) {
View Full Code Here

TOP

Related Classes of complex.persistent_window_states.DocumentHandle

Copyright © 2018 www.massapicom. 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.