WrapTrailSpaces class

Office 2013 and later

Line Wrap Trailing Spaces. When the object is serialized out as xml, its qualified name is w:wrapTrailSpaces.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

No code example is currently available or this language may not be supported.

[ISO/IEC 29500-1 1st Edition]

wrapTrailSpaces (Line Wrap Trailing Spaces)

This element specifies whether applications shall perform line wrapping on trailing spaces in the contents of a line when displaying in it a paragraph. Trailing spaces are all space characters which are not followed by non-space characters on the same line.

Typically, applications do not line wrap trailing spaces, instead allowing an unbounded number of trailing spaces on a line, with the next non-space character starting at the first character position on the next line. This element, when present with a val attribute value of true (or equivalent), specifies that all characters, including trailing spaces, shall be line wrapped normally.

[Example: Consider a WordprocessingML document with the following paragraph of text, including a long interstitial of spaces which become trailing spaces when the paragraph is displayed:

<w:r>
  <w:t> This is some text followed by a long number of trailing spaces.
                                                                                                                                                             And some more text.</w:t>
</w:r>

The default presentation would not wrap those trailing spaces, so the text at the end of the run would begin at the first character position on the second line:

However, if this compatibility setting is turned on:

<w:compat>
  <w:wrapTrailSpaces />
</w:compat>

Then all trailing spaces would be handled as regular characters when line wrapping, resulting in the following output:

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.

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