Class EscherAggregate

  • All Implemented Interfaces:

    public final class EscherAggregate
    extends AbstractEscherHolderRecord
    This class is used to aggregate the MSODRAWING and OBJ record combinations. This is necessary due to the bizare way in which these records are serialized. What happens is that you get a combination of MSODRAWING -> OBJ -> MSODRAWING -> OBJ records but the escher records are serialized _across_ the MSODRAWING records.

    It gets even worse when you start looking at TXO records.

    So what we do with this class is aggregate lazily. That is we don't aggregate the MSODRAWING -> OBJ records unless we need to modify them.

    At first document contains 4 types of records which belong to drawing layer. There are can be such sequence of record:

    DrawingRecord ContinueRecord ... ContinueRecord ObjRecord | TextObjectRecord ..... ContinueRecord ... ContinueRecord ObjRecord | TextObjectRecord NoteRecord ... NoteRecord

    To work with shapes we have to read data from Drawing and Continue records into single array of bytes and build escher(office art) records tree from this array. Each shape in drawing layer matches corresponding ObjRecord Each textbox matches corresponding TextObjectRecord

    ObjRecord contains information about shape. Thus each ObjRecord corresponds EscherContainerRecord(SPGR)

    EscherAggrefate contains also NoteRecords NoteRecords must be serial