34 #ifndef STOFF_TEXT_LISTENER_H 35 #define STOFF_TEXT_LISTENER_H 39 #include <librevenge/librevenge.h> 74 void setDocumentLanguage(std::string locale)
final;
76 void setDocumentMetaData(
const librevenge::RVNGPropertyList &list)
final;
78 void startDocument()
final;
80 void endDocument(
bool sendDelayedSubDoc=
true)
final;
90 bool isDocumentStarted()
const final;
99 void closeFrame()
final;
103 void closeGroup()
final;
105 bool openLayer(librevenge::RVNGString
const &name);
117 bool isPageSpanOpened()
const final;
125 bool openHeader(librevenge::RVNGPropertyList
const &extras)
final;
127 bool openFooter(librevenge::RVNGPropertyList
const &extras)
final;
129 bool closeHeader()
final;
131 bool closeFooter()
final;
133 bool insertHeaderRegion(
STOFFSubDocumentPtr subDocument, librevenge::RVNGString
const &which)
final;
135 bool insertFooterRegion(
STOFFSubDocumentPtr subDocument, librevenge::RVNGString
const &which)
final;
137 bool isHeaderFooterOpened()
const final;
141 void insertChar(uint8_t character)
final;
146 void insertUnicode(uint32_t character)
final;
148 void insertUnicodeString(librevenge::RVNGString
const &str)
final;
151 void insertTab()
final;
153 void insertEOL(
bool softBreak=
false)
final;
157 void setFont(
STOFFFont const &font)
final;
163 bool isParagraphOpened()
const final;
171 void defineStyle(
STOFFFont const &style)
final;
173 bool isFontStyleDefined(librevenge::RVNGString
const &name)
const final;
177 bool isGraphicStyleDefined(librevenge::RVNGString
const &name)
const final;
181 bool isParagraphStyleDefined(librevenge::RVNGString
const &name)
const final;
185 void insertField(
STOFFField const &field)
final;
189 void openLink(
STOFFLink const &link)
final;
191 void closeLink()
final;
202 void insertEquation(
STOFFFrameStyle const &frame, librevenge::RVNGString
const &equation,
207 void insertComment(
STOFFSubDocumentPtr &subDocument, librevenge::RVNGString
const &creator=
"", librevenge::RVNGString
const &date=
"")
final;
212 void openTable(
STOFFTable const &table)
final;
214 void closeTable()
final;
216 void openTableRow(
float h, librevenge::RVNGUnit unit,
bool headerRow=
false)
final;
218 void closeTableRow()
final;
220 void openTableCell(
STOFFCell const &cell)
final;
222 void closeTableCell()
final;
224 void addCoveredTableCell(
STOFFVec2i const &pos)
final;
231 bool canOpenSectionAddBreak()
const final;
233 bool isSectionOpened()
const final;
239 bool closeSection()
final;
241 void insertBreak(
BreakType breakType)
final;
247 void _closeSection();
249 void _openPageSpan(
bool sendHeaderFooters=
true);
251 void _closePageSpan();
253 void _startSubDocument();
254 void _endSubDocument();
261 void _openParagraph();
262 void _closeParagraph();
263 void _appendParagraphProperties(librevenge::RVNGPropertyList &propList,
const bool isListElement=
false);
264 void _resetParagraphState(
const bool isListElement=
false);
267 void _openListElement();
269 void _closeListElement();
276 int _getListId()
const;
286 void _flushDeferredTabs();
288 void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList);
293 std::shared_ptr<STOFFTextListenerInternal::State> _pushParsingState();
295 void _popParsingState();
299 std::shared_ptr<STOFFTextListenerInternal::TextState>
m_ds;
301 std::shared_ptr<STOFFTextListenerInternal::State>
m_ps;
303 std::vector<std::shared_ptr<STOFFTextListenerInternal::State> >
m_psStack;
std::shared_ptr< STOFFTextListenerInternal::TextState > m_ds
the actual global state
Definition: STOFFTextListener.hxx:299
bool canWriteText() const final
returns true if a text zone is opened
Definition: STOFFTextListener.hxx:84
a structure used to define a cell and its format
Definition: STOFFCell.hxx:53
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
Type
the listener type
Definition: STOFFListener.hxx:57
a link
Definition: libstaroffice_internal.hxx:375
std::vector< std::shared_ptr< STOFFTextListenerInternal::State > > m_psStack
stack of local state
Definition: STOFFTextListener.hxx:303
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
a note
Definition: libstaroffice_internal.hxx:389
Type getType() const final
returns the listener type
Definition: STOFFTextListener.hxx:68
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
std::shared_ptr< STOFFSubDocument > STOFFSubDocumentPtr
a smart pointer of STOFFSubDocument
Definition: libstaroffice_internal.hxx:499
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: STOFFTextListener.hxx:305
SubDocumentType
Definition: libstaroffice_internal.hxx:185
a class which stores section properties
Definition: STOFFSection.hxx:45
bool isDocumentStarted() const final
returns true if a document is opened
Definition: STOFFTextListener.cxx:512
a field
Definition: libstaroffice_internal.hxx:363
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
This class contains the code needed to create Text document.
Definition: STOFFTextListener.hxx:59
STOFFVec2< int > STOFFVec2i
STOFFVec2 of int.
Definition: libstaroffice_internal.hxx:767
void closeMasterPage()
close a master page
Definition: STOFFTextListener.hxx:113
Class to store font.
Definition: STOFFFont.hxx:43
std::shared_ptr< STOFFTextListenerInternal::State > m_ps
the actual local parse state
Definition: STOFFTextListener.hxx:301
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
BreakType
the different break type
Definition: STOFFListener.hxx:59
Internal and low level namespace to define the states of STOFFTextListener.
Definition: STOFFTextListener.cxx:69
std::shared_ptr< STOFFListManager > STOFFListManagerPtr
a smart pointer of STOFFListManager
Definition: libstaroffice_internal.hxx:493
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44