This class parses Microsoft Works spreadsheet file. More...
#include <LotusSpreadsheet.h>
Public Member Functions | |
LotusSpreadsheet (LotusParser &parser) | |
constructor | |
~LotusSpreadsheet () | |
destructor | |
void | cleanState () |
clean internal state | |
void | updateState () |
update internal state (must be called one time before sending data) | |
void | setListener (WKSContentListenerPtr &listen) |
sets the listener | |
void | setLastSpreadsheetId (int id) |
set the last spreadsheet number ( default 0) | |
Protected Member Functions | |
bool | checkFilePosition (long pos) |
return true if the pos is in the file, update the file size if need | |
int | version () const |
return the file version | |
bool | hasSomeSpreadsheetData () const |
returns true if some spreadshet are defined | |
void | sendSpreadsheet (int sheetId) |
send the data | |
void | sendCellContent (LotusSpreadsheetInternal::Cell const &cell, LotusSpreadsheetInternal::Style const &style) |
send the cell data | |
bool | readSheetName () |
reads a sheet name | |
bool | readColumnDefinition () |
reads the columns definitions | |
bool | readColumnSizes () |
reads the column sizes ( in char ) | |
bool | readRowFormats () |
reads the row formats | |
bool | readRowFormat (LotusSpreadsheetInternal::Style &style, int &numCell, long endPos) |
reads a cell's row format | |
bool | readRowSizes (long endPos) |
reads the row size ( in pt*32 ) | |
bool | readCell () |
reads a cell | |
bool | readCellName () |
reads a cell or list of cell name | |
bool | readCell (int sId, bool isList, WKSContentListener::FormulaInstruction &instr) |
bool | readFormula (long endPos, int sId, bool newFormula, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error) |
Private Member Functions | |
LotusSpreadsheet (LotusSpreadsheet const &orig) | |
LotusSpreadsheet & | operator= (LotusSpreadsheet const &orig) |
libwps::DebugFile & | ascii () |
returns the debug file | |
Private Attributes | |
RVNGInputStreamPtr | m_input |
the input | |
shared_ptr< WKSContentListener > | m_listener |
LotusParser & | m_mainParser |
the listener (if set) | |
shared_ptr< LotusStyleManager > | m_styleManager |
the style manager | |
shared_ptr < LotusSpreadsheetInternal::State > | m_state |
the internal state | |
libwps::DebugFile & | m_asciiFile |
the ascii file | |
Friends | |
class | LotusParser |
This class parses Microsoft Works spreadsheet file.
LotusSpreadsheet::LotusSpreadsheet | ( | LotusParser & | parser | ) |
constructor
destructor
LotusSpreadsheet::LotusSpreadsheet | ( | LotusSpreadsheet const & | orig | ) | [private] |
libwps::DebugFile& LotusSpreadsheet::ascii | ( | ) | [inline, private] |
returns the debug file
Referenced by readCell(), readCellName(), readColumnDefinition(), readColumnSizes(), readRowFormats(), readRowSizes(), and readSheetName().
bool LotusSpreadsheet::checkFilePosition | ( | long | pos | ) | [protected] |
return true if the pos is in the file, update the file size if need
void LotusSpreadsheet::cleanState | ( | ) |
clean internal state
bool LotusSpreadsheet::hasSomeSpreadsheetData | ( | ) | const [protected] |
returns true if some spreadshet are defined
LotusSpreadsheet& LotusSpreadsheet::operator= | ( | LotusSpreadsheet const & | orig | ) | [private] |
bool LotusSpreadsheet::readCell | ( | ) | [protected] |
reads a cell
Referenced by readFormula().
bool LotusSpreadsheet::readCell | ( | int | sId, |
bool | isList, | ||
WKSContentListener::FormulaInstruction & | instr | ||
) | [protected] |
bool LotusSpreadsheet::readCellName | ( | ) | [protected] |
reads a cell or list of cell name
bool LotusSpreadsheet::readColumnDefinition | ( | ) | [protected] |
reads the columns definitions
bool LotusSpreadsheet::readColumnSizes | ( | ) | [protected] |
reads the column sizes ( in char )
bool LotusSpreadsheet::readFormula | ( | long | endPos, |
int | sId, | ||
bool | newFormula, | ||
std::vector< WKSContentListener::FormulaInstruction > & | formula, | ||
std::string & | error | ||
) | [protected] |
Referenced by readCell().
bool LotusSpreadsheet::readRowFormat | ( | LotusSpreadsheetInternal::Style & | style, |
int & | numCell, | ||
long | endPos | ||
) | [protected] |
reads a cell's row format
Referenced by readRowFormats().
bool LotusSpreadsheet::readRowFormats | ( | ) | [protected] |
reads the row formats
bool LotusSpreadsheet::readRowSizes | ( | long | endPos | ) | [protected] |
reads the row size ( in pt*32 )
bool LotusSpreadsheet::readSheetName | ( | ) | [protected] |
reads a sheet name
void LotusSpreadsheet::sendCellContent | ( | LotusSpreadsheetInternal::Cell const & | cell, |
LotusSpreadsheetInternal::Style const & | style | ||
) | [protected] |
send the cell data
Referenced by sendSpreadsheet().
void LotusSpreadsheet::sendSpreadsheet | ( | int | sheetId | ) | [protected] |
send the data
void LotusSpreadsheet::setLastSpreadsheetId | ( | int | id | ) |
set the last spreadsheet number ( default 0)
void LotusSpreadsheet::setListener | ( | WKSContentListenerPtr & | listen | ) | [inline] |
sets the listener
void LotusSpreadsheet::updateState | ( | ) |
update internal state (must be called one time before sending data)
int LotusSpreadsheet::version | ( | ) | const [protected] |
return the file version
friend class LotusParser [friend] |
libwps::DebugFile& LotusSpreadsheet::m_asciiFile [private] |
the ascii file
Referenced by ascii().
RVNGInputStreamPtr LotusSpreadsheet::m_input [private] |
the input
Referenced by checkFilePosition(), readCell(), readCellName(), readColumnDefinition(), readColumnSizes(), readFormula(), readRowFormat(), readRowFormats(), readRowSizes(), readSheetName(), and sendCellContent().
shared_ptr<WKSContentListener> LotusSpreadsheet::m_listener [private] |
Referenced by sendCellContent(), sendSpreadsheet(), and setListener().
LotusParser& LotusSpreadsheet::m_mainParser [private] |
the listener (if set)
the main parser
Referenced by readRowFormats(), readSheetName(), sendSpreadsheet(), and version().
shared_ptr<LotusSpreadsheetInternal::State> LotusSpreadsheet::m_state [private] |
the internal state
Referenced by checkFilePosition(), cleanState(), hasSomeSpreadsheetData(), LotusSpreadsheet(), readCell(), readCellName(), readColumnDefinition(), readColumnSizes(), readFormula(), readRowFormats(), readRowSizes(), readSheetName(), sendSpreadsheet(), setLastSpreadsheetId(), updateState(), and version().
shared_ptr<LotusStyleManager> LotusSpreadsheet::m_styleManager [private] |
the style manager
Referenced by readRowFormat().