Public Member Functions | Private Member Functions | Private Attributes

ODe_Text_Listener Class Reference

Writes basic stuff like paragraphs, inlined images, etc. More...

#include <ODe_Text_Listener.h>

Inheritance diagram for ODe_Text_Listener:
ODe_AbiDocListenerImpl

List of all members.

Public Member Functions

 ODe_Text_Listener (ODe_Styles &rStyles, ODe_AutomaticStyles &rAutomatiStyles, GsfOutput *pTextOutput, ODe_AuxiliaryData &rAuxiliaryData, UT_uint8 zIndex, UT_uint8 spacesOffset)
 Constructor.
 ODe_Text_Listener (ODe_Styles &rStyles, ODe_AutomaticStyles &rAutomatiStyles, GsfOutput *pTextOutput, ODe_AuxiliaryData &rAuxiliaryData, UT_uint8 zIndex, UT_uint8 spacesOffset, const UT_UTF8String &rPendingMasterPageStyleName)
 Constructor.
 ~ODe_Text_Listener ()
virtual void openTable (const PP_AttrProp *pAP, ODe_ListenerAction &rAction)
virtual void closeCell (ODe_ListenerAction &rAction)
virtual void closeSection (ODe_ListenerAction &rAction)
virtual void openBlock (const PP_AttrProp *pAP, ODe_ListenerAction &rAction)
 Override of ODe_AbiDocListenerImpl::openBlock.
virtual void closeBlock ()
virtual void openSpan (const PP_AttrProp *pAP)
virtual void closeSpan ()
virtual void openFrame (const PP_AttrProp *pAP, ODe_ListenerAction &rAction)
virtual void closeFrame (ODe_ListenerAction &rAction)
virtual void openField (const fd_Field *field, const UT_UTF8String &fieldType, const UT_UTF8String &fieldValue)
virtual void closeField (const UT_UTF8String &fieldType)
virtual void openFootnote (const PP_AttrProp *pAP, ODe_ListenerAction &rAction)
virtual void closeFootnote (ODe_ListenerAction &rAction)
virtual void openEndnote (const PP_AttrProp *pAP, ODe_ListenerAction &rAction)
virtual void closeEndnote (ODe_ListenerAction &rAction)
virtual void openAnnotation (const PP_AttrProp *pAP, const std::string &name, PD_Document *doc=0)
virtual void closeAnnotation (const std::string &name)
virtual void endAnnotation (const std::string &name)
virtual void openTOC (const PP_AttrProp *pAP)
virtual void closeTOC ()
virtual void openBookmark (const PP_AttrProp *pAP)
virtual void closeBookmark (const PP_AttrProp *pAP)
virtual void closeBookmark (UT_UTF8String &sBookmarkName)
virtual void openHyperlink (const PP_AttrProp *pAP)
virtual void closeHyperlink ()
void openRDFAnchor (const PP_AttrProp *pAP)
void closeRDFAnchor (const PP_AttrProp *pAP)
virtual void insertText (const UT_UTF8String &rText)
virtual void insertLineBreak ()
virtual void insertColumnBreak ()
virtual void insertPageBreak ()
virtual void insertTabChar ()
virtual void insertInlinedImage (const gchar *pImageName, const PP_AttrProp *pAP)
virtual void insertPositionedImage (const gchar *pImageName, const PP_AttrProp *pAP)
void setOpenedODNote (bool b)
void setIgnoreFirstTab (bool b)

Private Member Functions

void _initDefaultHeadingStyles ()
bool _blockIsPlainParagraph (const PP_AttrProp *pAP) const
 Returns true if the properties belongs to a plain paragraph, false otherwise.
void _openODListItem (const PP_AttrProp *pAP)
 Open a <text:list-item>, in some cases along with a preceding <text:list>
void _openODParagraph (const PP_AttrProp *pAP)
void _closeODParagraph ()
void _closeODList ()
 Close an OpenDocument list if there is one currently open.
void _openParagraphDelayed ()
UT_UTF8StringappendAttribute (UT_UTF8String &ret, const char *key, const char *value)

Private Attributes

const PP_AttrPropm_delayedAP
ODe_Style_Listm_delayedListStyle
bool m_delayedPendingMasterPageStyleChange
bool m_delayedPageBreak
bool m_delayedColumnBreak
std::string m_delayedMasterPageStyleName
UT_uint32 m_delayedSpacesOffset
bool m_openedODParagraph
bool m_openedODSpan
bool m_isFirstCharOnParagraph
bool m_isHeadingParagraph
bool m_openedODTextboxFrame
bool m_openedODNote
bool m_bIgoreFirstTab
GsfOutput * m_pParagraphContent
UT_uint8 m_currentListLevel
ODe_Style_Listm_pCurrentListStyle
bool m_pendingColumnBreak
bool m_pendingPageBreak
bool m_bAfter
bool m_pendingMasterPageStyleChange
UT_UTF8String m_masterPageStyleName
ODe_Stylesm_rStyles
ODe_AutomaticStylesm_rAutomatiStyles
GsfOutput * m_pTextOutput
ODe_AuxiliaryDatam_rAuxiliaryData
UT_uint8 m_zIndex
UT_sint32 m_iCurrentTOC

Detailed Description

Writes basic stuff like paragraphs, inlined images, etc.


Constructor & Destructor Documentation

ODe_Text_Listener::ODe_Text_Listener ( ODe_Styles rStyles,
ODe_AutomaticStyles rAutomatiStyles,
GsfOutput *  pTextOutput,
ODe_AuxiliaryData rAuxiliaryData,
UT_uint8  zIndex,
UT_uint8  spacesOffset 
)

Constructor.

Parameters:
pTextOutput Handle to the file (often a temp one) that will receive the ODT output produced by this listener.

References _initDefaultHeadingStyles().

ODe_Text_Listener::ODe_Text_Listener ( ODe_Styles rStyles,
ODe_AutomaticStyles rAutomatiStyles,
GsfOutput *  pTextOutput,
ODe_AuxiliaryData rAuxiliaryData,
UT_uint8  zIndex,
UT_uint8  spacesOffset,
const UT_UTF8String rPendingMasterPageStyleName 
)

Constructor.

Parameters:
pTextOutput Handle to the file (often a temp one) that will receive the ODT output produced by this listener.

References _initDefaultHeadingStyles().

ODe_Text_Listener::~ODe_Text_Listener (  ) 

Member Function Documentation

bool ODe_Text_Listener::_blockIsPlainParagraph ( const PP_AttrProp pAP  )  const [private]

Returns true if the properties belongs to a plain paragraph, false otherwise.

An AbiWord

tag (block) can be, for instance, a list item if it has a "listid" and/or "level" attribute.

References gchar, and PP_AttrProp::getAttribute().

UT_UTF8String & ODe_Text_Listener::appendAttribute ( UT_UTF8String ret,
const char *  key,
const char *  value 
) [private]
void ODe_Text_Listener::closeAnnotation ( const std::string &  name  )  [virtual]
void ODe_Text_Listener::closeBlock (  )  [virtual]
void ODe_Text_Listener::closeBookmark ( const PP_AttrProp pAP  )  [virtual]
void ODe_Text_Listener::closeBookmark ( UT_UTF8String sBookmarkName  )  [virtual]
void ODe_Text_Listener::closeCell ( ODe_ListenerAction rAction  )  [virtual]
void ODe_Text_Listener::closeEndnote ( ODe_ListenerAction rAction  )  [virtual]
void ODe_Text_Listener::closeField ( const UT_UTF8String fieldType  )  [virtual]
void ODe_Text_Listener::closeFootnote ( ODe_ListenerAction rAction  )  [virtual]
void ODe_Text_Listener::closeFrame ( ODe_ListenerAction rAction  )  [virtual]
void ODe_Text_Listener::closeHyperlink (  )  [virtual]
void ODe_Text_Listener::closeRDFAnchor ( const PP_AttrProp pAP  )  [virtual]
void ODe_Text_Listener::closeSection ( ODe_ListenerAction rAction  )  [virtual]
void ODe_Text_Listener::closeSpan (  )  [virtual]
void ODe_Text_Listener::closeTOC (  )  [virtual]
void ODe_Text_Listener::endAnnotation ( const std::string &  name  )  [virtual]

Reimplemented from ODe_AbiDocListenerImpl.

References m_pParagraphContent, and ODe_write().

void ODe_Text_Listener::insertColumnBreak (  )  [virtual]
void ODe_Text_Listener::insertLineBreak (  )  [virtual]
void ODe_Text_Listener::insertPageBreak (  )  [virtual]
void ODe_Text_Listener::insertTabChar (  )  [virtual]
void ODe_Text_Listener::insertText ( const UT_UTF8String rText  )  [virtual]
void ODe_Text_Listener::openBlock ( const PP_AttrProp pAP,
ODe_ListenerAction rAction 
) [virtual]
void ODe_Text_Listener::openBookmark ( const PP_AttrProp pAP  )  [virtual]
void ODe_Text_Listener::openField ( const fd_Field field,
const UT_UTF8String fieldType,
const UT_UTF8String fieldValue 
) [virtual]
void ODe_Text_Listener::openHyperlink ( const PP_AttrProp pAP  )  [virtual]
void ODe_Text_Listener::openRDFAnchor ( const PP_AttrProp pAP  )  [virtual]
void ODe_Text_Listener::setIgnoreFirstTab ( bool  b  )  [inline]
void ODe_Text_Listener::setOpenedODNote ( bool  b  )  [inline]

References m_openedODNote.


Member Data Documentation


The documentation for this class was generated from the following files: