LotusSpreadsheet Class Reference

This class parses Microsoft Works spreadsheet file. More...

#include <LotusSpreadsheet.h>

List of all members.

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)
LotusSpreadsheetoperator= (LotusSpreadsheet const &orig)
libwps::DebugFileascii ()
 returns the debug file

Private Attributes

RVNGInputStreamPtr m_input
 the input
shared_ptr< WKSContentListenerm_listener
LotusParserm_mainParser
 the listener (if set)
shared_ptr< LotusStyleManagerm_styleManager
 the style manager
shared_ptr
< LotusSpreadsheetInternal::State
m_state
 the internal state
libwps::DebugFilem_asciiFile
 the ascii file

Friends

class LotusParser

Detailed Description

This class parses Microsoft Works spreadsheet file.


Constructor & Destructor Documentation


Member Function Documentation

bool LotusSpreadsheet::checkFilePosition ( long  pos) [protected]

return true if the pos is in the file, update the file size if need

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

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

send the cell data

Referenced by sendSpreadsheet().

void LotusSpreadsheet::sendSpreadsheet ( int  sheetId) [protected]

send the data

set the last spreadsheet number ( default 0)

sets the listener

update internal state (must be called one time before sending data)

int LotusSpreadsheet::version ( ) const [protected]

return the file version


Friends And Related Function Documentation

friend class LotusParser [friend]

Member Data Documentation

the ascii file

Referenced by ascii().

the listener (if set)

the main parser

Referenced by readRowFormats(), readSheetName(), sendSpreadsheet(), and version().

the style manager

Referenced by readRowFormat().


The documentation for this class was generated from the following files: