[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

tcBorders (Table Cell Borders)

This element specifies the set of borders for the edges of the current table cell, using the eight border types defined by its child elements.

If the cell spacing for any row is non-zero as specified using the tblCellSpacing element (§2.4.41; §2.4.42; §2.4.43), then there is never a border conflict (as the non-zero cell spacing is applied above and beyond each individual cell border's width) and all table, table-level exception, and table cell borders shall be displayed.

If the cell spacing is zero, then there may be a conflict between two adjacent cell borders [Example: Between the left border of all cells in the second column and the right border of all cells in the first column of the table. end example], which shall be resolved as follows:

1. If either conflicting table cell border is nil or none (no border), then the opposing border shall be displayed.

1. If a cell border conflicts with a table border, the cell border always wins.

2. Each border shall then be assigned a weight using the following formula, and the border value using this calculation shall be displayed over the alternative border:

 

The border number shall be determined by this list:

single

1

thick

2

double

3

dotted

4

dashed

5

dotDash

6

dotDotDash

7

triple

8

thinThickSmallGap

9

thickThinSmallGap

10

thinThickThinSmallGap

11

thinThickMediumGap

12

thickThinMediumGap

13

thinThickThinMediumGap

14

thinThickLargeGap

15

thickThinLargeGap

16

thinThickThinLargeGap

17

wave

18

doubleWave

19

dashSmallGap

20

dashDotStroked

21

threeDEmboss

22

threeDEngrave

23

outset

24

inset

25

 

3. If the borders have an equal weight, than the higher of the two on this precedence list shall win:

single

thick

double

dotted

dashed

dotDash

dotDotDash

triple

thinThickSmallGap

thickThinSmallGap

thinThickThinSmallGap

thinThickMediumGap

thickThinMediumGap

thinThickThinMediumGap

thinThickLargeGap

thickThinLargeGap

thinThickThinLargeGap

wave

doubleWave

dashSmallGap

dashDotStroked

threeDEmboss

threeDEngrave

outset

inset

4. If the borders have an identical style, than each border color shall be assigned a brightness value as follows:
The color with the smaller brightness value shall win.

5. If the borders have an identical brightness value above, than each border color shall be assigned a new brightness value as follows:
The color with the smaller brightness value shall win.

6. If the borders have an identical brightness value above, than each border color shall be assigned a brightness value as follows:
The color with the smaller brightness value shall win.

7. If the borders have an identical brightness value above, then they are functionally identical, and the first border in reading order should be displayed.

[Example: Consider the following two cell table (with exaggerated table cell spacing for clarity):

 

 

 

If we collapse the cell spacing, there will be conflicting borders at all edges. For each cell/table border conflict, rule #2 says that the cell border shall win. For the conflict in the center between two cell borders, rule #3 gives us a larger border weight for the right cell's border, resulting in the following table:

 

 

end example]

If this element is omitted, then this table shall have the borders specified by the associated table style. If no borders are specified in the style hierarchy, then this table shall not have any table borders.

[Example: Consider a table whose first cell specifies cell-level borders consisting of a think double red line, as follows:

 

 

 

 

 

These cell borders are specified using the following WordprocessingML:

<w:tcPr>
<w:tcBorders>
<w:top w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>
<w:left w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>
<w:bottom w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>
<w:right w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>
</w:tcBorders>
</w:tcPr>

The tcBorders element specifies the set of borders applied to the first cell as a 3 point double border. end example]

Parent Elements

tcPr2.7.5.8); tcPr2.4.66); tcPr2.7.5.9); tcPr2.4.67)

 

Child Elements

Subclause

bottom (Table Cell Bottom Border)

§2.4.3

insideH (Table Cell Inside Horizontal Edges Border)

§2.4.18

insideV (Table Cell Inside Vertical Edges Border)

§2.4.19

left (Table Cell Left Border)

§2.4.24

right (Table Cell Right Border)

§2.4.30

tl2br (Table Cell Top Left to Bottom Right Diagonal Border)

§2.4.70

top (Table Cell Top Border)

§2.4.74

tr2bl (Table Cell Top Right to Bottom Left Diagonal Border)

§2.4.76

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_TcBorders">

   <sequence>

   <element name="top" type="CT_Border" minOccurs="0"/>

   <element name="left" type="CT_Border" minOccurs="0"/>

   <element name="bottom" type="CT_Border" minOccurs="0"/>

   <element name="right" type="CT_Border" minOccurs="0"/>

   <element name="insideH" type="CT_Border" minOccurs="0"/>

   <element name="insideV" type="CT_Border" minOccurs="0"/>

   <element name="tl2br" type="CT_Border" minOccurs="0"/>

   <element name="tr2bl" type="CT_Border" minOccurs="0"/>

   </sequence>

</complexType>