This class parses Microsoft Works spreadsheet file. More...
#include <WKS4Spreadsheet.h>
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) | |
| WKS4Spreadsheet & | operator= (WKS4Spreadsheet const &orig) |
| libwps::DebugFile & | ascii () |
| returns the debug file | |
Private Attributes | |
| RVNGInputStreamPtr | m_input |
| the input | |
| shared_ptr< WKSContentListener > | m_listener |
| WKS4Parser & | m_mainParser |
| the listener (if set) | |
| shared_ptr < WKS4SpreadsheetInternal::State > | m_state |
| the internal state | |
| libwps::DebugFile & | m_asciiFile |
| the ascii file | |
Friends | |
| class | WKS4Parser |
This class parses Microsoft Works spreadsheet file.
| WKS4Spreadsheet::WKS4Spreadsheet | ( | WKS4Parser & | parser | ) |
constructor
destructor
| WKS4Spreadsheet::WKS4Spreadsheet | ( | WKS4Spreadsheet const & | orig | ) | [private] |
| libwps::DebugFile& WKS4Spreadsheet::ascii | ( | ) | [inline, private] |
returns the debug file
Referenced by readCell(), readCellFormulaResult(), readColumnSize(), readColumnSize2(), readDOSCellExtraProperty(), readDOSCellProperty(), readDOSFieldProperty(), readDOSPageBreak(), readFilterClose(), readFilterOpen(), readFloat4(), readPageBreak(), readReportClose(), readReportOpen(), readRowSize2(), readSheetSize(), and readStyle().
| 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().
friend class WKS4Parser [friend] |
libwps::DebugFile& WKS4Spreadsheet::m_asciiFile [private] |
the ascii file
Referenced by ascii().
RVNGInputStreamPtr WKS4Spreadsheet::m_input [private] |
the input
Referenced by checkFilePosition(), readCell(), readCellFormulaResult(), readColumnSize(), readColumnSize2(), readDOSCellExtraProperty(), readDOSCellProperty(), readDOSFieldProperty(), readDOSPageBreak(), readFilterClose(), readFilterOpen(), readFloat4(), readFormula(), readNumber(), readPageBreak(), readReportClose(), readReportOpen(), readRowSize2(), readSheetSize(), readStyle(), and sendCellContent().
shared_ptr<WKSContentListener> WKS4Spreadsheet::m_listener [private] |
Referenced by sendCellContent(), sendSpreadsheet(), and setListener().
WKS4Parser& WKS4Spreadsheet::m_mainParser [private] |
the listener (if set)
the main parser
Referenced by readDOSCellExtraProperty(), readStyle(), and version().
shared_ptr<WKS4SpreadsheetInternal::State> WKS4Spreadsheet::m_state [private] |
the internal state
Referenced by checkFilePosition(), readCell(), readColumnSize(), readColumnSize2(), readDOSCellExtraProperty(), readDOSCellProperty(), readDOSPageBreak(), readFilterClose(), readFilterOpen(), readPageBreak(), readReportClose(), readReportOpen(), readRowSize2(), readSheetSize(), readStyle(), sendCellContent(), sendSpreadsheet(), version(), and WKS4Spreadsheet().