SpacingInWholePoints Class

Only Expand/Condense Text By Whole Points.When the object is serialized out as xml, its qualified name is w:spacingInWholePoints.

Inheritance Hierarchy

System.Object
  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)

Syntax

'Declaration
Public Class SpacingInWholePoints _
    Inherits OnOffType
'Usage
Dim instance As SpacingInWholePoints
public class SpacingInWholePoints : OnOffType

Remarks

[ISO/IEC 29500-1 1st Edition]

9.7.3.37 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:

DocumentFormat.OpenXml.Wordprocessing.SpacingInWho

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:

DocumentFormat.OpenXml.Wordprocessing.SpacingInWho

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SpacingInWholePoints Members

DocumentFormat.OpenXml.Wordprocessing Namespace