2.1.169 Part 1 Section 17.4.66, tcBorders (Table Cell Borders)

For additional notes that apply to this portion of the standard, please see the notes for tcPr, §17.7.6.9(b).

a.   The standard specifies a method for resolving border conflicts.

Word determines top, bottom, left, and right cell border for each cell as follows:

  • If the cell border is omitted or none (no border), find the cell border from the table style ("[ISO/IEC-29500-1] §17.7.6").

  • If the cell border is still not specified, find the appropriate border from the table-level border exceptions ("[ISO/IEC-29500-1] §17.4.39; tblBorders").

  • If the cell border is still not specified, find the appropriate border from the table-level borders ("[ISO/IEC-29500-1] §17.4.38; tblBorders").

If the cell spacing is nonzero as specified using the tblCellSpacing element ("[ISO/IEC-29500-1] §17.4.44; tblCellSpacing"), then all cell borders and outer table borders display.

If the cell spacing is zero, then there may be a conflict between two adjacent borders. In Office, this conflict is resolved using the following procedure:

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

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

Formula for border weight: weight of the border = border width times border number

The border width shall be specified in measurements of eighths of a point. The border number shall be determined by the following list. The borders with dotted and dashed styles shall be assigned the weight 1 regardless of the border width and number.

Border Number

single

1

thick

2

double

3

dotDash

8

dotDotDash

9

triple

10

thinThickSmallGap

11

thickThinSmallGap

12

thinThickThinSmallGap

13

thinThickMediumGap

14

thickThinMediumGap

15

thinThickThinMediumGap

16

thinThickLargeGap

17

thickThinLargeGap

18

thinThickThinLargeGap

19

wave

20

doubleWave

21

dashSmallGap

22

dashDotStroked

23

threeDEmboss

24

threeDEngrave

25

outset

26

inset

27

If the borders have an equal weight, then the higher of the two on this precedence list shall be displayed:

  • 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

If the borders have an identical style, then each border color shall be assigned a brightness value as follows:

Equation for brightness value: Brightness = R + B + 2  times G

The color with the smaller brightness value shall be displayed.

If the borders have an identical brightness value, then each border color shall be assigned a new brightness value as follows:

Equation for brightness value: Brightness = B + 2 times G

The color with the smaller brightness value shall be displayed.

If the borders have an identical brightness value, then each border color shall be assigned a brightness value as follows:

Equation for brightness value: Brightness = G

The color with the smaller brightness value shall be displayed.

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