Package com.sun.star.lang

Examples of com.sun.star.lang.XComponent


        log.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
        log.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
        log.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
        log.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);

        XComponent xComp = (XComponent)UnoRuntime.queryInterface(
                                    XComponent.class, xSpreadsheetDoc);
        xComp.dispose();
    }
View Full Code Here


        log.println("ChildCount: "+childCount);

        if (childCount != 0)
            failed("Could access footer although it was not visible on page.");

        XComponent xComp = (XComponent)UnoRuntime.queryInterface(
                                        XComponent.class, xSpreadsheetDoc);
        xComp.dispose();

    }
View Full Code Here

        log.println("BoundsX= "+accC.getBounds().X);
        log.println("BoundsY= "+accC.getBounds().Y);
        log.println("BoundsWidth= "+accC.getBounds().Width);
        log.println("BoundsHeight= "+accC.getBounds().Height);

        XComponent xComp = (XComponent)UnoRuntime.queryInterface(
                                        XComponent.class, xSpreadsheetDoc);
        xComp.dispose();

    }
View Full Code Here

     * are accessible.
     */
    public void checkPreviewShape() {
        SOfficeFactory SOF = SOfficeFactory.getFactory( mXMSF );
        XSpreadsheetDocument xSpreadsheetDoc = null;
        XComponent xComp = null;
        XInterface oObj = null;

        try {
            String docName = "calcshapes.sxc";
            log.println("Loading a spreadsheetdocument.");
            String url = utils.getFullURL(
                        (String)param.get("TestDocumentPath") + "/" + docName);
            log.println("loading document '" + url + "'");
            xComp = SOF.loadDocument(url);

        } catch (com.sun.star.uno.Exception e) {
            failed(e.getMessage());
            return;
        }

        try {
            Thread.currentThread().sleep(500) ;
        } catch (InterruptedException e) {
            System.out.println("While waiting :" + e) ;
        }

        if (xComp == null) {
            failed("loading document failed.");
            return;
        }

        xSpreadsheetDoc = (XSpreadsheetDocument)UnoRuntime.queryInterface(
                                            XSpreadsheetDocument.class, xComp);
        XModel aModel = (XModel)
            UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc);

        XController xController = aModel.getCurrentController();

        // switching to 'Page Preview' mode
        try {
            XDispatchProvider xDispProv = (XDispatchProvider)
                UnoRuntime.queryInterface(XDispatchProvider.class, xController);
            XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
                UnoRuntime.queryInterface(XURLTransformer.class,
            mXMSF.createInstance("com.sun.star.util.URLTransformer"));
            // Because it's an in/out parameter we must use an
            // array of URL objects.
            URL[] aParseURL = new URL[1];
            aParseURL[0] = new URL();
            aParseURL[0].Complete = ".uno:PrintPreview";
            xParser.parseStrict(aParseURL);
            URL aURL = aParseURL[0];
            XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
            if(xDispatcher != null)
                xDispatcher.dispatch( aURL, null );
        } catch (com.sun.star.uno.Exception e) {
            failed("Couldn't change mode");
            return;
        }

        try {
            Thread.currentThread().sleep(500) ;
        } catch (InterruptedException e) {
            System.out.println("While waiting :" + e) ;
        }



        log.println("Press any key when a shape is on top.");
        try{
            byte[]b = new byte[16];
            System.in.read(b);
        } catch (Exception e) {
            e.printStackTrace();
        }

        // get the accessible content
        AccessibilityTools at = new AccessibilityTools();

        XWindow xWindow = at.getCurrentWindow(mXMSF, aModel);
        XAccessible xRoot = at.getAccessibleObject(xWindow);
        XAccessible parent = null;

        try {
            XAccessibleContext con = at.getAccessibleObjectForRole
                                (xRoot, AccessibleRole.SHAPE, "");
            log.println("Name of AccessibleContext: " + con.getAccessibleName());
            oObj = con;
        } catch (Exception e) {
            failed(e.getMessage());
            return;
        }

        log.println("ImplementationName: " + utils.getImplName(oObj));
        util.dbg.printInterfaces(oObj);

        xComp.dispose();
    }
View Full Code Here

    /**
    * Disposes Spreadsheet document.
    */
    protected void cleanup( TestParameters tParam, PrintWriter log ) {
        log.println( "    disposing xSheetDoc " );
        XComponent oComp = (XComponent)
            UnoRuntime.queryInterface (XComponent.class, xSheetDoc) ;
        util.DesktopTools.closeDoc(oComp);
    }
View Full Code Here

    /**
    * Disposes Spreadsheet document.
    */
    protected void cleanup( TestParameters tParam, PrintWriter log ) {
        log.println( "    disposing xSheetDoc " );
        XComponent oComp = (XComponent)
            UnoRuntime.queryInterface (XComponent.class, xSheetDoc) ;
        util.DesktopTools.closeDoc(oComp);
    }
View Full Code Here

    /**
    * Disposes Spreadsheet document.
    */
    protected void cleanup( TestParameters tParam, PrintWriter log ) {
        log.println( "    disposing xSheetDoc " );
        XComponent oComp = (XComponent)
            UnoRuntime.queryInterface (XComponent.class, xSheetDoc) ;
        util.DesktopTools.closeDoc(oComp);
    }
View Full Code Here

    * Disposes Spreadsheet document.
    */
    protected void cleanup(TestParameters tParam, PrintWriter log) {
        log.println("    disposing xSheetDoc ");

        XComponent oComp = (XComponent) UnoRuntime.queryInterface(
                                   XComponent.class, xSheetDoc);
        util.DesktopTools.closeDoc(oComp);
    }
View Full Code Here

        log.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
        log.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
        log.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
        log.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);

        XComponent xComp = (XComponent)UnoRuntime.queryInterface(
                                    XComponent.class, xSpreadsheetDoc);
        xComp.dispose();
    }
View Full Code Here

        log.println("ChildCount: "+childCount);

        if (childCount != 0)
            failed("Could access footer although it was not visible on page.");

        XComponent xComp = (XComponent)UnoRuntime.queryInterface(
                                        XComponent.class, xSpreadsheetDoc);
        xComp.dispose();

    }
View Full Code Here

TOP

Related Classes of com.sun.star.lang.XComponent

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.