34#ifndef MWAW_LISTENER_H
35#define MWAW_LISTENER_H
39#include <librevenge/librevenge.h>
148 virtual void openTableRow(
float h, librevenge::RVNGUnit unit,
bool headerRow=
false) = 0;
192 static bool first=
true;
194 MWAW_DEBUG_MSG((
"MWAWListener::insertTextBoxInShape: umimplemented, revert to basic insertTextBox\n"));
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:477
This class contains a virtual interface to all listener.
Definition: MWAWListener.hxx:50
virtual bool isDocumentStarted() const =0
returns true if a document is opened
virtual Type getType() const =0
returns the listener type
virtual bool isSectionOpened() const =0
returns true if a section is opened
virtual void insertBreak(BreakType breakType)=0
inserts a break type: ColumBreak, PageBreak, ..
virtual bool insertHeader(MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList const &extras)=0
insert a header (interaction with MWAWPageSpan which fills the parameters for openHeader)
virtual bool isPageSpanOpened() const =0
returns true if a page is opened
Type
the listener type
Definition: MWAWListener.hxx:56
@ Graphic
Definition: MWAWListener.hxx:56
@ Presentation
Definition: MWAWListener.hxx:56
@ Spreadsheet
Definition: MWAWListener.hxx:56
@ Text
Definition: MWAWListener.hxx:56
virtual bool openGroup(MWAWPosition const &pos)=0
low level: tries to open a group
virtual void insertTextBox(MWAWPosition const &pos, MWAWSubDocumentPtr const &subDocument, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle())=0
adds a textbox in given position
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,...
virtual void insertCharacter(unsigned char c)=0
insert a character using the font converter to find the utf8 character
virtual void setFont(MWAWFont const &font)=0
sets the font
virtual void insertChar(uint8_t character)=0
adds a basic character, ..
virtual void insertEOL(bool softBreak=false)=0
adds an end of line ( by default an hard one)
virtual bool openFrame(MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())=0
low level: tries to open a frame
virtual MWAWParagraph const & getParagraph() const =0
returns the actual paragraph
virtual void setParagraph(MWAWParagraph const ¶graph)=0
sets the paragraph
virtual void handleSubDocument(MWAWSubDocumentPtr const &subDocument, libmwaw::SubDocumentType subDocumentType)=0
low level: function called to add a subdocument
virtual bool openSection(MWAWSection const §ion)=0
open a section if possible
virtual MWAWPageSpan const & getPageSpan()=0
returns the current page span
BreakType
the different break type
Definition: MWAWListener.hxx:58
@ PageBreak
Definition: MWAWListener.hxx:58
@ SoftPageBreak
Definition: MWAWListener.hxx:58
@ ColumnBreak
Definition: MWAWListener.hxx:58
virtual void closeTableCell()=0
close a cell
virtual void openTableCell(MWAWCell const &cell)=0
open a cell
virtual void insertField(MWAWField const &field)=0
adds a field type
virtual void insertTab()=0
adds a tab
virtual void openTable(MWAWTable const &table)=0
open a table
virtual void closeTable()=0
closes this table
virtual void setDocumentLanguage(std::string const &locale)=0
sets the documents language
virtual void closeFrame()=0
low level: tries to close the last opened frame
virtual bool isParagraphOpened() const =0
returns true if a paragraph or a list is opened
virtual bool closeSection()=0
close a section
virtual ~MWAWListener()
destructor
Definition: MWAWListener.cxx:36
virtual void closeLink()=0
close a link
virtual void insertTextBoxInShape(MWAWPosition const &pos, MWAWSubDocumentPtr const &subDocument, MWAWGraphicShape const &, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle())
adds a textbox in given position
Definition: MWAWListener.hxx:188
virtual MWAWFont const & getFont() const =0
returns the actual font
virtual void endDocument(bool sendDelayedSubDoc=true)=0
ends the document
virtual void addEmptyTableCell(MWAWVec2i const &pos, MWAWVec2i span=MWAWVec2i(1, 1))=0
add empty cell
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 bool isHeaderFooterOpened() const =0
returns true if the header/footer is open
virtual void openLink(MWAWLink const &link)=0
open a link
virtual void startDocument()=0
starts the document
virtual void insertUnicodeString(librevenge::RVNGString const &str)=0
adds a unicode string
virtual bool canOpenSectionAddBreak() const =0
returns true if we can add open a section, add page break, ...
virtual void setDocumentMetaData(librevenge::RVNGPropertyList const &metadata)=0
sets the documents metadata
virtual void insertUnicode(uint32_t character)=0
adds an unicode character.
virtual void closeGroup()=0
low level: tries to close the last opened group
virtual void insertNote(MWAWNote const ¬e, MWAWSubDocumentPtr &subDocument)=0
insert a note
virtual bool insertFooter(MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList const &extras)=0
insert a footer (interaction with MWAWPageSpan which fills the parameters for openFooter)
virtual void insertShape(MWAWPosition const &pos, MWAWGraphicShape const &shape, MWAWGraphicStyle const &style)=0
adds a shape picture in given position
virtual bool canWriteText() const =0
returns true if we can add text data
virtual void insertPicture(MWAWPosition const &pos, MWAWEmbeddedObject const &picture, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())=0
adds a picture with various representationin given position.
virtual void insertComment(MWAWSubDocumentPtr &subDocument)=0
adds comment
virtual void closeTableRow()=0
closes this row
virtual MWAWSection const & getSection() const =0
returns the actual section
virtual bool isSubDocumentOpened(libmwaw::SubDocumentType &subdocType) const =0
returns true if a subdocument is open
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
a class which stores section properties
Definition: MWAWSection.hxx:46
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:565
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
SubDocumentType
Definition: libmwaw_internal.hxx:188
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
a field
Definition: libmwaw_internal.hxx:399
a link
Definition: libmwaw_internal.hxx:430
a note
Definition: libmwaw_internal.hxx:445