Package com.sun.star.table

Examples of com.sun.star.table.XColumnRowRange


                //log.println("Rows closed.");
            }
            else{
                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) ;
View Full Code Here


        } catch (com.sun.star.lang.IllegalArgumentException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't get spreadsheet", e);
        }

        XColumnRowRange oColumnRowRange = (XColumnRowRange)
            UnoRuntime.queryInterface(XColumnRowRange.class, xSpreadsheet);
        XTableColumns oColumns = (XTableColumns) oColumnRowRange.getColumns();
        oObj = oColumns;

        log.println("creating a new environment for object");
        XEnumerationAccess ea = (XEnumerationAccess)
                    UnoRuntime.queryInterface(XEnumerationAccess.class,oObj);
View Full Code Here

                                    // Changing the background color of the cell to red
                                    xpropertyset.setPropertyValue(
                                        "CellBackColor", new Integer( 16711680 ) );
                                } else {
                                    // 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 );
                                   
                                    // Creating the cell address of the destination
                                    CellAddress celladdress = new CellAddress();
                                    celladdress.Sheet = 0;
                                    celladdress.Column = 0;
                                    celladdress.Row = intRowToInsert;
                                   
                                    // Creating the cell range of the source
                                    CellRangeAddress cellrangeaddress =
                                    new CellRangeAddress();
                                    cellrangeaddress.Sheet = 0;
                                    cellrangeaddress.StartColumn = 0;
                                    cellrangeaddress.StartRow = intRow + 1;
                                    cellrangeaddress.EndColumn = 8;
                                    cellrangeaddress.EndRow = intRow + 1;
                                   
                                    // Moves the cell range to another position in the document
                                    xcellrangemovement.moveRange( celladdress, cellrangeaddress );
                                   
                                    // Removing the row not needed anymore
                                    xcolumnrowrange.getRows().removeByIndex( intRow + 1, 1 );
                                   
                                    // Set the current row, because we want to recalculate all rows below
                                    intRow = intRowToInsert - 1;
                                   
                                    // Tests at which line we want to insert
View Full Code Here

                                    xpropertyset.setPropertyValue(
                                        "CellBackColor", new Integer( 16711680 ) );
                                } else {
                                    // 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 );
                                   
                                    // Creating the cell address of the destination
                                    CellAddress celladdress = new CellAddress();
                                    celladdress.Sheet = 0;
                                    celladdress.Column = 0;
                                    celladdress.Row = intRowToInsert;
                                   
                                    // Creating the cell range of the source
                                    CellRangeAddress cellrangeaddress =
                                    new CellRangeAddress();
                                    cellrangeaddress.Sheet = 0;
                                    cellrangeaddress.StartColumn = 0;
                                    cellrangeaddress.StartRow = intRow + 1;
                                    cellrangeaddress.EndColumn = 8;
                                    cellrangeaddress.EndRow = intRow + 1;
                                   
                                    // Moves the cell range to another position in
                                    // the document
                                    xcellrangemovement.moveRange(celladdress,
                                                                 cellrangeaddress);
                                   
                                    // Removing the row not needed anymore
                                    xcolumnrowrange.getRows().removeByIndex(intRow
                                                                            + 1, 1);
                                   
                                    // Set the current row, because we want to
                                    // recalculate all rows below
                                    intRow = intRowToInsert - 1;
View Full Code Here

TOP

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

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.