Aspose::Words::BuildingBlocks::BuildingBlock class

BuildingBlock class

Represents a glossary document entry such as a Building Block, AutoText or an AutoCorrect entry. To learn more, visit the Aspose.Words Document Object Model (DOM) (https://docs.aspose.com/words/net/aspose-words-document-object-model/) documentation article.

class BuildingBlock : public CompositeNode

Methods

MethodDescription
Accept(System::SharedPtr<Aspose::Words::DocumentVisitor>) overrideAccepts a visitor.
AcceptEnd(System::SharedPtr<Aspose::Words::DocumentVisitor>) overrideAccepts a visitor for visiting the end of the BuildingBlock.
AcceptStart(System::SharedPtr<Aspose::Words::DocumentVisitor>) overrideAccepts a visitor for visiting the start of the BuildingBlock.
BuildingBlock(const System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument> &)Initializes a new instance of this class.
get_Behavior() constSpecifies the behavior that shall be applied when the contents of the building block is inserted into the main document.
get_Category() constSpecifies the second-level categorization for the building block.
get_Description() constGets or sets the description associated with this building block.
get_FirstSection()Gets the first section in the building block.
get_Gallery() constSpecifies the first-level categorization for the building block for the purposes of classification or user interface sorting.
get_Guid() constGets or sets an identifier (a 128-bit GUID) that uniquely identifies this building block.
get_LastSection()Gets the last section in the building block.
get_Name() constGets or sets the name of this building block.
get_NodeType() const overrideReturns the BuildingBlock value.
get_Sections()Returns a collection that represents all sections in the building block.
get_Type() constSpecifies the building block type.
set_Behavior(Aspose::Words::BuildingBlocks::BuildingBlockBehavior)Specifies the behavior that shall be applied when the contents of the building block is inserted into the main document.
set_Category(const System::String &)Specifies the second-level categorization for the building block.
set_Description(const System::String &)Sets the description associated with this building block.
set_Gallery(Aspose::Words::BuildingBlocks::BuildingBlockGallery)Specifies the first-level categorization for the building block for the purposes of classification or user interface sorting.
set_Guid(System::Guid)Sets an identifier (a 128-bit GUID) that uniquely identifies this building block.
set_Name(const System::String &)Sets the name of this building block.
set_Type(Aspose::Words::BuildingBlocks::BuildingBlockType)Specifies the building block type.
virtual AcceptEnd(System::SharedPtr<Aspose::Words::DocumentVisitor>)When implemented in a derived class, calls the VisitXXXEnd method of the specified document visitor.
virtual AcceptStart(System::SharedPtr<Aspose::Words::DocumentVisitor>)When implemented in a derived class, calls the VisitXXXStart method of the specified document visitor.
AppendChild(T)Adds the specified node to the end of the list of child nodes for this node.
GetChild(Aspose::Words::NodeType, int32_t, bool)Returns an Nth child node that matches the specified type.
GetChildNodes(Aspose::Words::NodeType, bool)Returns a live collection of child nodes that match the specified type.
GetEnumerator() overrideProvides support for the for each style iteration over the child nodes of this node.
GetText() overrideGets the text of this node and of all its children.
IndexOf(const System::SharedPtr<Aspose::Words::Node> &)Returns the index of the specified child node in the child node array.
InsertAfter(T, const System::SharedPtr<Aspose::Words::Node> &)Inserts the specified node immediately after the specified reference node.
InsertBefore(T, const System::SharedPtr<Aspose::Words::Node> &)Inserts the specified node immediately before the specified reference node.
PrependChild(T)Adds the specified node to the beginning of the list of child nodes for this node.
RemoveAllChildren()Removes all the child nodes of the current node.
RemoveChild(T)Removes the specified child node.
RemoveSmartTags()Removes all SmartTag descendant nodes of the current node.
SelectNodes(const System::String &)Selects a list of nodes matching the XPath expression.
SelectSingleNode(const System::String &)Selects the first Node that matches the XPath expression.
get_Count()Gets the number of immediate children of this node.
get_FirstChild() constGets the first child of the node.
get_HasChildNodes()Returns true if this node has any child nodes.
get_IsComposite() overrideReturns true as this node can have child nodes.
get_LastChild() constGets the last child of the node.
virtual Accept(System::SharedPtr<Aspose::Words::DocumentVisitor>)Accepts a visitor.
Clone(bool)Creates a duplicate of the node.
GetAncestor(Aspose::Words::NodeType)Gets the first ancestor of the specified NodeType.
virtual GetText()Gets the text of this node and of all its children.
NextPreOrder(const System::SharedPtr<Aspose::Words::Node> &)Gets next node according to the pre-order tree traversal algorithm.
static NodeTypeToString(Aspose::Words::NodeType)A utility method that converts a node type enum value into a user friendly string.
PreviousPreOrder(const System::SharedPtr<Aspose::Words::Node> &)Gets the previous node according to the pre-order tree traversal algorithm.
Remove()Removes itself from the parent.
ToString(Aspose::Words::SaveFormat)Exports the content of the node into a string in the specified format.
ToString(const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &)Exports the content of the node into a string using the specified save options.
get_CustomNodeId() constSpecifies custom node identifier.
virtual get_Document() constGets the document to which this node belongs.
virtual get_IsComposite()Returns true if this node can contain other nodes.
get_NextSibling()Gets the node immediately following this node.
virtual get_NodeType() constGets the type of this node.
get_ParentNode()Gets the immediate parent of this node.
get_PreviousSibling()Gets the node immediately preceding this node.
get_Range()Returns a Range object that represents the portion of a document that is contained in this node.
set_CustomNodeId(int32_t)Specifies custom node identifier.

Remarks

BuildingBlock can contain only Section nodes.

BuildingBlock can only be a child of GlossaryDocument.

You can create new building blocks and insert them into a glossary document. You can modify or delete existing building blocks. You can copy or move building blocks between documents. You can insert content of a building block into a document.

Corresponds to the docPart, docPartPr and docPartBody elements in OOXML.

See Also