Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
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 | resetInput (RVNGInputStreamPtr const &input)
| reset the main input More...
int | getNumSpreadsheets () const
| returns the number of spreadsheet More...
void | sendSpreadsheet (int sId)
| send the sId'th spreadsheet More...
librevenge::RVNGString | getSheetName (int id) const
| returns the name of the id's spreadsheet 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 | readSheetSize ()
| reads sheet size More...
bool | readColumnSize ()
| reads the column size ( in ??? ) More...
bool | readHiddenColumns ()
| reads the list of hidden columns zone ( unused ) More...
bool | readMsWorksDOSFieldProperty ()
| reads a field property More...
bool | readMsWorksDOSCellProperty ()
| reads actualCell properties More...
bool | readMsWorksDOSCellExtraProperty ()
| reads the actual cell addendum properties ( contains at least the color) More...
bool | readMsWorksDOSPageBreak ()
| reads a page break (in a dos file) More...
bool | readMsWorksColumnSize ()
| reads the column size ( in ???) More...
bool | readMsWorksRowSize ()
| reads the row size ( in ???) More...
bool | readMsWorksPageBreak ()
| reads a page break More...
bool | readMsWorksStyle ()
| reads a style More...
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)=delete
WKS4Spreadsheet & | operator= (WKS4Spreadsheet const &orig)=delete
libwps::DebugFile & | ascii ()
| returns the debug file More...

## Private Attributes
RVNGInputStreamPtr | m_input
| the input More...
std::shared_ptr< WKSContentListener > | m_listener
WKS4Parser & | m_mainParser
| the listener (if set) More...
std::shared_ptr< WKS4SpreadsheetInternal::State > | m_state
| the internal state More...
libwps::DebugFile & | m_asciiFile
| the ascii file More...

## Friends
class | WKS4Parser

## Detailed Description

This class parses Microsoft Works spreadsheet file.

## Constructor & Destructor Documentation

## ◆ WKS4Spreadsheet() [1/2]

WKS4Spreadsheet::WKS4Spreadsheet | ( | WKS4Parser & | parser | ) |
| explicit

constructor

## ◆ ~WKS4Spreadsheet()

WKS4Spreadsheet::~WKS4Spreadsheet | ( |  | ) |

destructor

## ◆ WKS4Spreadsheet() [2/2]

WKS4Spreadsheet::WKS4Spreadsheet | ( | WKS4Spreadsheet const & | orig | ) |
| private delete

## Member Function Documentation

## ◆ ascii()

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

## ◆ checkFilePosition()

bool WKS4Spreadsheet::checkFilePosition | ( | long | pos | ) |
| protected

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

Referenced by readReportOpen().

## ◆ getNumSpreadsheets()

int WKS4Spreadsheet::getNumSpreadsheets | ( |  | ) | const
| protected

returns the number of spreadsheet

## ◆ getSheetName()

librevenge::RVNGString WKS4Spreadsheet::getSheetName | ( | int | id | ) | const
| protected

returns the name of the id's spreadsheet

## ◆ operator=()

WKS4Spreadsheet& WKS4Spreadsheet::operator= | ( | WKS4Spreadsheet const & | orig | ) |
| private delete

## ◆ readCell() [1/2]

bool WKS4Spreadsheet::readCell | ( |  | ) |
| protected

reads a cell content data

Referenced by readFormula().

## ◆ readCell() [2/2]

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

## ◆ readCellFormulaResult()

bool WKS4Spreadsheet::readCellFormulaResult | ( |  | ) |
| protected

reads the result of a text formula

## ◆ readColumnSize()

bool WKS4Spreadsheet::readColumnSize | ( |  | ) |
| protected

reads the column size ( in ??? )

## ◆ readFilterClose()

bool WKS4Spreadsheet::readFilterClose | ( |  | ) |
| protected

reads the filter's end zone 11:54

## ◆ readFilterOpen()

bool WKS4Spreadsheet::readFilterOpen | ( |  | ) |
| protected

reads the filter's header zone 10:54

## ◆ readFormula()

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

Referenced by readCell().

## ◆ readHiddenColumns()

bool WKS4Spreadsheet::readHiddenColumns | ( |  | ) |
| protected

reads the list of hidden columns zone ( unused )

## ◆ readMsWorksColumnSize()

bool WKS4Spreadsheet::readMsWorksColumnSize | ( |  | ) |
| protected

reads the column size ( in ???)

## ◆ readMsWorksDOSCellExtraProperty()

bool WKS4Spreadsheet::readMsWorksDOSCellExtraProperty | ( |  | ) |
| protected

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

## ◆ readMsWorksDOSCellProperty()

bool WKS4Spreadsheet::readMsWorksDOSCellProperty | ( |  | ) |
| protected

reads actualCell properties

## ◆ readMsWorksDOSFieldProperty()

bool WKS4Spreadsheet::readMsWorksDOSFieldProperty | ( |  | ) |
| protected

reads a field property

## ◆ readMsWorksDOSPageBreak()

bool WKS4Spreadsheet::readMsWorksDOSPageBreak | ( |  | ) |
| protected

reads a page break (in a dos file)

## ◆ readMsWorksPageBreak()

bool WKS4Spreadsheet::readMsWorksPageBreak | ( |  | ) |
| protected

reads a page break

## ◆ readMsWorksRowSize()

bool WKS4Spreadsheet::readMsWorksRowSize | ( |  | ) |
| protected

reads the row size ( in ???)

## ◆ readMsWorksStyle()

bool WKS4Spreadsheet::readMsWorksStyle | ( |  | ) |
| protected

reads a style

## ◆ readReportClose()

bool WKS4Spreadsheet::readReportClose | ( |  | ) |
| protected

reads the report's end zone 18:54

## ◆ readReportOpen()

bool WKS4Spreadsheet::readReportOpen | ( |  | ) |
| protected

reads the report's header zone 17:54

## ◆ readSheetSize()

bool WKS4Spreadsheet::readSheetSize | ( |  | ) |
| protected

reads sheet size

## ◆ resetInput()

void WKS4Spreadsheet::resetInput | ( | RVNGInputStreamPtr const & | input | ) |
| protected

reset the main input

## ◆ sendCellContent()

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

send the cell data

Referenced by sendSpreadsheet().

## ◆ sendSpreadsheet()

void WKS4Spreadsheet::sendSpreadsheet | ( | int | sId | ) |
| protected

send the sId'th spreadsheet

## ◆ setListener()

void WKS4Spreadsheet::setListener | ( | WKSContentListenerPtr & | listen | ) |
| inline

sets the listener

## ◆ version()

int WKS4Spreadsheet::version | ( |  | ) | const
| protected

return the file version

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

## Friends And Related Function Documentation

## ◆ WKS4Parser

friend class WKS4Parser
| friend

## Member Data Documentation

## ◆ m_asciiFile

libwps::DebugFile& WKS4Spreadsheet::m_asciiFile
| private

the ascii file

Referenced by ascii().

## ◆ m_input

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(), resetInput(), and sendCellContent().

## ◆ m_listener

std::shared_ptr<WKSContentListener> WKS4Spreadsheet::m_listener
| private

Referenced by sendCellContent(), sendSpreadsheet(), and setListener().

## ◆ m_mainParser

WKS4Parser& WKS4Spreadsheet::m_mainParser
| private

the listener (if set)

the main parser

Referenced by readCell(), readCellFormulaResult(), readMsWorksDOSCellExtraProperty(), readMsWorksDOSCellProperty(), readMsWorksDOSFieldProperty(), readMsWorksStyle(), readReportOpen(), sendCellContent(), and version().

## ◆ m_state

std::shared_ptr<WKS4SpreadsheetInternal::State> WKS4Spreadsheet::m_state
| private

the internal state

Referenced by checkFilePosition(), getNumSpreadsheets(), getSheetName(), readCell(), readColumnSize(), readFilterClose(), readFilterOpen(), readMsWorksColumnSize(), readMsWorksDOSCellExtraProperty(), readMsWorksDOSCellProperty(), readMsWorksDOSPageBreak(), readMsWorksPageBreak(), readMsWorksRowSize(), readMsWorksStyle(), readReportClose(), readReportOpen(), readSheetSize(), sendCellContent(), sendSpreadsheet(), version(), and WKS4Spreadsheet().

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

- WKS4Spreadsheet.h
- WKS4Spreadsheet.cpp