40 #ifndef MWAW_TEXT_LISTENER_H 41 #define MWAW_TEXT_LISTENER_H 45 #include <librevenge/librevenge.h> 79 void setDocumentMetaData(librevenge::RVNGPropertyList
const &metadata)
final;
81 void setDocumentLanguage(std::string
const &locale)
final;
84 void startDocument()
final;
86 void endDocument(
bool sendDelayedSubDoc=
true)
final;
88 bool isDocumentStarted()
const final;
97 void closeFrame()
final;
101 void closeGroup()
final;
111 bool isPageSpanOpened()
const final;
119 bool insertHeader(
MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList
const &extras)
final;
121 bool insertFooter(
MWAWSubDocumentPtr const &subDocument, librevenge::RVNGPropertyList
const &extras)
final;
123 bool isHeaderFooterOpened()
const final;
128 void insertChar(uint8_t character)
final;
131 void insertCharacter(
unsigned char c)
final;
137 int insertCharacter(
unsigned char c,
MWAWInputStreamPtr &input,
long endPos=-1)
final;
140 void insertUnicode(uint32_t character)
final;
142 void insertUnicodeString(librevenge::RVNGString
const &str)
final;
145 void insertTab()
final;
147 void insertEOL(
bool softBreak=
false)
final;
151 void setFont(
MWAWFont const &font)
final;
153 MWAWFont const &getFont()
const final;
157 bool isParagraphOpened()
const final;
165 void insertField(
MWAWField const &field)
final;
169 void openLink(
MWAWLink const &link)
final;
171 void closeLink()
final;
192 void openTable(
MWAWTable const &table)
final;
194 void closeTable()
final;
196 void openTableRow(
float h, librevenge::RVNGUnit unit,
bool headerRow=
false)
final;
198 void closeTableRow()
final;
200 void openTableCell(
MWAWCell const &cell)
final;
202 void closeTableCell()
final;
208 bool canOpenSectionAddBreak()
const final;
210 bool isSectionOpened()
const final;
214 bool openSection(
MWAWSection const §ion)
final;
216 bool closeSection()
final;
218 void insertBreak(
BreakType breakType)
final;
224 void _closeSection();
226 void _openPageSpan(
bool sendHeaderFooters=
true);
228 void _closePageSpan();
230 void _startSubDocument();
231 void _endSubDocument();
233 void _handleFrameParameters(librevenge::RVNGPropertyList &propList,
MWAWPosition const &pos);
235 void _openParagraph();
236 void _closeParagraph();
237 void _appendParagraphProperties(librevenge::RVNGPropertyList &propList,
const bool isListElement=
false);
238 void _resetParagraphState(
const bool isListElement=
false);
241 void _openListElement();
243 void _closeListElement();
250 int _getListId()
const;
260 void _flushDeferredTabs();
262 void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList);
267 std::shared_ptr<MWAWTextListenerInternal::State> _pushParsingState();
269 void _popParsingState();
273 std::shared_ptr<MWAWTextListenerInternal::DocumentState>
m_ds;
275 std::shared_ptr<MWAWTextListenerInternal::State>
m_ps;
277 std::vector<std::shared_ptr<MWAWTextListenerInternal::State> >
m_psStack;
std::shared_ptr< MWAWTextListenerInternal::DocumentState > m_ds
the main parse state
Definition: MWAWTextListener.hxx:273
Type getType() const final
returns the listener type
Definition: MWAWTextListener.hxx:73
MWAWParserState & m_parserState
the parser state
Definition: MWAWTextListener.hxx:279
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:430
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
SubDocumentType
Definition: libmwaw_internal.hxx:188
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:834
std::shared_ptr< MWAWTextListenerInternal::State > m_ps
the actual local parse state
Definition: MWAWTextListener.hxx:275
Type
the listener type
Definition: MWAWListener.hxx:56
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
Section getSection(const State &state, const long id)
Definition: HanMacWrdKText.cxx:268
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
Internal and low level namespace to define the states of MWAWTextListener.
Definition: MWAWTextListener.cxx:70
bool isDocumentStarted() const final
returns true if a document is opened
Definition: MWAWTextListener.cxx:512
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
a class which stores section properties
Definition: MWAWSection.hxx:45
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:547
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:45
class to store the paragraph properties
Definition: MWAWParagraph.hxx:84
a field
Definition: libmwaw_internal.hxx:399
bool canWriteText() const final
returns true if we can add text data
Definition: MWAWTextListener.hxx:104
std::vector< std::shared_ptr< MWAWTextListenerInternal::State > > m_psStack
stack of local state
Definition: MWAWTextListener.hxx:277
a note
Definition: libmwaw_internal.hxx:445
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
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:561
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: MWAWTextListener.hxx:281
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:304