Package com.sun.star.frame

Examples of com.sun.star.frame.XFrame


                throw new StatusException("Coud not create test object", e);
            }
           
            XInterface oFrame = (XInterface) xMSF.createInstance("com.sun.star.frame.Frame");
           
            XFrame xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, oFrame);
           
            xFrame.setName("ObjectInspector");
            xFrame.initialize(xWindow);
           
            XFramesSupplier xFramesSup = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, StarDesktop);
           
            XFrames xFrames = xFramesSup.getFrames();
            xFrames.append(xFrame);
View Full Code Here


     * @param log the logger
     */
    protected void cleanup(TestParameters Param, PrintWriter log) {
        log.println("    Closing dialog if one exists ... ");
       
        XFrame existentInspector = null;
       
        XFrame xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, StarDesktop);
       
        existentInspector = xFrame.findFrame( "ObjectInspector", 255 );
       
        if ( existentInspector != null ){
            XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
                    XCloseable.class, existentInspector);
            try{
View Full Code Here

            throw new StatusException("Couldn't create document ", e);
        }
        XModel xTextMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xTextDoc);
        XController xTextController = xTextMode1.getCurrentController();
        XFrame xTextFrame = xTextController.getFrame();


        // get webdoc interfaces
        try {
            log.println("creating a web document");
            xWebDoc = SOF.loadDocument("private:factory/swriter/web");
           
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xWebMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xWebDoc);
        XController xWebController = xWebMode1.getCurrentController();
        XFrame xWebFrame = xWebController.getFrame();

        // get global document interfaces
        try {
            log.println("creating a global document");
            xGlobalDoc = SOF.loadDocument("private:factory/swriter/GlobalDocument");
           
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xGlobalMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xGlobalDoc);
        XController xGlobalController = xGlobalMode1.getCurrentController();
        XFrame xGlobalFrame = xGlobalController.getFrame();

        // get clac interfaces
        try {
            log.println("creating a spreadsheetdocument");
            xSheetDoc = SOF.createCalcDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xSheetMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xSheetDoc);

        XController xSheetController = xSheetMode1.getCurrentController();
        XFrame xSheetFrame = xSheetController.getFrame();
        // get draw interfaces
        try {
            log.println("creating a draw document");
            xDrawDoc = SOF.createDrawDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xDrawMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xDrawDoc);
        XController xDrawController = xDrawMode1.getCurrentController();
        XFrame xDrawFrame = xDrawController.getFrame();
       
        // get impress interfaces
        try {
            log.println("creating a impress document");
            xImpressDoc = SOF.createImpressDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xImpressMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xImpressDoc);
        XController xImpressController = xImpressMode1.getCurrentController();
        XFrame xImpressFrame = xImpressController.getFrame();
       
        // get math interfaces
        try {
            log.println("creating a math document");
            xMathDoc = SOF.createMathDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xMathMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xMathDoc);
        XController xMathController = xMathMode1.getCurrentController();
        XFrame xMathFrame = xMathController.getFrame();
       
        PropertyValue[] xFrameSeq = new PropertyValue[7];
        xFrameSeq[0] = new PropertyValue();
        xFrameSeq[0].Name = "com.sun.star.text.TextDocument";
        xFrameSeq[0].Value = xTextFrame;
View Full Code Here

        throws Exception
    {
        if ( object.length > 0 ){
            myLogger.log(Level.FINE,"Logger Test " + AddOn.class.getName() );

            XFrame xFrame = (com.sun.star.frame.XFrame)UnoRuntime.queryInterface(
                com.sun.star.frame.XFrame.class, object[0]);



            // only re-initialize if it's a new frame
View Full Code Here

                    Level.FINE, "dispatch: " + aURL.Complete + "; "+aArguments);

    try {
         if ( aURL.Protocol.compareTo("com.CompPad.addon:") == 0 )
        {
            XFrame xFrame = m_xFrame;
            XTextDocument xTextDoc = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class,
                    xFrame.getController().getModel());

            myLogger.log(
                    Level.FINE, "xTextDoc "+xTextDoc);
            XMultiComponentFactory xServiceManager =
                    m_xContext.getServiceManager();
View Full Code Here

    }
    private XTextContent createExpression(String formulaText) throws java.lang.Exception{
        /* Cleanup needed! */
        myLogger.log(
                    Level.FINE, "createExpression");
        XFrame xFrame = m_xFrame;
        XMultiServiceFactory xMSF = (XMultiServiceFactory)
                UnoRuntime.queryInterface(XMultiServiceFactory.class,
                    xFrame.getController().getModel());
        XTextContent xObj = (XTextContent) UnoRuntime.queryInterface(
                XTextContent.class,
                xMSF.createInstance( "com.sun.star.text.TextEmbeddedObject" ));
        XPropertySet xPS = (com.sun.star.beans.XPropertySet)
                UnoRuntime.queryInterface(XPropertySet.class, xObj);
        xPS.setPropertyValue("CLSID", com.CompPad.OOO.OOODocument.CLSID_FORMULA);
        /* Change the anchor type to "as character" before inserting */
        XPropertySet xFrameProps = (XPropertySet) UnoRuntime.queryInterface(
                XPropertySet.class, xObj );
        xFrameProps.setPropertyValue("AnchorType", TextContentAnchorType.AS_CHARACTER);
        /* Then embed at the cursor */
//        XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, oComponent);
//        controller = xModel.getCurrentController();
        controller = xFrame.getController();
        XTextViewCursorSupplier xViewCursorSupplier = (XTextViewCursorSupplier) UnoRuntime.queryInterface(
                 XTextViewCursorSupplier.class, controller);
        XTextViewCursor xViewCursor = xViewCursorSupplier.getViewCursor();
        //XTextRange xRange = (XTextRange)
        //        UnoRuntime.queryInterface(XTextRange.class, xViewCursor);
View Full Code Here

        public Object createInstanceWithContext(XComponentContext arg0) throws Exception {
            return new AddOnAdapter(arg0);
        }

        public Object createInstanceWithArgumentsAndContext(Object[] object, XComponentContext context) throws Exception {
            XFrame xFrame = (com.sun.star.frame.XFrame)UnoRuntime.queryInterface(
                com.sun.star.frame.XFrame.class, object[0]);
            if (xFrame==null){
                return null;
            }
            // hasFrame will return false until it's initialized
View Full Code Here

            propertyvalue[ 0 ].Value = stringOriginalFile;
            // Setting the filter name
            //propertyvalue[ 1 ] = new PropertyValue();
            //propertyvalue[ 1 ].Name = "FilterName";
            //propertyvalue[ 1 ].Value = context.get("convertFilterName");
            XFrame frame = desktop.getCurrentFrame();
            //XFrame frame = (XFrame) UnoRuntime.queryInterface(XFrame.class, desktop);
            Object dispatchHelperObj = xmulticomponentfactory.createInstanceWithContext("com.sun.star.frame.DispatchHelper", xcomponentcontext);
            XDispatchHelper dispatchHelper = (XDispatchHelper) UnoRuntime.queryInterface(XDispatchHelper.class, dispatchHelperObj);
            XDispatchProvider dispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, frame);
            dispatchHelper.executeDispatch(dispatchProvider, ".uno:CompareDocuments", "", 0, propertyvalue);
View Full Code Here

            throw new StatusException("Couldn't get ButtonControl", e);
        }

        try {
            XController aController = xTD2.getCurrentController();
            XFrame aFrame = aController.getFrame();
            anotherWindow = aFrame.getComponentWindow();
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create XWindow", e);
        }
View Full Code Here

        System.out.println("ImplementationName: " + utils.getImplName(oObj));

        try {
            XController aController = xTD2.getCurrentController();
            XFrame aFrame = aController.getFrame();
            anotherWindow = aFrame.getComponentWindow();
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create XWindow", e);
        }
View Full Code Here

TOP

Related Classes of com.sun.star.frame.XFrame

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.