34 #ifndef STOFF_TEXT_LISTENER_H
35 #define STOFF_TEXT_LISTENER_H
39 #include <librevenge/librevenge.h>
49 namespace STOFFTextListenerInternal
105 bool openLayer(librevenge::RVNGString
const &name);
125 bool openHeader(librevenge::RVNGPropertyList
const &extras);
127 bool openFooter(librevenge::RVNGPropertyList
const &extras);
217 void openTableRow(
float h, librevenge::RVNGUnit unit,
bool headerRow=
false);
298 shared_ptr<STOFFTextListenerInternal::TextState>
m_ds;
300 shared_ptr<STOFFTextListenerInternal::State>
m_ps;
302 std::vector<shared_ptr<STOFFTextListenerInternal::State> >
m_psStack;
STOFFPageSpan const & getPageSpan()
returns the current page span
Definition: STOFFTextListener.cxx:532
void _closePageSpan()
does close a page (low level)
Definition: STOFFTextListener.cxx:588
void _closeSection()
does close a section (low level)
Definition: STOFFTextListener.cxx:745
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level. ...
Definition: STOFFTextListener.cxx:882
bool openHeader(librevenge::RVNGPropertyList const &extras)
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader) ...
Definition: STOFFTextListener.cxx:608
bool isDocumentStarted() const
returns true if a document is opened
Definition: STOFFTextListener.cxx:478
void setFont(STOFFFont const &font)
sets the font
Definition: STOFFTextListener.cxx:388
void closeFrame()
close a frame
Definition: STOFFTextListener.cxx:1284
void _openSpan()
low level: the function which opens a new span property
Definition: STOFFTextListener.cxx:958
void _closeParagraph()
Definition: STOFFTextListener.cxx:791
void insertChar(uint8_t character)
adds a basic character, ..
Definition: STOFFTextListener.cxx:258
STOFFFont const & getFont() const
returns the actual font
Definition: STOFFTextListener.cxx:396
bool isSectionOpened() const
returns true if a section is opened
Definition: STOFFTextListener.cxx:681
bool isFontStyleDefined(librevenge::RVNGString const &name) const
check if a font style with a display name is already defined
Definition: STOFFTextListener.cxx:240
void closeGroup()
close a group
Definition: STOFFTextListener.cxx:1344
void closeTableCell()
close a cell
Definition: STOFFTextListener.cxx:1581
a structure used to define a cell and its format
Definition: STOFFCell.hxx:53
bool isGraphicStyleDefined(librevenge::RVNGString const &name) const
check if a graphic style with a display name is already defined
Definition: STOFFTextListener.cxx:245
bool canWriteText() const
returns true if a text zone is opened
Definition: STOFFTextListener.hxx:84
void insertTextBox(STOFFPosition const &pos, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle())
adds a textbox in given position
Definition: STOFFTextListener.cxx:1119
void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType)
function called to add a subdocument and modify the origin
Definition: STOFFTextListener.cxx:1367
Type
the listener type
Definition: STOFFListener.hxx:57
bool canOpenSectionAddBreak() const
returns true if we can add open a section, add page break, ...
Definition: STOFFTextListener.cxx:691
void _changeList()
update the list so that it corresponds to the actual level
Definition: STOFFTextListener.cxx:899
void insertField(STOFFField const &field)
adds a field type
Definition: STOFFTextListener.cxx:425
void defineStyle(STOFFFont const &style)
defines a font styles
Definition: STOFFTextListener.cxx:219
void insertUnicodeString(librevenge::RVNGString const &str)
adds a unicode string
Definition: STOFFTextListener.cxx:286
void openTable(STOFFTable const &table)
open a table (using the last parameters of openFrame for the position )
Definition: STOFFTextListener.cxx:1476
void insertUnicode(uint32_t character)
insert a character using the font converter to find the utf8 character
Definition: STOFFTextListener.cxx:269
a link
Definition: libstaroffice_internal.hxx:365
void insertBreak(BreakType breakType)
inserts a break type: ColumBreak, PageBreak, ..
Definition: STOFFTextListener.cxx:319
bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const
returns try if a subdocument is open
Definition: STOFFTextListener.cxx:1448
void insertPicture(STOFFPosition const &pos, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle())
adds a picture with potential various representationin given position
Definition: STOFFTextListener.cxx:1202
void _flushDeferredTabs()
low level: flush the deferred tabs
Definition: STOFFTextListener.cxx:996
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
bool closeHeader()
close a header
Definition: STOFFTextListener.cxx:632
void _closeSpan()
low level: the function which closes the last opened span property
Definition: STOFFTextListener.cxx:982
void openTableCell(STOFFCell const &cell)
open a cell
Definition: STOFFTextListener.cxx:1564
STOFFTextListener(STOFFListManagerPtr listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
constructor
Definition: STOFFTextListener.cxx:209
a note
Definition: libstaroffice_internal.hxx:379
shared_ptr< STOFFTextListenerInternal::State > m_ps
the actual local parse state
Definition: STOFFTextListener.hxx:300
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
virtual ~STOFFTextListener()
destructor
Definition: STOFFTextListener.cxx:215
bool openMasterPage(STOFFPageSpan &)
opens a master page
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFPosition const &pos, STOFFGraphicStyle const &style)
adds in propList the frame parameters.
Definition: STOFFTextListener.cxx:1356
bool openFooter(librevenge::RVNGPropertyList const &extras)
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter) ...
Definition: STOFFTextListener.cxx:643
Definition: STOFFListener.hxx:57
shared_ptr< STOFFListManager > STOFFListManagerPtr
a smart pointer of STOFFListManager
Definition: libstaroffice_internal.hxx:478
void _popParsingState()
resets the previous parsing state
Definition: STOFFTextListener.cxx:1612
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: STOFFTextListener.cxx:540
void closeTableRow()
closes this row
Definition: STOFFTextListener.cxx:1535
void _flushText()
low level: flush the deferred text
Definition: STOFFTextListener.cxx:1004
void insertShape(STOFFGraphicShape const &shape, STOFFGraphicStyle const &style, STOFFPosition const &pos)
adds a shape picture in given position
Definition: STOFFTextListener.cxx:1133
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: STOFFTextListener.hxx:304
SubDocumentType
Definition: libstaroffice_internal.hxx:175
bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which)
insert a footer
Definition: STOFFTextListener.cxx:655
shared_ptr< STOFFSubDocument > STOFFSubDocumentPtr
a smart pointer of STOFFSubDocument
Definition: libstaroffice_internal.hxx:484
a class which stores section properties
Definition: STOFFSection.hxx:45
STOFFParagraph const & getParagraph() const
returns the actual paragraph
Definition: STOFFTextListener.cxx:417
void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="")
adds comment
Definition: STOFFTextListener.cxx:1092
void closeLayer()
close a layer
a field
Definition: libstaroffice_internal.hxx:353
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
bool closeFooter()
close a footer
Definition: STOFFTextListener.cxx:667
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:398
void _closeListElement()
close a list level
Definition: STOFFTextListener.cxx:866
STOFFSection const & getSection() const
returns the actual section
Definition: STOFFTextListener.cxx:686
void endDocument(bool sendDelayedSubDoc=true)
ends the actual document
Definition: STOFFTextListener.cxx:496
bool openFrame(STOFFPosition const &pos, STOFFGraphicStyle const &style=STOFFGraphicStyle())
store the position and the style (which will be needed further to insert a textbox or a table with op...
Definition: STOFFTextListener.cxx:1215
void _openSection()
does open a section (low level)
Definition: STOFFTextListener.cxx:727
Type getType() const
returns the listener type
Definition: STOFFTextListener.hxx:68
This class contains the code needed to create Text document.
Definition: STOFFTextListener.hxx:59
void _openListElement()
open a list level
Definition: STOFFTextListener.cxx:836
STOFFVec2< int > STOFFVec2i
STOFFVec2 of int.
Definition: libstaroffice_internal.hxx:748
bool isHeaderFooterOpened() const
returns true if the header/footer is open
Definition: STOFFTextListener.cxx:603
void startDocument()
starts a new document
Definition: STOFFTextListener.cxx:483
bool openSection(STOFFSection const §ion)
open a section if possible
Definition: STOFFTextListener.cxx:696
STOFFTextListener & operator=(const STOFFTextListener &)
void closeMasterPage()
close a master page
Definition: STOFFTextListener.hxx:113
Class to store font.
Definition: STOFFFont.hxx:43
void closeTable()
closes this table
Definition: STOFFTextListener.cxx:1500
shared_ptr< STOFFTextListenerInternal::TextState > m_ds
the actual global state
Definition: STOFFTextListener.hxx:298
void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList)
Definition: STOFFTextListener.cxx:367
void setDocumentMetaData(const librevenge::RVNGPropertyList &list)
sets the document meta data
Definition: STOFFTextListener.cxx:465
void _resetParagraphState(const bool isListElement=false)
Definition: STOFFTextListener.cxx:815
bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which)
insert a header
Definition: STOFFTextListener.cxx:620
void insertTable(STOFFPosition const &pos, STOFFTable &table, STOFFGraphicStyle const &style=STOFFGraphicStyle())
adds a table in given position
bool isPageSpanOpened() const
returns true if a page is opened
Definition: STOFFTextListener.cxx:527
void insertTab()
adds a tab
Definition: STOFFTextListener.cxx:308
void openLink(STOFFLink const &link)
open a link
Definition: STOFFTextListener.cxx:435
void insertEOL(bool softBreak=false)
adds an end of line ( by default an hard one)
Definition: STOFFTextListener.cxx:293
std::vector< shared_ptr< STOFFTextListenerInternal::State > > m_psStack
stack of local state
Definition: STOFFTextListener.hxx:302
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
bool closeSection()
close a section
Definition: STOFFTextListener.cxx:712
void insertNote(STOFFNote const ¬e, STOFFSubDocumentPtr &subDocument)
insert a note
Definition: STOFFTextListener.cxx:1035
BreakType
the different break type
Definition: STOFFListener.hxx:59
bool openGroup(STOFFPosition const &pos)
open a group
Definition: STOFFTextListener.cxx:1294
bool isParagraphOpened() const
returns true if a paragraph or a list is opened
Definition: STOFFTextListener.cxx:401
void _startSubDocument()
Definition: STOFFTextListener.cxx:1456
bool openLayer(librevenge::RVNGString const &name)
open a layer
void _openParagraph()
Definition: STOFFTextListener.cxx:765
bool isParagraphStyleDefined(librevenge::RVNGString const &name) const
check if a paragraph style with a display name is already defined
Definition: STOFFTextListener.cxx:250
void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1))
add empty cell
Definition: STOFFTextListener.cxx:1545
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
shared_ptr< STOFFTextListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: STOFFTextListener.cxx:1601
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: STOFFPosition.hxx:47
void closeLink()
close a link
Definition: STOFFTextListener.cxx:451
void setParagraph(STOFFParagraph const ¶graph)
sets the paragraph
Definition: STOFFTextListener.cxx:406
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: STOFFTextListener.cxx:1514
void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false)
Definition: STOFFTextListener.cxx:823
void _endSubDocument()
Definition: STOFFTextListener.cxx:1462
void setDocumentLanguage(std::string locale)
sets the documents language
Definition: STOFFTextListener.cxx:472