NoExtraLineSpacing class

Office 2013 and later

Do Not Center Content on Lines With Exact Line Height. When the object is serialized out as xml, its qualified name is w:noExtraLineSpacing.

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

public class NoExtraLineSpacing : OnOffType

[ISO/IEC 29500-1 1st Edition]

noExtraLineSpacing (Do Not Center Content on Lines With Exact Line Height)

This element specifies whether an exact line height using the spacing element (Part 1, § in the paragraph’s properties, each line shall not be automatically centered within the given amount of line spacing.

Typically, if the exact amount of spacing allotted to a line via the paragraph properties exceeds the amount of space required by that line, then the line of text shall be automatically centered when the text of the document is displayed. This element, when present with a val attribute value of true (or equivalent), specifies thatall additional spacing shall instead be placed below the normal layout of the line of text.

[Example: Consider a WordprocessingML document with a line with an exact height of 32 points:

    <w:spacing w:line="640" w:lineRule="exact" />
    <w:t>This is text on a line that's exactly 32 points high.</w:t>

The default presentation would have the resulting text centered on that line:

However, if this compatibility setting is turned on:

  <w:noExtraLineSpacing />

Then all line spacing is added after the text, resulting in the following output:

end example]

Parent Elements

compat (Part 1, §

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.