/** * Implementation of the deep copy function * * @param col the column which the new cell will occupy * @param row the row which the new cell will occupy * @return a copy of this cell, which can then be added to the sheet */ public WritableCell copyTo(int col, int row) { return new FormulaRecord(col, row, this); }
/** * Gets the binary data for output to file * * @return the binary data */ public byte[] getData() { byte[] celldata = super.getData(); byte[] formulaData = getFormulaData(); byte[] data = new byte[formulaData.length + celldata.length]; System.arraycopy(celldata, 0, data, 0, celldata.length); System.arraycopy(formulaData, 0, data, celldata.length, formulaData.length); return data; }
initializeCopiedFormula(ws, es, nt); return; (e.getMessage() + " when parsing formula " + formulaToParse + " in cell " + getSheet().getName() + "!" + CellReferenceHelper.getCellReference(getColumn(), getRow()));
/** * Called when a column is inserted on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the column was inserted * @param sheetIndex the sheet index on which the column was inserted * @param col the column number which was inserted */ void columnInserted(Sheet s, int sheetIndex, int col) { parser.columnInserted(sheetIndex, col, s == getSheet()); formulaBytes = parser.getBytes(); }
/** * Called when the cell is added to the worksheet. Overrides the * method in the base class in order to get a handle to the * WorkbookSettings so that this formula may be initialized * * @param fr the formatting records * @param ss the shared strings used within the workbook * @param s the sheet this is being added to */ void setCellDetails(FormattingRecords fr, SharedStrings ss, WritableSheetImpl s) { super.setCellDetails(fr, ss, s); initialize(s.getWorkbookSettings(), s.getWorkbook(), s.getWorkbook()); s.getWorkbook().addRCIRCell(this); }
initializeCopiedFormula(ws, es, nt); return; (e.getMessage() + " when parsing formula " + formulaToParse + " in cell " + getSheet().getName() + "!" + CellReferenceHelper.getCellReference(getColumn(), getRow()));
/** * Called when a column is removed on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the column was inserted * @param sheetIndex the sheet index on which the column was inserted * @param col the column number which was inserted */ void columnRemoved(Sheet s, int sheetIndex, int col) { parser.columnRemoved(sheetIndex, col, s == getSheet()); formulaBytes = parser.getBytes(); }
/** * Called when the cell is added to the worksheet. Overrides the * method in the base class in order to get a handle to the * WorkbookSettings so that this formula may be initialized * * @param fr the formatting records * @param ss the shared strings used within the workbook * @param s the sheet this is being added to */ void setCellDetails(FormattingRecords fr, SharedStrings ss, WritableSheetImpl s) { super.setCellDetails(fr, ss, s); initialize(s.getWorkbookSettings(), s.getWorkbook(), s.getWorkbook()); s.getWorkbook().addRCIRCell(this); }
/** * Called when a row is inserted on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the column was inserted * @param sheetIndex the sheet index on which the column was inserted * @param row the column number which was inserted */ void rowInserted(Sheet s, int sheetIndex, int row) { parser.rowInserted(sheetIndex, row, s == getSheet()); formulaBytes = parser.getBytes(); }
/** * Implementation of the deep copy function * * @param col the column which the new cell will occupy * @param row the row which the new cell will occupy * @return a copy of this cell, which can then be added to the sheet */ public WritableCell copyTo(int col, int row) { return new FormulaRecord(col, row, this); }
/** * Gets the binary data for output to file * * @return the binary data */ public byte[] getData() { byte[] celldata = super.getData(); byte[] formulaData = getFormulaData(); byte[] data = new byte[formulaData.length + celldata.length]; System.arraycopy(celldata, 0, data, 0, celldata.length); System.arraycopy(formulaData, 0, data, celldata.length, formulaData.length); return data; }
/** * Called when a row is inserted on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the row was removed * @param sheetIndex the sheet index on which the column was removed * @param row the column number which was removed */ void rowRemoved(Sheet s, int sheetIndex, int row) { parser.rowRemoved(sheetIndex, row, s == getSheet()); formulaBytes = parser.getBytes(); } }
/** * Called when a column is inserted on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the column was inserted * @param sheetIndex the sheet index on which the column was inserted * @param col the column number which was inserted */ void columnInserted(Sheet s, int sheetIndex, int col) { parser.columnInserted(sheetIndex, col, s == getSheet()); formulaBytes = parser.getBytes(); }
/** * Called when a row is inserted on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the column was inserted * @param sheetIndex the sheet index on which the column was inserted * @param row the column number which was inserted */ void rowInserted(Sheet s, int sheetIndex, int row) { parser.rowInserted(sheetIndex, row, s == getSheet()); formulaBytes = parser.getBytes(); }
/** * Called when a column is removed on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the column was inserted * @param sheetIndex the sheet index on which the column was inserted * @param col the column number which was inserted */ void columnRemoved(Sheet s, int sheetIndex, int col) { parser.columnRemoved(sheetIndex, col, s == getSheet()); formulaBytes = parser.getBytes(); }
/** * Called when a row is inserted on the specified sheet. Notifies all * RCIR cells of this change. The default implementation here does nothing * * @param s the sheet on which the row was removed * @param sheetIndex the sheet index on which the column was removed * @param row the column number which was removed */ void rowRemoved(Sheet s, int sheetIndex, int row) { parser.rowRemoved(sheetIndex, row, s == getSheet()); formulaBytes = parser.getBytes(); } }