Represents a table row.
Row can only be a child of a Table.
Row can contain one or more Cell nodes.
A minimal valid row needs to have at least one Cell.
Shows how to create a table.
Shows how to iterate through all tables in the document and print the contents of each cell.
Shows how to build a nested table without using a document builder.
#include <Aspose.Words.Cpp/Tables/Row.h>
Public Member Functions | |
Row (SharedPtr< DocumentBase > doc) | |
Initializes a new instance of the Row class. More... | |
bool | Accept (SharedPtr< DocumentVisitor > visitor) override |
Accepts a visitor. More... | |
void | EnsureMinimum () |
If the Row has no cells, creates and appends one Cell. More... | |
SharedPtr< CellCollection > | get_Cells () |
Provides typed access to the Cell child nodes of the row. More... | |
SharedPtr< Cell > | get_FirstCell () |
Returns the first Cell in the row. More... | |
bool | get_IsFirstRow () |
True if this is the first row in a table; false otherwise. More... | |
bool | get_IsLastRow () |
True if this is the last row in a table; false otherwise. More... | |
SharedPtr< Cell > | get_LastCell () |
Returns the last Cell in the row. More... | |
NodeType | get_NodeType () const override |
Returns NodeType.Row. More... | |
SharedPtr< Table > | get_ParentTable () |
Returns the immediate parent table of the row. More... | |
SharedPtr< RowFormat > | get_RowFormat () |
Provides access to the formatting properties of the row. More... | |
String | GetText () override |
Gets the text of all cells in this row including the end of row character. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | RemoveMoveRevisions () override |
![]() | |
SharedPtr< Node > | AppendChild (SharedPtr< Node > newChild) |
Adds the specified node to the end of the list of child nodes for this node. More... | |
SharedPtr< NodeCollection > | get_ChildNodes () |
Gets all immediate child nodes of this node. More... | |
SharedPtr< CompositeNode > | get_Container () override |
int32_t | get_Count () |
Gets the number of immediate children of this node. More... | |
SharedPtr< Node > | get_FirstChild () const |
Gets the first child of the node. More... | |
bool | get_HasChildNodes () |
Returns true if this node has any child nodes. More... | |
bool | get_IsComposite () override |
Returns true as this node can have child nodes. More... | |
SharedPtr< Node > | get_LastChild () const |
Gets the last child of the node. More... | |
SharedPtr< Node > | GetChild (NodeType nodeType, int32_t index, bool isDeep) |
Returns an Nth child node that matches the specified type. More... | |
SharedPtr< NodeCollection > | GetChildNodes (NodeType nodeType, bool isDeep) |
Returns a live collection of child nodes that match the specified type. More... | |
SharedPtr< Node > | GetCurrentNode () override |
SharedPtr< IEnumerator< SharedPtr< Node > > > | GetEnumerator () override |
Provides support for the for each style iteration over the child nodes of this node. More... | |
SharedPtr< Node > | GetNextMatchingNode (SharedPtr< Node > curNode) override |
int32_t | IndexOf (SharedPtr< Node > child) |
Returns the index of the specified child node in the child node array. More... | |
SharedPtr< Node > | InsertAfter (SharedPtr< Node > newChild, SharedPtr< Node > refChild) |
Inserts the specified node immediately after the specified reference node. More... | |
SharedPtr< Node > | InsertBefore (SharedPtr< Node > newChild, SharedPtr< Node > refChild) |
Inserts the specified node immediately before the specified reference node. More... | |
SharedPtr< Node > | PrependChild (SharedPtr< Node > newChild) |
Adds the specified node to the beginning of the list of child nodes for this node. More... | |
void | RemoveAllChildren () |
Removes all the child nodes of the current node. More... | |
SharedPtr< Node > | RemoveChild (SharedPtr< Node > oldChild) |
Removes the specified child node. More... | |
void | RemoveSmartTags () |
Removes all SmartTag descendant nodes of the current node. More... | |
SharedPtr< NodeList > | SelectNodes (String xpath) |
Selects a list of nodes matching the XPath expression. More... | |
SharedPtr< Node > | SelectSingleNode (String xpath) |
Selects the first Node that matches the XPath expression. More... | |
![]() | |
SharedPtr< Node > | Clone (bool isCloneChildren) |
Creates a duplicate of the node. More... | |
int32_t | get_CustomNodeId () const |
Specifies custom node identifier. More... | |
virtual SharedPtr< DocumentBase > | get_Document () const |
Gets the document to which this node belongs. More... | |
SharedPtr< Node > | get_NextSibling () |
Gets the node immediately following this node. More... | |
SharedPtr< CompositeNode > | get_ParentNode () |
Gets the immediate parent of this node. More... | |
SharedPtr< Node > | get_PreviousSibling () |
Gets the node immediately preceding this node. More... | |
SharedPtr< Range > | get_Range () |
Returns a Range object that represents the portion of a document that is contained in this node. More... | |
SharedPtr< CompositeNode > | GetAncestor (NodeType ancestorType) |
Gets the first ancestor of the specified NodeType. More... | |
template<typename T > | |
T | GetAncestorOf () |
SharedPtr< Node > | NextPreOrder (SharedPtr< Node > rootNode) |
Gets next node according to the pre-order tree traversal algorithm. More... | |
SharedPtr< Node > | PreviousPreOrder (SharedPtr< Node > rootNode) |
Gets the previous node according to the pre-order tree traversal algorithm. More... | |
void | Remove () |
Removes itself from the parent. More... | |
void | set_CustomNodeId (int32_t value) |
Setter for get_CustomNodeId. More... | |
String | ToString (SaveFormat saveFormat) |
Exports the content of the node into a string in the specified format. More... | |
String | ToString (SharedPtr< SaveOptions > saveOptions) |
Exports the content of the node into a string using the specified save options. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
![]() | |
static const TypeInfo & | Type () |
![]() | |
static String | NodeTypeToString (NodeType nodeType) |
A utility method that converts a node type enum value into a user friendly string. More... | |
static const TypeInfo & | Type () |
Aspose::Words::Tables::Row::Row | ( | System::SharedPtr< Aspose::Words::DocumentBase > | doc | ) |
Initializes a new instance of the Row class.
When Row is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Row to the document use InsertAfter or InsertBefore on the table where you want the row inserted.
doc | The owner document. |
Shows how to build a nested table without using a document builder.
|
overridevirtual |
Accepts a visitor.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
visitor | The visitor that will visit the nodes. |
Shows how to print the node structure of every table in a document.
Implements Aspose::Words::Node.
void Aspose::Words::Tables::Row::EnsureMinimum | ( | ) |
If the Row has no cells, creates and appends one Cell.
Shows how to ensure a row node contains the nodes we need to begin adding content to it.
System::SharedPtr<Aspose::Words::Tables::CellCollection> Aspose::Words::Tables::Row::get_Cells | ( | ) |
Provides typed access to the Cell child nodes of the row.
Shows how to iterate through all tables in the document and print the contents of each cell.
System::SharedPtr<Aspose::Words::Tables::Cell> Aspose::Words::Tables::Row::get_FirstCell | ( | ) |
Returns the first Cell in the row.
Shows how to print the node structure of every table in a document.
bool Aspose::Words::Tables::Row::get_IsFirstRow | ( | ) |
True if this is the first row in a table; false otherwise.
Shows how to print the node structure of every table in a document.
bool Aspose::Words::Tables::Row::get_IsLastRow | ( | ) |
True if this is the last row in a table; false otherwise.
Shows how to set a table to stay together on the same page.
System::SharedPtr<Aspose::Words::Tables::Cell> Aspose::Words::Tables::Row::get_LastCell | ( | ) |
Returns the last Cell in the row.
Shows how to print the node structure of every table in a document.
|
overridevirtual |
Returns NodeType.Row.
Shows how to traverse a composite node's tree of child nodes.
Implements Aspose::Words::Node.
System::SharedPtr<Aspose::Words::Tables::Table> Aspose::Words::Tables::Row::get_ParentTable | ( | ) |
Returns the immediate parent table of the row.
Shows how to print the node structure of every table in a document.
System::SharedPtr<Aspose::Words::Tables::RowFormat> Aspose::Words::Tables::Row::get_RowFormat | ( | ) |
Provides access to the formatting properties of the row.
Shows how to modify the format of rows and cells in a table.
Shows how to modify formatting of a table row.
|
overridevirtual |
Gets the text of all cells in this row including the end of row character.
Returns concatenated text of all child nodes with the end of row character ControlChar.Cell appended at the end.
The returned string includes all control and special characters as described in ControlChar.
Shows how to print the node structure of every table in a document.
Reimplemented from Aspose::Words::CompositeNode.
|
overridevirtual |
Reimplemented from Aspose::Words::CompositeNode.
|
overridevirtual |
Reimplemented from Aspose::Words::CompositeNode.
|
override |
|
static |