2.2.14 ValueMod

A ValueMod can specify special modifications to a Value.

ValueMod =>
    58
  | 31
    int32[n-refs] int16*[n-refs]
    int32[n-subscripts] string*[n-subscripts]
    v1(00 (i1 | i2) 00? 00? int32 00? 00?)
    v3(count(TemplateString StylePair))

TemplateString => count((count((i0 (58 | 31 55))?) (58 | 31 string[id]))?)

StylePair =>
    (31 FontStyle | 58)
    (31 CellStyle | 58)

FontStyle =>
    bool[bold] bool[italic] bool[underline] bool[show]
    string[fg-color] string[bg-color]
    string[typeface] byte[size]

CellStyle =>
    int32[halign] int32[valign] double[decimal-offset]
    int16[left-margin] int16[right-margin]
    int16[top-margin] int16[bottom-margin]

A ValueMod that begins with “31” specifies special modifications to a Value.

Each of the n-refs integers is a reference to a Footnote (see Footnotes) by 0-based index. Footnote markers are shown appended to the main text of the Value, as superscripts or subscripts.

The subscripts, if present, are strings to append to the main text of the Value, as subscripts. Each subscript text is a brief indicator, e.g. ‘a’ or ‘b’, with its meaning indicated by the table caption. When multiple subscripts are present, they are displayed separated by commas.

The id inside the TemplateString, if present, is a template string for substitutions using the syntax explained previously. It appears to be an English-language version of the localized template string in the Value in which the Template is nested. A writer may safely omit the optional fixed data in TemplateString.

FontStyle and CellStyle, if present, change the style for this individual Value. In FontStyle, bold, italic, and underline control the particular style. show is ordinarily 1; if it is 0, then the cell data is not shown. fg-color and bg-color are strings in the format #rrggbb, e.g. #ff0000 for red or #ffffff for white. The empty string is occasionally observed also. The size is a font size in units of 1/128 inch.

In CellStyle, halign is 0 for center, 2 for left, 4 for right, 6 for decimal, 0xffffffad for mixed. For decimal alignment, decimal-offset is the decimal point’s offset from the right side of the cell, in pt (see Light Detail Member Format). valign specifies vertical alignment: 0 for center, 1 for top, 3 for bottom. left-margin, right-margin, top-margin, and bottom-margin are in pt.