Examples of XNameContainer


Examples of com.sun.star.container.XNameContainer

            e.printStackTrace (log);
            throw new StatusException (Status.failed (
            "Couldn't set property value"));
        }
       
        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);
View Full Code Here

Examples of com.sun.star.container.XNameContainer

            e.printStackTrace(log);
            throw new StatusException(Status.failed(
                    "Couldn't set property value"));
        }
       
        XNameContainer queryContainer = (XNameContainer) UnoRuntime.queryInterface(
                XNameContainer.class,
                defContainer);
       
        try
        {
            queryContainer.insertByName("Query1", newQuery);
            store.store();
            connection.close();
        }
        catch (com.sun.star.lang.WrappedTargetException e)
        {
View Full Code Here

Examples of com.sun.star.container.XNameContainer

            e.printStackTrace(log);
            throw new StatusException(Status.failed(
                                              "Couldn't set property value"));
        }

        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

Examples of com.sun.star.container.XNameContainer

            // Some exception occures.FAILED
            log.println("!!! Couldn't create instance : " + e);
            throw new StatusException("Can't create column instances.", e);
        }

        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

Examples of com.sun.star.container.XNameContainer

                    xThrobberProps.setPropertyValue( "PositionX", new Integer( X ) );
                    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

Examples of com.sun.star.container.XNameContainer

            XNameAccess xQueryDefs = xQueryDefinitionsSuppl.getQueryDefinitions();
            XSingleServiceFactory xSSFQueryDefs = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, xQueryDefs);
            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

Examples of com.sun.star.container.XNameContainer

        importReportData(xMSF, this, CurReportDocument);
    }

    public boolean reconnectToDatabase(XMultiServiceFactory xMSF) {
        try {
            XNameContainer xNamedForms = CurReportDocument.oFormHandler.getDocumentForms();
            Object oDBForm = Helper.getUnoObjectbyName(xNamedForms, ReportWizard.SOREPORTFORMNAME);
            boolean bgetConnection;
            String sQueryName = "";
            if (oDBForm != null) {
                String sMsg = sMsgHiddenControlMissing + (char) 13 + sMsgEndAutopilot;
View Full Code Here

Examples of com.sun.star.container.XNameContainer

            XTreeControlModelSet.setPropertyValue( "ShowsRootHandles",new Boolean (false));
            XTreeControlModelSet.setPropertyValue( "ShowsHandles"new Boolean (false));
            XTreeControlModelSet.setPropertyValue( "RootDisplayed"new Boolean (true));
            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

Examples of com.sun.star.container.XNameContainer

        log.println( "get custom presentation" );
        XCustomPresentationSupplier oCPS = (XCustomPresentationSupplier)
            UnoRuntime.queryInterface(
                XCustomPresentationSupplier.class, xImpressDoc);
        XNameContainer xCP = oCPS.getCustomPresentations();

        XInterface oInstance = null;
        XInterface oInstance2 = null;

        XSingleServiceFactory oSingleMSF = (XSingleServiceFactory)
            UnoRuntime.queryInterface(XSingleServiceFactory.class, xCP);

        try{
            oInstance = (XInterface) oSingleMSF.createInstance();
            oInstance2 = (XInterface) oSingleMSF.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create instance", e);
        }

        try {
            xCP.insertByName("FirstPresentation",oInstance);
            xCP.insertByName("SecondPresentation", oInstance2);
        } catch (com.sun.star.lang.WrappedTargetException e) {
            e.printStackTrace(log);
            throw new StatusException("Could't insert Instance", e);
        } catch (com.sun.star.container.ElementExistException e) {
            e.printStackTrace(log);
View Full Code Here

Examples of com.sun.star.container.XNameContainer

        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create instance", e);
        }

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

        try {
            aContainer.insertByName("FirstPresentation", oInstance);
        } catch (com.sun.star.lang.WrappedTargetException e){
            e.printStackTrace(log);
            throw new StatusException("Could't insert Presentation", e);
        } catch (com.sun.star.container.ElementExistException e){
            e.printStackTrace(log);
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.