WKS4Spreadsheet Class Reference

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

#include <WKS4Spreadsheet.h>

Public Member Functions

 WKS4Spreadsheet (WKS4Parser &parser)
 constructor More...
 
 ~WKS4Spreadsheet ()
 destructor More...
 
void setListener (WKSContentListenerPtr &listen)
 sets the listener 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...
 
void sendSpreadsheet ()
 send the data More...
 
void sendCellContent (WKS4SpreadsheetInternal::Cell const &cell)
 send the cell data More...
 
bool readReportOpen ()
 reads the report's header zone 17:54 More...
 
bool readReportClose ()
 reads the report's end zone 18:54 More...
 
bool readFilterOpen ()
 reads the filter's header zone 10:54 More...
 
bool readFilterClose ()
 reads the filter's end zone 11:54 More...
 
bool readCell ()
 reads a cell content data More...
 
bool readCellFormulaResult ()
 reads the result of a text formula More...
 
bool readStyle ()
 reads a style More...
 
bool readDOSFieldProperty ()
 reads a field property More...
 
bool readDOSCellProperty ()
 reads actualCell properties More...
 
bool readDOSCellExtraProperty ()
 reads the actual cell addendum properties ( contains at least the color) More...
 
bool readDOSPageBreak ()
 reads a page break (in a dos file) More...
 
bool readSheetSize ()
 reads sheet size More...
 
bool readPageBreak ()
 reads a page break More...
 
bool readColumnSize ()
 reads the column size ( in ??? ) More...
 
bool readColumnSize2 ()
 reads the column size ( in ???) More...
 
bool readRowSize2 ()
 reads the row size ( in ???) More...
 
bool readCell (Vec2i actPos, WKSContentListener::FormulaInstruction &instr)
 
bool readNumber (long endPos, double &res)
 
bool readFloat4 (long endPos, double &res)
 
bool readFormula (long endPos, Vec2i const &pos, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error)
 

Private Member Functions

 WKS4Spreadsheet (WKS4Spreadsheet const &orig)
 
WKS4Spreadsheetoperator= (WKS4Spreadsheet const &orig)
 
libwps::DebugFileascii ()
 returns the debug file More...
 

Private Attributes

RVNGInputStreamPtr m_input
 the input More...
 
shared_ptr< WKSContentListenerm_listener
 
WKS4Parserm_mainParser
 the listener (if set) More...
 
shared_ptr
< WKS4SpreadsheetInternal::State
m_state
 the internal state More...
 
libwps::DebugFilem_asciiFile
 the ascii file More...
 

Friends

class WKS4Parser
 

Detailed Description

This class parses Microsoft Works spreadsheet file.

Constructor & Destructor Documentation

WKS4Spreadsheet::WKS4Spreadsheet ( WKS4Parser parser)

constructor

WKS4Spreadsheet::~WKS4Spreadsheet ( )

destructor

WKS4Spreadsheet::WKS4Spreadsheet ( WKS4Spreadsheet const &  orig)
private

Member Function Documentation

bool WKS4Spreadsheet::checkFilePosition ( long  pos)
protected

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

Referenced by readReportOpen().

WKS4Spreadsheet& WKS4Spreadsheet::operator= ( WKS4Spreadsheet const &  orig)
private
bool WKS4Spreadsheet::readCell ( )
protected

reads a cell content data

Referenced by readFormula().

bool WKS4Spreadsheet::readCell ( Vec2i  actPos,
WKSContentListener::FormulaInstruction instr 
)
protected
bool WKS4Spreadsheet::readCellFormulaResult ( )
protected

reads the result of a text formula

bool WKS4Spreadsheet::readColumnSize ( )
protected

reads the column size ( in ??? )

bool WKS4Spreadsheet::readColumnSize2 ( )
protected

reads the column size ( in ???)

bool WKS4Spreadsheet::readDOSCellExtraProperty ( )
protected

reads the actual cell addendum properties ( contains at least the color)

bool WKS4Spreadsheet::readDOSCellProperty ( )
protected

reads actualCell properties

bool WKS4Spreadsheet::readDOSFieldProperty ( )
protected

reads a field property

bool WKS4Spreadsheet::readDOSPageBreak ( )
protected

reads a page break (in a dos file)

bool WKS4Spreadsheet::readFilterClose ( )
protected

reads the filter's end zone 11:54

bool WKS4Spreadsheet::readFilterOpen ( )
protected

reads the filter's header zone 10:54

bool WKS4Spreadsheet::readFloat4 ( long  endPos,
double &  res 
)
protected

first small byte is used to decide if we store 100*N or N. Does the second small bute has also a meaning ? It find some file where the third some bytes is set, so this one is normal...

Referenced by readCell().

bool WKS4Spreadsheet::readFormula ( long  endPos,
Vec2i const &  pos,
std::vector< WKSContentListener::FormulaInstruction > &  formula,
std::string &  error 
)
protected

Referenced by readCell().

bool WKS4Spreadsheet::readNumber ( long  endPos,
double &  res 
)
protected

Referenced by readCell(), and readFormula().

bool WKS4Spreadsheet::readPageBreak ( )
protected

reads a page break

bool WKS4Spreadsheet::readReportClose ( )
protected

reads the report's end zone 18:54

bool WKS4Spreadsheet::readReportOpen ( )
protected

reads the report's header zone 17:54

bool WKS4Spreadsheet::readRowSize2 ( )
protected

reads the row size ( in ???)

bool WKS4Spreadsheet::readSheetSize ( )
protected

reads sheet size

bool WKS4Spreadsheet::readStyle ( )
protected

reads a style

void WKS4Spreadsheet::sendCellContent ( WKS4SpreadsheetInternal::Cell const &  cell)
protected

send the cell data

Referenced by sendSpreadsheet().

void WKS4Spreadsheet::sendSpreadsheet ( )
protected

send the data

void WKS4Spreadsheet::setListener ( WKSContentListenerPtr listen)
inline

sets the listener

int WKS4Spreadsheet::version ( ) const
protected

return the file version

Referenced by readCell(), readCellFormulaResult(), readFormula(), readStyle(), and sendCellContent().

Friends And Related Function Documentation

friend class WKS4Parser
friend

Member Data Documentation

libwps::DebugFile& WKS4Spreadsheet::m_asciiFile
private

the ascii file

Referenced by ascii().

shared_ptr<WKSContentListener> WKS4Spreadsheet::m_listener
private
WKS4Parser& WKS4Spreadsheet::m_mainParser
private

the listener (if set)

the main parser

Referenced by readDOSCellExtraProperty(), readStyle(), and version().


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

Generated on Thu Oct 9 2014 14:30:04 for libwps by doxygen 1.8.8