<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).
<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:
Parent Elements |
---|
|
Attributes |
Description |
---|---|
|
Specifies a binary value for the property defined by the parent XML element. A value of A value of example:
<w:… w:val="off"/> The The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_OnOff">
<attribute name="val" type="ST_OnOff"/>
</complexType>