Aspose::Words::Paragraph Class Reference

Represents a paragraph of text. More...

#include "Aspose.Words.Cpp/Model/Text/Paragraph.h"

Inherits Aspose::Words::CompositeNode, IParaAttrSource, IRunAttrSource, and ITrackableNode.

Public Member Functions

virtual Aspose::Words::NodeType get_NodeType () const
 Returns NodeType.Paragraph. More...
 
System::SharedPtr< Aspose::Words::Storyget_ParentStory ()
 Retrieves the parent section-level story that can be Aspose::Words::Body or Aspose::Words::HeaderFooter. More...
 
System::SharedPtr< Aspose::Words::Sectionget_ParentSection ()
 Retrieves the parent Aspose::Words::Section of the paragraph. More...
 
bool get_IsInCell ()
 True if this paragraph is an immediate child of Aspose::Words::Tables::Cell; false otherwise. More...
 
bool get_IsEndOfCell ()
 True if this paragraph is the last paragraph in a Aspose::Words::Tables::Cell; false otherwise. More...
 
bool get_BreakIsStyleSeparator ()
 True if this paragraph break is a Style Separator. A style separator allows one paragraph to consist of parts that have different paragraph styles. More...
 
bool get_IsEndOfSection ()
 True if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise. More...
 
bool get_IsEndOfHeaderFooter ()
 True if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise. More...
 
bool get_IsEndOfDocument ()
 True if this paragraph is the last paragraph in the last section of the document. More...
 
System::SharedPtr< Aspose::Words::ParagraphFormatget_ParagraphFormat ()
 Provides access to the paragraph formatting properties. More...
 
System::SharedPtr< Aspose::Words::ListFormatget_ListFormat ()
 Provides access to the list formatting properties of the paragraph. More...
 
System::SharedPtr< Aspose::Words::FrameFormatget_FrameFormat ()
 Provides access to the paragraph formatting properties. More...
 
System::SharedPtr< Aspose::Words::Lists::ListLabelget_ListLabel ()
 Gets a Aspose::Words::Paragraph::get_ListLabel object that provides access to list numbering value and formatting for this paragraph. More...
 
System::SharedPtr< Aspose::Words::RunCollectionget_Runs ()
 Provides access to the typed collection of pieces of text inside the paragraph. More...
 
System::SharedPtr< Aspose::Words::Fontget_ParagraphBreakFont ()
 Provides access to the font formatting of the paragraph break character. More...
 
bool get_IsInsertRevision ()
 Returns true if this object was inserted in Microsoft Word while change tracking was enabled. More...
 
bool get_IsDeleteRevision ()
 Returns true if this object was deleted in Microsoft Word while change tracking was enabled. More...
 
bool get_IsMoveFromRevision ()
 Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled. More...
 
bool get_IsMoveToRevision ()
 Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled. More...
 
bool get_IsFormatRevision ()
 Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled. More...
 
System::SharedPtr< Aspose::Words::Revisions::EditRevision > get_InsertRevision ()
 
void set_InsertRevision (System::SharedPtr< Aspose::Words::Revisions::EditRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::EditRevision > get_DeleteRevision ()
 
void set_DeleteRevision (System::SharedPtr< Aspose::Words::Revisions::EditRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::MoveRevision > get_MoveFromRevision ()
 
void set_MoveFromRevision (System::SharedPtr< Aspose::Words::Revisions::MoveRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::MoveRevision > get_MoveToRevision ()
 
void set_MoveToRevision (System::SharedPtr< Aspose::Words::Revisions::MoveRevision > value)
 
bool get_IsListItem ()
 True when the paragraph is an item in a bulleted or numbered list in original revision. More...
 
 Paragraph (System::SharedPtr< Aspose::Words::DocumentBase > doc)
 Initializes a new instance of the Paragraph class. More...
 
virtual bool Accept (System::SharedPtr< Aspose::Words::DocumentVisitor > visitor)
 Accepts a visitor. More...
 
virtual System::String GetText ()
 Gets the text of this paragraph including the end of paragraph character. More...
 
System::SharedPtr< System::ObjectGetDirectParaAttr (int32_t key)
 
System::SharedPtr< System::ObjectFetchInheritedParaAttr (int32_t key)
 
System::SharedPtr< System::ObjectFetchParaAttr (int32_t key)
 
void SetParaAttr (int32_t key, System::SharedPtr< System::Object > value)
 
void RemoveParaAttr (int32_t key)
 
void ClearParaAttrs ()
 
System::SharedPtr< System::ObjectGetDirectRunAttr (int32_t key)
 
System::SharedPtr< System::ObjectFetchInheritedRunAttr (int32_t key)
 
void SetRunAttr (int32_t key, System::SharedPtr< System::Object > value)
 
void RemoveRunAttr (int32_t key)
 
void ClearRunAttrs ()
 
System::ArrayPtr< System::SharedPtr< Aspose::Words::TabStop > > GetEffectiveTabStops ()
 Returns array of all tab stops applied to this paragraph, including applied indirectly by styles or lists. More...
 
int32_t JoinRunsWithSameFormatting ()
 Joins runs with the same formatting in the paragraph. More...
 
System::SharedPtr< Aspose::Words::Fields::FieldAppendField (Aspose::Words::Fields::FieldType fieldType, bool updateField)
 Appends a field to this paragraph. More...
 
System::SharedPtr< Aspose::Words::Fields::FieldAppendField (System::String fieldCode)
 Appends a field to this paragraph. More...
 
System::SharedPtr< Aspose::Words::Fields::FieldAppendField (System::String fieldCode, System::String fieldValue)
 Appends a field to this paragraph. More...
 
System::SharedPtr< Aspose::Words::Fields::FieldInsertField (Aspose::Words::Fields::FieldType fieldType, bool updateField, System::SharedPtr< Aspose::Words::Node > refNode, bool isAfter)
 Inserts a field into this paragraph. More...
 
System::SharedPtr< Aspose::Words::Fields::FieldInsertField (System::String fieldCode, System::SharedPtr< Aspose::Words::Node > refNode, bool isAfter)
 Inserts a field into this paragraph. More...
 
System::SharedPtr< Aspose::Words::Fields::FieldInsertField (System::String fieldCode, System::String fieldValue, System::SharedPtr< Aspose::Words::Node > refNode, bool isAfter)
 Inserts a field into this paragraph. More...
 
- Public Member Functions inherited from Aspose::Words::CompositeNode
virtual bool get_IsComposite ()
 Returns true as this node can have child nodes. More...
 
bool get_HasChildNodes ()
 Returns true if this node has any child nodes. More...
 
System::SharedPtr< Aspose::Words::NodeCollectionget_ChildNodes ()
 Gets all immediate child nodes of this node. More...
 
System::SharedPtr< Aspose::Words::Nodeget_FirstChild () const
 Gets the first child of the node. More...
 
System::SharedPtr< Aspose::Words::Nodeget_LastChild () const
 Gets the last child of the node. More...
 
int32_t get_Count ()
 Gets the number of immediate children of this node. More...
 
System::SharedPtr< Aspose::Words::CompositeNodeget_Container ()
 
virtual ~CompositeNode ()
 
System::SharedPtr< Aspose::Words::NodeCollectionGetChildNodes (Aspose::Words::NodeType nodeType, bool isDeep)
 Returns a live collection of child nodes that match the specified type. More...
 
System::SharedPtr< Aspose::Words::NodeGetChild (Aspose::Words::NodeType nodeType, int32_t index, bool isDeep)
 Returns an Nth child node that matches the specified type. More...
 
System::SharedPtr< Aspose::Words::NodeListSelectNodes (System::String xpath)
 Selects a list of nodes matching the XPath expression. More...
 
System::SharedPtr< Aspose::Words::NodeSelectSingleNode (System::String xpath)
 Selects the first Node that matches the XPath expression. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Aspose::Words::Node > > > GetEnumerator ()
 Provides support for the for each style iteration over the child nodes of this node. More...
 
System::SharedPtr< Aspose::Words::NodeAppendChild (System::SharedPtr< Aspose::Words::Node > newChild)
 Adds the specified node to the end of the list of child nodes for this node. More...
 
System::SharedPtr< Aspose::Words::NodePrependChild (System::SharedPtr< Aspose::Words::Node > newChild)
 Adds the specified node to the beginning of the list of child nodes for this node. More...
 
System::SharedPtr< Aspose::Words::NodeInsertAfter (System::SharedPtr< Aspose::Words::Node > newChild, System::SharedPtr< Aspose::Words::Node > refChild)
 Inserts the specified node immediately after the specified reference node. More...
 
System::SharedPtr< Aspose::Words::NodeInsertBefore (System::SharedPtr< Aspose::Words::Node > newChild, System::SharedPtr< Aspose::Words::Node > refChild)
 Inserts the specified node immediately before the specified reference node. More...
 
System::SharedPtr< Aspose::Words::NodeRemoveChild (System::SharedPtr< Aspose::Words::Node > oldChild)
 Removes the specified child node. More...
 
void RemoveAllChildren ()
 Removes all the child nodes of the current node. More...
 
void RemoveSmartTags ()
 Removes all Aspose::Words::Markup::SmartTag descendant nodes of the current node. More...
 
int32_t IndexOf (System::SharedPtr< Aspose::Words::Node > child)
 Returns the index of the specified child node in the child node array. More...
 
System::SharedPtr< Aspose::Words::NodeGetNextMatchingNode (System::SharedPtr< Aspose::Words::Node > &curNode)
 
- Public Member Functions inherited from Aspose::Words::Node
System::SharedPtr< Aspose::Words::CompositeNodeget_ParentNode ()
 Gets the immediate parent of this node. More...
 
System::SharedPtr< Aspose::Words::DocumentBaseget_Document ()
 Gets the document to which this node belongs. More...
 
System::SharedPtr< Aspose::Words::Nodeget_PreviousSibling ()
 Gets the node immediately preceding this node. More...
 
System::SharedPtr< Aspose::Words::Nodeget_NextSibling ()
 Gets the node immediately following this node. More...
 
System::SharedPtr< Aspose::Words::Rangeget_Range ()
 Returns a Range object that represents the portion of a document that is contained in this node. More...
 
System::SharedPtr< Aspose::Words::NodeClone (bool isCloneChildren)
 
template<typename T >
GetAncestorOf ()
 
System::SharedPtr< Aspose::Words::CompositeNodeGetAncestor (Aspose::Words::NodeType ancestorType)
 Gets the first ancestor of the specified Aspose::Words::NodeType. More...
 
void Remove ()
 Removes itself from the parent. More...
 
System::SharedPtr< Aspose::Words::NodeNextPreOrder (System::SharedPtr< Aspose::Words::Node > rootNode)
 Gets next node according to the pre-order tree traversal algorithm. More...
 
System::SharedPtr< Aspose::Words::NodePreviousPreOrder (System::SharedPtr< Aspose::Words::Node > rootNode)
 Gets the previous node according to the pre-order tree traversal algorithm. More...
 
System::String ToString (Aspose::Words::SaveFormat saveFormat)
 Exports the content of the node into a string in the specified format. More...
 
System::String ToString (System::SharedPtr< Aspose::Words::Saving::SaveOptions > saveOptions)
 Exports the content of the node into a string using the specified save options. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Words::Node > >
typedef IEnumerator< System::SharedPtr< Aspose::Words::Node > > IEnumeratorType
 Enumerator type. More...
 
- Static Public Member Functions inherited from Aspose::Words::Node
static System::String NodeTypeToString (Aspose::Words::NodeType nodeType)
 A utility method that converts a node type enum value into a user friendly string. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Detailed Description

Represents a paragraph of text.

Aspose::Words::Paragraph is a block-level node and can be a child of classes derived from Aspose::Words::Story or Aspose::Words::InlineStory.

Aspose::Words::Paragraph can contain any number of inline-level nodes and bookmarks.

The complete list of child nodes that can occur inside a paragraph consists of Aspose::Words::BookmarkStart, Aspose::Words::BookmarkEnd, Aspose::Words::Fields::FieldStart, Aspose::Words::Fields::FieldSeparator, Aspose::Words::Fields::FieldEnd, Aspose::Words::Fields::FormField, Aspose::Words::Comment, Aspose::Words::Footnote, Aspose::Words::Run, Aspose::Words::SpecialChar, Aspose::Words::Drawing::Shape, Aspose::Words::Drawing::GroupShape, Aspose::Words::Markup::SmartTag.

A valid paragraph in Microsoft Word always ends with a paragraph break character and a minimal valid paragraph consists just of a paragraph break. The Paragraph class automatically appends the appropriate paragraph break character at the end and this character is not part of the child nodes of the Paragraph, therefore a Paragraph can be empty.

Do not include the end of paragraph ControlChar.ParagraphBreak or end of cell ControlChar.Cell characters inside the text of the paragraph as it might make the paragraph invalid when the document is opened in Microsoft Word.

Constructor & Destructor Documentation

◆ Paragraph()

Aspose::Words::Paragraph::Paragraph ( System::SharedPtr< Aspose::Words::DocumentBase doc)

Initializes a new instance of the Paragraph class.

When Paragraph is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.

To append Paragraph to the document use InsertAfter or InsertBefore on the story where you want the paragraph inserted.

Parameters
docThe owner document.

Member Function Documentation

◆ Accept()

virtual bool Aspose::Words::Paragraph::Accept ( System::SharedPtr< Aspose::Words::DocumentVisitor visitor)
virtual

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.

Parameters
visitorThe visitor that will visit the nodes.
Returns
True if all nodes were visited; false if DocumentVisitor stopped the operation before visiting all nodes.

Calls DocumentVisitor.VisitParagraphStart, then calls Accept for all child nodes of the paragraph and calls DocumentVisitor.VisitParagraphEnd at the end.

Implements Aspose::Words::Node.

◆ AppendField() [1/3]

System::SharedPtr<Aspose::Words::Fields::Field> Aspose::Words::Paragraph::AppendField ( Aspose::Words::Fields::FieldType  fieldType,
bool  updateField 
)

Appends a field to this paragraph.

Parameters
fieldTypeThe type of the field to append.
updateFieldSpecifies whether to update the field immediately.
Returns
A Aspose::Words::Fields::Field object that represents the appended field.

◆ AppendField() [2/3]

System::SharedPtr<Aspose::Words::Fields::Field> Aspose::Words::Paragraph::AppendField ( System::String  fieldCode)

Appends a field to this paragraph.

Parameters
fieldCodeThe field code to append (without curly braces).
Returns
A Aspose::Words::Fields::Field object that represents the appended field.

◆ AppendField() [3/3]

System::SharedPtr<Aspose::Words::Fields::Field> Aspose::Words::Paragraph::AppendField ( System::String  fieldCode,
System::String  fieldValue 
)

Appends a field to this paragraph.

Parameters
fieldCodeThe field code to append (without curly braces).
fieldValueThe field value to append. Pass null for fields that do not have a value.
Returns
A Aspose::Words::Fields::Field object that represents the appended field.

◆ ClearParaAttrs()

void Aspose::Words::Paragraph::ClearParaAttrs ( )

◆ ClearRunAttrs()

void Aspose::Words::Paragraph::ClearRunAttrs ( )

◆ FetchInheritedParaAttr()

System::SharedPtr<System::Object> Aspose::Words::Paragraph::FetchInheritedParaAttr ( int32_t  key)

◆ FetchInheritedRunAttr()

System::SharedPtr<System::Object> Aspose::Words::Paragraph::FetchInheritedRunAttr ( int32_t  key)

◆ FetchParaAttr()

System::SharedPtr<System::Object> Aspose::Words::Paragraph::FetchParaAttr ( int32_t  key)

◆ get_BreakIsStyleSeparator()

bool Aspose::Words::Paragraph::get_BreakIsStyleSeparator ( )

True if this paragraph break is a Style Separator. A style separator allows one paragraph to consist of parts that have different paragraph styles.

◆ get_DeleteRevision()

System::SharedPtr<Aspose::Words::Revisions::EditRevision> Aspose::Words::Paragraph::get_DeleteRevision ( )

◆ get_FrameFormat()

System::SharedPtr<Aspose::Words::FrameFormat> Aspose::Words::Paragraph::get_FrameFormat ( )

Provides access to the paragraph formatting properties.

◆ get_InsertRevision()

System::SharedPtr<Aspose::Words::Revisions::EditRevision> Aspose::Words::Paragraph::get_InsertRevision ( )

◆ get_IsDeleteRevision()

bool Aspose::Words::Paragraph::get_IsDeleteRevision ( )

Returns true if this object was deleted in Microsoft Word while change tracking was enabled.

◆ get_IsEndOfCell()

bool Aspose::Words::Paragraph::get_IsEndOfCell ( )

True if this paragraph is the last paragraph in a Aspose::Words::Tables::Cell; false otherwise.

◆ get_IsEndOfDocument()

bool Aspose::Words::Paragraph::get_IsEndOfDocument ( )

True if this paragraph is the last paragraph in the last section of the document.

◆ get_IsEndOfHeaderFooter()

bool Aspose::Words::Paragraph::get_IsEndOfHeaderFooter ( )

True if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise.

◆ get_IsEndOfSection()

bool Aspose::Words::Paragraph::get_IsEndOfSection ( )

True if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise.

◆ get_IsFormatRevision()

bool Aspose::Words::Paragraph::get_IsFormatRevision ( )

Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled.

◆ get_IsInCell()

bool Aspose::Words::Paragraph::get_IsInCell ( )

True if this paragraph is an immediate child of Aspose::Words::Tables::Cell; false otherwise.

◆ get_IsInsertRevision()

bool Aspose::Words::Paragraph::get_IsInsertRevision ( )

Returns true if this object was inserted in Microsoft Word while change tracking was enabled.

◆ get_IsListItem()

bool Aspose::Words::Paragraph::get_IsListItem ( )

True when the paragraph is an item in a bulleted or numbered list in original revision.

◆ get_IsMoveFromRevision()

bool Aspose::Words::Paragraph::get_IsMoveFromRevision ( )

Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.

◆ get_IsMoveToRevision()

bool Aspose::Words::Paragraph::get_IsMoveToRevision ( )

Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.

◆ get_ListFormat()

System::SharedPtr<Aspose::Words::ListFormat> Aspose::Words::Paragraph::get_ListFormat ( )

Provides access to the list formatting properties of the paragraph.

◆ get_ListLabel()

System::SharedPtr<Aspose::Words::Lists::ListLabel> Aspose::Words::Paragraph::get_ListLabel ( )

Gets a Aspose::Words::Paragraph::get_ListLabel object that provides access to list numbering value and formatting for this paragraph.

◆ get_MoveFromRevision()

System::SharedPtr<Aspose::Words::Revisions::MoveRevision> Aspose::Words::Paragraph::get_MoveFromRevision ( )

◆ get_MoveToRevision()

System::SharedPtr<Aspose::Words::Revisions::MoveRevision> Aspose::Words::Paragraph::get_MoveToRevision ( )

◆ get_NodeType()

virtual Aspose::Words::NodeType Aspose::Words::Paragraph::get_NodeType ( ) const
virtual

◆ get_ParagraphBreakFont()

System::SharedPtr<Aspose::Words::Font> Aspose::Words::Paragraph::get_ParagraphBreakFont ( )

Provides access to the font formatting of the paragraph break character.

◆ get_ParagraphFormat()

System::SharedPtr<Aspose::Words::ParagraphFormat> Aspose::Words::Paragraph::get_ParagraphFormat ( )

Provides access to the paragraph formatting properties.

◆ get_ParentSection()

System::SharedPtr<Aspose::Words::Section> Aspose::Words::Paragraph::get_ParentSection ( )

Retrieves the parent Aspose::Words::Section of the paragraph.

◆ get_ParentStory()

System::SharedPtr<Aspose::Words::Story> Aspose::Words::Paragraph::get_ParentStory ( )

Retrieves the parent section-level story that can be Aspose::Words::Body or Aspose::Words::HeaderFooter.

◆ get_Runs()

System::SharedPtr<Aspose::Words::RunCollection> Aspose::Words::Paragraph::get_Runs ( )

Provides access to the typed collection of pieces of text inside the paragraph.

◆ GetDirectParaAttr()

System::SharedPtr<System::Object> Aspose::Words::Paragraph::GetDirectParaAttr ( int32_t  key)

◆ GetDirectRunAttr()

System::SharedPtr<System::Object> Aspose::Words::Paragraph::GetDirectRunAttr ( int32_t  key)

◆ GetEffectiveTabStops()

System::ArrayPtr<System::SharedPtr<Aspose::Words::TabStop> > Aspose::Words::Paragraph::GetEffectiveTabStops ( )

Returns array of all tab stops applied to this paragraph, including applied indirectly by styles or lists.

◆ GetText()

virtual System::String Aspose::Words::Paragraph::GetText ( )
virtual

Gets the text of this paragraph including the end of paragraph character.

The text of all child nodes is concatenated and the end of paragraph character is appended as follows:

The returned string includes all control and special characters as described in Aspose::Words::ControlChar.

Reimplemented from Aspose::Words::CompositeNode.

◆ InsertField() [1/3]

System::SharedPtr<Aspose::Words::Fields::Field> Aspose::Words::Paragraph::InsertField ( Aspose::Words::Fields::FieldType  fieldType,
bool  updateField,
System::SharedPtr< Aspose::Words::Node refNode,
bool  isAfter 
)

Inserts a field into this paragraph.

Parameters
fieldTypeThe type of the field to insert.
updateFieldSpecifies whether to update the field immediately.
refNodeReference node inside this paragraph (if refNode is null, then appends to the end of the paragraph).
isAfterWhether to insert the field after or before reference node.
Returns
A Aspose::Words::Fields::Field object that represents the inserted field.

◆ InsertField() [2/3]

System::SharedPtr<Aspose::Words::Fields::Field> Aspose::Words::Paragraph::InsertField ( System::String  fieldCode,
System::SharedPtr< Aspose::Words::Node refNode,
bool  isAfter 
)

Inserts a field into this paragraph.

Parameters
fieldCodeThe field code to insert (without curly braces).
refNodeReference node inside this paragraph (if refNode is null, then appends to the end of the paragraph).
isAfterWhether to insert the field after or before reference node.
Returns
A Aspose::Words::Fields::Field object that represents the inserted field.

◆ InsertField() [3/3]

System::SharedPtr<Aspose::Words::Fields::Field> Aspose::Words::Paragraph::InsertField ( System::String  fieldCode,
System::String  fieldValue,
System::SharedPtr< Aspose::Words::Node refNode,
bool  isAfter 
)

Inserts a field into this paragraph.

Parameters
fieldCodeThe field code to insert (without curly braces).
fieldValueThe field value to insert. Pass null for fields that do not have a value.
refNodeReference node inside this paragraph (if refNode is null, then appends to the end of the paragraph).
isAfterWhether to insert the field after or before reference node.
Returns
A Aspose::Words::Fields::Field object that represents the inserted field.

◆ JoinRunsWithSameFormatting()

int32_t Aspose::Words::Paragraph::JoinRunsWithSameFormatting ( )

Joins runs with the same formatting in the paragraph.

Returns
Number of joins performed. When N adjacent runs are being joined they count as N - 1 joins.

◆ RemoveParaAttr()

void Aspose::Words::Paragraph::RemoveParaAttr ( int32_t  key)

◆ RemoveRunAttr()

void Aspose::Words::Paragraph::RemoveRunAttr ( int32_t  key)

◆ set_DeleteRevision()

void Aspose::Words::Paragraph::set_DeleteRevision ( System::SharedPtr< Aspose::Words::Revisions::EditRevision >  value)

◆ set_InsertRevision()

void Aspose::Words::Paragraph::set_InsertRevision ( System::SharedPtr< Aspose::Words::Revisions::EditRevision >  value)

◆ set_MoveFromRevision()

void Aspose::Words::Paragraph::set_MoveFromRevision ( System::SharedPtr< Aspose::Words::Revisions::MoveRevision >  value)

◆ set_MoveToRevision()

void Aspose::Words::Paragraph::set_MoveToRevision ( System::SharedPtr< Aspose::Words::Revisions::MoveRevision >  value)

◆ SetParaAttr()

void Aspose::Words::Paragraph::SetParaAttr ( int32_t  key,
System::SharedPtr< System::Object value 
)

◆ SetRunAttr()

void Aspose::Words::Paragraph::SetRunAttr ( int32_t  key,
System::SharedPtr< System::Object value 
)