This class contains the code needed to create Graphic document. More...
#include <STOFFGraphicListener.hxx>
Public Member Functions | |
| STOFFGraphicListener (STOFFParserState &parserState, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGDrawingInterface *documentInterface) | |
| constructor More... | |
| virtual | ~STOFFGraphicListener () |
| destructor More... | |
| Type | getType () const |
| returns the listener type More... | |
| void | setDocumentLanguage (std::string locale) |
| sets the documents language More... | |
| void | setDocumentMetaData (const librevenge::RVNGPropertyList &list) |
| sets the document meta data More... | |
| void | startDocument () |
| starts a new document More... | |
| void | endDocument (bool sendDelayedSubDoc=true) |
| ends the actual document More... | |
| bool | canWriteText () const |
| returns true if a text zone is opened More... | |
| bool | isDocumentStarted () const |
| returns true if a document is opened More... | |
| void | handleSubDocument (STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) |
| function called to add a subdocument and modify the origin More... | |
| bool | isSubDocumentOpened (libstoff::SubDocumentType &subdocType) const |
| returns try if a subdocument is open More... | |
| 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 openTable) More... | |
| void | closeFrame () |
| close a frame More... | |
| bool | openGroup () |
| open a group More... | |
| void | closeGroup () |
| close a group More... | |
| bool | openLayer (librevenge::RVNGString const &name) |
| open a layer More... | |
| void | closeLayer () |
| close a layer More... | |
| bool | openMasterPage (STOFFPageSpan &masterPage) |
| opens a master page More... | |
| void | closeMasterPage () |
| close a master page More... | |
| bool | isPageSpanOpened () const |
| returns true if a page is opened More... | |
| STOFFPageSpan const & | getPageSpan () |
| returns the current page span More... | |
| bool | openHeader (librevenge::RVNGPropertyList const &extras) |
| open a header (interaction with STOFFPageSpan which fills the parameters for openHeader) More... | |
| bool | openFooter (librevenge::RVNGPropertyList const &extras) |
| open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter) More... | |
| bool | closeHeader () |
| close a header More... | |
| bool | closeFooter () |
| close a footer More... | |
| bool | insertHeaderRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) |
| insert a header More... | |
| bool | insertFooterRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) |
| insert a footer More... | |
| bool | isHeaderFooterOpened () const |
| returns true if the header/footer is open More... | |
| void | insertChar (uint8_t character) |
| adds a basic character, .. More... | |
| void | insertUnicode (uint32_t character) |
| insert a character using the font converter to find the utf8 character More... | |
| void | insertUnicodeString (librevenge::RVNGString const &str) |
| adds a unicode string More... | |
| void | insertTab () |
| adds a tab More... | |
| void | insertEOL (bool softBreak=false) |
| adds an end of line ( by default an hard one) More... | |
| void | setFont (STOFFFont const &font) |
| sets the font More... | |
| STOFFFont const & | getFont () const |
| returns the actual font More... | |
| bool | isParagraphOpened () const |
| returns true if a paragraph or a list is opened More... | |
| void | setParagraph (STOFFParagraph const ¶graph) |
| sets the paragraph More... | |
| STOFFParagraph const & | getParagraph () const |
| returns the actual paragraph More... | |
| void | defineStyle (STOFFGraphicStyle const &style) |
| defines a graphic styles, returns the style id More... | |
| bool | isGraphicStyleDefined (librevenge::RVNGString const &name) const |
| check if a graphic style with a display name is already defined More... | |
| void | insertField (STOFFField const &field) |
| adds a field type More... | |
| void | openLink (STOFFLink const &link) |
| open a link More... | |
| void | closeLink () |
| close a link More... | |
| void | insertShape (STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) |
| adds a shape picture in given position More... | |
| void | insertTextBox (STOFFPosition const &pos, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) |
| adds a textbox in given position More... | |
| void | insertPicture (STOFFPosition const &pos, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) |
| adds a picture with potential various representationin given position More... | |
| void | insertNote (STOFFNote const ¬e, STOFFSubDocumentPtr &subDocument) |
| insert a note More... | |
| void | insertComment (STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") |
| adds comment More... | |
| void | insertTable (STOFFPosition const &pos, STOFFTable &table, STOFFGraphicStyle const &style=STOFFGraphicStyle()) |
| adds a table in given position More... | |
| void | openTable (STOFFTable const &table) |
| open a table (using the last parameters of openFrame for the position ) More... | |
| void | openTable (STOFFPosition const &pos, STOFFTable const &table) |
| open a table in a given position More... | |
| void | closeTable () |
| closes this table More... | |
| 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 ) More... | |
| void | closeTableRow () |
| closes this row More... | |
| void | openTableCell (STOFFCell const &cell) |
| open a cell More... | |
| void | closeTableCell () |
| close a cell More... | |
| void | addEmptyTableCell (STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) |
| add empty cell More... | |
| bool | canOpenSectionAddBreak () const |
| returns true if we can add open a section, add page break, ... More... | |
| bool | isSectionOpened () const |
| returns true if a section is opened More... | |
| STOFFSection const & | getSection () const |
| returns the actual section More... | |
| bool | openSection (STOFFSection const §ion) |
| open a section if possible More... | |
| bool | closeSection () |
| close a section More... | |
| void | insertBreak (BreakType breakType) |
| inserts a break type: ColumBreak, PageBreak, .. More... | |
Public Member Functions inherited from STOFFListener | |
| virtual | ~STOFFListener () |
| destructor More... | |
| virtual void | insertUnicodeList (std::vector< uint32_t > const &list) |
| try to insert a list of unicode character More... | |
Protected Member Functions | |
| void | _openPageSpan (bool sendHeaderFooters=true) |
| does open a new page (low level) More... | |
| void | _closePageSpan (bool masterPage=false) |
| does close a page (low level) More... | |
| void | _startSubDocument () |
| void | _endSubDocument () |
| void | _handleFrameParameters (librevenge::RVNGPropertyList &propList, STOFFPosition const &pos, STOFFGraphicStyle const &style) |
| adds in propList the frame parameters. More... | |
| void | _openParagraph () |
| void | _closeParagraph () |
| void | _resetParagraphState (const bool isListElement=false) |
| void | _openListElement () |
| open a list level More... | |
| void | _closeListElement () |
| close a list level More... | |
| void | _changeList () |
| update the list so that it corresponds to the actual level More... | |
| int | _getListId () const |
| low level: find a list id which corresponds to actual list and a change of level. More... | |
| void | _openSpan () |
| void | _closeSpan () |
| void | _flushText () |
| shared_ptr< STOFFGraphicListenerInternal::State > | _pushParsingState () |
| creates a new parsing state (copy of the actual state) More... | |
| void | _popParsingState () |
| resets the previous parsing state More... | |
Protected Attributes | |
| shared_ptr< STOFFGraphicListenerInternal::GraphicState > | m_ds |
| the actual global state More... | |
| shared_ptr< STOFFGraphicListenerInternal::State > | m_ps |
| the actual local parse state More... | |
| std::vector< shared_ptr< STOFFGraphicListenerInternal::State > > | m_psStack |
| stack of local state More... | |
| STOFFParserState & | m_parserState |
| the parser state More... | |
| librevenge::RVNGDrawingInterface * | m_documentInterface |
| the document interface More... | |
Private Member Functions | |
| STOFFGraphicListener (const STOFFGraphicListener &) | |
| STOFFGraphicListener & | operator= (const STOFFGraphicListener &) |
Additional Inherited Members | |
Public Types inherited from STOFFListener | |
| enum | Type { Graphic, Presentation, Spreadsheet, Text } |
| the listener type More... | |
| enum | BreakType { PageBreak =0, SoftPageBreak, ColumnBreak } |
| the different break type More... | |
This class contains the code needed to create Graphic document.
| STOFFGraphicListener::STOFFGraphicListener | ( | STOFFParserState & | parserState, |
| std::vector< STOFFPageSpan > const & | pageList, | ||
| librevenge::RVNGDrawingInterface * | documentInterface | ||
| ) |
constructor
|
virtual |
destructor
|
private |
|
protected |
update the list so that it corresponds to the actual level
Referenced by _closePageSpan(), _endSubDocument(), _openSpan(), and closeTableCell().
|
protected |
close a list level
Referenced by _closeParagraph().
|
protected |
does close a page (low level)
Referenced by endDocument(), insertBreak(), and openMasterPage().
|
protected |
Referenced by _changeList(), _closePageSpan(), _endSubDocument(), closeTableCell(), insertEOL(), and openTable().
|
protected |
Referenced by _closeListElement(), _closeParagraph(), and setFont().
|
protected |
Referenced by _closePageSpan(), closeGroup(), closeLayer(), closeTable(), handleSubDocument(), and insertTable().
|
protected |
Referenced by _closeSpan(), insertEOL(), insertField(), insertShape(), and insertTab().
|
protected |
low level: find a list id which corresponds to actual list and a change of level.
Referenced by _changeList().
|
protected |
adds in propList the frame parameters.
Referenced by insertPicture(), insertTextBox(), openFooter(), openHeader(), and openTable().
|
protected |
open a list level
Referenced by _openSpan().
|
protected |
does open a new page (low level)
Referenced by endDocument(), getPageSpan(), handleSubDocument(), insertBreak(), insertPicture(), insertShape(), insertTextBox(), openFrame(), openGroup(), and openLayer().
|
protected |
Referenced by _openSpan(), insertComment(), insertNote(), and insertShape().
|
protected |
Referenced by insertChar(), insertEOL(), insertField(), insertShape(), insertTab(), insertUnicode(), insertUnicodeString(), and openLink().
|
protected |
resets the previous parsing state
Referenced by _closePageSpan(), closeGroup(), closeLayer(), closeLink(), closeTable(), handleSubDocument(), and insertTable().
|
protected |
creates a new parsing state (copy of the actual state)
Referenced by handleSubDocument(), insertTable(), openGroup(), openLayer(), openLink(), and openTable().
|
protected |
Referenced by _openListElement(), and _openParagraph().
|
protected |
Referenced by handleSubDocument(), insertTable(), openGroup(), openLayer(), and openTable().
|
virtual |
add empty cell
Implements STOFFListener.
|
inlinevirtual |
returns true if we can add open a section, add page break, ...
Implements STOFFListener.
|
virtual |
returns true if a text zone is opened
Implements STOFFListener.
Referenced by insertComment(), and insertNote().
|
virtual |
close a footer
Implements STOFFListener.
|
virtual |
close a frame
Implements STOFFListener.
Referenced by closeFooter(), closeHeader(), insertTable(), and insertTextBox().
|
virtual |
close a group
Implements STOFFListener.
|
virtual |
close a header
Implements STOFFListener.
| void STOFFGraphicListener::closeLayer | ( | ) |
close a layer
|
virtual |
close a link
Implements STOFFListener.
|
inline |
close a master page
|
inlinevirtual |
close a section
Implements STOFFListener.
|
virtual |
|
virtual |
|
virtual |
closes this row
Implements STOFFListener.
|
virtual |
defines a graphic styles, returns the style id
Implements STOFFListener.
|
virtual |
ends the actual document
Implements STOFFListener.
|
virtual |
returns the actual font
Implements STOFFListener.
|
virtual |
returns the current page span
Implements STOFFListener.
|
virtual |
returns the actual paragraph
Implements STOFFListener.
|
virtual |
returns the actual section
Implements STOFFListener.
|
inlinevirtual |
returns the listener type
Implements STOFFListener.
|
virtual |
function called to add a subdocument and modify the origin
Implements STOFFListener.
Referenced by insertComment(), insertFooterRegion(), insertHeaderRegion(), insertNote(), and insertTextBox().
|
virtual |
inserts a break type: ColumBreak, PageBreak, ..
Implements STOFFListener.
|
virtual |
adds a basic character, ..
Implements STOFFListener.
Referenced by insertComment(), and insertNote().
|
virtual |
adds comment
Implements STOFFListener.
|
virtual |
adds an end of line ( by default an hard one)
Implements STOFFListener.
|
virtual |
adds a field type
Implements STOFFListener.
|
virtual |
insert a footer
Implements STOFFListener.
|
virtual |
insert a header
Implements STOFFListener.
|
virtual |
insert a note
Implements STOFFListener.
|
virtual |
adds a picture with potential various representationin given position
Implements STOFFListener.
|
virtual |
adds a shape picture in given position
Implements STOFFListener.
|
virtual |
adds a tab
Implements STOFFListener.
| void STOFFGraphicListener::insertTable | ( | STOFFPosition const & | pos, |
| STOFFTable & | table, | ||
| STOFFGraphicStyle const & | style = STOFFGraphicStyle() |
||
| ) |
adds a table in given position
|
virtual |
|
virtual |
insert a character using the font converter to find the utf8 character
adds an unicode character. By convention if character=0xfffd(undef), no character is added
Implements STOFFListener.
Referenced by insertChar(), insertComment(), and insertNote().
|
virtual |
|
virtual |
returns true if a document is opened
Implements STOFFListener.
|
virtual |
check if a graphic style with a display name is already defined
Implements STOFFListener.
|
virtual |
returns true if the header/footer is open
Implements STOFFListener.
|
virtual |
returns true if a page is opened
Implements STOFFListener.
|
virtual |
returns true if a paragraph or a list is opened
Implements STOFFListener.
|
inlinevirtual |
returns true if a section is opened
Implements STOFFListener.
|
virtual |
returns try if a subdocument is open
Implements STOFFListener.
|
virtual |
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
Implements STOFFListener.
|
virtual |
store the position and the style (which will be needed further to insert a textbox or a table with openTable)
Implements STOFFListener.
Referenced by insertTable(), insertTextBox(), openFooter(), and openHeader().
|
virtual |
open a group
Implements STOFFListener.
|
virtual |
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
Implements STOFFListener.
| bool STOFFGraphicListener::openLayer | ( | librevenge::RVNGString const & | name | ) |
open a layer
|
virtual |
open a link
Implements STOFFListener.
| bool STOFFGraphicListener::openMasterPage | ( | STOFFPageSpan & | masterPage | ) |
opens a master page
|
virtual |
open a section if possible
Implements STOFFListener.
|
virtual |
open a table (using the last parameters of openFrame for the position )
Implements STOFFListener.
| void STOFFGraphicListener::openTable | ( | STOFFPosition const & | pos, |
| STOFFTable const & | table | ||
| ) |
open a table in a given position
|
virtual |
open a cell
Implements STOFFListener.
|
virtual |
open a row with given height ( if h < 0.0, set min-row-height = -h )
Implements STOFFListener.
|
private |
|
virtual |
sets the documents language
Implements STOFFListener.
|
virtual |
sets the document meta data
Implements STOFFListener.
|
virtual |
sets the font
Implements STOFFListener.
|
virtual |
sets the paragraph
Implements STOFFListener.
|
virtual |
starts a new document
Implements STOFFListener.
Referenced by _openPageSpan(), and openMasterPage().
|
protected |
the document interface
Referenced by _changeList(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSpan(), _flushText(), _openListElement(), _openPageSpan(), _openParagraph(), _openSpan(), addEmptyTableCell(), closeFooter(), closeGroup(), closeHeader(), closeLayer(), closeLink(), closeTable(), closeTableCell(), closeTableRow(), defineStyle(), endDocument(), insertEOL(), insertField(), insertPicture(), insertShape(), insertTab(), insertTextBox(), openFooter(), openGroup(), openHeader(), openLayer(), openLink(), openMasterPage(), openTable(), openTableCell(), openTableRow(), and startDocument().
|
protected |
the actual global state
Referenced by _changeList(), _closePageSpan(), _endSubDocument(), _handleFrameParameters(), _openPageSpan(), _startSubDocument(), canWriteText(), closeFooter(), closeHeader(), defineStyle(), endDocument(), getPageSpan(), handleSubDocument(), insertBreak(), insertFooterRegion(), insertHeaderRegion(), insertPicture(), insertShape(), insertTable(), insertTextBox(), isDocumentStarted(), isGraphicStyleDefined(), isHeaderFooterOpened(), isPageSpanOpened(), isSubDocumentOpened(), openFooter(), openFrame(), openGroup(), openHeader(), openLayer(), openMasterPage(), setDocumentLanguage(), setDocumentMetaData(), and startDocument().
|
protected |
the parser state
Referenced by _changeList(), and _getListId().
|
protected |
the actual local parse state
Referenced by _changeList(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSpan(), _endSubDocument(), _flushText(), _getListId(), _openListElement(), _openPageSpan(), _openParagraph(), _openSpan(), _popParsingState(), _pushParsingState(), _resetParagraphState(), _startSubDocument(), addEmptyTableCell(), canWriteText(), closeFrame(), closeGroup(), closeLayer(), closeLink(), closeTable(), closeTableCell(), closeTableRow(), getFont(), getParagraph(), handleSubDocument(), insertBreak(), insertChar(), insertComment(), insertEOL(), insertField(), insertNote(), insertPicture(), insertShape(), insertTab(), insertTable(), insertTextBox(), insertUnicode(), insertUnicodeString(), isParagraphOpened(), isSubDocumentOpened(), openFrame(), openGroup(), openLayer(), openLink(), openTable(), openTableCell(), openTableRow(), setFont(), and setParagraph().
|
protected |
stack of local state
Referenced by _popParsingState(), and _pushParsingState().