
Function 221 (0xDD) = Style Group
The Style Group subfunctions have page orientation.
0xDD00
Style Begin On
<221 (0xDD)> <0 (0x00)> [size = variable] <flags = PRFXID+2
(encased/paired function)>
<number of PIDs = 1>
[style PID (type=0x30)]
[size of non-deletable information = 3]
[hash of this Begin On]
<system style number (-1 if normal)>
<undocumented deletable data> x ?
[size] <0xDD>
0xDD01
Style Begin Off
<221 (0xDD)> <1 (0x01)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDD>
0xDD02
Style End On
<221 (0xDD)> <2 (0x02)> [size = variable] <flags = PRFXID+ 2
(encased/Paired Function>
<number of PIDs = 1>
[style PID (type=0x30)]
[size of non-deletable information = 3]
[hash of this End On]
<system style number (-1 is normal)>
<undocumented deletable data> x ?
[size] <0xDD>
0xDD03
Style
End Off
<221 (0xDD)> <3 (0x03)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDD>
0xDD04
Paragraph Style Begin On (Part 1)
<221 (0xDD)> <4 (0x04)> [size = variable] <flags = PRFXID+2
(encased/paired function)>
<number of PIDs = 1>
[paragraph style PID (type=0x30)]
[size of non-deletable information = 3]
[hash of this paragraph style Begin On]
<system style number (-1 if normal)>
<undocumented deletable data> x ?
[size] <0xDD>
0xDD05
Paragraph Style Begin Off (Part 1)
<221 (0xDD)> <5 (0x05)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDD>
0xDD06
Paragraph Style Begin On (Part 2)
<221 (0xDD)> <6 (0x06)> [size = 12] <flags = PRFXID+2 (encased/paired
function)>
<number of PIDs = 1>
[paragraph style PID (type=0x30)]
[size of non-deletable information = 2]
[hash of this paragraph style End On]
<undocumented deletable data> x ?
[size] <0xDD>
0xDD07
Paragraph Style Begin Off (Part 2)
<221 (0xDD)> <7 (0x07)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDD>
0xDD08
Paragraph Style End On
<221 (0xDD)> <8 (0x08)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 4]
[paragraph style PID (type=0x30)]
[hash of this paragraph style End On]
<undocumented deletable data> x ?
[size] <0xDD>
0xDD09
Paragraph Style End Off
<221 (0xDD)> <9 (0x09)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDD>
0xDD0A
Global On
<221 (0xDD)> <10 (0x0A)> [size = variable] <flags = PRFXID+3 (encased
function)>
<number of PIDs = 1>
[style PID (type=0x30)]
[size of non-deletable information = 3]
[hash of this Global On]
<system style number)>
1 = normal
16 = footnote number
17 = endnote number
18 = figure box number
19 = table box number
20 = text box number
21 = user box number
22 = equation box number
23 = hypertext
24 = table of contents level 1
25 = table of contents level 2
26 = table of contents level 3
27 = table of contents level 4
28 = table of contents level 5
29 = index level 1
30 = index level 2
31 = list
32 = table of authorities
33 = document
34 = box text
35 = caption
36 = footnote
37 = endnote
38 = comment
39 = header a
40 = header b
41 = footer a
42 = footer b
43 = watermark a
44 = watermark b
45 = paragraph
46 = outline
47 = legal
48 = bullets
49 = headings
50 = legal 2
51 = numbers
52 = level 1 style (indented)
53 = level 2 style (indented)
54 = level 3 style (indented)
55 = level 4 style (indented)
56 = level 5 style (indented)
57 = level 6 style (indented)
58 = level 7 style (indented)
59 = level 8 style (indented)
60 = level 1 style (not indented)
61 = level 2 style (not indented)
62 = level 3 style (not indented)
63 = level 4 style (not indented)
64 = level 5 style (not indented)
65 = level 6 style (not indented)
66 = level 7 style (not indented)
67 = level 8 style (not indented)
68 = heading level 1 style
69 = heading level 2 style
70 = heading level 3 style
71 = heading level 4 style
72 = heading level 5 style
73 = heading level 6 style
74 = heading level 7 style
75 = heading level 8 style
<undocumented deletable data> x ?
[size] <0xDD>
0xDD0B
Global Off
<221 (0xDD)> <11 (0x0B)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDD>
Function 222 (0xDE) = Merge Group
The Merge Group subfunctions have character orientation.
Non-Paired Merge Subfunctions: 0 (0x00) - 31 (0x1F)
Subfunction
| Description
| 0 (0x00)
| Beep
| 1 (0x01)
| Break
| 2 (0x02)
| Cancel Off
| 3 (0x03)
| Cancel On
| 4 (0x04)
| Continue
| 5 (0x05)
| Date
| 6 (0x06)
| Default
| 7 (0x07)
| Display Stop
| 8 (0x08)
| Else
| 9 (0x09)
| End Case
| 10 (0x0A)
| End Field
| 11 (0x0B)
| End FOR
| 12 (0x0C)
| End IF
| 13 (0x0D)
| End Record
| 14 (0x0E)
| End WHILE
| 15 (0x0F)
| Next
| 16 (0x10)
| Next Record
| 17 (0x11)
| Page Off
| 18 (0x12)
| Page On
| 19 (0x13)
| Print
| 20 (0x14)
| Quit
| 21 (0x15)
| Process On
| 22 (0x16)
| Return
| 23 (0x17)
| Return Cancel
| 24 (0x18)
| Return Error
| 25 (0x19)
| Rewrite
| 26 (0x1A)
| Step Off
| 27 (0x1B)
| Step On
| 28 (0x1C)
| Stop
| 29 (0x1D)
| Process Off
| 30 (0x1E)
| FEP Off (for Asia)
| 31 (0x1F)
| FEP On (for Asia)
| 32 (0x20)
| Row Repeat (Asia) |
<222 (0xDE)> <subfunction> [size = variable] <flags = 0>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDE>
Paired Merge Subfunctions: 48 (0x30) - 148 (0x94)
The subfunctions in this list are paired so that the even-numbered codes are the On functions
and
the odd numbered codes are the Off functions. Each instance of a subfunction will consist of the
On subfunction, a string of information, and the Off subfunction. The detailed structure is shown
following the table of subfunctions below. The string information required by each merge code
is documented in parentheses next to the On function code. Square brackets are used to indicate
optional string data. The parentheses and square brackets are not included in the actual string
data.
Subfunction
| Description
| 48 (0x30)
| ASSIGN On (var;expr)
| 49 (0x31)
| ASSIGN Off
| 50 (0x32)
| CALL On (label)
| 51 (0x33)
| CALL Off
| 52 (0x34)
| CAPS On (expr)
| 53 (0x35)
| CAPS Off
| 54 (0x36)
| CASE On (exp;case1;label;...;ELSE;label)
| 55 (0x37)
| CASE Off
| 56 (0x38)
| CASEOF On (expr[;...;expr])
| 57 (0x39)
| CASEOF Off
| 58 (0x3A)
| CHAINMACRO On (macroname)
| 59 (0x3B)
| CHAINMACRO Off
| 60 (0x3C)
| CHAINDATA On (filename)
| 61 (0x3D)
| CHAINDATA Off
| 62 (0x3E)
| CHAINFORM On (filename)
| 63 (0x3F)
| CHAINFORM Off
| 64 (0x40)
| CHAR On (var;[;prompt][;title])
| 65 (0x41)
| CHAR Off
| 66 (0x42)
| CODES On (merge codes)
| 67 (0x43)
| CODES Off
| 68 (0x44)
| COMMENT On (comment)
| 69 (0x45)
| COMMENT Off
| 70 (0x46)
| CTON On (character)
| 71 (0x47)
| CTON Off
| 72 (0x48)
| DOCUMENT On (filename)
| 73 (0x49)
| DOCUMENT Off
| 74 (0x4A)
| EMBEDMACRO On (macro commands)
| 75 (0x4B)
| EMBEDMACRO Off
| 76 (0x4C)
| FIELD On (field)
| 77 (0x4D)
| FIELD Off
| 78 (0x4E)
| FIELDNAMES On (name1;...;nameN)
| 79 (0x4F)
| FIELDNAMES Off
| 80 (0x50)
| FIRSTCAP On (string)
| 81 (0x51)
| FIRSTCAP Off
| 82 (0x52)
| FOR On (var;start;stop;step)
| 83 (0x53)
| FOR Off
| 84 (0x54)
| FOREACH On (var;expr;expr;...)
| 85 (0x55)
| FOREACH Off
| 86 (0x56)
| GETSTRING On (variable[;prompt][;title])
| 87 (0x57)
| GETSTRING Off
| 88 (0x58)
| GO On (label)
| 89 (0x59)
| GO Off
| 90 (0x5A)
| IF On (expr)
| 91 (0x5B)
| IF Off
| 92 (0x5C)
| IFBLANK On (field)
| 93 (0x5D)
| IFBLANK Off
| 94 (0x5E)
| IFEXISTS On (var)
| 95 (0x5F)
| IFEXISTS Off
| 96 (0x60)
| IFNOTBLANK On (field)
| 97 (0x61)
| IFNOTBLANK Off
| 98 (0x62)
| INSERT On (WP text)
| 99 (0x63)
| INSERT Off
| 100 (0x64)
| KEYBOARD On ([prompt])
| 101 (0x65)
| KEYBOARD Off
| 102 (0x66)
| LABEL On (label)
| 103 (0x67)
| LABEL Off
| 104 (0x68)
| LOCAL On (var)
| 105 (0x69)
| LOCAL Off
| 106 (0x6A)
| LOOK On (var)
| 107 (0x6B)
| LOOK Off
| 108 (0x6C)
| MRGCMND On (merge codes)
| 109 (0x6D)
| MRGCMND Off
| 110 (0x6E)
| NESTDATA On (filename)
| 111 (0x6F)
| NESTDATA Off
| 112 (0x70)
| NESTFORM On (filename)
| 113 (0x71)
| NESTFORM Off
| 114 (0x72)
| NESTMACRO On (macroname)
| 115 (0x73)
| NESTMACRO Off
| 116 (0x74)
| NTOC On (number)
| 117 (0x75)
| NTOC Off
| 118 (0x76)
| ONCANCEL On (action)
| 119 (0x77)
| ONCANCEL Off
| 120 (0x78)
| ONERROR On (action)
| 121 (0x79)
| ONERROR Off
| 122 (0x7A)
| PROMPT On (message)
| 123 (0x7B)
| PROMPT Off
| 124 (0x7C)
| STATUSPROMPT On (message)
| 125 (0x7D)
| STATUSPROMPT Off
| 126 (0x7E)
| STRLEN On (expr)
| 127 (0x7F)
| STRLEN Off
| 128 (0x80)
| STRPOS On (expr;subexpr)
| 129 (0x81)
| STRPOS Off
| 130 (0x82)
| SUBSTDATA On (filename)
| 131 (0x83)
| SUBSTDATA Off
| 132 (0x84)
| SUBSTFORM On (filename)
| 133 (0x85)
| SUBSTFORM Off
| 134 (0x86)
| SUBSTR On (expr;start;length)
| 135 (0x87)
| SUBSTR Off
| 136 (0x88)
| SYSTEM On (sysvar)
| 137 (0x89)
| SYSTEM Off
| 138 (0x8A)
| TOLOWER On (expr)
| 139 (0x8B)
| TOLOWER Off
| 140 (0x8C)
| TOUPPER On (string)
| 141 (0x8D)
| TOUPPER Off
| 142 (0x8E)
| VARIABLE On (var)
| 143 (0x8F)
| VARIABLE Off
| 144 (0x90)
| WAIT On (10ths second)
| 145 (0x91)
| WAIT Off
| 146 (0x92)
| WHILE On (expr)
| 147 (0x93)
| WHILE Off
| 148 (0x94)
| POSTNET On (string)
| 149 (0x95)
| POSTNET Off |
<222 (0xDE)> <on subfunction> [size = variable] <flags = 1
(simple
paired function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xDE>
<associated string information> x ?
<222 (0xDE)> <off subfunction> [size = 10] <flags = 1 (simple paired
function)>
[size of non-deletable information = 0]
[size] <0xDE>
Function 223 (0xDF) = Box Group
The Box Group subfunctions have character orientation.
0xDF00
Character-Anchored Box:0 (0x00)
See structure under Page-Anchored Box below.
0xDF01
Paragraph-Anchored Box1 (0x01)
See structure under Page-Anchored Box below.
0xDF02
Page-Anchored Box2 (0x02)
<223 (0xDF)> <subfunction #> [size = variable] <flags = PRFXID>
<number of PIDs (minimum 1)>
[box template PID (type=0x41)] required
[box counter PID (type=0x11)] if indicated by override flags
[box PIDs] (none currently defined)
[box contents PIDs (type=0x40)] if indicated by override flags
[box caption PIDs (type=0x08)] if indicated by override flags
[box border PIDs (type=0x42)] as many as needed as indicated by
override flags
[box fill PIDs (type=0x43)] if indicated by override flags
[box hypertext PIDs (type=0x07 or 0x17)] if indicated by override
flags type 0x07 for Hypertext macro filename, type 0x17 for Hypertext
bookmark
[size of non-deletable information]
<reserved for future use> x 14
[total size of override and wrap rectangle data for box] not including
this word
[total size of override data] not including this word
[box override flags]
See definition under Specific Format of Box Override Flags and Data
below.
[number of platform-independent wrap rectangles]
Four wrap rectangle data words per rectangle:
[unsigned offset of left side of rectangle from left side of
formatted render box]
[unsigned offset of right side of rectangle from left side of
formatted render box]
[unsigned offset of top side of rectangle from top side of formatted
render box]
[unsigned offset of bottom side of rectangle from top side of
formatted render box]
<undocumented deletable data> x ?
[size] <0xDF>
Units for the above wrap rectangle values are in 65536ths of the appropriate dimension
(width or
height) of the formatted box in which content is to be rendered. The left offset value and the
right offset value are measured in 65536ths of the width of the formatted box. The top offset
value and bottom offset value are measured in 65536ths of the height of the formatted box. Note
that the right value must be greater than or equal to the left value and the bottom value must be
greater than or equal to the top value. Allowable values are from 0 to 65535. For convenience,
65535 is considered 65536.
General Format of Box Override Flags and Data:
The box may have associated override flags in the box function. The override flags are a
16-bit
entity (word) and each bit corresponds to data in the box definition.
For each bit in the box override flags, there is corresponding data. The size of the data
depends
on what the override bit represents. The order of the data depends on the order of the override
bits, with one exception, noted below. For example, if both bits 15 and 14 in the override flag
are set, the data corresponding to bit 15 appear earlier in the override data area than the data
corresponding to bit 14. The exception is for border or fill template overrides. Because the data
are prefix IDs, the data appear in the prefix ID area at the beginning of the function. The order of
the prefix IDs corresponds to the bit order of the override flags.
If an override bit is set in the box override flags, a mask appears defining which bits within
the
corresponding data are overridden followed by the actual override data. For example, assume a
data byte has two fields, the first field covering bits 0-3 and the second field covering bits 4-7.
Assume the first field (bits 0-3) is to be overridden but the second field (bits 4-7) is not. The
corresponding override bit will be set in the box override flags word. The data corresponding to
this override bit will be a mask byte (value 0x0F) and a data byte, of which only the bottom 4 bits
matter.
All currently undefined data must be set to 0 when creating a new box template or box
function.
For any flag data, only those bits currently defined should be modified. All others should be
preserved. Write code to preserve fixed- and variable-length data that may be added later. This
means using the total length and length-of-fixed portion words. Names of templates cannot be
longer than 80 characters (160 bytes), not including length word.
Specific Format of Box Override Flags and Data:
bit 15: Box counter data.
If the box counter override bit is set in the box's override flags,
the following data appear:
[total size of box counter override data (not including this word)]
[box counter override flags]
The following data appear according to bits set in the box counter
override flags:
bit 15: Box counter prefix ID flags. Corresponding data:
<mask>
<data>
bits 14-0: currently undefined
bit 14: Box positioning data.
If the box position override bit is set in the box override flags, the
following data appear:
[total size of box position override data (not including this word)]
[box position override flags]
The following data appear according to bits set in the box position
override flags:
bit 15: Box positioning prefix ID flags. Corresponding data:
<mask>
<data>
bit 14: Box general positioning flags. Corresponding data:
<mask>
<data>
bit 13: Box horizontal positioning data override. Corresponding
data:
<box horizontal positioning flags>
[horizontal offset]
<left column>
<right column>
bit 12: Box vertical positioning data override. Corresponding
data:
<box vertical positioning flags>
[vertical offset]
bit 11: Box width data override. Corresponding data:
<box width flags>
[box width value]
bit 10: Box height data override. Corresponding data:
<box height flags>
[box height value]
bits 9-0: currently undefined
bit 13: box content data
If the content override bit is set for the box's override flags, the
following data appear:
[total size of content override data (not including this word)]
[content override flags]
The following data appear according to bits set in the content
override flags
bit 15: Box content prefix ID flags override. Corresponding data:
<mask>
<data>
bit 14: Content type override. Corresponding data:
<content type>
bit 13: Content rendering information. Corresponding data:
If the content type of the box is image:
[total size of image content override data (not including this
word)]
[image content override flags]
bit 15: Prefix ID flag override. Corresponding data:
<mask>
<data>
If this override bit is set, and bit 0 of the mask byte is
set such that the prefix ID flags is overridden, the image native size
override bit 14 must also be set.
bit 14: Image native size override. Corresponding data:
[image native width (WPUs)]
[image native height (WPUs)]
This override bit must be set if bit 0 in the image content
prefix ID flags is overridden. See previous bit, bit 15.
bit 13: Image content render flags override. Corresponding data:
<mask>
<data>
bit 12: Scaling factor override. Corresponding data:
{fixed point x scaling factor}
{fixed point y scaling factor}
bit 11: Translation factor override. Corresponding data:
{x translation factor}
{y translation factor}
bit 10: Rotation angle override. Corresponding data:
{data}
bit 9: Black and white threshold override. Corresponding data:
<data>
bit 8: Lightness value override. Corresponding data:
{data}
bit 7: Contrast value override. Corresponding data:
{data}
bit 6: Halftone data override. Corresponding data:
{halftone screen LPI}
{plane 0 halftone screen angle}
{plane 1 halftone screen angle}
{plane 2 halftone screen angle}
{plane 3 halftone screen angle}
bit 5: Image dither flags override. Corresponding data:
<mask>
<data>
bits 4-0: currently undefined
If the content type of the box is text:
[total size of text content override data] not including this word
[text content override flags]
bit 15: Prefix ID flag override. Corresponding data:
<mask>
<data>
bit 14: Text content rendering flag override. Corresponding
data:
<mask>
<data>
bits 13-0: currently undefined
If the content type of the box is equation:
[total size of equation content override data] not including this
word
[equation content override flags]
bit 15: Prefix ID flag override. Corresponding data:
<mask>
<data>
bit 14: Equation content rendering flag override. Corresponding
data:
<mask>
<data>
bit 13: Equation font size override. Corresponding data:
[equation base font size]
bit 12: Equation color override. Corresponding data:
<equation color (RGBS)> x 4
bit 11: Equation rotation override. Corresponding data:
{fixed point rotation angle} (0.0-360.0)
bits 10-0: currently undefined.
If the content type is Presentation, Video, Macro, Sound, or
External:
Currently undefined
bit 12: Content alignment information. Corresponding data:
<mask>
<data>
bits 11-0: currently undefined
bit 12: box caption data
If the box caption override bit is set in the box's override flags,
the following data appear:
[total size of caption override data (not including this word)]
[caption override flags]
The following data appear according to bits set in the border
template override flags
bit 15: Box caption prefix ID flags override. Corresponding data:
<mask>
<data>
bit 14: Caption positioning override. Corresponding data:
<caption positioning flags data>
[caption alignment offset word]
bit 13: Caption formatting override. Corresponding data:
<caption formatting flags data>
[caption formatting word ]
bits 12-0: currently undefined
bit 11: box border data:
If the box border override bit is set in the box's override flags, the
following data appear:
[total size of box border override data (not including this word)]
[box border override flags ]
The following data appear according to bits set in the border
template override flags:
bit 15: Box border prefix ID flags override. Corresponding data:
<mask>
<data>
bit 14: Border template override data. Corresponding data:
If the border template override bit is set in the box's override
flags, the following data appear:
[total size of border template override data (not including this
word)]
[border template override flags]
The following data appear according to bits set in the border
template override flags:
bit 15: Border template prefix ID flags data. Corresponding
data:
<mask>
<data>
bit 14: Border general flags data. Corresponding data:
<mask>
<data>
bit 13: Corner radius data. Corresponding data:
[corner radius]
bit 12: Inside spacing data. Corresponding data:
[left inside spacing]
[right inside spacing]
[top inside spacing]
[bottom inside spacing]
bit 11: Outside spacing data. Corresponding data:
[left outside spacing]
[right outside spacing]
[top outside spacing]
[bottom outside spacing]
bit 10: Drop shadow data. Corresponding data:
<drop shadow flag>
[drop shadow spacing]
<drop shadow color (RGBS)> x 4
bit 9: Border color data. Corresponding data:
<border color (RGBS)> x 4
bits 8-0: currently undefined
bits 13-0: currently undefined
bit 10: box fill data:
If the box fill override bit is set in the box's override flags, the
following data appear:
[total size of fill template override data (not including this
word)]
[border fill override flags]
The following data appear according to bits set in the fill template
override flags
bit 15: Box fill prefix ID flags override. Corresponding data:
<mask>
<data>
bit 14: Fill template data override. Corresponding data:
If the fill template override bit is set in the box fill override
flags, the following data appear:
[total size of fill template override data (not including this
word)]
[fill template override flags]
The following data appear according to bits set in the fill
template override flags
bit 15: Fill colors override. Corresponding data:
<foreground/start color (RGBS)> x 4
<background/end color (RGBS)> x 4
bits 14-0: currently undefined
bits 13-0: currently undefined
bit 9: box wrapping data
If the box wrapping override bit is set in the box override flags, the
following data appear:
[total size of box wrapping override data (not including this word)]
[box wrapping override flags]
The following data appear according to bits set in the box wrapping
override flags:
bit 15: Box wrapping prefix ID override. Corresponding data:
<mask>
<data>
bit 14: Wrapping flags. Corresponding data:
<mask>
<data>
bits 13-0: currently undefined
bit 8: box hypertext wrapping data
If the box hypertext wrapping override bit is set in the box override
flags, the following data appear:
[total size of box hypertext override data (not including this
word)]
[box hypertext override flags]
The following data appear according to bits set in the box hypertext
override flags:
bit 15: Box hypertext prefix ID override. Corresponding data:
<mask>
<data>
bit 14: Box hypertext type flags override. Corresponding data:
<data>
bits 13-0: currently undefined
bits 7-0: currently undefined
0xDF03
Graphics Rule
<223 (0xDF)> <3 (0x03)> [size = variable] <flags = PRFXID>
<number of PIDs (minimum 2)>
[border line template PID (type = 0x42)]
[document function rule count PID (type = 0x45)]
The rule function count prefix packet exists merely to keep a count of
rule functions in the document. Its content should be a single 16-bit
short value of zero (0). When a rule function is created, the prefix
packet will be created or its use count incremented. The prefix
packet ID will be placed in the function at insertion so that the
prefix packet use count will be decremented if the function is
deleted. The use count must correspond exactly to the number of rule
functions in the document.
[size of non-deletable data]
<reserved for future use> x 14
Rule positioning data:
[size of rule positioning area] not including this word
<rule general position flags>
bits 2-7: undefined
bit 1: rule thickness flag
0 = rule thickness determined by border line style thickness
1 = rule thickness set by user, border line style scaled for
display
bit 0: horizontal vertical flag
0 = horizontal rule
1 = vertical rule
<rule horizontal positioning flags>
bits 5-7: undefined
bits 2-4: alignment (if margin-relative)
0 = left
1 = right
2 = centered
3 = full
bit 0: alignment type
0 = absolute (relative to left of page)
1 = margin-relative
2 = between columns (vertical rule only)
[absolute horizontal position (unsigned WPUs)]
<left column> for rules between columns
<rule vertical positioning flags>
bits 5-7: undefined
bits 2-4: alignment (if margin relative)
0 = top
1 = bottom
2 = centered
3 = full
bit 0-1: alignment type
0 = absolute (relative to top of page)
1 = margin-relative (vertical rule only)
2 = baseline (horizontal rule only)
[absolute vertical position (unsigned WPUs)]
[rule thickness (unsigned WPUs)]
[rule length (unsigned WPUs)]
If horizontal rule:
[rule top outside spacing (unsigned WPUs)]
[rule bottom outside spacing (unsigned WPUs)]
If left or right aligned vertical rule:
[rule kick-out spacing (unsigned WPUs)] The kick-out spacing is the
distance between the margin and the side of the rule closest to the
margin (right side for left-aligned rules and left side for
right-aligned rules). Note that left and right aligned vertical rules
are outside the margins. For 5.1 compatibility, the default kick-out
spacing is 1/8.
Rule line definition data:
[size of line definition area] not including this word
<rule line definition flags>
bit 1-7: undefined
bit 0: color use flag
0 = use color from line template segment definitions
1 = use color from rule template for all segments
<rule color (RGBS)> x 4
<undocumented deletable data> x ?
[size] <0xDF>
General Rules
All currently undefined data should be set to 0 when a new document rule function is created.
For any flag data, only those bits currently defined should be modified. All others should be
preserved.
Function 224 (0xE0) = Tab Group
The Tab Group subfunctions have character orientation.
0xE000
Tab
<224 (0xE0)> <tab definition shown below> [size = variable] <flags =
0>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xE0>
<tab definition>
bit 0: 1 = soft type (tab, align, center, and so forth), (uses the
tab set definition type)
bit 1: 1 = dot leader
bit 2: 1 = generic search (only used in search code, ignore bits 0
and 1 when comparing)
bits 3-7: tab type
00000 = back tab
00001 = table tab
00010 = left tab
00100 = bar tab
00110 = left indent
00111 = left/right indent
01000 = center on margins
01001 = center on current position
01010 = center tab
10000 = flush right
10010 = right tab
11010 = decimal tab
bits 6-7 are the alignment bits:
00 = no alignment
01 = center
10 = right alignment
11 = decimal alignment
bits 4-5 are not 00 if the tab type uses the tab table to get the
next tab position.
bit 3 is used to make each type unique.
Function 225 (0xE1) = Platform Group
The Platform Group subfunctions have character orientation.
These subfunctions do not currently contain deletable data, however, deletable data and
prefix
IDs may be added to any function or subfunction at any time.
0xE100
Dynamic Data Exchange Start
<225 (0xE1)> <0 (0x00)> [size = 17] <flags = PRFXID+3 (encased
function)>
<number of PIDs = 1>
[DDE PID (type = 0x73 or 0x74)]
[size of non-deletable information = 4]
<reserved> x 4
[size] <0xE1>
0xE101
Dynamic Data Exchange End
<225 (0xE1)> <1 (0x01)> [size = 17] <flags = PRFXID+3 (encased
function)>
<number of PIDs = 1>
[DDE PID (type = 0x73 or 0x74)]
[size of non-deletable information = 4]
<reserved> x 4
[size] <0xE1>
0xE102
Publish Data Start
<225 (0xE1)> <2 (0x02)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information]
<non-deletable data> x ?
[size] <0xE1>
0xE103
Publish Data End
<225 (0xE1)> <3 (0x03)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information]
<non-deletable data> x ?
[size] <0xE1>
0xE104
Subscribe Data Start
<225 (0xE1)> <4 (0x04)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information]
<non-deletable data> x ?
[size] <0xE1>
0xE105
Subscribe Data End
<225 (0xE1)> <5 (0x05)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information]
<non-deletable data> x ?
[size] <0xE1>
0xE106
Subtitle Mark
<225 (0xE1)> <6 (0x06)> [size = 10] <flags = 0>
[size of non-deletable information = 0]
[size] <0xE1>
0xE107
Subtitle Text
<225 (0xE1)> <7 (0x07)> [size = variable] <flags = 0>
[size of non-deletable information]
[number of lines of base text involved (always 1 for now)]
[width of text including white space (WPU)]
[starting horizontal cursor position of base text]
[ending horizontal cursor position of base text]
[max top shoulder of base text]
[max bottom shoulder of base text]
[max top shoulder of subtitle text]
[max bottom shoulder of subtitle text]
<number of bytes of subtitle text>
<subtitle text (word string)> x ?
...repeat for each line
[size] <0xE1>
0xE108
Subtitle Option
<225 (0xE1)> <8 (0x08)> [size = 14] <flags = 0>
[size of non-deletable information = 4]
<justification>
0 = left justified
1 = full justified
2 = center justified
3 = indented full justified
4 = all (kinto waritsuke) justified
5 = indented all justified
<flag>
bit 0:
0 = position subtitle text above line
1 = position subtitle text below line
bit 1:
0 = do not print graphically
1 = print graphically
bit 2:
0 = use width of base text
1 = use max width of base text or subtitle text
bit 3:
0 = wrap base text as unit
1 = base text and subtitle text can wrap
[leading adjustment (signed WPU)]
[size] <0xE1>
0xE109
Subtitle Text Options
<225 (0xE1)> <9 (0x09)> [size = variable] <flags = PRFXID>
<number of PIDs = 1>
[desired subtitle font PID (type=0x55)]
[size of non-deletable information = 16]
[ point size (WPU)]
[hash of matched typeface descriptor]
[matched font index in font list]
[matched point size of font (WPU)]
[attribute word 1]
bit 0: 1 = extra large
bit 1: 1 = very large
bit 2: 1 = large
bit 3: 1 = small print
bit 4: 1 = fine print
bit 5: 1 = superscript
bit 6: 1 = subscript
bit 7: 1 = outline
bit 8: 1 = italics
bit 9: 1 = shadow
bit 10: 1 = redline
bit 11: 1 = double underline
bit 12: 1 = bold
bit 13: 1 = strikeout
bit 14: 1 = underline
bit 15: 1 = small caps
[attribute word 2]
bit 0: 1 = blink
bit 1: 1 = reverse video
<color (RGBS)> x 4
[size] <0xE1>
0xE10A
Suppress Subtitle
<225 (0xE1)> <10 (0x0A)> [size = 11] <flags = 0>
[size of non-deletable information = 1]
<suppress code>
0 = no suppression
1 = suppress subtitles
[size] <0xE1>
0xE10B
Third Party
<225 (0xE1)> <11 (0x0B)> [size = variable] <flags = unknown>
[size of non-deletable information]
[company ID] Companies must call and register an ID with Corel
Corporation Limited.
<company defined information> x ?
[size] <0xE1>
0xE10C
Pen Foreground Color (32-bit), Text
<225 (0xE1)> <12 (0x0C)> [size = 14] <flags = 0>
[size of non-deletable information = 4]
<pen foreground color (RGBT)> x 4
[size] <0xE1>
0xE10D
Pen Foreground Color (64-bit), Text
<225 (0xE1)> <13 (0x0D)> [size = 18] <flags = 0>
[size of non-deletable information = 8]
<pen foreground color (RGBT)> x 8
[size] <0xE1>
0xE10E
Pen Background Color (32-bit), Text
<225 (0xE1)> <14 (0x0E)> [size = 14] <flags = 0>
[size of non-deletable information = 4]
<pen foreground color (RGBT)> x 4
[size] <0xE1>
0xE10F
Pen Background Color (64-bit), Text
<225 (0xE1)> <15 (0x0F)> [size = 18] <flags = 0>
[size of non-deletable information = 8]
<pen foreground color (RGBT)> x 8
[size] <0xE1>
0xE110
Pen Style, Text
<225 (0xE1)> <16 (0x10)> [size = 12] <flags = 0>
[size of non-deletable information = 2]
[pen style index (unsigned)]
[size] <0xE1>
0xE111
Pen Pattern, Text
<225 (0xE1)> <17 (0x11)> [size = 12] <flags = 0>
[size of non-deletable information = 2]
[pen pattern index (unsigned)]
[size] <0xE1>
0xE112
Pen Size (16-bit), Text
<225 (0xE1)> <18 (0x12)> [size = 14] <flags = 0>
[size of non-deletable information = 4]
[pen width (0 = hairline) (unsigned WPU)]
[pen height (0 = hairline) (unsigned WPU)]
[size] <0xE1>
0xE113
Pen Size (32-bit), Text
<225 (0xE1)> <19 (0x13)> [size = 18] <flags = 0>
[size of non-deletable information = 8]
{pen width (0 = hairline) (unsigned WPU) 16.16}
{pen height (0 = hairline) (unsigned WPU) 16.16}
[size] <0xE1>
0xE114
Brush Gradient (32-bit), Text
<225 (0xE1)> <20 (0x14)> [size = variable] <flags = 0>
[size of non-deletable information]
{brush gradient angle}
[horizontal gradient reference]
[vertical gradient reference]
<brush gradient flag>
bit 7: anchor flag
bit 6: granularity flag
if anchor flag bit is set then:
[horizontal gradient extent minimum (signed WPU)]
[vertical gradient extent minimum (signed WPU)]
[horizontal gradient extent maximum (signed WPU)]
[vertical gradient extent maximum (signed WPU)]
[size] <0xE1>
0xE115
Brush Gradient (64-bit), Text
<225 (0xE1)> <21 (0x15)> [size = variable] <flags = 0>
[size of non-deletable information]
{brush gradient angle}
[horizontal gradient reference]
[vertical gradient reference]
<brush gradient flag>
bit 7: anchor flag
bit 6: granularity flag
if anchor flag is set then:
{horizontal gradient extent minimum (signed WPU) 16.16}
{vertical gradient extent minimum (signed WPU) 16.16}
{horizontal gradient extent maximum (signed WPU) 16.16}
{vertical gradient extent maximum (signed WPU) 16.16}
[size] <0xE1>
0xE116
Brush Foreground Color (32-bit), Text
<225 (0xE1)> <22 (0x16)> [size = variable] <flags = 0>
[size of non-deletable information]
<gradient type>
if gradient type is 0 (none), then:
<brush foreground color (RGBT)> x 4
else
[number, n, of brush foreground colors]
for each color:
<brush foreground color (RGBT)> x 4
after all brush foreground colors:
[color position array] x (n-1)
[size] <0xE1>
0xE117
Brush Foreground Color (64-bit), Text
<225 (0xE1)> <23 (0x17)> [size = variable] <flags = 0>
[size of non-deletable information]
<gradient type>
if gradient type is 0 (none), then:
<brush foreground color (RGBT)> x 8
else
[number, n, of brush foreground colors]
for each color:
<brush foreground color (RGBT)> x 8
after all brush foreground colors:
[color position array] x (n-1)
[size] <0xE1>
0xE118
Brush Background Color (32-bit), Text
<225 (0xE1)> <24 (0x18)> [size = 14] <flags = 0>
[size of non-deletable information = 4]
<brush background color (RGBT)> x 4
[size] <0xE1>
0xE119
Brush Background Color (64-bit), Text
<225 (0xE1)> <25 (0x19)> [size = 18] <flags = 0>
[size of non-deletable information = 8]
<brush background color (RGBT)> x 8
[size] <0xE1>
0xE11A
Brush Pattern, Text
<225 (0xE1)> <26 (0x1A)> [size = 12] <flags = 0>
[size of non-deletable information = 2]
[brush pattern index (unsigned)]
[size] <0xE1>
0xE11B
Miscellaneous Attributes, Text
<225 (0xE1)> <27 (0x1B)> [size = 11] <flags = 0>
[size of non-deletable information = 1]
<flag>
bit 1:
0 = turn outline on
1 = turn outline off
bit 0:
0 = turn fill on
1 = turn fill off (hollow fill)
[size] <0xE1>
0xE11C
Presentations Slide Options
<225 (0xE1)> <28 (0x1C)> [size = variable] <flags = 0>
[size of non-deletable information]
<slide options> x ?
[size] <0xE1>
0xE11D
Presentations Organization Chart Node Options
<225 (0xE1)> <29 (0x1D)> [size = variable] <flags = 0>
[size of non-deletable information]
[flag]
bit 1:
0 = node is not a staff node
1 = node is a staff node
bit 0:
0 = node is not current top node
1 = node is current top node
[size] <0xE1>
0xE11E
Hide for Conversions
<225 (0xE1)> <30 (0x1E)> [size = variable] <flags = (0 or PRFXID) + (0
or 3 {encased function})>
<number of PIDs>
[PIDs] x ?
[size of non-deletable information]
<product type of the hidden code = 1 for WP files>
<file type>
0x0A = WP file types
0x2C = Macintosh WP 3.x
<major version>
3 = Macintosh WP 3.x
2 = WP 6.x and WP 7.0
<minor version>
0 = Macintosh WP 3.0 or WP 6.0
1 = WP 6.1
2 = WP 7.0
<hidden function data> x ?
[size] <0xE1>
0xE11F
Hide Off for Conversions
<225 (0xE1)> <31 (0x1F)> [size = 10] <flags = 3 (encased function)>
[size of non-deletable information = 0]
[size] <0xE1>
0xE120 - Added for WP 7.0
IntelliTag Start Tag
<225 (0xE1)> <32 (0x20)> [size = variable] <flags = (0 or PRFXID) + 2
(encased/paired function)>
<number of PIDs = 1>
[tag with attributes parent PID (type=0x46)]
[size of non-deletable information = variable]
[tag name] x ?
<undocumented deletable data> x ?
[size] <0xE1>
0xE121 - Added for WP 7.0
IntelliTag Start Tag End Marker
<225 (0xE1)> <33 (0x21)> [size = 10] <flags = 3 (encased function)>
[size of non-deletable information = 0]
[size] <0xE1>
0xE122 - Added for WP 7.0
IntelliTag End Tag
<225 (0xE1)> <34 (0x22)> [size = variable] <flags = 2 (encased/paired
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xE1>
0xE123 - Added for WP 7.0
IntelliTag End Tag End Marker
<225 (0xE1)> <35 (0x23)> [size = 10] <flags = 3 (encased function)>
[size of non-deletable information = 0]
[size] <0xE1>
0xE124 - Added for WP 7.0
IntelliTag Character Reference
<225 (0xE1)> <36 (0x24)> [size = 12] <flags = 3 (encased function)>
[size of non-deletable information = 1]
<reference number>
[size] <0xE1>
0xE125 - Added for WP 7.0
IntelliTag Character Reference End Marker
<225 (0xE1)> <37 (0x25)> [size = variable] <flags = 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xE1>
0xE126 - Added for WP 7.0
IntelliTag Entity Reference
<225 (0xE1)> <38 (0x26)> [size = variable] <flags = (0 or PRFXID) + 3
(encased function)>
<number of PIDs = 1>
[tag with attributes parent PID (type=0x46)]
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xE1>
0xE127 - Added for WP 7.0
IntelliTag Entity Reference End Marker
<225 (0xE1)> <39 (0x27)> [size = variable] <flags = 0 or 3 (encased
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xE1>
0xE128 - Added for WP 7.0
IntelliTag Ignore Content
<225 (0xE1)> <40 (0x28)> [size = variable] <flags = 1 (simple paired
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xE1>
0xE129 - Added for WP 7.0
IntelliTag End Ignore Content
<225 (0xE1)> <41 (0x29)> [size = variable] <flags = 1 (simple paired
function)>
[size of non-deletable information = 0]
<undocumented deletable data> x ?
[size] <0xE1>
Function 226 (0xE2) = Formatter Group
The formatter group subfunctions have character orientation.
This group is platform dependent and formatter specific, and is undocumented. WordPerfect
rebuilds the group when a document is retrieved or opened. Developers should use the size word
to skip over any 0xE2 function codes.
<226 (0xE2)> formatter group function
<0 (0x00) to 255 (0xFF)>
[size = variable] size of function code
<undocumented data> x ?
[size] <0xE2>
Table Formulas
Table formula codes and their operation are shown below. These codes are used by
New Cell
Formula (function 0xD0 subfunction 0x81) and Floating Cell Begin (function
0xD4 subfunction
0x44) in Variable-Length Multi-Byte Functions. Values are shown in decimal. All
string lengths
are 16-bit values. All strings are WP word strings, except code 30, which is a byte string. The
expression "cell#" denotes "row, column" where row and column are each signed 16-bit
numbers.
Formula Format
Formula Code
| Description
| Length
| [1]
| "+" add/concatenate
| 1 byte
| [2]
| "" subtract/string strip
| 1 byte
| [3]
| "*" multiply
| 1 byte
| [4]
| "/" divide
| 1 byte
| [5]
| "" unary minus
| 1 byte
| [6]
| "%" percent
| 1 byte
| [7]
| SUM( )
| 1 byte
| [8,string w/length]
| number constant
| 1 byte + string
| [9,string w/length]
| string constant
| 1 byte + string
| [10,string w/length]
| name reference
| 1 byte + string
| [11]
| "^" power
| 1 byte
| [12,function#]
| group 1 functions
| 2 bytes
| [13,function#]
| group 2 functions
| 2 bytes
| [14,dir,cnt,type,27,cell#]
| "+" shortcut code
| 9 bytes
| [15]
| "%" modulus
| 1 byte
| [16]
| "!" not
| 1 byte
| [17]
| "&" and
| 1 byte
| [18]
| "|" or
| 1 byte
| [19]
| "^^" xor
| 1 byte
| [20]
| IF ( )
| 1 byte
| [21,function#]
| compare
| 2 bytes
| [21,1]
| "=" equal
| [21,2]
| "<>" not equal
| [21,3]
| ">" greater than
| [21,4]
| ">=" greater than or equal
| [21,5]
| "<" less than
| [21,6]
| "<=" less than or equal
| [22]
| "," comma
| 1 byte
| [23]
| "(" left parenthesis
| 1 byte
| [24]
| ")" right parenthesis
| 1 byte
| [25,space#]
| space(s)
| 2 bytes
| [26,string w/length]
| formula error
| 1 byte + string
| not used[27,cell#]
| cell reference
| 5 bytes
| not used[28,cell#,cell#]
| range reference
| 9 bytes
| [29]
| "!=" not equal
| 1 byte
| [30,fp,byte string w/len]
| floating point constant
| 9 bytes + string
| [31,argument number]
| user argument reference
| 2 bytes
| [32,string w/length]
| user function call
| 1 byte + string
| [33,temp#,string w/length]
| temp function definition
| 2 bytes + string
| [34,temp#,string w/length]
| temp function
| 2 bytes + string
| [35]
| floating point constant 0.0
| 1 byte
| [36]
| "{" left brace
| 1 byte
| [37]
| "}" right brace
| 1 byte
| [38]
| "!" factorial
| 1 byte
| [39]
| "<" lookup operator
| 1 byte
| [40]
| ">" lookup operator
| 1 byte
| [41,WP attribute#]
| attribute on
| 2 bytes
| [42,WP attribute#]
| attribute off
| 2 bytes
| [43,WP attribute mask]
| total attribute mask
| 3 bytes
| [44]
| conditional attribute
| 1 byte
| [45]
| * (assumed)
| 1 byte
| For codes 48-67:
bit 0 set if absolute col (bottom-right cell of range)
bit 1 set if absolute row (bottom-right cell of range)
bit 2 set if absolute col (top-left cell in range)
bit 3 set if absolute row (top-left cell in range)
| [48-63,cell#,cell#]
| range reference
| 9 bytes
| [64-67,cell#]
| cell reference
| 5 bytes |
Function Number Values for Code 12
1
| MINUS
| 8
| AND
| 15
| ISNA
| 2
| ABS
| 9
| OR
| 16
| TIME
| 3
| INT
| 10
| AVE
| 17
| DATE
| 4
| SIGN
| 11
| COUNT
| 18
| FACT
| 5
| NOT
| 12
| MIN
| 19
| ROW
| 6
| TRUE
| 13
| MAX
| 20
| COLUMN
| 7
| FALSE
| 14
| NA
| |
Function Number Values for Code 13
1
| POWER
| 28
| MDY
| 55
| BLOCK
| 2
| LN
| 29
| MONTH
| 56
| CURSOR
| 3
| LOG
| 30
| DAY
| 57
| DDB
| 4
| SQRT
| 31
| YEAR
| 58
| SLN
| 5
| PI
| 32
| DATETEXT
| 59
| SYD
| 6
| EXP
| 33
| DATEVALUE
| 60
| RATE
| 7
| SIN
| 34
| VAR
| 61
| STATUS
| 8
| COS
| 35
| RANDOM
| 62
| FOREACH
| 9
| TAN
| 36
| CURRENCY
| 63
| DEGREES
| 10
| MOD
| 37
| ITERATION
| 64
| HOUR
| 11
| ASIN
| 38
| ISVALUE
| 65
| MINUTE
| 12
| ACOS
| 39
| ISTEXT
| 66
| SECOND
| 13
| ATAN
| 40
| REPLACE
| 67
| HMS
| 14
| TERM
| 41
| RADIANS
| 68
| TIMETEXT
| 15
| PV
| 42
| CELL
| 69
| TIMEVALUE
| 16
| PMT
| 43
| SUBTRACT
| 70
| PRODUCT
| 17
| FV
| 44
| IRR
| 71
| QUOTIENT
| 18
| NPV
| 45
| FIND
| 72
| VARP
| 19
| LOOKUP
| 46
| LEFT
| 73
| STDEVP
| 20
| INDEX
| 47
| RIGHT
| 74
| ATAN2
| 21
| ROUND
| 48
| UPPER
| 75
| MATCH
| 22
| STDEV
| 49
| LOWER
| 76
| MATCH2
| 23
| CONCEDE
| 50
| PROPER
| 77
| LOOKUP2
| 24
| MID
| 51
| CHAR
| 78
| LINK
| 25
| LENGTH
| 52
| CODE
| 79
| ISERR
| 26
| VALUE
| 53
| TRIM
| 80
| ISERR2
| 27
| TEXT
| 54
| REPEAT
| 81
| CHOOSE |
Order of Operator Execution
Operator
| Associativity
| Level
| ! (factorial), % (percent)
| left to right
| immediate
| ! (not), (negate)
| right to left
| 16
| ^
| left to right
| 15
| *, /, % (modulus)
| left to right
| 14
| +, (subtract)
| left to right
| 13
| <<, >>
| left to right
| 12 (n/a)
| <, <=, >, >=
| left to right
| 11
| =, <> (or !=)
| left to right
| 10
| && (or &)
| left to right
| 9
| ^^
| left to right
| 8
| || (or |)
| left to right
| 7
| ?;
| right to left
| 6 (n/a)
| :=
| right to left
| 5
| ( )
| left to right
| 4
| ,
| left to right
| 3 |

|