Package com.sun.star.lang

Examples of com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()


        logger.debug("connecting");
        try {
            XComponentContext localContext = Bootstrap.createInitialComponentContext(null);
            XMultiComponentFactory localServiceManager = localContext.getServiceManager();
            XConnector connector = (XConnector) UnoRuntime.queryInterface(XConnector.class,
                    localServiceManager.createInstanceWithContext("com.sun.star.connection.Connector", localContext));
            XConnection connection = connector.connect(connectionString);
            XBridgeFactory bridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(XBridgeFactory.class,
                    localServiceManager.createInstanceWithContext("com.sun.star.bridge.BridgeFactory", localContext));
            bridge = bridgeFactory.createBridge("", "urp", connection, null);
            bridgeComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, bridge);
View Full Code Here


            XMultiComponentFactory localServiceManager = localContext.getServiceManager();
            XConnector connector = (XConnector) UnoRuntime.queryInterface(XConnector.class,
                    localServiceManager.createInstanceWithContext("com.sun.star.connection.Connector", localContext));
            XConnection connection = connector.connect(connectionString);
            XBridgeFactory bridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(XBridgeFactory.class,
                    localServiceManager.createInstanceWithContext("com.sun.star.bridge.BridgeFactory", localContext));
            bridge = bridgeFactory.createBridge("", "urp", connection, null);
            bridgeComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, bridge);
            bridgeComponent.addEventListener(this);
            serviceManager = (XMultiComponentFactory) UnoRuntime.queryInterface(XMultiComponentFactory.class,
                    bridge.getInstance("StarOffice.ServiceManager"));
View Full Code Here

        try
         
          xcomponentloader = (XComponentLoader) UnoRuntime
              .queryInterface(
                  XComponentLoader.class,
                  xMultiComponentFactory
                      .createInstanceWithContext(
                          "com.sun.star.frame.Desktop",
                          xComponentContext));
         
          //System.out.println("Loading document "+url);
View Full Code Here

            XNamed xPageName = (XNamed)UnoRuntime.queryInterface(XNamed.class,page);
           
            xPageName.setName("slide"+(i+1));
            //if(!xPageName.getName().equals("slide"+(i+1)) && !xPageName.getName().equals("page"+(i+1)))
              //xPageName.setName((i+1)+"-"+xPageName.getName());
            Object GraphicExportFilter = xMultiComponentFactory
                .createInstanceWithContext(
                    "com.sun.star.drawing.GraphicExportFilter",
                    xComponentContext);
            XExporter xExporter = (XExporter) UnoRuntime
                .queryInterface(XExporter.class,
View Full Code Here

        XNamed xPageName = (XNamed)UnoRuntime.queryInterface(XNamed.class,page);
       
        xPageName.setName(slidename);       
       
              XMultiComponentFactory localServiceManager = ((DokeosSocketOfficeConnection)this.openOfficeConnection).getServiceManager();
        Object GraphicExportFilter = localServiceManager
            .createInstanceWithContext(
                "com.sun.star.drawing.GraphicExportFilter",
                ((DokeosSocketOfficeConnection)this.openOfficeConnection).getComponentContext());
       
        XExporter xExporter = (XExporter) UnoRuntime
View Full Code Here

        // initial serviceManager
        XMultiComponentFactory xLocalServiceManager = xcomponentcontext.getServiceManager();
       
        // create a connector, so that it can contact the office
//        XUnoUrlResolver urlResolver = UnoUrlResolver.create(xcomponentcontext);
        Object xUrlResolver = xLocalServiceManager.createInstanceWithContext(
                    "com.sun.star.bridge.UnoUrlResolver", xcomponentcontext);
        XUnoUrlResolver urlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(
                    XUnoUrlResolver.class, xUrlResolver);
       
        Object rInitialObject = urlResolver.resolve(connectStr);
View Full Code Here

                                        = context.getServiceManager();
                                    XImplementationLoader loader
                                        = (XImplementationLoader)
                                        UnoRuntime.queryInterface(
                                            XImplementationLoader.class,
                                            factory.createInstanceWithContext(
                                                "com.sun.star.loader."
                                                + "SharedLibrary",
                                                context));
                                    XSingleComponentFactory factory2
                                        = (XSingleComponentFactory)
View Full Code Here

                        (XDispatchProvider)UnoRuntime.queryInterface(
                        XDispatchProvider.class, xFrame);
                XURLTransformer xParser =
                        (XURLTransformer) UnoRuntime.queryInterface(
                        XURLTransformer.class,
                        xServiceManager.createInstanceWithContext(
                        "com.sun.star.util.URLTransformer",m_xContext));
                com.sun.star.util.URL[] aParseURL = new com.sun.star.util.URL[1];
                aParseURL[0] = new com.sun.star.util.URL();
                aParseURL[0].Complete = ".uno:InsertObjectStarMath";
                xParser.parseStrict (aParseURL);
View Full Code Here

                cc.Arguments = nv;
                /* send dispatch to frame */
                XMultiComponentFactory xServiceManager = m_xContext.getServiceManager();
                XURLTransformer xParser = (XURLTransformer) UnoRuntime.queryInterface(
                            XURLTransformer.class,
                            xServiceManager.createInstanceWithContext(
                            "com.sun.star.util.URLTransformer",m_xContext));
                URL[] aParseURL = new URL[1];
                aParseURL[0] = new URL();
                aParseURL[0].Complete = "com.CompPad.addon:editExprField";
                xParser.parseStrict(aParseURL);
View Full Code Here

    /* Get current frame from context */
    private static XFrame getFrameFromContext(XComponentContext xContext) throws java.lang.Exception{
            XTextDocument xTextDoc=null;
            XMultiComponentFactory xServiceManager =
                    xContext.getServiceManager();
            Object odesktop = xServiceManager.createInstanceWithContext(
                    "com.sun.star.frame.Desktop", xContext);
            XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
                    XDesktop.class, odesktop);
            // get the XDesktop interface
            return xDesktop.getCurrentFrame();
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.