Please enable JavaScript to view this site.

 

This topic covers the implementation details of xTextActions.

 

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

 

Use_sRESULT selects whether to replace with nothing, sResult, supplied text, or another supported mode as shown in the writer branches. Attributes can be suppressed or modified according to that mode.

 

ApplyFormatTo is a six-value enum: Token, CellBox, Column, Row, ColAndRow, Table (0–5). An older comment lists only five and is stale. Legacy ApplyFont/Size/StyleEntireText booleans are converted when ApplyFormatTo is absent.

 

Overprint uses TSaraStyleSetting. The writer can change Attributes.Modify[saText] while choosing its output branch; serialization is not necessarily a read-only traversal of this object.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

Literal rec_type values emitted within these routines: xTextActions. 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:

 

TStylesAttributesRec

TxChangeStruct

 

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.

 

Use_sRESULT

 

XML representation: The text of the Use_sRESULT element.

 

Initial value: 1 (xTextActions.Initialize).

 

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

 

Writing: Stores the numeric value of Use_sRESULT whenever the writer reaches this field.

 

UseFontToDisplay

 

XML representation: The text of the UseFontToDisplay element.

 

Initial value: false (xTextActions.Initialize).

 

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

 

Writing: Stores true or false according to UseFontToDisplay when Use_sRESULT is 1; Attributes.Modify[saFont] is true.

 

Writing: Stores true or false according to UseFontToDisplay when Use_sRESULT is 2; Attributes.Modify[saFont] is true.

 

ReplaceEntireText

 

XML representation: The text of the ReplaceEntireText element.

 

Initial value: false (xTextActions.Initialize).

 

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

 

Writing: Stores true or false according to ReplaceEntireText when Use_sRESULT is 0.

 

Writing: Stores true or false according to ReplaceEntireText when Use_sRESULT is 1.

 

Writing: Stores true or false according to ReplaceEntireText when Use_sRESULT is 2.

 

Writing: Stores true or false according to ReplaceEntireText when Use_sRESULT is 3.

 

ApplyFormatTo

 

XML representation: The text of the ApplyFormatTo element.

 

Initial value: afsToken (0) (xTextActions.Initialize).

 

Reading: Reads the element into FApplyFormatTo when the record node exists; the ApplyFormatTo child element exists.

 

Writing: Stores the text representation of ord (ApplyFormatTo) when Use_sRESULT is 1; (Attributes.Modify[saFont] is true or Attributes.Modify[saSize] is true or Attributes.Modify[saStyle] is true).

 

Writing: Stores the text representation of ord (ApplyFormatTo) when Use_sRESULT is 2; (Attributes.Modify[saFont] is true or Attributes.Modify[saSize] is true or Attributes.Modify[saStyle] is true).

 

ApplyFontToEntireText

 

XML representation: The text of the ApplyFontToEntireText element.

 

Reading: Reads the element into ApplyFontToEntireText_XXX when the record node exists; the ApplyFormatTo child element is absent.

 

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

 

ApplySizeToEntireText

 

XML representation: The text of the ApplySizeToEntireText element.

 

Reading: Reads the element into ApplySizeToEntireText_XXX when the record node exists; the ApplyFormatTo child element is absent.

 

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

 

ApplyStyleEntireText

 

XML representation: The text of the ApplyStyleEntireText element.

 

Reading: Reads the element into ApplyStyleEntireText_XXX when the record node exists; the ApplyFormatTo child element is absent.

 

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

 

Overprint

 

XML representation: The text of the Overprint element.

 

Initial value: sssEither (2) (xTextActions.Initialize).

 

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

 

Writing: Stores the text representation of ord (Overprint) when Overprint is not sssEither (2).

 

XtagsText

 

XML representation: The text of the XtagsText element.

 

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

 

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

 

Writing: Stores XtagsText when Use_sRESULT is 3.

 

@rec_type

 

XML representation: The rec_type attribute.

 

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

 

Nested records and repeated elements

 

Operation

XML location

When it is processed

Read Attributes

Attributes

the record node exists; node2 exists

Write Attributes

Attributes

Use_sRESULT is one of [1, 2]; Attributes.DoesSomething is true

Write Attributes

Attributes

Use_sRESULT is not one of [1, 2]; Use_sRESULT is 0; Attributes.StylesAttr.DoesSomething is true

 

Initialization and reset values

 

xTextActions.Initialize

 

Setting or temporary variable

Initial value

When it is assigned

self

Default (xTextActions)

Always

Use_sRESULT

1

Always

UseFontToDisplay

false

Always

ReplaceEntireText

false

Always

XtagsText

an empty string

Always

FOverprint

sssEither (2)

Always

FApplyFormatTo

afsToken (0)

Always

 

This routine also calls Attributes.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

 

TSaraAttr

 

Ordinal

Declared member

0

saText

1

saFont

2

saSize

3

saStyle

 

TApplyFormatSetting

 

Ordinal

Declared member

0

afsToken

1

afsCellBox

2

afsColumn

3

afsRow

4

afsColAndRow

5

afsTable

 

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

Attributes

TxChangeStruct

member

Use_sRESULT

Byte

member

UseFontToDisplay

Boolean

member

ReplaceEntireText

Boolean

member

ApplyFontToEntireText_XXX

Boolean

member

ApplySizeToEntireText_XXX

Boolean

member

ApplyStyleEntireText_XXX

Boolean

member

XtagsText

string

member

 

Implementation details

 

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