#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... | |
Protected Member Functions | |
void | _openPageSpan () |
void | _closePageSpan () |
void | _handleFrameParameters (librevenge::RVNGPropertyList &propList, WPSPosition const &pos) |
bool | _openFrame (WPSPosition const &pos, WPSGraphicStyle const &style) |
void | _closeFrame () |
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) |
std::shared_ptr< WKSContentParsingState > | _pushParsingState () |
creates a new parsing state (copy of the actual state) | |
void | _popParsingState () |
resets the previous parsing state | |
Protected Attributes | |
std::shared_ptr< WKSDocumentParsingState > | m_ds |
std::shared_ptr< WKSContentParsingState > | m_ps |
std::vector< std::shared_ptr< WKSContentParsingState > > | m_psStack |
librevenge::RVNGSpreadsheetInterface * | m_documentInterface |
Private Member Functions | |
WKSContentListener (const WKSContentListener &)=delete | |
WKSContentListener & | operator= (const WKSContentListener &)=delete |
WKSContentListener::WKSContentListener | ( | std::vector< WPSPageSpan > const & | pageList, |
librevenge::RVNGSpreadsheetInterface * | documentInterface ) |
|
final |
|
privatedelete |
|
protected |
Referenced by _openParagraph().
|
protected |
Referenced by insertChart(), insertObject(), insertPicture(), and insertTextBox().
|
protected |
Referenced by endDocument().
|
protected |
Referenced by _closePageSpan(), _endSubDocument(), _openFrame(), closeSheetCell(), endDocument(), insertBreak(), insertComment(), insertEOL(), and openSheet().
|
protected |
Referenced by _closeParagraph(), _flushDeferredTabs(), insertComment(), and setFont().
|
protected |
Referenced by closeGroup(), closeSheet(), handleSubDocument(), and insertChart().
|
protected |
Referenced by insertCharacter(), insertEOL(), insertTab(), insertUnicode(), and insertUnicodeString().
|
protected |
Referenced by _closeSpan(), _openFrame(), insertComment(), insertEOL(), insertField(), and insertTab().
|
protected |
Referenced by _openFrame(), insertPicture(), and openGroup().
|
protected |
Referenced by _appendParagraphProperties().
|
protected |
Referenced by insertChart(), insertObject(), insertPicture(), and insertTextBox().
|
protected |
Referenced by _openParagraph(), and openSheet().
|
protected |
Referenced by _openFrame(), _openSpan(), and insertComment().
|
protected |
Referenced by _flushDeferredTabs(), _openFrame(), insertCharacter(), insertEOL(), insertField(), insertUnicode(), and insertUnicodeString().
|
protected |
resets the previous parsing state
Referenced by closeGroup(), closeSheet(), handleSubDocument(), and insertChart().
|
protected |
creates a new parsing state (copy of the actual state)
Referenced by handleSubDocument(), insertChart(), openGroup(), and openSheet().
Referenced by _openParagraph().
|
protected |
Referenced by handleSubDocument(), insertChart(), openGroup(), and openSheet().
|
finalvirtual |
close a group (not implemented)
Implements WPSListener.
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 | ( | ) |
returns the actual font
Implements WPSListener.
|
finalvirtual |
returns the actual paragraph
Implements WPSListener.
void WKSContentListener::handleSubDocument | ( | WPSSubDocumentPtr & | subDocument, |
libwps::SubDocumentType | subDocumentType ) |
Referenced by insertComment(), and insertTextBox().
Implements WPSListener.
adds a basic character, ..
Implements WPSListener.
void WKSContentListener::insertChart | ( | WPSPosition const & | pos, |
WKSChart const & | chart, | ||
WPSGraphicStyle const & | style = WPSGraphicStyle::emptyStyle() ) |
adds a chart in given position
void WKSContentListener::insertComment | ( | WPSSubDocumentPtr & | subDocument | ) |
adds comment
Implements WPSListener.
adds a field
Implements WPSListener.
void WKSContentListener::insertObject | ( | WPSPosition const & | pos, |
const WPSEmbeddedObject & | obj, | ||
WPSGraphicStyle const & | style = WPSGraphicStyle::emptyStyle() ) |
adds an object with replacement picture in given position
void WKSContentListener::insertPicture | ( | WPSPosition const & | pos, |
const librevenge::RVNGBinaryData & | binaryData, | ||
std::string const & | type = "image/pict", | ||
WPSGraphicStyle const & | style = WPSGraphicStyle::emptyStyle() ) |
adds a picture in given position
void WKSContentListener::insertPicture | ( | WPSPosition const & | pos, |
WPSGraphicShape const & | shape, | ||
WPSGraphicStyle const & | style ) |
adds a picture in given position
|
finalvirtual |
adds an unicode character to a string ( with correct encoding ).
Implements WPSListener.
void WKSContentListener::insertTextBox | ( | WPSPosition const & | pos, |
WPSSubDocumentPtr | subDocument, | ||
WPSGraphicStyle const & | frameStyle = WPSGraphicStyle::emptyStyle() ) |
adds a textbox in given position
adds an unicode character
by convention if character=0xfffd(undef), no character is added
Implements WPSListener.
Referenced by insertCharacter().
|
finalvirtual |
returns true if a paragraph or a list is opened
Implements WPSListener.
|
finalvirtual |
open a group (not implemented)
Implements WPSListener.
void WKSContentListener::openSheet | ( | std::vector< WPSColumnFormat > const & | columns, |
librevenge::RVNGString const & | name = "" ) |
open a sheet
void WKSContentListener::openSheetCell | ( | WPSCell const & | cell, |
WKSContentListener::CellContent const & | content, | ||
int | numRepeated = 1 ) |
low level function to define a cell.
cell | the cell position, alignement, ... |
content | the cell content |
numRepeated | the cell columns repeatition |
void WKSContentListener::openSheetRow | ( | WPSRowFormat const & | f, |
int | numRepeated = 1 ) |
open a row
|
privatedelete |
Implements WPSListener.
set the actual font
Implements WPSListener.
|
finalvirtual |
sets the actual paragraph
Implements WPSListener.
void WKSContentListener::startDocument | ( | ) |
Referenced by _openPageSpan().
|
protected |
Referenced by _closeFrame(), _closePageSpan(), _closeParagraph(), _closeSpan(), _flushDeferredTabs(), _flushText(), _openFrame(), _openPageSpan(), _openParagraph(), _openSpan(), closeGroup(), closeSheet(), closeSheetCell(), closeSheetRow(), endDocument(), insertChart(), insertComment(), insertEOL(), insertField(), insertObject(), insertPicture(), insertPicture(), insertTextBox(), openGroup(), openSheet(), openSheetCell(), openSheetRow(), and startDocument().
|
protected |
|
protected |
Referenced by _appendParagraphProperties(), _closeFrame(), _closePageSpan(), _closeParagraph(), _closeSpan(), _endSubDocument(), _flushDeferredTabs(), _flushText(), _handleFrameParameters(), _insertBreakIfNecessary(), _openFrame(), _openPageSpan(), _openParagraph(), _openSpan(), _popParsingState(), _pushParsingState(), _resetParagraphState(), _startSubDocument(), closeGroup(), closeSheet(), closeSheetCell(), closeSheetRow(), endDocument(), getFont(), getParagraph(), handleSubDocument(), insertBreak(), insertCharacter(), insertChart(), insertComment(), insertEOL(), insertTab(), insertUnicode(), insertUnicodeString(), isParagraphOpened(), openGroup(), openSheet(), openSheetCell(), openSheetRow(), setFont(), and setParagraph().
|
protected |
Referenced by _popParsingState(), and _pushParsingState().