Please enable JavaScript to view this site.

 

This topic covers the implementation details of TxChangeStruct.

 

The linked internal-structure entry uses the XML identifier xTextActionsAttributes; the implementing Pascal type is TxChangeStruct.

 

Scope: cvtXtensions.pas; record. Prepared from the curated implementation supplied for this review on 2 October 2026.

 

Emits rec_type=xTextActionsAttributes. Text, Font, Size and Style have Modify flags; selecting a payload is separate from setting its value.

 

Simple SaraStyleOption IDs 0–12 are emitted only for Set=0 or NotSet=1; omission initializes them to Either=2. Numeric SaraStyleValue IDs 13–21 are enabled by their presence. Color is a nested record, not numeric value ID 22.

 

Kern value 1 is labelled Metrics and 2 Optical by the writer. Other values are labelled Fixed. StyleName attributes are descriptive labels; the reader selects using id. Advanced paragraph/shade/frame/stroke/named-style records have their own selectors.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

Literal rec_type values emitted within these routines: xTextActionsAttributes. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.

 

Structures used directly by this XML implementation:

 

TCmyk

TParagraphAttributesRec

TStylesAttributesRec

TTextFrameRec

TTextShadeRec

TTextStrokeRec

 

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.

 

Text/Modify

 

XML representation: The text of the Modify element.

 

Initial value: false (TxChangeStruct.Initialize).

 

Reading: Reads the element into Modify[saText] when the record node exists.

 

Writing: Stores true or false according to true when Modify[saText] is true.

 

Text/TextValue

 

XML representation: The text of the TextValue element.

 

Initial value: an empty string (TxChangeStruct.Initialize).

 

Reading: Reads the element into s when the record node exists. Before this read, s is set to an empty string.

 

Writing: Stores Text when Modify[saText] is true.

 

Font/Modify

 

XML representation: The text of the Modify element.

 

Initial value: false (TxChangeStruct.Initialize).

 

Reading: Reads the element into Modify[saFont] when the record node exists.

 

Writing: Stores true or false according to true when Modify[saFont] is true.

 

Font/FontName

 

XML representation: The text of the FontName element.

 

Initial value: “Arial” (TxChangeStruct.Initialize).

 

Reading: Reads the element into Font when the record node exists.

 

Writing: Stores Font when Modify[saFont] is true.

 

Size/Modify

 

XML representation: The text of the Modify element.

 

Initial value: false (TxChangeStruct.Initialize).

 

Reading: Reads the element into Modify[saSize] when the record node exists.

 

Writing: Stores true or false according to true when Modify[saSize] is true.

 

Size/PtSize

 

XML representation: The text of the PtSize element.

 

Initial value: 1200 (TxChangeStruct.Initialize).

 

Reading: Reads the element into Size when the record node exists.

 

Writing: Stores the numeric value of Size when Modify[saSize] is true.

 

Style/Modify

 

XML representation: The text of the Modify element.

 

Initial value: false (TxChangeStruct.Initialize).

 

Reading: Reads the element into Modify[saStyle] when the record node exists; node2 exists.

 

Writing: Stores true or false according to true when Modify[saStyle] is true.

 

Style/SaraStyleOptions/SaraStyleOption[@id={ord (i).toString}]

 

XML representation: The text of the SaraStyleOption[@id={ord (i).toString}] element.

 

Reading: Reads the element into Style[i] when the record node exists; node2 exists; node3 exists; for each item in i in TSaraStyleOptionsSimple. Before this read, Style[i] is set to sssEither (2).

 

Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.

 

Style/SaraStyleValues/SaraStyleValue[@id={ord (i).toString}]

 

XML representation: The text of the SaraStyleValue[@id={ord (i).toString}] element.

 

Reading: Converts the stored text to a number and assigns it to StyleValue[i] when the record node exists; node2 exists; node3 exists; for each item in i in TSaraStyleOptionsValues; node4 exists.

 

Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.

 

@rec_type

 

XML representation: The rec_type attribute.

 

Writing: Stores the literal text “xTextActionsAttributes” whenever the writer reaches this field.

 

Style/SaraStyleOptions/SaraStyleOption[@id={ord (i).toString}]/@id

 

XML representation: The id attribute.

 

Writing: Stores the text representation of ord (i) when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsSimple; Style[i] is one of [sssSet, sssNotSet].

 

Style/SaraStyleOptions/SaraStyleOption[@id={ord (i).toString}]/@StyleName

 

XML representation: The StyleName attribute.

 

Writing: Stores TSaraStyleOptionsNames[ord (i)] when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsSimple; Style[i] is one of [sssSet, sssNotSet].

 

Style/SaraStyleOptions/SaraStyleOption[@id={ord (i).toString}][@StyleName={TSaraStyleOptionsNames [ord (i)]}]

 

XML representation: The text of the SaraStyleOption[@id={ord (i).toString}][@StyleName={TSaraStyleOptionsNames [ord (i)]}] element.

 

Writing: Stores the numeric value of Style[i] (see the value table below) when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsSimple; Style[i] is one of [sssSet, sssNotSet].

 

Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.

 

Style/SaraStyleValues/SaraStyleValue[@id={ord (i).toString}]/@id

 

XML representation: The id attribute.

 

Writing: Stores the text representation of ord (i) when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0).

 

Style/SaraStyleValues/SaraStyleValue[@id={ord (i).toString}]/@StyleName

 

XML representation: The StyleName attribute.

 

Writing: Stores TSaraStyleOptionsNames[ord (i)] when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0); i is not ssoKern (15).

 

Writing: Stores the literal text “Kern-Metrics” when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0); i is ssoKern (15); StyleValue[i] is 1.

 

Writing: Stores the literal text “Kern-Optical” when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0); i is ssoKern (15); StyleValue[i] is not 1; StyleValue[i] is 2.

 

Writing: Stores the literal text “Kern-Fixed” when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0); i is ssoKern (15); StyleValue[i] is not 1; StyleValue[i] is not 2.

 

Style/SaraStyleValues/SaraStyleValue[@id={ord (i).toString}][@StyleName={TSaraStyleOptionsNames [ord (i)]}]

 

XML representation: The text of the SaraStyleValue[@id={ord (i).toString}][@StyleName={TSaraStyleOptionsNames [ord (i)]}] element.

 

Writing: Stores the numeric value of StyleValue[i] when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0).

 

Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.

 

Style/SaraStyleValues/SaraStyleValue[@id={ord (i).toString}][@StyleName=Kern-Metrics]

 

XML representation: The text of the SaraStyleValue[@id={ord (i).toString}][@StyleName=Kern-Metrics] element.

 

Writing: Stores the numeric value of StyleValue[i] when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0).

 

Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.

 

Style/SaraStyleValues/SaraStyleValue[@id={ord (i).toString}][@StyleName=Kern-Optical]

 

XML representation: The text of the SaraStyleValue[@id={ord (i).toString}][@StyleName=Kern-Optical] element.

 

Writing: Stores the numeric value of StyleValue[i] when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0).

 

Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.

 

Style/SaraStyleValues/SaraStyleValue[@id={ord (i).toString}][@StyleName=Kern-Fixed]

 

XML representation: The text of the SaraStyleValue[@id={ord (i).toString}][@StyleName=Kern-Fixed] element.

 

Writing: Stores the numeric value of StyleValue[i] when Modify[saStyle] is true; for each item in i in TSaraStyleOptionsValues; Style[i] is sssSet (0).

 

Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.

 

Nested records and repeated elements

 

Operation

XML location

When it is processed

Read Color

Style/Color

the record node exists; node2 exists; node3 exists

Read ShadeRec

Style/ShadeRec

the record node exists; node2 exists; node3 exists

Read FrameRec

Style/FrameRec

the record node exists; node2 exists; node3 exists

Read StrokeRec

Style/StrokeRec

the record node exists; node2 exists; node3 exists

Read ParaAttr

Paragraph/ParaAttr

the record node exists; node2 exists; node3 exists

Read StylesAttr

Styles/StylesAttr

the record node exists; node2 exists; node3 exists

Write Color

Style/Color

Modify[saStyle] is true; Style[ssoColor] is sssSet (0)

Write ShadeRec

Style/ShadeRec

Modify[saStyle] is true; ShadeRec.DoesSomething is true

Write FrameRec

Style/FrameRec

Modify[saStyle] is true; FrameRec.DoesSomething is true

Write StrokeRec

Style/StrokeRec

Modify[saStyle] is true; StrokeRec.DoesSomething is true

Write ParaAttr

Paragraph/ParaAttr

ParaAttr.DoesSomething is true

Write StylesAttr

Styles/StylesAttr

StylesAttr.DoesSomething is true

 

Initialization and reset values

 

TxChangeStruct.Initialize

 

Setting or temporary variable

Initial value

When it is assigned

self

Default (TxChangeStruct)

Always

Modify[saText]

false

Always

Text

an empty string

Always

Modify[saFont]

false

Always

Font

“Arial”

Always

Modify[saSize]

false

Always

Size

1200

Always

Modify[saStyle]

false

Always

Style[i]

sssEither (2)

for each item in i in [low (TSaraStyleOption)..pred (ssoHorScale)]

Style[i]

sssNotSet (1)

for each item in i in [ssoHorScale..high (TSaraStyleOption)]

StyleValue[i]

0

for each item in i in [low (StyleValue)..high (StyleValue)]

StyleValue[ssoHorScale]

10000

Always

StyleValue[ssoVertScale]

10000

Always

StyleValue[ssoShade]

10000

Always

StyleValue[ssoOpacity]

10000

Always

 

This routine also calls Color.Initialize; ShadeRec.Initialize; FrameRec.Initialize; StrokeRec.Initialize; ParaAttr.Initialize; StylesAttr.Initialize. See Implementation for their order and any conditional calls.

 

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.

 

TSaraStyleSetting

 

Ordinal

Declared member

0

sssSet

1

sssNotSet

2

sssEither

3

sssToggle

 

TCombinedFrameShadeType

 

Ordinal

Declared member

0

cfsNone

1

cfsText

2

cfsBoxCreate

3

cfsBoxKeep

4

cfsBoxModify

5

cfsBoxDelete

 

TSaraAttr

 

Ordinal

Declared member

0

saText

1

saFont

2

saSize

3

saStyle

 

TSaraStyleOption

 

Ordinal

Declared member

0

ssoPlain

1

ssoBold

2

ssoItalic

3

ssoOutline

4

ssoShadow

5

ssoStrikeThru

6

ssoNonBreaking

7

ssoUnderline

8

ssoWordUnderline

9

ssoSmallCaps

10

ssoAllCaps

11

ssoSuperScript

12

ssoSubscript

13

ssoHorScale

14

ssoVertScale

15

ssoKern

16

ssoTrack

17

ssoBaseShift

18

ssoOpacity

19

ssoShade

20

ssoSkew

21

ssoLeading

22

ssoColor

 

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

Modify

array [saText..saStyle] of Boolean

member

FText_XXX

array [1..100] of Char

member

FFont_XXX

array [1..32] of Char

member

Text

string

member

Font

string

member

Size

Word

member

Color

TCmyk

member

Style

array [TSaraStyleOption] of TSaraStyleSetting

member

StyleValue

array [TssoRangeValues] of integer

member

ShadeRec

TTextShadeRec

member

FrameRec

TTextFrameRec

member

StrokeRec

TTextStrokeRec

member

ParaAttr

TParagraphAttributesRec

member

StylesAttr

TStylesAttributesRec

member

 

Implementation details

 

The Implementation toggle contains only TxChangeStruct 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.

 

Declaration

 

Implementation