Examples of XChild


Examples of com.sun.star.container.XChild


    private void getDataSourceObjects() throws Exception{
    try {
        xDBMetaData = DBConnection.getMetaData();
        XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, DBConnection);
        Object oDataSource = xChild.getParent();
        getDataSourceInterfaces();
        setMaxColumnsInGroupBy();
        setMaxColumnsInSelect();
    } catch (SQLException e) {
        e.printStackTrace(System.out);
View Full Code Here

Examples of com.sun.star.container.XChild

            if (mimetype == null)
            {
                mimetype = PentahoReportEngineMetaData.OPENDOCUMENT_TEXT;
            }

            final XChild child = UnoRuntime.queryInterface(XChild.class, activeConnection);
            final XDocumentDataSource docSource = UnoRuntime.queryInterface(XDocumentDataSource.class, child.getParent());
            final XModel model = UnoRuntime.queryInterface(XModel.class, docSource.getDatabaseDocument());
            final DataSourceFactory dataFactory = new SDBCReportDataFactory(m_cmpCtx, activeConnection);
            final StorageRepository storageRepository = new StorageRepository(input, output, model.getURL());

            final String inputName = "content.xml";
View Full Code Here

Examples of com.sun.star.container.XChild

                    MetaNode.eq(nestedTextContent[i], xmlid));
            }
            xDocTextCursor.goRight((short)1, false);
        }

        XChild xChild1 = (XChild)
            UnoRuntime.queryInterface(XChild.class, xMeta1);
        XChild xChild2 = (XChild)
            UnoRuntime.queryInterface(XChild.class, xMeta2);
        XChild xChild3 = (XChild)
            UnoRuntime.queryInterface(XChild.class, xMeta3);
        XChild xChild4 = (XChild)
            UnoRuntime.queryInterface(XChild.class, xMeta4);
        XChild xChild5 = (XChild)
            UnoRuntime.queryInterface(XChild.class, xMeta5);
        XChild xChild6 = (XChild)
            UnoRuntime.queryInterface(XChild.class, xMeta6);
        try {
            xChild1.setParent(xChild4);
            assure("setParent(): allowed?", false);
        } catch (NoSupportException e) { /* expected */ }
        assure("getParent(): not null", xChild1.getParent() == null);
        assure("getParent(): not null", xChild2.getParent() == null);
        assure("getParent(): not null", xChild6.getParent() == null);
        {
            Object xParent3 = xChild3.getParent();
            assure("getParent(): null", null != xParent3);
            XMetadatable xMetadatable = (XMetadatable)
                UnoRuntime.queryInterface(XMetadatable.class, xParent3);
View Full Code Here

Examples of com.sun.star.container.XChild

            XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
            XControlModel xControlModel = xControlShape.getControl();
            xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
            if (xServiceInfo.supportsService("com.sun.star.form.FormComponent"))
            {
                XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, xControlModel);
                XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xChild.getParent());
                String sName = xNamed.getName();
                return _FormName.equals(sName);
            }
        }
        return false;
View Full Code Here

Examples of com.sun.star.container.XChild

    /* ------------------------------------------------------------------ */
    /** retrieves the document model which a given form component belongs to
    */
    static public DocumentHelper getDocumentForComponent( Object aFormComponent, XMultiServiceFactory orb )
    {
        XChild xChild = (XChild)UnoRuntime.queryInterface( XChild.class, aFormComponent );
        XModel xModel = null;
        while ( ( null != xChild ) && ( null == xModel ) )
        {
            XInterface xParent = (XInterface)xChild.getParent();
            xModel = (XModel)UnoRuntime.queryInterface( XModel.class, xParent );
            xChild = (XChild)UnoRuntime.queryInterface( XChild.class, xParent );
        }

        return new DocumentHelper( orb, xModel );
View Full Code Here

Examples of com.sun.star.container.XChild

     
        // set the result to its parent until that would be null 
        Object xParent;
        do
        {
            XChild xParentAccess =
                (XChild) UnoRuntime.queryInterface(XChild.class,xResult);

            if (xParentAccess != null)
                xParent = xParentAccess.getParent();
            else
                xParent = null;

            if (xParent != null)
                xResult = xParent;
View Full Code Here

Examples of com.sun.star.container.XChild

    /// WORKAROUND: does the same as xNamedItem.setName(sNewName) should do
    void renameSetItem(XNamed xNamedItem, String sNewName)
    throws com.sun.star.uno.Exception
    {
        XChild xChildItem = (XChild)
            UnoRuntime.queryInterface(XChild.class, xNamedItem);

        XNameContainer xParentSet = (XNameContainer)
            UnoRuntime.queryInterface( XNameContainer.class, xChildItem.getParent() );

        String sOldName = xNamedItem.getName();

        // now rename the item
        xParentSet.removeByName(sOldName);
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.