Package com.sun.star.container

Examples of com.sun.star.container.XNameContainer.insertByName()


        XNameContainer oContainer = (XNameContainer)
            UnoRuntime.queryInterface(XNameContainer.class, oSFNA);

        // insert a Style which can be replaced by name
        try {
            oContainer.insertByName("SwXStyleFamily",oInstance);
        } catch ( com.sun.star.lang.WrappedTargetException e ) {
            log.println("Could not insert style family.");
            e.printStackTrace(log);
        } catch ( com.sun.star.lang.IllegalArgumentException e ) {
            log.println("Could not insert style family.");
View Full Code Here


            }
            AttributeData attr = new AttributeData();
            attr.Namespace = "http://www.sun.com/staroffice/apitest/Cellprop";
            attr.Type = "CDATA";
            attr.Value = "true";
            uda.insertByName("Cellprop:has-first-alien-attribute", attr);

            String[] els = uda.getElementNames();
            oObj.setPropertyValue("ParaUserDefinedAttributes", uda);
            uda = (XNameContainer) AnyConverter.toObject(
                          new Type(XNameContainer.class),
View Full Code Here

            }
            AttributeData attr = new AttributeData();
            attr.Namespace = "http://www.sun.com/staroffice/apitest/Cellprop";
            attr.Type = "CDATA";
            attr.Value = "true";
            uda.insertByName("Cellprop:has-first-alien-attribute", attr);

            String[] els = uda.getElementNames();
            oObj.setPropertyValue("TextUserDefinedAttributes", uda);
            uda = (XNameContainer) AnyConverter.toObject(
                          new Type(XNameContainer.class),
View Full Code Here

                    oObj.getPropertyValue("UserDefinedAttributes"));
            AttributeData attr = new AttributeData();
            attr.Namespace = "http://www.sun.com/staroffice/apitest/Cellprop";
            attr.Type="CDATA";
            attr.Value="true";
            uda.insertByName("Cellprop:has-first-alien-attribute",attr);           
            String[] els = uda.getElementNames();           
            oObj.setPropertyValue("UserDefinedAttributes",uda);
            uda = (XNameContainer) AnyConverter.toObject(
                new Type(XNameContainer.class),
                    oObj.getPropertyValue("UserDefinedAttributes"));
View Full Code Here

            UnoRuntime.queryInterface(XNameContainer.class, oSFNA);
 
        try {
            if ( oSFNC.hasByName("My Style") )
                oSFNC.removeByName("My Style");
            oSFNC.insertByName("My Style", oMyStyle);
        } catch ( com.sun.star.lang.WrappedTargetException e ) {
            e.printStackTrace(log);
            throw new StatusException( "Couldn't create environment ", e );
        } catch     ( com.sun.star.lang.IllegalArgumentException e ) {
            e.printStackTrace(log);
View Full Code Here

                    StyleFamilies.getByName(styleFamiliesNames[0]));
            Object SC = SOF.createInstance(
                xSheetDoc, "com.sun.star.style.CellStyle");
            XStyle StyleCell = (XStyle)
                UnoRuntime.queryInterface(XStyle.class,SC);
            StyleFamilyName.insertByName(newName, StyleCell);
           
            log.println("fill sheet 1 with contnet...");
            util.CalcTools.fillCalcSheetWithContent(xSheetDoc, 1, 3, 3, 50, 100);
           
        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

                styleFamilies.getByName(styleFamiliesNames[0]));
            Object SC = SOF.createInstance
                (xImpressDoc, "com.sun.star.style.Style");
            XStyle StylePage = (XStyle)
                UnoRuntime.queryInterface(XStyle.class,SC);
            StyleFamilyName.insertByName(newName, StylePage);

        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log) ;
            throw new StatusException("Can't create component.", e) ;
        }
View Full Code Here

            // insert the control models into the dialog model
            XNameContainer xNameCont = (XNameContainer) UnoRuntime.queryInterface(
                                               XNameContainer.class,
                                               dialogModel);
            xNameCont.insertByName(_buttonName, buttonModel);
            xNameCont.insertByName(_labelName, labelModel);

            // create the dialog control and set the model
            XControl dialog = (XControl) UnoRuntime.queryInterface(
                                      XControl.class,
View Full Code Here

            // insert the control models into the dialog model
            XNameContainer xNameCont = (XNameContainer) UnoRuntime.queryInterface(
                                               XNameContainer.class,
                                               dialogModel);
            xNameCont.insertByName(_buttonName, buttonModel);
            xNameCont.insertByName(_labelName, labelModel);

            // create the dialog control and set the model
            XControl dialog = (XControl) UnoRuntime.queryInterface(
                                      XControl.class,
                                      ((XMultiServiceFactory) Param.getMSF()).createInstance(
View Full Code Here

            XTreeControlModelSet.setPropertyValue( "Editable",    new Boolean (true ));
           
            XNameContainer xDialogModelContainer = (XNameContainer)
            UnoRuntime.queryInterface(XNameContainer.class, xDialogModel);
           
            xDialogModelContainer.insertByName( sTreeControlName, xTreeControlModel);
           
            XControl xDialogControl = (XControl)
            UnoRuntime.queryInterface(XControl.class,
                mxMSF.createInstance("com.sun.star.awt.UnoControlDialog"));
           
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.