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, const char *szSuffix, bool bNewLineAfter, PT_AttrPropIndex api, UT_uint32 iXID, bool bIgnoreProperties=false) |
| void | _outputData (const UT_UCSChar *p, UT_uint32 length) |
| void | _outputXMLChar (const gchar *data, UT_uint32 length) |
| void | _outputXMLChar (const std::string &s) |
| void | _outputXMLAttribute (const gchar *key, const gchar *value, UT_uint32 length) |
| void | _outputXMLAttribute (const gchar *key, const std::string &value) |
| 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 |
| 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(), UT_String::c_str(), gchar, 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_iInCell, m_iInTable, m_pCurrentField, m_pDocument, m_pie, s, PD_Document::setAttributes(), UT_String_sprintf(), and IE_Exp::write().
| s_AbiWord_1_Listener::~s_AbiWord_1_Listener | ( | ) | [virtual] |
| void s_AbiWord_1_Listener::_closeAnnotation | ( | void | ) | [protected] |
References _closeSpan(), m_bInAnnotation, m_pie, UT_DEBUGMSG, and IE_Exp::write().
Referenced by populate(), populateStrux(), and ~s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_closeBlock | ( | void | ) | [protected] |
References m_bInBlock, m_pie, and IE_Exp::write().
Referenced by populateStrux(), and ~s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_closeCell | ( | void | ) | [protected] |
References m_iInCell, m_pie, and IE_Exp::write().
Referenced by populateStrux().
| void s_AbiWord_1_Listener::_closeField | ( | void | ) | [protected] |
References _closeSpan(), m_pCurrentField, m_pie, and IE_Exp::write().
Referenced by populate(), populateStrux(), and ~s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_closeHyperlink | ( | void | ) | [protected] |
References _closeSpan(), m_bInHyperlink, m_pie, and IE_Exp::write().
Referenced by populate(), populateStrux(), and ~s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_closeRDFAnchor | ( | void | ) | [protected] |
References _closeSpan(), m_pie, UT_DEBUGMSG, and IE_Exp::write().
Referenced by populate().
| void s_AbiWord_1_Listener::_closeSection | ( | void | ) | [protected] |
References m_bInSection, m_pie, and IE_Exp::write().
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 m_iInTable, m_pie, and IE_Exp::write().
Referenced by populateStrux().
| void s_AbiWord_1_Listener::_closeTag | ( | void | ) | [protected] |
References m_bOpenChar, m_pie, and IE_Exp::write().
Referenced by _closeSpan(), and populate().
| void s_AbiWord_1_Listener::_handleAuthors | ( | void | ) | [protected] |
References _outputXMLChar(), UT_String::c_str(), gchar, pp_Author::getAttrProp(), pp_Author::getAuthorInt(), PD_Document::getNthAuthor(), PP_AttrProp::getNthProperty(), PP_AttrProp::getPropertyCount(), m_pDocument, m_pie, PT_PROPS_ATTRIBUTE_NAME, szName, UT_String_sprintf(), and IE_Exp::write().
Referenced by s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handleDataItems | ( | void | ) | [protected] |
References _outputXMLChar(), UT_ByteBuf::append(), PD_Document::enumDataItems(), UT_ByteBuf::getLength(), UT_ByteBuf::getPointer(), m_pDocument, m_pie, m_pUsedImages, AD_Document::resourceManager(), szName, UT_ByteBuf::truncate(), UT_Base64Encode(), UT_DEBUGMSG, UT_MIN, IE_Exp::write(), and XAP_ResourceManager::write_xml().
Referenced by ~s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handleHistory | ( | void | ) | [protected] |
References 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, UT_UUID::toString(), UT_UTF8String_sprintf(), UT_UTF8String::utf8_str(), and IE_Exp::write().
Referenced by s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handleLists | ( | void | ) | [protected] |
References PD_Document::enumLists(), FREEP, fl_AutoNum::getAttributes(), fl_AutoNum::isEmpty(), LCheck, m_pDocument, m_pie, s, UT_UTF8String::utf8_str(), and IE_Exp::write().
Referenced by s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handleMetaData | ( | void | ) | [protected] |
References _outputXMLChar(), UT_String::c_str(), 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(), UT_String::substr(), time, and IE_Exp::write().
Referenced by s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handlePageSize | ( | void | ) | [protected] |
References fp_PageSize::getDims(), fp_PageSize::getPredefinedName(), fp_PageSize::getScale(), fp_PageSize::Height(), fp_PageSize::isPortrait(), PD_Document::m_docPageSize, m_pDocument, m_pie, UT_dimensionName(), UT_String_sprintf(), fp_PageSize::Width(), and IE_Exp::write().
Referenced by s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handleRDF | ( | void | ) | [protected] |
References _outputXMLAttribute(), _outputXMLChar(), UT_UTF8String::byteLength(), PD_Document::getDocumentRDF(), m_pDocument, m_pie, PD_URI::toString(), UT_UTF8String::utf8_str(), and IE_Exp::write().
Referenced by s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handleRevisions | ( | void | ) | [protected] |
References _outputData(), 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, UT_continue_if_fail, UT_std_string_sprintf(), UT_UCS4_strlen(), and IE_Exp::write().
Referenced by s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_handleStyles | ( | void | ) | [protected] |
References _openTag(), 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, UT_ASSERT_HARMLESS, UT_continue_if_fail, and IE_Exp::write().
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, | |
| const char * | szSuffix, | |||
| bool | bNewLineAfter, | |||
| PT_AttrPropIndex | api, | |||
| UT_uint32 | iXID, | |||
| bool | bIgnoreProperties = false | |||
| ) | [protected] |
References _outputXMLChar(), UT_UTF8String::byteLength(), UT_String::c_str(), UT_UTF8String::clear(), UT_UTF8String::escapeURL(), UT_UTF8String::escapeXML(), gchar, PP_AttrProp::getAttribute(), PD_Document::getAttrProp(), PD_Document::getDataItemDataByName(), PP_AttrProp::getNthAttribute(), PP_AttrProp::getNthProperty(), PP_AttrProp::getProperty(), PD_Document::isExportAuthorAtts(), m_bOpenChar, m_pDocument, m_pie, PT_AUTHOR_NAME, PT_PROPS_ATTRIBUTE_NAME, PT_XID_ATTRIBUTE_NAME, XAP_ResourceManager::resource(), AD_Document::resourceManager(), s, szName, XAP_ExternalResource::URL(), UT_ASSERT_HARMLESS, UT_LAYOUT_RESOLUTION, UT_return_if_fail, UT_String_sprintf(), UT_UTF8String_sprintf(), UT_UTF8String::utf8_str(), IE_Exp::write(), and xxx_UT_DEBUGMSG.
Referenced by _handleStyles(), _openSpan(), populate(), populateStrux(), and s_AbiWord_1_Listener().
| void s_AbiWord_1_Listener::_outputData | ( | const UT_UCSChar * | p, | |
| UT_uint32 | length | |||
| ) | [protected] |
References UT_UTF8String::appendUCS4(), UT_UTF8String::byteLength(), m_pie, UT_UTF8String::reserve(), UCS_FF, UCS_LF, UCS_TAB, UCS_VTAB, UT_return_if_fail, UT_UTF8String::utf8_str(), and IE_Exp::write().
Referenced by _handleRevisions(), and populate().
| void s_AbiWord_1_Listener::_outputXMLAttribute | ( | const gchar * | key, | |
| const gchar * | value, | |||
| UT_uint32 | length | |||
| ) | [protected] |
References _outputXMLChar(), m_pie, and IE_Exp::write().
Referenced by _handleRDF(), and _outputXMLAttribute().
| void s_AbiWord_1_Listener::_outputXMLAttribute | ( | const gchar * | key, | |
| const std::string & | value | |||
| ) | [protected] |
References _outputXMLAttribute().
| void s_AbiWord_1_Listener::_outputXMLChar | ( | const gchar * | data, | |
| UT_uint32 | length | |||
| ) | [protected] |
References UT_UTF8String::byteLength(), UT_UTF8String::escapeXML(), m_pie, UT_UTF8String::utf8_str(), and IE_Exp::write().
Referenced by _handleAuthors(), _handleDataItems(), _handleMetaData(), _handleRDF(), _openTag(), _outputXMLAttribute(), and _outputXMLChar().
| void s_AbiWord_1_Listener::_outputXMLChar | ( | const std::string & | s | ) | [inline, protected] |
References _outputXMLChar().
| 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(), _outputData(), UT_GenericVector< T >::addItem(), 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_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(), gchar, PX_ChangeRecord::getIndexAP(), getObjectKey(), PX_ChangeRecord::getType(), PX_ChangeRecord::getXID(), m_bInBlock, m_bInSection, 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, UT_ASSERT_NOT_REACHED, UT_DEBUGMSG, UT_return_val_if_fail, and IE_Exp::write().
| 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 | |||
| ) |
References m_pie, and IE_Exp::write().
| UT_Error s_AbiWord_1_Listener::write_xml | ( | void * | context, | |
| const char * | name, | |||
| const char *const * | atts | |||
| ) |
References UT_UTF8String::byteLength(), m_pie, UT_UTF8String::utf8_str(), and IE_Exp::write().
| UT_Error s_AbiWord_1_Listener::write_xml | ( | void * | context, | |
| const char * | name | |||
| ) |
References UT_UTF8String::byteLength(), m_pie, UT_UTF8String::utf8_str(), and IE_Exp::write().
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_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(), _outputData(), _outputXMLAttribute(), _outputXMLChar(), populateStrux(), s_AbiWord_1_Listener(), write_base64(), write_xml(), 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().
1.7.1