s_HTML_Listener Class Reference

Inheritance diagram for s_HTML_Listener:

PL_Listener

List of all members.

Public Member Functions

 s_HTML_Listener (PD_Document *pDocument, IE_Exp_HTML *pie, bool bClipBoard, bool bTemplateBody, const XAP_Exp_HTMLOptions *exp_opt, s_StyleTree *style_tree, UT_UTF8String &linkCSS, UT_UTF8String &title)
 ~s_HTML_Listener ()
bool populate (PL_StruxFmtHandle sfh, const PX_ChangeRecord *pcr)
bool populateStrux (PL_StruxDocHandle sdh, const PX_ChangeRecord *pcr, PL_StruxFmtHandle *psfh)
bool endOfDocument ()
bool change (PL_StruxFmtHandle sfh, const PX_ChangeRecord *pcr)
bool insertStrux (PL_StruxFmtHandle sfh, const PX_ChangeRecord *pcr, PL_StruxDocHandle sdh, PL_ListenerId lid, void(*pfnBindHandles)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew))
bool signal (UT_uint32 iSignal)
void startEmbeddedStrux (void)
void styleOpen (const UT_UTF8String &rule)
void styleClose ()
void styleNameValue (const char *name, const UT_UTF8String &value)
void setHaveHeader ()
void setHaveFooter ()

Private Types

enum  WhiteSpace { ws_None = 0, ws_Pre = 1, ws_Post = 2, ws_Both = 3 }

Private Member Functions

void _outputBegin (PT_AttrPropIndex api)
void _outputEnd ()
bool _openStyleSheet (UT_UTF8String &css_path)
void _closeStyleSheet ()
void _outputStyles (const PP_AttrProp *pAP)
void _openSection (PT_AttrPropIndex api, UT_uint16 iSectionSpecialType)
void _closeSection (void)
void _openTag (PT_AttrPropIndex api, PL_StruxDocHandle sdh)
void _closeTag (void)
void _closeSpan (void)
void _openSpan (PT_AttrPropIndex api)
void _popUnendedStructures (void)
void _openTable (PT_AttrPropIndex api)
void _closeTable ()
void _openRow (PT_AttrPropIndex api)
void _openCell (PT_AttrPropIndex api)
void _closeCell ()
void _openTextBox (PT_AttrPropIndex api)
void _openPosImage (PT_AttrPropIndex api)
void _closeTextBox ()
void _outputData (const UT_UCSChar *p, UT_uint32 length)
bool _inherits (const char *style, const char *from)
void _storeStyles (void)
void _populateHeaderStyle ()
void _populateFooterStyle ()
void _writeImage (const UT_ByteBuf *pByteBuf, const UT_UTF8String &imagedir, const UT_UTF8String &filename)
void _writeImageBase64 (const UT_ByteBuf *pByteBuf)
void _handleImage (PT_AttrPropIndex api)
void _handleImage (const PP_AttrProp *pAP, const char *szDataID, bool isPositioned)
void _handlePendingImages ()
void _handleField (const PX_ChangeRecord_Object *pcro, PT_AttrPropIndex api)
void _handleHyperlink (PT_AttrPropIndex api)
void _handleAnnotationMark (PT_AttrPropIndex api)
void _handleBookmark (PT_AttrPropIndex api)
void _handleMath (PT_AttrPropIndex api)
void _handleEmbedded (PT_AttrPropIndex api)
void _handleMetaTag (const char *key, UT_UTF8String &value)
void _handleMeta ()
void _doEndnotes ()
void _doFootnotes ()
void _doAnnotations ()
void _emitTOC (PT_AttrPropIndex api)
bool get_HTML4 () const
bool get_PHTML () const
bool get_Declare_XML () const
bool get_Allow_AWML () const
bool get_Embed_CSS () const
bool get_Link_CSS () const
bool get_Abs_Units () const
bool get_Scale_Units () const
UT_uint32 get_Compact () const
bool get_Embed_Images () const
bool get_Multipart () const
bool get_Class_Only () const
void tagRaw (UT_UTF8String &content)
UT_uint32 tagIndent ()
void tagNewIndent (UT_UTF8String &utf8, UT_uint32 depth)
void tagNewIndent (UT_uint32 extra=0)
void tagOpenClose (const UT_UTF8String &content, bool suppress, WhiteSpace ws=ws_Both)
void tagOpen (UT_uint32 tagID, const UT_UTF8String &content, WhiteSpace ws=ws_Both)
void tagClose (UT_uint32 tagID, const UT_UTF8String &content, WhiteSpace ws=ws_Both)
void tagClose (UT_uint32 tagID)
void tagOpenBroken (const UT_UTF8String &content, WhiteSpace ws=ws_Pre)
void tagCloseBroken (const UT_UTF8String &content, bool suppress, WhiteSpace ws=ws_Post)
UT_uint32 tagTop ()
void tagPop ()
void tagPI (const char *target, const UT_UTF8String &content)
void tagComment (const UT_UTF8String &content)
void tagCommentOpen ()
void tagCommentClose ()
void styleIndent ()
void styleText (const UT_UTF8String &content)
void textTrusted (const UT_UTF8String &text)
void textUntrusted (const char *text)
void multiHeader (const UT_UTF8String &title)
void multiBoundary (bool end=false)
void multiField (const char *name, const UT_UTF8String &value)
void multiBreak ()
UT_uint32 listDepth ()
UT_uint32 listType ()
void listPush (UT_uint32 type, const char *ClassName)
void listPop ()
void listPopToDepth (UT_uint32 depth)
bool compareStyle (const char *key, const char *value)
void _fillColWidthsVector ()
void _setCellWidthInches (void)
void addFootnote (PD_DocumentRange *pDocRange)
void addEndnote (PD_DocumentRange *pDocRange)
void addAnnotation (PD_DocumentRange *pDocRange)
UT_uint32 getNumFootnotes (void)
UT_uint32 getNumEndnotes (void)
UT_uint32 getNumAnnotations (void)

Private Attributes

PD_Documentm_pDocument
PT_AttrPropIndex m_apiLastSpan
IE_Exp_HTMLm_pie
bool m_bClipBoard
bool m_bTemplateBody
const XAP_Exp_HTMLOptionsm_exp_opt
s_StyleTreem_style_tree
bool m_bInSection
bool m_bInFrame
bool m_bInTextBox
bool m_bInTOC
bool m_bInBlock
bool m_bInSpan
bool m_bNextIsSpace
bool m_bWroteText
bool m_bFirstWrite
bool m_bQuotedPrintable
bool m_bHaveHeader
bool m_bHaveFooter
ie_Table m_TableHelper
UT_uint32 m_iBlockType
UT_uint32 m_iListDepth
UT_NumberStack m_utsListType
UT_uint32 m_iImgCnt
UT_Wctomb m_wmctomb
UT_UTF8String m_utf8_0
UT_UTF8String m_utf8_1
UT_UTF8String m_utf8_span
UT_UTF8String m_utf8_style
const s_StyleTreem_StyleTreeInline
const s_StyleTreem_StyleTreeBlock
const s_StyleTreem_StyleTreeBody
const PP_AttrPropm_pAPStyles
UT_UTF8String m_utf8_css_path
UT_NumberStack m_tagStack
UT_uint32 m_styleIndent
GsfOutput * m_fdCSS
UT_GenericStringMap
< UT_UTF8String * > 
m_SavedURLs
bool m_bIgnoreTillEnd
bool m_bIgnoreTillNextSection
PT_DocPosition m_iEmbedStartPos
double m_dPageWidthInches
double m_dSecLeftMarginInches
double m_dSecRightMarginInches
double m_dSecTopMarginInches
double m_dSecBottomMarginInches
double m_dCellWidthInches
UT_GenericVector< double * > m_vecDWidths
UT_UTF8Stringm_sLinkCSS
UT_UTF8Stringm_sTitle
UT_uint32 m_iOutputLen
bool m_bCellHasData
UT_GenericVector
< PD_DocumentRange * > 
m_vecFootnotes
UT_GenericVector
< PD_DocumentRange * > 
m_vecEndnotes
UT_GenericVector
< PD_DocumentRange * > 
m_vecAnnotations
IE_TOCHelperm_toc
int m_heading_count

Friends

class s_HTML_HdrFtr_Listener


Member Enumeration Documentation

Enumerator:
ws_None 
ws_Pre 
ws_Post 
ws_Both 


Constructor & Destructor Documentation

s_HTML_Listener::s_HTML_Listener ( PD_Document pDocument,
IE_Exp_HTML pie,
bool  bClipBoard,
bool  bTemplateBody,
const XAP_Exp_HTMLOptions exp_opt,
s_StyleTree style_tree,
UT_UTF8String linkCSS,
UT_UTF8String title 
)

s_HTML_Listener::~s_HTML_Listener (  ) 


Member Function Documentation

bool s_HTML_Listener::populate ( PL_StruxFmtHandle  sfh,
const PX_ChangeRecord pcr 
) [virtual]

bool s_HTML_Listener::populateStrux ( PL_StruxDocHandle  sdh,
const PX_ChangeRecord pcr,
PL_StruxFmtHandle psfh 
) [virtual]

bool s_HTML_Listener::endOfDocument (  ) 

bool s_HTML_Listener::change ( PL_StruxFmtHandle  sfh,
const PX_ChangeRecord pcr 
) [virtual]

Implements PL_Listener.

References UT_ASSERT_HARMLESS.

bool s_HTML_Listener::insertStrux ( PL_StruxFmtHandle  sfh,
const PX_ChangeRecord pcr,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid,
void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew)  pfnBindHandles 
) [virtual]

Implements PL_Listener.

bool s_HTML_Listener::signal ( UT_uint32  iSignal  )  [virtual]

Implements PL_Listener.

References UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.

void s_HTML_Listener::startEmbeddedStrux ( void   ) 

This closes open section tags and starts new one for embedded struxes

References _closeSection(), m_bInSection, m_utf8_1, tagOpen(), and TT_DIV.

Referenced by _doAnnotations(), and _doFootnotes().

void s_HTML_Listener::_outputBegin ( PT_AttrPropIndex  api  )  [private]

void s_HTML_Listener::_outputEnd (  )  [private]

bool s_HTML_Listener::_openStyleSheet ( UT_UTF8String css_path  )  [private]

void s_HTML_Listener::_closeStyleSheet (  )  [private]

References m_fdCSS.

Referenced by _outputStyles().

void s_HTML_Listener::_outputStyles ( const PP_AttrProp pAP  )  [private]

void s_HTML_Listener::_openSection ( PT_AttrPropIndex  api,
UT_uint16  iSectionSpecialType 
) [private]

void s_HTML_Listener::_closeSection ( void   )  [private]

void s_HTML_Listener::_openTag ( PT_AttrPropIndex  api,
PL_StruxDocHandle  sdh 
) [private]

void s_HTML_Listener::_closeTag ( void   )  [private]

void s_HTML_Listener::_closeSpan ( void   )  [private]

void s_HTML_Listener::_openSpan ( PT_AttrPropIndex  api  )  [private]

void s_HTML_Listener::_popUnendedStructures ( void   )  [private]

Close up all HTML-structures for which we haven't a definitive end in the piecetable, such as lists.

Todo:
Somebody needs to check for others aside from lists, in order to preempt ugly bugs.

References listPopToDepth(), and m_iListDepth.

Referenced by _closeCell(), endOfDocument(), and populateStrux().

void s_HTML_Listener::_openTable ( PT_AttrPropIndex  api  )  [private]

void s_HTML_Listener::_closeTable ( void   )  [private]

void s_HTML_Listener::_openRow ( PT_AttrPropIndex  api  )  [private]

void s_HTML_Listener::_openCell ( PT_AttrPropIndex  api  )  [private]

void s_HTML_Listener::_closeCell ( void   )  [private]

void s_HTML_Listener::_openTextBox ( PT_AttrPropIndex  api  )  [private]

void s_HTML_Listener::_openPosImage ( PT_AttrPropIndex  api  )  [private]

void s_HTML_Listener::_closeTextBox (  )  [private]

void s_HTML_Listener::_outputData ( const UT_UCSChar p,
UT_uint32  length 
) [private]