| Method from org.apache.poi.hssf.record.formula.ReferencePtg Detail: |
public Object clone() {
ReferencePtg ptg = new ReferencePtg();
ptg.field_1_row = field_1_row;
ptg.field_2_col = field_2_col;
ptg.setClass(ptgClass);
return ptg;
}
|
public short getColumn() {
return rowRelative.setShortBoolean(colRelative.setShortBoolean(field_2_col,false),false);
}
|
public short getColumnRaw() {
return field_2_col;
}
|
public byte getDefaultOperandClass() {
return Ptg.CLASS_REF;
}
|
public short getRow() {
return field_1_row;
}
|
public int getSize() {
return SIZE;
}
|
public boolean isColRelative() {
return colRelative.isSet(field_2_col);
}
|
public boolean isRowRelative() {
return rowRelative.isSet(field_2_col);
}
|
public void setColRelative(boolean rel) {
field_2_col=colRelative.setShortBoolean(field_2_col,rel);
}
|
public void setColumn(short col) {
field_2_col = col; // fix this
}
|
public void setColumnRaw(short col) {
field_2_col = col;
}
|
public void setRow(short row) {
field_1_row = row;
}
|
public void setRowRelative(boolean rel) {
field_2_col=rowRelative.setShortBoolean(field_2_col,rel);
}
|
public String toFormulaString(Workbook book) {
//TODO -- should we store a cellreference instance in this ptg?? but .. memory is an issue, i believe!
return (new CellReference(getRow(),getColumn(),!isRowRelative(),!isColRelative())).toString();
}
|
public String toString() {
StringBuffer buffer = new StringBuffer("[ValueReferencePtg]\n");
buffer.append("row = ").append(getRow()).append("\n");
buffer.append("col = ").append(getColumnRaw()).append("\n");
buffer.append("rowrelative = ").append(isRowRelative()).append("\n");
buffer.append("colrelative = ").append(isColRelative()).append("\n");
return buffer.toString();
}
|
public void writeBytes(byte[] array,
int offset) {
array[offset] = (byte) (sid + ptgClass);
LittleEndian.putShort(array,offset+1,field_1_row);
LittleEndian.putShort(array,offset+3,field_2_col);
}
|