Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

fl_AutoNum Class Reference

#include <fl_AutoNum.h>

List of all members.

Classes

class  ItemStorage

Public Member Functions

 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 (const pf_Frag_Strux *) const
void addItem (pf_Frag_Strux *pItem)
FL_ListType getType () const
UT_uint32 getValue (const pf_Frag_Strux *) const
UT_uint32 getLevel () const
UT_uint32 getNumLabels () const
bool checkReference (const fl_AutoNum &pAuto) const
void setLevel (UT_uint32 level)
UT_sint32 getPositionInList (const pf_Frag_Strux *pItem) const
void setListType (FL_ListType lType)
void setDelim (const gchar *pszDelim)
void setDelim (const std::string &delim)
const gchar * getDelim () const
void setDecimal (const gchar *pszDecimal)
void setDecimal (const std::string &decimal)
const gchar * getDecimal () const
bool isDirty () const
UT_uint16 getStartValue () const
UT_uint32 getStartValue32 () const
void setStartValue (UT_uint32 start)
void insertFirstItem (pf_Frag_Strux *pItem, pf_Frag_Strux *pLast, bool bDoFix=true)
void insertItem (pf_Frag_Strux *pItem, const pf_Frag_Strux *pBefore, bool bDoFix=true)
void prependItem (pf_Frag_Strux *pItem, const pf_Frag_Strux *pAfter, bool bDoFix=true)
void removeItem (const pf_Frag_Strux *pItem)
pf_Frag_StruxgetParentItem () const
void setParentItem (pf_Frag_Strux *pItem)
bool isContainedByList (pf_Frag_Strux *pItem) const
 Returns true if item is contained or immediately adjacent to the list.
pf_Frag_StruxgetNthBlock (UT_uint32 i) const
pf_Frag_StruxgetPrevInList (const pf_Frag_Strux *pItem) const
bool isItem (const pf_Frag_Strux *pItem) const
bool doesItemHaveLabel (const fl_BlockLayout *pItem) const
bool isEmpty (void) const
pf_Frag_StruxgetFirstItem (void) const
pf_Frag_StruxgetLastItem (void) const
bool isLastOnLevel (const pf_Frag_Strux *pItem) const
fl_AutoNumPtr getParent (void) const
fl_AutoNumPtr getActiveParent (void) const
fl_AutoNumConstPtr getAutoNumFromSdh (const pf_Frag_Strux *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) const
UT_uint32 getID () const
UT_uint32 getParentID () const
bool isIDSomeWhere (UT_uint32 ID) const
void getAttributes (std::vector< std::string > &v, bool bEscapeXML) const
PD_DocumentgetDoc (void) const
pf_Frag_StruxgetLastItemInHeiracy (void) const

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 (const fl_AutoNumPtr &pParent)
void _setParentID (UT_uint32 iParentID)
void _calculateLabelStr (UT_uint32 depth)
void _getLabelstr (UT_UCSChar labelStr[], UT_uint32 *insPoint, UT_uint32 depth, const pf_Frag_Strux *pLayout) const
bool _updateItems (UT_sint32 start, const pf_Frag_Strux *notMe)
UT_uint32 _getLevelValue (const fl_AutoNumConstPtr &pAutoNum) const

Protected Attributes

fl_AutoNumPtr m_pParent
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
pf_Frag_Struxm_pParentItem

Private Attributes

ItemStorage m_items

Constructor & Destructor Documentation

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::_calculateLabelStr ( UT_uint32  depth  )  [protected]
void fl_AutoNum::_getLabelstr ( UT_UCSChar  labelStr[],
UT_uint32 insPoint,
UT_uint32  depth,
const pf_Frag_Strux 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 ARABICNUMBERED_LIST, ARROWHEAD_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 getLabel().

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

References getFirstItem().

void fl_AutoNum::_setParent ( const fl_AutoNumPtr pParent  )  [protected]
void fl_AutoNum::_setParentID ( UT_uint32  iParentID  )  [protected]

References m_bDirty, and m_iParentID.

Referenced by findAndSetParentItem().

bool fl_AutoNum::_updateItems ( UT_sint32  start,
const pf_Frag_Strux notMe 
) [protected]
void fl_AutoNum::addItem ( pf_Frag_Strux pItem  ) 
bool fl_AutoNum::checkReference ( const fl_AutoNum pAuto  )  const

References m_pParent.

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().

char * fl_AutoNum::dec2roman ( UT_sint32  value,
bool  lower 
) [static]
bool fl_AutoNum::doesItemHaveLabel ( const fl_BlockLayout pItem  )  const
void fl_AutoNum::findAndSetParentItem ( void   ) 
void fl_AutoNum::fixHierarchy ( void   ) 
void fl_AutoNum::fixListOrder ( void   ) 
fl_AutoNumPtr fl_AutoNum::getActiveParent ( void   )  const

References m_pParent.

void fl_AutoNum::getAttributes ( std::vector< std::string > &  v,
bool  bEscapeXML 
) const
fl_AutoNumConstPtr fl_AutoNum::getAutoNumFromSdh ( const pf_Frag_Strux sdh  )  const
const gchar * fl_AutoNum::getDecimal (  )  const

References m_pszDecimal.

const gchar * fl_AutoNum::getDelim (  )  const

References m_pszDelim.

PD_Document* fl_AutoNum::getDoc ( void   )  const [inline]
pf_Frag_Strux * fl_AutoNum::getFirstItem ( void   )  const
UT_uint32 fl_AutoNum::getID ( void   )  const [inline]
const UT_UCSChar * fl_AutoNum::getLabel ( const pf_Frag_Strux pItem  )  const

References _getLabelstr(), and label.

pf_Frag_Strux * fl_AutoNum::getLastItem ( void   )  const
pf_Frag_Strux * fl_AutoNum::getLastItemInHeiracy ( void   )  const
UT_uint32 fl_AutoNum::getLevel (  )  const [inline]
pf_Frag_Strux * fl_AutoNum::getNthBlock ( UT_uint32  i  )  const
UT_uint32 fl_AutoNum::getNumLabels (  )  const
fl_AutoNumPtr fl_AutoNum::getParent ( void   )  const [inline]

Referenced by removeItem().

UT_uint32 fl_AutoNum::getParentID (  )  const [inline]
pf_Frag_Strux * fl_AutoNum::getParentItem (  )  const

References m_pParentItem.

Referenced by _getLabelstr(), and removeItem().

UT_sint32 fl_AutoNum::getPositionInList ( const pf_Frag_Strux pItem  )  const
pf_Frag_Strux * fl_AutoNum::getPrevInList ( const pf_Frag_Strux pItem  )  const
UT_uint16 fl_AutoNum::getStartValue (  )  const [inline]
UT_uint32 fl_AutoNum::getStartValue32 (  )  const

References m_iStartValue.

FL_ListType fl_AutoNum::getType ( void   )  const

References m_List_Type.

UT_uint32 fl_AutoNum::getValue ( const pf_Frag_Strux pItem  )  const
void fl_AutoNum::insertFirstItem ( pf_Frag_Strux pItem,
pf_Frag_Strux pLast,
bool  bDoFix = true 
)
void fl_AutoNum::insertItem ( pf_Frag_Strux pItem,
const pf_Frag_Strux pBefore,
bool  bDoFix = true 
)
bool fl_AutoNum::isContainedByList ( pf_Frag_Strux pItem  )  const
bool fl_AutoNum::isDirty ( void   )  const

References m_bDirty.

bool fl_AutoNum::isEmpty ( void   )  const
bool fl_AutoNum::isIDSomeWhere ( UT_uint32  ID  )  const

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

bool fl_AutoNum::isItem ( const pf_Frag_Strux pItem  )  const
bool fl_AutoNum::isLastOnLevel ( const pf_Frag_Strux pItem  )  const
bool fl_AutoNum::isUpdating ( void   )  const [inline]

Referenced by update().

void fl_AutoNum::markAsDirty ( void   ) 

References m_bDirty.

void fl_AutoNum::prependItem ( pf_Frag_Strux pItem,
const pf_Frag_Strux pAfter,
bool  bDoFix = true 
)
void fl_AutoNum::removeItem ( const pf_Frag_Strux pItem  ) 
void fl_AutoNum::setAsciiOffset ( UT_uint32  new_asciioffset  ) 

References m_bDirty, and m_iAsciiOffset.

void fl_AutoNum::setDecimal ( const std::string &  decimal  )  [inline]
void fl_AutoNum::setDecimal ( const gchar *  pszDecimal  ) 

References m_bDirty, and m_pszDecimal.

void fl_AutoNum::setDelim ( const gchar *  pszDelim  ) 

References m_bDirty, and m_pszDelim.

void fl_AutoNum::setDelim ( const std::string &  delim  )  [inline]
void fl_AutoNum::setLevel ( UT_uint32  level  )  [inline]
void fl_AutoNum::setListType ( FL_ListType  lType  ) 

References m_List_Type.

void fl_AutoNum::setParentItem ( pf_Frag_Strux pItem  ) 

References m_bDirty, and m_pParentItem.

void fl_AutoNum::setStartValue ( UT_uint32  start  ) 
void fl_AutoNum::update ( UT_uint32  start  ) 

Member Data Documentation

bool fl_AutoNum::m_bDirty [protected]
bool fl_AutoNum::m_bUpdatingItems [protected]

Referenced by _updateItems().

Referenced by getPositionInList().

Referenced by setAsciiOffset().

Referenced by fixHierarchy(), getAttributes(), and update().

gchar fl_AutoNum::m_pszDecimal[80] [protected]
gchar fl_AutoNum::m_pszDelim[80] [protected]
gchar fl_AutoNum::m_pszIndent[80] [protected]

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