Examples of createInstanceWithContext()


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

        private String resolvePath(String path) {
            try {
                if( xPathSubstService == null || xUriTranslator == null ) {
                    XMultiComponentFactory theServiceManager = xComponentContext.getServiceManager();
                    if( xPathSubstService == null ) {
                        Object o = theServiceManager.createInstanceWithContext(
                            "com.sun.star.util.PathSubstitution",
                            xComponentContext );
                        xPathSubstService = (XStringSubstitution)
                            UnoRuntime.queryInterface(XStringSubstitution.class, o);
                    }
View Full Code Here

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

                        xPathSubstService = (XStringSubstitution)
                            UnoRuntime.queryInterface(XStringSubstitution.class, o);
                    }
                   
                    if( xUriTranslator == null ) {
                        Object o = theServiceManager.createInstanceWithContext(
                            "com.sun.star.uri.ExternalUriReferenceTranslator",
                            xComponentContext );
                        xUriTranslator =  (XExternalUriReferenceTranslator)
                            UnoRuntime.queryInterface(XExternalUriReferenceTranslator.class, o);
                    }
View Full Code Here

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

       
        private void openBrowser(String url) {
            try {
                XMultiComponentFactory theServiceManager = xComponentContext.getServiceManager();
           
                Object o = theServiceManager.createInstanceWithContext(
                    "com.sun.star.system.SystemShellExecute",
                    xComponentContext );
           
                XSystemShellExecute xShellExecuteService = (XSystemShellExecute)
                    UnoRuntime.queryInterface(XSystemShellExecute.class, o);
View Full Code Here

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

        if (manager == null) {
            throw new NullPointerException("no service manager");
        }
        XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface(
            XBridgeFactory.class,
            manager.createInstanceWithContext(
                "com.sun.star.bridge.BridgeFactory", context));
        if (factory == null) {
            throw new NullPointerException("no bridge factory");
        }
        UnoUrl url = UnoUrl.parseUnoUrl(arguments[0]);
View Full Code Here

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

       * ask it to create a UnoUrlResolver object with an XUnoUrlResolver interface
       */
      XComponentContext xLocalContext =
        com.sun.star.comp.helper.Bootstrap.createInitialComponentContext(null);
      XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();
      Object urlResolver = xLocalServiceManager.createInstanceWithContext(
        UNOURLRESOLVER, xLocalContext );
      /*
       * query XUnoUrlResolver interface from urlResolver object
       */
      XUnoUrlResolver xUnoUrlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(
View Full Code Here

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

        try
        {
            data = (ScriptMetaData)parent.getByName( name );
            xSFA = ( XSimpleFileAccess)
                UnoRuntime.queryInterface( XSimpleFileAccess.class,
                    xFac.createInstanceWithContext(
                        "com.sun.star.ucb.SimpleFileAccess",
                        xCtx ) );           
        }

        // TODO fix exception types to be caught here, should we rethrow?
View Full Code Here

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

        XMultiComponentFactory xFac = m_xCtx.getServiceManager();
        try
        {
            xSFA = ( XSimpleFileAccess)
                UnoRuntime.queryInterface( XSimpleFileAccess.class,
                    xFac.createInstanceWithContext(
                        "com.sun.star.ucb.SimpleFileAccess",
                        xCtx ) );
            if container.isUnoPkg() || xSFA.isReadOnly( container.getParcelContainerDir() ) )
            {
                deletable = false;
View Full Code Here

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

        XMultiComponentFactory xFac = xCtx.getServiceManager();
        try
        {
            XSimpleFileAccess xSFA = ( XSimpleFileAccess)
                UnoRuntime.queryInterface( XSimpleFileAccess.class,
                    xFac.createInstanceWithContext(
                        "com.sun.star.ucb.SimpleFileAccess",
                        xCtx ) );
            if ( xSFA != null && ( xSFA.isReadOnly( parcelDirUrl ) ||
                container.isUnoPkg() ) )
            {
View Full Code Here

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

        // get the service manager from the component context
        XMultiComponentFactory xMultiComponentFactory =
            xComponentContext.getServiceManager();
       
        // create the dialog model and set the properties
        Object dialogModel = xMultiComponentFactory.createInstanceWithContext(
            "com.sun.star.awt.UnoControlDialogModel", xComponentContext);

        XPropertySet props = (XPropertySet) UnoRuntime.queryInterface(
            XPropertySet.class, dialogModel);     
View Full Code Here

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

        xNameCont.insertByName("PromptLabel", label);
        xNameCont.insertByName("Ok", okButtonModel);
        xNameCont.insertByName("Cancel", cancelButtonModel);

        // create the dialog control and set the model
        Object dialog = xMultiComponentFactory.createInstanceWithContext(
            "com.sun.star.awt.UnoControlDialog", xComponentContext);
        XControl xControl = (XControl) UnoRuntime.queryInterface(
            XControl.class, dialog);

        XControlModel xControlModel = (XControlModel)
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.