Table of Contents

Class StyleResolver

Namespace
DocWright.Layout
Assembly
DocWright.Layout.dll

Projects the mutable DOM into an immutable ResolvedDocument — the one bridge between editing and layout, and it is one-way. Resolution order follows ECMA-376 §17.7.2: document defaults, table style layers (with §17.7.6 conditional formatting per w:tblLook), paragraph style chain, numbering level properties, character style chain, then direct formatting; toggle properties get §17.7.3 XOR semantics. Theme fonts and colors resolve to concrete values; tracked changes are collapsed per RevisionView.

public static class StyleResolver
Inheritance
StyleResolver
Inherited Members

Remarks

Deliberate Word-observed deviation from the literal §17.7.2 ordering: numbering-level paragraph properties (indents) are applied AFTER the paragraph style chain, because Word lets a list level's indentation override the paragraph style's (see WORDQUIRKS.md). Direct formatting still overrides both.

Fields

MaxContainerNestingDepth

The hard ceiling on how deeply resolution will descend through nested containers — tables and content controls — regardless of MaxNestedTableDepth.

MaxSectionColumns

The largest section column count resolution will project, above which the surplus is dropped with a diagnostic.

Methods

Resolve(WordDocument, ResolveOptions?)

Resolves a document.

ResolveSpanFormatting(WordDocument, DocumentSpan, ResolveOptions?)

Resolves the formatting in effect over a span: for each paragraph it touches, the resolved paragraph properties, list numbering and mark formatting, and the resolved character properties of each piece of run content it covers (for an empty span, of the text typed there), equal to what Resolve(WordDocument, ResolveOptions?) gives the same content. It resolves the paragraphs of the span (and, for a paragraph in a table, that table's style), not the document.

ResolveStyleFormatting(WordDocument, string, ResolveOptions?)

Resolves what a style gives: the paragraph and run properties of an empty paragraph in a paragraph style, or of a run in a character style inside a paragraph of the default paragraph style, through the style's chain and the document defaults, with no direct formatting. This is what Word's Modify Style dialog shows.