Examples of createInstanceWithArguments()


Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

           
            XMultiServiceFactory oProviderMSF = (XMultiServiceFactory)
                                    UnoRuntime.queryInterface(
                                    XMultiServiceFactory.class, oProvider);
           
            Object oSecure = oProviderMSF.createInstanceWithArguments(
                        "com.sun.star.configuration.ConfigurationUpdateAccess",
                        ProvArgs)
           
            XPropertySet oSecureProps = (XPropertySet)
                        UnoRuntime.queryInterface(XPropertySet.class, oSecure);
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

        aDocProperties[2] = Properties.createProperty("URL", sPath);
        aDocProperties[3] = Properties.createProperty("DocumentTitle", basename);
        if (_bcreateTemplate)
            aDocProperties[4] = Properties.createProperty("AsTemplate", new Boolean(_bcreateTemplate));
        XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, _xDocNameAccess);
        Object oDBDocument = xDocMSF.createInstanceWithArguments("com.sun.star.sdb.DocumentDefinition", aDocProperties);
        XHierarchicalNameContainer xHier = (XHierarchicalNameContainer) UnoRuntime.queryInterface(XHierarchicalNameContainer.class, _xDocNameAccess);
        String sdocname = Desktop.getUniqueName(_xDocNameAccess, basename);
        xHier.insertByHierarchicalName(sdocname, oDBDocument);
        XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
        XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

            aNodePath[0] = new PropertyValue();
            aNodePath[0].Name = "nodepath";
            aNodePath[0].Value = KeyName;
            XMultiServiceFactory xMSFConfig = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
            if (bForUpdate == true)
                return (XInterface) xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath);
            else
                return (XInterface) xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath);
        } catch (Exception exception) {
            exception.printStackTrace(System.out);
            return null;
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

            aNodePath[0].Value = KeyName;
            XMultiServiceFactory xMSFConfig = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
            if (bForUpdate == true)
                return (XInterface) xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath);
            else
                return (XInterface) xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath);
        } catch (Exception exception) {
            exception.printStackTrace(System.out);
            return null;
        }
    }  
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

        XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF() ;
        XInterface oObj = null;
        SettingsFilterChecker filter = new SettingsFilterChecker(log);
        Any arg = new Any(new Type(XDocumentHandler.class), filter);
        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Calc.XMLSettingsExporter",
                new Object[] {arg} );
            XExporter xEx = (XExporter) UnoRuntime.queryInterface
                (XExporter.class,oObj);
            xEx.setSourceDocument(xSheetDoc);
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

                    createRegistryService(xMSF) ;
            reg2.open(openF, false, true) ;
            XSimpleRegistry[] arg = new XSimpleRegistry[2];
            arg[0]=reg1;
            arg[1]=reg2;
            oInterface = xMSF.createInstanceWithArguments
                ( "com.sun.star.comp.stoc.NestedRegistry", arg );
        }
        catch( Exception e ) {
            log.println("Introspection Service not available" );
        }
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

        XInterface oObj = null;

        Filter = new SettingsFilterChecker(log);
        Any arg = new Any(new Type(XDocumentHandler.class), Filter);
        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Writer.XMLSettingsExporter",
                new Object[] {arg});
            XExporter xEx = (XExporter) UnoRuntime.queryInterface
                (XExporter.class,oObj);
            xEx.setSourceDocument(xTextDoc);
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

        XReportDefinition xReportDefinition = null;
        final XMultiServiceFactory xMSF = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, /* getRecordParser().getReportDocuments() */ _aDoc );
        try
        {
            final Object aObj = xMSF.createInstanceWithArguments("com.sun.star.sdb.DocumentDefinition", args);
            final XPropertySet aDocumentDefinition = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, aObj);
            m_aDocumentDefinition = aDocumentDefinition;
           
            final XCommandProcessor xProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, aObj);
            final com.sun.star.ucb.Command aCommand = new com.sun.star.ucb.Command();
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

            aModeArgument.Value = Boolean.FALSE;

            args[1] = aModeArgument;
        }

        return confMsf.createInstanceWithArguments(sView, args);
    }

    public static String[] getChildrenNames(Object configView) {
        XNameAccess nameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, configView);
        return nameAccess.getElementNames();
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()

    */
    public XInterface createInstanceWithArguments( String serviceSpecifier, Object[] arguments ) throws com.sun.star.uno.Exception
    {
        XMultiServiceFactory xORB = (XMultiServiceFactory)UnoRuntime.queryInterface( XMultiServiceFactory.class,
            m_documentComponent );
        return (XInterface) xORB.createInstanceWithArguments( serviceSpecifier, arguments );
    }
};

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.