Class EscherAggregate
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable,GenericRecord
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.ARCstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.BEVELstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.CANstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.CUBEstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.DONUTstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.HEARTstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.LINEstatic final shortDeprecated.not usedstatic final shortDeprecated.useShapeType.MOONstatic final shortDeprecated.not usedstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.FRAMEstatic final shortDeprecated.useShapeType.PLAQUEstatic final shortDeprecated.useShapeType.PLUSstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.RECTstatic final shortDeprecated.useShapeType.RIBBONstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.SEALstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.STAR_4static final shortDeprecated.useShapeType.STAR_8static final shortDeprecated.static final shortDeprecated.useShapeType.STAR_5static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.SUNstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.static final shortDeprecated.useShapeType.WAVEstatic final shortDeprecated.static final shortDeprecated.static final shortDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionEscherAggregate(boolean createDefaultTree) create new EscherAggregateEscherAggregate(EscherAggregate other) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTailRecord(NoteRecord note) Add tail record to existing mapvoidassociateShapeToObjRecord(EscherRecord r, Record objRecord) Associates an escher record to an OBJ record or a TXO record.copy()static EscherAggregatecreateAggregate(List<RecordBase> records, int locFirstDrawingRecord) Collapses the drawing records into an aggregate.static intintgives the current serialized size of the record.shortgetSid()return the non static version of the id for this record.voidRemove echerRecord and associated to it Obj or TextObj recordvoidremoveTailRecord(NoteRecord note) Remove tail record from the existing mapintserialize(int offset, byte[] data) Serializes this aggregate to a byte array.voidsetDgId(short dgId) EscherDgContainer -EscherSpgrContainer -EscherDgRecord - set id for this record set id for DgRecord of DgContainervoidsetMainSpRecordId(int shapeId) EscherDgContainer -EscherSpgrContainer --EscherSpContainer ---EscherSpRecord -set id for this record ---*** --*** -EscherDgRecord set id for the sp record of the first spContainer in main spgrConatinerstatic voidsetMaxRecordLength(int length) Calculates the xml representation of this record.Methods inherited from class org.apache.poi.hssf.record.AbstractEscherHolderRecord
addEscherRecord, addEscherRecord, clearEscherRecords, decode, findFirstWithId, getEscherContainer, getEscherRecord, getEscherRecords, getGenericChildren, getRawData, join, processContinueRecord, setRawDataMethods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toString
-
Field Details
-
sid
public static final short sid- See Also:
-
ST_MIN
Deprecated.not used- See Also:
-
ST_NOT_PRIMATIVE
Deprecated.- See Also:
-
ST_RECTANGLE
Deprecated.useShapeType.RECT- See Also:
-
ST_ROUNDRECTANGLE
Deprecated.- See Also:
-
ST_ELLIPSE
Deprecated.- See Also:
-
ST_DIAMOND
Deprecated.- See Also:
-
ST_ISOCELESTRIANGLE
Deprecated.- See Also:
-
ST_RIGHTTRIANGLE
Deprecated.- See Also:
-
ST_PARALLELOGRAM
Deprecated.- See Also:
-
ST_TRAPEZOID
Deprecated.- See Also:
-
ST_HEXAGON
Deprecated.- See Also:
-
ST_OCTAGON
Deprecated.- See Also:
-
ST_PLUS
Deprecated.useShapeType.PLUS- See Also:
-
ST_STAR
Deprecated.useShapeType.STAR_5- See Also:
-
ST_ARROW
Deprecated.- See Also:
-
ST_THICKARROW
Deprecated.- See Also:
-
ST_HOMEPLATE
Deprecated.- See Also:
-
ST_CUBE
Deprecated.useShapeType.CUBE- See Also:
-
ST_BALLOON
Deprecated.- See Also:
-
ST_SEAL
Deprecated.useShapeType.SEAL- See Also:
-
ST_ARC
Deprecated.useShapeType.ARC- See Also:
-
ST_LINE
Deprecated.useShapeType.LINE- See Also:
-
ST_PLAQUE
Deprecated.useShapeType.PLAQUE- See Also:
-
ST_CAN
Deprecated.useShapeType.CAN- See Also:
-
ST_DONUT
Deprecated.useShapeType.DONUT- See Also:
-
ST_TEXTSIMPLE
Deprecated.- See Also:
-
ST_TEXTOCTAGON
Deprecated.- See Also:
-
ST_TEXTHEXAGON
Deprecated.- See Also:
-
ST_TEXTCURVE
Deprecated.- See Also:
-
ST_TEXTWAVE
Deprecated.- See Also:
-
ST_TEXTRING
Deprecated.- See Also:
-
ST_TEXTONCURVE
Deprecated.- See Also:
-
ST_TEXTONRING
Deprecated.- See Also:
-
ST_STRAIGHTCONNECTOR1
Deprecated.- See Also:
-
ST_BENTCONNECTOR2
Deprecated.- See Also:
-
ST_BENTCONNECTOR3
Deprecated.- See Also:
-
ST_BENTCONNECTOR4
Deprecated.- See Also:
-
ST_BENTCONNECTOR5
Deprecated.- See Also:
-
ST_CURVEDCONNECTOR2
Deprecated.- See Also:
-
ST_CURVEDCONNECTOR3
Deprecated.- See Also:
-
ST_CURVEDCONNECTOR4
Deprecated.- See Also:
-
ST_CURVEDCONNECTOR5
Deprecated.- See Also:
-
ST_CALLOUT1
Deprecated.- See Also:
-
ST_CALLOUT2
Deprecated.- See Also:
-
ST_CALLOUT3
Deprecated.- See Also:
-
ST_ACCENTCALLOUT1
Deprecated.- See Also:
-
ST_ACCENTCALLOUT2
Deprecated.- See Also:
-
ST_ACCENTCALLOUT3
Deprecated.- See Also:
-
ST_BORDERCALLOUT1
Deprecated.- See Also:
-
ST_BORDERCALLOUT2
Deprecated.- See Also:
-
ST_BORDERCALLOUT3
Deprecated.- See Also:
-
ST_ACCENTBORDERCALLOUT1
Deprecated.- See Also:
-
ST_ACCENTBORDERCALLOUT2
Deprecated.- See Also:
-
ST_ACCENTBORDERCALLOUT3
Deprecated.- See Also:
-
ST_RIBBON
Deprecated.useShapeType.RIBBON- See Also:
-
ST_RIBBON2
Deprecated.- See Also:
-
ST_CHEVRON
Deprecated.- See Also:
-
ST_PENTAGON
Deprecated.- See Also:
-
ST_NOSMOKING
Deprecated.- See Also:
-
ST_SEAL8
Deprecated.useShapeType.STAR_8- See Also:
-
ST_SEAL16
Deprecated.- See Also:
-
ST_SEAL32
Deprecated.- See Also:
-
ST_WEDGERECTCALLOUT
Deprecated.- See Also:
-
ST_WEDGERRECTCALLOUT
Deprecated.- See Also:
-
ST_WEDGEELLIPSECALLOUT
Deprecated.- See Also:
-
ST_WAVE
Deprecated.useShapeType.WAVE- See Also:
-
ST_FOLDEDCORNER
Deprecated.- See Also:
-
ST_LEFTARROW
Deprecated.- See Also:
-
ST_DOWNARROW
Deprecated.- See Also:
-
ST_UPARROW
Deprecated.- See Also:
-
ST_LEFTRIGHTARROW
Deprecated.- See Also:
-
ST_UPDOWNARROW
Deprecated.- See Also:
-
ST_IRREGULARSEAL1
Deprecated.- See Also:
-
ST_IRREGULARSEAL2
Deprecated.- See Also:
-
ST_LIGHTNINGBOLT
Deprecated.- See Also:
-
ST_HEART
Deprecated.useShapeType.HEART- See Also:
-
ST_PICTUREFRAME
Deprecated.useShapeType.FRAME- See Also:
-
ST_QUADARROW
Deprecated.- See Also:
-
ST_LEFTARROWCALLOUT
Deprecated.- See Also:
-
ST_RIGHTARROWCALLOUT
Deprecated.- See Also:
-
ST_UPARROWCALLOUT
Deprecated.- See Also:
-
ST_DOWNARROWCALLOUT
Deprecated.- See Also:
-
ST_LEFTRIGHTARROWCALLOUT
Deprecated.- See Also:
-
ST_UPDOWNARROWCALLOUT
Deprecated.- See Also:
-
ST_QUADARROWCALLOUT
Deprecated.- See Also:
-
ST_BEVEL
Deprecated.useShapeType.BEVEL- See Also:
-
ST_LEFTBRACKET
Deprecated.- See Also:
-
ST_RIGHTBRACKET
Deprecated.- See Also:
-
ST_LEFTBRACE
Deprecated.- See Also:
-
ST_RIGHTBRACE
Deprecated.- See Also:
-
ST_LEFTUPARROW
Deprecated.- See Also:
-
ST_BENTUPARROW
Deprecated.- See Also:
-
ST_BENTARROW
Deprecated.- See Also:
-
ST_SEAL24
Deprecated.- See Also:
-
ST_STRIPEDRIGHTARROW
Deprecated.- See Also:
-
ST_NOTCHEDRIGHTARROW
Deprecated.- See Also:
-
ST_BLOCKARC
Deprecated.- See Also:
-
ST_SMILEYFACE
Deprecated.- See Also:
-
ST_VERTICALSCROLL
Deprecated.- See Also:
-
ST_HORIZONTALSCROLL
Deprecated.- See Also:
-
ST_CIRCULARARROW
Deprecated.- See Also:
-
ST_NOTCHEDCIRCULARARROW
Deprecated.- See Also:
-
ST_UTURNARROW
Deprecated.- See Also:
-
ST_CURVEDRIGHTARROW
Deprecated.- See Also:
-
ST_CURVEDLEFTARROW
Deprecated.- See Also:
-
ST_CURVEDUPARROW
Deprecated.- See Also:
-
ST_CURVEDDOWNARROW
Deprecated.- See Also:
-
ST_CLOUDCALLOUT
Deprecated.- See Also:
-
ST_ELLIPSERIBBON
Deprecated.- See Also:
-
ST_ELLIPSERIBBON2
Deprecated.- See Also:
-
ST_FLOWCHARTPROCESS
Deprecated.- See Also:
-
ST_FLOWCHARTDECISION
Deprecated.- See Also:
-
ST_FLOWCHARTINPUTOUTPUT
Deprecated.- See Also:
-
ST_FLOWCHARTPREDEFINEDPROCESS
Deprecated.- See Also:
-
ST_FLOWCHARTINTERNALSTORAGE
Deprecated.- See Also:
-
ST_FLOWCHARTDOCUMENT
Deprecated.- See Also:
-
ST_FLOWCHARTMULTIDOCUMENT
Deprecated.- See Also:
-
ST_FLOWCHARTTERMINATOR
Deprecated.- See Also:
-
ST_FLOWCHARTPREPARATION
Deprecated.- See Also:
-
ST_FLOWCHARTMANUALINPUT
Deprecated.- See Also:
-
ST_FLOWCHARTMANUALOPERATION
Deprecated.- See Also:
-
ST_FLOWCHARTCONNECTOR
Deprecated.- See Also:
-
ST_FLOWCHARTPUNCHEDCARD
Deprecated.- See Also:
-
ST_FLOWCHARTPUNCHEDTAPE
Deprecated.- See Also:
-
ST_FLOWCHARTSUMMINGJUNCTION
Deprecated.- See Also:
-
ST_FLOWCHARTOR
Deprecated.- See Also:
-
ST_FLOWCHARTCOLLATE
Deprecated.- See Also:
-
ST_FLOWCHARTSORT
Deprecated.- See Also:
-
ST_FLOWCHARTEXTRACT
Deprecated.- See Also:
-
ST_FLOWCHARTMERGE
Deprecated.- See Also:
-
ST_FLOWCHARTOFFLINESTORAGE
Deprecated.- See Also:
-
ST_FLOWCHARTONLINESTORAGE
Deprecated.- See Also:
-
ST_FLOWCHARTMAGNETICTAPE
Deprecated.- See Also:
-
ST_FLOWCHARTMAGNETICDISK
Deprecated.- See Also:
-
ST_FLOWCHARTMAGNETICDRUM
Deprecated.- See Also:
-
ST_FLOWCHARTDISPLAY
Deprecated.- See Also:
-
ST_FLOWCHARTDELAY
Deprecated.- See Also:
-
ST_TEXTPLAINTEXT
Deprecated.- See Also:
-
ST_TEXTSTOP
Deprecated.- See Also:
-
ST_TEXTTRIANGLE
Deprecated.- See Also:
-
ST_TEXTTRIANGLEINVERTED
Deprecated.- See Also:
-
ST_TEXTCHEVRON
Deprecated.- See Also:
-
ST_TEXTCHEVRONINVERTED
Deprecated.- See Also:
-
ST_TEXTRINGINSIDE
Deprecated.- See Also:
-
ST_TEXTRINGOUTSIDE
Deprecated.- See Also:
-
ST_TEXTARCHUPCURVE
Deprecated.- See Also:
-
ST_TEXTARCHDOWNCURVE
Deprecated.- See Also:
-
ST_TEXTCIRCLECURVE
Deprecated.- See Also:
-
ST_TEXTBUTTONCURVE
Deprecated.- See Also:
-
ST_TEXTARCHUPPOUR
Deprecated.- See Also:
-
ST_TEXTARCHDOWNPOUR
Deprecated.- See Also:
-
ST_TEXTCIRCLEPOUR
Deprecated.- See Also:
-
ST_TEXTBUTTONPOUR
Deprecated.- See Also:
-
ST_TEXTCURVEUP
Deprecated.- See Also:
-
ST_TEXTCURVEDOWN
Deprecated.- See Also:
-
ST_TEXTCASCADEUP
Deprecated.- See Also:
-
ST_TEXTCASCADEDOWN
Deprecated.- See Also:
-
ST_TEXTWAVE1
Deprecated.- See Also:
-
ST_TEXTWAVE2
Deprecated.- See Also:
-
ST_TEXTWAVE3
Deprecated.- See Also:
-
ST_TEXTWAVE4
Deprecated.- See Also:
-
ST_TEXTINFLATE
Deprecated.- See Also:
-
ST_TEXTDEFLATE
Deprecated.- See Also:
-
ST_TEXTINFLATEBOTTOM
Deprecated.- See Also:
-
ST_TEXTDEFLATEBOTTOM
Deprecated.- See Also:
-
ST_TEXTINFLATETOP
Deprecated.- See Also:
-
ST_TEXTDEFLATETOP
Deprecated.- See Also:
-
ST_TEXTDEFLATEINFLATE
Deprecated.- See Also:
-
ST_TEXTDEFLATEINFLATEDEFLATE
Deprecated.- See Also:
-
ST_TEXTFADERIGHT
Deprecated.- See Also:
-
ST_TEXTFADELEFT
Deprecated.- See Also:
-
ST_TEXTFADEUP
Deprecated.- See Also:
-
ST_TEXTFADEDOWN
Deprecated.- See Also:
-
ST_TEXTSLANTUP
Deprecated.- See Also:
-
ST_TEXTSLANTDOWN
Deprecated.- See Also:
-
ST_TEXTCANUP
Deprecated.- See Also:
-
ST_TEXTCANDOWN
Deprecated.- See Also:
-
ST_FLOWCHARTALTERNATEPROCESS
Deprecated.- See Also:
-
ST_FLOWCHARTOFFPAGECONNECTOR
Deprecated.- See Also:
-
ST_CALLOUT90
Deprecated.- See Also:
-
ST_ACCENTCALLOUT90
Deprecated.- See Also:
-
ST_BORDERCALLOUT90
Deprecated.- See Also:
-
ST_ACCENTBORDERCALLOUT90
Deprecated.- See Also:
-
ST_LEFTRIGHTUPARROW
Deprecated.- See Also:
-
ST_SUN
Deprecated.useShapeType.SUN- See Also:
-
ST_MOON
Deprecated.useShapeType.MOON- See Also:
-
ST_BRACKETPAIR
Deprecated.- See Also:
-
ST_BRACEPAIR
Deprecated.- See Also:
-
ST_SEAL4
Deprecated.useShapeType.STAR_4- See Also:
-
ST_DOUBLEWAVE
Deprecated.- See Also:
-
ST_ACTIONBUTTONBLANK
Deprecated.- See Also:
-
ST_ACTIONBUTTONHOME
Deprecated.- See Also:
-
ST_ACTIONBUTTONHELP
Deprecated.- See Also:
-
ST_ACTIONBUTTONINFORMATION
Deprecated.- See Also:
-
ST_ACTIONBUTTONFORWARDNEXT
Deprecated.- See Also:
-
ST_ACTIONBUTTONBACKPREVIOUS
Deprecated.- See Also:
-
ST_ACTIONBUTTONEND
Deprecated.- See Also:
-
ST_ACTIONBUTTONBEGINNING
Deprecated.- See Also:
-
ST_ACTIONBUTTONRETURN
Deprecated.- See Also:
-
ST_ACTIONBUTTONDOCUMENT
Deprecated.- See Also:
-
ST_ACTIONBUTTONSOUND
Deprecated.- See Also:
-
ST_ACTIONBUTTONMOVIE
Deprecated.- See Also:
-
ST_HOSTCONTROL
Deprecated.- See Also:
-
ST_TEXTBOX
Deprecated.- See Also:
-
ST_NIL
Deprecated.not used- See Also:
-
-
Constructor Details
-
EscherAggregate
public EscherAggregate(boolean createDefaultTree) create new EscherAggregate- Parameters:
createDefaultTree- if true creates base tree of the escher records, see EscherAggregate.buildBaseTree() else return empty escher aggregate
-
EscherAggregate
-
-
Method Details
-
setMaxRecordLength
public static void setMaxRecordLength(int length) - Parameters:
length- the max record length allowed for EscherAggregate
-
getMaxRecordLength
public static int getMaxRecordLength()- Returns:
- the max record length allowed for EscherAggregate
-
getSid
public short getSid()Description copied from class:Recordreturn the non static version of the id for this record.- Specified by:
getSidin classAbstractEscherHolderRecord- Returns:
- Returns the current sid.
-
toXml
Calculates the xml representation of this record. This is simply a dump of all the records.- Parameters:
tab- - string which must be added before each line (used by default '\t')- Returns:
- xml representation of the all aggregated records
-
createAggregate
Collapses the drawing records into an aggregate. read Drawing, Obj, TxtObj, Note and Continue records into single byte array, create Escher tree from byte array, create map <EscherRecord, Record>- Parameters:
records- - list of all records inside sheetlocFirstDrawingRecord- - location of the first DrawingRecord inside sheet- Returns:
- new EscherAggregate create from all aggregated records which belong to drawing layer
-
serialize
public int serialize(int offset, byte[] data) Serializes this aggregate to a byte array. Since this is an aggregate record it will effectively serialize the aggregated records.- Overrides:
serializein classAbstractEscherHolderRecord- Parameters:
offset- The offset into the start of the array.data- The byte array to serialize to.- Returns:
- The number of bytes serialized.
-
getRecordSize
public int getRecordSize()Description copied from class:RecordBasegives the current serialized size of the record. Should include the sid and reclength (4 bytes).- Overrides:
getRecordSizein classAbstractEscherHolderRecord- Returns:
- record size, including header size of obj, text, note, drawing, continue records
-
associateShapeToObjRecord
Associates an escher record to an OBJ record or a TXO record.- Parameters:
r- - ClientData or Textbox recordobjRecord- - Obj or TextObj record
-
removeShapeToObjRecord
Remove echerRecord and associated to it Obj or TextObj record- Parameters:
rec- - clientData or textbox record to be removed
-
setDgId
public void setDgId(short dgId) EscherDgContainer -EscherSpgrContainer -EscherDgRecord - set id for this record set id for DgRecord of DgContainer- Parameters:
dgId- - id which must be set
-
setMainSpRecordId
public void setMainSpRecordId(int shapeId) EscherDgContainer -EscherSpgrContainer --EscherSpContainer ---EscherSpRecord -set id for this record ---*** --*** -EscherDgRecord set id for the sp record of the first spContainer in main spgrConatiner- Parameters:
shapeId- - id which must be set
-
getShapeToObjMapping
- Returns:
- unmodifiable copy of the mapping of
EscherClientDataRecordandEscherTextboxRecordto theirTextObjectRecordorObjRecord.We need to access it outside of EscherAggregate when building shapes
-
getTailRecords
- Returns:
- unmodifiable copy of tail records. We need to access them when building shapes. Every HSSFComment shape has a link to a NoteRecord from the tailRec collection.
-
getNoteRecordByObj
- Parameters:
obj- - ObjRecord with id == NoteRecord.id- Returns:
- null if note record is not found else returns note record with id == obj.id
-
addTailRecord
Add tail record to existing map- Parameters:
note- to be added
-
removeTailRecord
Remove tail record from the existing map- Parameters:
note- to be removed
-
copy
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable- Specified by:
copyin classAbstractEscherHolderRecord
-
getGenericRecordType
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein classRecord
-
getGenericProperties
-
ShapeType.ACCENT_BORDER_CALLOUT_1