#include <WKSContentListener.h>
Classes | |
| struct | CellContent |
| small class use to define a sheet cell content More... | |
| struct | FormulaInstruction |
| small class use to define a formula instruction More... | |
Public Member Functions | |
| WKSContentListener (std::vector< WPSPageSpan > const &pageList, librevenge::RVNGSpreadsheetInterface *documentInterface) | |
| virtual | ~WKSContentListener () |
| void | setDocumentLanguage (int lcid) |
| void | startDocument () |
| void | endDocument () |
| void | handleSubDocument (WPSSubDocumentPtr &subDocument, libwps::SubDocumentType subDocumentType) |
| void | insertCharacter (uint8_t character) |
| adds a basic character, .. | |
| void | insertUnicode (uint32_t character) |
| adds an unicode character | |
| void | insertUnicodeString (librevenge::RVNGString const &str) |
| adds a unicode string | |
| void | insertTab () |
| void | insertEOL (bool softBreak=false) |
| void | insertBreak (const uint8_t breakType) |
| void | setFont (const WPSFont &font) |
| set the actual font | |
| WPSFont const & | getFont () const |
| returns the actual font | |
| bool | isParagraphOpened () const |
| returns true if a paragraph or a list is opened | |
| void | setParagraph (const WPSParagraph ¶) |
| sets the actual paragraph | |
| WPSParagraph const & | getParagraph () const |
| returns the actual paragraph | |
| void | insertField (FieldType type) |
| adds a field type | |
| void | insertDateTimeField (char const *format) |
| insert a date/time field with given format (see strftime) | |
| void | insertComment (WPSSubDocumentPtr &subDocument) |
| adds comment | |
| void | openSheet (std::vector< float > const &colWidth, librevenge::RVNGUnit unit) |
| open a sheet | |
| void | closeSheet () |
| closes this sheet | |
| void | openSheetRow (float h, librevenge::RVNGUnit unit, bool headerRow=false) |
| open a row with given height. | |
| void | closeSheetRow () |
| closes this row | |
| void | openSheetCell (WPSCell const &cell, CellContent const &content, librevenge::RVNGPropertyList const &extras=librevenge::RVNGPropertyList()) |
| low level function to define a cell. | |
| void | closeSheetCell () |
| close a cell | |
Protected Member Functions | |
| void | _openPageSpan () |
| void | _closePageSpan () |
| void | _startSubDocument () |
| void | _endSubDocument () |
| void | _openParagraph () |
| void | _closeParagraph () |
| void | _appendParagraphProperties (librevenge::RVNGPropertyList &propList, const bool isListElement=false) |
| void | _resetParagraphState (const bool isListElement=false) |
| void | _openSpan () |
| void | _closeSpan () |
| void | _flushText () |
| void | _flushDeferredTabs () |
| void | _insertBreakIfNecessary (librevenge::RVNGPropertyList &propList) |
| shared_ptr < WKSContentParsingState > | _pushParsingState () |
| creates a new parsing state (copy of the actual state) | |
| void | _popParsingState () |
| resets the previous parsing state | |
Protected Attributes | |
| shared_ptr < WKSDocumentParsingState > | m_ds |
| shared_ptr < WKSContentParsingState > | m_ps |
| std::vector< shared_ptr < WKSContentParsingState > > | m_psStack |
| librevenge::RVNGSpreadsheetInterface * | m_documentInterface |
Private Member Functions | |
| WKSContentListener (const WKSContentListener &) | |
| WKSContentListener & | operator= (const WKSContentListener &) |
| WKSContentListener::WKSContentListener | ( | std::vector< WPSPageSpan > const & | pageList, |
| librevenge::RVNGSpreadsheetInterface * | documentInterface | ||
| ) |
| WKSContentListener::~WKSContentListener | ( | ) | [virtual] |
| WKSContentListener::WKSContentListener | ( | const WKSContentListener & | ) | [private] |
| void WKSContentListener::_appendParagraphProperties | ( | librevenge::RVNGPropertyList & | propList, |
| const bool | isListElement = false |
||
| ) | [protected] |
Referenced by _openParagraph().
| void WKSContentListener::_closePageSpan | ( | ) | [protected] |
Referenced by endDocument().
| void WKSContentListener::_closeParagraph | ( | ) | [protected] |
Referenced by _closePageSpan(), _endSubDocument(), closeSheetCell(), endDocument(), insertBreak(), insertEOL(), and openSheet().
| void WKSContentListener::_closeSpan | ( | ) | [protected] |
Referenced by _closeParagraph(), _flushDeferredTabs(), insertComment(), and setFont().
| void WKSContentListener::_endSubDocument | ( | ) | [protected] |
Referenced by closeSheet(), and handleSubDocument().
| void WKSContentListener::_flushDeferredTabs | ( | ) | [protected] |
Referenced by insertCharacter(), insertEOL(), insertTab(), insertUnicode(), and insertUnicodeString().
| void WKSContentListener::_flushText | ( | ) | [protected] |
Referenced by _closeSpan(), insertComment(), insertEOL(), insertField(), and insertTab().
| void WKSContentListener::_insertBreakIfNecessary | ( | librevenge::RVNGPropertyList & | propList | ) | [protected] |
Referenced by _appendParagraphProperties().
| void WKSContentListener::_openPageSpan | ( | ) | [protected] |
Referenced by _openParagraph(), and openSheet().
| void WKSContentListener::_openParagraph | ( | ) | [protected] |
Referenced by _openSpan(), and insertComment().
| void WKSContentListener::_openSpan | ( | ) | [protected] |
Referenced by _flushDeferredTabs(), insertCharacter(), insertEOL(), insertField(), insertUnicode(), and insertUnicodeString().
| void WKSContentListener::_popParsingState | ( | ) | [protected] |
resets the previous parsing state
Referenced by closeSheet(), and handleSubDocument().
| shared_ptr< WKSContentParsingState > WKSContentListener::_pushParsingState | ( | ) | [protected] |
creates a new parsing state (copy of the actual state)
Referenced by handleSubDocument(), and openSheet().
| void WKSContentListener::_resetParagraphState | ( | const bool | isListElement = false | ) | [protected] |
Referenced by _openParagraph().
| void WKSContentListener::_startSubDocument | ( | ) | [protected] |
Referenced by handleSubDocument(), and openSheet().
| void WKSContentListener::closeSheet | ( | ) |
closes this sheet
Referenced by _endSubDocument(), and endDocument().
| void WKSContentListener::closeSheetCell | ( | ) |
close a cell
Referenced by openSheetCell().
| void WKSContentListener::closeSheetRow | ( | ) |
closes this row
| void WKSContentListener::endDocument | ( | ) |
| WPSFont const & WKSContentListener::getFont | ( | ) | const [virtual] |
returns the actual font
Implements WPSListener.
| WPSParagraph const & WKSContentListener::getParagraph | ( | ) | const [virtual] |
returns the actual paragraph
Implements WPSListener.
| void WKSContentListener::handleSubDocument | ( | WPSSubDocumentPtr & | subDocument, |
| libwps::SubDocumentType | subDocumentType | ||
| ) |
Referenced by insertComment(), and WPSPageSpan::sendHeaderFooters().
| void WKSContentListener::insertBreak | ( | const uint8_t | breakType | ) | [virtual] |
Implements WPSListener.
| void WKSContentListener::insertCharacter | ( | uint8_t | character | ) | [virtual] |
adds a basic character, ..
Implements WPSListener.
| void WKSContentListener::insertComment | ( | WPSSubDocumentPtr & | subDocument | ) |
adds comment
| void WKSContentListener::insertDateTimeField | ( | char const * | format | ) | [virtual] |
insert a date/time field with given format (see strftime)
Implements WPSListener.
Referenced by insertField().
| void WKSContentListener::insertEOL | ( | bool | softBreak = false | ) | [virtual] |
Implements WPSListener.
| void WKSContentListener::insertField | ( | WKSContentListener::FieldType | type | ) | [virtual] |
adds a field type
Implements WPSListener.
| void WKSContentListener::insertTab | ( | ) | [virtual] |
Implements WPSListener.
| void WKSContentListener::insertUnicode | ( | uint32_t | character | ) | [virtual] |
adds an unicode character
by convention if character=0xfffd(undef), no character is added
Implements WPSListener.
Referenced by insertCharacter().
| void WKSContentListener::insertUnicodeString | ( | librevenge::RVNGString const & | str | ) | [virtual] |
adds a unicode string
Implements WPSListener.
Referenced by insertDateTimeField(), and insertField().
| bool WKSContentListener::isParagraphOpened | ( | ) | const [virtual] |
returns true if a paragraph or a list is opened
Implements WPSListener.
| void WKSContentListener::openSheet | ( | std::vector< float > const & | colWidth, |
| librevenge::RVNGUnit | unit | ||
| ) |
open a sheet
| void WKSContentListener::openSheetCell | ( | WPSCell const & | cell, |
| WKSContentListener::CellContent const & | content, | ||
| librevenge::RVNGPropertyList const & | extras = librevenge::RVNGPropertyList() |
||
| ) |
low level function to define a cell.
| cell | the cell position, alignement, ... |
| content | the cell content |
| extras | to be used to pass extra data, for instance spreadsheet data |
| void WKSContentListener::openSheetRow | ( | float | h, |
| librevenge::RVNGUnit | unit, | ||
| bool | headerRow = false |
||
| ) |
open a row with given height.
If h<0, use min-row-heigth
| WKSContentListener& WKSContentListener::operator= | ( | const WKSContentListener & | ) | [private] |
| void WKSContentListener::setDocumentLanguage | ( | int | lcid | ) | [virtual] |
Implements WPSListener.
| void WKSContentListener::setFont | ( | const WPSFont & | font | ) | [virtual] |
set the actual font
Implements WPSListener.
| void WKSContentListener::setParagraph | ( | const WPSParagraph & | para | ) | [virtual] |
sets the actual paragraph
Implements WPSListener.
| void WKSContentListener::startDocument | ( | ) |
Referenced by _openPageSpan().
librevenge::RVNGSpreadsheetInterface* WKSContentListener::m_documentInterface [protected] |
Referenced by _closePageSpan(), _closeParagraph(), _closeSpan(), _flushDeferredTabs(), _flushText(), _openPageSpan(), _openParagraph(), _openSpan(), closeSheet(), closeSheetCell(), closeSheetRow(), endDocument(), insertComment(), insertEOL(), insertField(), openSheet(), openSheetCell(), openSheetRow(), and startDocument().
shared_ptr<WKSDocumentParsingState> WKSContentListener::m_ds [protected] |
Referenced by _openPageSpan(), _startSubDocument(), endDocument(), handleSubDocument(), openSheetCell(), setDocumentLanguage(), and startDocument().
shared_ptr<WKSContentParsingState> WKSContentListener::m_ps [protected] |
Referenced by _appendParagraphProperties(), _closePageSpan(), _closeParagraph(), _closeSpan(), _endSubDocument(), _flushDeferredTabs(), _flushText(), _insertBreakIfNecessary(), _openPageSpan(), _openParagraph(), _openSpan(), _popParsingState(), _pushParsingState(), _resetParagraphState(), _startSubDocument(), closeSheet(), closeSheetCell(), closeSheetRow(), endDocument(), getFont(), getParagraph(), handleSubDocument(), insertBreak(), insertCharacter(), insertComment(), insertEOL(), insertTab(), insertUnicode(), insertUnicodeString(), isParagraphOpened(), openSheet(), openSheetCell(), openSheetRow(), setFont(), and setParagraph().
std::vector<shared_ptr<WKSContentParsingState> > WKSContentListener::m_psStack [protected] |
Referenced by _popParsingState(), and _pushParsingState().