MWAWTextListener Class Reference documentation

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
MWAWTextListener Class Referencefinal

This class contents the main functions needed to create a Word processing Document. More...

`#include <MWAWTextListener.hxx>`

Inheritance diagram for MWAWTextListener:

## Public Member Functions
| MWAWTextListener (MWAWParserState &parserState, std::vector< MWAWPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
| constructor More...
| ~MWAWTextListener () final
| destructor More...
Type | getType () const final
| returns the listener type More...
void | setDocumentMetaData (librevenge::RVNGPropertyList const &metadata) final
| sets the documents metadata More...
void | setDocumentLanguage (std::string const &locale) final
| sets the documents language More...
void | startDocument () final
| starts the document More...
void | endDocument (bool sendDelayedSubDoc=true) final
| ends the document More...
bool | isDocumentStarted () const final
| returns true if a document is opened More...
void | handleSubDocument (MWAWSubDocumentPtr const &subDocument, libmwaw::SubDocumentType subDocumentType) final
| function called to add a subdocument More...
bool | isSubDocumentOpened (libmwaw::SubDocumentType &subdocType) const final
| returns try if a subdocument is open More...
bool | openFrame (MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle()) final
| tries to open a frame More...
void | closeFrame () final
| tries to close the last open frame More...
bool | openGroup (MWAWPosition const &pos) final
| open a group More...
void | closeGroup () final
| close a group More...
bool | canWriteText () const final
| returns true if we can add text data More...
bool | isPageSpanOpened () const final
| returns true if a page is opened More...
MWAWPageSpan const & | getPageSpan () final
| returns the current page span More...
bool | insertHeader (MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList const &extras) final
| insert a header More...
bool | insertFooter (MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList const &extras) final
| insert a footer More...
bool | isHeaderFooterOpened () const final
| returns true if the header/footer is open More...
void | insertChar (uint8_t character) final
| adds a basic character, .. More...
void | insertCharacter (unsigned char c) final
| insert a character using the font converter to find the utf8 character More...
int | insertCharacter (unsigned char c, MWAWInputStreamPtr &input, long endPos=-1) final
| insert a character using the font converter to find the utf8 character and if needed, input to read extra character. More...
void | insertUnicode (uint32_t character) final
| adds an unicode character. More...
void | insertUnicodeString (librevenge::RVNGString const &str) final
| adds a unicode string More...
void | insertTab () final
| adds a tab More...
void | insertEOL (bool softBreak=false) final
| adds an end of line ( by default an hard one) More...
void | setFont (MWAWFont const &font) final
| sets the font More...
MWAWFont const & | getFont () const final
| returns the actual font More...
bool | isParagraphOpened () const final
| returns true if a paragraph or a list is opened More...
void | setParagraph (MWAWParagraph const &paragraph) final
| sets the paragraph More...
MWAWParagraph const & | getParagraph () const final
| returns the actual paragraph More...
void | insertField (MWAWField const &field) final
| adds a field type More...
void | openLink (MWAWLink const &link) final
| open a link More...
void | closeLink () final
| close a link More...
void | insertNote (MWAWNote const &note, MWAWSubDocumentPtr &subDocument) final
| insert a note More...
void | insertComment (MWAWSubDocumentPtr &subDocument) final
| adds comment More...
void | insertPicture (MWAWPosition const &pos, MWAWEmbeddedObject const &picture, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle()) final
| adds a picture with potential various representationin given position More...
void | insertShape (MWAWPosition const &pos, MWAWGraphicShape const &shape, MWAWGraphicStyle const &style) final
| adds a shape picture in given position More...
void | insertTextBox (MWAWPosition const &pos, MWAWSubDocumentPtr const &subDocument, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle()) final
| adds a textbox in given position More...
void | openTable (MWAWTable const &table) final
| open a table More...
void | closeTable () final
| closes this table More...
void | openTableRow (float h, librevenge::RVNGUnit unit, bool headerRow=false) final
| open a row with given height ( if h < 0.0, set min-row-height = -h ) More...
void | closeTableRow () final
| closes this row More...
void | openTableCell (MWAWCell const &cell) final
| open a cell More...
void | closeTableCell () final
| close a cell More...
void | addEmptyTableCell (MWAWVec2i const &pos, MWAWVec2i span=MWAWVec2i(1, 1)) final
| add empty cell More...
bool | canOpenSectionAddBreak () const final
| returns true if we can add open a section, add page break, ... More...
bool | isSectionOpened () const final
| returns true if a section is opened More...
MWAWSection const & | getSection () const final
| returns the actual section More...
bool | openSection (MWAWSection const &section) final
| open a section if possible More...
bool | closeSection () final
| close a section More...
void | insertBreak (BreakType breakType) final
| inserts a break type: ColumBreak, PageBreak, .. More...
Public Member Functions inherited from MWAWListener
virtual | ~MWAWListener ()
| destructor More...
virtual Type | getType () const =0
| returns the listener type More...
virtual bool | canWriteText () const =0
| returns true if we can add text data More...
virtual void | setDocumentMetaData (librevenge::RVNGPropertyList const &metadata)=0
| sets the documents metadata More...
virtual void | setDocumentLanguage (std::string const &locale)=0
| sets the documents language More...
virtual void | startDocument ()=0
| starts the document More...
virtual bool | isDocumentStarted () const =0
| returns true if a document is opened More...
virtual void | endDocument (bool sendDelayedSubDoc=true)=0
| ends the document More...
virtual bool | isPageSpanOpened () const =0
| returns true if a page is opened More...
virtual MWAWPageSpan const & | getPageSpan ()=0
| returns the current page span More...
virtual bool | insertHeader (MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList const &extras)=0
| insert a header (interaction with MWAWPageSpan which fills the parameters for openHeader) More...
virtual bool | insertFooter (MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList const &extras)=0
| insert a footer (interaction with MWAWPageSpan which fills the parameters for openFooter) More...
virtual bool | isHeaderFooterOpened () const =0
| returns true if the header/footer is open More...
virtual void | insertChar (uint8_t character)=0
| adds a basic character, .. More...
virtual void | insertCharacter (unsigned char c)=0
| insert a character using the font converter to find the utf8 character More...
virtual int | insertCharacter (unsigned char c, MWAWInputStreamPtr &input, long endPos=-1)=0
| insert a character using the font converter to find the utf8 character and if needed, input to read extra character. More...
virtual void | insertUnicode (uint32_t character)=0
| adds an unicode character. More...
virtual void | insertUnicodeString (librevenge::RVNGString const &str)=0
| adds a unicode string More...
virtual void | insertTab ()=0
| adds a tab More...
virtual void | insertEOL (bool softBreak=false)=0
| adds an end of line ( by default an hard one) More...
virtual void | setFont (MWAWFont const &font)=0
| sets the font More...
virtual MWAWFont const & | getFont () const =0
| returns the actual font More...
virtual bool | isParagraphOpened () const =0
| returns true if a paragraph or a list is opened More...
virtual void | setParagraph (MWAWParagraph const &paragraph)=0
| sets the paragraph More...
virtual MWAWParagraph const & | getParagraph () const =0
| returns the actual paragraph More...
virtual void | insertField (MWAWField const &field)=0
| adds a field type More...
virtual void | openLink (MWAWLink const &link)=0
| open a link More...
virtual void | closeLink ()=0
| close a link More...
virtual void | openTable (MWAWTable const &table)=0
| open a table More...
virtual void | closeTable ()=0
| closes this table More...
virtual void | openTableRow (float h, librevenge::RVNGUnit unit, bool headerRow=false)=0
| open a row with given height ( if h < 0.0, set min-row-height = -h ) More...
virtual void | closeTableRow ()=0
| closes this row More...
virtual void | openTableCell (MWAWCell const &cell)=0
| open a cell More...
virtual void | closeTableCell ()=0
| close a cell More...
virtual void | addEmptyTableCell (MWAWVec2i const &pos, MWAWVec2i span=MWAWVec2i(1, 1))=0
| add empty cell More...
virtual bool | canOpenSectionAddBreak () const =0
| returns true if we can add open a section, add page break, ... More...
virtual bool | isSectionOpened () const =0
| returns true if a section is opened More...
virtual MWAWSection const & | getSection () const =0
| returns the actual section More...
virtual bool | openSection (MWAWSection const &section)=0
| open a section if possible More...
virtual bool | closeSection ()=0
| close a section More...
virtual void | insertBreak (BreakType breakType)=0
| inserts a break type: ColumBreak, PageBreak, .. More...
virtual void | insertNote (MWAWNote const &note, MWAWSubDocumentPtr &subDocument)=0
| insert a note More...
virtual void | insertComment (MWAWSubDocumentPtr &subDocument)=0
| adds comment More...
virtual void | insertPicture (MWAWPosition const &pos, MWAWEmbeddedObject const &picture, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())=0
| adds a picture with various representationin given position. More...
virtual void | insertShape (MWAWPosition const &pos, MWAWGraphicShape const &shape, MWAWGraphicStyle const &style)=0
| adds a shape picture in given position More...
virtual void | insertTextBox (MWAWPosition const &pos, MWAWSubDocumentPtr const &subDocument, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle())=0
| adds a textbox in given position More...
virtual void | insertTextBoxInShape (MWAWPosition const &pos, MWAWSubDocumentPtr const &subDocument, MWAWGraphicShape const &, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle())
| adds a textbox in given position More...
virtual bool | openFrame (MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())=0
| low level: tries to open a frame More...
virtual void | closeFrame ()=0
| low level: tries to close the last opened frame More...
virtual bool | openGroup (MWAWPosition const &pos)=0
| low level: tries to open a group More...
virtual void | closeGroup ()=0
| low level: tries to close the last opened group More...
virtual void | handleSubDocument (MWAWSubDocumentPtr const &subDocument, libmwaw::SubDocumentType subDocumentType)=0
| low level: function called to add a subdocument More...
virtual bool | isSubDocumentOpened (libmwaw::SubDocumentType &subdocType) const =0
| returns true if a subdocument is open More...

## Protected Member Functions
void | _openSection ()
| does open a section (low level) More...
void | _closeSection ()
| does close a section (low level) More...
void | _openPageSpan (bool sendHeaderFooters=true)
| does open a new page (low level) More...
void | _closePageSpan ()
| does close a page (low level) More...
void | _startSubDocument ()
void | _endSubDocument ()
void | _handleFrameParameters (librevenge::RVNGPropertyList &propList, MWAWPosition const &pos)
void | _openParagraph ()
void | _closeParagraph ()
void | _appendParagraphProperties (librevenge::RVNGPropertyList &propList, const bool isListElement=false)
void | _resetParagraphState (const bool isListElement=false)
void | _openListElement ()
| open a list level More...
void | _closeListElement ()
| close a list level More...
void | _changeList ()
| update the list so that it corresponds to the actual level More...
int | _getListId () const
| low level: find a list id which corresponds to actual list and a change of level. More...
void | _openSpan ()
| low level: the function which opens a new span property More...
void | _closeSpan ()
| low level: the function which closes the last opened span property More...
void | _flushText ()
| low level: flush the deferred text More...
void | _flushDeferredTabs ()
| low level: flush the deferred tabs More...
void | _insertBreakIfNecessary (librevenge::RVNGPropertyList &propList)
std::shared_ptr< MWAWTextListenerInternal::State > | _pushParsingState ()
| creates a new parsing state (copy of the actual state) More...
void | _popParsingState ()
| resets the previous parsing state More...

## Protected Attributes
std::shared_ptr< MWAWTextListenerInternal::DocumentState > | m_ds
| the main parse state More...
std::shared_ptr< MWAWTextListenerInternal::State > | m_ps
| the actual local parse state More...
std::vector< std::shared_ptr< MWAWTextListenerInternal::State > > | m_psStack
| stack of local state More...
MWAWParserState & | m_parserState
| the parser state More...
librevenge::RVNGTextInterface * | m_documentInterface
| the document interface More...

## Private Member Functions
| MWAWTextListener (const MWAWTextListener &)=delete
| copy constructor (unimplemented) More...
MWAWTextListener & | operator= (const MWAWTextListener &)=delete
| operator= (unimplemented) More...

## Additional Inherited Members
Public Types inherited from MWAWListener
enum | Type { Graphic , Presentation , Spreadsheet , Text }
| the listener type More...
enum | BreakType { PageBreak =0 , SoftPageBreak , ColumnBreak }
| the different break type More...

## Detailed Description

This class contents the main functions needed to create a Word processing Document.

## Constructor & Destructor Documentation

## ◆ MWAWTextListener() [1/2]

MWAWTextListener::MWAWTextListener | ( | MWAWParserState & | parserState,
|  | std::vector< MWAWPageSpan > const & | pageList,
|  | librevenge::RVNGTextInterface * | documentInterface
| ) |  |

constructor

## ◆ ~MWAWTextListener()

MWAWTextListener::~MWAWTextListener | ( |  | ) |
| final

destructor

## ◆ MWAWTextListener() [2/2]

MWAWTextListener::MWAWTextListener | ( | const MWAWTextListener & |  | ) |
| privatedelete

copy constructor (unimplemented)

## Member Function Documentation

## ◆ _appendParagraphProperties()

void MWAWTextListener::_appendParagraphProperties | ( | librevenge::RVNGPropertyList & | propList,
|  | const bool | isListElement = `false`
| ) |  |
| protected

Referenced by _openListElement(), and _openParagraph().

## ◆ _changeList()

void MWAWTextListener::_changeList | ( |  | ) |
| protected

update the list so that it corresponds to the actual level

Referenced by _closeSection(), _endSubDocument(), _openSpan(), closeTableCell(), endDocument(), and insertNote().

## ◆ _closeListElement()

void MWAWTextListener::_closeListElement | ( |  | ) |
| protected

close a list level

Referenced by _closeParagraph().

## ◆ _closePageSpan()

void MWAWTextListener::_closePageSpan | ( |  | ) |
| protected

does close a page (low level)

Referenced by _closeListElement(), _closeParagraph(), endDocument(), and insertBreak().

## ◆ _closeParagraph()

void MWAWTextListener::_closeParagraph | ( |  | ) |
| protected

Referenced by _changeList(), _closeSection(), _endSubDocument(), closeTableCell(), endDocument(), insertBreak(), insertEOL(), insertNote(), and openTable().

## ◆ _closeSection()

void MWAWTextListener::_closeSection | ( |  | ) |
| protected

does close a section (low level)

Referenced by _closePageSpan(), _openListElement(), _openParagraph(), closeSection(), endDocument(), and handleSubDocument().

## ◆ _closeSpan()

void MWAWTextListener::_closeSpan | ( |  | ) |
| protected

low level: the function which closes the last opened span property

Referenced by _closeListElement(), _closeParagraph(), _flushDeferredTabs(), closeLink(), insertComment(), insertNote(), and setFont().

## ◆ _endSubDocument()

void MWAWTextListener::_endSubDocument | ( |  | ) |
| protected

Referenced by closeGroup(), closeTable(), and handleSubDocument().

## ◆ _flushDeferredTabs()

void MWAWTextListener::_flushDeferredTabs | ( |  | ) |
| protected

low level: flush the deferred tabs

Referenced by insertChar(), insertEOL(), insertField(), insertTab(), insertUnicode(), and insertUnicodeString().

## ◆ _flushText()

void MWAWTextListener::_flushText | ( |  | ) |
| protected

low level: flush the deferred text

Referenced by _closeSpan(), insertComment(), insertEOL(), insertField(), insertNote(), insertShape(), insertTab(), openFrame(), and openGroup().

## ◆ _getListId()

int MWAWTextListener::_getListId | ( |  | ) | const
| protected

low level: find a list id which corresponds to actual list and a change of level.

Note
  called when the list id is not set

Referenced by _changeList().

## ◆ _handleFrameParameters()

void MWAWTextListener::_handleFrameParameters | ( | librevenge::RVNGPropertyList & | propList,
|  | MWAWPosition const & | pos
| ) |  |
| protected

Referenced by insertShape(), openFrame(), and openGroup().

## ◆ _insertBreakIfNecessary()

void MWAWTextListener::_insertBreakIfNecessary | ( | librevenge::RVNGPropertyList & | propList | ) |
| protected

Referenced by _appendParagraphProperties().

## ◆ _openListElement()

void MWAWTextListener::_openListElement | ( |  | ) |
| protected

open a list level

Referenced by _openSpan().

## ◆ _openPageSpan()

void MWAWTextListener::_openPageSpan | ( | bool | sendHeaderFooters = `true` | ) |
| protected

does open a new page (low level)

Referenced by _openSection(), endDocument(), and getPageSpan().

## ◆ _openParagraph()

void MWAWTextListener::_openParagraph | ( |  | ) |
| protected

Referenced by _openSpan(), insertComment(), insertNote(), insertShape(), openFrame(), and openGroup().

## ◆ _openSection()

void MWAWTextListener::_openSection | ( |  | ) |
| protected

does open a section (low level)

Referenced by _changeList(), _openListElement(), _openParagraph(), and openSection().

## ◆ _openSpan()

void MWAWTextListener::_openSpan | ( |  | ) |
| protected

low level: the function which opens a new span property

Referenced by _flushDeferredTabs(), endDocument(), handleSubDocument(), insertBreak(), insertChar(), insertEOL(), insertField(), insertShape(), insertUnicode(), insertUnicodeString(), openFrame(), openGroup(), and openLink().

## ◆ _popParsingState()

void MWAWTextListener::_popParsingState | ( |  | ) |
| protected

resets the previous parsing state

Referenced by closeGroup(), closeLink(), closeTable(), and handleSubDocument().

## ◆ _pushParsingState()

std::shared_ptr< MWAWTextListenerInternal::State > MWAWTextListener::_pushParsingState | ( |  | ) |
| protected

creates a new parsing state (copy of the actual state)

Returns
  the old one

Referenced by handleSubDocument(), openGroup(), openLink(), and openTable().

## ◆ _resetParagraphState()

void MWAWTextListener::_resetParagraphState | ( | const bool | isListElement = `false` | ) |
| protected

Referenced by _openListElement(), and _openParagraph().

## ◆ _startSubDocument()

void MWAWTextListener::_startSubDocument | ( |  | ) |
| protected

Referenced by handleSubDocument(), openGroup(), and openTable().

## ◆ addEmptyTableCell()

void MWAWTextListener::addEmptyTableCell | ( | MWAWVec2i const & | pos,
|  | MWAWVec2i | span = `MWAWVec2i(1,1)`
| ) |  |
| finalvirtual

add empty cell

Implements MWAWListener.

## ◆ canOpenSectionAddBreak()

bool MWAWTextListener::canOpenSectionAddBreak | ( |  | ) | const
| finalvirtual

returns true if we can add open a section, add page break, ...

Implements MWAWListener.

## ◆ canWriteText()

bool MWAWTextListener::canWriteText | ( |  | ) | const
| inlinefinalvirtual

returns true if we can add text data

Implements MWAWListener.

## ◆ closeFrame()

void MWAWTextListener::closeFrame | ( |  | ) |
| finalvirtual

tries to close the last open frame

Implements MWAWListener.

Referenced by insertPicture(), insertShape(), and insertTextBox().

## ◆ closeGroup()

void MWAWTextListener::closeGroup | ( |  | ) |
| finalvirtual

close a group

Implements MWAWListener.

## ◆ closeLink()

void MWAWTextListener::closeLink | ( |  | ) |
| finalvirtual

close a link

Implements MWAWListener.

## ◆ closeSection()

bool MWAWTextListener::closeSection | ( |  | ) |
| finalvirtual

close a section

Implements MWAWListener.

## ◆ closeTable()

void MWAWTextListener::closeTable | ( |  | ) |
| finalvirtual

closes this table

Implements MWAWListener.

Referenced by _endSubDocument(), and endDocument().

## ◆ closeTableCell()

void MWAWTextListener::closeTableCell | ( |  | ) |
| finalvirtual

close a cell

Implements MWAWListener.

Referenced by addEmptyTableCell(), and openTableCell().

## ◆ closeTableRow()

void MWAWTextListener::closeTableRow | ( |  | ) |
| finalvirtual

closes this row

Implements MWAWListener.

## ◆ endDocument()

void MWAWTextListener::endDocument | ( | bool | sendDelayedSubDoc = `true` | ) |
| finalvirtual

ends the document

Implements MWAWListener.

## ◆ getFont()

MWAWFont const & MWAWTextListener::getFont | ( |  | ) | const
| finalvirtual

returns the actual font

Implements MWAWListener.

## ◆ getPageSpan()

MWAWPageSpan const & MWAWTextListener::getPageSpan | ( |  | ) |
| finalvirtual

returns the current page span

Note
  this forces the opening of a new page if no page is opened.

Implements MWAWListener.

## ◆ getParagraph()

MWAWParagraph const & MWAWTextListener::getParagraph | ( |  | ) | const
| finalvirtual

returns the actual paragraph

Implements MWAWListener.

## ◆ getSection()

MWAWSection const & MWAWTextListener::getSection | ( |  | ) | const
| finalvirtual

returns the actual section

Implements MWAWListener.

## ◆ getType()

Type MWAWTextListener::getType | ( |  | ) | const
| inlinefinalvirtual

returns the listener type

Implements MWAWListener.

## ◆ handleSubDocument()

void MWAWTextListener::handleSubDocument | ( | MWAWSubDocumentPtr const & | subDocument,
|  | libmwaw::SubDocumentType | subDocumentType
| ) |  |
| finalvirtual

function called to add a subdocument

Implements MWAWListener.

Referenced by insertComment(), insertFooter(), insertHeader(), insertNote(), and insertTextBox().

## ◆ insertBreak()

void MWAWTextListener::insertBreak | ( | MWAWTextListener::BreakType | breakType | ) |
| finalvirtual

inserts a break type: ColumBreak, PageBreak, ..

Implements MWAWListener.

## ◆ insertChar()

void MWAWTextListener::insertChar | ( | uint8_t | character | ) |
| finalvirtual

adds a basic character, ..

Implements MWAWListener.

Referenced by insertCharacter().

## ◆ insertCharacter() [1/2]

void MWAWTextListener::insertCharacter | ( | unsigned char | c | ) |
| finalvirtual

insert a character using the font converter to find the utf8 character

Implements MWAWListener.

## ◆ insertCharacter() [2/2]

int MWAWTextListener::insertCharacter | ( | unsigned char | c,
|  | MWAWInputStreamPtr & | input,
|  | long | endPos = `-1`
| ) |  |
| finalvirtual

insert a character using the font converter to find the utf8 character and if needed, input to read extra character.

Returns
  the number of extra character read

Implements MWAWListener.

## ◆ insertComment()

void MWAWTextListener::insertComment | ( | MWAWSubDocumentPtr & | subDocument | ) |
| finalvirtual

adds comment

Implements MWAWListener.

## ◆ insertEOL()

void MWAWTextListener::insertEOL | ( | bool | softBreak = `false` | ) |
| finalvirtual

adds an end of line ( by default an hard one)

Implements MWAWListener.

## ◆ insertField()

void MWAWTextListener::insertField | ( | MWAWField const & | field | ) |
| finalvirtual

adds a field type

Implements MWAWListener.

## ◆ insertFooter()

bool MWAWTextListener::insertFooter | ( | MWAWSubDocumentPtr const & | subDocument,
|  | librevenge::RVNGPropertyList const & | extras
| ) |  |
| finalvirtual

insert a footer

Implements MWAWListener.

## ◆ insertHeader()

bool MWAWTextListener::insertHeader | ( | MWAWSubDocumentPtr const & | subDocument,
|  | librevenge::RVNGPropertyList const & | extras
| ) |  |
| finalvirtual

insert a header

Implements MWAWListener.

## ◆ insertNote()

void MWAWTextListener::insertNote | ( | MWAWNote const & | note,
|  | MWAWSubDocumentPtr & | subDocument
| ) |  |
| finalvirtual

insert a note

Must not happen excepted in corrupted document, so we do the minimum. Note that we have no choice, either we begin by closing the paragraph, ... or we reprogram handleSubDocument.

Implements MWAWListener.

## ◆ insertPicture()

void MWAWTextListener::insertPicture | ( | MWAWPosition const & | pos,
|  | MWAWEmbeddedObject const & | picture,
|  | MWAWGraphicStyle const & | style = `MWAWGraphicStyle::emptyStyle()`
| ) |  |
| finalvirtual

adds a picture with potential various representationin given position

Implements MWAWListener.

## ◆ insertShape()

void MWAWTextListener::insertShape | ( | MWAWPosition const & | pos,
|  | MWAWGraphicShape const & | shape,
|  | MWAWGraphicStyle const & | style
| ) |  |
| finalvirtual

adds a shape picture in given position

Implements MWAWListener.

## ◆ insertTab()

void MWAWTextListener::insertTab | ( |  | ) |
| finalvirtual

adds a tab

Implements MWAWListener.

## ◆ insertTextBox()

void MWAWTextListener::insertTextBox | ( | MWAWPosition const & | pos,
|  | MWAWSubDocumentPtr const & | subDocument,
|  | MWAWGraphicStyle const & | frameStyle = `MWAWGraphicStyle::emptyStyle()`
| ) |  |
| finalvirtual

adds a textbox in given position

Implements MWAWListener.

## ◆ insertUnicode()

void MWAWTextListener::insertUnicode | ( | uint32_t | character | ) |
| finalvirtual

adds an unicode character.

By convention if character=0xfffd(undef), no character is added

Implements MWAWListener.

Referenced by insertChar(), and insertCharacter().

## ◆ insertUnicodeString()

void MWAWTextListener::insertUnicodeString | ( | librevenge::RVNGString const & | str | ) |
| finalvirtual

adds a unicode string

Implements MWAWListener.

Referenced by insertField().

## ◆ isDocumentStarted()

bool MWAWTextListener::isDocumentStarted | ( |  | ) | const
| finalvirtual

returns true if a document is opened

Implements MWAWListener.

Referenced by canWriteText().

## ◆ isHeaderFooterOpened()

bool MWAWTextListener::isHeaderFooterOpened | ( |  | ) | const
| finalvirtual

returns true if the header/footer is open

Implements MWAWListener.

## ◆ isPageSpanOpened()

bool MWAWTextListener::isPageSpanOpened | ( |  | ) | const
| finalvirtual

returns true if a page is opened

Implements MWAWListener.

## ◆ isParagraphOpened()

bool MWAWTextListener::isParagraphOpened | ( |  | ) | const
| finalvirtual

returns true if a paragraph or a list is opened

Implements MWAWListener.

## ◆ isSectionOpened()

bool MWAWTextListener::isSectionOpened | ( |  | ) | const
| finalvirtual

returns true if a section is opened

Implements MWAWListener.

## ◆ isSubDocumentOpened()

bool MWAWTextListener::isSubDocumentOpened | ( | libmwaw::SubDocumentType & | subdocType | ) | const
| finalvirtual

returns try if a subdocument is open

Implements MWAWListener.

## ◆ openFrame()

bool MWAWTextListener::openFrame | ( | MWAWPosition const & | pos,
|  | MWAWGraphicStyle const & | style = `MWAWGraphicStyle::emptyStyle()`
| ) |  |
| finalvirtual

tries to open a frame

Implements MWAWListener.

Referenced by insertPicture(), insertShape(), and insertTextBox().

## ◆ openGroup()

bool MWAWTextListener::openGroup | ( | MWAWPosition const & | pos | ) |
| finalvirtual

open a group

Implements MWAWListener.

## ◆ openLink()

void MWAWTextListener::openLink | ( | MWAWLink const & | link | ) |
| finalvirtual

open a link

Implements MWAWListener.

## ◆ openSection()

bool MWAWTextListener::openSection | ( | MWAWSection const & | section | ) |
| finalvirtual

open a section if possible

Implements MWAWListener.

## ◆ openTable()

void MWAWTextListener::openTable | ( | MWAWTable const & | table | ) |
| finalvirtual

open a table

Implements MWAWListener.

## ◆ openTableCell()

void MWAWTextListener::openTableCell | ( | MWAWCell const & | cell | ) |
| finalvirtual

open a cell

Implements MWAWListener.

## ◆ openTableRow()

void MWAWTextListener::openTableRow | ( | float | h,
|  | librevenge::RVNGUnit | unit,
|  | bool | headerRow = `false`
| ) |  |
| finalvirtual

open a row with given height ( if h < 0.0, set min-row-height = -h )

Implements MWAWListener.

## ◆ operator=()

MWAWTextListener & MWAWTextListener::operator= | ( | const MWAWTextListener & |  | ) |
| privatedelete

operator= (unimplemented)

## ◆ setDocumentLanguage()

void MWAWTextListener::setDocumentLanguage | ( | std::string const & | locale | ) |
| finalvirtual

sets the documents language

Implements MWAWListener.

## ◆ setDocumentMetaData()

void MWAWTextListener::setDocumentMetaData | ( | librevenge::RVNGPropertyList const & | metadata | ) |
| finalvirtual

sets the documents metadata

Implements MWAWListener.

## ◆ setFont()

void MWAWTextListener::setFont | ( | MWAWFont const & | font | ) |
| finalvirtual

sets the font

Implements MWAWListener.

Referenced by _flushDeferredTabs().

## ◆ setParagraph()

void MWAWTextListener::setParagraph | ( | MWAWParagraph const & | paragraph | ) |
| finalvirtual

sets the paragraph

Implements MWAWListener.

## ◆ startDocument()

void MWAWTextListener::startDocument | ( |  | ) |
| finalvirtual

starts the document

Implements MWAWListener.

Referenced by _openPageSpan().

## Member Data Documentation

## ◆ m_documentInterface

librevenge::RVNGTextInterface* MWAWTextListener::m_documentInterface
| protected

the document interface

Referenced by _changeList(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSection(), _closeSpan(), _flushDeferredTabs(), _flushText(), _openListElement(), _openPageSpan(), _openParagraph(), _openSection(), _openSpan(), addEmptyTableCell(), closeFrame(), closeGroup(), closeLink(), closeTable(), closeTableCell(), closeTableRow(), endDocument(), insertComment(), insertEOL(), insertField(), insertFooter(), insertHeader(), insertNote(), insertPicture(), insertShape(), insertTextBox(), openFrame(), openGroup(), openLink(), openTable(), openTableCell(), openTableRow(), and startDocument().

## ◆ m_ds

std::shared_ptr<MWAWTextListenerInternal::DocumentState> MWAWTextListener::m_ds
| protected

the main parse state

Referenced by _appendParagraphProperties(), _changeList(), _handleFrameParameters(), _openPageSpan(), _startSubDocument(), endDocument(), getPageSpan(), handleSubDocument(), insertFooter(), insertHeader(), insertNote(), isDocumentStarted(), isHeaderFooterOpened(), openFrame(), openGroup(), setDocumentLanguage(), setDocumentMetaData(), and startDocument().

## ◆ m_parserState

MWAWParserState& MWAWTextListener::m_parserState
| protected

the parser state

Referenced by _changeList(), _getListId(), _openSpan(), insertCharacter(), insertShape(), and openTableCell().

## ◆ m_ps

std::shared_ptr<MWAWTextListenerInternal::State> MWAWTextListener::m_ps
| protected

the actual local parse state

Referenced by _appendParagraphProperties(), _changeList(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSection(), _closeSpan(), _endSubDocument(), _flushDeferredTabs(), _flushText(), _getListId(), _handleFrameParameters(), _insertBreakIfNecessary(), _openListElement(), _openPageSpan(), _openParagraph(), _openSection(), _openSpan(), _popParsingState(), _pushParsingState(), _resetParagraphState(), _startSubDocument(), addEmptyTableCell(), canOpenSectionAddBreak(), closeFrame(), closeGroup(), closeLink(), closeSection(), closeTable(), closeTableCell(), closeTableRow(), endDocument(), getFont(), getPageSpan(), getParagraph(), getSection(), handleSubDocument(), insertBreak(), insertChar(), insertCharacter(), insertComment(), insertEOL(), insertNote(), insertShape(), insertTab(), insertUnicode(), insertUnicodeString(), isPageSpanOpened(), isParagraphOpened(), isSectionOpened(), isSubDocumentOpened(), openFrame(), openGroup(), openLink(), openSection(), openTable(), openTableCell(), openTableRow(), setFont(), and setParagraph().

## ◆ m_psStack

std::vector<std::shared_ptr<MWAWTextListenerInternal::State> > MWAWTextListener::m_psStack
| protected

stack of local state

Referenced by _popParsingState(), and _pushParsingState().

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

- MWAWTextListener.hxx
- MWAWTextListener.cxx