/** * Default behaviour is to do nothing * * @param colAdjust the amount to add on to each relative cell reference * @param rowAdjust the amount to add on to each relative row reference */ public void adjustRelativeCellReferences(int colAdjust, int rowAdjust) { root.adjustRelativeCellReferences(colAdjust, rowAdjust); }
/** * Called when a column is inserted on the specified sheet. Tells * the formula parser to update all of its cell references beyond this * column * * @param sheetIndex the sheet on which the column was inserted * @param col the column number which was inserted * @param currentSheet TRUE if this formula is on the sheet in which the * column was inserted, FALSE otherwise */ public void columnInserted(int sheetIndex, int col, boolean currentSheet) { root.columnInserted(sheetIndex, col, currentSheet); }
/** * Called when a column is inserted on the specified sheet. Tells * the formula parser to update all of its cell references beyond this * column * * @param sheetIndex the sheet on which the column was removed * @param col the column number which was removed * @param currentSheet TRUE if this formula is on the sheet in which the * column was inserted, FALSE otherwise */ public void columnRemoved(int sheetIndex, int col, boolean currentSheet) { root.columnRemoved(sheetIndex, col, currentSheet); }
/** * Sets the volatile flag and ripples all the way up the parse tree */ protected void setVolatile() { volatileFunction = true; if (parent != null && !parent.isVolatile()) { parent.setVolatile(); } }
/** * If this formula was on an imported sheet, check that * cell references to another sheet are warned appropriately * * @return TRUE if the formula is valid import, FALSE otherwise */ public boolean handleImportedCellReferences() { root.handleImportedCellReferences(); return root.isValid(); } }
/** * Gets the formula as a string */ public String getFormula() { StringBuffer sb = new StringBuffer(); root.getString(sb); return sb.toString(); }
/** * Called when a column is inserted on the specified sheet. Tells * the formula parser to update all of its cell references beyond this * column * * @param sheetIndex the sheet on which the column was removed * @param row the column number which was removed * @param currentSheet TRUE if this formula is on the sheet in which the * column was inserted, FALSE otherwise */ public void rowRemoved(int sheetIndex, int row, boolean currentSheet) { root.rowRemoved(sheetIndex, row, currentSheet); }
/** * Called when a column is inserted on the specified sheet. Tells * the formula parser to update all of its cell references beyond this * column * * @param sheetIndex the sheet on which the column was inserted * @param row the column number which was inserted * @param currentSheet TRUE if this formula is on the sheet in which the * column was inserted, FALSE otherwise */ public void rowInserted(int sheetIndex, int row, boolean currentSheet) { root.rowInserted(sheetIndex, row, currentSheet); }
/** * Gets the bytes for the formula. This takes into account any * token mapping necessary because of shared formulas * * @return the bytes in RPN */ public byte[] getBytes() { return root.getBytes(); }
/** * If this formula was on an imported sheet, check that * cell references to another sheet are warned appropriately * Does nothing, as operators don't have cell references */ void handleImportedCellReferences() { ParseItem[] operands = getOperands(); operands[0].handleImportedCellReferences(); operands[1].handleImportedCellReferences(); }
/** * Gets the bytes for the formula * * @return the bytes in RPN */ public byte[] getBytes() { byte[] bytes = root.getBytes(); if (root.isVolatile()) { byte[] newBytes = new byte[bytes.length + 4]; System.arraycopy(bytes, 0, newBytes, 4, bytes.length); newBytes[0] = Token.ATTRIBUTE.getCode(); newBytes[1] = (byte) 0x1; bytes = newBytes; } return bytes; }
/** * If this formula was on an imported sheet, check that * cell references to another sheet are warned appropriately * * @return TRUE if the formula is valid import, FALSE otherwise */ public boolean handleImportedCellReferences() { root.handleImportedCellReferences(); return root.isValid(); } }
/** * Gets the formula as a string */ public String getFormula() { StringBuffer sb = new StringBuffer(); root.getString(sb); return sb.toString(); }
/** * Called when a column is inserted on the specified sheet. Tells * the formula parser to update all of its cell references beyond this * column * * @param sheetIndex the sheet on which the column was removed * @param row the column number which was removed * @param currentSheet TRUE if this formula is on the sheet in which the * column was inserted, FALSE otherwise */ public void rowRemoved(int sheetIndex, int row, boolean currentSheet) { root.rowRemoved(sheetIndex, row, currentSheet); }
/** * Called when a column is inserted on the specified sheet. Tells * the formula parser to update all of its cell references beyond this * column * * @param sheetIndex the sheet on which the column was inserted * @param row the column number which was inserted * @param currentSheet TRUE if this formula is on the sheet in which the * column was inserted, FALSE otherwise */ public void rowInserted(int sheetIndex, int row, boolean currentSheet) { root.rowInserted(sheetIndex, row, currentSheet); }
/** * Gets the bytes for the formula. This takes into account any * token mapping necessary because of shared formulas * * @return the bytes in RPN */ public byte[] getBytes() { return root.getBytes(); }
/** * If this formula was on an imported sheet, check that * cell references to another sheet are warned appropriately * Does nothing, as operators don't have cell references */ void handleImportedCellReferences() { ParseItem[] operands = getOperands(); operands[0].handleImportedCellReferences(); operands[1].handleImportedCellReferences(); }
/** * Sets the volatile flag and ripples all the way up the parse tree */ protected void setVolatile() { volatileFunction = true; if (parent != null && !parent.isVolatile()) { parent.setVolatile(); } }
/** * Gets the bytes for the formula * * @return the bytes in RPN */ public byte[] getBytes() { byte[] bytes = root.getBytes(); if (root.isVolatile()) { byte[] newBytes = new byte[bytes.length + 4]; System.arraycopy(bytes, 0, newBytes, 4, bytes.length); newBytes[0] = Token.ATTRIBUTE.getCode(); newBytes[1] = (byte) 0x1; bytes = newBytes; } return bytes; }
/** * If this formula was on an imported sheet, check that * cell references to another sheet are warned appropriately * * @return TRUE if the formula is valid import, FALSE otherwise */ public boolean handleImportedCellReferences() { root.handleImportedCellReferences(); return root.isValid(); } }