Please enable JavaScript to view this site.

 

This topic covers the implementation details of TSloganRules.

 

Scope: cpSlogans.pas; class derived from TBtnEditProperty. Prepared from the curated implementation supplied for this review on 2 October 2026.

 

The srInfo members select a slogan set, starting index, set type, skipped holidays lists, and formatting/picture-alignment overrides. SloganSetId is a database reference, not the serialized slogan data. Sentinel values and picture-alignment packing must be kept distinct from ordinary picture option enums.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

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

 

Inherited implementation: TBtnEditProperty. Follow it when the ordered behavior invokes inherited methods; inherited fields are not repeated as locally owned fields.

 

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.

 

SloganRules/srInfo[@i={i.toString}]/SloganSetId

 

XML representation: The text of the SloganSetId element.

 

Initial value: PropValue (TSloganRules.Create).

 

Reading: Reads the element into aPropValue.srInfo[i].SetId when the record node exists; for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); node2 exists.

 

Writing: Stores the text representation of DataValue.srInfo[i].SetId when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/srInfo[@i={i.toString}]/StartIndex

 

XML representation: The text of the StartIndex element.

 

Initial value: PropValue (TSloganRules.Create).

 

Reading: Reads the element into aPropValue.srInfo[i].StartIndex when the record node exists; for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); node2 exists.

 

Writing: Stores the text representation of DataValue.srInfo[i].StartIndex when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/srInfo[@i={i.toString}]/SetType

 

XML representation: The text of the SetType element.

 

Initial value: PropValue (TSloganRules.Create).

 

Reading: Reads the element into aPropValue.srInfo[i].SetType when the record node exists; for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); node2 exists.

 

Writing: Stores the text representation of Ord (DataValue.srInfo[i].SetType) when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/srInfo[@i={i.toString}]/SkipHolidaysLists

 

XML representation: The text of the SkipHolidaysLists element.

 

Initial value: PropValue (TSloganRules.Create).

 

Reading: Reads the element into aPropValue.srInfo[i].SkipHolidaysLists when the record node exists; for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); node2 exists.

 

Writing: Stores the text representation of DataValue.srInfo[i].SkipHolidaysLists when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/srInfo[@i={i.toString}]/FontForBold

 

XML representation: The text of the FontForBold element.

 

Reading: Reads the element into FontsForBold[i] when the record node exists; for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); node2 exists.

 

Writing: Stores FontsForBold[i] when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/srInfo[@i={i.toString}]/FontForItalics

 

XML representation: The text of the FontForItalics element.

 

Reading: Reads the element into FontsForItalics[i] when the record node exists; for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); node2 exists.

 

Writing: Stores FontsForItalics[i] when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/srInfo[@i={i.toString}]/PictureAlignmentOverride

 

XML representation: The text of the PictureAlignmentOverride element.

 

Reading: Reads the element into PictureAlignmentOverride[i] when the record node exists; for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); node2 exists.

 

Writing: Stores the text representation of PictureAlignmentOverride[i] when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/@rec_type

 

XML representation: The rec_type attribute.

 

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

 

SloganRules/srInfo[@i={i.toString}]/@rec_type

 

XML representation: The rec_type attribute.

 

Writing: Stores the literal text “TSloganRuleRec” when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

SloganRules/srInfo[@i={i.toString}]/@i

 

XML representation: The i attribute.

 

Writing: Stores the text representation of i when for each i from low (TSloganRulesInfo) through high (TSloganRulesInfo); DataValue.srInfo[i].SetId is greater than 0.

 

Initialization and reset values

 

TSloganRules.Create

 

Setting or temporary variable

Initial value

When it is assigned

PropName

“Slogans”

Always

Required

2

Always

PropValue.srInfo

Default (TSloganRulesInfo)

Always

DataValue

PropValue

Always

FontsForBold[i]

an empty string

for each i from 1 through MAX_NUM_SLOGANS

FontsForItalics[i]

an empty string

for each i from 1 through MAX_NUM_SLOGANS

PictureAlignmentOverride[i]

- 1

for each i from 1 through MAX_NUM_SLOGANS

 

This routine also calls inherited Create; self.FillDisplayValue. See Implementation for their order and any conditional calls.

 

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

FontsForBold

array [1..MAX_NUM_SLOGANS] of string

member

FontsForItalics

array [1..MAX_NUM_SLOGANS] of string

member

PictureAlignmentOverride

array [1..MAX_NUM_SLOGANS] of integer

member

 

Implementation details

 

The Implementation toggle contains only TSloganRules methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.

 

Implementation