QuattroSpreadsheet Class Reference documentation

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
QuattroSpreadsheet Class Reference

This class parses Quattro Pro DOS spreadsheet file. More...

`#include <QuattroSpreadsheet.h>`

## Public Member Functions
| QuattroSpreadsheet (QuattroParser &parser)
| constructor More...
| ~QuattroSpreadsheet ()
| destructor More...
void | setListener (WKSContentListenerPtr &listen)
| sets the listener More...
void | cleanState ()
| clean internal state More...
void | updateState ()
| update the state (need to be called before sending data) More...

## Protected Member Functions
int | version () const
| return the file version More...
int | getNumSpreadsheets () const
| returns the number of spreadsheet More...
librevenge::RVNGString | getSheetName (int id) const
| returns the name of the id's spreadsheet More...
void | sendSpreadsheet (int sheetId, std::vector< Vec2i > const &listGraphicCells)
| send the sId'th spreadsheet More...
void | sendCellContent (QuattroSpreadsheetInternal::Cell const &cell, int sheetId)
| send the cell data More...
void | addDLLIdName (int id, librevenge::RVNGString const &name, bool func1)
| add a dll's correspondance between an id and a name More...
void | addUserFormat (int id, librevenge::RVNGString const &name)
| add a user format's correspondance between an id and a name More...
bool | readCell (std::shared_ptr< WPSStream > stream)
| reads a cell content data: zone 0xc-0x10 or 33 More...
bool | readSheetSize (std::shared_ptr< WPSStream > stream)
| reads sheet size: zone 06 More...
bool | readColumnSize (std::shared_ptr< WPSStream > stream)
| reads the column size ( in ??? ) More...
bool | readRowSize (std::shared_ptr< WPSStream > stream)
| reads the row size: zone d6 More...
bool | readBeginEndSheet (std::shared_ptr< WPSStream > stream, int &sheetId)
| read the begin/end of a sheet zone: zone ca and cb More...
bool | readSheetName (std::shared_ptr< WPSStream > stream)
| reads sheet name: zone cc More...
bool | readCellStyle (std::shared_ptr< WPSStream > stream)
| reads a cell attribute: zone 0xce More...
bool | readZone197 (std::shared_ptr< WPSStream > stream)
| reads a unknown sheet zone(one by sheet): zone 192 More...
bool | readCell (std::shared_ptr< WPSStream > stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName)
bool | readFormula (std::shared_ptr< WPSStream > stream, long endPos, Vec2i const &pos, int sheetId, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error)
void | updateCellWithUserFormat (QuattroSpreadsheetInternal::Cell &cell, librevenge::RVNGString const &format)
| try to update the cell's format using the user format More...

## Private Member Functions
| QuattroSpreadsheet (QuattroSpreadsheet const &orig)=delete
QuattroSpreadsheet & | operator= (QuattroSpreadsheet const &orig)=delete

## Private Attributes
std::shared_ptr< WKSContentListener > | m_listener
QuattroParser & | m_mainParser
| the listener (if set) More...
std::shared_ptr< QuattroSpreadsheetInternal::State > | m_state
| the internal state More...

## Friends
class | QuattroParser

## Detailed Description

This class parses Quattro Pro DOS spreadsheet file.

## Constructor & Destructor Documentation

## ◆ QuattroSpreadsheet() [1/2]

QuattroSpreadsheet::QuattroSpreadsheet | ( | QuattroParser & | parser | ) |
| explicit

constructor

## ◆ ~QuattroSpreadsheet()

QuattroSpreadsheet::~QuattroSpreadsheet | ( |  | ) |

destructor

## ◆ QuattroSpreadsheet() [2/2]

QuattroSpreadsheet::QuattroSpreadsheet | ( | QuattroSpreadsheet const & | orig | ) |
| privatedelete

## Member Function Documentation

## ◆ addDLLIdName()

void QuattroSpreadsheet::addDLLIdName | ( | int | id,
|  | librevenge::RVNGString const & | name,
|  | bool | func1
| ) |  |
| protected

add a dll's correspondance between an id and a name

## ◆ addUserFormat()

void QuattroSpreadsheet::addUserFormat | ( | int | id,
|  | librevenge::RVNGString const & | name
| ) |  |
| protected

add a user format's correspondance between an id and a name

## ◆ cleanState()

void QuattroSpreadsheet::cleanState | ( |  | ) |

clean internal state

## ◆ getNumSpreadsheets()

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

returns the number of spreadsheet

## ◆ getSheetName()

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

returns the name of the id's spreadsheet

Referenced by sendCellContent().

## ◆ operator=()

QuattroSpreadsheet& QuattroSpreadsheet::operator= | ( | QuattroSpreadsheet const & | orig | ) |
| privatedelete

## ◆ readBeginEndSheet()

bool QuattroSpreadsheet::readBeginEndSheet | ( | std::shared_ptr< WPSStream > | stream,
|  | int & | sheetId
| ) |  |
| protected

read the begin/end of a sheet zone: zone ca and cb

## ◆ readCell() [1/2]

bool QuattroSpreadsheet::readCell | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads a cell content data: zone 0xc-0x10 or 33

Referenced by readFormula().

## ◆ readCell() [2/2]

bool QuattroSpreadsheet::readCell | ( | std::shared_ptr< WPSStream > | stream,
|  | Vec2i | actPos,
|  | WKSContentListener::FormulaInstruction & | instr,
|  | int | sheetId,
|  | librevenge::RVNGString const & | fName
| ) |  |
| protected

## ◆ readCellStyle()

bool QuattroSpreadsheet::readCellStyle | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads a cell attribute: zone 0xce

## ◆ readColumnSize()

bool QuattroSpreadsheet::readColumnSize | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads the column size ( in ??? )

## ◆ readFormula()

bool QuattroSpreadsheet::readFormula | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos,
|  | Vec2i const & | pos,
|  | int | sheetId,
|  | std::vector< WKSContentListener::FormulaInstruction > & | formula,
|  | std::string & | error
| ) |  |
| protected

Referenced by readCell().

## ◆ readRowSize()

bool QuattroSpreadsheet::readRowSize | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads the row size: zone d6

## ◆ readSheetName()

bool QuattroSpreadsheet::readSheetName | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads sheet name: zone cc

## ◆ readSheetSize()

bool QuattroSpreadsheet::readSheetSize | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads sheet size: zone 06

## ◆ readZone197()

bool QuattroSpreadsheet::readZone197 | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads a unknown sheet zone(one by sheet): zone 192

## ◆ sendCellContent()

void QuattroSpreadsheet::sendCellContent | ( | QuattroSpreadsheetInternal::Cell const & | cell,
|  | int | sheetId
| ) |  |
| protected

send the cell data

Referenced by sendSpreadsheet().

## ◆ sendSpreadsheet()

void QuattroSpreadsheet::sendSpreadsheet | ( | int | sheetId,
|  | std::vector< Vec2i > const & | listGraphicCells
| ) |  |
| protected

send the sId'th spreadsheet

## ◆ setListener()

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

sets the listener

## ◆ updateCellWithUserFormat()

void QuattroSpreadsheet::updateCellWithUserFormat | ( | QuattroSpreadsheetInternal::Cell & | cell,
|  | librevenge::RVNGString const & | format
| ) |  |
| protected

try to update the cell's format using the user format

Referenced by sendCellContent().

## ◆ updateState()

void QuattroSpreadsheet::updateState | ( |  | ) |

update the state (need to be called before sending data)

## ◆ version()

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

return the file version

## Friends And Related Function Documentation

## ◆ QuattroParser

friend class QuattroParser
| friend

## Member Data Documentation

## ◆ m_listener

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

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

## ◆ m_mainParser

QuattroParser& QuattroSpreadsheet::m_mainParser
| private

the listener (if set)

the main parser

Referenced by readCell(), readCellStyle(), readColumnSize(), readFormula(), readRowSize(), readSheetName(), sendCellContent(), sendSpreadsheet(), and version().

## ◆ m_state

std::shared_ptr<QuattroSpreadsheetInternal::State> QuattroSpreadsheet::m_state
| private

the internal state

Referenced by addDLLIdName(), addUserFormat(), cleanState(), getNumSpreadsheets(), getSheetName(), readBeginEndSheet(), readCell(), readCellStyle(), readColumnSize(), readFormula(), readRowSize(), readSheetName(), readSheetSize(), sendCellContent(), sendSpreadsheet(), and version().

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

- QuattroSpreadsheet.h
- QuattroSpreadsheet.cpp