This class contents the main functions needed to create a spreadsheet processing Document. More...
#include <STOFFSpreadsheetListener.hxx>
Public Member Functions | |
STOFFSpreadsheetListener (STOFFListManagerPtr &listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGSpreadsheetInterface *documentInterface) | |
constructor | |
~STOFFSpreadsheetListener () final | |
destructor | |
Type | getType () const final |
returns the listener type | |
void | setDocumentLanguage (std::string locale) final |
sets the document language | |
void | setDocumentMetaData (const librevenge::RVNGPropertyList &list) final |
sets the document meta data | |
void | startDocument () final |
starts the document | |
void | endDocument (bool sendDelayedSubDoc=true) final |
ends the document | |
bool | isDocumentStarted () const final |
returns true if a document is opened | |
void | handleSubDocument (STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final |
function called to add a subdocument | |
bool | isSubDocumentOpened (libstoff::SubDocumentType &subdocType) const final |
returns try if a subdocument is open | |
bool | openFrame (STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final |
tries to open a frame | |
void | closeFrame () final |
tries to close a frame | |
bool | openGroup (STOFFFrameStyle const &frame) final |
open a group (not implemented) | |
void | closeGroup () final |
close a group (not implemented) | |
bool | canWriteText () const final |
returns true if we can add text data | |
bool | isPageSpanOpened () const final |
returns true if a page is opened | |
STOFFPageSpan const & | getPageSpan () final |
returns the current page span | |
bool | openHeader (librevenge::RVNGPropertyList const &extras) final |
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader) | |
bool | openFooter (librevenge::RVNGPropertyList const &extras) final |
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter) | |
bool | closeHeader () final |
close a header | |
bool | closeFooter () final |
close a footer | |
bool | insertHeaderRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final |
insert a header | |
bool | insertFooterRegion (STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final |
insert a footer | |
bool | isHeaderFooterOpened () const final |
returns true if the header/footer is open | |
void | openSheet (std::vector< float > const &colWidth, librevenge::RVNGUnit unit, std::vector< int > const &repeatColWidthNumber=std::vector< int >(), librevenge::RVNGString const &name="") |
open a sheet | |
void | closeSheet () |
closes this sheet | |
void | openSheetRow (float h, librevenge::RVNGUnit unit, int numRepeated=1) |
open a row with given height ( if h < 0.0, set min-row-height = -h ) | |
void | closeSheetRow () |
closes this row | |
void | openSheetCell (STOFFCell const &cell, STOFFCellContent const &content, int numRepeated=1) |
open a cell | |
void | closeSheetCell () |
close a cell | |
void | insertChart (STOFFFrameStyle const &frame, STOFFChart &chart, STOFFGraphicStyle const &style=STOFFGraphicStyle()) |
adds a chart in given position | |
void | insertChar (uint8_t character) final |
adds a basic character, .. | |
void | insertUnicode (uint32_t character) final |
adds an unicode character. | |
void | insertUnicodeString (librevenge::RVNGString const &str) final |
adds a unicode string | |
void | insertTab () final |
adds a tab | |
void | insertEOL (bool softBreak=false) final |
adds an end of line ( by default an hard one) | |
void | setFont (STOFFFont const &font) final |
sets the font | |
STOFFFont const & | getFont () const final |
returns the actual font | |
bool | isParagraphOpened () const final |
returns true if a paragraph or a list is opened | |
void | setParagraph (STOFFParagraph const ¶graph) final |
sets the paragraph | |
STOFFParagraph const & | getParagraph () const final |
returns the actual paragraph | |
void | defineStyle (STOFFFont const &style) final |
defines a font styles | |
bool | isFontStyleDefined (librevenge::RVNGString const &name) const final |
check if a font style with a display name is already defined | |
void | defineStyle (STOFFGraphicStyle const &style) final |
defines a graphic styles | |
bool | isGraphicStyleDefined (librevenge::RVNGString const &name) const final |
check if a graphic style with a display name is already defined | |
void | defineStyle (STOFFParagraph const &style) final |
defines a paragraph styles | |
bool | isParagraphStyleDefined (librevenge::RVNGString const &name) const final |
check if a paragraph style with a display name is already defined | |
void | insertField (STOFFField const &field) final |
adds a field type | |
void | openLink (STOFFLink const &link) final |
open a link | |
void | closeLink () final |
close a link | |
void | insertNote (STOFFNote const ¬e, STOFFSubDocumentPtr &subDocument) final |
insert a note | |
void | insertComment (STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final |
adds comment | |
void | insertPicture (STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final |
adds a picture with potential various representationin given position | |
void | insertEquation (STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final |
adds a equation given a position | |
void | insertShape (STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final |
adds a shape picture in given position | |
void | insertTextBox (STOFFFrameStyle const &frame, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &frameStyle=STOFFGraphicStyle()) final |
adds a textbox in given position | |
void | openTable (STOFFTable const &table) final |
open a table | |
void | closeTable () final |
closes this table | |
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 ) | |
void | closeTableRow () final |
closes this row | |
void | openTableCell (STOFFCell const &cell) final |
open a cell | |
void | closeTableCell () final |
close a cell | |
void | addCoveredTableCell (STOFFVec2i const &pos) final |
add covered cell | |
void | addEmptyTableCell (STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) final |
add empty cell | |
bool | canOpenSectionAddBreak () const final |
returns true if we can add open a section, add page break, ... | |
bool | isSectionOpened () const final |
returns true if a section is opened | |
STOFFSection const & | getSection () const final |
returns the actual section | |
bool | openSection (STOFFSection const §ion) final |
open a section if possible | |
bool | closeSection () final |
close a section | |
void | insertBreak (BreakType breakType) final |
inserts a break type: ColumBreak, PageBreak, .. | |
![]() | |
virtual | ~STOFFListener () |
destructor | |
STOFFListManagerPtr | getListManager () const |
return the list manager | |
void | insertUnicodeList (std::vector< uint32_t > const &list) |
try to insert a list of unicode character | |
Protected Member Functions | |
void | _openPageSpan (bool sendHeaderFooters=true) |
does open a new page (low level) | |
void | _closePageSpan () |
does close a page (low level) | |
void | _startSubDocument () |
void | _endSubDocument () |
void | _handleFrameParameters (librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame) |
void | _openParagraph () |
void | _closeParagraph () |
void | _resetParagraphState (const bool isListElement=false) |
void | _openListElement () |
open a list level | |
void | _closeListElement () |
close a list level | |
void | _changeList () |
update the list so that it corresponds to the actual level | |
int | _getListId () const |
low level: find a list id which corresponds to actual list and a change of level. | |
void | _openSpan () |
void | _closeSpan () |
void | _flushText () |
void | _flushDeferredTabs () |
std::shared_ptr< STOFFSpreadsheetListenerInternal::State > | _pushParsingState () |
creates a new parsing state (copy of the actual state) | |
void | _popParsingState () |
resets the previous parsing state | |
![]() | |
STOFFListener (STOFFListManagerPtr &listManager) | |
constructor | |
Protected Attributes | |
std::shared_ptr< STOFFSpreadsheetListenerInternal::DocumentState > | m_ds |
the main parse state | |
std::shared_ptr< STOFFSpreadsheetListenerInternal::State > | m_ps |
the actual local parse state | |
std::vector< std::shared_ptr< STOFFSpreadsheetListenerInternal::State > > | m_psStack |
stack of local state | |
librevenge::RVNGSpreadsheetInterface * | m_documentInterface |
the document interface | |
![]() | |
STOFFListManagerPtr | m_listManager |
the list manager | |
Private Member Functions | |
STOFFSpreadsheetListener (const STOFFSpreadsheetListener &) | |
copy constructor (unimplemented) | |
STOFFSpreadsheetListener & | operator= (const STOFFSpreadsheetListener &) |
operator= (unimplemented) | |
Additional Inherited Members | |
![]() | |
enum | Type { Graphic , Presentation , Spreadsheet , Text } |
the listener type More... | |
enum | BreakType { PageBreak =0 , SoftPageBreak , ColumnBreak } |
the different break type More... | |
This class contents the main functions needed to create a spreadsheet processing Document.
STOFFSpreadsheetListener::STOFFSpreadsheetListener | ( | STOFFListManagerPtr & | listManager, |
std::vector< STOFFPageSpan > const & | pageList, | ||
librevenge::RVNGSpreadsheetInterface * | documentInterface ) |
constructor
|
final |
destructor
|
private |
copy constructor (unimplemented)
|
protected |
update the list so that it corresponds to the actual level
Referenced by _endSubDocument(), _openSpan(), closeTableCell(), endDocument(), and insertNote().
|
protected |
close a list level
Referenced by _closeParagraph().
|
protected |
does close a page (low level)
Referenced by endDocument(), and insertBreak().
|
protected |
Referenced by _changeList(), _endSubDocument(), closeSheetCell(), closeTableCell(), endDocument(), insertBreak(), insertComment(), insertEOL(), insertNote(), openSheet(), and openTable().
|
protected |
Referenced by _closeListElement(), _closeParagraph(), _endSubDocument(), closeLink(), insertComment(), insertNote(), and setFont().
|
protected |
Referenced by closeSheet(), closeTable(), handleSubDocument(), and insertChart().
|
protected |
Referenced by insertChar(), insertEOL(), insertField(), insertTab(), insertUnicode(), insertUnicodeString(), and openLink().
|
protected |
Referenced by _closeSpan(), insertComment(), insertEOL(), insertField(), insertNote(), insertShape(), insertTab(), openFrame(), and openLink().
|
protected |
low level: find a list id which corresponds to actual list and a change of level.
Referenced by _changeList().
|
protected |
Referenced by openFrame().
|
protected |
open a list level
Referenced by _openSpan().
|
protected |
does open a new page (low level)
Referenced by endDocument(), getPageSpan(), and openSheet().
|
protected |
Referenced by _openSpan(), insertComment(), insertNote(), insertShape(), and openFrame().
|
protected |
|
protected |
resets the previous parsing state
Referenced by closeFooter(), closeHeader(), closeLink(), closeSheet(), closeSheetCell(), closeTable(), handleSubDocument(), and insertChart().
|
protected |
creates a new parsing state (copy of the actual state)
Referenced by handleSubDocument(), insertChart(), openFooter(), openHeader(), openLink(), openSheet(), openSheetCell(), and openTable().
|
protected |
Referenced by _openListElement(), and _openParagraph().
|
protected |
Referenced by handleSubDocument(), insertChart(), openSheet(), and openTable().
|
finalvirtual |
add covered cell
Implements STOFFListener.
|
finalvirtual |
add empty cell
Implements STOFFListener.
|
inlinefinalvirtual |
returns true if we can add open a section, add page break, ...
Implements STOFFListener.
|
finalvirtual |
returns true if we can add text data
Implements STOFFListener.
Referenced by insertComment(), and insertNote().
|
finalvirtual |
close a footer
Implements STOFFListener.
|
finalvirtual |
tries to close a frame
Implements STOFFListener.
Referenced by insertChart(), insertEquation(), insertPicture(), and insertTextBox().
|
finalvirtual |
close a group (not implemented)
Implements STOFFListener.
|
finalvirtual |
close a header
Implements STOFFListener.
|
finalvirtual |
close a link
Implements STOFFListener.
|
finalvirtual |
close a section
Implements STOFFListener.
void STOFFSpreadsheetListener::closeSheet | ( | ) |
closes this sheet
Referenced by endDocument().
void STOFFSpreadsheetListener::closeSheetCell | ( | ) |
close a cell
Referenced by openSheetCell().
void STOFFSpreadsheetListener::closeSheetRow | ( | ) |
closes this row
|
finalvirtual |
|
finalvirtual |
close a cell
Implements STOFFListener.
Referenced by addCoveredTableCell(), addEmptyTableCell(), and openTableCell().
|
finalvirtual |
closes this row
Implements STOFFListener.
|
finalvirtual |
defines a font styles
Implements STOFFListener.
|
finalvirtual |
defines a graphic styles
Implements STOFFListener.
|
finalvirtual |
defines a paragraph styles
Implements STOFFListener.
|
finalvirtual |
ends the document
Implements STOFFListener.
|
finalvirtual |
returns the actual font
Implements STOFFListener.
|
finalvirtual |
returns the current page span
Implements STOFFListener.
|
finalvirtual |
returns the actual paragraph
Implements STOFFListener.
|
finalvirtual |
returns the actual section
Implements STOFFListener.
|
inlinefinalvirtual |
returns the listener type
Implements STOFFListener.
|
finalvirtual |
function called to add a subdocument
Implements STOFFListener.
Referenced by insertComment(), insertFooterRegion(), insertHeaderRegion(), insertNote(), and insertTextBox().
|
finalvirtual |
inserts a break type: ColumBreak, PageBreak, ..
Implements STOFFListener.
|
finalvirtual |
adds a basic character, ..
Implements STOFFListener.
void STOFFSpreadsheetListener::insertChart | ( | STOFFFrameStyle const & | frame, |
STOFFChart & | chart, | ||
STOFFGraphicStyle const & | style = STOFFGraphicStyle() ) |
adds a chart in given position
|
finalvirtual |
adds comment
Implements STOFFListener.
|
finalvirtual |
adds an end of line ( by default an hard one)
Implements STOFFListener.
|
finalvirtual |
adds a equation given a position
Implements STOFFListener.
|
finalvirtual |
adds a field type
Implements STOFFListener.
|
finalvirtual |
insert a footer
Implements STOFFListener.
|
finalvirtual |
insert a header
Implements STOFFListener.
|
finalvirtual |
insert a note
Must not happen excepted in corrupted document, so we do the minimum. Note that we have no choice, either we begin by closing the paragraph, ... or we reprogram handleSubDocument.
Implements STOFFListener.
|
finalvirtual |
adds a picture with potential various representationin given position
Implements STOFFListener.
|
finalvirtual |
adds a shape picture in given position
Implements STOFFListener.
|
finalvirtual |
adds a tab
Implements STOFFListener.
|
finalvirtual |
adds a textbox in given position
Implements STOFFListener.
|
finalvirtual |
adds an unicode character.
By convention if character=0xfffd(undef), no character is added
Implements STOFFListener.
Referenced by insertChar().
|
finalvirtual |
adds a unicode string
Implements STOFFListener.
|
finalvirtual |
returns true if a document is opened
Implements STOFFListener.
|
finalvirtual |
check if a font style with a display name is already defined
Implements STOFFListener.
|
finalvirtual |
check if a graphic style with a display name is already defined
Implements STOFFListener.
|
finalvirtual |
returns true if the header/footer is open
Implements STOFFListener.
|
finalvirtual |
returns true if a page is opened
Implements STOFFListener.
|
finalvirtual |
returns true if a paragraph or a list is opened
Implements STOFFListener.
|
finalvirtual |
check if a paragraph style with a display name is already defined
Implements STOFFListener.
|
inlinefinalvirtual |
returns true if a section is opened
Implements STOFFListener.
|
finalvirtual |
returns try if a subdocument is open
Implements STOFFListener.
|
finalvirtual |
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
Implements STOFFListener.
|
finalvirtual |
tries to open a frame
Implements STOFFListener.
Referenced by insertChart(), insertEquation(), insertPicture(), and insertTextBox().
|
finalvirtual |
open a group (not implemented)
Implements STOFFListener.
|
finalvirtual |
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
Implements STOFFListener.
|
finalvirtual |
open a link
Implements STOFFListener.
|
finalvirtual |
open a section if possible
Implements STOFFListener.
void STOFFSpreadsheetListener::openSheet | ( | std::vector< float > const & | colWidth, |
librevenge::RVNGUnit | unit, | ||
std::vector< int > const & | repeatColWidthNumber = std::vector<int>(), | ||
librevenge::RVNGString const & | name = "" ) |
open a sheet
void STOFFSpreadsheetListener::openSheetCell | ( | STOFFCell const & | cell, |
STOFFCellContent const & | content, | ||
int | numRepeated = 1 ) |
open a cell
void STOFFSpreadsheetListener::openSheetRow | ( | float | h, |
librevenge::RVNGUnit | unit, | ||
int | numRepeated = 1 ) |
open a row with given height ( if h < 0.0, set min-row-height = -h )
|
finalvirtual |
open a table
Implements STOFFListener.
|
finalvirtual |
open a cell
Implements STOFFListener.
|
finalvirtual |
open a row with given height ( if h < 0.0, set min-row-height = -h )
Implements STOFFListener.
|
private |
operator= (unimplemented)
|
finalvirtual |
sets the document language
Implements STOFFListener.
|
finalvirtual |
sets the document meta data
Implements STOFFListener.
|
finalvirtual |
sets the font
Implements STOFFListener.
|
finalvirtual |
sets the paragraph
Implements STOFFListener.
|
finalvirtual |
|
protected |
the document interface
Referenced by _changeList(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSpan(), _flushDeferredTabs(), _flushText(), _openListElement(), _openPageSpan(), _openParagraph(), _openSpan(), addCoveredTableCell(), addEmptyTableCell(), closeFooter(), closeFrame(), closeHeader(), closeLink(), closeSheet(), closeSheetCell(), closeSheetRow(), closeTable(), closeTableCell(), closeTableRow(), defineStyle(), defineStyle(), defineStyle(), endDocument(), insertChart(), insertComment(), insertEOL(), insertEquation(), insertField(), insertFooterRegion(), insertHeaderRegion(), insertNote(), insertPicture(), insertShape(), insertTextBox(), openFooter(), openFrame(), openHeader(), openLink(), openSheet(), openSheetCell(), openSheetRow(), openTable(), openTableCell(), openTableRow(), and startDocument().
|
protected |
the main parse state
Referenced by _changeList(), _openPageSpan(), _startSubDocument(), closeSheet(), closeSheetRow(), defineStyle(), defineStyle(), defineStyle(), endDocument(), getPageSpan(), getSection(), handleSubDocument(), insertBreak(), insertChart(), insertEquation(), insertNote(), insertPicture(), insertShape(), insertTextBox(), isDocumentStarted(), isFontStyleDefined(), isGraphicStyleDefined(), isParagraphStyleDefined(), openFrame(), openSheet(), openSheetCell(), openSheetRow(), setDocumentLanguage(), setDocumentMetaData(), and startDocument().
|
protected |
the actual local parse state
Referenced by _changeList(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSpan(), _endSubDocument(), _flushDeferredTabs(), _flushText(), _getListId(), _openListElement(), _openPageSpan(), _openParagraph(), _openSpan(), _popParsingState(), _pushParsingState(), _resetParagraphState(), _startSubDocument(), addCoveredTableCell(), addEmptyTableCell(), canWriteText(), closeFooter(), closeFrame(), closeHeader(), closeLink(), closeSheetCell(), closeTable(), closeTableCell(), closeTableRow(), endDocument(), getFont(), getPageSpan(), getParagraph(), handleSubDocument(), insertBreak(), insertChar(), insertChart(), insertComment(), insertEOL(), insertField(), insertFooterRegion(), insertHeaderRegion(), insertNote(), insertShape(), insertTab(), insertUnicode(), insertUnicodeString(), isHeaderFooterOpened(), isPageSpanOpened(), isParagraphOpened(), isSubDocumentOpened(), openFooter(), openFrame(), openHeader(), openLink(), openSheet(), openSheetCell(), openTable(), openTableCell(), openTableRow(), setFont(), and setParagraph().
|
protected |
stack of local state
Referenced by _popParsingState(), and _pushParsingState().