Public Member Functions | |
s_AbiWord_1_Listener (PD_Document *pDocument, IE_Exp_AbiWord_1 *pie, bool isTemplate) | |
virtual | ~s_AbiWord_1_Listener () |
virtual bool | populate (fl_ContainerLayout *sfh, const PX_ChangeRecord *pcr) |
virtual bool | populateStrux (pf_Frag_Strux *sdh, const PX_ChangeRecord *pcr, fl_ContainerLayout **psfh) |
virtual bool | change (fl_ContainerLayout *sfh, const PX_ChangeRecord *pcr) |
virtual bool | insertStrux (fl_ContainerLayout *sfh, const PX_ChangeRecord *pcr, pf_Frag_Strux *sdh, PL_ListenerId lid, void(*pfnBindHandles)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew)) |
virtual bool | signal (UT_uint32 iSignal) |
UT_Error | write_base64 (void *context, const char *base64, UT_uint32 length, bool final) |
UT_Error | write_xml (void *context, const char *name, const char *const *atts) |
UT_Error | write_xml (void *context, const char *name) |
Protected Member Functions | |
void | _closeTable (void) |
void | _closeCell (void) |
void | _closeSection (void) |
void | _closeBlock (void) |
void | _closeSpan (void) |
void | _closeField (void) |
void | _closeHyperlink (void) |
void | _closeAnnotation (void) |
void | _closeRDFAnchor (void) |
void | _closeTag (void) |
void | _openSpan (PT_AttrPropIndex apiSpan) |
void | _openTag (const char *szPrefix, bool bHasContent, PT_AttrPropIndex api, UT_uint32 iXID, bool bIgnoreProperties=false) |
void | _handleStyles (void) |
void | _handleLists (void) |
void | _handlePageSize (void) |
void | _handleDataItems (void) |
void | _handleMetaData (void) |
void | _handleRDF (void) |
void | _handleRevisions (void) |
void | _handleHistory (void) |
void | _handleAuthors (void) |
Protected Attributes | |
PD_Document * | m_pDocument |
IE_Exp_AbiWord_1 * | m_pie |
bool | m_bIsTemplate |
bool | m_bInSection |
bool | m_bInBlock |
bool | m_bInSpan |
bool | m_bInHyperlink |
UT_sint32 | m_iInTable |
UT_sint32 | m_iInCell |
UT_sint32 | m_iBlockLevel |
PT_AttrPropIndex | m_apiLastSpan |
fd_Field * | m_pCurrentField |
bool | m_bOpenChar |
UT_GenericVector< UT_UTF8String * > | m_vecSnapNames |
bool | m_bInAnnotation |
Private Types | |
typedef std::set< std::string > | string_set |
Private Member Functions | |
const gchar * | getObjectKey (const PT_AttrPropIndex &api, const gchar *key) |
Private Attributes | |
string_set | m_pUsedImages |
typedef std::set<std::string> s_AbiWord_1_Listener::string_set [private] |
s_AbiWord_1_Listener::s_AbiWord_1_Listener | ( | PD_Document * | pDocument, | |
IE_Exp_AbiWord_1 * | pie, | |||
bool | isTemplate | |||
) |
References _handleAuthors(), _handleHistory(), _handleLists(), _handleMetaData(), _handlePageSize(), _handleRDF(), _handleRevisions(), _handleStyles(), _openTag(), IE_Exp_XML::addComment(), IE_Exp_XML::addString(), PD_Document::getAttrPropIndex(), PD_Document::getTopXID(), PD_Document::isExportAuthorAtts(), m_apiLastSpan, m_bInAnnotation, m_bInBlock, m_bInHyperlink, m_bInSection, m_bInSpan, m_bIsTemplate, m_bOpenChar, m_iBlockLevel, m_iInCell, m_iInTable, m_pCurrentField, m_pDocument, m_pie, PD_Document::setAttributes(), IE_Exp_XML::setDocType(), and UT_std_string_sprintf().
s_AbiWord_1_Listener::~s_AbiWord_1_Listener | ( | ) | [virtual] |
void s_AbiWord_1_Listener::_closeAnnotation | ( | void | ) | [protected] |
References _closeSpan(), IE_Exp_XML::endElement(), m_bInAnnotation, m_pie, and UT_DEBUGMSG.
Referenced by populate(), populateStrux(), and ~s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_closeBlock | ( | void | ) | [protected] |
References IE_Exp_XML::addString(), IE_Exp_XML::endElement(), m_bInBlock, m_iBlockLevel, m_pie, and IE_Exp_XML::setPrettyPrint().
Referenced by populateStrux(), and ~s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_closeCell | ( | void | ) | [protected] |
References IE_Exp_XML::endElement(), m_iInCell, and m_pie.
Referenced by populateStrux().
void s_AbiWord_1_Listener::_closeField | ( | void | ) | [protected] |
References _closeSpan(), IE_Exp_XML::endElement(), m_pCurrentField, and m_pie.
Referenced by populate(), populateStrux(), and ~s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_closeHyperlink | ( | void | ) | [protected] |
References _closeSpan(), IE_Exp_XML::endElement(), m_bInHyperlink, and m_pie.
Referenced by populate(), populateStrux(), and ~s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_closeRDFAnchor | ( | void | ) | [protected] |
References _closeSpan(), IE_Exp_XML::endElement(), m_pie, and UT_DEBUGMSG.
Referenced by populate().
void s_AbiWord_1_Listener::_closeSection | ( | void | ) | [protected] |
References IE_Exp_XML::endElement(), m_bInSection, and m_pie.
Referenced by populateStrux(), and ~s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_closeSpan | ( | void | ) | [protected] |
References _closeTag(), and m_bInSpan.
Referenced by _closeAnnotation(), _closeField(), _closeHyperlink(), _closeRDFAnchor(), _openSpan(), populate(), populateStrux(), and ~s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_closeTable | ( | void | ) | [protected] |
References IE_Exp_XML::endElement(), m_iInTable, and m_pie.
Referenced by populateStrux().
void s_AbiWord_1_Listener::_closeTag | ( | void | ) | [protected] |
References IE_Exp_XML::endElement(), m_bOpenChar, and m_pie.
Referenced by _closeSpan(), and populate().
void s_AbiWord_1_Listener::_handleAuthors | ( | void | ) | [protected] |
References IE_Exp_XML::addInt(), IE_Exp_XML::addString(), IE_Exp_XML::endElement(), gchar, pp_Author::getAttrProp(), pp_Author::getAuthorInt(), PD_Document::getNthAuthor(), PP_AttrProp::getNthProperty(), PP_AttrProp::getPropertyCount(), m_pDocument, m_pie, PT_PROPS_ATTRIBUTE_NAME, IE_Exp_XML::startElement(), and szName.
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handleDataItems | ( | void | ) | [protected] |
References IE_Exp_XML::addString(), IE_Exp_XML::addStringUnchecked(), IE_Exp_XML::endElement(), PD_Document::enumDataItems(), m_pDocument, m_pie, m_pUsedImages, IE_Exp_XML::setPrettyPrint(), IE_Exp_XML::startElement(), szName, UT_Base64Encode(), UT_DEBUGMSG, and UT_MIN.
Referenced by ~s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handleHistory | ( | void | ) | [protected] |
References IE_Exp_XML::addBool(), IE_Exp_XML::addInt(), IE_Exp_XML::addString(), IE_Exp_XML::endElement(), AD_Document::getDocUUIDString(), AD_Document::getDocVersion(), AD_Document::getEditTime(), AD_Document::getHistoryCount(), AD_Document::getHistoryNthAutoRevisioned(), AD_Document::getHistoryNthId(), AD_Document::getHistoryNthTimeStarted(), AD_Document::getHistoryNthTopXID(), AD_Document::getHistoryNthUID(), AD_Document::getLastSavedTime(), m_pDocument, m_pie, s, IE_Exp_XML::startElement(), and UT_UUID::toString().
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handleLists | ( | void | ) | [protected] |
References IE_Exp_XML::addString(), IE_Exp_XML::endElement(), PD_Document::enumLists(), LCheck, m_pDocument, m_pie, s, and IE_Exp_XML::startElement().
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handleMetaData | ( | void | ) | [protected] |
References IE_Exp_XML::addString(), UT_String::c_str(), IE_Exp_XML::endElement(), PD_Document::getMetaData(), IE_MIMETYPE_AbiWord, IE_Exp::isCopying(), m_pDocument, m_pie, PD_META_KEY_DATE_LAST_CHANGED, PD_META_KEY_FORMAT, PD_META_KEY_GENERATOR, PD_Document::setMetaDataProp(), UT_String::size(), IE_Exp_XML::startElement(), UT_String::substr(), and time.
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handlePageSize | ( | void | ) | [protected] |
References IE_Exp_XML::addFloat(), IE_Exp_XML::addString(), IE_Exp_XML::endElement(), fp_PageSize::getDims(), fp_PageSize::getPredefinedName(), fp_PageSize::getScale(), fp_PageSize::Height(), fp_PageSize::isPortrait(), PD_Document::m_docPageSize, m_pDocument, m_pie, IE_Exp_XML::startElement(), UT_dimensionName(), and fp_PageSize::Width().
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handleRDF | ( | void | ) | [protected] |
References IE_Exp_XML::addString(), IE_Exp_XML::endElement(), PD_Document::getDocumentRDF(), m_pDocument, m_pie, IE_Exp_XML::startElement(), PD_URI::toString(), and UT_UTF8String::utf8_str().
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handleRevisions | ( | void | ) | [protected] |
References IE_Exp_XML::addBool(), IE_Exp_XML::addInt(), IE_Exp_XML::addLint(), IE_Exp_XML::addString(), IE_Exp_XML::addUint(), IE_Exp_XML::endElement(), AD_Revision::getDescription(), AD_Revision::getId(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), AD_Document::getRevisions(), AD_Document::getShowRevisionId(), AD_Revision::getStartTime(), AD_Revision::getVersion(), AD_Document::isAutoRevisioning(), AD_Document::isMarkRevisions(), AD_Document::isShowRevisions(), m_pDocument, m_pie, s, IE_Exp_XML::startElement(), UT_continue_if_fail, and UT_UCS4_strlen().
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_handleStyles | ( | void | ) | [protected] |
References _openTag(), IE_Exp_XML::endElement(), PD_Document::enumStyles(), UT_GenericVector< T >::findItem(), PD_Document::getAllUsedStyles(), PD_Style::getIndexAP(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), PD_Document::getStyleCount(), PD_Style::isUserDefined(), m_pDocument, m_pie, IE_Exp_XML::startElement(), UT_ASSERT_HARMLESS, and UT_continue_if_fail.
Referenced by s_AbiWord_1_Listener().
void s_AbiWord_1_Listener::_openSpan | ( | PT_AttrPropIndex | apiSpan | ) | [protected] |
References _closeSpan(), _openTag(), m_apiLastSpan, and m_bInSpan.
Referenced by populate().
void s_AbiWord_1_Listener::_openTag | ( | const char * | szPrefix, | |
bool | bHasContent, | |||
PT_AttrPropIndex | api, | |||
UT_uint32 | iXID, | |||
bool | bIgnoreProperties = false | |||
) | [protected] |
References IE_Exp_XML::addInt(), IE_Exp_XML::addString(), IE_Exp_XML::endElement(), UT_UTF8String::escapeURL(), gchar, PP_AttrProp::getAttribute(), PP_AttrProp::getAttributeCount(), PD_Document::getAttrProp(), PD_Document::getDataItemDataByName(), PP_AttrProp::getNthAttribute(), PP_AttrProp::getNthProperty(), PP_AttrProp::getProperty(), PP_AttrProp::getPropertyCount(), PD_Document::isExportAuthorAtts(), m_bOpenChar, m_pDocument, m_pie, PT_AUTHOR_NAME, PT_PROPS_ATTRIBUTE_NAME, IE_Exp_XML::startElement(), szName, UT_LAYOUT_RESOLUTION, UT_return_if_fail, UT_UTF8String::utf8_str(), and xxx_UT_DEBUGMSG.
Referenced by _handleStyles(), _openSpan(), populate(), populateStrux(), and s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::change | ( | fl_ContainerLayout * | sfh, | |
const PX_ChangeRecord * | pcr | |||
) | [virtual] |
Implements PL_Listener.
References UT_ASSERT_NOT_REACHED.
const gchar * s_AbiWord_1_Listener::getObjectKey | ( | const PT_AttrPropIndex & | api, | |
const gchar * | key | |||
) | [private] |
References gchar, PP_AttrProp::getAttribute(), PD_Document::getAttrProp(), and m_pDocument.
Referenced by populate(), and populateStrux().
virtual bool s_AbiWord_1_Listener::insertStrux | ( | fl_ContainerLayout * | sfh, | |
const PX_ChangeRecord * | pcr, | |||
pf_Frag_Strux * | sdh, | |||
PL_ListenerId | lid, | |||
void(*)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew) | pfnBindHandles | |||
) | [virtual] |
Implements PL_Listener.
bool s_AbiWord_1_Listener::populate | ( | fl_ContainerLayout * | sfh, | |
const PX_ChangeRecord * | pcr | |||
) | [virtual] |
Implements PL_Listener.
References _closeAnnotation(), _closeField(), _closeHyperlink(), _closeRDFAnchor(), _closeSpan(), _closeTag(), _openSpan(), _openTag(), UT_GenericVector< T >::addItem(), IE_Exp_XML::addString(), gchar, PD_Document::getAttrProp(), PX_ChangeRecord_Span::getBufIndex(), PD_Document::getDataItemDataByName(), PX_ChangeRecord_Object::getField(), PX_ChangeRecord_Span::getField(), PX_ChangeRecord::getIndexAP(), PX_ChangeRecord_Span::getLength(), PP_AttrProp::getNthAttribute(), getObjectKey(), PX_ChangeRecord_Object::getObjectType(), PD_Document::getPointer(), PX_ChangeRecord::getType(), PX_ChangeRecord::getXID(), RDFAnchor::isEnd(), m_bInAnnotation, m_bInHyperlink, m_bOpenChar, m_pCurrentField, m_pDocument, m_pie, m_pUsedImages, m_vecSnapNames, PTO_Annotation, PTO_Bookmark, PTO_Embed, PTO_Field, PTO_Hyperlink, PTO_Image, PTO_Math, PTO_RDFAnchor, PX_ChangeRecord::PXT_InsertFmtMark, PX_ChangeRecord::PXT_InsertObject, PX_ChangeRecord::PXT_InsertSpan, UT_ASSERT_HARMLESS, UT_ASSERT_NOT_REACHED, UT_DEBUGMSG, and UT_UTF8String::utf8_str().
bool s_AbiWord_1_Listener::populateStrux | ( | pf_Frag_Strux * | sdh, | |
const PX_ChangeRecord * | pcr, | |||
fl_ContainerLayout ** | psfh | |||
) | [virtual] |
Implements PL_Listener.
References _closeAnnotation(), _closeBlock(), _closeCell(), _closeField(), _closeHyperlink(), _closeSection(), _closeSpan(), _closeTable(), _openTag(), IE_Exp_XML::endElement(), gchar, PX_ChangeRecord::getIndexAP(), getObjectKey(), PX_ChangeRecord::getType(), PX_ChangeRecord::getXID(), m_bInBlock, m_bInSection, m_iBlockLevel, m_iInCell, m_iInTable, m_pie, m_pUsedImages, PT_STRUX_IMAGE_DATAID, PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndMarginnote, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionMarginnote, PTX_SectionTable, PTX_SectionTOC, IE_Exp_XML::setPrettyPrint(), UT_ASSERT_NOT_REACHED, UT_DEBUGMSG, and UT_return_val_if_fail.
bool s_AbiWord_1_Listener::signal | ( | UT_uint32 | iSignal | ) | [virtual] |
Implements PL_Listener.
References UT_ASSERT_NOT_REACHED.
UT_Error s_AbiWord_1_Listener::write_base64 | ( | void * | context, | |
const char * | base64, | |||
UT_uint32 | length, | |||
bool | final | |||
) |
UT_Error s_AbiWord_1_Listener::write_xml | ( | void * | context, | |
const char * | name | |||
) |
UT_Error s_AbiWord_1_Listener::write_xml | ( | void * | context, | |
const char * | name, | |||
const char *const * | atts | |||
) |
PT_AttrPropIndex s_AbiWord_1_Listener::m_apiLastSpan [protected] |
Referenced by _openSpan(), and s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::m_bInAnnotation [protected] |
Referenced by _closeAnnotation(), populate(), and s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::m_bInBlock [protected] |
Referenced by _closeBlock(), populateStrux(), and s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::m_bInHyperlink [protected] |
Referenced by _closeHyperlink(), populate(), and s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::m_bInSection [protected] |
Referenced by _closeSection(), populateStrux(), and s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::m_bInSpan [protected] |
Referenced by _closeSpan(), _openSpan(), and s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::m_bIsTemplate [protected] |
Referenced by s_AbiWord_1_Listener().
bool s_AbiWord_1_Listener::m_bOpenChar [protected] |
Referenced by _closeTag(), _openTag(), populate(), and s_AbiWord_1_Listener().
UT_sint32 s_AbiWord_1_Listener::m_iBlockLevel [protected] |
Referenced by _closeBlock(), populateStrux(), and s_AbiWord_1_Listener().
UT_sint32 s_AbiWord_1_Listener::m_iInCell [protected] |
Referenced by _closeCell(), populateStrux(), and s_AbiWord_1_Listener().
UT_sint32 s_AbiWord_1_Listener::m_iInTable [protected] |
Referenced by _closeTable(), populateStrux(), and s_AbiWord_1_Listener().
fd_Field* s_AbiWord_1_Listener::m_pCurrentField [protected] |
Referenced by _closeField(), populate(), and s_AbiWord_1_Listener().
PD_Document* s_AbiWord_1_Listener::m_pDocument [protected] |
IE_Exp_AbiWord_1* s_AbiWord_1_Listener::m_pie [protected] |
Referenced by _closeAnnotation(), _closeBlock(), _closeCell(), _closeField(), _closeHyperlink(), _closeRDFAnchor(), _closeSection(), _closeTable(), _closeTag(), _handleAuthors(), _handleDataItems(), _handleHistory(), _handleLists(), _handleMetaData(), _handlePageSize(), _handleRDF(), _handleRevisions(), _handleStyles(), _openTag(), populate(), populateStrux(), s_AbiWord_1_Listener(), and ~s_AbiWord_1_Listener().
Referenced by _handleDataItems(), populate(), and populateStrux().
UT_GenericVector<UT_UTF8String *> s_AbiWord_1_Listener::m_vecSnapNames [protected] |
Referenced by populate(), and ~s_AbiWord_1_Listener().