Compartir a través de


UseWord2002TableStyleRules Class

Emulate Word 2002 Table Style Rules.When the object is serialized out as xml, its qualified name is w:useWord2002TableStyleRules.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffType
        DocumentFormat.OpenXml.Wordprocessing.UseWord2002TableStyleRules

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

Syntax

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

Remarks

[ISO/IEC 29500-1 1st Edition]

9.7.3.54 useWord2002TableStyleRules (Incorrectly Display Top Border of Conditional Columns)

This element specifies whether applications should incorrectly calculate the top border of conditional columns (as specified by a tblStylePr element (Part 1, §17.7.6.6) with a type attribute value of firstCol, lastCol, band1Vert, or band2Vert) under the following conditions:

  • A conditional formatting has also been defined for the first row (a tblStylePr element with a type attribute of firstRow)

  • That conditional formatting as been applied to the table using the tblLook element (Part 1, §17.4.56)

Typically, table styles are applied according to the logic defined in Part 1, §17.7.2. This element, when present with a val attribute value of true (or equivalent), specifies that the top border of those conditionally formatted columns should instead be displayed as the top border of the following row.

[Example: Consider a WordprocessingML document with table style that defines two conditional formats:

The first column has a one point border

The first row has red shading

That style would be defined as follows:

<w:style w:type="table" w:customStyle="1" w:styleId="TableTest">
<w:name w:val="CompatibilitySetting"/>
<w:tblStylePr w:type="firstRow">
<w:tcPr>
<w:shd w:val="clear" w:color="auto" w:fill="FF0000"/>
</w:tcPr>
</w:tblStylePr>
<w:tblStylePr w:type="firstCol">
<w:tcPr>
<w:tcBorders>
<w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>
</w:tcBorders>
</w:tcPr>
</w:tblStylePr>
</w:style>

If the first column and first row formatting is applied, the table would appear as follows:

DocumentFormat.OpenXml.Wordprocessing.UseWord2002T

However, if this compatibility setting is turned on:

<w:compat>
<w:useWord2002TableStyleRules />
</w:compat>

Then the condition described by this element causes the top border defined by the conditional format for the first column to be displayed as the top border for the second column, resulting in the following output:

DocumentFormat.OpenXml.Wordprocessing.UseWord2002T

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

UseWord2002TableStyleRules Members

DocumentFormat.OpenXml.Wordprocessing Namespace