MWAWListener Class Reference

This class contains a virtual interface to all listener. More...

#include <MWAWListener.hxx>

Inheritance diagram for MWAWListener:
MWAWGraphicListener MWAWPresentationListener MWAWSpreadsheetListener MWAWTextListener

List of all members.

Public Types

enum  Type { Graphic, Presentation, Spreadsheet, Text }
 the listener type More...
enum  BreakType { PageBreak = 0, SoftPageBreak, ColumnBreak }
 the different break type More...

Public Member Functions

virtual ~MWAWListener ()
 destructor
virtual Type getType () const =0
 returns the listener type
virtual bool canWriteText () const =0
 returns true if we can add text data
virtual void setDocumentLanguage (std::string locale)=0
 sets the documents language
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 MWAWPageSpan const & getPageSpan ()=0
 returns the current page span
virtual bool insertHeader (MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras)=0
 insert a header (interaction with MWAWPageSpan which fills the parameters for openHeader)
virtual bool insertFooter (MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras)=0
 insert a footer (interaction with MWAWPageSpan which fills the parameters for openFooter)
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 insertCharacter (unsigned char c)=0
 insert a character using the font converter to find the utf8 character
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.
virtual void insertUnicode (uint32_t character)=0
 adds an 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 (MWAWFont const &font)=0
 sets the font
virtual MWAWFont 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 (MWAWParagraph const &paragraph)=0
 sets the paragraph
virtual MWAWParagraph const & getParagraph () const =0
 returns the actual paragraph
virtual void insertField (MWAWField const &field)=0
 adds a field type
virtual void openLink (MWAWLink const &link)=0
 open a link
virtual void closeLink ()=0
 close a link
virtual void openTable (MWAWTable 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 (MWAWCell const &cell)=0
 open a cell
virtual void closeTableCell ()=0
 close a cell
virtual void addEmptyTableCell (MWAWVec2i const &pos, MWAWVec2i span=MWAWVec2i(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 MWAWSection const & getSection () const =0
 returns the actual section
virtual bool openSection (MWAWSection 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 (MWAWNote const &note, MWAWSubDocumentPtr &subDocument)=0
 insert a note
virtual void insertComment (MWAWSubDocumentPtr &subDocument)=0
 adds comment
virtual void insertPicture (MWAWPosition const &pos, const librevenge::RVNGBinaryData &binaryData, std::string type="image/pict", MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())=0
 adds a picture in given position
virtual void insertPicture (MWAWPosition const &pos, MWAWGraphicShape const &shape, MWAWGraphicStyle const &style)=0
 adds a shape picture in given position
virtual void insertTextBox (MWAWPosition const &pos, MWAWSubDocumentPtr subDocument, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle())=0
 adds a textbox in given position
virtual bool openFrame (MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())=0
 low level: tries to open a frame
virtual void closeFrame ()=0
 low level: tries to close the last open frame
virtual void handleSubDocument (MWAWSubDocumentPtr subDocument, libmwaw::SubDocumentType subDocumentType)=0
 low level: function called to add a subdocument
virtual bool isSubDocumentOpened (libmwaw::SubDocumentType &subdocType) const =0
 returns true if a subdocument is open

Detailed Description

This class contains a virtual interface to all listener.


Member Enumeration Documentation

the different break type

Enumerator:
PageBreak 
SoftPageBreak 
ColumnBreak 

the listener type

Enumerator:
Graphic 
Presentation 
Spreadsheet 
Text 

Constructor & Destructor Documentation

virtual MWAWListener::~MWAWListener ( ) [inline, virtual]

destructor


Member Function Documentation

virtual void MWAWListener::addEmptyTableCell ( MWAWVec2i const &  pos,
MWAWVec2i  span = MWAWVec2i(1, 1) 
) [pure virtual]
virtual bool MWAWListener::canOpenSectionAddBreak ( ) const [pure virtual]

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

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual bool MWAWListener::canWriteText ( ) const [pure virtual]

returns true if we can add text data

Implemented in MWAWSpreadsheetListener, MWAWTextListener, MWAWGraphicListener, and MWAWPresentationListener.

virtual void MWAWListener::closeFrame ( ) [pure virtual]

low level: tries to close the last open frame

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::closeLink ( ) [pure virtual]
virtual bool MWAWListener::closeSection ( ) [pure virtual]
virtual void MWAWListener::closeTable ( ) [pure virtual]
virtual void MWAWListener::closeTableCell ( ) [pure virtual]
virtual void MWAWListener::closeTableRow ( ) [pure virtual]
virtual void MWAWListener::endDocument ( bool  sendDelayedSubDoc = true) [pure virtual]
virtual MWAWFont const& MWAWListener::getFont ( ) const [pure virtual]
virtual MWAWPageSpan const& MWAWListener::getPageSpan ( ) [pure virtual]

returns the current page span

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

Implemented in MWAWGraphicListener, MWAWPresentationListener, MWAWSpreadsheetListener, and MWAWTextListener.

virtual MWAWParagraph const& MWAWListener::getParagraph ( ) const [pure virtual]

returns the actual paragraph

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual MWAWSection const& MWAWListener::getSection ( ) const [pure virtual]

returns the actual section

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual Type MWAWListener::getType ( ) const [pure virtual]
virtual void MWAWListener::handleSubDocument ( MWAWSubDocumentPtr  subDocument,
libmwaw::SubDocumentType  subDocumentType 
) [pure virtual]

low level: function called to add a subdocument

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::insertBreak ( BreakType  breakType) [pure virtual]

inserts a break type: ColumBreak, PageBreak, ..

Implemented in MWAWGraphicListener, MWAWPresentationListener, MWAWSpreadsheetListener, and MWAWTextListener.

virtual void MWAWListener::insertChar ( uint8_t  character) [pure virtual]

adds a basic character, ..

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::insertCharacter ( unsigned char  c) [pure virtual]

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

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual int MWAWListener::insertCharacter ( unsigned char  c,
MWAWInputStreamPtr input,
long  endPos = -1 
) [pure virtual]

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

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::insertComment ( MWAWSubDocumentPtr subDocument) [pure virtual]
virtual void MWAWListener::insertEOL ( bool  softBreak = false) [pure virtual]

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

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

Referenced by MWAWHeaderFooter::insertPageNumberParagraph().

virtual bool MWAWListener::insertFooter ( MWAWSubDocumentPtr  subDocument,
librevenge::RVNGPropertyList const &  extras 
) [pure virtual]

insert a footer (interaction with MWAWPageSpan which fills the parameters for openFooter)

Implemented in MWAWGraphicListener, MWAWPresentationListener, MWAWSpreadsheetListener, and MWAWTextListener.

Referenced by MWAWHeaderFooter::send().

virtual bool MWAWListener::insertHeader ( MWAWSubDocumentPtr  subDocument,
librevenge::RVNGPropertyList const &  extras 
) [pure virtual]

insert a header (interaction with MWAWPageSpan which fills the parameters for openHeader)

Implemented in MWAWGraphicListener, MWAWPresentationListener, MWAWSpreadsheetListener, and MWAWTextListener.

Referenced by MWAWHeaderFooter::send().

virtual void MWAWListener::insertNote ( MWAWNote const &  note,
MWAWSubDocumentPtr subDocument 
) [pure virtual]
virtual void MWAWListener::insertPicture ( MWAWPosition const &  pos,
const librevenge::RVNGBinaryData &  binaryData,
std::string  type = "image/pict",
MWAWGraphicStyle const &  style = MWAWGraphicStyle::emptyStyle() 
) [pure virtual]

adds a picture in given position

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

Referenced by ClarisWksGraph::sendBitmap().

virtual void MWAWListener::insertPicture ( MWAWPosition const &  pos,
MWAWGraphicShape const &  shape,
MWAWGraphicStyle const &  style 
) [pure virtual]

adds a shape picture in given position

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::insertTab ( ) [pure virtual]
virtual void MWAWListener::insertTextBox ( MWAWPosition const &  pos,
MWAWSubDocumentPtr  subDocument,
MWAWGraphicStyle const &  frameStyle = MWAWGraphicStyle::emptyStyle() 
) [pure virtual]

adds a textbox in given position

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::insertUnicode ( uint32_t  character) [pure virtual]

adds an unicode character.

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

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::insertUnicodeString ( librevenge::RVNGString const &  str) [pure virtual]
virtual bool MWAWListener::isDocumentStarted ( ) const [pure virtual]

returns true if a document is opened

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWTextListener, and MWAWPresentationListener.

virtual bool MWAWListener::isHeaderFooterOpened ( ) const [pure virtual]

returns true if the header/footer is open

Implemented in MWAWGraphicListener, MWAWPresentationListener, MWAWSpreadsheetListener, and MWAWTextListener.

virtual bool MWAWListener::isPageSpanOpened ( ) const [pure virtual]

returns true if a page is opened

Implemented in MWAWGraphicListener, MWAWPresentationListener, MWAWSpreadsheetListener, and MWAWTextListener.

virtual bool MWAWListener::isParagraphOpened ( ) const [pure virtual]

returns true if a paragraph or a list is opened

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

Referenced by MWAWHeaderFooter::insertPageNumberParagraph().

virtual bool MWAWListener::isSectionOpened ( ) const [pure virtual]

returns true if a section is opened

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual bool MWAWListener::isSubDocumentOpened ( libmwaw::SubDocumentType subdocType) const [pure virtual]

returns true if a subdocument is open

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual bool MWAWListener::openFrame ( MWAWPosition const &  pos,
MWAWGraphicStyle const &  style = MWAWGraphicStyle::emptyStyle() 
) [pure virtual]

low level: tries to open a frame

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::openLink ( MWAWLink const &  link) [pure virtual]
virtual bool MWAWListener::openSection ( MWAWSection const &  section) [pure virtual]

open a section if possible

Implemented in MWAWGraphicListener, MWAWSpreadsheetListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::openTable ( MWAWTable const &  table) [pure virtual]
virtual void MWAWListener::openTableCell ( MWAWCell const &  cell) [pure virtual]
virtual void MWAWListener::openTableRow ( float  h,
librevenge::RVNGUnit  unit,
bool  headerRow = false 
) [pure virtual]

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

Implemented in MWAWSpreadsheetListener, MWAWGraphicListener, MWAWPresentationListener, and MWAWTextListener.

virtual void MWAWListener::setDocumentLanguage ( std::string  locale) [pure virtual]

sets the documents language

Implemented in MWAWSpreadsheetListener, MWAWTextListener, MWAWGraphicListener, and MWAWPresentationListener.

virtual void MWAWListener::setFont ( MWAWFont const &  font) [pure virtual]
virtual void MWAWListener::startDocument ( ) [pure virtual]

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