Package loci.poi.hssf.record.formula
Class ArrayPtg
java.lang.Object
loci.poi.hssf.record.formula.Ptg
loci.poi.hssf.record.formula.ArrayPtg
ArrayPtg - handles arrays
The ArrayPtg is a little wierd, the size of the Ptg when parsing initially only
includes the Ptg sid and the reserved bytes. The next Ptg in the expression then follows.
It is only after the "size" of all the Ptgs is met, that the ArrayPtg data is actually
held after this. So Ptg.createParsedExpression keeps track of the number of
ArrayPtg elements and need to parse the data upto the FORMULA record size.
- Author:
- Jason Height (jheight at chariot dot net dot au)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byteprotected byteprotected byteprotected byteprotected byteprotected byteprotected bytestatic final byteprotected shortprotected shortprotected Object[][]Fields inherited from class loci.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, ptgClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()shortbyteshortintgetSize()This size includes the size of the array Ptg plus the Array Ptg Token value sizevoidRead in the actual token (array) values.voidsetColumnCount(short col) voidsetRowCount(short row) toFormulaString(Workbook book) return a string representation of this token alonetoString()Overridden toString method to ensure object hash is not printed.voidwriteBytes(byte[] array, int offset) write this Ptg to a byte arrayintwriteTokenValueBytes(byte[] array, int offset) Methods inherited from class loci.poi.hssf.record.formula.Ptg
createParsedExpressionTokens, createPtg, getBytes, getPtgClass, serializePtgStack, setClass, toDebugString
-
Field Details
-
sid
public static final byte sid- See Also:
-
field_1_reserved
protected byte field_1_reserved -
field_2_reserved
protected byte field_2_reserved -
field_3_reserved
protected byte field_3_reserved -
field_4_reserved
protected byte field_4_reserved -
field_5_reserved
protected byte field_5_reserved -
field_6_reserved
protected byte field_6_reserved -
field_7_reserved
protected byte field_7_reserved -
token_1_columns
protected short token_1_columns -
token_2_rows
protected short token_2_rows -
token_3_arrayValues
-
-
Constructor Details
-
ArrayPtg
protected ArrayPtg() -
ArrayPtg
-
-
Method Details
-
readTokenValues
Read in the actual token (array) values. This occurs AFTER the last Ptg in the expression. -
toString
Description copied from class:PtgOverridden toString method to ensure object hash is not printed. This helps get rid of gratuitous diffs when comparing two dumps Subclasses may output more relevant information by overriding this method -
writeBytes
public void writeBytes(byte[] array, int offset) Description copied from class:Ptgwrite this Ptg to a byte array- Specified by:
writeBytesin classPtg
-
writeTokenValueBytes
public int writeTokenValueBytes(byte[] array, int offset) -
setRowCount
public void setRowCount(short row) -
getRowCount
public short getRowCount() -
setColumnCount
public void setColumnCount(short col) -
getColumnCount
public short getColumnCount() -
getSize
public int getSize()This size includes the size of the array Ptg plus the Array Ptg Token value size -
toFormulaString
Description copied from class:Ptgreturn a string representation of this token alone- Specified by:
toFormulaStringin classPtg
-
getDefaultOperandClass
public byte getDefaultOperandClass()- Specified by:
getDefaultOperandClassin classPtg
-
clone
-