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 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...
Vec2f | getPosition (int sheetId, Vec2i const &cell) const
| returns the beginning position of a cell 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 | readColumnRowDefaultSize (std::shared_ptr< WPSStream > stream)
| reads the sheet column/row default size: zone d2-d5 More...
bool | readColumnSize (std::shared_ptr< WPSStream > stream)
| reads the column size: zone d8,d9 More...
bool | readRowSize (std::shared_ptr< WPSStream > stream)
| reads the row size: zone d6,d7 More...
bool | readRowRangeSize (std::shared_ptr< WPSStream > stream)
| reads the row size: zone 105,106 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 | readViewInfo (std::shared_ptr< WPSStream > stream)
| reads a view info: zone 197/198 More...
bool | readCell (std::shared_ptr< WPSStream > stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName) const
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...
bool | readCellReference (std::shared_ptr< WPSStream > stream, long endPos, QuattroSpreadsheetInternal::CellReference &ref, Vec2i const &pos=Vec2i(0, 0), int sheetId=0) const
| try to read a cell reference 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 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

## ◆ getPosition()

Vec2f QuattroSpreadsheet::getPosition | ( | int | sheetId,
|  | Vec2i const & | cell
| ) |  | const
| protected

returns the beginning position of a cell

## ◆ 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 readCellReference().

## ◆ readCell() [2/2]

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

## ◆ readCellReference()

bool QuattroSpreadsheet::readCellReference | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos,
|  | QuattroSpreadsheetInternal::CellReference & | ref,
|  | Vec2i const & | pos = `Vec2i(0,0)`,
|  | int | sheetId = `0`
| ) |  | const
| protected

try to read a cell reference

Referenced by readFormula().

## ◆ readCellStyle()

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

reads a cell attribute: zone 0xce

## ◆ readColumnRowDefaultSize()

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

reads the sheet column/row default size: zone d2-d5

## ◆ readColumnSize()

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

reads the column size: zone d8,d9

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

## ◆ readRowRangeSize()

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

reads the row size: zone 105,106

## ◆ readRowSize()

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

reads the row size: zone d6,d7

## ◆ 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

## ◆ readViewInfo()

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

reads a view info: zone 197/198

## ◆ 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(), readCellReference(), readCellStyle(), readColumnRowDefaultSize(), readColumnSize(), readRowRangeSize(), 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(), getPosition(), getSheetName(), readBeginEndSheet(), readCell(), readCellStyle(), readColumnRowDefaultSize(), readColumnSize(), readFormula(), readRowRangeSize(), readRowSize(), readSheetName(), readSheetSize(), sendCellContent(), sendSpreadsheet(), and version().

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

- QuattroSpreadsheet.h
- QuattroSpreadsheet.cpp