Package com.sun.star.table

Examples of com.sun.star.table.XTableRows


        }

        XColumnRowRange oColumnRowRange = (XColumnRowRange)
            UnoRuntime.queryInterface(XColumnRowRange.class, xSpreadsheet);

        XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
        oObj = oRows;

        log.println("creating a new environment for object");

        XEnumerationAccess ea = (XEnumerationAccess)
View Full Code Here


        }

        XColumnRowRange oColumnRowRange = (XColumnRowRange)
            UnoRuntime.queryInterface(XColumnRowRange.class, xSpreadsheet);

        XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
        oObj = oRows;

        log.println("creating a new environment for object");
        TestEnvironment tEnv = new TestEnvironment(oObj);
View Full Code Here

            log.println("Exception!");
        }

        try {
         log.println("getting table row");
            XTableRows oTRn = oTable.getRows();
            XIndexAccess oIA = (XIndexAccess) UnoRuntime.queryInterface
                (XIndexAccess.class,oTRn);
            oObj = (XPropertySet) AnyConverter.toObject(
                    new Type(XPropertySet.class),oIA.getByIndex(1));
        } catch( Exception e ) {
View Full Code Here

            oObj.filter(desc);

            XColumnRowRange oColumnRowRange = (XColumnRowRange) UnoRuntime.queryInterface(
                                                      XColumnRowRange.class,
                                                      oSheet);
            XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
            XPropertySet rowProp = (XPropertySet) UnoRuntime.queryInterface(
                                           XPropertySet.class,
                                           oRows.getByIndex(0));
            boolean locRes = ((Boolean) rowProp.getPropertyValue("IsVisible")).booleanValue();

            if (locRes) {
                log.println("Row 1 should be invisible after filter()");
                res &= false;
            } else {
                res &= true;
            }

            rowProp = (XPropertySet) UnoRuntime.queryInterface(
                              XPropertySet.class, oRows.getByIndex(1));
            locRes = ((Boolean) rowProp.getPropertyValue("IsVisible")).booleanValue();

            if (locRes) {
                log.println("Row 2 should be invisible after filter()");
                res &= false;
View Full Code Here

                log.println("Cells were already inserted. "+
                    "Delete old cells now");
                XColumnRowRange oColumnRowRange = (XColumnRowRange)
                    UnoRuntime.queryInterface(XColumnRowRange.class, oSheet);

                XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
                oRows.removeByIndex(21,1);
            }
            CellRangeAddress sSrc = new CellRangeAddress(iSheet, 0, 21, 5, 21);
            oObj.insertCells (sSrc, CellInsertMode.DOWN) ;

            // check the result
View Full Code Here

                new Type(XSpreadsheet.class),
                    oNames.getByName(oNames.getElementNames()[0]));

            XColumnRowRange oColumnRowRange = (XColumnRowRange)
                UnoRuntime.queryInterface(XColumnRowRange.class, xSpreadsheet);
            XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
            XIndexAccess oIndexAccess = (XIndexAccess)
                UnoRuntime.queryInterface(XIndexAccess.class, oRows);
            oObj = (XInterface) AnyConverter.toObject(
                    new Type(XInterface.class),oIndexAccess.getByIndex(6));
        } catch(com.sun.star.lang.WrappedTargetException e) {
View Full Code Here

                log.println("Cells were already inserted. "+
                    "Delete old cells now");
                XColumnRowRange oColumnRowRange = (XColumnRowRange)
                    UnoRuntime.queryInterface(XColumnRowRange.class, oSheet);

                XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
                oRows.removeByIndex(21,1);
            }
            CellRangeAddress sSrc = new CellRangeAddress(iSheet, 0, 21, 5, 21);
            oObj.insertCells (sSrc, CellInsertMode.DOWN) ;

            // check the result
View Full Code Here

                                    // Querying for the interface XColumnRowRange on the XCellRange
                                    XColumnRowRange xcolumnrowrange = ( XColumnRowRange )
                                        UnoRuntime.queryInterface(
                                            XColumnRowRange.class, xcellrange );
                                    // Inserting one row to the table
                                    XTableRows xTableRows = xcolumnrowrange.getRows();
                                    xTableRows.insertByIndex( intRowToInsert, 1 );
                                   
                                    // Querying for the interface XCellRangeMovement on XCellRange
                                    XCellRangeMovement xcellrangemovement = ( XCellRangeMovement )
                                        UnoRuntime.queryInterface( XCellRangeMovement.class, xcellrange );
                                   
View Full Code Here

     * @param start
     * @param count
     */
    public static void removeTableRows(Object table, int start, int count)
    {
        XTableRows rows = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table)).getRows();
        rows.removeByIndex(start, count);
    }
View Full Code Here

     * @param start
     * @param count
     */
    public static void insertTableRows(Object table, int start, int count)
    {
        XTableRows rows = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table)).getRows();
        rows.insertByIndex(start, count);
    }
View Full Code Here

TOP

Related Classes of com.sun.star.table.XTableRows

Copyright © 2018 www.massapicom. 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.