public final class Txo extends XLSRecord
offset name size contents
---
4 grbit 2 Option flags. See table.
6 rot 2 Orientation of text within the object.
8 Reserved 6 Must be zero.
14 cchText 2 Length of text in first CONTINUE rec.
16 cbRuns 2 Length of formatting runs in second CONTINUE rec.
18 Reserved 4 Must be zero.
The grbit field contains the following option flags:
bits mask name contents
----
0 0x01 Reserved
3-1 0x0e alcH Horizontal text alignment
1 = left
2 = centered
3 = right
4 = justified
6-4 0x70 alcV Vertical text alignment
1 = top
2 = center
3 = bottom
4 = justified
8-7 0x180 Reserved
9 0x200 fLockText 1 = lock text option is on
15-10 0xfc00 Reserved
The first CONTINUE record contains text -- the length is cchText of this object.
The first byte of the CONTINUE record's body data is 0x0 = compressed unicode. The rest is text.
LABELSST,
STRING,
CONTINUE,
Serialized Formcol, continues, DEBUGLEVEL, hyperlink, idx, isBlank, isBoolean, isContinueMerged, isString, lastidx, myxf, offset, rw, streamer, wkbook, worksheetAI, ALLOWDUPES, ALRUNS, AREA, AREAFORMAT, ARRAY, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHAREDUPES, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
Txo() |
| Modifier and Type | Method and Description |
|---|---|
ArrayList |
getFormattingRuns()
get the formatting runs - fonts per character index, basically, for this text object,
as an arraylist of short[] {char index, font index}
NOTE: formatting runs in actuality differ from doc:
apparently each formatting run in the Continue record occupies 8 bytes (not 4)
plus there is an additional entry appended to the end, that indicates the last char index of the
string (this last entry is added by Excel 2003 in the Continues Record and is not present in Unicode Strings
|
static XLSRecord |
getPrototype()
generates a skeleton Txo with 0 for text length
and the minimum length for formatting runs (=2)
|
String |
getStringVal()
returns the String value of this Text Object
|
void |
init()
perform record initialization
|
void |
setFormattingRuns(ArrayList formattingRuns)
set the formatting runs - fonts per character index, basically, for this text object
as an arraylist of short[] {char index, font index}
|
void |
setStringVal(String v)
sets the String value of this Text Object
if present, will parse embedded formats within the string as: the format of the embedded information is as follows: <font specifics>text segment<font specifics for next segment>text segment... |
void |
setStringVal(Unicodestring txt)
sets the text for this object, including formatting information
|
String |
toString() |
addContinue, clone, close, copyFormat, getBooleanVal, getByteAt, getByteReader, getBytes, getBytesAt, getCellAddress, getCellAddressWithSheet, getCellType, getColNumber, getColorTable, getContinueVect, getData, getDataType, getDblVal, getDefaultVal, getEncryptedByteReader, getFirstBlock, getFloatVal, getFont, getFormatPattern, getFormulaRec, getHyperlink, getInternalVal, getIntLocation, getIntVal, getIxfe, getLastBlock, getLength, getMergeRange, getOffset, getOpcode, getRealRecordIndex, getRecDesc, getRecordIndex, getRow, getRowNumber, getSheet, getStreamer, getStringVal, getWorkBook, getXfRec, hasContinues, initRowCol, isFormula, isNumber, isReadOnly, isValueForCell, mergeContinues, postStream, preStream, remove, removeContinues, resetCacheBytes, setBooleanVal, setByteReader, setCol, setData, setDebugLevel, setDoubleVal, setEncryptedByteReader, setFirstBlock, setFloatVal, setHyperlink, setIndex, setIntVal, setIsValueForCell, setIxfe, setLastBlock, setLength, setMergeRange, setOffset, setOpcode, setRow, setRowCol, setRowNumber, setSheet, setStreamer, setValueForCell, setWorkBook, setXFRecord, setXFRecord, shouldEncrypt, toHexDumppublic void init()
XLSRecordpublic String getStringVal()
getStringVal in interface BiffRecgetStringVal in class XLSRecordpublic void setStringVal(String v) throws IllegalArgumentException
setStringVal in interface BiffRecsetStringVal in class XLSRecordIllegalArgumentException - if String is incorrect formatpublic void setStringVal(Unicodestring txt)
txt - public ArrayList getFormattingRuns()
public void setFormattingRuns(ArrayList formattingRuns)
formattingRuns - // NOTES: apparently must have a minimum of 24 bytes in the Continue formatting run to work
// even though each formatting run=4 bytes, must have 4 bytes of padding between runs...?
// NOTES: apparently formatting runs are different than documentation indicates:
// each formatting run is 8 bytes: charIndex (2), fontIndex (2), 4 bytes (ignored)
// at end of formatting runs, must have an extra 8 bytes: charIndex==length/fontIndex, 4 bytes
// for the purposes of this method, the extra entry must be already presentpublic static XLSRecord getPrototype()
Copyright © 2002–2019 Starter Inc.. All rights reserved.