WKS4Spreadsheet Class Reference

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

#include <WKS4Spreadsheet.h>

List of all members.

Public Member Functions

 WKS4Spreadsheet (WKS4Parser &parser)
 constructor
 ~WKS4Spreadsheet ()
 destructor
void setListener (WKSContentListenerPtr &listen)
 sets the listener

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
void sendSpreadsheet ()
 send the data
void sendCellContent (WKS4SpreadsheetInternal::Cell const &cell)
 send the cell data
bool readReportOpen ()
 reads the report's header zone 17:54
bool readReportClose ()
 reads the report's end zone 18:54
bool readFilterOpen ()
 reads the filter's header zone 10:54
bool readFilterClose ()
 reads the filter's end zone 11:54
bool readCell ()
 reads a cell content data
bool readCellFormulaResult ()
 reads the result of a text formula
bool readStyle ()
 reads a style
bool readDOSFieldProperty ()
 reads a field property
bool readDOSCellProperty ()
 reads actualCell properties
bool readDOSCellExtraProperty ()
 reads the actual cell addendum properties ( contains at least the color)
bool readDOSPageBreak ()
 reads a page break (in a dos file)
bool readSheetSize ()
 reads sheet size
bool readPageBreak ()
 reads a page break
bool readColumnSize ()
 reads the column size ( in ??? )
bool readColumnSize2 ()
 reads the column size ( in ???)
bool readRowSize2 ()
 reads the row size ( in ???)
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

Private Attributes

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

Friends

class WKS4Parser

Detailed Description

This class parses Microsoft Works spreadsheet file.


Constructor & Destructor Documentation

constructor


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]

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 ???)

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

reads actualCell properties

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

send the cell data

Referenced by sendSpreadsheet().

void WKS4Spreadsheet::sendSpreadsheet ( ) [protected]

send the data

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

the ascii file

Referenced by ascii().

the listener (if set)

the main parser

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


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