Aspose::Words::ListFormat Class Reference

Allows to control what list formatting is applied to a paragraph. More...

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

Inherits System::Object.

Public Member Functions

int32_t get_ListLevelNumber ()
 Gets or sets the list level number (0 to 8) for the paragraph. More...
 
void set_ListLevelNumber (int32_t value)
 Setter for Aspose::Words::ListFormat::get_ListLevelNumber. More...
 
bool get_IsListItem ()
 True when the paragraph has bulleted or numbered formatting applied to it. More...
 
System::SharedPtr< Aspose::Words::Lists::Listget_List ()
 Gets or sets the list this paragraph is a member of. More...
 
void set_List (System::SharedPtr< Aspose::Words::Lists::List > value)
 Setter for Aspose::Words::ListFormat::get_List. More...
 
System::SharedPtr< Aspose::Words::Lists::ListLevelget_ListLevel ()
 Returns the list level formatting plus any formatting overrides applied to the current paragraph. More...
 
void ApplyBulletDefault ()
 Starts a new default bulleted list and applies it to the paragraph. More...
 
void ApplyNumberDefault ()
 Starts a new default numbered list and applies it to the paragraph. More...
 
void RemoveNumbers ()
 Removes numbers or bullets from the current paragraph and sets list level to zero. More...
 
void ListIndent ()
 Increases the list level of the current paragraph by one level. More...
 
void ListOutdent ()
 Decreases the list level of the current paragraph by one level. 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...
 
- 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

Allows to control what list formatting is applied to a paragraph.

A paragraph in a Microsoft Word document can be bulleted or numbered. When a paragraph is bulleted or numbered, it is said that list formatting is applied to the paragraph.

You do not create objects of the Aspose::Words::ListFormat class directly. You access Aspose::Words::ListFormat as a property of another object that can have list formatting associated with it. At the moment the objects that can have list formatting are: Aspose::Words::Paragraph, Aspose::Words::Style and Aspose::Words::DocumentBuilder.

Aspose::Words::ListFormat of a Aspose::Words::Paragraph specifies what list formatting and list level is applied to that particular paragraph.

Aspose::Words::ListFormat of a Aspose::Words::Style (applicable to paragraph styles only) allows to specify what list formatting and list level is applied to all paragraphs of that particular style.

Aspose::Words::ListFormat of a Aspose::Words::DocumentBuilder provides access to the list formatting at the current cursor position inside the Aspose::Words::DocumentBuilder.

The list formatting itself is stored inside a Aspose::Words::Lists::List object that is stored separately from the paragraphs. The list objects are stored inside a Aspose::Words::Lists::ListCollection collection. There is a single Aspose::Words::Lists::ListCollection collection per Aspose::Words::Document.

The paragraphs do not physically belong to a list. The paragraphs just reference a particular list object via the Aspose::Words::ListFormat::get_List property and a particular level in the list via the Aspose::Words::ListFormat::get_ListLevelNumber property. By setting these two properties you control what bullets and numbering is applied to a paragraph.

Member Function Documentation

◆ ApplyBulletDefault()

void Aspose::Words::ListFormat::ApplyBulletDefault ( )

Starts a new default bulleted list and applies it to the paragraph.

This is a shortcut method that creates a new list using the default bulleted template, applies it to the paragraph and selects the 1st list level.

See also
Aspose::Words::ListFormat::get_List, Aspose::Words::ListFormat::RemoveNumbers, Aspose::Words::ListFormat::get_ListLevelNumber

◆ ApplyNumberDefault()

void Aspose::Words::ListFormat::ApplyNumberDefault ( )

Starts a new default numbered list and applies it to the paragraph.

This is a shortcut method that creates a new list using the default numbered template, applies it to the paragraph and selects the 1st list level.

See also
Aspose::Words::ListFormat::get_List, Aspose::Words::ListFormat::RemoveNumbers, Aspose::Words::ListFormat::get_ListLevelNumber

◆ get_IsListItem()

bool Aspose::Words::ListFormat::get_IsListItem ( )

True when the paragraph has bulleted or numbered formatting applied to it.

◆ get_List()

System::SharedPtr<Aspose::Words::Lists::List> Aspose::Words::ListFormat::get_List ( )

Gets or sets the list this paragraph is a member of.

The list that is being assigned to this property must belong to the current document.

The list that is being assigned to this property must not be a list style definition.

Setting this property to null removes bullets and numbering from the paragraph and sets the list level number to zero. Setting this property to null is equivalent to calling Aspose::Words::ListFormat::RemoveNumbers.

See also
Aspose::Words::ListFormat::get_ListLevelNumber, Aspose::Words::ListFormat::RemoveNumbers

◆ get_ListLevel()

System::SharedPtr<Aspose::Words::Lists::ListLevel> Aspose::Words::ListFormat::get_ListLevel ( )

Returns the list level formatting plus any formatting overrides applied to the current paragraph.

◆ get_ListLevelNumber()

int32_t Aspose::Words::ListFormat::get_ListLevelNumber ( )

Gets or sets the list level number (0 to 8) for the paragraph.

In Word documents, lists may consist of 1 or 9 levels, numbered 0 to 8.

Has effect only when the Aspose::Words::ListFormat::get_List property is set to reference a valid list.

See also
Aspose::Words::ListFormat::get_List

◆ ListIndent()

void Aspose::Words::ListFormat::ListIndent ( )

Increases the list level of the current paragraph by one level.

This method changes the list level and applies formatting properties of the new level.

In Word documents, lists may consist of up to nine levels. List formatting for each level specifies what bullet or number is used, left indent, space between the bullet and text etc.

◆ ListOutdent()

void Aspose::Words::ListFormat::ListOutdent ( )

Decreases the list level of the current paragraph by one level.

This method changes the list level and applies formatting properties of the new level.

In Word documents, lists may consist of up to nine levels. List formatting for each level specifies what bullet or number is used, left indent, space between the bullet and text etc.

◆ RemoveNumbers()

void Aspose::Words::ListFormat::RemoveNumbers ( )

Removes numbers or bullets from the current paragraph and sets list level to zero.

Calling this method is equivalent to setting the Aspose::Words::ListFormat::get_List property to null.

◆ set_List()

void Aspose::Words::ListFormat::set_List ( System::SharedPtr< Aspose::Words::Lists::List value)

◆ set_ListLevelNumber()

void Aspose::Words::ListFormat::set_ListLevelNumber ( int32_t  value)