Represents formatting of a list.
A list in a Microsoft Word document is a set of list formatting properties. Each list can have up to 9 levels and formatting properties, such as number style, start value, indent, tab position etc are defined separately for each level.
A List object always belongs to the ListCollection collection.
To create a new list, use the Add methods of the ListCollection collection.
To modify formatting of a list, use ListLevel objects found in the ListLevels collection.
To apply or remove list formatting from a paragraph, use ListFormat.
Shows how to work with list levels.
Shows how to apply custom list formatting to paragraphs when using DocumentBuilder.
Shows how to restart numbering in a list by copying a list.
#include <Aspose.Words.Cpp/Lists/List.h>
Public Member Functions | |
int32_t | CompareTo (SharedPtr< List > other) override |
Compares the specified list to the current list. More... | |
bool | Equals (SharedPtr< List > list) |
Compares with the specified list. More... | |
bool | Equals (SharedPtr< Object > obj) override |
SharedPtr< DocumentBase > | get_Document () const |
Gets the owner document. More... | |
bool | get_IsListStyleDefinition () |
Returns true if this list is a definition of a list style. More... | |
bool | get_IsListStyleReference () |
Returns true if this list is a reference to a list style. More... | |
bool | get_IsMultiLevel () |
Returns true when the list contains 9 levels; false when 1 level. More... | |
bool | get_IsRestartAtEachSection () |
Specifies whether list should be restarted at each section. Default value is false. More... | |
int32_t | get_ListId () const |
Gets the unique identifier of the list. More... | |
SharedPtr< ListLevelCollection > | get_ListLevels () |
Gets the collection of list levels for this list. More... | |
SharedPtr< Style > | get_Style () |
Gets the list style that this list references or defines. More... | |
int32_t | GetHashCode () const override |
Calculates hash code for this list object. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | set_IsRestartAtEachSection (bool value) |
Setter for get_IsRestartAtEachSection. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
|
override |
Compares the specified list to the current list.
bool Aspose::Words::Lists::List::Equals | ( | System::SharedPtr< Aspose::Words::Lists::List > | list | ) |
Compares with the specified list.
|
override |
System::SharedPtr<Aspose::Words::DocumentBase> Aspose::Words::Lists::List::get_Document | ( | ) | const |
Gets the owner document.
A list always has a parent document and is valid only in the context of that document.
Shows how to verify owner document properties of lists.
bool Aspose::Words::Lists::List::get_IsListStyleDefinition | ( | ) |
Returns true if this list is a definition of a list style.
When this property is true, the Style property returns the list style that this list defines.
By modifying properties of a list that defines a list style, you modify the properties of the list style.
A list that is a definition of a list style cannot be applied directly to paragraphs to make them numbered.
Shows how to create a list style and use it in a document.
bool Aspose::Words::Lists::List::get_IsListStyleReference | ( | ) |
Returns true if this list is a reference to a list style.
Note, modifying properties of a list that is a reference to list style has no effect. The list formatting specified in the list style itself always takes precedence.
Shows how to create a list style and use it in a document.
bool Aspose::Words::Lists::List::get_IsMultiLevel | ( | ) |
Returns true when the list contains 9 levels; false when 1 level.
The lists that you create with Aspose.Words are always multi-level lists and contain 9 levels.
Microsoft Word 2003 and later always create multi-level lists with 9 levels. But in some documents, created with earlier versions of Microsoft Word you might encounter lists that have 1 level only.
Shows how to create a list style and use it in a document.
bool Aspose::Words::Lists::List::get_IsRestartAtEachSection | ( | ) |
Specifies whether list should be restarted at each section. Default value is false.
This option is supported only in RTF, DOC and DOCX document formats.
This option will be written to DOCX only if OoxmlCompliance is higher then Ecma376_2006.
Shows how to configure a list to restart numbering at each section.
int32_t Aspose::Words::Lists::List::get_ListId | ( | ) | const |
Gets the unique identifier of the list.
You do not normally need to use this property. But if you use it, you normally do so in conjunction with the GetListByListId() method to find a list by its identifier.
Shows how to output all paragraphs in a document that are list items.
Shows how to verify owner document properties of lists.
System::SharedPtr<Aspose::Words::Lists::ListLevelCollection> Aspose::Words::Lists::List::get_ListLevels | ( | ) |
Gets the collection of list levels for this list.
Use this property to access and modify formatting individual to each level of the list.
Shows how to apply custom list formatting to paragraphs when using DocumentBuilder.
System::SharedPtr<Aspose::Words::Style> Aspose::Words::Lists::List::get_Style | ( | ) |
Gets the list style that this list references or defines.
If this list is not associated with a list style, the property will return null.
A list could be a reference to a list style, in this case IsListStyleReference will be true.
A list could be a definition of a list style, in this case IsListStyleDefinition will be true. Such a list cannot be applied to paragraphs in the document directly.
Shows how to create a list style and use it in a document.
|
overridevirtual |
Calculates hash code for this list object.
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
void Aspose::Words::Lists::List::set_IsRestartAtEachSection | ( | bool | value | ) |
|
static |