40 #ifndef MWAW_TEXT_LISTENER_H
41 #define MWAW_TEXT_LISTENER_H
45 #include <librevenge/librevenge.h>
196 void openTableRow(
float h, librevenge::RVNGUnit unit,
bool headerRow=
false);
273 shared_ptr<MWAWTextListenerInternal::DocumentState>
m_ds;
275 shared_ptr<MWAWTextListenerInternal::State>
m_ps;
277 std::vector<shared_ptr<MWAWTextListenerInternal::State> >
m_psStack;
void closeTableCell()
close a cell
Definition: MWAWTextListener.cxx:1835
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, MWAWPosition const &pos)
Definition: MWAWTextListener.cxx:1379
MWAWFont const & getFont() const
returns the actual font
Definition: MWAWTextListener.cxx:404
void insertComment(MWAWSubDocumentPtr &subDocument)
adds comment
Definition: MWAWTextListener.cxx:1074
MWAWTextListener(MWAWParserState &parserState, std::vector< MWAWPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
constructor
Definition: MWAWTextListener.cxx:203
MWAWSection const & getSection() const
returns the actual section
Definition: MWAWTextListener.cxx:651
void _openSection()
does open a section (low level)
Definition: MWAWTextListener.cxx:693
bool openFrame(MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
tries to open a frame
Definition: MWAWTextListener.cxx:1236
MWAWParserState & m_parserState
the parser state
Definition: MWAWTextListener.hxx:279
void _popParsingState()
resets the previous parsing state
Definition: MWAWTextListener.cxx:1866
void closeGroup()
close a group
Definition: MWAWTextListener.cxx:1367
bool isDocumentStarted() const
returns true if a document is opened
Definition: MWAWTextListener.cxx:490
void closeTableRow()
closes this row
Definition: MWAWTextListener.cxx:1789
void insertTab()
adds a tab
Definition: MWAWTextListener.cxx:308
void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList)
Definition: MWAWTextListener.cxx:367
void startDocument()
starts the document
Definition: MWAWTextListener.cxx:495
void insertChar(uint8_t character)
adds a basic character, ..
Definition: MWAWTextListener.cxx:216
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:95
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:64
a link
Definition: libmwaw_internal.hxx:392
bool isSubDocumentOpened(libmwaw::SubDocumentType &subdocType) const
returns try if a subdocument is open
Definition: MWAWTextListener.cxx:1703
MWAWParagraph const & getParagraph() const
returns the actual paragraph
Definition: MWAWTextListener.cxx:421
bool isHeaderFooterOpened() const
returns true if the header/footer is open
Definition: MWAWTextListener.cxx:612
void _closeParagraph()
Definition: MWAWTextListener.cxx:762
bool isParagraphOpened() const
returns true if a paragraph or a list is opened
Definition: MWAWTextListener.cxx:409
void insertNote(MWAWNote const ¬e, MWAWSubDocumentPtr &subDocument)
insert a note
Definition: MWAWTextListener.cxx:1017
void _closeListElement()
close a list level
Definition: MWAWTextListener.cxx:837
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
SubDocumentType
Definition: libmwaw_internal.hxx:178
bool closeSection()
close a section
Definition: MWAWTextListener.cxx:678
void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false)
open a row with given height ( if h < 0.0, set min-row-height = -h )
Definition: MWAWTextListener.cxx:1768
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:51
MWAWTextListener & operator=(const MWAWTextListener &)
operator= (unimplemented)
bool openGroup(MWAWPosition const &pos)
open a group
Definition: MWAWTextListener.cxx:1316
void openTableCell(MWAWCell const &cell)
open a cell
Definition: MWAWTextListener.cxx:1818
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:778
void setDocumentMetaData(librevenge::RVNGPropertyList const &metadata)
sets the documents metadata
Definition: MWAWTextListener.cxx:477
bool insertFooter(MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras)
insert a footer
Definition: MWAWTextListener.cxx:630
void _resetParagraphState(const bool isListElement=false)
Definition: MWAWTextListener.cxx:786
bool canWriteText() const
returns true if we can add text data
Definition: MWAWTextListener.hxx:104
void _closeSpan()
low level: the function which closes the last opened span property
Definition: MWAWTextListener.cxx:953
bool isSectionOpened() const
returns true if a section is opened
Definition: MWAWTextListener.cxx:646
Type
the listener type
Definition: MWAWListener.hxx:56
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
void _changeList()
update the list so that it corresponds to the actual level
Definition: MWAWTextListener.cxx:870
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:514
MWAWPageSpan const & getPageSpan()
returns the current page span
Definition: MWAWTextListener.cxx:544
void closeTable()
closes this table
Definition: MWAWTextListener.cxx:1754
void insertCharacter(unsigned char c)
insert a character using the font converter to find the utf8 character
Definition: MWAWTextListener.cxx:227
void _openSpan()
low level: the function which opens a new span property
Definition: MWAWTextListener.cxx:929
void setDocumentLanguage(std::string const &locale)
sets the documents language
Definition: MWAWTextListener.cxx:484
bool insertHeader(MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras)
insert a header
Definition: MWAWTextListener.cxx:617
Class to store font.
Definition: MWAWFont.hxx:43
void _openParagraph()
Definition: MWAWTextListener.cxx:736
a class to define the parser state
Definition: MWAWParser.hxx:49
BreakType
the different break type
Definition: MWAWListener.hxx:58
shared_ptr< MWAWTextListenerInternal::DocumentState > m_ds
the main parse state
Definition: MWAWTextListener.hxx:273
void _flushDeferredTabs()
low level: flush the deferred tabs
Definition: MWAWTextListener.cxx:967
void insertPicture(MWAWPosition const &pos, MWAWEmbeddedObject const &picture, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
adds a picture with potential various representationin given position
Definition: MWAWTextListener.cxx:1212
void closeLink()
close a link
Definition: MWAWTextListener.cxx:463
void insertTextBox(MWAWPosition const &pos, MWAWSubDocumentPtr subDocument, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle())
adds a textbox in given position
Definition: MWAWTextListener.cxx:1099
virtual ~MWAWTextListener()
destructor
Definition: MWAWTextListener.cxx:209
void closeFrame()
tries to close the last open frame
Definition: MWAWTextListener.cxx:1306
bool canOpenSectionAddBreak() const
returns true if we can add open a section, add page break, ...
Definition: MWAWTextListener.cxx:656
void _startSubDocument()
Definition: MWAWTextListener.cxx:1711
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level. ...
Definition: MWAWTextListener.cxx:853
void insertEOL(bool softBreak=false)
adds an end of line ( by default an hard one)
Definition: MWAWTextListener.cxx:290
Internal and low level namespace to define the states of MWAWTextListener.
Definition: MWAWTextListener.cxx:70
void _closePageSpan()
does close a page (low level)
Definition: MWAWTextListener.cxx:597
void endDocument(bool sendDelayedSubDoc=true)
ends the document
Definition: MWAWTextListener.cxx:508
void _endSubDocument()
Definition: MWAWTextListener.cxx:1717
void insertShape(MWAWPosition const &pos, MWAWGraphicShape const &shape, MWAWGraphicStyle const &style)
adds a shape picture in given position
Definition: MWAWTextListener.cxx:1114
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
a class which stores section properties
Definition: MWAWSection.hxx:45
Definition: MWAWListener.hxx:56
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:500
Type getType() const
returns the listener type
Definition: MWAWTextListener.hxx:73
shared_ptr< MWAWTextListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: MWAWTextListener.cxx:1855
void insertField(MWAWField const &field)
adds a field type
Definition: MWAWTextListener.cxx:429
void setParagraph(MWAWParagraph const ¶graph)
sets the paragraph
Definition: MWAWTextListener.cxx:414
void _openListElement()
open a list level
Definition: MWAWTextListener.cxx:807
void setFont(MWAWFont const &font)
sets the font
Definition: MWAWTextListener.cxx:388
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:45
void addEmptyTableCell(MWAWVec2i const &pos, MWAWVec2i span=MWAWVec2i(1, 1))
add empty cell
Definition: MWAWTextListener.cxx:1799
void openTable(MWAWTable const &table)
open a table
Definition: MWAWTextListener.cxx:1731
class to store the paragraph properties
Definition: MWAWParagraph.hxx:81
void openLink(MWAWLink const &link)
open a link
Definition: MWAWTextListener.cxx:447
void insertUnicodeString(librevenge::RVNGString const &str)
adds a unicode string
Definition: MWAWTextListener.cxx:283
a field
Definition: libmwaw_internal.hxx:369
shared_ptr< MWAWTextListenerInternal::State > m_ps
the actual local parse state
Definition: MWAWTextListener.hxx:275
a note
Definition: libmwaw_internal.hxx:406
bool openSection(MWAWSection const §ion)
open a section if possible
Definition: MWAWTextListener.cxx:661
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
This class contains a virtual interface to all listener.
Definition: MWAWListener.hxx:49
void insertBreak(BreakType breakType)
inserts a break type: ColumBreak, PageBreak, ..
Definition: MWAWTextListener.cxx:319
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: MWAWTextListener.hxx:281
std::vector< shared_ptr< MWAWTextListenerInternal::State > > m_psStack
stack of local state
Definition: MWAWTextListener.hxx:277
void _flushText()
low level: flush the deferred text
Definition: MWAWTextListener.cxx:986
bool isPageSpanOpened() const
returns true if a page is opened
Definition: MWAWTextListener.cxx:539
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: MWAWTextListener.cxx:552
void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false)
Definition: MWAWTextListener.cxx:794
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:268
void _closeSection()
does close a section (low level)
Definition: MWAWTextListener.cxx:716
void insertUnicode(uint32_t character)
adds an unicode character.
Definition: MWAWTextListener.cxx:273
void handleSubDocument(MWAWSubDocumentPtr subDocument, libmwaw::SubDocumentType subDocumentType)
function called to add a subdocument
Definition: MWAWTextListener.cxx:1621