#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "ut_types.h"
#include "ut_assert.h"
#include "ut_debugmsg.h"
#include "ut_string.h"
#include "ut_std_string.h"
#include "ut_string_class.h"
#include "ut_vector.h"
#include "pt_Types.h"
#include "pp_AttrProp.h"
#include "pp_Revision.h"
#include "pd_Style.h"
#include "pd_Document.h"
Functions | |
void | ascii_strdown (char *p, size_t len) |
Turn the ASCII chars to lower case. | |
UT_uint32 | hashcodeBytesAP (UT_uint32 init, const char *pv, UT_uint32 cb) |
std::string | PP_makePropString (const PP_PropertyVector &props) |
Turn a PP_PropertyVector into a style string as used by the "props" attributes. | |
PP_PropertyVector | PP_std_setPropsToNothing (const PP_PropertyVector &props) |
PP_PropertyVector | PP_std_copyProps (const gchar **props) |
PP_PropertyVector | PP_cloneAndDecodeAttributes (const gchar **attrs) |
clone and XML decode the attributes. | |
PP_PropertyVector | PP_std_setPropsToValue (const PP_PropertyVector &props, const gchar *value) |
bool | PP_hasAttribute (const char *name, const PP_PropertyVector &atts) |
Tell if the attribute name is in the vector. | |
const std::string & | PP_getAttribute (const char *name, const PP_PropertyVector &atts) |
bool | PP_setAttribute (const char *name, const std::string &value, PP_PropertyVector &atts) |
Set the attribute name to value if it exists. | |
void | PP_addOrSetAttribute (const char *name, const std::string &value, PP_PropertyVector &atts) |
Set the attribute name or add it. | |
bool | PP_removeAttribute (const char *name, PP_PropertyVector &atts) |
Variables | |
static const std::string | _EMPTY_STRING |
_EMPTY_STRING. a const we return a reference to. |
void ascii_strdown | ( | char * | p, | |
size_t | len | |||
) |
Turn the ASCII chars to lower case.
Modify in place.
p | the string pointer | |
len | the length of the string. |
Referenced by PP_AttrProp::_computeCheckSum(), PP_AttrProp::setAttribute(), and TFTEST_MAIN().
(?)TODO: PLEASE DOCUMENT ME!
Referenced by PP_AttrProp::_computeCheckSum(), and TFTEST_MAIN().
void PP_addOrSetAttribute | ( | const char * | name, | |
const std::string & | value, | |||
PP_PropertyVector & | atts | |||
) |
Set the attribute name or add it.
References PP_setAttribute(), and size.
Referenced by AP_Dialog_Styles::_tabCallback(), AP_Dialog_FormatFrame::applyChanges(), AP_UnixDialog_Styles::event_basedOn(), AP_UnixDialog_Styles::event_followedBy(), AP_UnixDialog_Styles::event_styleType(), AP_Win32Dialog_Styles::eventBasedOn(), AP_Win32Dialog_Styles::eventFollowedBy(), AP_Win32Dialog_Styles::eventStyleType(), AP_Dialog_Styles::fillVecWithProps(), AP_Dialog_Styles::ModifyFont(), AP_Dialog_Styles::ModifyLang(), AP_Dialog_Styles::ModifyLists(), AP_Dialog_Styles::ModifyParagraph(), AP_UnixDialog_Styles::new_styleName(), AP_Dialog_FormatTable::setBackgroundColor(), AP_Dialog_FormatFrame::setBGColor(), AP_Dialog_FormatTable::setBorderColor(), AP_Dialog_Border_Shading::setBorderColor(), AP_Dialog_FormatFrame::setBorderColorBottom(), AP_Dialog_FormatFrame::setBorderColorLeft(), AP_Dialog_FormatFrame::setBorderColorRight(), AP_Dialog_FormatFrame::setBorderColorTop(), AP_Dialog_FormatFrame::setBorderLineStyleBottom(), AP_Dialog_FormatFrame::setBorderLineStyleLeft(), AP_Dialog_FormatFrame::setBorderLineStyleRight(), AP_Dialog_FormatFrame::setBorderLineStyleTop(), AP_Dialog_Border_Shading::setBorderStyle(), AP_Dialog_FormatTable::setBorderThickness(), AP_Dialog_Border_Shading::setBorderThickness(), AP_Dialog_FormatFrame::setBorderThicknessBottom(), AP_Dialog_FormatFrame::setBorderThicknessLeft(), AP_Dialog_FormatFrame::setBorderThicknessRight(), AP_Dialog_FormatFrame::setBorderThicknessTop(), AP_Dialog_Border_Shading::setCurBlockProps(), AP_Dialog_FormatTable::setCurCellProps(), AP_Dialog_FormatFrame::setCurFrameProps(), AP_Dialog_FormatFrame::setPositionMode(), AP_Dialog_Border_Shading::setShadingColor(), AP_Dialog_Border_Shading::setShadingPattern(), AP_Dialog_FormatFrame::setWrapping(), TFTEST_MAIN(), AP_Dialog_FormatTable::toggleLineType(), AP_Dialog_FormatFrame::toggleLineType(), and AP_Dialog_Border_Shading::toggleLineType().
PP_PropertyVector PP_cloneAndDecodeAttributes | ( | const gchar ** | attrs | ) |
clone and XML decode the attributes.
References gchar, and UT_decodeXML().
Referenced by IE_Imp_XHTML::startElement(), IE_Imp_AbiWord_1::startElement(), and TFTEST_MAIN().
const std::string& PP_getAttribute | ( | const char * | name, | |
const PP_PropertyVector & | atts | |||
) |
References _EMPTY_STRING.
Referenced by _fontSizeChange(), IE_Imp_AbiWord_1::_getDataItemEncoded(), IE_Imp_AbiWord_1::_getDataItemMimeType(), IE_Imp_AbiWord_1::_getDataItemName(), AP_Dialog_FormatTable::_getToggleButtonStatus(), AP_Dialog_FormatFrame::_getToggleButtonStatus(), AP_Dialog_Border_Shading::_getToggleButtonStatus(), _getTranslationCode(), pt_PieceTable::_makeStrux(), AP_Win32Dialog_Styles::_onInitDialog(), AP_Dialog_Styles::_populateAbiPreview(), AP_UnixDialog_Styles::_populateModify(), AP_Dialog_Styles::_populatePreviews(), AP_Dialog_Tab::_populateWindowData(), pt_PieceTable::_realChangeSpanFmt(), pt_PieceTable::_realChangeStruxFmt(), AP_Win32Dialog_Lists::_selectFont(), _toggleSpanOrBlock(), PD_Document::addAuthorAttributeIfBlank(), pt_PieceTable::appendObject(), pt_PieceTable::appendStrux(), pt_PieceTable::appendStyle(), AP_Dialog_FormatFrame::applyChanges(), FV_View::cmdCharDelete(), FV_View::cmdInsertTable(), FL_DocLayout::considerSmartQuoteCandidateAt(), AP_Dialog_Styles::createNewStyle(), Defun(), Defun1(), Defun_EV_GetMenuItemState_Fn(), Defun_EV_GetToolbarItemState_Fn(), AP_FormatTable_preview::draw(), AP_FormatFrame_preview::draw(), AP_Border_Shading_preview::draw(), AP_Dialog_Lists::fillUncustomizedValues(), pt_PieceTable::insertObjectBeforeFrag(), pt_PieceTable::insertStruxBeforeFrag(), FV_View::insertSymbol(), AP_Dialog_Styles::ModifyFont(), AP_Dialog_Styles::ModifyLang(), AP_Dialog_Styles::ModifyLists(), AP_Dialog_Styles::ModifyParagraph(), ap_sbf_Language::notify(), s_doFontDlg(), s_doFormatImageDlg(), s_doLangDlg(), s_getPageMargins(), PD_Document::setAttrProp(), FV_View::setBlockFormat(), AP_Dialog_FormatFrame::setCurFrameProps(), AP_Dialog_Paragraph::setDialogData(), AP_Dialog_Columns::setViewAndDoc(), IE_Imp_XHTML::startElement(), IE_Imp_AbiWord_1::startElement(), TFTEST_MAIN(), and AP_Dialog_Styles::updateCurrentStyle().
bool PP_hasAttribute | ( | const char * | name, | |
const PP_PropertyVector & | atts | |||
) |
Tell if the attribute name is in the vector.
Referenced by IE_Exp_DocRangeListener::assembleAtts(), pt_VarSet::mergeAP(), and TFTEST_MAIN().
std::string PP_makePropString | ( | const PP_PropertyVector & | props | ) |
Turn a PP_PropertyVector into a style string as used by the "props" attributes.
Referenced by AP_Dialog_Styles::_populateAbiPreview(), AP_Dialog_Styles::applyModifiedStyleToDoc(), AP_Dialog_Styles::createNewStyle(), TFTEST_MAIN(), and AP_Dialog_Styles::updateCurrentStyle().
bool PP_removeAttribute | ( | const char * | name, | |
PP_PropertyVector & | atts | |||
) |
Referenced by AP_Win32Dialog_Styles::_onCommand(), AP_UnixDialog_Styles::event_RemoveProperty(), AP_Win32Dialog_Styles::eventBasedOn(), AP_Win32Dialog_Styles::eventFollowedBy(), AP_Dialog_FormatTable::setBackgroundColor(), AP_Dialog_FormatFrame::setBGColor(), AP_Dialog_Border_Shading::setCurBlockProps(), AP_Dialog_FormatTable::setCurCellProps(), AP_Dialog_Border_Shading::setShadingColor(), and TFTEST_MAIN().
bool PP_setAttribute | ( | const char * | name, | |
const std::string & | value, | |||
PP_PropertyVector & | atts | |||
) |
Set the attribute name to value if it exists.
Return | true is the property was set. |
Referenced by PP_addOrSetAttribute(), fl_BlockLayout::remItemFromList(), and TFTEST_MAIN().
PP_PropertyVector PP_std_copyProps | ( | const gchar ** | props | ) |
Referenced by IE_Imp_MsWord_97::_beginChar(), IE_Imp_MsWord_97::_beginSect(), IE_Imp_MsWord_97::_cell_open(), IE_Imp_MsWord_97::_handleStyleSheet(), ABI_Collab_Import::_import(), IE_Imp_MsWord_97::_insertTOC(), OpenWriter_ContentStream_Listener::_insureInBlock(), pt_PieceTable::_realChangeSectionAttsNoUpdate(), pt_PieceTable::_realChangeStruxForLists(), OXML_Document::addStyle(), IE_Imp::appendFmt(), pt_PieceTable::appendLastStruxFmt(), pt_PieceTable::changeLastStruxFmtNoUndo(), PD_Document::createAndSendDocPropCR(), IE_Imp_DocBook::createTitle(), OpenWriter_StylesStream_Listener::endElement(), IE_Imp_RTF::HandleAnnotation(), PD_DocumentRDFMutation::handleCollabEvent(), IE_Imp_WordPerfect::openListElement(), IE_Imp_XSL_FO::startElement(), IE_Imp_XHTML::startElement(), OpenWriter_StylesStream_Listener::startElement(), and TFTEST_MAIN().
PP_PropertyVector PP_std_setPropsToNothing | ( | const PP_PropertyVector & | props | ) |
Referenced by pt_PieceTable::changeSpanFmt(), and TFTEST_MAIN().
PP_PropertyVector PP_std_setPropsToValue | ( | const PP_PropertyVector & | props, | |
const gchar * | value | |||
) |
Referenced by pt_PieceTable::changeStruxFmt(), and TFTEST_MAIN().
const std::string _EMPTY_STRING [static] |
_EMPTY_STRING. a const we return a reference to.
Referenced by PP_getAttribute().