fl_AutoNum Class Reference

#include <fl_AutoNum.h>

List of all members.

Public Member Functions

 fl_AutoNum (UT_uint32 id, UT_uint32 start, PL_StruxDocHandle pItem, fl_AutoNum *pParent, const gchar *lDelim, const gchar *lDecimal, FL_ListType lType, PD_Document *pDoc, FV_View *pView)
 fl_AutoNum (UT_uint32 id, UT_uint32 parent_id, FL_ListType lType, UT_uint32 start, const gchar *lDelim, const gchar *lDecimal, PD_Document *pDoc, FV_View *pView)
 ~fl_AutoNum ()
void fixHierarchy (void)
const UT_UCSChargetLabel (PL_StruxDocHandle) const
void addItem (PL_StruxDocHandle pItem)
FL_ListType getType () const
UT_uint32 getValue (PL_StruxDocHandle) const
UT_uint32 getLevel () const
UT_uint32 getNumLabels () const
bool checkReference (fl_AutoNum *pAuto)
void setLevel (UT_uint32 level)
UT_sint32 getPositionInList (PL_StruxDocHandle pItem, UT_uint32 depth) const
void setListType (FL_ListType lType)
void setDelim (const gchar *pszDelim)
const gchar * getDelim () const
void setDecimal (const gchar *pszDecimal)
const gchar * getDecimal () const
bool isDirty () const
UT_uint16 getStartValue () const
UT_uint32 getStartValue32 () const
void setStartValue (UT_uint32 start)
void insertFirstItem (PL_StruxDocHandle pItem, PL_StruxDocHandle pLast, UT_uint32 depth, bool bDoFix=true)
void insertItem (PL_StruxDocHandle pItem, PL_StruxDocHandle pBefore, bool bDoFix=true)
void prependItem (PL_StruxDocHandle pItem, PL_StruxDocHandle pAfter, bool bDoFix=true)
void removeItem (PL_StruxDocHandle pItem)
PL_StruxDocHandle getParentItem () const
void setParentItem (PL_StruxDocHandle pItem)
bool isContainedByList (PL_StruxDocHandle pItem)
 Returns true if item is contained or immediately adjacent to the list.
PL_StruxDocHandle getNthBlock (UT_uint32 i)
PL_StruxDocHandle getPrevInList (PL_StruxDocHandle pItem)
bool isItem (PL_StruxDocHandle pItem) const
bool doesItemHaveLabel (fl_BlockLayout *pItem)
bool isEmpty (void)
PL_StruxDocHandle getFirstItem (void) const
PL_StruxDocHandle getLastItem (void)
bool isLastOnLevel (PL_StruxDocHandle pItem)
fl_AutoNumgetParent (void) const
fl_AutoNumgetActiveParent (void)
fl_AutoNumgetAutoNumFromSdh (PL_StruxDocHandle sdh)
const fl_AutoNumgetAutoNumFromSdh (PL_StruxDocHandle sdh) const
void fixListOrder (void)
void markAsDirty (void)
void findAndSetParentItem (void)
void setAsciiOffset (UT_uint32 new_asciioffset)
void update (UT_uint32 start)
bool isUpdating (void)
UT_uint32 getID () const
UT_uint32 getParentID () const
bool isIDSomeWhere (UT_uint32 ID)
void getAttributes (std::vector< UT_UTF8String > &v, bool bEscapeXML)
PL_StruxDocHandle getLastItemInHeiracy (void)

Static Public Member Functions

static char * dec2roman (UT_sint32 value, bool lower)
static char * dec2ascii (UT_sint32 value, UT_uint32 offset)
static void dec2hebrew (UT_UCSChar labelStr[], UT_uint32 *insPoint, UT_sint32 value)

Protected Member Functions

void _setParent (fl_AutoNum *pParent)
void _setParentID (UT_uint32 iParentID)
void _calculateLabelStr (UT_uint32 depth)
void _getLabelstr (UT_UCSChar labelStr[], UT_uint32 *insPoint, UT_uint32 depth, PL_StruxDocHandle pLayout) const
void _updateItems (UT_uint32 start, PL_StruxDocHandle notMe)
UT_uint32 _getLevelValue (fl_AutoNum *pAutoNum)

Protected Attributes

fl_AutoNumm_pParent
UT_Vector m_pItems
PD_Documentm_pDoc
FV_Viewm_pView
FL_ListType m_List_Type
UT_uint32 m_iID
UT_uint32 m_iParentID
UT_uint32 m_iLevel
UT_uint32 m_iStartValue
UT_uint16 m_iAsciiOffset
bool m_bUpdatingItems
bool m_bDirty
UT_sint32 m_ioffset
gchar m_pszDecimal [80]
gchar m_pszDelim [80]
gchar m_pszIndent [80]
bool m_bWordMultiStyle
PL_StruxDocHandle m_pParentItem


Constructor & Destructor Documentation

fl_AutoNum::fl_AutoNum ( UT_uint32  id,
UT_uint32  start,
PL_StruxDocHandle  pItem,
fl_AutoNum pParent,
const gchar *  lDelim,
const gchar *  lDecimal,
FL_ListType  lType,
PD_Document pDoc,
FV_View pView 
)

fl_AutoNum::fl_AutoNum ( UT_uint32  id,
UT_uint32  parent_id,
FL_ListType  lType,
UT_uint32  start,
const gchar *  lDelim,
const gchar *  lDecimal,
PD_Document pDoc,
FV_View pView 
)

fl_AutoNum::~fl_AutoNum (  ) 


Member Function Documentation

void fl_AutoNum::fixHierarchy ( void   ) 

const UT_UCSChar * fl_AutoNum::getLabel ( PL_StruxDocHandle  pItem  )  const

void fl_AutoNum::addItem ( PL_StruxDocHandle  pItem  ) 

FL_ListType fl_AutoNum::getType ( void   )  const

UT_uint32 fl_AutoNum::getValue ( PL_StruxDocHandle  pItem  )  const

References getPositionInList(), and m_iStartValue.

Referenced by _getLevelValue().

UT_uint32 fl_AutoNum::getLevel (  )  const [inline]

UT_uint32 fl_AutoNum::getNumLabels (  )  const

bool fl_AutoNum::checkReference ( fl_AutoNum pAuto  ) 

References checkReference(), and m_pParent.

Referenced by _setParent(), and checkReference().

void fl_AutoNum::setLevel ( UT_uint32  level  )  [inline]

UT_sint32 fl_AutoNum::getPositionInList ( PL_StruxDocHandle  pItem,
UT_uint32  depth 
) const

void fl_AutoNum::setListType ( FL_ListType  lType  ) 

void fl_AutoNum::setDelim ( const gchar *  pszDelim  ) 

const gchar * fl_AutoNum::getDelim (  )  const

void fl_AutoNum::setDecimal ( const gchar *  pszDecimal  ) 

const gchar * fl_AutoNum::getDecimal (  )  const

bool fl_AutoNum::isDirty ( void   )  const

References m_bDirty.

Referenced by PD_Document::updateDirtyLists().

UT_uint16 fl_AutoNum::getStartValue (  )  const [inline]

UT_uint32 fl_AutoNum::getStartValue32 (  )  const

void fl_AutoNum::setStartValue ( UT_uint32  start  ) 

void fl_AutoNum::insertFirstItem ( PL_StruxDocHandle  pItem,
PL_StruxDocHandle  pLast,
UT_uint32  depth,
bool  bDoFix = true 
)

void fl_AutoNum::insertItem ( PL_StruxDocHandle  pItem,
PL_StruxDocHandle  pBefore,
bool  bDoFix = true 
)

void fl_AutoNum::prependItem ( PL_StruxDocHandle  pItem,
PL_StruxDocHandle  pAfter,
bool  bDoFix = true 
)

void fl_AutoNum::removeItem ( PL_StruxDocHandle  pItem  ) 

PL_StruxDocHandle fl_AutoNum::getParentItem (  )  const

void fl_AutoNum::setParentItem ( PL_StruxDocHandle  pItem  ) 

References m_bDirty, and m_pParentItem.

Referenced by insertItem(), prependItem(), and removeItem().

bool fl_AutoNum::isContainedByList ( PL_StruxDocHandle  pItem  ) 

PL_StruxDocHandle fl_AutoNum::getNthBlock ( UT_uint32  i  ) 

PL_StruxDocHandle fl_AutoNum::getPrevInList ( PL_StruxDocHandle  pItem  ) 

bool fl_AutoNum::isItem ( PL_StruxDocHandle  pItem  )  const

bool fl_AutoNum::doesItemHaveLabel ( fl_BlockLayout pItem  ) 

bool fl_AutoNum::isEmpty ( void   ) 

PL_StruxDocHandle fl_AutoNum::getFirstItem ( void   )  const

PL_StruxDocHandle fl_AutoNum::getLastItem ( void   ) 

bool fl_AutoNum::isLastOnLevel ( PL_StruxDocHandle  pItem  ) 

fl_AutoNum* fl_AutoNum::getParent ( void   )  const [inline]

fl_AutoNum * fl_AutoNum::getActiveParent ( void   ) 

fl_AutoNum * fl_AutoNum::getAutoNumFromSdh ( PL_StruxDocHandle  sdh  ) 

const fl_AutoNum * fl_AutoNum::getAutoNumFromSdh ( PL_StruxDocHandle  sdh  )  const

void fl_AutoNum::fixListOrder ( void   ) 

void fl_AutoNum::markAsDirty ( void   ) 

void fl_AutoNum::findAndSetParentItem ( void   ) 

void fl_AutoNum::setAsciiOffset ( UT_uint32  new_asciioffset  ) 

References m_bDirty, and m_iAsciiOffset.

void fl_AutoNum::update ( UT_uint32  start  ) 

bool fl_AutoNum::isUpdating ( void   )  [inline]

Referenced by update().

UT_uint32 fl_AutoNum::getID ( void   )  const [inline]

UT_uint32 fl_AutoNum::getParentID (  )  const [inline]

bool fl_AutoNum::isIDSomeWhere ( UT_uint32  ID  ) 

This method returns true if the requested ID is somewhere in this List heiracy.

References getID(), and getParent().

char * fl_AutoNum::dec2roman ( UT_sint32  value,
bool  lower 
) [static]

char * fl_AutoNum::dec2ascii ( UT_sint32  value,
UT_uint32  offset 
) [static]

void fl_AutoNum::dec2hebrew ( UT_UCSChar  labelStr[],
UT_uint32 insPoint,
UT_sint32  value 
) [static]

Referenced by _getLabelstr().

void fl_AutoNum::getAttributes ( std::vector< UT_UTF8String > &  v,
bool  bEscapeXML 
)

PL_StruxDocHandle fl_AutoNum::getLastItemInHeiracy ( void   ) 

void fl_AutoNum::_setParent ( fl_AutoNum pParent  )  [protected]

void fl_AutoNum::_setParentID ( UT_uint32  iParentID  )  [protected]

References m_bDirty, and m_iParentID.

Referenced by findAndSetParentItem().

void fl_AutoNum::_calculateLabelStr ( UT_uint32  depth  )  [protected]

void fl_AutoNum::_getLabelstr ( UT_UCSChar  labelStr[],
UT_uint32 insPoint,
UT_uint32  depth,
PL_StruxDocHandle  pLayout 
) const [protected]

This method recursively calculates a label based on the type of label of the AutoNum Class. This is output to the label string labelStr.

insPoint is the position in the string where the new text goes. It starts Pointing to the byte == 0 depth is the level of recursion pLayout is a pointer to the Layout item containing the current list item

References _getLabelstr(), ARABICNUMBERED_LIST, BOX_LIST, BULLETED_LIST, CONV_TO_UCS, DASHED_LIST, dec2ascii(), dec2hebrew(), dec2roman(), DIAMOND_LIST, FREEP, getParentItem(), getPositionInList(), HAND_LIST, HEART_LIST, HEBREW_LIST, IMPLIES_LIST, IS_NUMBERED_LIST_TYPE, LOWERCASE_LIST, LOWERROMAN_LIST, m_iStartValue, m_List_Type, m_pParent, m_pszDecimal, m_pszDelim, NOT_A_LIST, NUMBERED_LIST, SQUARE_LIST, STAR_LIST, TICK_LIST, TRIANGLE_LIST, UPPERCASE_LIST, UPPERROMAN_LIST, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_SHOULD_NOT_HAPPEN.

Referenced by _getLabelstr(), and getLabel().

void fl_AutoNum::_updateItems ( UT_uint32  start,
PL_StruxDocHandle  notMe 
) [protected]

UT_uint32 fl_AutoNum::_getLevelValue ( fl_AutoNum pAutoNum  )  [inline, protected]


Member Data Documentation