Package com.sun.star.container

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


        XNameContainer.class,
        defContainer);
       
        try
        {
            queryContainer.insertByName ("Query1", newQuery);
            store.store ();
            connection.close ();
        } catch (com.sun.star.lang.WrappedTargetException e)
        {
            e.printStackTrace (log);
View Full Code Here


                XNameContainer.class,
                defContainer);
       
        try
        {
            queryContainer.insertByName("Query1", newQuery);
            store.store();
            connection.close();
        }
        catch (com.sun.star.lang.WrappedTargetException e)
        {
View Full Code Here

        XNameContainer queryContainer = (XNameContainer) UnoRuntime.queryInterface(
                                                XNameContainer.class,
                                                defContainer);

        try {
            queryContainer.insertByName("Query1", newQuery);
            store.store();
            connection.close ();
        } catch (com.sun.star.lang.WrappedTargetException e) {
            e.printStackTrace(log);
            throw new StatusException(Status.failed("Couldn't insert query"));
View Full Code Here

        XNameContainer aContainer = (XNameContainer) UnoRuntime.queryInterface(
                                            XNameContainer.class, the_Model);

        try {
            aContainer.insertByName("First", aControl);
            aContainer.insertByName("Second", aControl2);
        } catch (com.sun.star.uno.Exception e) {
            log.println("!!! Could't insert column Instance");
            e.printStackTrace(log);
            throw new StatusException("Can't insert columns", e);
View Full Code Here

        XNameContainer aContainer = (XNameContainer) UnoRuntime.queryInterface(
                                            XNameContainer.class, the_Model);

        try {
            aContainer.insertByName("First", aControl);
            aContainer.insertByName("Second", aControl2);
        } catch (com.sun.star.uno.Exception e) {
            log.println("!!! Could't insert column Instance");
            e.printStackTrace(log);
            throw new StatusException("Can't insert columns", e);
        }
View Full Code Here

                    xThrobberProps.setPropertyValue( "PositionY", new Integer( Y ) );
                    xThrobberProps.setPropertyValue( "Height", new Integer( Width ) );
                    xThrobberProps.setPropertyValue( "Width", new Integer( Height ) );

                    XNameContainer xDialogContainer = (XNameContainer)UnoRuntime.queryInterface( XNameContainer.class, xDialogModel );
                    xDialogContainer.insertByName( "WikiThrobber", xThrobberModel );
                }
            }
        }
        catch( Exception e )
        {
View Full Code Here

            Object oQuery = xSSFQueryDefs.createInstance(); //"com.sun.star.sdb.QueryDefinition"
            XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oQuery);
            xPSet.setPropertyValue("Command", _oSQLQueryComposer.xQueryAnalyzer.getQuery());
            XNameContainer xNameCont = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xQueryDefs);
            ConnectionTools.getObjectNames().checkNameForCreate(com.sun.star.sdb.CommandType.QUERY,_QueryName);
            xNameCont.insertByName(_QueryName, oQuery);
            return true;
        } catch( WrappedTargetException exception ) {
            SQLException sqlError = null;
            try { sqlError = (SQLException)exception.TargetException; }
            catch( ClassCastException castError ) { }
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

            Type t = xCont.getElementType();
            log.println("Insertable Type: " + t.getTypeName());
            assure("Initial container is not empty.", !xCont.hasElements());

            log.println("Insert a PropertyValue.");
            xCont.insertByName("prop1", prop1);
            PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
            assure("Got the wrong PropertyValue: " +
                                    ret[0].Name +  "  " +(String)ret[0].Value,
                                    ret[0].Name.equals(prop1[0].Name) &&
                                    ret[0].Value.equals(prop1[0].Value));
View Full Code Here

                                    ret[0].Value.equals(prop2[0].Value));
            log.println("Remove the PropertyValue.");
            xCont.removeByName("prop1");
            assure("Could not remove PropertyValue.", !xCont.hasElements());
            log.println("Insert again.");
            xCont.insertByName("prop1", prop1);
            xCont.insertByName("prop2", prop2);
            assure("Did not insert PropertyValue.", xCont.hasElements());
            String[] names = xCont.getElementNames();
            int count = 0;
            for (int i=0; i<names.length; i++) {
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.