LotusSpreadsheet Class Reference

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...
 

Protected Member Functions

bool checkFilePosition (long pos)
 return true if the pos is in the file, update the file size if need More...
 
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)
 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...
 
bool readSheetName ()
 reads a sheet name More...
 
bool readColumnDefinition ()
 reads the columns definitions More...
 
bool readColumnSizes ()
 reads the column sizes ( in char ) More...
 
bool readRowFormats ()
 reads the row formats More...
 
bool readRowFormat (LotusSpreadsheetInternal::Style &style, int &numCell, long endPos)
 reads a cell's row format More...
 
bool readRowSizes (long endPos)
 reads the row size ( in pt*32 ) More...
 
bool readCell ()
 reads a cell More...
 
bool readCellName ()
 reads a cell or list of cell name More...
 
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 More...
 

Private Attributes

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

Friends

class LotusParser
 

Detailed Description

This class parses Microsoft Works spreadsheet file.

Constructor & Destructor Documentation

§ LotusSpreadsheet() [1/2]

LotusSpreadsheet::LotusSpreadsheet ( LotusParser parser)
explicit

constructor

§ ~LotusSpreadsheet()

LotusSpreadsheet::~LotusSpreadsheet ( )

destructor

§ LotusSpreadsheet() [2/2]

LotusSpreadsheet::LotusSpreadsheet ( LotusSpreadsheet const &  orig)
private

Member Function Documentation

§ ascii()

libwps::DebugFile& LotusSpreadsheet::ascii ( )
inlineprivate

§ checkFilePosition()

bool LotusSpreadsheet::checkFilePosition ( long  pos)
protected

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

§ cleanState()

void LotusSpreadsheet::cleanState ( )

clean internal state

§ hasSomeSpreadsheetData()

bool LotusSpreadsheet::hasSomeSpreadsheetData ( ) const
protected

returns true if some spreadsheet are defined

§ operator=()

LotusSpreadsheet& LotusSpreadsheet::operator= ( LotusSpreadsheet const &  orig)
private

§ readCell() [1/2]

bool LotusSpreadsheet::readCell ( )
protected

reads a cell

Referenced by readFormula().

§ readCell() [2/2]

bool LotusSpreadsheet::readCell ( int  sId,
bool  isList,
WKSContentListener::FormulaInstruction instr 
)
protected

§ readCellName()

bool LotusSpreadsheet::readCellName ( )
protected

reads a cell or list of cell name

§ readColumnDefinition()

bool LotusSpreadsheet::readColumnDefinition ( )
protected

reads the columns definitions

§ readColumnSizes()

bool LotusSpreadsheet::readColumnSizes ( )
protected

reads the column sizes ( in char )

§ readFormula()

bool LotusSpreadsheet::readFormula ( long  endPos,
int  sId,
bool  newFormula,
std::vector< WKSContentListener::FormulaInstruction > &  formula,
std::string &  error 
)
protected

Referenced by readCell().

§ readRowFormat()

bool LotusSpreadsheet::readRowFormat ( LotusSpreadsheetInternal::Style style,
int &  numCell,
long  endPos 
)
protected

reads a cell's row format

Referenced by readRowFormats().

§ readRowFormats()

bool LotusSpreadsheet::readRowFormats ( )
protected

reads the row formats

§ readRowSizes()

bool LotusSpreadsheet::readRowSizes ( long  endPos)
protected

reads the row size ( in pt*32 )

§ readSheetName()

bool LotusSpreadsheet::readSheetName ( )
protected

reads a sheet name

§ sendCellContent()

void LotusSpreadsheet::sendCellContent ( LotusSpreadsheetInternal::Cell const &  cell,
LotusSpreadsheetInternal::Style const &  style,
int  numRepeated = 1 
)
protected

send the cell data

Referenced by sendRowContent().

§ sendRowContent()

void LotusSpreadsheet::sendRowContent ( LotusSpreadsheetInternal::Spreadsheet const &  sheet,
int  row 
)
protected

send the cell data in a row

Note
this function does not call openSheetRow, closeSheetRow

Referenced by sendSpreadsheet().

§ sendSpreadsheet()

void LotusSpreadsheet::sendSpreadsheet ( int  sheetId)
protected

send the data

§ setLastSpreadsheetId()

void LotusSpreadsheet::setLastSpreadsheetId ( int  id)

set the last spreadsheet number ( default 0)

§ setListener()

void LotusSpreadsheet::setListener ( WKSContentListenerPtr listen)
inline

sets the listener

§ updateState()

void LotusSpreadsheet::updateState ( )

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

§ version()

int LotusSpreadsheet::version ( ) const
protected

return the file version

Friends And Related Function Documentation

§ LotusParser

friend class LotusParser
friend

Member Data Documentation

§ m_asciiFile

libwps::DebugFile& LotusSpreadsheet::m_asciiFile
private

the ascii file

§ m_input

§ m_listener

shared_ptr<WKSContentListener> LotusSpreadsheet::m_listener
private

§ m_mainParser

LotusParser& LotusSpreadsheet::m_mainParser
private

the listener (if set)

the main parser

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

§ m_state

§ m_styleManager

shared_ptr<LotusStyleManager> LotusSpreadsheet::m_styleManager
private

the style manager

Referenced by readRowFormat().


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

Generated on Wed Nov 2 2016 05:07:34 for libwps by doxygen 1.8.12