This class parses Quattro Pro spreadsheet file. More...
#include <QuattroSpreadsheet.h>
Public Member Functions | |
QuattroSpreadsheet (QuattroParser &parser) | |
constructor | |
~QuattroSpreadsheet () | |
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, std::vector< Vec2i > const &listGraphicCells) |
send the sheetId'th spreadsheet | |
Vec2f | getPosition (int sheetId, Vec2i const &cell) const |
returns the beginning position of a cell | |
void | sendCellContent (QuattroSpreadsheetInternal::Cell const &cell, int sheetId) |
send the cell data | |
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 | |
bool | readCell (std::shared_ptr< WPSStream > const &stream) |
reads a cell content data: zone 0xc-0x10 or 33 | |
bool | readSheetSize (std::shared_ptr< WPSStream > const &stream) |
reads sheet size: zone 06 | |
bool | readColumnRowDefaultSize (std::shared_ptr< WPSStream > const &stream) |
reads the sheet column/row default size: zone d2-d5 | |
bool | readColumnSize (std::shared_ptr< WPSStream > const &stream) |
reads the column size: zone d8,d9 | |
bool | readRowSize (std::shared_ptr< WPSStream > const &stream) |
reads the row size: zone d6,d7 | |
bool | readRowRangeSize (std::shared_ptr< WPSStream > const &stream) |
reads the row size: zone 105,106 | |
bool | readBeginEndSheet (std::shared_ptr< WPSStream > const &stream, int &sheetId) |
read the begin/end of a sheet zone: zone ca and cb | |
bool | readSheetName (std::shared_ptr< WPSStream > const &stream) |
reads sheet name: zone cc | |
bool | readCellStyle (std::shared_ptr< WPSStream > const &stream) |
reads a cell attribute: zone 0xce | |
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 | readViewInfo (std::shared_ptr< WPSStream > const &stream) |
reads a view info: zone 197/198 | |
static bool | readCell (std::shared_ptr< WPSStream > const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName) |
static void | updateCellWithUserFormat (QuattroSpreadsheetInternal::Cell &cell, librevenge::RVNGString const &format) |
try to update the cell's format using the user format |
Private Member Functions | |
QuattroSpreadsheet (QuattroSpreadsheet const &orig)=delete | |
QuattroSpreadsheet & | operator= (QuattroSpreadsheet const &orig)=delete |
Private Attributes | |
std::shared_ptr< WKSContentListener > | m_listener |
QuattroParser & | m_mainParser |
the listener (if set) | |
std::shared_ptr< QuattroSpreadsheetInternal::State > | m_state |
the internal state |
Friends | |
class | QuattroParser |
This class parses Quattro Pro spreadsheet file.
|
explicit |
constructor
Referenced by operator=(), and QuattroSpreadsheet().
QuattroSpreadsheet::~QuattroSpreadsheet | ( | ) |
destructor
|
privatedelete |
|
protected |
add a dll's correspondance between an id and a name
|
protected |
add a user format's correspondance between an id and a name
void QuattroSpreadsheet::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 QuattroSpreadsheet().
|
protected |
returns the name of the id's spreadsheet
Referenced by sendCellContent().
|
privatedelete |
|
protected |
read the begin/end of a sheet zone: zone ca and cb
|
protected |
reads a cell content data: zone 0xc-0x10 or 33
Referenced by readCellReference().
|
staticprotected |
|
protected |
try to read a cell reference
Referenced by getReadCellReferenceFunction(), and readCellReference().
|
protected |
reads a cell attribute: zone 0xce
|
protected |
reads the sheet column/row default size: zone d2-d5
|
protected |
reads the column size: zone d8,d9
|
protected |
reads the row size: zone 105,106
|
protected |
reads the row size: zone d6,d7
|
protected |
reads sheet name: zone cc
|
protected |
reads sheet size: zone 06
|
staticprotected |
reads a view info: zone 197/198
|
protected |
send the cell data
Referenced by sendSpreadsheet().
|
protected |
send the sheetId'th spreadsheet
|
inline |
sets the listener
|
staticprotected |
try to update the cell's format using the user format
Referenced by sendCellContent().
void QuattroSpreadsheet::updateState | ( | ) |
update the state (need to be called before sending data)
|
protected |
return the file version
|
friend |
Referenced by QuattroParser, and QuattroSpreadsheet().
|
private |
Referenced by QuattroSpreadsheet(), sendCellContent(), sendSpreadsheet(), and setListener().
|
private |
the listener (if set)
the main parser
Referenced by QuattroSpreadsheet(), readCell(), readCellReference(), readCellStyle(), readColumnRowDefaultSize(), readColumnSize(), readRowRangeSize(), readRowSize(), readSheetName(), sendCellContent(), sendSpreadsheet(), and version().
|
private |
the internal state
Referenced by addDLLIdName(), addUserFormat(), cleanState(), getNumSpreadsheets(), getPosition(), getSheetName(), QuattroSpreadsheet(), readBeginEndSheet(), readCell(), readCellStyle(), readColumnRowDefaultSize(), readColumnSize(), readRowRangeSize(), readRowSize(), readSheetName(), readSheetSize(), sendCellContent(), sendSpreadsheet(), and version().