40 #ifndef MWAW_TEXT_LISTENER_H 41 #define MWAW_TEXT_LISTENER_H 45 #include <librevenge/librevenge.h> 79 void setDocumentLanguage(std::string locale);
84 void endDocument(
bool sendDelayedSubDoc=
true);
86 bool isDocumentStarted()
const;
109 bool isPageSpanOpened()
const;
117 bool insertHeader(
MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList
const &extras);
119 bool insertFooter(
MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList
const &extras);
121 bool isHeaderFooterOpened()
const;
126 void insertChar(uint8_t character);
129 void insertCharacter(
unsigned char c);
138 void insertUnicode(uint32_t character);
140 void insertUnicodeString(librevenge::RVNGString
const &str);
145 void insertEOL(
bool softBreak=
false);
155 bool isParagraphOpened()
const;
163 void insertField(
MWAWField const &field);
167 void openLink(
MWAWLink const &link);
194 void openTableRow(
float h, librevenge::RVNGUnit unit,
bool headerRow=
false);
196 void closeTableRow();
198 void openTableCell(
MWAWCell const &cell);
200 void closeTableCell();
206 bool canOpenSectionAddBreak()
const;
208 bool isSectionOpened()
const;
222 void _closeSection();
224 void _openPageSpan(
bool sendHeaderFooters=
true);
226 void _closePageSpan();
228 void _startSubDocument();
229 void _endSubDocument();
231 void _handleFrameParameters(librevenge::RVNGPropertyList &propList,
MWAWPosition const &pos);
233 void _openParagraph();
234 void _closeParagraph();
235 void _appendParagraphProperties(librevenge::RVNGPropertyList &propList,
const bool isListElement=
false);
236 void _resetParagraphState(
const bool isListElement=
false);
239 void _openListElement();
241 void _closeListElement();
248 int _getListId()
const;
258 void _flushDeferredTabs();
260 void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList);
265 shared_ptr<MWAWTextListenerInternal::State> _pushParsingState();
267 void _popParsingState();
271 shared_ptr<MWAWTextListenerInternal::DocumentState>
m_ds;
273 shared_ptr<MWAWTextListenerInternal::State>
m_ps;
275 std::vector<shared_ptr<MWAWTextListenerInternal::State> >
m_psStack;
MWAWParserState & m_parserState
the parser state
Definition: MWAWTextListener.hxx:277
bool isDocumentStarted() const
returns true if a document is opened
Definition: MWAWTextListener.cxx:479
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:386
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
SubDocumentType
Definition: libmwaw_internal.hxx:172
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:51
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:774
bool canWriteText() const
returns true if we can add text data
Definition: MWAWTextListener.hxx:102
Type
the listener type
Definition: MWAWListener.hxx:56
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:510
Class to store font.
Definition: MWAWFont.hxx:43
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:271
Internal and low level namespace to define the states of MWAWTextListener.
Definition: MWAWTextListener.cxx:70
small class use to define a embedded object
Definition: libmwaw_internal.hxx:419
a class which stores section properties
Definition: MWAWSection.hxx:45
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:496
Type getType() const
returns the listener type
Definition: MWAWTextListener.hxx:73
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:45
class to store the paragraph properties
Definition: MWAWParagraph.hxx:81
a field
Definition: libmwaw_internal.hxx:363
shared_ptr< MWAWTextListenerInternal::State > m_ps
the actual local parse state
Definition: MWAWTextListener.hxx:273
a note
Definition: libmwaw_internal.hxx:400
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
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: MWAWTextListener.hxx:279
std::vector< shared_ptr< MWAWTextListenerInternal::State > > m_psStack
stack of local state
Definition: MWAWTextListener.hxx:275
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:269