This class parses Microsoft Works spreadsheet file. More...
#include <LotusSpreadsheet.h>
Public Member Functions | |
LotusSpreadsheet (LotusParser &parser) | |
constructor More... | |
~LotusSpreadsheet () | |
destructor More... | |
void | cleanState () |
clean internal state More... | |
void | updateState () |
update internal state (must be called one time before sending data) More... | |
void | setListener (WKSContentListenerPtr &listen) |
sets the listener More... | |
void | setLastSpreadsheetId (int id) |
set the last spreadsheet number ( default 0) More... | |
bool | getLeftTopPosition (Vec2i const &cell, int spreadsheet, Vec2f &pos) |
returns the left top position of a cell More... | |
Protected Member Functions | |
int | version () const |
return the file version More... | |
bool | hasSomeSpreadsheetData () const |
returns true if some spreadsheet are defined More... | |
void | sendSpreadsheet (int sheetId) |
send the data More... | |
void | sendRowContent (LotusSpreadsheetInternal::Spreadsheet const &sheet, int row, LotusSpreadsheetInternal::Table123Styles const *table123Styles) |
send the cell data in a row More... | |
void | sendCellContent (LotusSpreadsheetInternal::Cell const &cell, LotusSpreadsheetInternal::Style const &style, int numRepeated=1) |
send the cell data More... | |
void | sendText (RVNGInputStreamPtr &input, long endPos, LotusSpreadsheetInternal::Style const &style) const |
try to send a formated text More... | |
void | sendTextNote (RVNGInputStreamPtr &input, WPSEntry const &entry) const |
try to send a note More... | |
bool | readSheetName (shared_ptr< WPSStream > stream) |
reads a sheet name: zone 0x23 More... | |
bool | readSheetName1B (shared_ptr< WPSStream > stream, long endPos) |
reads a sheet name: zone 0x1b 36b0 More... | |
bool | readCellsFormat801 (shared_ptr< WPSStream > stream, WPSVec3i const &minC, WPSVec3i const &maxC, int typeZone) |
reads a cell zone formats: zone 801, lotus 123 More... | |
bool | readColumnDefinition (shared_ptr< WPSStream > stream) |
reads the columns definitions More... | |
bool | readColumnSizes (shared_ptr< WPSStream > stream) |
reads the column sizes ( in char ) More... | |
bool | readRowFormats (shared_ptr< WPSStream > stream) |
reads the row formats More... | |
bool | readRowFormat (shared_ptr< WPSStream > stream, LotusSpreadsheetInternal::Style &style, int &numCell, long endPos) |
reads a cell's row format More... | |
bool | readRowSizes (shared_ptr< WPSStream > stream, long endPos) |
reads the row size ( in pt*32 ) More... | |
bool | readCell (shared_ptr< WPSStream > stream) |
reads a cell More... | |
bool | readCellName (shared_ptr< WPSStream > stream) |
reads a cell or list of cell name More... | |
bool | readSheetHeader (shared_ptr< WPSStream > stream) |
try to read a sheet header: 0xc3 More... | |
bool | readExtraRowFormats (shared_ptr< WPSStream > stream) |
try to read an extra row format: 0xc5 More... | |
bool | readNote (shared_ptr< WPSStream > stream, long endPos) |
try to read a note: subZone id 9065 More... | |
bool | readCell (WPSStream &stream, int sId, bool isList, WKSContentListener::FormulaInstruction &instr) |
bool | readFormula (WPSStream &stream, long endPos, int sId, bool newFormula, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error) |
Static Protected Member Functions | |
static std::string | getDebugStringForText (std::string const &text) |
small debug function used to print text with format sequence More... | |
Private Member Functions | |
LotusSpreadsheet (LotusSpreadsheet const &orig) | |
LotusSpreadsheet & | operator= (LotusSpreadsheet const &orig) |
Private Attributes | |
shared_ptr< WKSContentListener > | m_listener |
LotusParser & | m_mainParser |
the listener (if set) More... | |
shared_ptr< LotusStyleManager > | m_styleManager |
the style manager More... | |
shared_ptr < LotusSpreadsheetInternal::State > | m_state |
the internal state More... | |
Friends | |
class | LotusParser |
class | LotusSpreadsheetInternal::SubDocument |
This class parses Microsoft Works spreadsheet file.
|
explicit |
constructor
LotusSpreadsheet::~LotusSpreadsheet | ( | ) |
destructor
|
private |
void LotusSpreadsheet::cleanState | ( | ) |
clean internal state
|
staticprotected |
small debug function used to print text with format sequence
Referenced by readCell(), and readNote().
returns the left top position of a cell
|
protected |
returns true if some spreadsheet are defined
|
private |
|
protected |
reads a cell
Referenced by readFormula().
|
protected |
|
protected |
reads a cell or list of cell name
|
protected |
reads a cell zone formats: zone 801, lotus 123
|
protected |
reads the columns definitions
|
protected |
reads the column sizes ( in char )
|
protected |
try to read an extra row format: 0xc5
|
protected |
Referenced by readCell().
|
protected |
try to read a note: subZone id 9065
|
protected |
reads a cell's row format
Referenced by readRowFormats().
|
protected |
reads the row formats
|
protected |
reads the row size ( in pt*32 )
|
protected |
try to read a sheet header: 0xc3
|
protected |
reads a sheet name: zone 0x23
|
protected |
reads a sheet name: zone 0x1b 36b0
|
protected |
send the cell data
Referenced by sendRowContent().
|
protected |
send the cell data in a row
Referenced by sendSpreadsheet().
|
protected |
send the data
|
protected |
try to send a formated text
Referenced by sendCellContent().
|
protected |
try to send a note
Referenced by LotusSpreadsheetInternal::SubDocument::parse().
void LotusSpreadsheet::setLastSpreadsheetId | ( | int | id | ) |
set the last spreadsheet number ( default 0)
|
inline |
sets the listener
void LotusSpreadsheet::updateState | ( | ) |
update internal state (must be called one time before sending data)
|
protected |
return the file version
Referenced by readCellsFormat801(), and readRowFormat().
|
friend |
|
friend |
|
private |
Referenced by sendCellContent(), sendRowContent(), sendSpreadsheet(), sendText(), sendTextNote(), and setListener().
|
private |
the listener (if set)
the main parser
Referenced by readRowFormats(), readSheetName(), readSheetName1B(), sendRowContent(), sendSpreadsheet(), sendTextNote(), and version().
|
private |
the internal state
Referenced by cleanState(), getLeftTopPosition(), hasSomeSpreadsheetData(), readCell(), readCellName(), readCellsFormat801(), readColumnDefinition(), readColumnSizes(), readExtraRowFormats(), readFormula(), readRowFormats(), readRowSizes(), readSheetHeader(), readSheetName(), readSheetName1B(), sendRowContent(), sendSpreadsheet(), setLastSpreadsheetId(), updateState(), and version().
|
private |
the style manager
Referenced by readCellsFormat801(), readExtraRowFormats(), readRowFormat(), sendRowContent(), and sendText().