STOFFTextListener Class Referencefinal

This class contains the code needed to create Text document. More...

#include <STOFFTextListener.hxx>

Inheritance diagram for STOFFTextListener:
STOFFListener

Public Member Functions

 STOFFTextListener (STOFFListManagerPtr &listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
 constructor
 
 ~STOFFTextListener () final
 destructor
 
Type getType () const final
 returns the listener type
 
void setDocumentLanguage (std::string locale) final
 sets the documents language
 
void setDocumentMetaData (const librevenge::RVNGPropertyList &list) final
 sets the document meta data
 
void startDocument () final
 starts a new document
 
void endDocument (bool sendDelayedSubDoc=true) final
 ends the actual document
 
bool canWriteText () const final
 returns true if a text zone is opened
 
bool isDocumentStarted () const final
 returns true if a document is opened
 
void handleSubDocument (STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final
 function called to add a subdocument and modify the origin
 
bool isSubDocumentOpened (libstoff::SubDocumentType &subdocType) const final
 returns try if a subdocument is open

 
bool openFrame (STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
 store the position and the style (which will be needed further to insert a textbox or a table with openTable)
 
void closeFrame () final
 close a frame
 
bool openGroup (STOFFFrameStyle const &frame) final
 open a group
 
void closeGroup () final
 close a group
 
bool openLayer (librevenge::RVNGString const &name)
 open a layer
 
void closeLayer ()
 close a layer
 
bool openMasterPage (STOFFPageSpan &)
 opens a master page
 
void closeMasterPage ()
 close a master page
 
bool isPageSpanOpened () const final
 returns true if a page is opened
 
STOFFPageSpan const & getPageSpan () final
 returns the current page span
 
bool openHeader (librevenge::RVNGPropertyList const &extras) final
 open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
 
bool openFooter (librevenge::RVNGPropertyList const &extras) final
 open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
 
bool closeHeader () final
 close a header
 
bool closeFooter () final
 close a footer
 
bool insertHeaderRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
 insert a header
 
bool insertFooterRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
 insert a footer
 
bool isHeaderFooterOpened () const final
 returns true if the header/footer is open
 
void insertChar (uint8_t character) final
 adds a basic character, ..
 
void insertUnicode (uint32_t character) final
 insert a character using the font converter to find the utf8 character
 
void insertUnicodeString (librevenge::RVNGString const &str) final
 adds a unicode string
 
void insertTab () final
 adds a tab
 
void insertEOL (bool softBreak=false) final
 adds an end of line ( by default an hard one)
 
void setFont (STOFFFont const &font) final
 sets the font
 
STOFFFont const & getFont () const final
 returns the actual font
 
bool isParagraphOpened () const final
 returns true if a paragraph or a list is opened
 
void setParagraph (STOFFParagraph const &paragraph) final
 sets the paragraph
 
STOFFParagraph const & getParagraph () const final
 returns the actual paragraph
 
void defineStyle (STOFFFont const &style) final
 defines a font styles
 
bool isFontStyleDefined (librevenge::RVNGString const &name) const final
 check if a font style with a display name is already defined
 
void defineStyle (STOFFGraphicStyle const &style) final
 defines a graphic styles
 
bool isGraphicStyleDefined (librevenge::RVNGString const &name) const final
 check if a graphic style with a display name is already defined
 
void defineStyle (STOFFParagraph const &style) final
 defines a paragraph styles
 
bool isParagraphStyleDefined (librevenge::RVNGString const &name) const final
 check if a paragraph style with a display name is already defined
 
void insertField (STOFFField const &field) final
 adds a field type
 
void openLink (STOFFLink const &link) final
 open a link
 
void closeLink () final
 close a link
 
void insertShape (STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final
 adds a shape picture in given position
 
void insertTextBox (STOFFFrameStyle const &pos, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
 adds a textbox in given position
 
void insertPicture (STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
 adds a picture with potential various representationin given position
 
void insertEquation (STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
 adds a equation given a position
 
void insertNote (STOFFNote const &note, STOFFSubDocumentPtr &subDocument) final
 insert a note
 
void insertComment (STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final
 adds comment
 
void openTable (STOFFTable const &table) final
 open a table (using the last parameters of openFrame for the position )
 
void closeTable () final
 closes this table
 
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 )
 
void closeTableRow () final
 closes this row
 
void openTableCell (STOFFCell const &cell) final
 open a cell
 
void closeTableCell () final
 close a cell
 
void addCoveredTableCell (STOFFVec2i const &pos) final
 add covered cell
 
void addEmptyTableCell (STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) final
 add empty cell
 
bool canOpenSectionAddBreak () const final
 returns true if we can add open a section, add page break, ...
 
bool isSectionOpened () const final
 returns true if a section is opened
 
STOFFSection const & getSection () const final
 returns the actual section
 
bool openSection (STOFFSection const &section) final
 open a section if possible
 
bool closeSection () final
 close a section
 
void insertBreak (BreakType breakType) final
 inserts a break type: ColumBreak, PageBreak, ..
 
- Public Member Functions inherited from STOFFListener
virtual ~STOFFListener ()
 destructor
 
virtual Type getType () const =0
 returns the listener type
 
virtual bool canWriteText () const =0
 returns true if we can add text data
 
STOFFListManagerPtr getListManager () const
 return the list manager
 
virtual void setDocumentLanguage (std::string locale)=0
 sets the documents language
 
virtual void setDocumentMetaData (const librevenge::RVNGPropertyList &list)=0
 sets the document meta data
 
virtual void startDocument ()=0
 starts the document
 
virtual bool isDocumentStarted () const =0
 returns true if a document is opened
 
virtual void endDocument (bool sendDelayedSubDoc=true)=0
 ends the document
 
virtual bool isPageSpanOpened () const =0
 returns true if a page is opened
 
virtual STOFFPageSpan const & getPageSpan ()=0
 returns the current page span
 
virtual bool openHeader (librevenge::RVNGPropertyList const &extras)=0
 open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
 
virtual bool openFooter (librevenge::RVNGPropertyList const &extras)=0
 open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
 
virtual bool closeHeader ()=0
 close a header
 
virtual bool closeFooter ()=0
 close a footer
 
virtual bool insertHeaderRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which)=0
 insert a header
 
virtual bool insertFooterRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which)=0
 insert a footer
 
virtual bool isHeaderFooterOpened () const =0
 returns true if the header/footer is open
 
virtual void insertChar (uint8_t character)=0
 adds a basic character, ..
 
virtual void insertUnicode (uint32_t character)=0
 adds an unicode character.
 
void insertUnicodeList (std::vector< uint32_t > const &list)
 try to insert a list of unicode character
 
virtual void insertUnicodeString (librevenge::RVNGString const &str)=0
 adds a unicode string
 
virtual void insertTab ()=0
 adds a tab
 
virtual void insertEOL (bool softBreak=false)=0
 adds an end of line ( by default an hard one)
 
virtual void setFont (STOFFFont const &font)=0
 sets the font
 
virtual STOFFFont const & getFont () const =0
 returns the actual font
 
virtual bool isParagraphOpened () const =0
 returns true if a paragraph or a list is opened
 
virtual void setParagraph (STOFFParagraph const &paragraph)=0
 sets the paragraph
 
virtual STOFFParagraph const & getParagraph () const =0
 returns the actual paragraph
 
virtual void defineStyle (STOFFFont const &style)=0
 defines a font styles
 
virtual bool isFontStyleDefined (librevenge::RVNGString const &name) const =0
 check if a font style with a display name is already defined
 
virtual void defineStyle (STOFFGraphicStyle const &style)=0
 defines a graphic styles
 
virtual bool isGraphicStyleDefined (librevenge::RVNGString const &name) const =0
 check if a graphic style with a display name is already defined
 
virtual void defineStyle (STOFFParagraph const &style)=0
 defines a paragraph styles
 
virtual bool isParagraphStyleDefined (librevenge::RVNGString const &name) const =0
 check if a paragraph style with a display name is already defined
 
virtual void insertField (STOFFField const &field)=0
 adds a field type
 
virtual void openLink (STOFFLink const &link)=0
 open a link
 
virtual void closeLink ()=0
 close a link
 
virtual void openTable (STOFFTable const &table)=0
 open a table
 
virtual void closeTable ()=0
 closes this table
 
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 )
 
virtual void closeTableRow ()=0
 closes this row
 
virtual void openTableCell (STOFFCell const &cell)=0
 open a cell
 
virtual void closeTableCell ()=0
 close a cell
 
virtual void addCoveredTableCell (STOFFVec2i const &pos)=0
 add covered cell
 
virtual void addEmptyTableCell (STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1))=0
 add empty cell
 
virtual bool canOpenSectionAddBreak () const =0
 returns true if we can add open a section, add page break, ...
 
virtual bool isSectionOpened () const =0
 returns true if a section is opened
 
virtual STOFFSection const & getSection () const =0
 returns the actual section
 
virtual bool openSection (STOFFSection const &section)=0
 open a section if possible
 
virtual bool closeSection ()=0
 close a section
 
virtual void insertBreak (BreakType breakType)=0
 inserts a break type: ColumBreak, PageBreak, ..
 
virtual void insertNote (STOFFNote const &note, STOFFSubDocumentPtr &subDocument)=0
 insert a note
 
virtual void insertComment (STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="")=0
 adds comment
 
virtual void insertEquation (STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle())=0
 adds a equation given a position
 
virtual void insertPicture (STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle())=0
 adds a picture with various representationin given position.
 
virtual void insertShape (STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style)=0
 adds a shape picture in given position
 
virtual void insertTextBox (STOFFFrameStyle const &frame, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &frameStyle=STOFFGraphicStyle())=0
 adds a textbox in given position
 
virtual bool openFrame (STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle())=0
 low level: tries to open a frame
 
virtual void closeFrame ()=0
 low level: tries to close the last opened frame
 
virtual bool openGroup (STOFFFrameStyle const &frame)=0
 low level: tries to open a group
 
virtual void closeGroup ()=0
 low level: tries to close the last opened group
 
virtual void handleSubDocument (STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType)=0
 low level: function called to add a subdocument
 
virtual bool isSubDocumentOpened (libstoff::SubDocumentType &subdocType) const =0
 returns true if a subdocument is open

 

Protected Member Functions

void _openSection ()
 does open a section (low level)
 
void _closeSection ()
 does close a section (low level)
 
void _openPageSpan (bool sendHeaderFooters=true)
 does open a new page (low level)
 
void _closePageSpan ()
 does close a page (low level)
 
void _startSubDocument ()
 
void _endSubDocument ()
 
void _handleFrameParameters (librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame, STOFFGraphicStyle const &style)
 adds in propList the frame parameters.
 
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
 
void _closeListElement ()
 close a list level
 
void _changeList ()
 update the list so that it corresponds to the actual level
 
int _getListId () const
 low level: find a list id which corresponds to actual list and a change of level.
 
void _openSpan ()
 low level: the function which opens a new span property
 
void _closeSpan ()
 low level: the function which closes the last opened span property
 
void _flushText ()
 low level: flush the deferred text
 
void _flushDeferredTabs ()
 low level: flush the deferred tabs
 
void _insertBreakIfNecessary (librevenge::RVNGPropertyList &propList)
 
std::shared_ptr< STOFFTextListenerInternal::State_pushParsingState ()
 creates a new parsing state (copy of the actual state)
 
void _popParsingState ()
 resets the previous parsing state
 
- Protected Member Functions inherited from STOFFListener
 STOFFListener (STOFFListManagerPtr &listManager)
 constructor
 

Protected Attributes

std::shared_ptr< STOFFTextListenerInternal::TextStatem_ds
 the actual global state
 
std::shared_ptr< STOFFTextListenerInternal::Statem_ps
 the actual local parse state
 
std::vector< std::shared_ptr< STOFFTextListenerInternal::State > > m_psStack
 stack of local state
 
librevenge::RVNGTextInterface * m_documentInterface
 the document interface
 
- Protected Attributes inherited from STOFFListener
STOFFListManagerPtr m_listManager
 the list manager
 

Private Member Functions

 STOFFTextListener (const STOFFTextListener &)
 
STOFFTextListeneroperator= (const STOFFTextListener &)
 

Additional Inherited Members

- Public Types inherited from STOFFListener
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 contains the code needed to create Text document.

Note
All units are specified in librevenge::RVNG_POINT

Constructor & Destructor Documentation

◆ STOFFTextListener() [1/2]

STOFFTextListener::STOFFTextListener ( STOFFListManagerPtr listManager,
std::vector< STOFFPageSpan > const &  pageList,
librevenge::RVNGTextInterface *  documentInterface 
)

constructor

◆ ~STOFFTextListener()

STOFFTextListener::~STOFFTextListener ( )
final

destructor

◆ STOFFTextListener() [2/2]

STOFFTextListener::STOFFTextListener ( const STOFFTextListener )
private

Member Function Documentation

◆ _appendParagraphProperties()

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

Referenced by _openListElement(), and _openParagraph().

◆ _changeList()

void STOFFTextListener::_changeList ( )
protected

update the list so that it corresponds to the actual level

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

◆ _closeListElement()

void STOFFTextListener::_closeListElement ( )
protected

close a list level

Referenced by _closeParagraph().

◆ _closePageSpan()

void STOFFTextListener::_closePageSpan ( )
protected

does close a page (low level)

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

◆ _closeParagraph()

void STOFFTextListener::_closeParagraph ( )
protected

◆ _closeSection()

void STOFFTextListener::_closeSection ( )
protected

does close a section (low level)

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

◆ _closeSpan()

void STOFFTextListener::_closeSpan ( )
protected

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

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

◆ _endSubDocument()

void STOFFTextListener::_endSubDocument ( )
protected

◆ _flushDeferredTabs()

void STOFFTextListener::_flushDeferredTabs ( )
protected

low level: flush the deferred tabs

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

◆ _flushText()

void STOFFTextListener::_flushText ( )
protected

◆ _getListId()

int STOFFTextListener::_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 STOFFTextListener::_handleFrameParameters ( librevenge::RVNGPropertyList &  propList,
STOFFFrameStyle const &  frame,
STOFFGraphicStyle const &  style 
)
protected

adds in propList the frame parameters.

Note
if there is some gradient, first draw a rectangle to print the gradient and them update propList

Referenced by openFrame().

◆ _insertBreakIfNecessary()

void STOFFTextListener::_insertBreakIfNecessary ( librevenge::RVNGPropertyList &  propList)
protected

◆ _openListElement()

void STOFFTextListener::_openListElement ( )
protected

open a list level

Referenced by _openSpan().

◆ _openPageSpan()

void STOFFTextListener::_openPageSpan ( bool  sendHeaderFooters = true)
protected

does open a new page (low level)

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

◆ _openParagraph()

void STOFFTextListener::_openParagraph ( )
protected

◆ _openSection()

void STOFFTextListener::_openSection ( )
protected

does open a section (low level)

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

◆ _openSpan()

void STOFFTextListener::_openSpan ( )
protected

◆ _popParsingState()

void STOFFTextListener::_popParsingState ( )
protected

resets the previous parsing state

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

◆ _pushParsingState()

std::shared_ptr< STOFFTextListenerInternal::State > STOFFTextListener::_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 STOFFTextListener::_resetParagraphState ( const bool  isListElement = false)
protected

Referenced by _openListElement(), and _openParagraph().

◆ _startSubDocument()

void STOFFTextListener::_startSubDocument ( )
protected

◆ addCoveredTableCell()

void STOFFTextListener::addCoveredTableCell ( STOFFVec2i const &  pos)
finalvirtual

add covered cell

Implements STOFFListener.

◆ addEmptyTableCell()

void STOFFTextListener::addEmptyTableCell ( STOFFVec2i const &  pos,
STOFFVec2i  span = STOFFVec2i(1,1) 
)
finalvirtual

add empty cell

Implements STOFFListener.

◆ canOpenSectionAddBreak()

bool STOFFTextListener::canOpenSectionAddBreak ( ) const
finalvirtual

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

Implements STOFFListener.

◆ canWriteText()

bool STOFFTextListener::canWriteText ( ) const
inlinefinalvirtual

returns true if a text zone is opened

Implements STOFFListener.

◆ closeFooter()

bool STOFFTextListener::closeFooter ( )
finalvirtual

close a footer

Implements STOFFListener.

◆ closeFrame()

void STOFFTextListener::closeFrame ( )
finalvirtual

close a frame

Implements STOFFListener.

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

◆ closeGroup()

void STOFFTextListener::closeGroup ( )
finalvirtual

close a group

Implements STOFFListener.

◆ closeHeader()

bool STOFFTextListener::closeHeader ( )
finalvirtual

close a header

Implements STOFFListener.

◆ closeLayer()

void STOFFTextListener::closeLayer ( )

close a layer

◆ closeLink()

void STOFFTextListener::closeLink ( )
finalvirtual

close a link

Implements STOFFListener.

◆ closeMasterPage()

void STOFFTextListener::closeMasterPage ( )
inline

close a master page

◆ closeSection()

bool STOFFTextListener::closeSection ( )
finalvirtual

close a section

Implements STOFFListener.

◆ closeTable()

void STOFFTextListener::closeTable ( )
finalvirtual

closes this table

Implements STOFFListener.

Referenced by _endSubDocument(), and endDocument().

◆ closeTableCell()

void STOFFTextListener::closeTableCell ( )
finalvirtual

close a cell

Implements STOFFListener.

Referenced by addCoveredTableCell(), addEmptyTableCell(), and openTableCell().

◆ closeTableRow()

void STOFFTextListener::closeTableRow ( )
finalvirtual

closes this row

Implements STOFFListener.

◆ defineStyle() [1/3]

void STOFFTextListener::defineStyle ( STOFFFont const &  style)
finalvirtual

defines a font styles

Implements STOFFListener.

◆ defineStyle() [2/3]

void STOFFTextListener::defineStyle ( STOFFGraphicStyle const &  style)
finalvirtual

defines a graphic styles

Implements STOFFListener.

◆ defineStyle() [3/3]

void STOFFTextListener::defineStyle ( STOFFParagraph const &  style)
finalvirtual

defines a paragraph styles

Implements STOFFListener.

◆ endDocument()

void STOFFTextListener::endDocument ( bool  sendDelayedSubDoc = true)
finalvirtual

ends the actual document

Implements STOFFListener.

◆ getFont()

STOFFFont const & STOFFTextListener::getFont ( ) const
finalvirtual

returns the actual font

Implements STOFFListener.

◆ getPageSpan()

STOFFPageSpan const & STOFFTextListener::getPageSpan ( )
finalvirtual

returns the current page span

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

Implements STOFFListener.

◆ getParagraph()

STOFFParagraph const & STOFFTextListener::getParagraph ( ) const
finalvirtual

returns the actual paragraph

Implements STOFFListener.

◆ getSection()

STOFFSection const & STOFFTextListener::getSection ( ) const
finalvirtual

returns the actual section

Implements STOFFListener.

◆ getType()

Type STOFFTextListener::getType ( ) const
inlinefinalvirtual

returns the listener type

Implements STOFFListener.

◆ handleSubDocument()

void STOFFTextListener::handleSubDocument ( STOFFSubDocumentPtr  subDocument,
libstoff::SubDocumentType  subDocumentType 
)
finalvirtual

function called to add a subdocument and modify the origin

Implements STOFFListener.

Referenced by insertComment(), insertFooterRegion(), insertHeaderRegion(), insertNote(), and insertTextBox().

◆ insertBreak()

void STOFFTextListener::insertBreak ( STOFFTextListener::BreakType  breakType)
finalvirtual

inserts a break type: ColumBreak, PageBreak, ..

Implements STOFFListener.

◆ insertChar()

void STOFFTextListener::insertChar ( uint8_t  character)
finalvirtual

adds a basic character, ..

Implements STOFFListener.

◆ insertComment()

void STOFFTextListener::insertComment ( STOFFSubDocumentPtr subDocument,
librevenge::RVNGString const &  creator = "",
librevenge::RVNGString const &  date = "" 
)
finalvirtual

adds comment

Implements STOFFListener.

◆ insertEOL()

void STOFFTextListener::insertEOL ( bool  softBreak = false)
finalvirtual

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

Implements STOFFListener.

◆ insertEquation()

void STOFFTextListener::insertEquation ( STOFFFrameStyle const &  frame,
librevenge::RVNGString const &  equation,
STOFFGraphicStyle const &  style = STOFFGraphicStyle() 
)
finalvirtual

adds a equation given a position

Implements STOFFListener.

◆ insertField()

void STOFFTextListener::insertField ( STOFFField const &  field)
finalvirtual

adds a field type

Implements STOFFListener.

◆ insertFooterRegion()

bool STOFFTextListener::insertFooterRegion ( STOFFSubDocumentPtr  subDocument,
librevenge::RVNGString const &  which 
)
finalvirtual

insert a footer

Implements STOFFListener.

◆ insertHeaderRegion()

bool STOFFTextListener::insertHeaderRegion ( STOFFSubDocumentPtr  subDocument,
librevenge::RVNGString const &  which 
)
finalvirtual

insert a header

Implements STOFFListener.

◆ insertNote()

void STOFFTextListener::insertNote ( STOFFNote const &  note,
STOFFSubDocumentPtr 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 STOFFListener.

◆ insertPicture()

void STOFFTextListener::insertPicture ( STOFFFrameStyle const &  frame,
STOFFEmbeddedObject const &  picture,
STOFFGraphicStyle const &  style = STOFFGraphicStyle() 
)
finalvirtual

adds a picture with potential various representationin given position

Implements STOFFListener.

◆ insertShape()

void STOFFTextListener::insertShape ( STOFFFrameStyle const &  frame,
STOFFGraphicShape const &  shape,
STOFFGraphicStyle const &  style 
)
finalvirtual

adds a shape picture in given position

Implements STOFFListener.

◆ insertTab()

void STOFFTextListener::insertTab ( )
finalvirtual

adds a tab

Implements STOFFListener.

◆ insertTextBox()

void STOFFTextListener::insertTextBox ( STOFFFrameStyle const &  pos,
STOFFSubDocumentPtr  subDocument,
STOFFGraphicStyle const &  style = STOFFGraphicStyle() 
)
finalvirtual

adds a textbox in given position

Implements STOFFListener.

◆ insertUnicode()

void STOFFTextListener::insertUnicode ( uint32_t  character)
finalvirtual

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

adds an unicode character. By convention if character=0xfffd(undef), no character is added

Implements STOFFListener.

Referenced by insertChar().

◆ insertUnicodeString()

void STOFFTextListener::insertUnicodeString ( librevenge::RVNGString const &  str)
finalvirtual

adds a unicode string

Implements STOFFListener.

◆ isDocumentStarted()

bool STOFFTextListener::isDocumentStarted ( ) const
finalvirtual

returns true if a document is opened

Implements STOFFListener.

Referenced by canWriteText().

◆ isFontStyleDefined()

bool STOFFTextListener::isFontStyleDefined ( librevenge::RVNGString const &  name) const
finalvirtual

check if a font style with a display name is already defined

Implements STOFFListener.

◆ isGraphicStyleDefined()

bool STOFFTextListener::isGraphicStyleDefined ( librevenge::RVNGString const &  name) const
finalvirtual

check if a graphic style with a display name is already defined

Implements STOFFListener.

◆ isHeaderFooterOpened()

bool STOFFTextListener::isHeaderFooterOpened ( ) const
finalvirtual

returns true if the header/footer is open

Implements STOFFListener.

◆ isPageSpanOpened()

bool STOFFTextListener::isPageSpanOpened ( ) const
finalvirtual

returns true if a page is opened

Implements STOFFListener.

◆ isParagraphOpened()

bool STOFFTextListener::isParagraphOpened ( ) const
finalvirtual

returns true if a paragraph or a list is opened

Implements STOFFListener.

◆ isParagraphStyleDefined()

bool STOFFTextListener::isParagraphStyleDefined ( librevenge::RVNGString const &  name) const
finalvirtual

check if a paragraph style with a display name is already defined

Implements STOFFListener.

◆ isSectionOpened()

bool STOFFTextListener::isSectionOpened ( ) const
finalvirtual

returns true if a section is opened

Implements STOFFListener.

◆ isSubDocumentOpened()

bool STOFFTextListener::isSubDocumentOpened ( libstoff::SubDocumentType subdocType) const
finalvirtual

returns try if a subdocument is open

Implements STOFFListener.

◆ openFooter()

bool STOFFTextListener::openFooter ( librevenge::RVNGPropertyList const &  extras)
finalvirtual

open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)

Implements STOFFListener.

◆ openFrame()

bool STOFFTextListener::openFrame ( STOFFFrameStyle const &  frame,
STOFFGraphicStyle const &  style = STOFFGraphicStyle() 
)
finalvirtual

store the position and the style (which will be needed further to insert a textbox or a table with openTable)

Implements STOFFListener.

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

◆ openGroup()

bool STOFFTextListener::openGroup ( STOFFFrameStyle const &  frame)
finalvirtual

open a group

Implements STOFFListener.

◆ openHeader()

bool STOFFTextListener::openHeader ( librevenge::RVNGPropertyList const &  extras)
finalvirtual

open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)

Implements STOFFListener.

◆ openLayer()

bool STOFFTextListener::openLayer ( librevenge::RVNGString const &  name)

open a layer

◆ openLink()

void STOFFTextListener::openLink ( STOFFLink const &  link)
finalvirtual

open a link

Implements STOFFListener.

◆ openMasterPage()

bool STOFFTextListener::openMasterPage ( STOFFPageSpan )

opens a master page

◆ openSection()

bool STOFFTextListener::openSection ( STOFFSection const &  section)
finalvirtual

open a section if possible

Implements STOFFListener.

◆ openTable()

void STOFFTextListener::openTable ( STOFFTable const &  table)
finalvirtual

open a table (using the last parameters of openFrame for the position )

Implements STOFFListener.

◆ openTableCell()

void STOFFTextListener::openTableCell ( STOFFCell const &  cell)
finalvirtual

open a cell

Implements STOFFListener.

◆ openTableRow()

void STOFFTextListener::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 STOFFListener.

◆ operator=()

STOFFTextListener & STOFFTextListener::operator= ( const STOFFTextListener )
private

◆ setDocumentLanguage()

void STOFFTextListener::setDocumentLanguage ( std::string  locale)
finalvirtual

sets the documents language

Implements STOFFListener.

◆ setDocumentMetaData()

void STOFFTextListener::setDocumentMetaData ( const librevenge::RVNGPropertyList &  list)
finalvirtual

sets the document meta data

Implements STOFFListener.

◆ setFont()

void STOFFTextListener::setFont ( STOFFFont const &  font)
finalvirtual

sets the font

Implements STOFFListener.

◆ setParagraph()

void STOFFTextListener::setParagraph ( STOFFParagraph const &  paragraph)
finalvirtual

sets the paragraph

Implements STOFFListener.

◆ startDocument()

void STOFFTextListener::startDocument ( )
finalvirtual

starts a new document

Implements STOFFListener.

Referenced by _openPageSpan().

Member Data Documentation

◆ m_documentInterface

◆ m_ds

◆ m_ps

◆ m_psStack

std::vector<std::shared_ptr<STOFFTextListenerInternal::State> > STOFFTextListener::m_psStack
protected

stack of local state

Referenced by _popParsingState(), and _pushParsingState().


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

Generated on Fri Apr 14 2023 04:41:10 for libstaroffice by doxygen 1.9.6