Examples of XNameReplace


Examples of com.sun.star.container.XNameReplace

    * Just calls the method. <p>
    * Has <b> OK </b> status if not <code>null</code> value returned.
    */
    public void _getEvents() {

        XNameReplace xNR = oObj.getEvents();
        String str[] = xNR.getElementNames();
        tRes.tested("getEvents()",xNR != null);
    }
View Full Code Here

Examples of com.sun.star.container.XNameReplace

                    failed("could not get test object", CONTINUE);
                }
               
                xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oObj);
                XNameContainer xNC = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oObj);
                XNameReplace xNR = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, oObj);
                XFlushable xFlush = (XFlushable) UnoRuntime.queryInterface(XFlushable.class, oObj);

                instance = (Object[]) xNA.getByName(filterName);
                PropertyValue[] props = (PropertyValue[]) instance;
               
                printPropertyValues(props);
               
                boolean isMandatory = ((Boolean) getPropertyValueValue(props, "Mandatory")).booleanValue();
                boolean isFinalized = ((Boolean) getPropertyValueValue(props, "Finalized")).booleanValue();
               
                // memory if every state is available
                mandantoryTrue |= isMandatory;
                mandantoryFalse |= !isMandatory;
               
                finalizedTrue |= isFinalized;
                finalizedFalse |= !isFinalized;
               
                //change the filter
                setPropertyValueValue((PropertyValue[])instance, "UIName", "dummy");
               
                // 1a.) try to change the filter in the container
                try{
                    xNR.replaceByName(filterName, instance);
                }catch (IllegalArgumentException e){
                    failed("could not replace filter properties ('" + filterName + "')", CONTINUE);
                }
               
                // 1b.) try to wirte the changed filter to the configuration.
View Full Code Here

Examples of com.sun.star.container.XNameReplace

        try {
            ConfigHelper aConfig = new ConfigHelper(xMSF,
                                    "org.openoffice.Office.Views", false);
           
            // Is node "5539" (slot-id for navigator) available? If not, insert it
            XNameReplace x5539 = aConfig.getOrInsertGroup("Windows", "5539");
           
            aConfig.updateGroupProperty(
               "Windows""5539", "WindowState", "952,180,244,349;1;0,0,0,0;");
           
            aConfig.insertOrUpdateExtensibleGroupProperty(
View Full Code Here

Examples of com.sun.star.container.XNameReplace

        aArgs[0]=aPathArg;
        aArgs[1]=aModeArg;
        Object oConfigUpdate = xProv.createInstanceWithArguments(
            "com.sun.star.configuration.ConfigurationUpdateAccess",
            aArgs );
        XNameReplace xNameReplace = (XNameReplace)UnoRuntime.queryInterface(
                XNameReplace.class, oConfigUpdate );
        XChangesBatch xChangesBatch = (XChangesBatch)UnoRuntime.queryInterface(
                XChangesBatch.class, oConfigUpdate );

        Object[] aSecureURLs;
        if (secureURLs == null) {
            aSecureURLs = new Object[0];
        }
        else {
            aSecureURLs = new Object[1];
            aSecureURLs[0] = secureURLs;
        }
        log.println("setting SecureURL");
        xNameReplace.replaceByName( "SecureURL", aSecureURLs );

        log.println("setting OfficeBasic");
        xNameReplace.replaceByName( "OfficeBasic", new Integer(officeBasic) );

        Boolean bConfirm = null;
        if( ( confirm != null ) && ( confirm.equals("true") ) )
        {
            bConfirm = new Boolean( true );
        }
        else
        {
            bConfirm = new Boolean( false );
        }
        log.println("setting Confirmation");
        xNameReplace.replaceByName( "Confirmation", bConfirm );

        Boolean bWarning = null;
        if( ( warning != null ) && ( warning.equals("true") ) )
        {
            bWarning = new Boolean( true );
        }
        else
        {
            bWarning = new Boolean( false );
        }
        log.println("setting Warning");
        xNameReplace.replaceByName( "Warning", bWarning );

        // and now commit the changes
        xChangesBatch.commitChanges();
        success=true;
        } catch (Exception e) {
View Full Code Here

Examples of com.sun.star.container.XNameReplace

        nodepath.Value = "org.openoffice.Office.Common";
        nodepath.Handle = -1;
        nodepath.State = PropertyState.DEFAULT_VALUE;
        nodeArgs[0] = nodepath;

        XNameReplace updateAccess = null;
        try {
            XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
                                                     .createInstance("com.sun.star.comp.configuration.ConfigurationProvider");
            XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(
                                                XMultiServiceFactory.class,
View Full Code Here

Examples of com.sun.star.container.XNameReplace

        nodepath.Handle = -1;
        nodepath.State = PropertyState.DEFAULT_VALUE;
        nodeArgs[0] = nodepath;

        XNameAccess xHierachNameAccess = null;
        XNameReplace xChangeView = null;
        XComponent xDisposeComponent = null;
       
        try {
            XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
                                                     .createInstance("com.sun.star.comp.configuration.ConfigurationProvider");
View Full Code Here

Examples of com.sun.star.container.XNameReplace

        nodepath.Value = "org.openoffice.Office.Jobs";
        nodepath.Handle = -1;
        nodepath.State = PropertyState.DEFAULT_VALUE;
        nodeArgs[0] = nodepath;

        XNameReplace updateAccess = null;
        try {
            XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
                                                     .createInstance("com.sun.star.comp.configuration.ConfigurationProvider");
            XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(
                                                XMultiServiceFactory.class,
View Full Code Here

Examples of com.sun.star.container.XNameReplace

            try {
                log.println("Adding configuration to Jobs  ...");
                XSingleServiceFactory jobsFac = (XSingleServiceFactory)
                    UnoRuntime.queryInterface(XSingleServiceFactory.class, jobs);
                Object oNewJob = jobsFac.createInstance();
                XNameReplace xNewJobNR = (XNameReplace)
                    UnoRuntime.queryInterface(XNameReplace.class, oNewJob);
                xNewJobNR.replaceByName("Service", "test.Job");
                XNameContainer xJobsNC = (XNameContainer)
                    UnoRuntime.queryInterface(XNameContainer.class, jobs);
                xJobsNC.insertByName("TestJob", oNewJob);

                log.println("Adding configuration to Events  ...");
View Full Code Here

Examples of com.sun.star.container.XNameReplace

        nodeArgs[0] = nodepath;
       
        String hierarchicalElementName = "Labels['Avery A4']";
        String elementName = "Avery A4";

        XNameReplace xChangeView = null;
        XNameContainer xContainer = null;
        XHierarchicalNameAccess xHierachNameAccess = null;
        try {
            XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
                                                     .createInstance("com.sun.star.comp.configuration.ConfigurationProvider");
View Full Code Here

Examples of com.sun.star.container.XNameReplace

        log.println("ImplementationName: " + utils.getImplName(oObj));
        log.println("ChangeView: " + utils.getImplName(changeView));

        TestEnvironment tEnv = new TestEnvironment(oObj);

        XNameReplace container = (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, changeView);
        tEnv.addObjRelation("XContainer.NewValue", instance);
        tEnv.addObjRelation("XContainer.ElementName", "RegistrationRequest");       
        tEnv.addObjRelation("XContainer.Container", container);

        tEnv.addObjRelation("XChangesNotifier.ChangesBatch", (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, changeView));
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.