LevelOverride Class

Numbering Level Definition Override.When the object is serialized out as xml, its qualified name is w:lvlOverride.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.LevelOverride

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

Syntax

声明
<ChildElementInfoAttribute(GetType(Level))> _
<ChildElementInfoAttribute(GetType(StartOverrideNumberingValue))> _
Public Class LevelOverride _
    Inherits OpenXmlCompositeElement
用法
Dim instance As LevelOverride
[ChildElementInfoAttribute(typeof(Level))]
[ChildElementInfoAttribute(typeof(StartOverrideNumberingValue))]
public class LevelOverride : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • StartOverrideNumberingValue <w:startOverride>

  • Level <w:lvl>

[ISO/IEC 29500-1 第 1 个版本]

17.9.9 lvlOverride (Numbering Level Definition Override)

This element specifies an optional override which shall be applied in place of zero or more levels from the abstract numbering definition for a given numbering definition instance. Each instance of this element is used to override the appearance and behavior of a given numbering level definition within the given abstract numbering definition.

[Example: Consider a numbering definition instance which inherits its information from the abstract numbering definition with abstractNumId of 4, but wishes to use a different set of properties for level 0 and level 1 of the numbering definition. The resulting WordprocessingML would look like:

<w:num w:numId="6">
<w:abstractNumId w:val="4" />
<w:lvlOverride w:ilvl="0">
<w:lvl w:ilvl="0">
<w:start w:val="4" />
<w:lvlText w:val="%1)" />
<w:lvlJc w:val="left" />
<w:pPr>
<w:ind w:left="360" w:hanging="360" />
</w:pPr>
</w:lvl>
</w:lvlOverride>
  <w:lvlOverride w:ilvl="1">
<w:lvl w:ilvl="1">
<w:start w:val="5" />
<w:lvlText w:val="%Test)" />
<w:lvlJc w:val="left" />
<w:pPr>
<w:ind w:left="360" w:hanging="360" />
</w:pPr>
</w:lvl>
</w:lvlOverride>
</w:num>

end example]

[Note: The ability to set level overrides optimizes use of numbering in WordprocessingML as it prevents writing out redundant abstract numbering definitions if numbering sets only slightly differ.

Consider using WordprocessingML to create two numbered sets that only differ only in the appearance and style of the first numbering level. Both could use the same abstract numbering definition as long as each references a different numbering definition instance with one of the numbering definition instances leveraging a level override for the first numbering level. Below is WordprocessingML that illustrates this:

<w:num w:numId="5">
<w:abstractNumId w:val="4" />
</w:num>
<w:num w:numId="6">
<w:abstractNumId w:val="4" />
<w:lvlOverride w:ilvl="0">
<w:lvl w:ilvl="0">
<w:start w:val="4" />
<w:lvlText w:val="%1)" />
<w:lvlJc w:val="left" />
<w:pPr>
<w:ind w:left="360" w:hanging="360" />
</w:pPr>
</w:lvl>
</w:lvlOverride>
</w:num>

end note]

Parent Elements

num (§17.9.16)

Child Elements

Subclause

lvl (Numbering Level Override Definition)

§17.9.6

startOverride (Numbering Level Starting Value Override)

§17.9.27

Attributes

Description

ilvl (Numbering Level ID)

Specifies the numbering level of a given abstract numbering definition to be overridden.

If this number conflicts with the ilvl of the child lvl element, then the latter shall be ignored.

[Example: Consider a numbering definition instance which inherits its information from the abstract numbering definition with abstractNumId of 4, but wishes to use a different set of properties for level 0 of the numbering definition. The resulting WordprocessingML would look like:

<w:num w:numId="6">
<w:abstractNumId w:val="4" />
<w:lvlOverride w:ilvl="0">
<w:lvl w:ilvl="0">
<w:start w:val="4" />
<w:lvlText w:val="%1)" />
<w:lvlJc w:val="left" />
<w:pPr>
<w:ind w:left="360" />
</w:pPr>
</w:lvl>
</w:lvlOverride>
</w:num>

This level overrides level 0 of the abstract numbering definition's level properties with the specified set of numbering properties, replacing those in the abstract numbering definition. end example]

The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10).

[Note: The W3C XML Schema definition of this element's content model (CT_NumLvl) is located in §A.1. end note]

© ISO/IEC29500: 2008. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,ISO 对此翻译不承担任何责任。

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

LevelOverride Members

DocumentFormat.OpenXml.Wordprocessing Namespace