This topic covers the implementation details of TStylesAttributesRec.
Scope: TypeDefinitions.pas; record. Prepared from the curated implementation supplied for this review on 2 October 2026.
Named CharStyleName, ParaStyleName, BoxStyleName, CellStyleName and TableStyleName refer to styles supplied by the target document/template. Their setters use fixed buffers and update internal used-style state.
These fields are not the comma-separated TmcTextStyle marker list. Empty names and whether an operation changes a style are defined by DoesSomething and the containing modification flags.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TStylesAttributesRec. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Exact XML fields and attributes
The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.
CharStyleName
XML representation: The text of the CharStyleName element.
Initial value: an empty string (TStylesAttributesRec.Initialize).
Reading: Reads the element into CharStyleName when the record node exists.
Writing: Stores CharStyleName when CharStyleName is not empty.
ParaStyleName
XML representation: The text of the ParaStyleName element.
Initial value: an empty string (TStylesAttributesRec.Initialize).
Reading: Reads the element into ParaStyleName when the record node exists.
Writing: Stores ParaStyleName when ParaStyleName is not empty.
BoxStyleName
XML representation: The text of the BoxStyleName element.
Initial value: an empty string (TStylesAttributesRec.Initialize).
Reading: Reads the element into BoxStyleName when the record node exists.
Writing: Stores BoxStyleName when BoxStyleName is not empty.
CellStyleName
XML representation: The text of the CellStyleName element.
Initial value: an empty string (TStylesAttributesRec.Initialize).
Reading: Reads the element into CellStyleName when the record node exists.
Writing: Stores CellStyleName when CellStyleName is not empty.
TableStyleName
XML representation: The text of the TableStyleName element.
Initial value: an empty string (TStylesAttributesRec.Initialize).
Reading: Reads the element into TableStyleName when the record node exists.
Writing: Stores TableStyleName when TableStyleName is not empty.
@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TStylesAttributesRec” whenever the writer reaches this field.
Initialization and reset values
TStylesAttributesRec.Initialize
Setting or temporary variable |
Initial value |
When it is assigned |
self |
Default (TStylesAttributesRec) |
Always |
UsedStyles |
an empty set |
Always |
CharStyleName |
an empty string |
Always |
ParaStyleName |
an empty string |
Always |
BoxStyleName |
an empty string |
Always |
CellStyleName |
an empty string |
Always |
TableStyleName |
an empty string |
Always |
Value namespaces used by this implementation
These are declared Pascal ordinal values. Use the ordinal only where the field serializer actually writes ord(...), an integer cast or an equivalent value. Set-marker strings and local option lists have their own representation; sentinel members in an enum are not automatically legal XML choices.
cvtAction
Ordinal |
Declared member |
0 |
cvaSubstituteRTF |
1 |
cvaStrReplace |
2 |
cvaChgColor |
3 |
cvaSetFrame |
4 |
cvaDelSingleTextBox |
5 |
cvaDelGroupTextBox |
6 |
cvaDelAllOnPageLayer |
7 |
cvaDelOutputPage |
8 |
cvaInsertImage |
9 |
cvaHighlightError |
10 |
cvaNeverDelete |
11 |
cvaBoxFit |
12 |
cvaBoxFitNEW |
13 |
cvaBoxBringToFront |
14 |
cvaBoxBringForward |
15 |
cvaBoxSendBackward |
16 |
cvaBoxSendToBack |
17 |
cvaVoluntaryQuarkCrash |
18 |
cvaDeleteCharsLeft |
19 |
cvaDeleteCharsRight |
20 |
cvaMoveToLayer |
21 |
cvaTextInBoxActionsMin |
22 |
cvatColCount |
23 |
cvatColGutter |
24 |
cvatInset |
25 |
cvatVAlign |
26 |
cvatBaseline |
27 |
cvaTextInBoxActionsMax |
28 |
cvaBoxActionsMin |
29 |
cvaSetBoxTOP |
30 |
cvaSetBoxBOTTOM |
31 |
cvaSetBoxHEIGHT |
32 |
cvaSetBoxLEFT |
33 |
cvaSetBoxRIGHT |
34 |
cvaSetBoxWIDTH |
35 |
cvaMoveBoxTOP |
36 |
cvaMoveBoxBOTTOM |
37 |
cvaMoveBoxLEFT |
38 |
cvaMoveBoxRIGHT |
39 |
cvaSetBoxHOR |
40 |
cvaSetBoxVERT |
41 |
cvaMoveBoxHOR |
42 |
cvaMoveBoxVERT |
43 |
cvaBoxActionsMax |
44 |
cvaBoxGrow |
45 |
cvaApplyStyleMin |
46 |
cvaApplyStyleChar |
47 |
cvaApplyStylePara |
48 |
cvaApplyStyleObj |
49 |
cvaApplyStyleCell |
50 |
cvaApplyStyleTable |
51 |
cvaApplyStyleMax |
Storage declarations relevant to interpretation
These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.
Name |
Declared type / bounds |
Kind |
UsedStyles |
set of cvtStyle |
member |
FCharStyleName |
array [1..50] of Char |
member |
FBoxStyleName |
array [1..50] of Char |
member |
FCellStyleName |
array [1..50] of Char |
member |
FTableStyleName |
array [1..50] of Char |
member |
FParaStyleName |
array [1..50] of Char |
member |
CharStyleName |
string |
property/accessor |
BoxStyleName |
string |
property/accessor |
CellStyleName |
string |
property/accessor |
TableStyleName |
string |
property/accessor |
ParaStyleName |
string |
property/accessor |
The Implementation toggle contains only TStylesAttributesRec methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.
Declaration reproduces this record’s complete declaration from the supplied source, including its fields, properties and method signatures.