A 3d cell reference in a formula
| Method from jxl.biff.formula.CellReference3d Detail: |
public void adjustRelativeCellReferences(int colAdjust,
int rowAdjust) {
if (columnRelative)
{
column += colAdjust;
}
if (rowRelative)
{
row += rowAdjust;
}
}
Adjusts all the relative cell references in this formula by the
amount specified. Used when copying formulas |
public void columnInserted(int sheetIndex,
int col,
boolean currentSheet) {
if (sheetIndex != sheet)
{
return;
}
if (column >= col)
{
column++;
}
}
Called when a column is inserted on the specified sheet. Tells
the formula parser to update all of its cell references beyond this
column |
void columnRemoved(int sheetIndex,
int col,
boolean currentSheet) {
if (sheetIndex != sheet)
{
return;
}
if (column >= col)
{
column--;
}
}
Called when a column is inserted on the specified sheet. Tells
the formula parser to update all of its cell references beyond this
column |
byte[] getBytes() {
byte[] data = new byte[7];
data[0] = Token.REF3D.getCode();
IntegerHelper.getTwoBytes(sheet, data, 1);
IntegerHelper.getTwoBytes(row, data, 3);
int grcol = column;
// Set the row/column relative bits if applicable
if (rowRelative)
{
grcol |= 0x8000;
}
if (columnRelative)
{
grcol |= 0x4000;
}
IntegerHelper.getTwoBytes(grcol, data, 5);
return data;
}
Gets the token representation of this item in RPN |
public int getColumn() {
return column;
}
|
public int getRow() {
return row;
}
|
public void getString(StringBuffer buf) {
CellReferenceHelper.getCellReference(sheet, column, !columnRelative,
row, !rowRelative,
workbook, buf);
}
Gets the string version of this cell reference |
void handleImportedCellReferences() {
setInvalid();
}
If this formula was on an imported sheet, check that
cell references to another sheet are warned appropriately
Flags the formula as invalid |
public int read(byte[] data,
int pos) {
sheet = IntegerHelper.getInt(data[pos], data[pos + 1]);
row = IntegerHelper.getInt(data[pos + 2], data[pos + 3]);
int columnMask = IntegerHelper.getInt(data[pos + 4], data[pos + 5]);
column = columnMask & 0x00ff;
columnRelative = ((columnMask & 0x4000) != 0);
rowRelative = ((columnMask & 0x8000) != 0);
return 6;
}
Reads the ptg data from the array starting at the specified position |
void rowInserted(int sheetIndex,
int r,
boolean currentSheet) {
if (sheetIndex != sheet)
{
return;
}
if (row >= r)
{
row++;
}
}
Called when a column is inserted on the specified sheet. Tells
the formula parser to update all of its cell references beyond this
column |
void rowRemoved(int sheetIndex,
int r,
boolean currentSheet) {
if (sheetIndex != sheet)
{
return;
}
if (row >= r)
{
row--;
}
}
Called when a column is inserted on the specified sheet. Tells
the formula parser to update all of its cell references beyond this
column |