PP_AttrProp Class Reference

#include <pp_AttrProp.h>

Inheritance diagram for PP_AttrProp:

PP_Revision

List of all members.

Public Member Functions

 PP_AttrProp ()
 This is the sole explicit constructor of class PP_AttrProp.
virtual ~PP_AttrProp ()
 This is the sole explicit destructor of class PP_AttrProp.
bool setAttributes (const gchar **attributes)
bool setAttributes (const UT_GenericVector< const gchar * > *pVector)
bool setProperties (const gchar **properties)
bool setProperties (const UT_GenericVector< gchar * > *pVector)
const gchar ** getAttributes () const
const gchar ** getProperties () const
bool setAttribute (const gchar *szName, const gchar *szValue)
bool setProperty (const gchar *szName, const gchar *szValue)
bool getNthAttribute (int ndx, const gchar *&szName, const gchar *&szValue) const
bool getNthProperty (int ndx, const gchar *&szName, const gchar *&szValue) const
bool getAttribute (const gchar *szName, const gchar *&szValue) const
bool getProperty (const gchar *szName, const gchar *&szValue) const
const PP_PropertyTypegetPropertyType (const gchar *szName, tProperty_type Type) const
bool hasProperties (void) const
 Returns whether or not the AP has any properties.
bool hasAttributes (void) const
 Returns whether or not the AP has any attributes.
size_t getPropertyCount (void) const
size_t getAttributeCount (void) const
bool areAlreadyPresent (const gchar **attributes, const gchar **properties) const
 Returns whether or not the given attributes and properties are identically present in [this] AP.
bool areAnyOfTheseNamesPresent (const gchar **attributes, const gchar **properties) const
bool isExactMatch (const PP_AttrProp *pMatch) const
bool isEquivalent (const PP_AttrProp *pAP2) const
bool isEquivalent (const gchar **attrs, const gchar **props) const
PP_AttrPropcreateExactly (const gchar **attributes, const gchar **properties) const
PP_AttrPropcloneWithReplacements (const gchar **attributes, const gchar **properties, bool bClearProps) const
PP_AttrPropcloneWithElimination (const gchar **attributes, const gchar **properties) const
PP_AttrPropcloneWithEliminationIfEqual (const gchar **attributes, const gchar **properties) const
void markReadOnly (void)
UT_uint32 getCheckSum (void) const
void operator= (const PP_AttrProp &Other)
UT_uint32 getIndex (void) const
void setIndex (UT_uint32 i)
PT_AttrPropIndex getRevisedIndex () const
PP_RevisionStategetRevisionState () const
void setRevisedIndex (PT_AttrPropIndex i, UT_uint32 iId, bool bShow, bool bMark, bool bHidden) const
bool getRevisionHidden () const
void prune ()
 This method clears both empty attributes and empty properties from [this] AP.
bool explodeStyle (const PD_Document *pDoc, bool bOverwrite=false)
 This function transfers attributes and properties defined in style into the AP.
void miniDump (const PD_Document *pDoc) const

Protected Types

typedef std::pair< const gchar
*, const PP_PropertyType * > 
PropertyPair

Protected Member Functions

void _computeCheckSum (void)
void _clearEmptyProperties ()
 This function will remove all properties that are set to "".
void _clearEmptyAttributes ()
 This function will remove all attributes that are equal to "" (*<gchar *> == NULL).

Protected Attributes

UT_GenericStringMap< gchar * > * m_pAttributes
UT_GenericStringMap
< PropertyPair * > * 
m_pProperties
bool m_bIsReadOnly
UT_uint32 m_checkSum
UT_uint32 m_index
const gchar ** m_szProperties
PT_AttrPropIndex m_iRevisedIndex
PP_RevisionState m_RevisionState
bool m_bRevisionHidden


Member Typedef Documentation

typedef std::pair<const gchar*,const PP_PropertyType *> PP_AttrProp::PropertyPair [protected]


Constructor & Destructor Documentation

PP_AttrProp::PP_AttrProp (  ) 

PP_AttrProp::~PP_AttrProp (  )  [virtual]

This is the sole explicit destructor of class PP_AttrProp.

References FREEP, gchar, m_pAttributes, m_pProperties, m_szProperties, s, and xxx_UT_DEBUGMSG.


Member Function Documentation

bool PP_AttrProp::setAttributes ( const gchar **  attributes  ) 

Sets attributes as given in the NULL-terminated input array of (attribute, value) pairs.

Parameters:
attributes An array of strings, read in (attribute, value) form.

Reimplemented in PP_Revision.

References gchar, and setAttribute().

Referenced by ABI_Collab_Import::_import(), PD_Document::changeDocPropeties(), cloneWithReplacements(), pt_PieceTable::createAndSendDocPropCR(), pp_TableAttrProp::createAP(), createExactly(), PD_Document::explodeRevisions(), PP_Revision::setAttributes(), OXML_ObjectWithAttrProp::setAttributes(), IE_Imp_AbiWord_1::startElement(), and pt_VarSet::storeAP().

bool PP_AttrProp::setAttributes ( const UT_GenericVector< const gchar * > *  pVector  ) 

Sets attributes as given in the UT_Vector of strings, read as (attribute, value) pairs.

Parameters:
attributes A UT_Vector of strings, read in (attribute, value) form.

References gchar, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), and setAttribute().

bool PP_AttrProp::setProperties ( const gchar **  properties  ) 

bool PP_AttrProp::setProperties ( const UT_GenericVector< gchar * > *  pVector  ) 

Sets properties as given in the UT_Vector of strings, read as (property, value) pairs.

Parameters:
pVector A UT_Vector of strings, read in (properties, value) form.

References gchar, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), and setProperty().

const gchar** PP_AttrProp::getAttributes (  )  const [inline]

const gchar ** PP_AttrProp::getProperties (  )  const

bool PP_AttrProp::setAttribute ( const gchar *  szName,
const gchar *  szValue 
)

bool PP_AttrProp::setProperty ( const gchar *  szName,
const gchar *  szValue 
)

This method inserts a new pair of property name and value into [this] APs set of properties, creating "props" if it does not already exist and overwriting the value of any property of the same name with the newly passed value. (?)It appears as though we replace the entire pair, rather than only the value. (?)Is there a reason for this?

Returns:
Whether or not the operation succeeded.

References FREEP, gchar, m_bIsReadOnly, m_pProperties, UT_DEBUGMSG, UT_isValidXML(), UT_return_val_if_fail, and UT_validXML().

Referenced by FV_View::_charInsert(), AccountHandler::_handlePacket(), PD_Document::changeDocPropeties(), cloneWithElimination(), cloneWithEliminationIfEqual(), cloneWithReplacements(), explodeStyle(), PD_Document::insertSpan(), operator=(), PP_Revision::PP_Revision(), FV_View::resetCharFormat(), setAttribute(), setProperties(), OXML_ObjectWithAttrProp::setProperty(), and AbiCollabSessionManager::startSession().

bool PP_AttrProp::getNthAttribute ( int  ndx,
const gchar *&  szName,
const gchar *&  szValue 
) const

This method finds the Nth attribute where N is

Parameters:
ndx The number in order of the attribute to be found and assigns that attribute's name and value to
szName The name of the attribute found
szValue The value of the attribute found respectively. The method returns
Returns:
whether or not the operation succeeded.
WARNING: Always check the return value before trying to work with szValue!

References gchar, m_pAttributes, and UT_GenericStringMap< T >::size().

Referenced by PD_Document::_acceptRejectRevision(), ABI_Collab_Export::_mapPropsAtts(), s_AbiWord_1_Listener::_openTag(), PP_Revision::_refreshString(), cloneWithElimination(), cloneWithEliminationIfEqual(), cloneWithReplacements(), fp_AnnotationRun::fp_AnnotationRun(), fp_HyperlinkRun::fp_HyperlinkRun(), PD_Style::getNthAttribute(), isEquivalent(), miniDump(), operator=(), PP_Revision::operator==(), s_RTF_ListenerWriteDoc::populate(), IE_Exp_OpenXML_Listener::populate(), s_AbiWord_1_Listener::populate(), and IE_Exp_OpenXML_Listener::populateStrux().

bool PP_AttrProp::getNthProperty ( int  ndx,
const gchar *&  szName,
const gchar *&  szValue 
) const

This method finds the Nth property where N is

Parameters:
ndx The number in order of the property to be found and assigns that property's name and value to
szName The name of the property found
szValue The value of the property found respectively. The method returns
Returns:
whether or not the operation succeeded.
WARNING: Always check the return value before trying to work with szValue!

References m_pProperties.

Referenced by PD_Document::_acceptRejectRevision(), PD_Document::_buildAuthorProps(), s_AbiWord_1_Listener::_handleAuthors(), ABI_Collab_Export::_mapPropsAtts(), s_RTF_ListenerWriteDoc::_openTag(), s_AbiWord_1_Listener::_openTag(), PP_Revision::_refreshString(), PD_Document::changeDocPropeties(), cloneWithElimination(), cloneWithEliminationIfEqual(), cloneWithReplacements(), PD_Style::getNthProperty(), OXML_ObjectWithAttrProp::getNthProperty(), XAP_PaletteProperties_Level::initWithAP:levelName:, isEquivalent(), GOComponentView::loadBuffer(), miniDump(), operator=(), PP_Revision::operator==(), IE_Exp_OpenXML_Listener::populate(), IE_Exp_OpenXML_Listener::populateStrux(), and FV_View::resetCharFormat().

bool PP_AttrProp::getAttribute ( const gchar *  szName,
const gchar *&  szValue 
) const

This method finds the attribute indicated by name

Parameters:
szName (the name of the attribute the value of which to find) and assigns its value to
szValue (the value found of the attribute requested) or returns false if the attributes as a whole or the attribute requested are not found. It returns
Returns:
whether or not the operation succeeded.
WARNING: Be sure to check the return value before trying to work with szValue.

References gchar, m_pAttributes, UT_GenericStringMap< T >::pick(), and xxx_UT_DEBUGMSG.

Referenced by ODe_Styles::_addStyle(), ODe_Text_Listener::_blockIsPlainParagraph(), s_RTF_ListenerGetProps::_check_revs_for_color(), s_RTF_ListenerGetProps::_check_revs_for_font(), fl_FrameLayout::_createFrameContainer(), pt_PieceTable::_deleteHdrFtrsFromSectionStruxIfPresent(), fl_BlockLayout::_doInsertFieldRun(), pt_PieceTable::_fixHdrFtrReferences(), PD_Style::_getAttributeExpand(), ODe_AbiDocListener::_getObjectKey(), _getStyle(), s_XSL_FO_Listener::_handleBookmark(), s_WML_Listener::_handleBookmark(), s_HTML_Listener::_handleBookmark(), s_DocBook_Listener::_handleBookmark(), s_XSL_FO_Listener::_handleEmbedded(), s_WML_Listener::_handleEmbedded(), s_HTML_Listener::_handleEmbedded(), s_DocBook_Listener::_handleEmbedded(), s_XSL_FO_Listener::_handleField(), s_WML_Listener::_handleField(), s_HTML_Listener::_handleField(), s_DocBook_Listener::_handleField(), s_DocBook_Listener::_handleFootnote(), s_XSL_FO_Listener::_handleFrame(), s_DocBook_Listener::_handleHdrFtr(), s_XSL_FO_Listener::_handleHyperlink(), s_WML_Listener::_handleHyperlink(), s_HTML_Listener::_handleHyperlink(), s_DocBook_Listener::_handleHyperlink(), s_XSL_FO_Listener::_handleImage(), s_WML_Listener::_handleImage(), s_LaTeX_Listener::_handleImage(), s_HTML_Listener::_handleImage(), s_DocBook_Listener::_handleImage(), s_XSL_FO_Listener::_handleMath(), s_WML_Listener::_handleMath(), s_HTML_Listener::_handleMath(), s_DocBook_Listener::_handleMath(), PP_Revision::_handleNestedRevAttr(), s_XSL_FO_Listener::_handlePositionedImage(), s_DocBook_Listener::_handlePositionedImage(), PD_Document::_importFile(), PL_Psion_Listener::_insertImage(), ODe_Main_Listener::_isHeaderFooterSection(), fp_TextRun::_lookupProperties(), fp_FieldRun::_lookupProperties(), fp_EndOfParagraphRun::_lookupProperties(), fp_MathRun::_lookupProperties(), fp_EmbedRun::_lookupProperties(), fp_DirectionMarkerRun::_lookupProperties(), fl_DocSectionLayout::_lookupProperties(), fl_EndnoteLayout::_lookupProperties(), fl_AnnotationLayout::_lookupProperties(), fl_FootnoteLayout::_lookupProperties(), fl_BlockLayout::_lookupProperties(), s_XSL_FO_Listener::_openBlock(), OO_Listener::_openBlock(), ODe_AbiDocListener::_openBookmark(), ODe_AbiDocListener::_openField(), s_RTF_ListenerWriteDoc::_openFrame(), ODe_Main_Listener::_openHeaderFooterSection(), ODe_Text_Listener::_openODListItem(), ODe_Text_Listener::_openODParagraph(), s_WML_Listener::_openParagraph(), PL_Psion_Listener::_openParagraph(), s_LaTeX_Listener::_openParagraph(), s_DocBook_Listener::_openParagraph(), s_HTML_Listener::_openPosImage(), s_WML_Listener::_openSection(), s_DocBook_Listener::_openSection(), s_RTF_ListenerWriteDoc::_openSpan(), s_HTML_Listener::_openSpan(), s_DocBook_Listener::_openSpan(), s_RTF_ListenerWriteDoc::_openTag(), s_HTML_Listener::_openTag(), s_HRText_Listener::_openTag(), s_AbiWord_1_Listener::_openTag(), s_RTF_ListenerWriteDoc::_rtf_open_section(), pt_PieceTable::_translateRevisionAttribute(), IE_Exp_RTF::_write_parafmt(), IE_Exp_RTF::_write_rtf_header(), s_RTF_ListenerWriteDoc::_writeAnnotation(), s_RTF_ListenerWriteDoc::_writeBookmark(), s_RTF_ListenerWriteDoc::_writeHyperlink(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), PD_Document::acceptAllRevisions(), PD_Document::acceptRejectRevision(), PD_Document::addAuthorAttributeIfBlank(), areAlreadyPresent(), areAnyOfTheseNamesPresent(), fl_SectionLayout::bl_doclistener_insertSection(), fp_FieldEndnoteRefRun::calculateValue(), fp_FieldEndnoteAnchorRun::calculateValue(), fp_FieldFootnoteAnchorRun::calculateValue(), fp_FieldFootnoteRefRun::calculateValue(), fl_DocListener::change(), PD_Document::changeDocPropeties(), pt_PieceTable::changeSpanFmt(), pt_PieceTable::changeStruxFmt(), cloneWithReplacements(), ODe_Text_Listener::closeBookmark(), FV_View::convertPositionedToInLine(), fl_CellLayout::createCellContainer(), FG_GraphicVector::createFromChangeRecord(), FG_GraphicRaster::createFromChangeRecord(), FG_Graphic::createFromChangeRecord(), FG_GraphicVector::createFromStrux(), FG_GraphicRaster::createFromStrux(), FG_Graphic::createFromStrux(), Defun(), Defun1(), pt_PieceTable::deleteHdrFtrStrux(), pt_PieceTable::deleteSpan(), dlgEditLatexEquation(), fl_BlockLayout::doclistener_insertSection(), fl_DocSectionLayout::doMarginChangeOnly(), PD_Document::explodeRevisions(), explodeStyle(), ODe_Style_Style::fetchAttributesFromAbiBlock(), ODe_ListLevelStyle::fetchAttributesFromAbiBlock(), ODe_Style_Style::CellProps::fetchAttributesFromAbiProps(), ODe_Style_PageLayout::fetchAttributesFromAbiSection(), ODe_Style_MasterPage::fetchAttributesFromAbiSection(), ODe_Style_Style::fetchAttributesFromAbiSpan(), ODe_Style_Style::fetchAttributesFromAbiStyle(), fl_BlockLayout::fl_BlockLayout(), fp_FieldEndnoteAnchorRun::fp_FieldEndnoteAnchorRun(), fp_FieldEndnoteRefRun::fp_FieldEndnoteRefRun(), fp_FieldFootnoteAnchorRun::fp_FieldFootnoteAnchorRun(), fp_FieldFootnoteRefRun::fp_FieldFootnoteRefRun(), PD_Style::getAttribute(), OXML_ObjectWithAttrProp::getAttribute(), s_RTF_AttrPropAdapter_AP::getAttribute(), fl_ContainerLayout::getAttribute(), PD_Style::getAttributeExpand(), PD_Document::getAttrProp(), fl_ContainerLayout::getLevelInList(), fl_BlockLayout::getListAttributesVector(), s_AbiWord_1_Listener::getObjectKey(), FV_FrameEdit::getPNGImage(), PD_Document::getSpanAttrProp(), ODe_Style_PageLayout::hasPageLayoutInfo(), ODe_Text_Listener::insertInlinedImage(), ODe_Text_Listener::insertPositionedImage(), pt_PieceTable::insertSpan(), isEquivalent(), FV_View::isNumberedHeadingHere(), GR_MathManager::loadEmbedData(), GR_GOChartManager::loadEmbedData(), fp_Run::lookupProperties(), GR_MathManager::makeSnapShot(), OO_StylesWriter::map(), pt_VarSet::mergeAP(), FV_VisualInlineImage::mouseRelease(), FV_FrameEdit::mouseRelease(), ODe_Text_Listener::openBookmark(), ODe_Note_Listener::openEndnote(), ODe_Note_Listener::openFootnote(), ODe_Text_Listener::openFrame(), ODe_Text_Listener::openHyperlink(), OO_WriterImpl::openHyperlink(), ODe_Text_Listener::openSpan(), PP_Revision::operator==(), pf_Frag_Object::pf_Frag_Object(), ODe_AbiDocListener::populate(), IE_Exp_OpenXML_Listener::populate(), OO_Listener::populate(), s_LaTeX_Listener::populate(), TOC_Listener::populateStrux(), s_XSL_FO_Listener::populateStrux(), s_RTF_ListenerWriteDoc::populateStrux(), PL_Psion_Listener::populateStrux(), IE_Exp_OpenXML_Listener::populateStrux(), s_LaTeX_Listener::populateStrux(), s_KWord_1_Listener::populateStrux(), s_HTML_HdrFtr_Listener::populateStrux(), s_HRText_Listener::populateStrux(), fl_ShadowListener::populateStrux(), fl_DocListener::populateStrux(), PP_RevisionAttr::pruneForCumulativeResult(), PD_Document::purgeRevisionTable(), PD_Document::rejectAllHigherRevisions(), FV_View::saveSelectedImage(), fl_BlockLayout::StartList(), s_StyleTree::styleCheck(), fl_DocSectionLayout::updateDocSection(), and x_getStyle().

bool PP_AttrProp::getProperty ( const gchar *  szName,
const gchar *&  szValue 
) const

This method finds the property indicated by name

Parameters:
szName (the name of the property the value of which to find) and assigns its value to
szValue (the value found of the property requested) or returns false if the properties as a whole or the property requested are not found. It returns
Returns:
whether or not the operation succeeded.
WARNING: Be sure to check the return value before trying to work with szValue.

References m_pProperties.

Referenced by WordPerfect_Listener::_closeSpan(), s_WML_Listener::_closeSpan(), s_HRText_Listener::_closeSpan(), s_DocBook_Listener::_closeSpan(), s_WML_Listener::_emitTOC(), s_HTML_Listener::_emitTOC(), s_RTF_ListenerWriteDoc::_fillCellProps(), s_RTF_ListenerWriteDoc::_fillTableProps(), fp_MathRun::_getLayoutPropFromObject(), fp_EmbedRun::_getLayoutPropFromObject(), fl_ContainerLayout::_getPropertiesAP(), PD_Style::_getPropertyExpand(), s_HTML_Listener::_getPropertySize(), Text_Listener::_handleDirMarker(), s_DocBook_Listener::_handleDocument(), s_XSL_FO_Listener::_handleEmbedded(), s_WML_Listener::_handleEmbedded(), s_DocBook_Listener::_handleEmbedded(), s_HTML_Listener::_handleField(), s_XSL_FO_Listener::_handleImage(), s_WML_Listener::_handleImage(), s_LaTeX_Listener::_handleImage(), s_HTML_Listener::_handleImage(), s_DocBook_Listener::_handleImage(), s_XSL_FO_Listener::_handleMath(), s_WML_Listener::_handleMath(), s_DocBook_Listener::_handleMath(), s_XSL_FO_Listener::_handlePositionedImage(), s_DocBook_Listener::_handlePositionedImage(), s_DocBook_Listener::_handleTOC(), ODe_AbiDocListener::_insertMath(), fl_TableLayout::_lookupMarginProperties(), fl_FrameLayout::_lookupMarginProperties(), fp_ImageRun::_lookupProperties(), fp_MathRun::_lookupProperties(), fp_EmbedRun::_lookupProperties(), fl_TOCLayout::_lookupProperties(), fl_CellLayout::_lookupProperties(), fl_TableLayout::_lookupProperties(), fl_DocSectionLayout::_lookupProperties(), fl_FrameLayout::_lookupProperties(), fl_AnnotationLayout::_lookupProperties(), FL_DocLayout::_lookupProperties(), s_XSL_FO_Listener::_openBlock(), WordPerfect_Listener::_openBlock(), Passepartout_Listener::_openBlock(), s_KWord_1_Listener::_openBlock(), Passepartout_Listener::_openFont(), s_RTF_ListenerWriteDoc::_openFrame(), ODe_Frame_Listener::_openODTextbox(), s_WML_Listener::_openParagraph(), s_LaTeX_Listener::_openParagraph(), s_HTML_Listener::_openRow(), s_LaTeX_Listener::_openSection(), s_HTML_Listener::_openSection(), s_XSL_FO_Listener::_openSpan(), WordPerfect_Listener::_openSpan(), s_WML_Listener::_openSpan(), s_LaTeX_Listener::_openSpan(), s_KWord_1_Listener::_openSpan(), s_HTML_Listener::_openSpan(), s_HRText_Listener::_openSpan(), s_DocBook_Listener::_openSpan(), s_HTML_Listener::_openTag(), s_HRText_Listener::_openTag(), s_AbiWord_1_Listener::_openTag(), s_HTML_Listener::_openTextBox(), fp_MathRun::_updatePropValuesIfNeeded(), fp_EmbedRun::_updatePropValuesIfNeeded(), IE_Exp_RTF::_write_rtf_header(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), s_RTF_ListenerWriteDoc::_writeTOC(), areAlreadyPresent(), areAnyOfTheseNamesPresent(), ODe_ListLevelStyle::calculateListMargins(), fl_DocListener::change(), PD_Document::changeDocPropeties(), cloneWithReplacements(), FV_View::convertPositionedToInLine(), Defun1(), Defun_EV_GetMenuItemState_Fn(), fl_DocSectionLayout::doclistener_changeStrux(), explodeStyle(), ODe_Numbered_ListLevelStyle::fetchAttributesFromAbiBlock(), ODe_Bullet_ListLevelStyle::fetchAttributesFromAbiBlock(), ODe_Style_Style::GraphicProps::fetchAttributesFromAbiProps(), ODe_Style_Style::CellProps::fetchAttributesFromAbiProps(), ODe_Style_Style::TableProps::fetchAttributesFromAbiProps(), ODe_Style_Style::TextProps::fetchAttributesFromAbiProps(), ODe_Style_Style::ParagraphProps::fetchAttributesFromAbiProps(), ODe_Style_Style::SectionProps::fetchAttributesFromAbiProps(), ODe_Style_PageLayout::fetchAttributesFromAbiSection(), AP_Dialog_Lists::fillDialogFromBlock(), FV_View::FV_View(), FG_GraphicVector::generateImage(), FG_GraphicRaster::generateImage(), FV_View::getCellFormat(), ie_PartTable::getCellProp(), FG_GraphicVector::getHeightProp(), FG_GraphicRaster::getHeightProp(), pp_Author::getProperty(), PD_Style::getProperty(), OXML_ObjectWithAttrProp::getProperty(), PD_Style::getPropertyExpand(), ie_PartTable::getTableProp(), FG_GraphicVector::getWidthProp(), FG_GraphicRaster::getWidthProp(), ODe_Style_PageLayout::hasPageLayoutInfo(), ODe_Style_Style::hasParagraphStyleProps(), PP_RevisionAttr::hasProperty(), ODe_Style_Style::hasSectionInfo(), ODe_Style_Style::hasTableStyleProps(), ODe_Style_Style::hasTextStyleProps(), ODe_Text_Listener::insertInlinedImage(), ODe_Text_Listener::insertPositionedImage(), isEquivalent(), ODe_Table_Cell::loadAbiProps(), fl_ContainerLayout::lookupFoldedLevel(), OO_StylesWriter::map(), FV_VisualInlineImage::mouseRelease(), FV_FrameEdit::mouseRelease(), AP_TopRuler::mouseRelease(), AP_LeftRuler::mouseRelease(), ODe_Text_Listener::openAnnotation(), ODe_Text_Listener::openFrame(), ODe_Frame_Listener::openFrame(), ODe_Table_Listener::openTable(), ODe_Text_Listener::openTOC(), ODe_HeadingSearcher_Listener::openTOC(), PP_Revision::operator==(), Passepartout_Listener::Passepartout_Listener(), Text_Listener::populateStrux(), s_RTF_ListenerWriteDoc::populateStrux(), IE_Exp_OpenXML_Listener::populateStrux(), s_HTML_Listener::populateStrux(), PP_evalProperty(), FV_View::queryCharFormat(), s_doLangDlg(), s_evalProperty(), FV_FrameEdit::setDragType(), ODe_Style_List::setLevelStyle(), fl_DocSectionLayout::setPaperColor(), AP_Dialog_FormatTOC::setPropFromDoc(), Text_Listener::Text_Listener(), updateCharacterLayout(), and updateParagraphLayout().

const PP_PropertyType * PP_AttrProp::getPropertyType ( const gchar *  szName,
tProperty_type  Type 
) const

(?)TODO: PLEASE DOCUMENT ME!

References PP_PropertyType::createPropertyType(), and m_pProperties.

Referenced by PD_Style::getPropertyType(), and PP_evalPropertyType().

bool PP_AttrProp::hasProperties ( void   )  const

Returns whether or not the AP has any properties.

This method checks [this] AP for the "props" attribute. The "props" attribute is a special attribute that contains properties. If the "props" attribute is absent, the method returns false. If the "props" attribute is present but empty (m_pProperties->size() == 0), it returns false. If the "props" attribute is present and has something in it, (m_pProperties->size() > 0), it returns true, but beware that no sanity checking is done to make sure that whatever is in there is anything more legible than uninitialized memory.

References m_pProperties.

Referenced by PP_RevisionAttr::_refreshString(), areAlreadyPresent(), pt_VarSet::mergeAP(), FV_View::resetCharFormat(), and AbiCollabSessionManager::startSession().

bool PP_AttrProp::hasAttributes ( void   )  const

Returns whether or not the AP has any attributes.

This method checks [this] AP for the presence of any attribute. If there is any attribute at all in the AP, m_pAttributes->size() returns positive and so does this method. Otherwise, this method returns false. Beware that no sanity checking is done to make sure that whatever is in there (being counted by size()) is anything more legible than uninitialized memory.

References m_pAttributes, and UT_GenericStringMap< T >::size().

Referenced by PP_RevisionAttr::_refreshString(), and FV_View::resetCharFormat().

size_t PP_AttrProp::getPropertyCount ( void   )  const

size_t PP_AttrProp::getAttributeCount ( void   )  const

Returns the number of attributes in this PP_AttrProp.

BE WEARY, BE VERY WEARY, the count can be greater than the number of valid items stored in the hash -- always check the return value of getNthAttribute()

References m_pAttributes, and UT_GenericStringMap< T >::size().

Referenced by PD_Document::_acceptRejectRevision(), ABI_Collab_Export::_mapPropsAtts(), PP_Revision::_refreshString(), PD_Style::getAttributeCount(), isEquivalent(), PP_Revision::operator==(), IE_Exp_OpenXML_Listener::populate(), and IE_Exp_OpenXML_Listener::populateStrux().

bool PP_AttrProp::areAlreadyPresent ( const gchar **  attributes,
const gchar **  properties 
) const

Returns whether or not the given attributes and properties are identically present in [this] AP.

This method compares the given attributes and properties with those already present. It compares the given items as inseparable pairs - if the attribute or property is present in name but contains a different value, that does not count and false is returned.

Returns:
A bool indicating (directly) both presence and equality.

References gchar, getAttribute(), getProperty(), and hasProperties().

Referenced by PD_Style::addAttributes(), and pt_VarSet::mergeAP().

bool PP_AttrProp::areAnyOfTheseNamesPresent ( const gchar **  attributes,
const gchar **  properties 
) const

Find out if any attribute- or property-name is present. This is like areAlreadyPresent(), but we don't care about the values, and it returns true after the first discovery regardless of whether or not any other of the given names are present.

Returns:
A bool that's TRUE if any of the given attr. or prop. names is present, false otherwise.

References gchar, getAttribute(), and getProperty().

Referenced by pt_PieceTable::_realInsertSpan(), and pt_VarSet::mergeAP().

bool PP_AttrProp::isExactMatch ( const PP_AttrProp pMatch  )  const

Checks to see if the given AP is identical to itself ([this]). It also contains some useful points of instrumentation for benchmarking table and usage characteristics.

Returns:
TRUE, if and only if we match the AP given, false otherwise.

References gchar, m_checkSum, m_pAttributes, m_pProperties, UT_GenericStringMap< T >::size(), and UT_return_val_if_fail.

Referenced by pp_TableAttrProp::findMatch().

bool PP_AttrProp::isEquivalent ( const PP_AttrProp pAP2  )  const

This method checks if [this] AP and the given AP are functionally equivalent. In contrast to is isExactMatch this function will return true if the attrs and props are same even if they are in different order; it is computationally much more involved than isExactMatch(). On that note, it may be worth looking into putting some more explicit collision guarantees into the checksum computation algorithm, such to take advantage of those checksums here. IOW, make it such to be trusted that if checksums match, APs are equivalent (but not necessarily exact matches).

Return values:
TRUE if equivalent to given AP (regardless of order), FALSE otherwise.

References gchar, getAttribute(), getAttributeCount(), getNthAttribute(), getNthProperty(), getProperty(), getPropertyCount(), PT_PROPS_ATTRIBUTE_NAME, PT_REVISION_ATTRIBUTE_NAME, and UT_return_val_if_fail.

Referenced by PD_Document::areDocumentFormatsEqual(), PD_Document::areDocumentStylesheetsEqual(), pt_VarSet::mergeAP(), and pf_Frag::operator==().

bool PP_AttrProp::isEquivalent ( const gchar **  attrs,
const gchar **  props 
) const

This method does the same as PP_AttrProp::isEquivalent(const PP_AttrProp *) except that instead of being passed another AP to be compared to, it is passed sets of attributes and properties which only virtually comprise another AP.

Return values:
TRUE if equivalent (regardless of order) to given Attrs and Props, FALSE otherwise.

References gchar, getAttribute(), getAttributeCount(), getProperty(), getPropertyCount(), PT_PROPS_ATTRIBUTE_NAME, and PT_REVISION_ATTRIBUTE_NAME.

PP_AttrProp * PP_AttrProp::createExactly ( const gchar **  attributes,
const gchar **  properties 
) const

Create a new AttrProp with exactly the attributes/properties given.

Returns:
NULL on failure, the newly-created PP_AttrProp.

References DELETEP, PP_AttrProp(), setAttributes(), and setProperties().

Referenced by pt_VarSet::mergeAP().

PP_AttrProp * PP_AttrProp::cloneWithReplacements ( const gchar **  attributes,
const gchar **  properties,
bool  bClearProps 
) const

PP_AttrProp * PP_AttrProp::cloneWithElimination ( const gchar **  attributes,
const gchar **  properties 
) const

Create a new AttrProp based upon the given one, removing the items given regardless of their value. See also PP_AttrProp::cloneWithEliminationIfEqual, which does similarly but only removes the items given if their value is equal to the value given.

Returns:
NULL on failure, the newly-created PP_AttrProp clone otherwise.

References DELETEP, gchar, getNthAttribute(), getNthProperty(), PP_AttrProp(), PT_PROPS_ATTRIBUTE_NAME, setAttribute(), setProperty(), UT_return_val_if_fail, and v.

Referenced by pt_PieceTable::_realInsertSpan(), and pt_VarSet::mergeAP().

PP_AttrProp * PP_AttrProp::cloneWithEliminationIfEqual ( const gchar **  attributes,
const gchar **  properties 
) const

Create a new AttrProp based upon the given one, removing the items given if their value is equal to that given. See also PP_AttrProp::cloneWithElimination, which does similarly but removes the items given regardless of whether or not their value is equal to the value given.

Returns:
NULL on failure, the newly-created PP_AttrProp clone otherwise.

References DELETEP, gchar, getNthAttribute(), getNthProperty(), PP_AttrProp(), PT_PROPS_ATTRIBUTE_NAME, setAttribute(), setProperty(), and v.

Referenced by pt_VarSet::mergeAP().

void PP_AttrProp::markReadOnly ( void   ) 

After the construction of a new AP, use this method to mark it read-only. It returns if the AP is already read-only; otherwise it marks [this] AP as read-only and then computes its checksum in order to speed subsequent equivalence testing. There is no return value.

References _computeCheckSum(), m_bIsReadOnly, and UT_return_if_fail.

Referenced by pt_PieceTable::_realInsertSpan(), PD_Style::addAttributes(), PD_Style::addProperties(), PD_Style::addProperty(), pt_PieceTable::appendLastStruxFmt(), pt_PieceTable::appendStruxFmt(), pt_PieceTable::changeLastStruxFmtNoUndo(), pp_TableAttrProp::createAP(), PD_Document::explodeRevisions(), pt_VarSet::mergeAP(), and pt_VarSet::storeAP().

UT_uint32 PP_AttrProp::getCheckSum ( void   )  const

This is an accessor method that gets the checksum of [this] AP, by which we speed equivalence testing. The speedup occurs when we bypass full-testing in the case of checksum mismatch when we know for sure that the APs are not equivalent. Because collisions still occur, we do the full-testing if the checksums do match.

Return values:
m_checkSum The unsigned 32-bit integer which serves as the AP's checksum.

References m_checkSum.

Referenced by compareAP(), compareAPBinary(), and pp_TableAttrProp::findMatch().

void PP_AttrProp::operator= ( const PP_AttrProp Other  ) 

UT_uint32 PP_AttrProp::getIndex ( void   )  const

References m_index.

Referenced by pp_TableAttrProp::findMatch().

void PP_AttrProp::setIndex ( UT_uint32  i  ) 

PT_AttrPropIndex PP_AttrProp::getRevisedIndex (  )  const [inline]

PP_RevisionState& PP_AttrProp::getRevisionState (  )  const [inline]

void PP_AttrProp::setRevisedIndex ( PT_AttrPropIndex  i,
UT_uint32  iId,
bool  bShow,
bool  bMark,
bool  bHidden 
) const [inline]

bool PP_AttrProp::getRevisionHidden (  )  const [inline]

void PP_AttrProp::prune (  ) 

This method clears both empty attributes and empty properties from [this] AP.

References _clearEmptyAttributes(), and _clearEmptyProperties().

Referenced by PP_Revision::_handleNestedRevAttr(), PD_Document::explodeRevisions(), and PP_RevisionAttr::pruneForCumulativeResult().

bool PP_AttrProp::explodeStyle ( const PD_Document pDoc,
bool  bOverwrite = false 
)

This function transfers attributes and properties defined in style into the AP.

Parameters:
bOverwrite indicates what happens if the property/attribute is already present. If false \ (default) the style definition is ignored; if true the style value overrides the present value.

References gchar, PD_Style::getAllAttributes(), PD_Style::getAllProperties(), getAttribute(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), getProperty(), PD_Document::getStyle(), PT_STYLE_ATTRIBUTE_NAME, setAttribute(), setProperty(), and UT_return_val_if_fail.

Referenced by PD_Document::explodeRevisions(), and PP_RevisionAttr::pruneForCumulativeResult().

void PP_AttrProp::miniDump ( const PD_Document pDoc  )  const

This is a debugging tool which serves to dump in readable form (as UT_DEBUGMSGs) the contents of [this] AP.

References gchar, PD_Document::getAttrProp(), getNthAttribute(), getNthProperty(), getRevisedIndex(), m_iRevisedIndex, miniDump(), UT_DEBUGMSG, and UT_UNUSED.

Referenced by FV_View::getAttrPropForPoint(), fp_Run::lookupProperties(), miniDump(), and FV_View::toggleCase().

void PP_AttrProp::_computeCheckSum ( void   )  [protected]

Compute the checksum by which we speed AP equivalence testing. (?)To the best of my knowledge, collision is still possible. (?)TODO: Document the algorithm/process here, and answer remaining questions about this chunk of code.

References gchar, hashcodeBytesAP(), m_checkSum, m_pAttributes, and m_pProperties.

Referenced by markReadOnly().

void PP_AttrProp::_clearEmptyProperties (  )  [protected]

This function will remove all properties that are set to "".

References FREEP, gchar, m_bIsReadOnly, m_pProperties, s, and UT_return_if_fail.

Referenced by cloneWithReplacements(), and prune().

void PP_AttrProp::_clearEmptyAttributes (  )  [protected]

This function will remove all attributes that are equal to "" (*<gchar *> == NULL).

References FREEP, gchar, m_bIsReadOnly, m_pAttributes, UT_GenericStringMap< T >::remove(), and UT_return_if_fail.

Referenced by cloneWithReplacements(), and prune().


Member Data Documentation

bool PP_AttrProp::m_bIsReadOnly [protected]

Referenced by getIndex(), and setIndex().

const gchar** PP_AttrProp::m_szProperties [mutable, protected]

Referenced by miniDump(), and PP_AttrProp().

bool PP_AttrProp::m_bRevisionHidden [mutable, protected]

Referenced by PP_AttrProp().


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

Generated on Sun Dec 27 00:07:20 2009 for AbiWord by  doxygen 1.5.5