Package com.sun.star.table

Examples of com.sun.star.table.XTableRows


                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


            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

            bIsGroupColumn = true;
            XTextRange xTextCell;
            XCell xCell;
            getTableColumns(TableName);
           
            XTableRows xRows = null;
            try
            {
                xRows = xTextTable.getRows();
            }
            catch (java.lang.NullPointerException e)
            {
                e.printStackTrace();
// TODO: handle the nullpointer right
//                return;
            }
            for (int n = 0; n < xTableColumns.getCount(); n++)
            {
                for (int m = 0; m < xRows.getCount(); m++)
                {
                    xCell = xCellRange.getCellByPosition(n,m);
                    xTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell);
                    String CompString = TableName.substring(4);
                    XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell);
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

     * @param table
     * @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 table
     * @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

         */
        public void reduceDocumentTo(int topics) throws Exception {
            // we never remove the first topic...
            if (topics <= 0)
                topics = 1;
            XTableRows tableRows = table.getRows();
            int targetNumOfRows = topics * rowsPerTopic + 1;
            if (tableRows.getCount() > targetNumOfRows)
                tableRows.removeByIndex(targetNumOfRows , tableRows.getCount() - targetNumOfRows );
            formatLastRow();
            while ( writtenTopics.size() > topics )
                writtenTopics.remove(topics);
        }
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");

        XEnumerationAccess ea = (XEnumerationAccess)
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

        }

        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

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.