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 | |
| bool | hasLICSCharacters () const |
| returns the true if the file has LICS characters | |
| int | getNumSpreadsheets () const |
| returns the number of spreadsheet | |
| void | sendSpreadsheet (int sId) |
| send the sId'th spreadsheet | |
| 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 | readSheetSize () |
| reads sheet size | |
| bool | readColumnSize () |
| reads the column size ( in ??? ) | |
| bool | readHiddenColumns () |
| reads the list of hidden columns zone ( unused ) | |
| bool | readMsWorksDOSFieldProperty () |
| reads a field property | |
| bool | readMsWorksDOSCellProperty () |
| reads actualCell properties | |
| bool | readMsWorksDOSCellExtraProperty () |
| reads the actual cell addendum properties ( contains at least the color) | |
| bool | readMsWorksDOSPageBreak () |
| reads a page break (in a dos file) | |
| bool | readMsWorksColumnSize () |
| reads the column size ( in ???) | |
| bool | readMsWorksRowSize () |
| reads the row size ( in ???) | |
| bool | readMsWorksPageBreak () |
| reads a page break | |
| bool | readMsWorksStyle () |
| reads a style | |
| bool | readCell (Vec2i actPos, WKSContentListener::FormulaInstruction &instr) |
| 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(), readFilterClose(), readFilterOpen(), readFormula(), readHiddenColumns(), readMsWorksColumnSize(), readMsWorksDOSCellExtraProperty(), readMsWorksDOSCellProperty(), readMsWorksDOSFieldProperty(), readMsWorksDOSPageBreak(), readMsWorksPageBreak(), readMsWorksRowSize(), readMsWorksStyle(), readReportClose(), readReportOpen(), and readSheetSize().
| bool WKS4Spreadsheet::checkFilePosition | ( | long | pos | ) | [protected] |
return true if the pos is in the file, update the file size if need
Referenced by readReportOpen().
| int WKS4Spreadsheet::getNumSpreadsheets | ( | ) | const [protected] |
returns the number of spreadsheet
| bool WKS4Spreadsheet::hasLICSCharacters | ( | ) | const [protected] |
returns the true if the file has LICS characters
Referenced by sendCellContent().
| 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::readFilterClose | ( | ) | [protected] |
reads the filter's end zone 11:54
| bool WKS4Spreadsheet::readFilterOpen | ( | ) | [protected] |
reads the filter's header zone 10:54
| bool WKS4Spreadsheet::readFormula | ( | long | endPos, |
| Vec2i const & | pos, | ||
| std::vector< WKSContentListener::FormulaInstruction > & | formula, | ||
| std::string & | error | ||
| ) | [protected] |
Referenced by readCell().
| bool WKS4Spreadsheet::readHiddenColumns | ( | ) | [protected] |
reads the list of hidden columns zone ( unused )
| bool WKS4Spreadsheet::readMsWorksColumnSize | ( | ) | [protected] |
reads the column size ( in ???)
| bool WKS4Spreadsheet::readMsWorksDOSCellExtraProperty | ( | ) | [protected] |
reads the actual cell addendum properties ( contains at least the color)
| bool WKS4Spreadsheet::readMsWorksDOSCellProperty | ( | ) | [protected] |
reads actualCell properties
| bool WKS4Spreadsheet::readMsWorksDOSFieldProperty | ( | ) | [protected] |
reads a field property
| bool WKS4Spreadsheet::readMsWorksDOSPageBreak | ( | ) | [protected] |
reads a page break (in a dos file)
| bool WKS4Spreadsheet::readMsWorksPageBreak | ( | ) | [protected] |
reads a page break
| bool WKS4Spreadsheet::readMsWorksRowSize | ( | ) | [protected] |
reads the row size ( in ???)
| bool WKS4Spreadsheet::readMsWorksStyle | ( | ) | [protected] |
reads a style
| 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::readSheetSize | ( | ) | [protected] |
reads sheet size
| void WKS4Spreadsheet::sendCellContent | ( | WKS4SpreadsheetInternal::Cell const & | cell | ) | [protected] |
send the cell data
Referenced by sendSpreadsheet().
| void WKS4Spreadsheet::sendSpreadsheet | ( | int | sId | ) | [protected] |
send the sId'th spreadsheet
| void WKS4Spreadsheet::setListener | ( | WKSContentListenerPtr & | listen | ) | [inline] |
sets the listener
| int WKS4Spreadsheet::version | ( | ) | const [protected] |
return the file version
Referenced by readCell(), readCellFormulaResult(), readFormula(), 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(), readFilterClose(), readFilterOpen(), readFormula(), readHiddenColumns(), readMsWorksColumnSize(), readMsWorksDOSCellExtraProperty(), readMsWorksDOSCellProperty(), readMsWorksDOSFieldProperty(), readMsWorksDOSPageBreak(), readMsWorksPageBreak(), readMsWorksRowSize(), readMsWorksStyle(), readReportClose(), readReportOpen(), readSheetSize(), 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 hasLICSCharacters(), readCell(), readMsWorksDOSCellExtraProperty(), readMsWorksDOSCellProperty(), readMsWorksDOSFieldProperty(), readMsWorksStyle(), sendCellContent(), and version().
shared_ptr<WKS4SpreadsheetInternal::State> WKS4Spreadsheet::m_state [private] |
the internal state
Referenced by checkFilePosition(), getNumSpreadsheets(), hasLICSCharacters(), readCell(), readColumnSize(), readFilterClose(), readFilterOpen(), readMsWorksColumnSize(), readMsWorksDOSCellExtraProperty(), readMsWorksDOSCellProperty(), readMsWorksDOSPageBreak(), readMsWorksPageBreak(), readMsWorksRowSize(), readMsWorksStyle(), readReportClose(), readReportOpen(), readSheetSize(), sendCellContent(), sendSpreadsheet(), version(), and WKS4Spreadsheet().