Aspose::Words::ParagraphFormat Class Reference

Represents all the formatting for a paragraph. More...

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

Inherits IBorderAttrSource, and IShadingAttrSource.

Public Member Functions

Aspose::Words::ParagraphAlignment get_Alignment ()
 Gets or sets text alignment for the paragraph. More...
 
void set_Alignment (Aspose::Words::ParagraphAlignment value)
 Setter for Aspose::Words::ParagraphFormat::get_Alignment. More...
 
bool get_NoSpaceBetweenParagraphsOfSameStyle ()
 When true, Aspose::Words::ParagraphFormat::get_SpaceBefore and Aspose::Words::ParagraphFormat::get_SpaceAfter will be ignored between the paragraphs of the same style. More...
 
void set_NoSpaceBetweenParagraphsOfSameStyle (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_NoSpaceBetweenParagraphsOfSameStyle. More...
 
bool get_KeepTogether ()
 True if all lines in the paragraph are to remain on the same page. More...
 
void set_KeepTogether (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_KeepTogether. More...
 
bool get_KeepWithNext ()
 True if the paragraph is to remains on the same page as the paragraph that follows it. More...
 
void set_KeepWithNext (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_KeepWithNext. More...
 
bool get_PageBreakBefore ()
 True if a page break is forced before the paragraph. More...
 
void set_PageBreakBefore (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_PageBreakBefore. More...
 
bool get_SuppressLineNumbers ()
 Specifies whether the current paragraph's lines should be exempted from line numbering which is applied in the parent section. More...
 
void set_SuppressLineNumbers (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_SuppressLineNumbers. More...
 
bool get_SuppressAutoHyphens ()
 Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings. More...
 
void set_SuppressAutoHyphens (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_SuppressAutoHyphens. More...
 
bool get_WidowControl ()
 True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph. More...
 
void set_WidowControl (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_WidowControl. More...
 
bool get_AddSpaceBetweenFarEastAndAlpha ()
 Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph. More...
 
void set_AddSpaceBetweenFarEastAndAlpha (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_AddSpaceBetweenFarEastAndAlpha. More...
 
bool get_AddSpaceBetweenFarEastAndDigit ()
 Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph. More...
 
void set_AddSpaceBetweenFarEastAndDigit (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_AddSpaceBetweenFarEastAndDigit. More...
 
bool get_FarEastLineBreakControl ()
 Gets or sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph. More...
 
void set_FarEastLineBreakControl (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_FarEastLineBreakControl. More...
 
bool get_WordWrap ()
 If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph. Otherwise Latin text is wrapped by whole words. More...
 
void set_WordWrap (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_WordWrap. More...
 
bool get_HangingPunctuation ()
 Gets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph. More...
 
void set_HangingPunctuation (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_HangingPunctuation. More...
 
bool get_Bidi ()
 Gets or sets whether this is a right-to-left paragraph. More...
 
void set_Bidi (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_Bidi. More...
 
double get_LeftIndent ()
 Gets or sets the value (in points) that represents the left indent for paragraph. More...
 
void set_LeftIndent (double value)
 Setter for Aspose::Words::ParagraphFormat::get_LeftIndent. More...
 
double get_RightIndent ()
 Gets or sets the value (in points) that represents the right indent for paragraph. More...
 
void set_RightIndent (double value)
 Setter for Aspose::Words::ParagraphFormat::get_RightIndent. More...
 
double get_FirstLineIndent ()
 Gets or sets the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. More...
 
void set_FirstLineIndent (double value)
 Setter for Aspose::Words::ParagraphFormat::get_FirstLineIndent. More...
 
bool get_SpaceBeforeAuto ()
 True if the amount of spacing before the paragraph is set automatically. More...
 
void set_SpaceBeforeAuto (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_SpaceBeforeAuto. More...
 
bool get_SpaceAfterAuto ()
 True if the amount of spacing after the paragraph is set automatically. More...
 
void set_SpaceAfterAuto (bool value)
 Setter for Aspose::Words::ParagraphFormat::get_SpaceAfterAuto. More...
 
double get_SpaceBefore ()
 Gets or sets the amount of spacing (in points) before the paragraph. More...
 
void set_SpaceBefore (double value)
 Setter for Aspose::Words::ParagraphFormat::get_SpaceBefore. More...
 
double get_SpaceAfter ()
 Gets or sets the amount of spacing (in points) after the paragraph. More...
 
void set_SpaceAfter (double value)
 Setter for Aspose::Words::ParagraphFormat::get_SpaceAfter. More...
 
Aspose::Words::LineSpacingRule get_LineSpacingRule ()
 Gets or sets the line spacing for the paragraph. More...
 
void set_LineSpacingRule (Aspose::Words::LineSpacingRule value)
 Setter for Aspose::Words::ParagraphFormat::get_LineSpacingRule. More...
 
double get_LineSpacing ()
 Gets or sets the line spacing (in points) for the paragraph. More...
 
void set_LineSpacing (double value)
 Setter for Aspose::Words::ParagraphFormat::get_LineSpacing. More...
 
bool get_IsHeading ()
 True when the paragraph style is one of the built-in Heading styles. More...
 
bool get_IsListItem ()
 True when the paragraph is an item in a bulleted or numbered list. More...
 
Aspose::Words::OutlineLevel get_OutlineLevel ()
 Specifies the outline level of the paragraph in the document. More...
 
void set_OutlineLevel (Aspose::Words::OutlineLevel value)
 Setter for Aspose::Words::ParagraphFormat::get_OutlineLevel. More...
 
int32_t get_LinesToDrop ()
 Gets or sets the number of lines of the paragraph text used to calculate the drop cap height. More...
 
void set_LinesToDrop (int32_t value)
 Setter for Aspose::Words::ParagraphFormat::get_LinesToDrop. More...
 
Aspose::Words::DropCapPosition get_DropCapPosition ()
 Gets or sets the position for a drop cap text. More...
 
void set_DropCapPosition (Aspose::Words::DropCapPosition value)
 Setter for Aspose::Words::ParagraphFormat::get_DropCapPosition. More...
 
System::SharedPtr< Aspose::Words::Shadingget_Shading ()
 Returns a Shading object that refers to the shading formatting for the paragraph. More...
 
System::SharedPtr< Aspose::Words::BorderCollectionget_Borders ()
 Gets collection of borders of the paragraph. More...
 
System::SharedPtr< Aspose::Words::Styleget_Style ()
 Gets or sets the paragraph style applied to this formatting. More...
 
void set_Style (System::SharedPtr< Aspose::Words::Style > value)
 Setter for Aspose::Words::ParagraphFormat::get_Style. More...
 
System::String get_StyleName ()
 Gets or sets the name of the paragraph style applied to this formatting. More...
 
void set_StyleName (System::String value)
 Setter for Aspose::Words::ParagraphFormat::get_StyleName. More...
 
Aspose::Words::StyleIdentifier get_StyleIdentifier ()
 Gets or sets the locale independent style identifier of the paragraph style applied to this formatting. More...
 
void set_StyleIdentifier (Aspose::Words::StyleIdentifier value)
 Setter for Aspose::Words::ParagraphFormat::get_StyleIdentifier. More...
 
System::SharedPtr< Aspose::Words::TabStopCollectionget_TabStops ()
 Gets the collection of custom tab stops defined for this object. More...
 
System::SharedPtr< System::Collections::Generic::SortedList< Aspose::Words::BorderType, int32_t > > get_PossibleBorderKeys ()
 
void ClearFormatting ()
 Resets to default paragraph formatting. More...
 
System::SharedPtr< System::ObjectGetDirectBorderAttr (int32_t key)
 
System::SharedPtr< System::ObjectFetchInheritedBorderAttr (int32_t key)
 
void SetBorderAttr (int32_t key, System::SharedPtr< System::Object > value)
 
System::SharedPtr< System::ObjectFetchInheritedShadingAttr (int32_t key)
 

Detailed Description

Represents all the formatting for a paragraph.

Member Function Documentation

◆ ClearFormatting()

void Aspose::Words::ParagraphFormat::ClearFormatting ( )

Resets to default paragraph formatting.

Default paragraph formatting is Normal style, left aligned, no indentation, no spacing, no borders and no shading.

◆ FetchInheritedBorderAttr()

System::SharedPtr<System::Object> Aspose::Words::ParagraphFormat::FetchInheritedBorderAttr ( int32_t  key)

◆ FetchInheritedShadingAttr()

System::SharedPtr<System::Object> Aspose::Words::ParagraphFormat::FetchInheritedShadingAttr ( int32_t  key)

◆ get_AddSpaceBetweenFarEastAndAlpha()

bool Aspose::Words::ParagraphFormat::get_AddSpaceBetweenFarEastAndAlpha ( )

Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.

◆ get_AddSpaceBetweenFarEastAndDigit()

bool Aspose::Words::ParagraphFormat::get_AddSpaceBetweenFarEastAndDigit ( )

Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.

◆ get_Alignment()

Aspose::Words::ParagraphAlignment Aspose::Words::ParagraphFormat::get_Alignment ( )

Gets or sets text alignment for the paragraph.

◆ get_Bidi()

bool Aspose::Words::ParagraphFormat::get_Bidi ( )

Gets or sets whether this is a right-to-left paragraph.

When true, the runs and other inline objects in this paragraph are laid out right to left.

◆ get_Borders()

System::SharedPtr<Aspose::Words::BorderCollection> Aspose::Words::ParagraphFormat::get_Borders ( )

Gets collection of borders of the paragraph.

◆ get_DropCapPosition()

Aspose::Words::DropCapPosition Aspose::Words::ParagraphFormat::get_DropCapPosition ( )

Gets or sets the position for a drop cap text.

◆ get_FarEastLineBreakControl()

bool Aspose::Words::ParagraphFormat::get_FarEastLineBreakControl ( )

Gets or sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph.

◆ get_FirstLineIndent()

double Aspose::Words::ParagraphFormat::get_FirstLineIndent ( )

Gets or sets the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent.

◆ get_HangingPunctuation()

bool Aspose::Words::ParagraphFormat::get_HangingPunctuation ( )

Gets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph.

◆ get_IsHeading()

bool Aspose::Words::ParagraphFormat::get_IsHeading ( )

True when the paragraph style is one of the built-in Heading styles.

◆ get_IsListItem()

bool Aspose::Words::ParagraphFormat::get_IsListItem ( )

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

◆ get_KeepTogether()

bool Aspose::Words::ParagraphFormat::get_KeepTogether ( )

True if all lines in the paragraph are to remain on the same page.

◆ get_KeepWithNext()

bool Aspose::Words::ParagraphFormat::get_KeepWithNext ( )

True if the paragraph is to remains on the same page as the paragraph that follows it.

◆ get_LeftIndent()

double Aspose::Words::ParagraphFormat::get_LeftIndent ( )

Gets or sets the value (in points) that represents the left indent for paragraph.

◆ get_LineSpacing()

double Aspose::Words::ParagraphFormat::get_LineSpacing ( )

Gets or sets the line spacing (in points) for the paragraph.

When LineSpacingRule property is set to AtLeast, the line spacing can be greater than or equal to, but never less than the specified LineSpacing value.

When LineSpacingRule property is set to Exactly, the line spacing never changes from the specified LineSpacing value, even if a larger font is used within the paragraph.

◆ get_LineSpacingRule()

Aspose::Words::LineSpacingRule Aspose::Words::ParagraphFormat::get_LineSpacingRule ( )

Gets or sets the line spacing for the paragraph.

◆ get_LinesToDrop()

int32_t Aspose::Words::ParagraphFormat::get_LinesToDrop ( )

Gets or sets the number of lines of the paragraph text used to calculate the drop cap height.

◆ get_NoSpaceBetweenParagraphsOfSameStyle()

bool Aspose::Words::ParagraphFormat::get_NoSpaceBetweenParagraphsOfSameStyle ( )

When true, Aspose::Words::ParagraphFormat::get_SpaceBefore and Aspose::Words::ParagraphFormat::get_SpaceAfter will be ignored between the paragraphs of the same style.

This setting only takes affect when applied to a paragraph style. If applied to a paragraph directly, it has no effect.

◆ get_OutlineLevel()

Aspose::Words::OutlineLevel Aspose::Words::ParagraphFormat::get_OutlineLevel ( )

Specifies the outline level of the paragraph in the document.

◆ get_PageBreakBefore()

bool Aspose::Words::ParagraphFormat::get_PageBreakBefore ( )

True if a page break is forced before the paragraph.

◆ get_PossibleBorderKeys()

System::SharedPtr<System::Collections::Generic::SortedList<Aspose::Words::BorderType, int32_t> > Aspose::Words::ParagraphFormat::get_PossibleBorderKeys ( )

◆ get_RightIndent()

double Aspose::Words::ParagraphFormat::get_RightIndent ( )

Gets or sets the value (in points) that represents the right indent for paragraph.

◆ get_Shading()

System::SharedPtr<Aspose::Words::Shading> Aspose::Words::ParagraphFormat::get_Shading ( )

Returns a Shading object that refers to the shading formatting for the paragraph.

◆ get_SpaceAfter()

double Aspose::Words::ParagraphFormat::get_SpaceAfter ( )

Gets or sets the amount of spacing (in points) after the paragraph.

Has no effect when Aspose::Words::ParagraphFormat::get_SpaceAfterAuto is true.

◆ get_SpaceAfterAuto()

bool Aspose::Words::ParagraphFormat::get_SpaceAfterAuto ( )

True if the amount of spacing after the paragraph is set automatically.

When set to true, overrides the effect of Aspose::Words::ParagraphFormat::get_SpaceAfter.

When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:

  • Normally, spacing is added after all paragraphs.
  • In a bulleted or numbered list, spacing is added only after the last item in the list. Spacing is not added between the list items.
  • In a nested bulleted or numbered list spacing is not added.
  • Spacing is normally added after a table.
  • Spacing is not added after a table if it is the last block in a table cell.
  • Spacing is not added after the last paragraph in a table cell.

◆ get_SpaceBefore()

double Aspose::Words::ParagraphFormat::get_SpaceBefore ( )

Gets or sets the amount of spacing (in points) before the paragraph.

Has no effect when Aspose::Words::ParagraphFormat::get_SpaceBeforeAuto is true.

◆ get_SpaceBeforeAuto()

bool Aspose::Words::ParagraphFormat::get_SpaceBeforeAuto ( )

True if the amount of spacing before the paragraph is set automatically.

When set to true, overrides the effect of Aspose::Words::ParagraphFormat::get_SpaceBefore.

When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:

  • Normally, spacing is added after all paragraphs.
  • In a bulleted or numbered list, spacing is added only after the last item in the list. Spacing is not added between the list items.
  • In a nested bulleted or numbered list spacing is not added.
  • Spacing is normally added after a table.
  • Spacing is not added after a table if it is the last block in a table cell.
  • Spacing is not added after the last paragraph in a table cell.

◆ get_Style()

System::SharedPtr<Aspose::Words::Style> Aspose::Words::ParagraphFormat::get_Style ( )

Gets or sets the paragraph style applied to this formatting.

◆ get_StyleIdentifier()

Aspose::Words::StyleIdentifier Aspose::Words::ParagraphFormat::get_StyleIdentifier ( )

Gets or sets the locale independent style identifier of the paragraph style applied to this formatting.

◆ get_StyleName()

System::String Aspose::Words::ParagraphFormat::get_StyleName ( )

Gets or sets the name of the paragraph style applied to this formatting.

◆ get_SuppressAutoHyphens()

bool Aspose::Words::ParagraphFormat::get_SuppressAutoHyphens ( )

Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings.

◆ get_SuppressLineNumbers()

bool Aspose::Words::ParagraphFormat::get_SuppressLineNumbers ( )

Specifies whether the current paragraph's lines should be exempted from line numbering which is applied in the parent section.

◆ get_TabStops()

System::SharedPtr<Aspose::Words::TabStopCollection> Aspose::Words::ParagraphFormat::get_TabStops ( )

Gets the collection of custom tab stops defined for this object.

◆ get_WidowControl()

bool Aspose::Words::ParagraphFormat::get_WidowControl ( )

True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.

◆ get_WordWrap()

bool Aspose::Words::ParagraphFormat::get_WordWrap ( )

If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph. Otherwise Latin text is wrapped by whole words.

◆ GetDirectBorderAttr()

System::SharedPtr<System::Object> Aspose::Words::ParagraphFormat::GetDirectBorderAttr ( int32_t  key)

◆ set_AddSpaceBetweenFarEastAndAlpha()

void Aspose::Words::ParagraphFormat::set_AddSpaceBetweenFarEastAndAlpha ( bool  value)

◆ set_AddSpaceBetweenFarEastAndDigit()

void Aspose::Words::ParagraphFormat::set_AddSpaceBetweenFarEastAndDigit ( bool  value)

◆ set_Alignment()

void Aspose::Words::ParagraphFormat::set_Alignment ( Aspose::Words::ParagraphAlignment  value)

◆ set_Bidi()

void Aspose::Words::ParagraphFormat::set_Bidi ( bool  value)

◆ set_DropCapPosition()

void Aspose::Words::ParagraphFormat::set_DropCapPosition ( Aspose::Words::DropCapPosition  value)

◆ set_FarEastLineBreakControl()

void Aspose::Words::ParagraphFormat::set_FarEastLineBreakControl ( bool  value)

◆ set_FirstLineIndent()

void Aspose::Words::ParagraphFormat::set_FirstLineIndent ( double  value)

◆ set_HangingPunctuation()

void Aspose::Words::ParagraphFormat::set_HangingPunctuation ( bool  value)

◆ set_KeepTogether()

void Aspose::Words::ParagraphFormat::set_KeepTogether ( bool  value)

◆ set_KeepWithNext()

void Aspose::Words::ParagraphFormat::set_KeepWithNext ( bool  value)

◆ set_LeftIndent()

void Aspose::Words::ParagraphFormat::set_LeftIndent ( double  value)

◆ set_LineSpacing()

void Aspose::Words::ParagraphFormat::set_LineSpacing ( double  value)

◆ set_LineSpacingRule()

void Aspose::Words::ParagraphFormat::set_LineSpacingRule ( Aspose::Words::LineSpacingRule  value)

◆ set_LinesToDrop()

void Aspose::Words::ParagraphFormat::set_LinesToDrop ( int32_t  value)

◆ set_NoSpaceBetweenParagraphsOfSameStyle()

void Aspose::Words::ParagraphFormat::set_NoSpaceBetweenParagraphsOfSameStyle ( bool  value)

◆ set_OutlineLevel()

void Aspose::Words::ParagraphFormat::set_OutlineLevel ( Aspose::Words::OutlineLevel  value)

◆ set_PageBreakBefore()

void Aspose::Words::ParagraphFormat::set_PageBreakBefore ( bool  value)

◆ set_RightIndent()

void Aspose::Words::ParagraphFormat::set_RightIndent ( double  value)

◆ set_SpaceAfter()

void Aspose::Words::ParagraphFormat::set_SpaceAfter ( double  value)

◆ set_SpaceAfterAuto()

void Aspose::Words::ParagraphFormat::set_SpaceAfterAuto ( bool  value)

◆ set_SpaceBefore()

void Aspose::Words::ParagraphFormat::set_SpaceBefore ( double  value)

◆ set_SpaceBeforeAuto()

void Aspose::Words::ParagraphFormat::set_SpaceBeforeAuto ( bool  value)

◆ set_Style()

void Aspose::Words::ParagraphFormat::set_Style ( System::SharedPtr< Aspose::Words::Style value)

◆ set_StyleIdentifier()

void Aspose::Words::ParagraphFormat::set_StyleIdentifier ( Aspose::Words::StyleIdentifier  value)

◆ set_StyleName()

void Aspose::Words::ParagraphFormat::set_StyleName ( System::String  value)

◆ set_SuppressAutoHyphens()

void Aspose::Words::ParagraphFormat::set_SuppressAutoHyphens ( bool  value)

◆ set_SuppressLineNumbers()

void Aspose::Words::ParagraphFormat::set_SuppressLineNumbers ( bool  value)

◆ set_WidowControl()

void Aspose::Words::ParagraphFormat::set_WidowControl ( bool  value)

◆ set_WordWrap()

void Aspose::Words::ParagraphFormat::set_WordWrap ( bool  value)

◆ SetBorderAttr()

void Aspose::Words::ParagraphFormat::SetBorderAttr ( int32_t  key,
System::SharedPtr< System::Object value 
)