TXO: Text Object (1B6h)

This record stores a text object. The TXO record is followed by two CONTINUE records. The first CONTINUE contains the text data, and the second CONTINUE contains the formatting runs. If the text box contains no text, then these CONTINUE records are not written to the file.

Record Data BIFF8

Offset

Name

Size

Contents

4

grbit

2

Option flags; see following table

6

rot

2

Orientation of text within the object boundary:
= 0, no rotation (text appears left to right)
= 1, text appears top to bottom; letters are
upright
= 2, text is rotated 90 degrees counterclockwise
= 3, text is rotated 90 degrees clockwise

8

Reserved

6

Reserved; must be 0 (zero)

14

cchText

2

Length of text (in first CONTINUE record)

16

cbRuns

2

Length of formatting runs (in second CONTINUE record)

14

Reserved

4

Reserved; must be 0 (zero)


The grbit field contains the following option flags.

Bits

Mask

Name

Contents

0

0001h

Reserved

3 – 1

000Eh

alcH

Horizontal text alignment:
1 = left-aligned
2 = centered
3 = right-aligned
4 = justified

6 – 4

0070h

alcV

Vertical text alignment:
1 = top
2 = center
3 = bottom
4 = justify

8 – 7

0180h

Reserved

9

0200h

fLockText

= 1 if the Lock Text option is on (Format Text Box dialog box, Protection tab)

15 – 10

FC00h

Reserved


The first CONTINUE record contains the text characters, the length of which is given by cchText. The first byte of this CONTINUE record's data field specifies if the text is compressed unicode or unicode. If the byte = 0h, then all the characters in the string have a high byte of 00h and only the low bytes are saved in the file (compressed). If the byte = 1h, then at least one character in the string has a nonzero high byte and therefore all characters in the string are saved as double-byte unicode characters (not compressed).

The second CONTINUE record contains an array of formatting runs structures (TXORUNS). A TXORUNS structure contains formatting information about the object text string. A TXORUNS structure occurs every time the text formatting changes. The TXORUNS structure is described in the following table.

Offset

Name

Size

Contents

0

ichFirst

2

Index to the first character to which the formatting applies

2

ifnt

2

Index to the FONT record

4

(Reserved)

4


There are always at least two TXORUNS structures in the second CONTINUE record, even if the entire text string is normal font (ifnt = 0). The last TXORUNS structure, which ends the formatting information for the string, always has ichFirst = cchText, and ifnt = 0.