Class EscherAggregate
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.Record
-
- org.apache.poi.hssf.record.AbstractEscherHolderRecord
-
- org.apache.poi.hssf.record.EscherAggregate
-
- All Implemented Interfaces:
Cloneable
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
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description EscherAggregate(boolean createDefaultTree)
create new EscherAggregate
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTailRecord(NoteRecord note)
Add tail record to existing mapvoid
associateShapeToObjRecord(EscherRecord r, Record objRecord)
Associates an escher record to an OBJ record or a TXO record.static EscherAggregate
createAggregate(List<RecordBase> records, int locFirstDrawingRecord)
Collapses the drawing records into an aggregate.NoteRecord
getNoteRecordByObj(ObjRecord obj)
int
getRecordSize()
gives the current serialized size of the record.Map<EscherRecord,Record>
getShapeToObjMapping()
short
getSid()
return the non static version of the id for this record.Map<Integer,NoteRecord>
getTailRecords()
void
removeShapeToObjRecord(EscherRecord rec)
Remove echerRecord and associated to it Obj or TextObj recordvoid
removeTailRecord(NoteRecord note)
Remove tail record from the existing mapint
serialize(int offset, byte[] data)
Serializes this aggregate to a byte array.void
setDgId(short dgId)
EscherDgContainer -EscherSpgrContainer -EscherDgRecord - set id for this record set id for DgRecord of DgContainervoid
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 spgrConatinerString
toString()
Calculates the string representation of this record.String
toXml(String tab)
Calculates the xml representation of this record.-
Methods inherited from class org.apache.poi.hssf.record.AbstractEscherHolderRecord
addEscherRecord, addEscherRecord, clearEscherRecords, clone, decode, findFirstWithId, getEscherContainer, getEscherRecord, getEscherRecords, getRawData, join, processContinueRecord, setRawData
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
ST_MIN
public static final short ST_MIN
- See Also:
- Constant Field Values
-
ST_NOT_PRIMATIVE
public static final short ST_NOT_PRIMATIVE
- See Also:
- Constant Field Values
-
ST_RECTANGLE
public static final short ST_RECTANGLE
- See Also:
- Constant Field Values
-
ST_ROUNDRECTANGLE
public static final short ST_ROUNDRECTANGLE
- See Also:
- Constant Field Values
-
ST_ELLIPSE
public static final short ST_ELLIPSE
- See Also:
- Constant Field Values
-
ST_DIAMOND
public static final short ST_DIAMOND
- See Also:
- Constant Field Values
-
ST_ISOCELESTRIANGLE
public static final short ST_ISOCELESTRIANGLE
- See Also:
- Constant Field Values
-
ST_RIGHTTRIANGLE
public static final short ST_RIGHTTRIANGLE
- See Also:
- Constant Field Values
-
ST_PARALLELOGRAM
public static final short ST_PARALLELOGRAM
- See Also:
- Constant Field Values
-
ST_TRAPEZOID
public static final short ST_TRAPEZOID
- See Also:
- Constant Field Values
-
ST_HEXAGON
public static final short ST_HEXAGON
- See Also:
- Constant Field Values
-
ST_OCTAGON
public static final short ST_OCTAGON
- See Also:
- Constant Field Values
-
ST_PLUS
public static final short ST_PLUS
- See Also:
- Constant Field Values
-
ST_STAR
public static final short ST_STAR
- See Also:
- Constant Field Values
-
ST_ARROW
public static final short ST_ARROW
- See Also:
- Constant Field Values
-
ST_THICKARROW
public static final short ST_THICKARROW
- See Also:
- Constant Field Values
-
ST_HOMEPLATE
public static final short ST_HOMEPLATE
- See Also:
- Constant Field Values
-
ST_CUBE
public static final short ST_CUBE
- See Also:
- Constant Field Values
-
ST_BALLOON
public static final short ST_BALLOON
- See Also:
- Constant Field Values
-
ST_SEAL
public static final short ST_SEAL
- See Also:
- Constant Field Values
-
ST_ARC
public static final short ST_ARC
- See Also:
- Constant Field Values
-
ST_LINE
public static final short ST_LINE
- See Also:
- Constant Field Values
-
ST_PLAQUE
public static final short ST_PLAQUE
- See Also:
- Constant Field Values
-
ST_CAN
public static final short ST_CAN
- See Also:
- Constant Field Values
-
ST_DONUT
public static final short ST_DONUT
- See Also:
- Constant Field Values
-
ST_TEXTSIMPLE
public static final short ST_TEXTSIMPLE
- See Also:
- Constant Field Values
-
ST_TEXTOCTAGON
public static final short ST_TEXTOCTAGON
- See Also:
- Constant Field Values
-
ST_TEXTHEXAGON
public static final short ST_TEXTHEXAGON
- See Also:
- Constant Field Values
-
ST_TEXTCURVE
public static final short ST_TEXTCURVE
- See Also:
- Constant Field Values
-
ST_TEXTWAVE
public static final short ST_TEXTWAVE
- See Also:
- Constant Field Values
-
ST_TEXTRING
public static final short ST_TEXTRING
- See Also:
- Constant Field Values
-
ST_TEXTONCURVE
public static final short ST_TEXTONCURVE
- See Also:
- Constant Field Values
-
ST_TEXTONRING
public static final short ST_TEXTONRING
- See Also:
- Constant Field Values
-
ST_STRAIGHTCONNECTOR1
public static final short ST_STRAIGHTCONNECTOR1
- See Also:
- Constant Field Values
-
ST_BENTCONNECTOR2
public static final short ST_BENTCONNECTOR2
- See Also:
- Constant Field Values
-
ST_BENTCONNECTOR3
public static final short ST_BENTCONNECTOR3
- See Also:
- Constant Field Values
-
ST_BENTCONNECTOR4
public static final short ST_BENTCONNECTOR4
- See Also:
- Constant Field Values
-
ST_BENTCONNECTOR5
public static final short ST_BENTCONNECTOR5
- See Also:
- Constant Field Values
-
ST_CURVEDCONNECTOR2
public static final short ST_CURVEDCONNECTOR2
- See Also:
- Constant Field Values
-
ST_CURVEDCONNECTOR3
public static final short ST_CURVEDCONNECTOR3
- See Also:
- Constant Field Values
-
ST_CURVEDCONNECTOR4
public static final short ST_CURVEDCONNECTOR4
- See Also:
- Constant Field Values
-
ST_CURVEDCONNECTOR5
public static final short ST_CURVEDCONNECTOR5
- See Also:
- Constant Field Values
-
ST_CALLOUT1
public static final short ST_CALLOUT1
- See Also:
- Constant Field Values
-
ST_CALLOUT2
public static final short ST_CALLOUT2
- See Also:
- Constant Field Values
-
ST_CALLOUT3
public static final short ST_CALLOUT3
- See Also:
- Constant Field Values
-
ST_ACCENTCALLOUT1
public static final short ST_ACCENTCALLOUT1
- See Also:
- Constant Field Values
-
ST_ACCENTCALLOUT2
public static final short ST_ACCENTCALLOUT2
- See Also:
- Constant Field Values
-
ST_ACCENTCALLOUT3
public static final short ST_ACCENTCALLOUT3
- See Also:
- Constant Field Values
-
ST_BORDERCALLOUT1
public static final short ST_BORDERCALLOUT1
- See Also:
- Constant Field Values
-
ST_BORDERCALLOUT2
public static final short ST_BORDERCALLOUT2
- See Also:
- Constant Field Values
-
ST_BORDERCALLOUT3
public static final short ST_BORDERCALLOUT3
- See Also:
- Constant Field Values
-
ST_ACCENTBORDERCALLOUT1
public static final short ST_ACCENTBORDERCALLOUT1
- See Also:
- Constant Field Values
-
ST_ACCENTBORDERCALLOUT2
public static final short ST_ACCENTBORDERCALLOUT2
- See Also:
- Constant Field Values
-
ST_ACCENTBORDERCALLOUT3
public static final short ST_ACCENTBORDERCALLOUT3
- See Also:
- Constant Field Values
-
ST_RIBBON
public static final short ST_RIBBON
- See Also:
- Constant Field Values
-
ST_RIBBON2
public static final short ST_RIBBON2
- See Also:
- Constant Field Values
-
ST_CHEVRON
public static final short ST_CHEVRON
- See Also:
- Constant Field Values
-
ST_PENTAGON
public static final short ST_PENTAGON
- See Also:
- Constant Field Values
-
ST_NOSMOKING
public static final short ST_NOSMOKING
- See Also:
- Constant Field Values
-
ST_SEAL8
public static final short ST_SEAL8
- See Also:
- Constant Field Values
-
ST_SEAL16
public static final short ST_SEAL16
- See Also:
- Constant Field Values
-
ST_SEAL32
public static final short ST_SEAL32
- See Also:
- Constant Field Values
-
ST_WEDGERECTCALLOUT
public static final short ST_WEDGERECTCALLOUT
- See Also:
- Constant Field Values
-
ST_WEDGERRECTCALLOUT
public static final short ST_WEDGERRECTCALLOUT
- See Also:
- Constant Field Values
-
ST_WEDGEELLIPSECALLOUT
public static final short ST_WEDGEELLIPSECALLOUT
- See Also:
- Constant Field Values
-
ST_WAVE
public static final short ST_WAVE
- See Also:
- Constant Field Values
-
ST_FOLDEDCORNER
public static final short ST_FOLDEDCORNER
- See Also:
- Constant Field Values
-
ST_LEFTARROW
public static final short ST_LEFTARROW
- See Also:
- Constant Field Values
-
ST_DOWNARROW
public static final short ST_DOWNARROW
- See Also:
- Constant Field Values
-
ST_UPARROW
public static final short ST_UPARROW
- See Also:
- Constant Field Values
-
ST_LEFTRIGHTARROW
public static final short ST_LEFTRIGHTARROW
- See Also:
- Constant Field Values
-
ST_UPDOWNARROW
public static final short ST_UPDOWNARROW
- See Also:
- Constant Field Values
-
ST_IRREGULARSEAL1
public static final short ST_IRREGULARSEAL1
- See Also:
- Constant Field Values
-
ST_IRREGULARSEAL2
public static final short ST_IRREGULARSEAL2
- See Also:
- Constant Field Values
-
ST_LIGHTNINGBOLT
public static final short ST_LIGHTNINGBOLT
- See Also:
- Constant Field Values
-
ST_HEART
public static final short ST_HEART
- See Also:
- Constant Field Values
-
ST_PICTUREFRAME
public static final short ST_PICTUREFRAME
- See Also:
- Constant Field Values
-
ST_QUADARROW
public static final short ST_QUADARROW
- See Also:
- Constant Field Values
-
ST_LEFTARROWCALLOUT
public static final short ST_LEFTARROWCALLOUT
- See Also:
- Constant Field Values
-
ST_RIGHTARROWCALLOUT
public static final short ST_RIGHTARROWCALLOUT
- See Also:
- Constant Field Values
-
ST_UPARROWCALLOUT
public static final short ST_UPARROWCALLOUT
- See Also:
- Constant Field Values
-
ST_DOWNARROWCALLOUT
public static final short ST_DOWNARROWCALLOUT
- See Also:
- Constant Field Values
-
ST_LEFTRIGHTARROWCALLOUT
public static final short ST_LEFTRIGHTARROWCALLOUT
- See Also:
- Constant Field Values
-
ST_UPDOWNARROWCALLOUT
public static final short ST_UPDOWNARROWCALLOUT
- See Also:
- Constant Field Values
-
ST_QUADARROWCALLOUT
public static final short ST_QUADARROWCALLOUT
- See Also:
- Constant Field Values
-
ST_BEVEL
public static final short ST_BEVEL
- See Also:
- Constant Field Values
-
ST_LEFTBRACKET
public static final short ST_LEFTBRACKET
- See Also:
- Constant Field Values
-
ST_RIGHTBRACKET
public static final short ST_RIGHTBRACKET
- See Also:
- Constant Field Values
-
ST_LEFTBRACE
public static final short ST_LEFTBRACE
- See Also:
- Constant Field Values
-
ST_RIGHTBRACE
public static final short ST_RIGHTBRACE
- See Also:
- Constant Field Values
-
ST_LEFTUPARROW
public static final short ST_LEFTUPARROW
- See Also:
- Constant Field Values
-
ST_BENTUPARROW
public static final short ST_BENTUPARROW
- See Also:
- Constant Field Values
-
ST_BENTARROW
public static final short ST_BENTARROW
- See Also:
- Constant Field Values
-
ST_SEAL24
public static final short ST_SEAL24
- See Also:
- Constant Field Values
-
ST_STRIPEDRIGHTARROW
public static final short ST_STRIPEDRIGHTARROW
- See Also:
- Constant Field Values
-
ST_NOTCHEDRIGHTARROW
public static final short ST_NOTCHEDRIGHTARROW
- See Also:
- Constant Field Values
-
ST_BLOCKARC
public static final short ST_BLOCKARC
- See Also:
- Constant Field Values
-
ST_SMILEYFACE
public static final short ST_SMILEYFACE
- See Also:
- Constant Field Values
-
ST_VERTICALSCROLL
public static final short ST_VERTICALSCROLL
- See Also:
- Constant Field Values
-
ST_HORIZONTALSCROLL
public static final short ST_HORIZONTALSCROLL
- See Also:
- Constant Field Values
-
ST_CIRCULARARROW
public static final short ST_CIRCULARARROW
- See Also:
- Constant Field Values
-
ST_NOTCHEDCIRCULARARROW
public static final short ST_NOTCHEDCIRCULARARROW
- See Also:
- Constant Field Values
-
ST_UTURNARROW
public static final short ST_UTURNARROW
- See Also:
- Constant Field Values
-
ST_CURVEDRIGHTARROW
public static final short ST_CURVEDRIGHTARROW
- See Also:
- Constant Field Values
-
ST_CURVEDLEFTARROW
public static final short ST_CURVEDLEFTARROW
- See Also:
- Constant Field Values
-
ST_CURVEDUPARROW
public static final short ST_CURVEDUPARROW
- See Also:
- Constant Field Values
-
ST_CURVEDDOWNARROW
public static final short ST_CURVEDDOWNARROW
- See Also:
- Constant Field Values
-
ST_CLOUDCALLOUT
public static final short ST_CLOUDCALLOUT
- See Also:
- Constant Field Values
-
ST_ELLIPSERIBBON
public static final short ST_ELLIPSERIBBON
- See Also:
- Constant Field Values
-
ST_ELLIPSERIBBON2
public static final short ST_ELLIPSERIBBON2
- See Also:
- Constant Field Values
-
ST_FLOWCHARTPROCESS
public static final short ST_FLOWCHARTPROCESS
- See Also:
- Constant Field Values
-
ST_FLOWCHARTDECISION
public static final short ST_FLOWCHARTDECISION
- See Also:
- Constant Field Values
-
ST_FLOWCHARTINPUTOUTPUT
public static final short ST_FLOWCHARTINPUTOUTPUT
- See Also:
- Constant Field Values
-
ST_FLOWCHARTPREDEFINEDPROCESS
public static final short ST_FLOWCHARTPREDEFINEDPROCESS
- See Also:
- Constant Field Values
-
ST_FLOWCHARTINTERNALSTORAGE
public static final short ST_FLOWCHARTINTERNALSTORAGE
- See Also:
- Constant Field Values
-
ST_FLOWCHARTDOCUMENT
public static final short ST_FLOWCHARTDOCUMENT
- See Also:
- Constant Field Values
-
ST_FLOWCHARTMULTIDOCUMENT
public static final short ST_FLOWCHARTMULTIDOCUMENT
- See Also:
- Constant Field Values
-
ST_FLOWCHARTTERMINATOR
public static final short ST_FLOWCHARTTERMINATOR
- See Also:
- Constant Field Values
-
ST_FLOWCHARTPREPARATION
public static final short ST_FLOWCHARTPREPARATION
- See Also:
- Constant Field Values
-
ST_FLOWCHARTMANUALINPUT
public static final short ST_FLOWCHARTMANUALINPUT
- See Also:
- Constant Field Values
-
ST_FLOWCHARTMANUALOPERATION
public static final short ST_FLOWCHARTMANUALOPERATION
- See Also:
- Constant Field Values
-
ST_FLOWCHARTCONNECTOR
public static final short ST_FLOWCHARTCONNECTOR
- See Also:
- Constant Field Values
-
ST_FLOWCHARTPUNCHEDCARD
public static final short ST_FLOWCHARTPUNCHEDCARD
- See Also:
- Constant Field Values
-
ST_FLOWCHARTPUNCHEDTAPE
public static final short ST_FLOWCHARTPUNCHEDTAPE
- See Also:
- Constant Field Values
-
ST_FLOWCHARTSUMMINGJUNCTION
public static final short ST_FLOWCHARTSUMMINGJUNCTION
- See Also:
- Constant Field Values
-
ST_FLOWCHARTOR
public static final short ST_FLOWCHARTOR
- See Also:
- Constant Field Values
-
ST_FLOWCHARTCOLLATE
public static final short ST_FLOWCHARTCOLLATE
- See Also:
- Constant Field Values
-
ST_FLOWCHARTSORT
public static final short ST_FLOWCHARTSORT
- See Also:
- Constant Field Values
-
ST_FLOWCHARTEXTRACT
public static final short ST_FLOWCHARTEXTRACT
- See Also:
- Constant Field Values
-
ST_FLOWCHARTMERGE
public static final short ST_FLOWCHARTMERGE
- See Also:
- Constant Field Values
-
ST_FLOWCHARTOFFLINESTORAGE
public static final short ST_FLOWCHARTOFFLINESTORAGE
- See Also:
- Constant Field Values
-
ST_FLOWCHARTONLINESTORAGE
public static final short ST_FLOWCHARTONLINESTORAGE
- See Also:
- Constant Field Values
-
ST_FLOWCHARTMAGNETICTAPE
public static final short ST_FLOWCHARTMAGNETICTAPE
- See Also:
- Constant Field Values
-
ST_FLOWCHARTMAGNETICDISK
public static final short ST_FLOWCHARTMAGNETICDISK
- See Also:
- Constant Field Values
-
ST_FLOWCHARTMAGNETICDRUM
public static final short ST_FLOWCHARTMAGNETICDRUM
- See Also:
- Constant Field Values
-
ST_FLOWCHARTDISPLAY
public static final short ST_FLOWCHARTDISPLAY
- See Also:
- Constant Field Values
-
ST_FLOWCHARTDELAY
public static final short ST_FLOWCHARTDELAY
- See Also:
- Constant Field Values
-
ST_TEXTPLAINTEXT
public static final short ST_TEXTPLAINTEXT
- See Also:
- Constant Field Values
-
ST_TEXTSTOP
public static final short ST_TEXTSTOP
- See Also:
- Constant Field Values
-
ST_TEXTTRIANGLE
public static final short ST_TEXTTRIANGLE
- See Also:
- Constant Field Values
-
ST_TEXTTRIANGLEINVERTED
public static final short ST_TEXTTRIANGLEINVERTED
- See Also:
- Constant Field Values
-
ST_TEXTCHEVRON
public static final short ST_TEXTCHEVRON
- See Also:
- Constant Field Values
-
ST_TEXTCHEVRONINVERTED
public static final short ST_TEXTCHEVRONINVERTED
- See Also:
- Constant Field Values
-
ST_TEXTRINGINSIDE
public static final short ST_TEXTRINGINSIDE
- See Also:
- Constant Field Values
-
ST_TEXTRINGOUTSIDE
public static final short ST_TEXTRINGOUTSIDE
- See Also:
- Constant Field Values
-
ST_TEXTARCHUPCURVE
public static final short ST_TEXTARCHUPCURVE
- See Also:
- Constant Field Values
-
ST_TEXTARCHDOWNCURVE
public static final short ST_TEXTARCHDOWNCURVE
- See Also:
- Constant Field Values
-
ST_TEXTCIRCLECURVE
public static final short ST_TEXTCIRCLECURVE
- See Also:
- Constant Field Values
-
ST_TEXTBUTTONCURVE
public static final short ST_TEXTBUTTONCURVE
- See Also:
- Constant Field Values
-
ST_TEXTARCHUPPOUR
public static final short ST_TEXTARCHUPPOUR
- See Also:
- Constant Field Values
-
ST_TEXTARCHDOWNPOUR
public static final short ST_TEXTARCHDOWNPOUR
- See Also:
- Constant Field Values
-
ST_TEXTCIRCLEPOUR
public static final short ST_TEXTCIRCLEPOUR
- See Also:
- Constant Field Values
-
ST_TEXTBUTTONPOUR
public static final short ST_TEXTBUTTONPOUR
- See Also:
- Constant Field Values
-
ST_TEXTCURVEUP
public static final short ST_TEXTCURVEUP
- See Also:
- Constant Field Values
-
ST_TEXTCURVEDOWN
public static final short ST_TEXTCURVEDOWN
- See Also:
- Constant Field Values
-
ST_TEXTCASCADEUP
public static final short ST_TEXTCASCADEUP
- See Also:
- Constant Field Values
-
ST_TEXTCASCADEDOWN
public static final short ST_TEXTCASCADEDOWN
- See Also:
- Constant Field Values
-
ST_TEXTWAVE1
public static final short ST_TEXTWAVE1
- See Also:
- Constant Field Values
-
ST_TEXTWAVE2
public static final short ST_TEXTWAVE2
- See Also:
- Constant Field Values
-
ST_TEXTWAVE3
public static final short ST_TEXTWAVE3
- See Also:
- Constant Field Values
-
ST_TEXTWAVE4
public static final short ST_TEXTWAVE4
- See Also:
- Constant Field Values
-
ST_TEXTINFLATE
public static final short ST_TEXTINFLATE
- See Also:
- Constant Field Values
-
ST_TEXTDEFLATE
public static final short ST_TEXTDEFLATE
- See Also:
- Constant Field Values
-
ST_TEXTINFLATEBOTTOM
public static final short ST_TEXTINFLATEBOTTOM
- See Also:
- Constant Field Values
-
ST_TEXTDEFLATEBOTTOM
public static final short ST_TEXTDEFLATEBOTTOM
- See Also:
- Constant Field Values
-
ST_TEXTINFLATETOP
public static final short ST_TEXTINFLATETOP
- See Also:
- Constant Field Values
-
ST_TEXTDEFLATETOP
public static final short ST_TEXTDEFLATETOP
- See Also:
- Constant Field Values
-
ST_TEXTDEFLATEINFLATE
public static final short ST_TEXTDEFLATEINFLATE
- See Also:
- Constant Field Values
-
ST_TEXTDEFLATEINFLATEDEFLATE
public static final short ST_TEXTDEFLATEINFLATEDEFLATE
- See Also:
- Constant Field Values
-
ST_TEXTFADERIGHT
public static final short ST_TEXTFADERIGHT
- See Also:
- Constant Field Values
-
ST_TEXTFADELEFT
public static final short ST_TEXTFADELEFT
- See Also:
- Constant Field Values
-
ST_TEXTFADEUP
public static final short ST_TEXTFADEUP
- See Also:
- Constant Field Values
-
ST_TEXTFADEDOWN
public static final short ST_TEXTFADEDOWN
- See Also:
- Constant Field Values
-
ST_TEXTSLANTUP
public static final short ST_TEXTSLANTUP
- See Also:
- Constant Field Values
-
ST_TEXTSLANTDOWN
public static final short ST_TEXTSLANTDOWN
- See Also:
- Constant Field Values
-
ST_TEXTCANUP
public static final short ST_TEXTCANUP
- See Also:
- Constant Field Values
-
ST_TEXTCANDOWN
public static final short ST_TEXTCANDOWN
- See Also:
- Constant Field Values
-
ST_FLOWCHARTALTERNATEPROCESS
public static final short ST_FLOWCHARTALTERNATEPROCESS
- See Also:
- Constant Field Values
-
ST_FLOWCHARTOFFPAGECONNECTOR
public static final short ST_FLOWCHARTOFFPAGECONNECTOR
- See Also:
- Constant Field Values
-
ST_CALLOUT90
public static final short ST_CALLOUT90
- See Also:
- Constant Field Values
-
ST_ACCENTCALLOUT90
public static final short ST_ACCENTCALLOUT90
- See Also:
- Constant Field Values
-
ST_BORDERCALLOUT90
public static final short ST_BORDERCALLOUT90
- See Also:
- Constant Field Values
-
ST_ACCENTBORDERCALLOUT90
public static final short ST_ACCENTBORDERCALLOUT90
- See Also:
- Constant Field Values
-
ST_LEFTRIGHTUPARROW
public static final short ST_LEFTRIGHTUPARROW
- See Also:
- Constant Field Values
-
ST_SUN
public static final short ST_SUN
- See Also:
- Constant Field Values
-
ST_MOON
public static final short ST_MOON
- See Also:
- Constant Field Values
-
ST_BRACKETPAIR
public static final short ST_BRACKETPAIR
- See Also:
- Constant Field Values
-
ST_BRACEPAIR
public static final short ST_BRACEPAIR
- See Also:
- Constant Field Values
-
ST_SEAL4
public static final short ST_SEAL4
- See Also:
- Constant Field Values
-
ST_DOUBLEWAVE
public static final short ST_DOUBLEWAVE
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONBLANK
public static final short ST_ACTIONBUTTONBLANK
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONHOME
public static final short ST_ACTIONBUTTONHOME
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONHELP
public static final short ST_ACTIONBUTTONHELP
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONINFORMATION
public static final short ST_ACTIONBUTTONINFORMATION
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONFORWARDNEXT
public static final short ST_ACTIONBUTTONFORWARDNEXT
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONBACKPREVIOUS
public static final short ST_ACTIONBUTTONBACKPREVIOUS
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONEND
public static final short ST_ACTIONBUTTONEND
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONBEGINNING
public static final short ST_ACTIONBUTTONBEGINNING
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONRETURN
public static final short ST_ACTIONBUTTONRETURN
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONDOCUMENT
public static final short ST_ACTIONBUTTONDOCUMENT
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONSOUND
public static final short ST_ACTIONBUTTONSOUND
- See Also:
- Constant Field Values
-
ST_ACTIONBUTTONMOVIE
public static final short ST_ACTIONBUTTONMOVIE
- See Also:
- Constant Field Values
-
ST_HOSTCONTROL
public static final short ST_HOSTCONTROL
- See Also:
- Constant Field Values
-
ST_TEXTBOX
public static final short ST_TEXTBOX
- See Also:
- Constant Field Values
-
ST_NIL
public static final short ST_NIL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSid
public short getSid()
Description copied from class:Record
return the non static version of the id for this record.- Specified by:
getSid
in classAbstractEscherHolderRecord
- Returns:
- Returns the current sid.
-
toString
public String toString()
Calculates the string representation of this record. This is simply a dump of all the records.- Overrides:
toString
in classAbstractEscherHolderRecord
-
toXml
public String toXml(String tab)
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
public static EscherAggregate createAggregate(List<RecordBase> records, int locFirstDrawingRecord)
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:
serialize
in 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:RecordBase
gives the current serialized size of the record. Should include the sid and reclength (4 bytes).- Overrides:
getRecordSize
in classAbstractEscherHolderRecord
- Returns:
- record size, including header size of obj, text, note, drawing, continue records
-
associateShapeToObjRecord
public void associateShapeToObjRecord(EscherRecord r, Record objRecord)
Associates an escher record to an OBJ record or a TXO record.- Parameters:
r
- - ClientData or Textbox recordobjRecord
- - Obj or TextObj record
-
removeShapeToObjRecord
public void removeShapeToObjRecord(EscherRecord rec)
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
public Map<EscherRecord,Record> getShapeToObjMapping()
- Returns:
- unmodifiable copy of the mapping of
EscherClientDataRecord
andEscherTextboxRecord
to theirTextObjectRecord
orObjRecord
.We need to access it outside of EscherAggregate when building shapes
-
getTailRecords
public Map<Integer,NoteRecord> 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
public NoteRecord getNoteRecordByObj(ObjRecord obj)
- Parameters:
obj
- - ObjRecord with id == NoteRecord.id- Returns:
- null if note record is not found else returns note record with id == obj.id
-
addTailRecord
public void addTailRecord(NoteRecord note)
Add tail record to existing map- Parameters:
note
- to be added
-
removeTailRecord
public void removeTailRecord(NoteRecord note)
Remove tail record from the existing map- Parameters:
note
- to be removed
-
-