This class parses Quattro9 Pro spreadsheet file. More...
#include <Quattro9Spreadsheet.h>
Public Member Functions | |
Quattro9Spreadsheet (Quattro9Parser &parser) | |
constructor | |
~Quattro9Spreadsheet () | |
destructor | |
void | setListener (WKSContentListenerPtr &listen) |
sets the listener | |
void | cleanState () |
clean internal state | |
void | updateState () |
update the state (need to be called before sending data) |
Protected Member Functions | |
int | version () const |
return the file version | |
QuattroFormulaManager::CellReferenceFunction | getReadCellReferenceFunction () |
returns the function to read a cell's reference | |
int | getNumSpreadsheets () const |
returns the number of spreadsheet | |
librevenge::RVNGString | getSheetName (int id) const |
returns the name of the id's spreadsheet | |
void | sendSpreadsheet (int sheetId) |
send the sheetId'th spreadsheet | |
Vec2f | getPosition (int sheetId, Vec2i const &cell) const |
returns the beginning position of a cell | |
void | addDLLIdName (int id, librevenge::RVNGString const &name, bool func1) |
add a dll's correspondance between an id and a name | |
void | addUserFormat (int id, librevenge::RVNGString const &name) |
add a user format's correspondance between an id and a name | |
void | addDocumentStrings (std::shared_ptr< WPSStream > const &stream, std::vector< Quattro9ParserInternal::TextEntry > const &entries) |
set the document strings list | |
void | sendCellContent (Quattro9SpreadsheetInternal::CellData const *cell, Vec2i pos, int sheetId, int numRepeated) |
send the cell data | |
bool | readCellStyles (std::shared_ptr< WPSStream > const &stream) |
reads a cell attribute: zone a | |
bool | readDocumentFormulas (std::shared_ptr< WPSStream > const &stream) |
reads the document formulas: zone 408 | |
bool | readBeginSheet (std::shared_ptr< WPSStream > const &stream, int &sheetId) |
read the begin sheet zone: zone 601 | |
bool | readEndSheet (std::shared_ptr< WPSStream > const &stream) |
read the end sheet zone: zone 602 | |
bool | readMergedCells (std::shared_ptr< WPSStream > const &stream) |
read the merged cell: zone 61d | |
bool | readColRowDefault (std::shared_ptr< WPSStream > const &stream) |
read a col/row default dimension: zone 631, 632 | |
bool | readColRowDimension (std::shared_ptr< WPSStream > const &stream) |
read a col/row dimension: zone 633, 634 | |
bool | readColRowDimensions (std::shared_ptr< WPSStream > const &stream) |
read a col/row dimensions: zone 635, 636 | |
bool | readBeginColumn (std::shared_ptr< WPSStream > const &stream) |
read the begin column zone: zone a01 | |
bool | readEndColumn (std::shared_ptr< WPSStream > const &stream) |
read the end column zone: zone a02 | |
bool | readCellList (std::shared_ptr< WPSStream > const &stream) |
reads a cell list zone: zone c01 | |
bool | readCellResult (std::shared_ptr< WPSStream > const &stream) |
reads a cell result zone: zone c02 | |
bool | readCellReference (std::shared_ptr< WPSStream > const &stream, long endPos, QuattroFormulaInternal::CellReference &ref, Vec2i const &pos=Vec2i(0, 0), int sheetId=0) const |
try to read a cell reference |
Static Protected Member Functions | |
static bool | readPageBreak (std::shared_ptr< WPSStream > const &stream) |
read the page break zone: zone 617 | |
static bool | readCell (std::shared_ptr< WPSStream > const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName) |
Private Member Functions | |
Quattro9Spreadsheet (Quattro9Spreadsheet const &orig)=delete | |
Quattro9Spreadsheet & | operator= (Quattro9Spreadsheet const &orig)=delete |
Private Attributes | |
std::shared_ptr< WKSContentListener > | m_listener |
Quattro9Parser & | m_mainParser |
the listener (if set) | |
std::shared_ptr< Quattro9SpreadsheetInternal::State > | m_state |
the internal state |
Friends | |
class | Quattro9Parser |
This class parses Quattro9 Pro spreadsheet file.
|
explicit |
constructor
Referenced by operator=(), and Quattro9Spreadsheet().
Quattro9Spreadsheet::~Quattro9Spreadsheet | ( | ) |
destructor
|
privatedelete |
|
protected |
add a dll's correspondance between an id and a name
|
protected |
set the document strings list
|
protected |
add a user format's correspondance between an id and a name
void Quattro9Spreadsheet::cleanState | ( | ) |
clean internal state
|
protected |
returns the number of spreadsheet
returns the beginning position of a cell
|
protected |
returns the function to read a cell's reference
Referenced by cleanState(), and Quattro9Spreadsheet().
|
protected |
returns the name of the id's spreadsheet
Referenced by sendCellContent().
|
privatedelete |
|
protected |
read the begin column zone: zone a01
|
protected |
read the begin sheet zone: zone 601
|
staticprotected |
Referenced by readCellReference().
|
protected |
reads a cell list zone: zone c01
|
protected |
try to read a cell reference
Referenced by getReadCellReferenceFunction(), and readCellReference().
|
protected |
reads a cell result zone: zone c02
|
protected |
reads a cell attribute: zone a
|
protected |
read a col/row default dimension: zone 631, 632
|
protected |
read a col/row dimension: zone 633, 634
|
protected |
read a col/row dimensions: zone 635, 636
|
protected |
reads the document formulas: zone 408
|
protected |
read the end column zone: zone a02
|
protected |
read the end sheet zone: zone 602
|
protected |
read the merged cell: zone 61d
|
staticprotected |
read the page break zone: zone 617
|
protected |
send the cell data
Referenced by sendSpreadsheet().
|
protected |
send the sheetId'th spreadsheet
|
inline |
sets the listener
void Quattro9Spreadsheet::updateState | ( | ) |
update the state (need to be called before sending data)
|
protected |
return the file version
Referenced by readCellStyles().
|
friend |
Referenced by Quattro9Parser, and Quattro9Spreadsheet().
|
private |
Referenced by Quattro9Spreadsheet(), sendCellContent(), sendSpreadsheet(), and setListener().
|
private |
the listener (if set)
the main parser
Referenced by Quattro9Spreadsheet(), readBeginSheet(), readCellReference(), readCellResult(), readCellStyles(), sendCellContent(), sendSpreadsheet(), and version().
|
private |
the internal state
Referenced by addDLLIdName(), addDocumentStrings(), addUserFormat(), cleanState(), getNumSpreadsheets(), getPosition(), getSheetName(), Quattro9Spreadsheet(), readBeginColumn(), readBeginSheet(), readCellList(), readCellResult(), readCellStyles(), readColRowDefault(), readColRowDimension(), readColRowDimensions(), readDocumentFormulas(), readEndColumn(), readEndSheet(), readMergedCells(), sendCellContent(), sendSpreadsheet(), and version().