Table of Contents

Class ShapeTextBody

Namespace
DocWright.Dom
Assembly
DocWright.Dom.dll

The text body of a shape (wps:txbx/w:txbxContent or v:textbox/w:txbxContent). Blocks are live document content owned by the enclosing ShapeRef, so document-wide text extraction and visitor traversal see them.

public sealed class ShapeTextBody : DomNode
Inheritance
ShapeTextBody
Inherited Members
Extension Methods

Remarks

This is a DomNode, and that is the whole point of it. The shape tree above it -- ShapeNode, ShapeGroup, GeometryShape -- is geometry rather than document content and deliberately stays outside the node graph. But the blocks inside a text box are document content, and until Phase 44 they were the only block list in the DOM with no parent. That single missing edge made IsStale -- defined as Target.Parent is null -- report true for every tracked change in a text box, so GetRevisions() listed changes that Accept() and Reject() then refused to apply.

The text body is the parent rather than the ShapeRef because one shape tree can hold many text bodies, and a block's parent has to identify which list it belongs to for removal to work. Its own Parent is the hosting ShapeRef, which is what keeps OwnerDocument resolvable across the non-node shape tree in between.

Constructors

ShapeTextBody()

Initializes an empty text body.

Properties

Anchor

Gets or sets where text sits vertically in the inset box.

Blocks

Gets the block content of the text body.

Children

Gets this node's children in document order. Nodes without children return an empty list. The list is a live view; mutate through the typed collections (for example Inlines), not through this property.

Direction

Gets or sets which way the text body reads (a:bodyPr vert).

InsetBottom

Gets or sets the bottom inset (a:bodyPr bIns), or null for the 45720 EMU default.

InsetLeft

Gets or sets the left inset (a:bodyPr lIns), or null for the 91440 EMU default.

InsetRight

Gets or sets the right inset (a:bodyPr rIns), or null for the 91440 EMU default.

InsetTop

Gets or sets the top inset (a:bodyPr tIns), or null for the 45720 EMU default.

RightToLeft

Gets or sets whether the text body reads right-to-left (a:bodyPr rtlCol).

Methods

Accept(DomVisitor)

Dispatches to the visitor method for this node's concrete type.

Clone()

Creates a detached copy. Blocks are cloned through the DOM clone contract.

CloneCore()

Creates the deep copy for Clone(). Implementations copy all owned state, deep-clone children and copy unknown-XML islands.

RemoveChildCore(DomNode)

Removes child from this node's child collections.