[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

autofitToFirstFixedWidthCell (Allow Table Columns To Exceed Preferred Widths of Constituent Cells)

This element specifies that when performing an AutoFit on a table in a WordprocessingML document in order to display it, applications shall alter that logic slightly in order to mimic the behavior of a previous word processing application.

Normally, the AutoFit behavior of a table is as is described in the associated simple type. This element, when present with a val attribute value of true (or equivalent), specifies that this logic shall be changed as follows:

If the width of a grid column in a table has been set by a preferred table cell width, then that column's width may be enlarged by the content of cells which themselves do not have a preferred width (in contrast, the normal logic never allows the content of cells to override a preferred width on a grid column).

[Example: Consider a WordprocessingML table with only one preferred cell width, a width of 720 points on the second cell in the first column, as follows:

<w:tbl>
<w:tr>
<w:tc>
<w:p/>
</w:tc>
<w:tc>
<w:p/>
</w:tc>
</w:tr>
<w:tr>
<w:tc>
<w:tcPr>
<w:tcW w:w="720" w:type="dxa" />
</w:tcPr>
<w:p/>
</w:tc>
<w:tc>
<w:p/>
</w:tc>
</w:tr>
</w:tbl>

The default presentation would have the first column constrained to 720 points by the preferred width of the second cell in the first column:

However, if this compatibility setting is turned on:

<w:compat>
<w:autofitToFirstFixedWidthCell />
</w:compat>

Then the column would be resized proportionally based on the content (ignoring the preferred width in that row), resulting in the following output:

end example]

Parent Elements

compat2.15.3.9)

 

Attributes

Description

val (On/Off Value)

Specifies a binary value for the property defined by the parent XML element.

 

A value of on, 1, or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted.

 

A value of off, 0, or false specifies that the property shall be explicitly turned off.

 

[Example: For example, consider the following on/off property:

 

<w:… w:val="off"/>

 

The val attribute explicitly declares that the property is turned off. end example]

 

The possible values for this attribute are defined by the ST_OnOff simple type2.18.67).

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

<complexType name="CT_OnOff">

   <attribute name="val" type="ST_OnOff"/>

</complexType>