DoNotSnapToGridInCell Class
Do Not Snap to Document Grid in Table Cells with Objects.When the object is serialized out as xml, its qualified name is w:doNotSnapToGridInCell.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.OnOffType
DocumentFormat.OpenXml.Wordprocessing.DoNotSnapToGridInCell
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class DoNotSnapToGridInCell _
Inherits OnOffType
'Usage
Dim instance As DoNotSnapToGridInCell
public class DoNotSnapToGridInCell : OnOffType
Remarks
[ISO/IEC 29500-1 1st Edition]
9.7.3.11 doNotSnapToGridInCell (Do Not Snap to Document Grid in Table Cells with Objects)
This element specifies whether a document grid defined using the docGrid element (Part 1, §17.6.5) shall be applied to the contents of table cells in that section which also contain floating objects. Note that the floating object shall be part of the cell, and simply not displayed over the cell due to its anchoring relative to another part of the document.
Typically, if a floating object is present in a table cell, then that setting shall have no impact on whether East Asian text in that cell is snapped to the document grid (as text is always snapped to the grid). This element, when present with a val attribute value of true (or equivalent), specifies that whenever a floating object is present in a table cell, that the cell's contents shall not be snapped to the document grid.
[Example: Consider a WordprocessingML document consisting of a single section, whose document grid settings specify that each page must be exactly 10 characters wide, as follows:
<w:sectPr> <w:docGrid w:type="snapTOCars" w:charSpace="146636" /> </w:sectPr>
If this document contains a table with a single cell, containing some text and a single floating shape, the contents of the cell are still snapped to the 10 characters per line character grid, as follows:
However, if this compatibility setting is turned on:
<w:compat> <w:doNotSnapToGridInCell /> </w:compat>
Then the presence of a floating object in each cell must result in the document grid setting being ignored, resulting in the following output:
The additional character pitch was still added to each character on the line, but those characters are no longer snapped to the document grid. 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.