Go to the documentation of this file.
34 #ifndef STOFF_GRAPHIC_LISTENER_H
35 #define STOFF_GRAPHIC_LISTENER_H
39 #include <librevenge/librevenge.h>
82 void endDocument(
bool sendDelayedSubDoc=true) final;
152 void insertEOL(
bool softBreak=false) final;
301 std::shared_ptr<STOFFGraphicListenerInternal::GraphicState>
m_ds;
303 std::shared_ptr<STOFFGraphicListenerInternal::State>
m_ps;
305 std::vector<std::shared_ptr<STOFFGraphicListenerInternal::State> >
m_psStack;
void _closeParagraph()
Definition: STOFFGraphicListener.cxx:695
Definition: STOFFPosition.hxx:51
bool m_isGroupOpened
a flag to know if openGroup was called
Definition: STOFFGraphicListener.cxx:155
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFGraphicStyle.hxx:66
bool m_isMasterPageSpanOpened
true if a masterpage is open
Definition: STOFFGraphicListener.cxx:99
std::vector< int > m_sentListMarkers
the list of marker corresponding to sent list
Definition: STOFFGraphicListener.cxx:108
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
void defineStyle(STOFFFont const &style) final
defines a font styles
Definition: STOFFGraphicListener.cxx:238
bool isFontStyleDefined(librevenge::RVNGString const &name) const final
check if a font style with a display name is already defined
Definition: STOFFGraphicListener.cxx:273
void openLink(STOFFLink const &link) final
open a link
Definition: STOFFGraphicListener.cxx:430
STOFFGraphicListener & operator=(const STOFFGraphicListener &)
int m_currentPageNumber
Definition: STOFFGraphicListener.cxx:171
a field
Definition: libstaroffice_internal.hxx:363
void _closeSpan()
Definition: STOFFGraphicListener.cxx:894
void _closeListElement()
close a list level
Definition: STOFFGraphicListener.cxx:758
GraphicState(std::vector< STOFFPageSpan > const &pageList)
constructor
Definition: STOFFGraphicListener.cxx:68
void _openSpan()
Definition: STOFFGraphicListener.cxx:863
Definition: STOFFGraphicShape.hxx:49
bool m_isHeaderFooterOpened
a flag to know if the header footer is started
Definition: STOFFGraphicListener.cxx:103
Definition: STOFFGraphicShape.hxx:49
libstoff::SubDocumentType m_subDocumentType
Definition: STOFFGraphicListener.cxx:176
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
bool m_isTableOpened
a stack used to know what is open
Definition: STOFFGraphicListener.cxx:164
unsigned m_currentPage
Definition: STOFFGraphicListener.cxx:169
Command m_command
the command
Definition: STOFFGraphicShape.hxx:65
void _endSubDocument()
Definition: STOFFGraphicListener.cxx:1714
bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final
returns try if a subdocument is open
Definition: STOFFGraphicListener.cxx:1700
const STOFFParagraph & getParagraph() const final
returns the actual paragraph
Definition: STOFFGraphicListener.cxx:406
STOFFFrameStyle m_framePosition
the frame position
Definition: STOFFGraphicListener.cxx:148
bool m_isTableRowOpened
Definition: STOFFGraphicListener.cxx:165
bool isParagraphOpened() const final
returns true if a paragraph or a list is opened
Definition: STOFFGraphicListener.cxx:386
Definition: STOFFGraphicShape.hxx:49
void closeFrame() final
close a frame
Definition: STOFFGraphicListener.cxx:1539
STOFFListManagerPtr m_listManager
the list manager
Definition: STOFFListener.hxx:250
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
Type
the listener type
Definition: STOFFListener.hxx:57
std::vector< STOFFPageSpan > m_pageList
the pages definition
Definition: STOFFGraphicListener.cxx:91
BreakType
the different break type
Definition: STOFFListener.hxx:59
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
STOFFVec2f m_origin
the origin position
Definition: STOFFGraphicListener.cxx:134
bool isInTextZone() const
returns true if we are in a text zone, ie. either in a textbox or a table cell
Definition: STOFFGraphicListener.cxx:129
void closeMasterPage()
close a master page
Definition: STOFFGraphicListener.hxx:111
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
bool canWriteText() const final
returns true if a text zone is opened
Definition: STOFFGraphicListener.cxx:530
This class contains the code needed to create Graphic document.
Definition: STOFFGraphicListener.hxx:59
void closeTableRow() final
closes this row
Definition: STOFFGraphicListener.cxx:1419
bool canOpenSectionAddBreak() const final
returns true if we can add open a section, add page break, ...
Definition: STOFFGraphicListener.hxx:236
int m_numPagesRemainingInSpan
Definition: STOFFGraphicListener.cxx:170
bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a header
Definition: STOFFGraphicListener.cxx:990
void closeTableCell() final
close a cell
Definition: STOFFGraphicListener.cxx:1496
~State()
destructor
Definition: STOFFGraphicListener.cxx:126
bool m_isFrameOpened
a flag to know if openFrame was called
Definition: STOFFGraphicListener.cxx:146
bool openMasterPage(STOFFPageSpan &masterPage)
opens a master page
Definition: STOFFGraphicListener.cxx:550
void closeLayer()
close a layer
Definition: STOFFGraphicListener.cxx:1619
bool closeSection() final
close a section
Definition: STOFFGraphicListener.hxx:250
bool m_isPageSpanOpened
true if a page is open
Definition: STOFFGraphicListener.cxx:97
void insertChar(uint8_t character) final
adds a basic character, ..
Definition: STOFFGraphicListener.cxx:291
void setDocumentLanguage(std::string locale) final
sets the documents language
Definition: STOFFGraphicListener.cxx:512
void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a equation given a position
Definition: STOFFGraphicListener.cxx:1178
bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a footer
Definition: STOFFGraphicListener.cxx:1044
std::vector< std::shared_ptr< STOFFGraphicListenerInternal::State > > m_psStack
stack of local state
Definition: STOFFGraphicListener.hxx:305
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: STOFFGraphicShape.hxx:49
void insertUnicode(uint32_t character) final
insert a character using the font converter to find the utf8 character
Definition: STOFFGraphicListener.cxx:305
bool m_inNote
Definition: STOFFGraphicListener.cxx:174
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
std::shared_ptr< STOFFGraphicListenerInternal::State > m_ps
the actual local parse state
Definition: STOFFGraphicListener.hxx:303
Definition: libstaroffice_internal.hxx:185
a note
Definition: libstaroffice_internal.hxx:389
static void checkForDefault(librevenge::RVNGPropertyList &propList)
check if the line style is set and the fill style is set.
Definition: STOFFGraphicStyle.cxx:93
~GraphicState()
destructor
Definition: STOFFGraphicListener.cxx:87
static void checkForPadding(librevenge::RVNGPropertyList &propList)
check if the padding margins are set, if not set them to 0
Definition: STOFFGraphicStyle.cxx:80
void setFont(STOFFFont const &font) final
sets the font
Definition: STOFFGraphicListener.cxx:370
bool m_inLink
Definition: STOFFGraphicListener.cxx:173
the state of a STOFFGraphicListener
Definition: STOFFGraphicListener.cxx:122
bool openSection(STOFFSection const §ion) final
open a section if possible
Definition: STOFFGraphicListener.cxx:1078
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
void sendHeaderFooters(STOFFListener *listener) const
send the page's headers/footers if some exists
Definition: STOFFPageSpan.cxx:94
void _popParsingState()
resets the previous parsing state
Definition: STOFFGraphicListener.cxx:1740
const STOFFFont & getFont() const final
returns the actual font
Definition: STOFFGraphicListener.cxx:381
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: STOFFGraphicListener.cxx:1517
const STOFFSection & getSection() const final
returns the actual section
Definition: STOFFGraphicListener.cxx:1072
void closeGroup() final
close a group
Definition: STOFFGraphicListener.cxx:1575
bool isSectionOpened() const final
returns true if a section is opened
Definition: STOFFGraphicListener.hxx:241
Definition: libstaroffice_internal.hxx:185
bool m_isTableColumnOpened
Definition: STOFFGraphicListener.cxx:166
STOFFGraphicListener(STOFFListManagerPtr listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGDrawingInterface *drawingInterface)
constructor with a drawing interface
Definition: STOFFGraphicListener.cxx:214
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: STOFFGraphicListener.cxx:574
std::shared_ptr< STOFFGraphicListenerInternal::GraphicState > m_ds
the actual global state
Definition: STOFFGraphicListener.hxx:301
State()
constructor
Definition: STOFFGraphicListener.cxx:183
void closeTable() final
closes this table
Definition: STOFFGraphicListener.cxx:1378
void insertBreak(BreakType breakType) final
inserts a break type: ColumBreak, PageBreak, ..
Definition: STOFFGraphicListener.cxx:1084
bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final
check if a graphic style with a display name is already defined
Definition: STOFFGraphicListener.cxx:278
void _flushText()
Definition: STOFFGraphicListener.cxx:916
Definition: STOFFListener.hxx:59
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level.
Definition: STOFFGraphicListener.cxx:774
std::shared_ptr< STOFFSubDocument > STOFFSubDocumentPtr
a smart pointer of STOFFSubDocument
Definition: libstaroffice_internal.hxx:495
STOFFFont m_font
the font
Definition: STOFFGraphicListener.cxx:139
bool m_isParagraphOpened
Definition: STOFFGraphicListener.cxx:159
Definition: libstaroffice_internal.hxx:185
Definition: libstaroffice_internal.hxx:185
void addCoveredTableCell(STOFFVec2i const &pos) final
add covered cell
Definition: STOFFGraphicListener.cxx:1432
bool openGroup(STOFFFrameStyle const &frame) final
open a group
Definition: STOFFGraphicListener.cxx:1548
STOFFSection m_section
am empty section
Definition: STOFFGraphicListener.cxx:118
SubDocumentType
Definition: libstaroffice_internal.hxx:185
Internal and low level namespace to define the states of STOFFGraphicListener.
Definition: STOFFGraphicListener.cxx:63
Definition: STOFFGraphicShape.hxx:49
bool closeHeader() final
close a header
Definition: STOFFGraphicListener.cxx:1000
std::vector< bool > m_listOrderedLevels
Definition: STOFFGraphicListener.cxx:162
bool m_isLayerOpened
a flag to know if openLayer was called
Definition: STOFFGraphicListener.cxx:157
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame, STOFFGraphicStyle const &style)
adds in propList the frame parameters.
Definition: STOFFGraphicListener.cxx:1633
bool isHeaderFooterOpened() const final
returns true if the header/footer is open
Definition: STOFFGraphicListener.cxx:956
bool openLayer(librevenge::RVNGString const &name)
open a layer
Definition: STOFFGraphicListener.cxx:1589
void endDocument(bool sendDelayedSubDoc=true) final
ends the actual document
Definition: STOFFGraphicListener.cxx:489
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFGraphicStyle.cxx:65
Definition: libstaroffice_internal.hxx:185
int m_pageSpan
the number of page
Definition: STOFFPageSpan.hxx:104
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
~STOFFGraphicListener() final
destructor
Definition: STOFFGraphicListener.cxx:234
std::set< librevenge::RVNGString > m_definedGraphicStyleSet
the set of defined graphic style
Definition: STOFFGraphicListener.cxx:114
bool openHeader(librevenge::RVNGPropertyList const &extras) final
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
Definition: STOFFGraphicListener.cxx:961
void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final
adds a shape picture in given position
Definition: STOFFGraphicListener.cxx:1212
the global graphic state of STOFFGraphicListener
Definition: STOFFGraphicListener.cxx:66
bool m_inSubDocument
Definition: STOFFGraphicListener.cxx:175
Definition: libstaroffice_internal.hxx:143
bool isPageSpanOpened() const final
returns true if a page is opened
Definition: STOFFGraphicListener.cxx:538
bool m_isSpanOpened
Definition: STOFFGraphicListener.cxx:158
STOFFPosition m_position
the position
Definition: STOFFFrameStyle.hxx:73
void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a picture with potential various representationin given position
Definition: STOFFGraphicListener.cxx:1150
void _openParagraph()
Definition: STOFFGraphicListener.cxx:672
std::set< librevenge::RVNGString > m_definedParagraphStyleSet
the set of defined paragraph style
Definition: STOFFGraphicListener.cxx:116
Class to store font.
Definition: STOFFFont.hxx:43
std::set< librevenge::RVNGString > m_definedFontStyleSet
the set of defined font style
Definition: STOFFGraphicListener.cxx:112
bool closeFooter() final
close a footer
Definition: STOFFGraphicListener.cxx:1054
void insertTab() final
adds a tab
Definition: STOFFGraphicListener.cxx:353
bool isDocumentStarted() const final
returns true if a document is opened
Definition: STOFFGraphicListener.cxx:525
void addTo(librevenge::RVNGPropertyList &propList) const
adds to the propList
Definition: STOFFCell.cxx:246
bool m_isHeaderFooterRegionOpened
a flag to know if the header footer region is started
Definition: STOFFGraphicListener.cxx:104
void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final
sets the document meta data
Definition: STOFFGraphicListener.cxx:518
void addTablePropertiesTo(librevenge::RVNGPropertyList &propList) const
adds the table properties to propList
Definition: STOFFTable.cxx:68
STOFFVec2< float > STOFFVec2f
STOFFVec2 of float.
Definition: libstaroffice_internal.hxx:767
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
void setParagraph(STOFFParagraph const ¶graph) final
sets the paragraph
Definition: STOFFGraphicListener.cxx:391
void closeLink() final
close a link
Definition: STOFFGraphicListener.cxx:455
bool m_isTableCellOpened
Definition: STOFFGraphicListener.cxx:167
Definition: STOFFGraphicShape.hxx:49
Definition: STOFFGraphicShape.hxx:49
bool m_isListElementOpened
Definition: STOFFGraphicListener.cxx:160
librevenge::RVNGDrawingInterface * m_drawingInterface
the drawing interface
Definition: STOFFGraphicListener.hxx:307
Definition: STOFFPosition.hxx:51
bool m_isDocumentStarted
a flag to know if the document is open
Definition: STOFFGraphicListener.cxx:95
void openTableCell(STOFFCell const &cell) final
open a cell
Definition: STOFFGraphicListener.cxx:1476
void openTable(STOFFTable const &table) final
open a table (using the last parameters of openFrame for the position )
Definition: STOFFGraphicListener.cxx:1331
void _startSubDocument()
Definition: STOFFGraphicListener.cxx:1708
std::shared_ptr< STOFFGraphicListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: STOFFGraphicListener.cxx:1732
bool openFooter(librevenge::RVNGPropertyList const &extras) final
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
Definition: STOFFGraphicListener.cxx:1015
a class which stores section properties
Definition: STOFFSection.hxx:45
void insertUnicodeString(librevenge::RVNGString const &str) final
adds a unicode string
Definition: STOFFGraphicListener.cxx:324
void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final
adds comment
Definition: STOFFGraphicListener.cxx:1111
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: STOFFGraphicListener.cxx:1395
std::shared_ptr< STOFFListManager > STOFFListManagerPtr
a smart pointer of STOFFListManager
Definition: libstaroffice_internal.hxx:489
Definition: STOFFListener.hxx:59
Definition: STOFFPosition.hxx:51
bool m_isAtLeastOnePageOpened
true if the first page has been open
Definition: STOFFGraphicListener.cxx:101
void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) final
add empty cell
Definition: STOFFGraphicListener.cxx:1451
void startDocument() final
starts a new document
Definition: STOFFGraphicListener.cxx:472
AnchorTo m_anchorTo
anchor position
Definition: STOFFPosition.hxx:145
void getPageProperty(librevenge::RVNGPropertyList &pList) const
add the page properties in pList
Definition: STOFFPageSpan.cxx:120
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if needed )
Definition: libstaroffice_internal.cxx:247
void _closePageSpan(bool masterPage=false)
does close a page (low level)
Definition: STOFFGraphicListener.cxx:625
void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final
function called to add a subdocument and modify the origin
Definition: STOFFGraphicListener.cxx:1646
void insertField(STOFFField const &field) final
adds a field type
Definition: STOFFGraphicListener.cxx:414
void _resetParagraphState(const bool isListElement=false)
Definition: STOFFGraphicListener.cxx:720
void addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition: libstaroffice_internal.cxx:234
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFFrameStyle.cxx:79
void _changeList()
update the list so that it corresponds to the actual level
Definition: STOFFGraphicListener.cxx:790
STOFFParagraph m_paragraph
the paragraph
Definition: STOFFGraphicListener.cxx:141
bool m_isTextBoxOpened
a flag to know if we are in a textbox
Definition: STOFFGraphicListener.cxx:153
Definition: STOFFListener.hxx:57
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
Definition: STOFFListener.hxx:59
void insertNote(STOFFNote const ¬e, STOFFSubDocumentPtr &subDocument) final
insert a note
Definition: STOFFGraphicListener.cxx:1129
Definition: STOFFDocument.hxx:42
librevenge::RVNGPropertyList m_propertyList
the properties
Definition: STOFFParagraph.hxx:73
State & operator=(const State &)
librevenge::RVNGString m_textBuffer
a buffer to stored the text
Definition: STOFFGraphicListener.cxx:136
std::shared_ptr< STOFFList > m_list
the list of list
Definition: STOFFGraphicListener.cxx:143
void insertTextBox(STOFFFrameStyle const &frame, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a textbox in given position
Definition: STOFFGraphicListener.cxx:1298
STOFFGraphicStyle m_frameStyle
the frame style
Definition: STOFFGraphicListener.cxx:150
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libstaroffice_internal.cxx:50
librevenge::RVNGPropertyList m_metaData
the document meta data
Definition: STOFFGraphicListener.cxx:93
a link
Definition: libstaroffice_internal.hxx:375
Type getType() const final
returns the listener type
Definition: STOFFGraphicListener.hxx:70
void setOrigin(STOFFVec2f const &origin)
utility function to set a origin in point
Definition: STOFFPosition.hxx:101
void addTo(librevenge::RVNGPropertyList &list) const
add shape to property list
Definition: STOFFGraphicShape.cxx:60
void _openListElement()
open a list level
Definition: STOFFGraphicListener.cxx:729
Definition: libstaroffice_internal.hxx:185
std::vector< STOFFSubDocumentPtr > m_subDocuments
the list of actual subdocument
Definition: STOFFGraphicListener.cxx:110
bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final
check if a paragraph style with a display name is already defined
Definition: STOFFGraphicListener.cxx:283
an noop deleter used to transform a libwpd pointer in a false std::shared_ptr
Definition: libstaroffice_internal.hxx:100
Definition: STOFFPosition.hxx:51
const STOFFPageSpan & getPageSpan() final
returns the current page span
Definition: STOFFGraphicListener.cxx:543
STOFFPageSpan m_pageSpan
! the current page span
Definition: STOFFGraphicListener.cxx:106
void insertEOL(bool softBreak=false) final
adds an end of line ( by default an hard one)
Definition: STOFFGraphicListener.cxx:334
librevenge::RVNGPresentationInterface * m_presentationInterface
the presentation interface
Definition: STOFFGraphicListener.hxx:309
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