SpacingInWholePoints class
Only Expand/Condense Text By Whole Points. When the object is serialized out as xml, its qualified name is w:spacingInWholePoints.
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.OnOffType
DocumentFormat.OpenXml.Wordprocessing.SpacingInWholePoints
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
[ISO/IEC 29500-1 1st Edition]
spacingInWholePoints (Only Expand/Condense Text By Whole Points)
This element specifies how applications should apply text expansion/compression defined using the spacing element (Part 1, §17.3.2.35) within a set of run properties.
Typically, as defined in the spacing element, text within runs in a WordprocessingML document can be expanded or compressed in increments of twentieths of a point. This element, when present with a val attribute value of true (or equivalent), specifies that the expansion and compression of text shall only be performed in increments of points. Any value which is not equal to an expansion or compression of a whole point shall be rounded down to the nearest whole point when the text is expanded/compressed within the WordprocessingML document.
[Example: Consider a WordprocessingML document with three paragraphs of text, each expanded by a varying amount, as follows:
<w:p>
… <w:r>
<w:t>This is text.</w:t>
</w:r>
</w:p>
<w:p>
… <w:r>
<w:rPr>
<w:spacing w:val="20" />
</w:rPr>
<w:t>This is text.</w:t>
</w:r>
</w:p>
<w:p>
… <w:r>
<w:rPr>
<w:spacing w:val="36" />
</w:rPr>
<w:t>This is text.</w:t>
</w:r>
</w:p>The default presentation would have each run of text expanded exactly as requested:
However, if this compatibility setting is turned on:
<w:compat> <w:spacingInWholePoints /> </w:compat>
Then the third line - with an expansion of 1.8 points - would instead be rounded down to the nearest whole number of points when expanded, resulting in the following output:
In the resulting output, the second and third lines are identical, as the third line has a next expansion of exactly one point. end example]
Parent Elements |
|---|
compat (Part 1, §17.15.1.21) |
This element’s content model is defined by the common boolean property definition in Part 1, §17.17.4.
© ISO/IEC29500: 2008.