Go to the documentation of this file.
34 #ifndef STOFF_TEXT_LISTENER_H
35 #define STOFF_TEXT_LISTENER_H
39 #include <librevenge/librevenge.h>
80 void endDocument(
bool sendDelayedSubDoc=true) final;
153 void insertEOL(
bool softBreak=false) final;
Definition: libstaroffice_internal.hxx:185
Definition: STOFFPosition.hxx:51
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFGraphicStyle.hxx:66
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
std::vector< STOFFSubDocumentPtr > m_subDocuments
Definition: STOFFTextListener.cxx:113
void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false)
Definition: STOFFTextListener.cxx:859
a field
Definition: libstaroffice_internal.hxx:363
void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final
adds comment
Definition: STOFFTextListener.cxx:1127
void _startSubDocument()
Definition: STOFFTextListener.cxx:1511
bool m_isTableCellOpened
Definition: STOFFTextListener.cxx:164
std::set< librevenge::RVNGString > m_definedGraphicStyleSet
the set of defined graphic style
Definition: STOFFTextListener.cxx:117
State & operator=(const State &)
bool m_isParagraphOpened
Definition: STOFFTextListener.cxx:156
void _openSpan()
low level: the function which opens a new span property
Definition: STOFFTextListener.cxx:993
bool m_isListElementOpened
Definition: STOFFTextListener.cxx:157
bool m_inLink
Definition: STOFFTextListener.cxx:179
void _openParagraph()
Definition: STOFFTextListener.cxx:799
Definition: STOFFGraphicShape.hxx:49
bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final
check if a paragraph style with a display name is already defined
Definition: STOFFTextListener.cxx:282
void closeTable() final
closes this table
Definition: STOFFTextListener.cxx:1555
std::shared_ptr< STOFFTextListenerInternal::TextState > m_ds
the actual global state
Definition: STOFFTextListener.hxx:299
void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final
function called to add a subdocument and modify the origin
Definition: STOFFTextListener.cxx:1420
Definition: STOFFGraphicShape.hxx:49
void openLink(STOFFLink const &link) final
open a link
Definition: STOFFTextListener.cxx:467
void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a picture with potential various representationin given position
Definition: STOFFTextListener.cxx:1239
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
bool m_isTableOpened
Definition: STOFFTextListener.cxx:161
Command m_command
the command
Definition: STOFFGraphicShape.hxx:65
void startDocument() final
starts a new document
Definition: STOFFTextListener.cxx:517
void _endSubDocument()
Definition: STOFFTextListener.cxx:1517
Definition: STOFFGraphicShape.hxx:49
Definition: libstaroffice_internal.hxx:185
STOFFListManagerPtr m_listManager
the list manager
Definition: STOFFListener.hxx:250
void _closeParagraph()
Definition: STOFFTextListener.cxx:827
void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a equation given a position
Definition: STOFFTextListener.cxx:1249
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
Type
the listener type
Definition: STOFFListener.hxx:57
void _closeSection()
does close a section (low level)
Definition: STOFFTextListener.cxx:779
BreakType
the different break type
Definition: STOFFListener.hxx:59
Definition: STOFFTextListener.cxx:72
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
Definition: libstaroffice_internal.hxx:185
std::vector< int > m_sentListMarkers
the list of marker corresponding to sent list
Definition: STOFFTextListener.cxx:112
std::vector< std::shared_ptr< STOFFTextListenerInternal::State > > m_psStack
stack of local state
Definition: STOFFTextListener.hxx:303
Definition: STOFFListener.hxx:57
void setFont(STOFFFont const &font) final
sets the font
Definition: STOFFTextListener.cxx:420
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
~State()
destructor
Definition: STOFFTextListener.cxx:131
bool canWriteText() const final
returns true if a text zone is opened
Definition: STOFFTextListener.hxx:84
bool openSection(STOFFSection const §ion) final
open a section if possible
Definition: STOFFTextListener.cxx:730
bool canOpenSectionAddBreak() const final
returns true if we can add open a section, add page break, ...
Definition: STOFFTextListener.cxx:725
State()
constructor
Definition: STOFFTextListener.cxx:187
This class contains the code needed to create Text document.
Definition: STOFFTextListener.hxx:59
void insertUnicodeString(librevenge::RVNGString const &str) final
adds a unicode string
Definition: STOFFTextListener.cxx:318
bool openFooter(librevenge::RVNGPropertyList const &extras) final
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
Definition: STOFFTextListener.cxx:677
bool m_isTableRowOpened
Definition: STOFFTextListener.cxx:162
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFFont.hxx:84
a structure used to define a cell and its format
Definition: STOFFCell.hxx:53
Definition: STOFFPosition.hxx:51
Definition: STOFFGraphicShape.hxx:49
void defineStyle(STOFFFont const &style) final
defines a font styles
Definition: STOFFTextListener.cxx:246
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level.
Definition: STOFFTextListener.cxx:918
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist
Definition: libstaroffice_internal.cxx:309
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libstaroffice_internal.cxx:81
void _closeSpan()
low level: the function which closes the last opened span property
Definition: STOFFTextListener.cxx:1017
const STOFFFont & getFont() const final
returns the actual font
Definition: STOFFTextListener.cxx:428
Definition: libstaroffice_internal.hxx:185
a note
Definition: libstaroffice_internal.hxx:389
void endDocument(bool sendDelayedSubDoc=true) final
ends the actual document
Definition: STOFFTextListener.cxx:530
static void checkForDefault(librevenge::RVNGPropertyList &propList)
check if the line style is set and the fill style is set.
Definition: STOFFGraphicStyle.cxx:93
STOFFPageSpan m_pageSpan
the current page span
Definition: STOFFTextListener.cxx:102
const STOFFSection & getSection() const final
returns the actual section
Definition: STOFFTextListener.cxx:720
bool isSectionOpened() const final
returns true if a section is opened
Definition: STOFFTextListener.cxx:715
static void checkForPadding(librevenge::RVNGPropertyList &propList)
check if the padding margins are set, if not set them to 0
Definition: STOFFGraphicStyle.cxx:80
the state of a STOFFTextListener
Definition: STOFFTextListener.cxx:127
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
bool m_isTableColumnOpened
Definition: STOFFTextListener.cxx:163
librevenge::RVNGPropertyList m_metaData
the document meta data
Definition: STOFFTextListener.cxx:104
void setParagraph(STOFFParagraph const ¶graph) final
sets the paragraph
Definition: STOFFTextListener.cxx:438
Definition: STOFFTextListener.cxx:72
bool m_isPageSpanOpened
Definition: STOFFTextListener.cxx:147
void insertBreak(BreakType breakType) final
inserts a break type: ColumBreak, PageBreak, ..
Definition: STOFFTextListener.cxx:351
bool m_firstParagraphInPageSpan
Definition: STOFFTextListener.cxx:159
bool isPageSpanOpened() const final
returns true if a page is opened
Definition: STOFFTextListener.cxx:561
#define STOFF_FALLTHROUGH
fall through attributes
Definition: libstaroffice_internal.hxx:110
Definition: libstaroffice_internal.hxx:185
void insertField(STOFFField const &field) final
adds a field type
Definition: STOFFTextListener.cxx:457
void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false) final
open a row with given height ( if h < 0.0, set min-row-height = -h )
Definition: STOFFTextListener.cxx:1569
bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a header
Definition: STOFFTextListener.cxx:654
std::set< librevenge::RVNGString > m_definedParagraphStyleSet
the set of defined paragraph style
Definition: STOFFTextListener.cxx:119
STOFFFont m_font
the font
Definition: STOFFTextListener.cxx:139
std::shared_ptr< STOFFList > m_list
Definition: STOFFTextListener.cxx:145
void insertTab() final
adds a tab
Definition: STOFFTextListener.cxx:340
void _changeList()
update the list so that it corresponds to the actual level
Definition: STOFFTextListener.cxx:934
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame, STOFFGraphicStyle const &style)
adds in propList the frame parameters.
Definition: STOFFTextListener.cxx:1409
Definition: STOFFListener.hxx:59
std::shared_ptr< STOFFSubDocument > STOFFSubDocumentPtr
a smart pointer of STOFFSubDocument
Definition: libstaroffice_internal.hxx:495
Definition: libstaroffice_internal.hxx:185
bool closeFooter() final
close a footer
Definition: STOFFTextListener.cxx:701
Definition: libstaroffice_internal.hxx:185
const STOFFParagraph & getParagraph() const final
returns the actual paragraph
Definition: STOFFTextListener.cxx:449
std::set< librevenge::RVNGString > m_definedFontStyleSet
list of document actually open
Definition: STOFFTextListener.cxx:115
~TextState()
destructor
Definition: STOFFTextListener.cxx:95
Definition: STOFFPosition.hxx:51
SubDocumentType
Definition: libstaroffice_internal.hxx:185
Definition: STOFFGraphicShape.hxx:49
const STOFFPageSpan & getPageSpan() final
returns the current page span
Definition: STOFFTextListener.cxx:566
void closeTableRow() final
closes this row
Definition: STOFFTextListener.cxx:1590
void _flushDeferredTabs()
low level: flush the deferred tabs
Definition: STOFFTextListener.cxx:1031
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFGraphicStyle.cxx:65
Definition: libstaroffice_internal.hxx:185
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
TextState & operator=(const TextState &)
void _closeListElement()
close a list level
Definition: STOFFTextListener.cxx:902
void addCoveredTableCell(STOFFVec2i const &pos) final
add covered cell
Definition: STOFFTextListener.cxx:1600
void closeFrame() final
close a frame
Definition: STOFFTextListener.cxx:1337
int m_paragraphNeedBreak
a sequence of bit used to know if we need page/column break
Definition: STOFFTextListener.cxx:143
void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final
sets the document meta data
Definition: STOFFTextListener.cxx:499
bool m_isHeaderFooterRegionOpened
a flag to know if the header footer region is started
Definition: STOFFTextListener.cxx:110
bool closeHeader() final
close a header
Definition: STOFFTextListener.cxx:666
bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final
returns try if a subdocument is open
Definition: STOFFTextListener.cxx:1503
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: STOFFTextListener.hxx:305
Definition: libstaroffice_internal.hxx:143
bool m_isSectionOpened
Definition: STOFFTextListener.cxx:148
bool openMasterPage(STOFFPageSpan &)
opens a master page
void openTableCell(STOFFCell const &cell) final
open a cell
Definition: STOFFTextListener.cxx:1635
STOFFPosition m_position
the position
Definition: STOFFFrameStyle.hxx:73
bool isParagraphOpened() const final
returns true if a paragraph or a list is opened
Definition: STOFFTextListener.cxx:433
Definition: libstaroffice_internal.hxx:185
void closeLayer()
close a layer
Class to store font.
Definition: STOFFFont.hxx:43
bool closeSection() final
close a section
Definition: STOFFTextListener.cxx:746
Type getType() const final
returns the listener type
Definition: STOFFTextListener.hxx:68
int m_numPagesRemainingInSpan
Definition: STOFFTextListener.cxx:167
bool m_inSubDocument
a stack used to know what is open
Definition: STOFFTextListener.cxx:176
bool openFrame(STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
store the position and the style (which will be needed further to insert a textbox or a table with op...
Definition: STOFFTextListener.cxx:1268
std::vector< STOFFPageSpan > m_pageList
the pages definition
Definition: STOFFTextListener.cxx:100
void addTo(librevenge::RVNGPropertyList &propList) const
adds to the propList
Definition: STOFFCell.cxx:246
bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a footer
Definition: STOFFTextListener.cxx:689
bool openHeader(librevenge::RVNGPropertyList const &extras) final
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
Definition: STOFFTextListener.cxx:642
void addTablePropertiesTo(librevenge::RVNGPropertyList &propList) const
adds the table properties to propList
Definition: STOFFTable.cxx:68
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
bool m_isHeaderFooterOpened
a flag to know if the header footer is started
Definition: STOFFTextListener.cxx:109
void _resetParagraphState(const bool isListElement=false)
Definition: STOFFTextListener.cxx:851
int m_footNoteNumber
footnote number
Definition: STOFFTextListener.cxx:106
void insertNote(STOFFNote const ¬e, STOFFSubDocumentPtr &subDocument) final
insert a note
Definition: STOFFTextListener.cxx:1070
Definition: STOFFGraphicShape.hxx:49
bool m_isHeaderFooterWithoutParagraph
Definition: STOFFTextListener.cxx:151
void _openListElement()
open a list level
Definition: STOFFTextListener.cxx:872
Definition: STOFFGraphicShape.hxx:49
void closeTableCell() final
close a cell
Definition: STOFFTextListener.cxx:1652
std::shared_ptr< STOFFTextListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: STOFFTextListener.cxx:1672
bool isDocumentStarted() const final
returns true if a document is opened
Definition: STOFFTextListener.cxx:512
void closeGroup() final
close a group
Definition: STOFFTextListener.cxx:1397
void openTable(STOFFTable const &table) final
open a table (using the last parameters of openFrame for the position )
Definition: STOFFTextListener.cxx:1531
int m_currentPageNumber
Definition: STOFFTextListener.cxx:168
bool m_isGroupOpened
a flag to know if openGroup was called
Definition: STOFFTextListener.cxx:153
void insertEOL(bool softBreak=false) final
adds an end of line ( by default an hard one)
Definition: STOFFTextListener.cxx:325
unsigned m_currentPage
Definition: STOFFTextListener.cxx:166
a class to store the document state of a STOFFTextListener
Definition: STOFFTextListener.cxx:74
void closeMasterPage()
close a master page
Definition: STOFFTextListener.hxx:113
bool m_sectionAttributesChanged
Definition: STOFFTextListener.cxx:170
Definition: STOFFPosition.hxx:51
Internal and low level namespace to define the states of STOFFTextListener.
Definition: STOFFTextListener.cxx:69
librevenge::RVNGString m_label
the note label
Definition: libstaroffice_internal.hxx:399
void _popParsingState()
resets the previous parsing state
Definition: STOFFTextListener.cxx:1683
bool m_isPageSpanBreakDeferred
Definition: STOFFTextListener.cxx:150
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: STOFFTextListener.cxx:574
Definition: libstaroffice_internal.hxx:391
STOFFParagraph m_paragraph
the paragraph
Definition: STOFFTextListener.cxx:141
bool isHeaderFooterOpened() const final
returns true if the header/footer is open
Definition: STOFFTextListener.cxx:637
bool openGroup(STOFFFrameStyle const &frame) final
open a group
Definition: STOFFTextListener.cxx:1347
a class which stores section properties
Definition: STOFFSection.hxx:45
STOFFSection m_section
the section
Definition: STOFFTextListener.cxx:172
void _flushText()
low level: flush the deferred text
Definition: STOFFTextListener.cxx:1039
void _openSection()
does open a section (low level)
Definition: STOFFTextListener.cxx:761
void closeLink() final
close a link
Definition: STOFFTextListener.cxx:485
bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final
check if a graphic style with a display name is already defined
Definition: STOFFTextListener.cxx:277
void insertTextBox(STOFFFrameStyle const &pos, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a textbox in given position
Definition: STOFFTextListener.cxx:1154
std::shared_ptr< STOFFListManager > STOFFListManagerPtr
a smart pointer of STOFFListManager
Definition: libstaroffice_internal.hxx:489
Definition: STOFFListener.hxx:59
Type m_type
the note type
Definition: libstaroffice_internal.hxx:397
void insertUnicode(uint32_t character) final
insert a character using the font converter to find the utf8 character
Definition: STOFFTextListener.cxx:301
Definition: STOFFPosition.hxx:51
STOFFTextListener(STOFFListManagerPtr &listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
constructor
Definition: STOFFTextListener.cxx:233
std::vector< bool > m_listOrderedLevels
Definition: STOFFTextListener.cxx:174
void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final
adds a shape picture in given position
Definition: STOFFTextListener.cxx:1169
libstoff::SubDocumentType m_subDocumentType
Definition: STOFFTextListener.cxx:180
int m_numDeferredTabs
the number of tabs to add
Definition: STOFFTextListener.cxx:136
AnchorTo m_anchorTo
anchor position
Definition: STOFFPosition.hxx:145
int m_number
the note number if defined
Definition: libstaroffice_internal.hxx:401
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if needed )
Definition: libstaroffice_internal.cxx:247
~STOFFTextListener() final
destructor
Definition: STOFFTextListener.cxx:242
librevenge::RVNGString m_textBuffer
a buffer to stored the text
Definition: STOFFTextListener.cxx:134
void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList)
Definition: STOFFTextListener.cxx:399
bool m_isDocumentStarted
a flag to know if the document is open
Definition: STOFFTextListener.cxx:109
void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) final
add empty cell
Definition: STOFFTextListener.cxx:1616
void setDocumentLanguage(std::string locale) final
sets the documents language
Definition: STOFFTextListener.cxx:506
int m_smallPictureNumber
number of small picture
Definition: STOFFTextListener.cxx:108
int m_endNoteNumber
endnote number
Definition: STOFFTextListener.cxx:106
void addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition: libstaroffice_internal.cxx:234
bool openLayer(librevenge::RVNGString const &name)
open a layer
void _closePageSpan()
does close a page (low level)
Definition: STOFFTextListener.cxx:622
bool m_isSpanOpened
Definition: STOFFTextListener.cxx:155
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFFrameStyle.cxx:79
bool m_isNote
Definition: STOFFTextListener.cxx:178
TextState(std::vector< STOFFPageSpan > const &pageList)
constructor
Definition: STOFFTextListener.cxx:76
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
Definition: STOFFListener.hxx:59
Definition: STOFFDocument.hxx:42
librevenge::RVNGPropertyList m_propertyList
the properties
Definition: STOFFParagraph.hxx:73
Definition: STOFFPosition.hxx:51
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libstaroffice_internal.cxx:50
a link
Definition: libstaroffice_internal.hxx:375
std::shared_ptr< STOFFTextListenerInternal::State > m_ps
the actual local parse state
Definition: STOFFTextListener.hxx:301
void addTo(librevenge::RVNGPropertyList &list) const
add shape to property list
Definition: STOFFGraphicShape.cxx:60
bool m_isFrameOpened
Definition: STOFFTextListener.cxx:149
Definition: libstaroffice_internal.hxx:185
an noop deleter used to transform a libwpd pointer in a false std::shared_ptr
Definition: libstaroffice_internal.hxx:100
Definition: STOFFPosition.hxx:51
bool isFontStyleDefined(librevenge::RVNGString const &name) const final
check if a font style with a display name is already defined
Definition: STOFFTextListener.cxx:272
void insertChar(uint8_t character) final
adds a basic character, ..
Definition: STOFFTextListener.cxx:290
static void checkForDefault(librevenge::RVNGPropertyList &propList)
check if the font name defined.
Definition: STOFFFont.cxx:106
Generated on Mon Jan 20 2020 23:02:18 for libstaroffice by
doxygen 1.8.16