Class DocumentSettings
Document-level settings that affect layout and text handling (the settings part, ECMA-376 Part 1 §17.15.1). Unknown settings are preserved as unknown-XML islands on this object.
public sealed class DocumentSettings : UnknownXmlHost
- Inheritance
-
DocumentSettings
- Inherited Members
Constructors
Properties
- AutoHyphenation
Gets or sets automatic hyphenation (w:autoHyphenation), or null.
- ClrSchemeMapping
Gets or sets the theme-color-name mapping (w:clrSchemeMapping). Never null.
- CompatSettings
Gets every w:compatSetting entry verbatim, in document order.
- CompatibilityMode
Gets or sets the OOXML compatibility mode from w:compat/w:compatSetting[name="compatibilityMode"], or null when the document does not state one. The resolver treats null as mode 15 and reports DXP1001 for explicit legacy modes (12/14), which are rendered with mode-15 behavior.
- ConsecutiveHyphenLimit
Gets or sets the maximum consecutive hyphenated lines (w:consecutiveHyphenLimit), or null.
- DecimalSymbol
Gets or sets the decimal separator used by decimal tabs (w:decimalSymbol), or null.
- DefaultTabStop
Gets or sets the interval of automatic tab stops (w:defaultTabStop), or null (Word default: 720 twips).
- DisplayBackgroundShape
Gets or sets whether the document background is painted (w:displayBackgroundShape), or null. Word stores the background colour on w:document/w:background but only shows it when this flag is on, so both are required before anything is drawn.
- DoNotUseHtmlParagraphAutoSpacing
Gets or sets whether w:compat/w:doNotUseHTMLParagraphAutoSpacing is present.
The element's name refers to the autospacing pair (w:beforeAutospacing / w:afterAutospacing), but Word applies it to explicit w:before and w:after too: with the flag clear it collapses a paragraph's space-after against the next paragraph's space-before to the larger of the two, and with it set it adds them. Word's RTF import sets the flag; its HTML import and a plain .docx do not. Measured as WQ-0024.
Null means the document did not state it, which the resolver treats as clear.
- EvenAndOddHeaders
Gets or sets distinct even/odd headers and footers (w:evenAndOddHeaders), or null.
- HyphenateCaps
Gets or sets whether capitalized words are hyphenated (w:doNotHyphenateCaps inverse), or null.
- HyphenationZone
Gets or sets the hyphenation zone width (w:hyphenationZone), or null.
- ListSeparator
Gets or sets the list separator (w:listSeparator), or null.
- MirrorMargins
Gets or sets mirrored margins for facing pages (w:mirrorMargins), or null.
- Protection
Gets or sets the document's protection settings (w:documentProtection and w:writeProtection). Never null; a document that recorded neither has a DocumentProtection whose HasDocumentProtection and HasWriteProtection are both false, and nothing is written for it.
These settings are modelled and round-tripped, never enforced. See DocumentProtection.
- ThemeFontLanguages
Gets or sets the default text languages (w:themeFontLang), or null.
Methods
- Clone()
Creates a deep copy.