Represents a single built-in or user-defined style.
Shows how to create and apply a custom style.
Shows how to create and use a paragraph style with list formatting.
#include <Aspose.Words.Cpp/Style.h>
Public Member Functions | |
bool | Equals (SharedPtr< Style > style) |
Compares with the specified style. Styles Istds are compared for built-in styles only. Styles defaults are not included in comparison. Base style, linked style and next paragraph style are recursively compared. More... | |
ArrayPtr< String > | get_Aliases () |
Gets all aliases of this style. If style has no aliases then empty array of string is returned. More... | |
String | get_BaseStyleName () |
Gets/sets the name of the style this style is based on. More... | |
bool | get_BuiltIn () |
True if this style is one of the built-in styles in MS Word. More... | |
SharedPtr< DocumentBase > | get_Document () |
Gets the owner document. More... | |
SharedPtr< Font > | get_Font () |
Gets the character formatting of the style. More... | |
bool | get_IsHeading () |
True when the style is one of the built-in Heading styles. More... | |
bool | get_IsQuickStyle () const |
Specifies whether this style is shown in the Quick Style gallery inside MS Word UI. More... | |
String | get_LinkedStyleName () |
Gets the name of the Style linked to this one. Returns Empty string if no styles are linked. More... | |
SharedPtr< List > | get_List () |
Gets the list that defines formatting of this list style. More... | |
SharedPtr< ListFormat > | get_ListFormat () |
Provides access to the list formatting properties of a paragraph style. More... | |
String | get_Name () const |
Gets or sets the name of the style. More... | |
String | get_NextParagraphStyleName () |
Gets/sets the name of the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style. More... | |
SharedPtr< ParagraphFormat > | get_ParagraphFormat () |
Gets the paragraph formatting of the style. More... | |
StyleIdentifier | get_StyleIdentifier () const |
Gets the locale independent style identifier for a built-in style. More... | |
SharedPtr< StyleCollection > | get_Styles () const |
Gets the collection of styles this style belongs to. More... | |
StyleType | get_Type () const |
Gets the style type (paragraph or character). More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | Remove () |
Removes the specified style from the document. More... | |
void | set_BaseStyleName (String value) |
Setter for get_BaseStyleName. More... | |
void | set_IsQuickStyle (bool value) |
Setter for get_IsQuickStyle. More... | |
void | set_Name (String value) |
Setter for get_Name. More... | |
void | set_NextParagraphStyleName (String value) |
Setter for get_NextParagraphStyleName. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
bool Aspose::Words::Style::Equals | ( | System::SharedPtr< Aspose::Words::Style > | style | ) |
Compares with the specified style. Styles Istds are compared for built-in styles only. Styles defaults are not included in comparison. Base style, linked style and next paragraph style are recursively compared.
Shows how to use style aliases.
System::ArrayPtr<System::String> Aspose::Words::Style::get_Aliases | ( | ) |
Gets all aliases of this style. If style has no aliases then empty array of string is returned.
Shows how to use style aliases.
System::String Aspose::Words::Style::get_BaseStyleName | ( | ) |
Gets/sets the name of the style this style is based on.
Shows how to use style aliases.
bool Aspose::Words::Style::get_BuiltIn | ( | ) |
True if this style is one of the built-in styles in MS Word.
Shows how to differentiate custom styles from built-in styles.
System::SharedPtr<Aspose::Words::DocumentBase> Aspose::Words::Style::get_Document | ( | ) |
Gets the owner document.
Shows how to access a document's style collection.
System::SharedPtr<Aspose::Words::Font> Aspose::Words::Style::get_Font | ( | ) |
Gets the character formatting of the style.
For list styles this property returns null.
Shows how to create and apply a custom style.
Shows how to create and use a paragraph style with list formatting.
bool Aspose::Words::Style::get_IsHeading | ( | ) |
True when the style is one of the built-in Heading styles.
Shows how to access a document's style collection.
bool Aspose::Words::Style::get_IsQuickStyle | ( | ) | const |
Specifies whether this style is shown in the Quick Style gallery inside MS Word UI.
Shows how to access a document's style collection.
System::String Aspose::Words::Style::get_LinkedStyleName | ( | ) |
Gets the name of the Style linked to this one. Returns Empty string if no styles are linked.
Shows how to use style aliases.
System::SharedPtr<Aspose::Words::Lists::List> Aspose::Words::Style::get_List | ( | ) |
Gets the list that defines formatting of this list style.
This property is only valid for list styles. For other style types this property returns null.
Shows how to create a list style and use it in a document.
System::SharedPtr<Aspose::Words::Lists::ListFormat> Aspose::Words::Style::get_ListFormat | ( | ) |
Provides access to the list formatting properties of a paragraph style.
This property is only valid for paragraph styles. For other style types this property returns null.
Shows how to create and use a paragraph style with list formatting.
System::String Aspose::Words::Style::get_Name | ( | ) | const |
Gets or sets the name of the style.
Can not be empty string.
If there already is a style with such name in the collection, then this style will override it. All affected nodes will reference new style.
Shows how to access a document's style collection.
Shows how to clone a document's style.
System::String Aspose::Words::Style::get_NextParagraphStyleName | ( | ) |
Gets/sets the name of the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style.
Shows how to access a document's style collection.
System::SharedPtr<Aspose::Words::ParagraphFormat> Aspose::Words::Style::get_ParagraphFormat | ( | ) |
Gets the paragraph formatting of the style.
For character and list styles this property returns null.
Shows how to create and use a paragraph style with list formatting.
Aspose::Words::StyleIdentifier Aspose::Words::Style::get_StyleIdentifier | ( | ) | const |
Gets the locale independent style identifier for a built-in style.
For user defined (custom) styles, this property returns User.
Shows how to modify the position of the right tab stop in TOC related paragraphs.
System::SharedPtr<Aspose::Words::StyleCollection> Aspose::Words::Style::get_Styles | ( | ) | const |
Gets the collection of styles this style belongs to.
Shows how to access a document's style collection.
Aspose::Words::StyleType Aspose::Words::Style::get_Type | ( | ) | const |
Gets the style type (paragraph or character).
Shows how to access a document's style collection.
|
overridevirtual |
Reimplemented in Aspose::Words::TableStyle.
|
overridevirtual |
Reimplemented in Aspose::Words::TableStyle.
void Aspose::Words::Style::Remove | ( | ) |
Removes the specified style from the document.
Style removal has following effects on the document model:
Shows how to create and apply a custom style.
void Aspose::Words::Style::set_BaseStyleName | ( | System::String | value | ) |
Setter for Aspose::Words::Style::get_BaseStyleName.
void Aspose::Words::Style::set_IsQuickStyle | ( | bool | value | ) |
Setter for Aspose::Words::Style::get_IsQuickStyle.
void Aspose::Words::Style::set_Name | ( | System::String | value | ) |
Setter for Aspose::Words::Style::get_Name.
void Aspose::Words::Style::set_NextParagraphStyleName | ( | System::String | value | ) |
Setter for Aspose::Words::Style::get_NextParagraphStyleName.
|
static |