Class ArrayPtg

  • Direct Known Subclasses:
    ArrayPtgA, ArrayPtgV

    public class ArrayPtg
    extends Ptg
    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 Detail

      • 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

        protected Object[][] token_3_arrayValues
    • Constructor Detail

      • ArrayPtg

        protected ArrayPtg()
    • Method Detail

      • readTokenValues

        public void readTokenValues​(RecordInputStream in)
        Read in the actual token (array) values. This occurs AFTER the last Ptg in the expression.
      • toString

        public String toString()
        Description copied from class: Ptg
        Overridden 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
        Overrides:
        toString in class Ptg
      • writeBytes

        public void writeBytes​(byte[] array,
                               int offset)
        Description copied from class: Ptg
        write this Ptg to a byte array
        Specified by:
        writeBytes in class Ptg
      • 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
        Specified by:
        getSize in class Ptg
      • toFormulaString

        public String toFormulaString​(Workbook book)
        Description copied from class: Ptg
        return a string representation of this token alone
        Specified by:
        toFormulaString in class Ptg