Package com.sun.star.lang

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


                    XSingleServiceFactory.class, fac );
                if (xServiceFac != null)
                {
                    if (DEBUG)
                        System.err.println( "### ignoring context raising service \"" + rServiceSpecifier + "\"!" );
                    return xServiceFac.createInstanceWithArguments( rArguments );
                }
                else
                {
                    throw new com.sun.star.uno.Exception(
                        "retrieved service factory object for \"" + rServiceSpecifier +
View Full Code Here


            String aFile = util.utils.getOfficeTempDir(xMSF) + "dummyFile.dat";
            log.println("storage file : '"+ aFile + "'");
           
            props[0] = aFile;
            props[1] = new Integer(ElementModes.READWRITE);
            xStore = (XStorage)UnoRuntime.queryInterface(XStorage.class, xStorageService.createInstanceWithArguments(props));

            PropertyValue[] initProps = new PropertyValue[4];
            PropertyValue propVal = new PropertyValue();
            propVal.Name = "DefaultConfigStorage";
            propVal.Value = xStore;
View Full Code Here

            XSingleServiceFactory xSSF = (XSingleServiceFactory)UnoRuntime.queryInterface(
            XSingleServiceFactory.class, o);
            Object[] props = new Object[2];
            props[0] = deleteCfg;
            props[1] = new Integer(ElementModes.READWRITE);
            XStorage xRootStorage = (XStorage)UnoRuntime.queryInterface(XStorage.class, xSSF.createInstanceWithArguments(props));
            xSubStorage = xRootStorage.openStorageElement("Configurations2", ElementModes.READWRITE);
           
            XUIConfigurationStorage xConfigStorage =(XUIConfigurationStorage)UnoRuntime.queryInterface(XUIConfigurationStorage.class, xManager);
            xConfigStorage.setStorage(xSubStorage);
            tEnv.addObjRelation("XUIConfigurationStorage.Storage", xSubStorage);
View Full Code Here

      {
        Object aArgs[] = new Object[2];
        aArgs[0] = aFileURI;
        aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );

        Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
        XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
        m_xStorage.copyToStorage( xTargetStorage );
       
        XComponent xComponent = (XComponent)UnoRuntime.queryInterface( XComponent.class, m_xStorage );
        xComponent.dispose();
View Full Code Here

                                            oStorageFactory );
      Object aArgs[] = new Object[2];
      aArgs[0] = aFileURI;
      aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );

      Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
      XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );

      Object oEmbedFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.EmbeddedObjectFactory" );
      XEmbedObjectFactory xEmbedFactory = (XEmbedObjectFactory)UnoRuntime.queryInterface(
                                          XEmbedObjectFactory.class,
View Full Code Here

                ("com.sun.star.script.Invocation") ;

            XSingleServiceFactory xInvFac = (XSingleServiceFactory) UnoRuntime.
                queryInterface(XSingleServiceFactory.class, oInvFac) ;

            Object oInv = xInvFac.createInstanceWithArguments(args) ;

            xInv = (XInvocation) UnoRuntime.queryInterface
                (XInvocation.class, oInv) ;

        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

                ("com.sun.star.script.Invocation") ;

            XSingleServiceFactory xInvFac = (XSingleServiceFactory) UnoRuntime.
                queryInterface(XSingleServiceFactory.class, oInvFac) ;

            Object oInv = xInvFac.createInstanceWithArguments(args) ;

            xInv = (XInvocation) UnoRuntime.queryInterface
                (XInvocation.class, oInv) ;

        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

        XSingleServiceFactory xStorageFactory = UnoRuntime.queryInterface(XSingleServiceFactory.class, m_xSmgr.createInstance("com.sun.star.embed.StorageFactory"));

        Object aArgs[] = new Object[2];
        aArgs[0] = sDocCfgName;
        aArgs[1] = new Integer(com.sun.star.embed.ElementModes.READ);
        XStorage xRootStorage = UnoRuntime.queryInterface(XStorage.class, xStorageFactory.createInstanceWithArguments(aArgs));

        XStorage xUIConfig = xRootStorage.openStorageElement("Configurations2", com.sun.star.embed.ElementModes.READ);

        PropertyValue aProp = new PropertyValue();
        aProp.Name = "DocumentRoot";
View Full Code Here

        XSingleServiceFactory xStorageFactory = UnoRuntime.queryInterface(XSingleServiceFactory.class, m_xSmgr.createInstance("com.sun.star.embed.StorageFactory"));

        Object aArgs[] = new Object[2];
        aArgs[0] = sDocCfgName;
        aArgs[1] = new Integer(com.sun.star.embed.ElementModes.WRITE);
        XStorage xRootStorage = UnoRuntime.queryInterface(XStorage.class, xStorageFactory.createInstanceWithArguments(aArgs));

        XStorage xUIConfig = xRootStorage.openStorageElement("Configurations2", com.sun.star.embed.ElementModes.WRITE);

        XUIConfigurationManager xCfgMgr = UnoRuntime.queryInterface(XUIConfigurationManager.class, m_xSmgr.createInstance("com.sun.star.ui.UIConfigurationManager"));
View Full Code Here

        {
          Object aArgs[] = new Object[2];
          aArgs[0] = aFileURI;
          aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );

          Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
          XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );

          PropertyValue aProps[] = { new PropertyValue() };
          aProps[0].Name = "StoreVisualReplacement";
          aProps[0].Value = new Boolean( m_bStoreVisRepl );
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.