Class CellRecord

All Implemented Interfaces:
CellValueRecordInterface
Direct Known Subclasses:
BoolErrRecord, FormulaRecord, LabelSSTRecord, NumberRecord, RKRecord

public abstract class CellRecord extends StandardRecord implements CellValueRecordInterface
Base class for all cell value records (implementors of CellValueRecordInterface). Subclasses are expected to manage the cell data values (of various types).
  • Constructor Details

    • CellRecord

      protected CellRecord()
    • CellRecord

      protected CellRecord(RecordInputStream in)
  • Method Details

    • setRow

      public final void setRow(int row)
      Specified by:
      setRow in interface CellValueRecordInterface
      Parameters:
      row - the row this cell occurs within
    • setColumn

      public final void setColumn(short col)
      Specified by:
      setColumn in interface CellValueRecordInterface
      Parameters:
      col - the column this cell defines
    • setXFIndex

      public final void setXFIndex(short xf)
      set the index to the ExtendedFormat
      Specified by:
      setXFIndex in interface CellValueRecordInterface
      Parameters:
      xf - index to the XF record
      See Also:
    • getRow

      public final int getRow()
      Specified by:
      getRow in interface CellValueRecordInterface
      Returns:
      the row this cell occurs on
    • getColumn

      public final short getColumn()
      Specified by:
      getColumn in interface CellValueRecordInterface
      Returns:
      the column this cell defines within the row
    • getXFIndex

      public final short getXFIndex()
      get the index to the ExtendedFormat
      Specified by:
      getXFIndex in interface CellValueRecordInterface
      Returns:
      index to the XF record
      See Also:
    • toString

      public final String toString()
      Description copied from class: Record
      get a string representation of the record (for biffview/debugging)
      Overrides:
      toString in class Record
    • appendValueText

      protected abstract void appendValueText(StringBuilder sb)
      Append specific debug info (used by toString() for the value contained in this record. Trailing new-line should not be appended (superclass does that).
      Parameters:
      sb - the StringBuilder to write to
    • getRecordName

      protected abstract String getRecordName()
      Gets the debug info BIFF record type name (used by toString().
      Returns:
      the record type name
    • serializeValue

      protected abstract void serializeValue(LittleEndianOutput out)
      writes out the value data for this cell record
      Parameters:
      out - the output
    • getValueDataSize

      protected abstract int getValueDataSize()
      Returns:
      the size (in bytes) of the value data for this cell record
    • serialize

      public final void serialize(LittleEndianOutput out)
      Description copied from class: StandardRecord
      Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.

      The number of bytes written must equal the record size reported by RecordBase.getRecordSize()} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).

      Specified by:
      serialize in class StandardRecord
      Parameters:
      out - the output object
    • getDataSize

      protected final int getDataSize()
      Specified by:
      getDataSize in class StandardRecord
    • copyBaseFields

      protected final void copyBaseFields(CellRecord rec)