#include <fl_AutoNum.h>
| 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 | |||
| ) |
References _setParent(), addItem(), PD_Document::addList(), m_pDoc, m_pszDecimal, and m_pszDelim.
Referenced by IE_Imp_RTF::ApplyParagraphAttributes().
| 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 | |||
| ) |
References _setParent(), PD_Document::getListByID(), m_iParentID, m_pDoc, m_pszDecimal, and m_pszDelim.
| fl_AutoNum::~fl_AutoNum | ( | ) |
| void fl_AutoNum::fixHierarchy | ( | void | ) |
Check that this list is not a member of another list.
References _setParent(), XAP_App::getApp(), PD_Document::getAttributeFromSDH(), XAP_Frame::getCurrentView(), UT_GenericVector< T >::getItemCount(), XAP_App::getLastFocussedFrame(), getLevel(), PD_Document::getListByID(), UT_GenericVector< T >::getNthItem(), FV_View::getRevisionLevel(), FV_View::isShowRevisions(), m_bDirty, m_iID, m_iLevel, m_iParentID, m_pDoc, m_pItems, m_pParent, PD_MAX_REVISION, PT_PARENTID_ATTRIBUTE_NAME, and UT_ASSERT.
Referenced by IE_Imp_WordPerfect::_updateDocumentOrderedListDefinition(), IE_Imp_WordPerfect::_updateDocumentUnorderedListDefinition(), IE_Imp_RTF::ApplyParagraphAttributes(), PD_Document::fixListHierarchy(), fl_BlockLayout::StartList(), and PD_Document::updateDirtyLists().
| const UT_UCSChar * fl_AutoNum::getLabel | ( | PL_StruxDocHandle | pItem | ) | const |
References _getLabelstr(), and label.
Referenced by IE_Exp_RTF::_write_parafmt(), fl_BlockLayout::getListLabel(), and AP_Dialog_Lists::getListLabel().
| void fl_AutoNum::addItem | ( | PL_StruxDocHandle | pItem | ) |
References UT_GenericVector< T >::addItem(), UT_GenericVector< T >::findItem(), fixListOrder(), m_bDirty, and m_pItems.
Referenced by IE_Imp_RTF::ApplyParagraphAttributes(), and fl_AutoNum().
| FL_ListType fl_AutoNum::getType | ( | void | ) | const |
References m_List_Type.
Referenced by IE_Exp_RTF::_output_ListRTF(), IE_Exp_RTF::_write_parafmt(), ListHelper::addList(), IE_Exp_OpenXML_Listener::addLists(), AP_Dialog_Lists::fillDialogFromBlock(), fl_BlockLayout::getListType(), ListHelper::getNextLabel(), IE_Imp_RTF::mapID(), AP_Dialog_Lists::PopulateDialogData(), FV_View::processSelectedBlocks(), and fl_BlockLayout::StopListInBlock().
| UT_uint32 fl_AutoNum::getValue | ( | PL_StruxDocHandle | pItem | ) | const |
| UT_uint32 fl_AutoNum::getLevel | ( | ) | const [inline] |
Referenced by fl_BlockLayout::_addBlockToPrevList(), IE_Exp_RTF::_write_parafmt(), IE_Exp_OpenXML_Listener::addLists(), findAndSetParentItem(), fixHierarchy(), getLastItemInHeiracy(), fl_BlockLayout::getLevel(), fl_ContainerLayout::getLevelInList(), fl_BlockLayout::getListAttributesVector(), IE_Imp_RTF::mapID(), removeItem(), fl_BlockLayout::StartList(), and fl_BlockLayout::StopListInBlock().
| UT_uint32 fl_AutoNum::getNumLabels | ( | ) | const |
References UT_GenericVector< T >::getItemCount(), and m_pItems.
Referenced by AP_Dialog_Lists::Apply(), findAndSetParentItem(), and FV_View::getAllBlocksInList().
| bool fl_AutoNum::checkReference | ( | fl_AutoNum * | pAuto | ) |
| void fl_AutoNum::setLevel | ( | UT_uint32 | level | ) | [inline] |
Referenced by IE_Imp_OPML::_createList(), and removeItem().
| UT_sint32 fl_AutoNum::getPositionInList | ( | PL_StruxDocHandle | pItem, | |
| UT_uint32 | depth | |||
| ) | const |
References getAutoNumFromSdh(), UT_GenericVector< T >::getFirstItem(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_bWordMultiStyle, m_pItems, and UT_ASSERT.
Referenced by _getLabelstr(), and getValue().
| void fl_AutoNum::setListType | ( | FL_ListType | lType | ) |
References m_List_Type.
Referenced by FV_View::changeListStyle(), and AP_Dialog_Lists::fillFakeLabels().
| void fl_AutoNum::setDelim | ( | const gchar * | pszDelim | ) |
References m_bDirty, and m_pszDelim.
Referenced by FV_View::changeListStyle(), and AP_Dialog_Lists::fillFakeLabels().
| const gchar * fl_AutoNum::getDelim | ( | ) | const |
References m_pszDelim.
Referenced by FV_View::_charInsert(), IE_Exp_RTF::_generate_level_Text(), IE_Exp_RTF::_write_parafmt(), ListHelper::addList(), and IE_Exp_OpenXML_Listener::addLists().
| void fl_AutoNum::setDecimal | ( | const gchar * | pszDecimal | ) |
References m_bDirty, and m_pszDecimal.
Referenced by FV_View::changeListStyle(), and AP_Dialog_Lists::fillFakeLabels().
| const gchar * fl_AutoNum::getDecimal | ( | ) | const |
References m_pszDecimal.
Referenced by FV_View::_charInsert(), IE_Exp_RTF::_generate_level_Text(), IE_Exp_RTF::_write_parafmt(), and IE_Exp_OpenXML_Listener::addLists().
| bool fl_AutoNum::isDirty | ( | void | ) | const |
| UT_uint16 fl_AutoNum::getStartValue | ( | ) | const [inline] |
| UT_uint32 fl_AutoNum::getStartValue32 | ( | ) | const |
| void fl_AutoNum::setStartValue | ( | UT_uint32 | start | ) |
References _updateItems(), m_bDirty, and m_iStartValue.
Referenced by FV_View::changeListStyle(), and AP_Dialog_Lists::fillFakeLabels().
| void fl_AutoNum::insertFirstItem | ( | PL_StruxDocHandle | pItem, | |
| PL_StruxDocHandle | pLast, | |||
| UT_uint32 | depth, | |||
| bool | bDoFix = true | |||
| ) |
References _updateItems(), PD_Document::areListUpdatesAllowed(), UT_GenericVector< T >::findItem(), fixListOrder(), getAutoNumFromSdh(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::insertItemAt(), m_bDirty, m_pDoc, m_pItems, m_pParent, and m_pParentItem.
Referenced by fl_BlockLayout::_lookupProperties(), and AP_Dialog_Lists::generateFakeLabels().
| void fl_AutoNum::insertItem | ( | PL_StruxDocHandle | pItem, | |
| PL_StruxDocHandle | pBefore, | |||
| bool | bDoFix = true | |||
| ) |
References _updateItems(), PD_Document::areListUpdatesAllowed(), UT_GenericVector< T >::findItem(), fixListOrder(), PD_Document::getListsCount(), PD_Document::getNthList(), getParentItem(), UT_GenericVector< T >::insertItemAt(), m_bDirty, m_pDoc, m_pItems, setParentItem(), and UT_ASSERT.
Referenced by fl_BlockLayout::_addBlockToPrevList(), fl_BlockLayout::_lookupProperties(), and AP_Dialog_Lists::generateFakeLabels().
| void fl_AutoNum::prependItem | ( | PL_StruxDocHandle | pItem, | |
| PL_StruxDocHandle | pAfter, | |||
| bool | bDoFix = true | |||
| ) |
References _updateItems(), PD_Document::areListUpdatesAllowed(), UT_GenericVector< T >::findItem(), fixListOrder(), PD_Document::getListsCount(), UT_GenericVector< T >::getNthItem(), PD_Document::getNthList(), getParentItem(), UT_GenericVector< T >::insertItemAt(), m_bDirty, m_pDoc, m_pItems, setParentItem(), and UT_ASSERT.
Referenced by fl_BlockLayout::_lookupProperties(), and fl_BlockLayout::_prependBlockToPrevList().
| void fl_AutoNum::removeItem | ( | PL_StruxDocHandle | pItem | ) |
References _setParent(), _updateItems(), PD_Document::areListUpdatesAllowed(), UT_GenericVector< T >::deleteNthItem(), UT_GenericVector< T >::findItem(), getLevel(), PD_Document::getListsCount(), UT_GenericVector< T >::getNthItem(), PD_Document::getNthList(), getParent(), getParentItem(), m_bDirty, m_pDoc, m_pItems, setLevel(), setParentItem(), UT_ASSERT, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
Referenced by fl_BlockLayout::_lookupProperties(), and fl_BlockLayout::doclistener_deleteStrux().
| PL_StruxDocHandle fl_AutoNum::getParentItem | ( | ) | const |
References m_pParentItem.
Referenced by _getLabelstr(), _updateItems(), insertItem(), prependItem(), removeItem(), and FV_View::setStyleAtPos().
| 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 | ) |
Returns true if item is contained or immediately adjacent to the list.
References UT_GenericVector< T >::getFirstItem(), UT_GenericVector< T >::getItemCount(), PD_Document::getNextStruxOfType(), UT_GenericVector< T >::getNthItem(), PD_Document::getPrevStruxOfType(), PD_Document::getStruxPosition(), m_pDoc, m_pItems, and PTX_Block.
Referenced by IE_Imp_RTF::mapID().
| PL_StruxDocHandle fl_AutoNum::getNthBlock | ( | UT_uint32 | i | ) |
References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), and m_pItems.
Referenced by FV_View::changeListStyle(), findAndSetParentItem(), and FV_View::getAllBlocksInList().
| PL_StruxDocHandle fl_AutoNum::getPrevInList | ( | PL_StruxDocHandle | pItem | ) |
References UT_GenericVector< T >::findItem(), UT_GenericVector< T >::getNthItem(), and m_pItems.
| bool fl_AutoNum::isItem | ( | PL_StruxDocHandle | pItem | ) | const |
References UT_GenericVector< T >::findItem(), and m_pItems.
Referenced by _getLevelValue(), fl_BlockLayout::_lookupProperties(), IE_Imp_RTF::ApplyParagraphAttributes(), fl_BlockLayout::doclistener_deleteStrux(), getAutoNumFromSdh(), getLastItemInHeiracy(), fl_BlockLayout::getPreviousList(), and fl_BlockLayout::StartList().
| bool fl_AutoNum::doesItemHaveLabel | ( | fl_BlockLayout * | pItem | ) |
| bool fl_AutoNum::isEmpty | ( | void | ) |
| PL_StruxDocHandle fl_AutoNum::getFirstItem | ( | void | ) | const |
References UT_GenericVector< T >::getFirstItem(), UT_GenericVector< T >::getItemCount(), and m_pItems.
Referenced by _getLevelValue(), IE_Exp_RTF::_output_ListRTF(), AP_Dialog_Lists::Apply(), FV_View::cmdCharDelete(), FV_View::getAllBlocksInList(), fl_BlockLayout::isFirstInList(), FV_View::setStyleAtPos(), and update().
| PL_StruxDocHandle fl_AutoNum::getLastItem | ( | void | ) |
References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), and m_pItems.
Referenced by FV_View::cmdCharDelete(), getLastItemInHeiracy(), and fl_ContainerLayout::getLevelInList().
| bool fl_AutoNum::isLastOnLevel | ( | PL_StruxDocHandle | pItem | ) |
References UT_GenericVector< T >::findItem(), UT_GenericVector< T >::getItemCount(), and m_pItems.
Referenced by AP_Dialog_Lists::isLastOnLevel().
| fl_AutoNum* fl_AutoNum::getParent | ( | void | ) | const [inline] |
Referenced by fl_BlockLayout::_addBlockToPrevList(), IE_Exp_RTF::_generate_level_Text(), _getLevelValue(), fl_BlockLayout::_lookupProperties(), IE_Exp_RTF::_output_MultiLevelRTF(), IE_Exp_RTF::_output_OveridesRTF(), IE_Exp_RTF::_write_listtable(), IE_Exp_RTF::_write_parafmt(), getActiveParent(), fl_BlockLayout::getPreviousList(), isIDSomeWhere(), fl_BlockLayout::remItemFromList(), removeItem(), and fl_BlockLayout::StopListInBlock().
| fl_AutoNum * fl_AutoNum::getActiveParent | ( | void | ) |
| fl_AutoNum * fl_AutoNum::getAutoNumFromSdh | ( | PL_StruxDocHandle | sdh | ) |
References PD_Document::areListUpdatesAllowed(), PD_Document::getListsCount(), PD_Document::getNthList(), isItem(), and m_pDoc.
Referenced by getPositionInList(), and insertFirstItem().
| const fl_AutoNum * fl_AutoNum::getAutoNumFromSdh | ( | PL_StruxDocHandle | sdh | ) | const |
| void fl_AutoNum::fixListOrder | ( | void | ) |
References compareListItems(), m_bDirty, m_pDoc, m_pItems, and UT_GenericVector< T >::qsort().
Referenced by addItem(), insertFirstItem(), insertItem(), and prependItem().
| void fl_AutoNum::markAsDirty | ( | void | ) |
References m_bDirty.
Referenced by fl_BlockLayout::_lookupProperties(), IE_Imp_RTF::ApplyParagraphAttributes(), and fl_BlockLayout::doclistener_deleteObject().
| void fl_AutoNum::findAndSetParentItem | ( | void | ) |
References _setParent(), _setParentID(), UT_GenericVector< T >::getFirstItem(), getID(), UT_GenericVector< T >::getItemCount(), getLevel(), PD_Document::getListByID(), PD_Document::getListsCount(), getNthBlock(), PD_Document::getNthList(), getNumLabels(), PD_Document::getStruxPosition(), m_bDirty, m_iLevel, m_iParentID, m_pDoc, m_pItems, m_pParent, m_pParentItem, update(), and UT_ASSERT.
Referenced by IE_Imp_RTF::ApplyParagraphAttributes(), and PD_Document::updateDirtyLists().
| void fl_AutoNum::setAsciiOffset | ( | UT_uint32 | new_asciioffset | ) |
References m_bDirty, and m_iAsciiOffset.
| void fl_AutoNum::update | ( | UT_uint32 | start | ) |
References _updateItems(), UT_GenericVector< T >::findItem(), getFirstItem(), isUpdating(), m_pItems, m_pParent, and update().
Referenced by fl_BlockLayout::_lookupProperties(), AP_Dialog_Lists::Apply(), findAndSetParentItem(), fl_BlockLayout::listUpdate(), update(), and PD_Document::updateDirtyLists().
| bool fl_AutoNum::isUpdating | ( | void | ) | [inline] |
Referenced by update().
| UT_uint32 fl_AutoNum::getID | ( | void | ) | const [inline] |
Referenced by fl_BlockLayout::_addBlockToPrevList(), FV_View::_charInsert(), fl_BlockLayout::_lookupProperties(), IE_Exp_RTF::_output_OveridesRTF(), _setParent(), IE_Exp_RTF::_write_listtable(), PD_Document::addList(), IE_Exp_OpenXML_Listener::addLists(), PD_Document::appendList(), AP_Dialog_Lists::Apply(), AP_Dialog_Lists::fillDialogFromBlock(), findAndSetParentItem(), getAttributes(), AP_Dialog_Lists::getID(), PD_Document::getListByID(), fl_BlockLayout::getNextList(), fl_BlockLayout::getParentItem(), fl_BlockLayout::getPreviousList(), ie_exp_RTF_ListOveride::ie_exp_RTF_ListOveride(), ie_exp_RTF_MsWord97List::ie_exp_RTF_MsWord97List(), isIDSomeWhere(), IE_Imp_RTF::mapID(), fl_BlockLayout::remItemFromList(), ListHelper::retrieveID(), fl_BlockLayout::StartList(), fl_BlockLayout::StopListInBlock(), and fl_BlockLayout::transferListFlags().
| UT_uint32 fl_AutoNum::getParentID | ( | ) | const [inline] |
Referenced by IE_Exp_RTF::_write_listtable(), and IE_Exp_OpenXML_Listener::addLists().
| 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] |
References UT_String::c_str(), and UT_String::size().
Referenced by _getLabelstr(), and FL_DocLayout::getStringFromFootnoteVal().
Referenced by _getLabelstr(), and FL_DocLayout::getStringFromFootnoteVal().
| 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 | |||
| ) |
References getID(), m_iID, m_iStartValue, m_List_Type, m_pParent, m_pszDecimal, and m_pszDelim.
Referenced by s_AbiWord_1_Listener::_handleLists().
| PL_StruxDocHandle fl_AutoNum::getLastItemInHeiracy | ( | void | ) |
References getLastItem(), getLevel(), PD_Document::getListsCount(), PD_Document::getNthList(), isItem(), and m_pDoc.
Referenced by AP_Dialog_Lists::Apply().
| void fl_AutoNum::_setParent | ( | fl_AutoNum * | pParent | ) | [protected] |
References PD_Document::changeStruxForLists(), checkReference(), getID(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_bDirty, m_iParentID, m_pDoc, m_pItems, and m_pParent.
Referenced by findAndSetParentItem(), fixHierarchy(), fl_AutoNum(), and removeItem().
| void fl_AutoNum::_setParentID | ( | UT_uint32 | iParentID | ) | [protected] |
| 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] |
References _updateItems(), PD_Document::areListUpdatesAllowed(), UT_GenericVector< T >::getItemCount(), PD_Document::getListsCount(), UT_GenericVector< T >::getNthItem(), PD_Document::getNthList(), getParentItem(), PD_Document::listUpdate(), m_bDirty, m_bUpdatingItems, m_pDoc, m_pItems, UT_ASSERT, and UT_ASSERT_HARMLESS.
Referenced by _updateItems(), insertFirstItem(), insertItem(), prependItem(), removeItem(), setStartValue(), and update().
| UT_uint32 fl_AutoNum::_getLevelValue | ( | fl_AutoNum * | pAutoNum | ) | [inline, protected] |
References getFirstItem(), getParent(), getValue(), and isItem().
fl_AutoNum* fl_AutoNum::m_pParent [protected] |
Referenced by _getLabelstr(), _setParent(), checkReference(), findAndSetParentItem(), fixHierarchy(), getActiveParent(), getAttributes(), insertFirstItem(), and update().
UT_Vector fl_AutoNum::m_pItems [protected] |
Referenced by _setParent(), _updateItems(), addItem(), findAndSetParentItem(), fixHierarchy(), fixListOrder(), getFirstItem(), getLastItem(), getNthBlock(), getNumLabels(), getPositionInList(), getPrevInList(), insertFirstItem(), insertItem(), isContainedByList(), isEmpty(), isItem(), isLastOnLevel(), prependItem(), removeItem(), and update().
PD_Document* fl_AutoNum::m_pDoc [protected] |
FV_View* fl_AutoNum::m_pView [protected] |
FL_ListType fl_AutoNum::m_List_Type [protected] |
Referenced by _getLabelstr(), getAttributes(), getType(), and setListType().