/** * Called when a column is inserted on the specified sheet. Notifies all * RCIR cells of this change * * @param s the sheet on which the column was inserted * @param col the column number which was inserted */ void columnInserted(WritableSheetImpl s, int col) { int externalSheetIndex = getExternalSheetIndex(s.getName()); for (Iterator i = rcirCells.iterator() ; i.hasNext() ;) { CellValue cv = (CellValue) i.next(); cv.columnInserted(s, externalSheetIndex, col); } // Adjust any named cells if (names != null) { for (Iterator i = names.iterator(); i.hasNext() ;) { NameRecord nameRecord = (NameRecord) i.next(); nameRecord.columnInserted(externalSheetIndex, col); } } }
/** * Called when a column is inserted on the specified sheet. Notifies all * RCIR cells of this change * * @param s the sheet on which the column was inserted * @param col the column number which was inserted */ void columnInserted(WritableSheetImpl s, int col) { int externalSheetIndex = getExternalSheetIndex(s.getName()); for (Iterator i = rcirCells.iterator() ; i.hasNext() ;) { CellValue cv = (CellValue) i.next(); cv.columnInserted(s, externalSheetIndex, col); } // Adjust any named cells if (names != null) { for (Iterator i = names.iterator(); i.hasNext() ;) { NameRecord nameRecord = (NameRecord) i.next(); nameRecord.columnInserted(externalSheetIndex, col); } } }
/** * Called when a row is inserted on the specified sheet. Notifies all * RCIR cells of this change * * @param s the sheet on which the row was inserted * @param row the row number which was inserted */ void rowInserted(WritableSheetImpl s, int row) { int externalSheetIndex = getExternalSheetIndex(s.getName()); // Adjust the row infos for (Iterator i = rcirCells.iterator() ; i.hasNext() ;) { CellValue cv = (CellValue) i.next(); cv.rowInserted(s, externalSheetIndex, row); } // Adjust any named cells if (names != null) { for (Iterator i = names.iterator(); i.hasNext() ;) { NameRecord nameRecord = (NameRecord) i.next(); nameRecord.rowInserted(externalSheetIndex, row); } } }
/** * Called when a row is inserted on the specified sheet. Notifies all * RCIR cells of this change * * @param s the sheet on which the row was inserted * @param row the row number which was inserted */ void rowInserted(WritableSheetImpl s, int row) { int externalSheetIndex = getExternalSheetIndex(s.getName()); // Adjust the row infos for (Iterator i = rcirCells.iterator() ; i.hasNext() ;) { CellValue cv = (CellValue) i.next(); cv.rowInserted(s, externalSheetIndex, row); } // Adjust any named cells if (names != null) { for (Iterator i = names.iterator(); i.hasNext() ;) { NameRecord nameRecord = (NameRecord) i.next(); nameRecord.rowInserted(externalSheetIndex, row); } } }
int externalSheetIndex = getExternalSheetIndex(sheet.getName());
int externalSheetIndex = getExternalSheetIndex(sheet.getName());
int externalSheetIndex = getExternalSheetIndex(s.getName()); for (Iterator i = rcirCells.iterator() ; i.hasNext() ;)
int externalSheetIndex = getExternalSheetIndex(s.getName()); for (Iterator i = rcirCells.iterator() ; i.hasNext() ;)
int externalSheetIndex = getExternalSheetIndex(s.getName()); for (Iterator i = rcirCells.iterator() ; i.hasNext() ;)
int externalSheetIndex = getExternalSheetIndex(s.getName()); for (Iterator i = rcirCells.iterator() ; i.hasNext() ;)
int externalSheetIndex = getExternalSheetIndex(sheet.getName());
int externalSheetIndex = getExternalSheetIndex(sheet.getName());
/** * Gets the named cell from this workbook. If the name refers to a * range of cells, then the cell on the top left is returned. If * the name cannot be found, null is returned * * @param the name of the cell/range to search for * @return the cell in the top left of the range if found, NULL * otherwise */ public WritableCell findCellByName(String name) { NameRecord nr = (NameRecord) nameRecords.get(name); if (nr == null) { return null; } NameRecord.NameRange[] ranges = nr.getRanges(); // Go and retrieve the first cell in the first range int sheetIndex = getExternalSheetIndex(ranges[0].getExternalSheet()); WritableSheet s = getSheet(sheetIndex); WritableCell cell = s.getWritableCell(ranges[0].getFirstColumn(), ranges[0].getFirstRow()); return cell; }
/** * Gets the named cell from this workbook. If the name refers to a * range of cells, then the cell on the top left is returned. If * the name cannot be found, null is returned * * @param the name of the cell/range to search for * @return the cell in the top left of the range if found, NULL * otherwise */ public WritableCell findCellByName(String name) { NameRecord nr = (NameRecord) nameRecords.get(name); if (nr == null) { return null; } NameRecord.NameRange[] ranges = nr.getRanges(); // Go and retrieve the first cell in the first range int sheetIndex = getExternalSheetIndex(ranges[0].getExternalSheet()); WritableSheet s = getSheet(sheetIndex); WritableCell cell = s.getWritableCell(ranges[0].getFirstColumn(), ranges[0].getFirstRow()); return cell; }
int externalSheetIndex = getExternalSheetIndex(sheet.getName());
int externalSheetIndex = getExternalSheetIndex(sheet.getName());
getExternalSheetIndex(ranges[i].getExternalSheet()), ranges[i].getFirstColumn(), ranges[i].getFirstRow(),
getExternalSheetIndex(ranges[i].getExternalSheet()), ranges[i].getFirstColumn(), ranges[i].getFirstRow(),