#include <OXML_ObjectWithAttrProp.h>
Public Member Functions | |
OXML_ObjectWithAttrProp () | |
virtual | ~OXML_ObjectWithAttrProp () |
UT_Error | setAttribute (const gchar *szName, const gchar *szValue) |
UT_Error | setProperty (const gchar *szName, const gchar *szValue) |
UT_Error | setProperty (const std::string &szName, const std::string &szValue) |
UT_Error | getAttribute (const gchar *szName, const gchar *&szValue) const |
UT_Error | getProperty (const gchar *szName, const gchar *&szValue) const |
UT_Error | setAttributes (const PP_PropertyVector &attributes) |
UT_Error | setProperties (const PP_PropertyVector &properties) |
UT_Error | appendAttributes (const PP_PropertyVector &attributes) |
UT_Error | appendProperties (const PP_PropertyVector &properties) |
PP_PropertyVector | getAttributes () const |
PP_PropertyVector | getProperties () const |
UT_Error | inheritProperties (OXML_ObjectWithAttrProp *parent) |
PP_PropertyVector | getAttributesWithProps () |
Provides the list of attributes including all the properties in one attribute. | |
bool | getNthProperty (int i, const gchar *&szName, const gchar *&szValue) |
size_t | getPropertyCount () |
Private Member Functions | |
std::string | _generatePropsString () const |
Private Attributes | |
PP_AttrProp * | m_pAttributes |
OXML_ObjectWithAttrProp::OXML_ObjectWithAttrProp | ( | ) |
OXML_ObjectWithAttrProp::~OXML_ObjectWithAttrProp | ( | ) | [virtual] |
References DELETEP, and m_pAttributes.
std::string OXML_ObjectWithAttrProp::_generatePropsString | ( | ) | const [private] |
References ASSERT_PV_SIZE, and getProperties().
Referenced by getAttributesWithProps().
UT_Error OXML_ObjectWithAttrProp::appendAttributes | ( | const PP_PropertyVector & | attributes | ) |
References ASSERT_PV_SIZE, setAttribute(), UT_OK, and UT_return_val_if_fail.
UT_Error OXML_ObjectWithAttrProp::appendProperties | ( | const PP_PropertyVector & | properties | ) |
References ASSERT_PV_SIZE, setProperty(), UT_OK, and UT_return_val_if_fail.
Referenced by OXMLi_ListenerState_Styles::endElement().
UT_Error OXML_ObjectWithAttrProp::getAttribute | ( | const gchar * | szName, | |
const gchar *& | szValue | |||
) | const |
References PP_AttrProp::getAttribute(), m_pAttributes, UT_ERROR, UT_OK, and UT_return_val_if_fail.
Referenced by OXML_Style::addToPT(), OXML_Element_Paragraph::getListId(), OXML_Element_Paragraph::getListLevel(), OXML_Section::hasEvenPageHdrFtr(), OXML_Section::hasFirstPageHdrFtr(), IE_Exp_OpenXML_Listener::populate(), OXML_Style::serialize(), OXML_Element_Text::serialize(), OXML_Element_Image::serialize(), OXML_Element_Hyperlink::serialize(), OXML_Element_Field::serialize(), OXML_Element_Bookmark::serialize(), OXML_Section::serializeEndnote(), OXML_Section::serializeFooter(), OXML_Section::serializeFootnote(), OXML_Section::serializeHeader(), OXML_Section::serializeProperties(), and OXML_Element_Paragraph::serializeProperties().
PP_PropertyVector OXML_ObjectWithAttrProp::getAttributes | ( | ) | const |
References PP_AttrProp::getAttributes(), and m_pAttributes.
Referenced by OXML_Section::addToPTAsHdrFtr(), and getAttributesWithProps().
PP_PropertyVector OXML_ObjectWithAttrProp::getAttributesWithProps | ( | ) |
Provides the list of attributes including all the properties in one attribute.
This method takes all the properties of the object and combines them into one string in CSS format. This string is used as the value of a new attribute whose key is defined by PP_PROPS_ATTRIBUTE_NAME.
References _generatePropsString(), ASSERT_PV_SIZE, getAttributes(), setAttribute(), UT_OK, and UT_return_val_if_fail.
Referenced by OXML_Style::addToPT(), OXML_Section::addToPT(), OXML_Element_TextBox::addToPT(), OXML_Element_Table::addToPT(), OXML_Element_Run::addToPT(), OXML_Element_Paragraph::addToPT(), OXML_Element_Image::addToPT(), and OXML_Element_Cell::addToPT().
bool OXML_ObjectWithAttrProp::getNthProperty | ( | int | i, | |
const gchar *& | szName, | |||
const gchar *& | szValue | |||
) |
References PP_AttrProp::getNthProperty(), and m_pAttributes.
Referenced by inheritProperties().
PP_PropertyVector OXML_ObjectWithAttrProp::getProperties | ( | ) | const |
References PP_AttrProp::getProperties(), and m_pAttributes.
Referenced by _generatePropsString().
UT_Error OXML_ObjectWithAttrProp::getProperty | ( | const gchar * | szName, | |
const gchar *& | szValue | |||
) | const |
References PP_AttrProp::getProperty(), m_pAttributes, UT_ERROR, UT_OK, and UT_return_val_if_fail.
Referenced by OXML_Element_Row::addChildrenToPT(), OXML_Element_Table::addToPT(), OXML_Element_Image::addToPT(), OXML_Element_Cell::addToPT(), OXML_Section::applyDocumentProperties(), inheritProperties(), OXML_Element_Paragraph::isNumberedList(), OXML_Style::serialize(), OXML_Element_Text::serialize(), OXML_Element_Image::serialize(), OXML_Section::serializeProperties(), OXML_Element_TextBox::serializeProperties(), OXML_Element_Table::serializeProperties(), OXML_Element_Run::serializeProperties(), OXML_Element_Paragraph::serializeProperties(), and OXML_Element_Cell::serializeProperties().
size_t OXML_ObjectWithAttrProp::getPropertyCount | ( | ) |
References PP_AttrProp::getPropertyCount(), and m_pAttributes.
Referenced by inheritProperties().
UT_Error OXML_ObjectWithAttrProp::inheritProperties | ( | OXML_ObjectWithAttrProp * | parent | ) |
References gchar, getNthProperty(), getProperty(), getPropertyCount(), setProperty(), szName, and UT_OK.
Referenced by OXML_Element_Table::addRow(), and OXML_Element_Table::applyStyle().
UT_Error OXML_ObjectWithAttrProp::setAttribute | ( | const gchar * | szName, | |
const gchar * | szValue | |||
) |
References m_pAttributes, PP_AttrProp::setAttribute(), and UT_OK.
Referenced by OXML_Section::_setReferenceIds(), IE_Exp_OpenXML_Listener::addDocumentStyles(), OXML_Style::addToPT(), OXML_Element_Paragraph::addToPT(), OXML_Element_Image::addToPT(), appendAttributes(), getAttributesWithProps(), OXML_Style::OXML_Style(), IE_Exp_OpenXML_Listener::populate(), IE_Exp_OpenXML_Listener::populateStrux(), OXML_Style::setName(), and OXMLi_ListenerState_Styles::startElement().
UT_Error OXML_ObjectWithAttrProp::setAttributes | ( | const PP_PropertyVector & | attributes | ) |
References m_pAttributes, PP_AttrProp::setAttributes(), and UT_OK.
Referenced by OXMLi_ListenerState_Numbering::endElement().
UT_Error OXML_ObjectWithAttrProp::setProperties | ( | const PP_PropertyVector & | properties | ) |
References m_pAttributes, PP_AttrProp::setProperties(), and UT_OK.
Referenced by OXML_Element_Paragraph::addToPT(), and OXMLi_ListenerState_Numbering::endElement().
UT_Error OXML_ObjectWithAttrProp::setProperty | ( | const std::string & | szName, | |
const std::string & | szValue | |||
) |
References setProperty().
UT_Error OXML_ObjectWithAttrProp::setProperty | ( | const gchar * | szName, | |
const gchar * | szValue | |||
) |
References m_pAttributes, PP_AttrProp::setProperty(), and UT_OK.
Referenced by IE_Exp_OpenXML_Listener::addDocumentStyles(), OXML_Element_TextBox::addToPT(), OXML_Element_Image::addToPT(), OXML_Element_Cell::addToPT(), appendProperties(), inheritProperties(), IE_Exp_OpenXML_Listener::populate(), IE_Exp_OpenXML_Listener::populateStrux(), OXML_List::setDelim(), OXML_Element_Cell::setLastHorizontalContinuationCell(), OXML_Element_Cell::setLastVerticalContinuationCell(), OXML_Section::setPageMargins(), and setProperty().