MWAWList Class Reference

a small structure used to store the informations about a list More...

`#include <MWAWList.hxx>`

## Public Member Functions
| MWAWList ()
| default constructor
int | getId () const
| returns the list id
int | getMarker () const
| returns the actual modify marker
void | resize (int levl)
| resize the number of level of the list (keeping only n level)
bool | isCompatibleWith (int levl, MWAWListLevel const &level) const
| returns true if we can add a new level in the list without changing is meaning
bool | isCompatibleWith (MWAWList const &newList) const
| returns true if the list is compatible with the defined level of new list
void | updateIndicesFrom (MWAWList const &list)
| update the indices, the actual level from newList
void | swapId () const
| swap the list id
void | setId (int newId) const
| set the list id
MWAWListLevel | getLevel (int levl) const
| returns a level if it exists
int | numLevels () const
| returns the number of level
void | set (int levl, MWAWListLevel const &level)
| sets a level
void | setLevel (int levl) const
| set the list level
void | openElement () const
| open the list element
void | closeElement () const
| close the list element
int | getStartValueForNextElement () const
| returns the startvalue corresponding to the actual level ( or -1 for an unknown/unordered list)
void | setStartValueForNextElement (int value)
| set the startvalue corresponding to the actual level
bool | isNumeric (int levl) const
| returns true is a level is numeric
bool | addTo (int level, librevenge::RVNGPropertyList &pList, MWAWFontManagerPtr fontManager) const
| retrieve the list level property

## Protected Attributes
std::vector< MWAWListLevel > | m_levels
| the different levels
std::vector< int > | m_actualIndices
std::vector< int > | m_nextIndices
int | m_actLevel
| the actual levels
int | m_id [2]
| the identificator ( actual and auxilliar )
int | m_modifyMarker
| a modification marker ( can be used to check if a list has been send to a interface )

## Detailed Description

a small structure used to store the informations about a list

## Constructor & Destructor Documentation

## ◆ MWAWList()

MWAWList::MWAWList | ( |  | ) |
| inline

default constructor

Referenced by isCompatibleWith(), and updateIndicesFrom().

## Member Function Documentation

## ◆ addTo()

bool MWAWList::addTo | ( | int | level,
|  | librevenge::RVNGPropertyList & | pList,
|  | MWAWFontManagerPtr | fontManager ) const

retrieve the list level property

## ◆ closeElement()

void MWAWList::closeElement | ( |  | ) | const
| inline

close the list element

## ◆ getId()

int MWAWList::getId | ( |  | ) | const
| inline

returns the list id

Referenced by addTo(), and MWAWListManager::needToSend().

## ◆ getLevel()

MWAWListLevel MWAWList::getLevel | ( | int | levl | ) | const
| inline

returns a level if it exists

## ◆ getMarker()

int MWAWList::getMarker | ( |  | ) | const
| inline

returns the actual modify marker

Referenced by MWAWListManager::needToSend().

## ◆ getStartValueForNextElement()

int MWAWList::getStartValueForNextElement | ( |  | ) | const

returns the startvalue corresponding to the actual level ( or -1 for an unknown/unordered list)

## ◆ isCompatibleWith() [1/2]

bool MWAWList::isCompatibleWith | ( | int | levl,
|  | MWAWListLevel const & | level ) const

returns true if we can add a new level in the list without changing is meaning

## ◆ isCompatibleWith() [2/2]

bool MWAWList::isCompatibleWith | ( | MWAWList const & | newList | ) | const

returns true if the list is compatible with the defined level of new list

## ◆ isNumeric()

bool MWAWList::isNumeric | ( | int | levl | ) | const

returns true is a level is numeric

Referenced by getStartValueForNextElement(), and openElement().

## ◆ numLevels()

int MWAWList::numLevels | ( |  | ) | const
| inline

returns the number of level

## ◆ openElement()

void MWAWList::openElement | ( |  | ) | const

open the list element

## ◆ resize()

void MWAWList::resize | ( | int | levl | ) |

resize the number of level of the list (keeping only n level)

Referenced by MWAWListManager::getNewList(), and set().

## ◆ set()

void MWAWList::set | ( | int | levl,
|  | MWAWListLevel const & | level )

sets a level

Referenced by MWAWListManager::getNewList().

## ◆ setId()

void MWAWList::setId | ( | int | newId | ) | const

set the list id

Referenced by addTo(), and MWAWListManager::getNewList().

## ◆ setLevel()

void MWAWList::setLevel | ( | int | levl | ) | const

set the list level

## ◆ setStartValueForNextElement()

void MWAWList::setStartValueForNextElement | ( | int | value | ) |

set the startvalue corresponding to the actual level

## ◆ swapId()

void MWAWList::swapId | ( |  | ) | const
| inline

swap the list id

Note
  a cheat because writerperfect imposes to get a new id if the level 1 changes

Referenced by MWAWListManager::needToSend().

## ◆ updateIndicesFrom()

void MWAWList::updateIndicesFrom | ( | MWAWList const & | list | ) |

update the indices, the actual level from newList

## Member Data Documentation

## ◆ m_actLevel

int MWAWList::m_actLevel
| mutable protected

the actual levels

Referenced by getStartValueForNextElement(), MWAWList(), openElement(), resize(), setLevel(), and setStartValueForNextElement().

## ◆ m_actualIndices

std::vector<int> MWAWList::m_actualIndices
| mutable protected

Referenced by MWAWList(), openElement(), resize(), setLevel(), and updateIndicesFrom().

## ◆ m_id

int MWAWList::m_id[2]
| mutable protected

the identificator ( actual and auxilliar )

Referenced by getId(), MWAWList(), setId(), and swapId().

## ◆ m_levels

std::vector<MWAWListLevel> MWAWList::m_levels
| protected

the different levels

Referenced by addTo(), getLevel(), getStartValueForNextElement(), isCompatibleWith(), isCompatibleWith(), isNumeric(), MWAWList(), numLevels(), openElement(), resize(), set(), setLevel(), setStartValueForNextElement(), and updateIndicesFrom().

## ◆ m_modifyMarker

int MWAWList::m_modifyMarker
| mutable protected

a modification marker ( can be used to check if a list has been send to a interface )

Referenced by getMarker(), MWAWList(), resize(), set(), setStartValueForNextElement(), and updateIndicesFrom().

## ◆ m_nextIndices

std::vector<int> MWAWList::m_nextIndices
| protected

Referenced by getStartValueForNextElement(), MWAWList(), openElement(), resize(), set(), setLevel(), setStartValueForNextElement(), and updateIndicesFrom().

The documentation for this class was generated from the following files:

- MWAWList.hxx
- MWAWList.cxx