QuattroSpreadsheet Class Reference

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

`#include <QuattroSpreadsheet.h>`

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

## Protected Member Functions
int | version () const
| return the file version
QuattroFormulaManager::CellReferenceFunction | getReadCellReferenceFunction ()
| returns the function to read a cell's reference
int | getNumSpreadsheets () const
| returns the number of spreadsheet
librevenge::RVNGString | getSheetName (int id) const
| returns the name of the id's spreadsheet
void | sendSpreadsheet (int sheetId, std::vector< Vec2i > const &listGraphicCells)
| send the sheetId'th spreadsheet
Vec2f | getPosition (int sheetId, Vec2i const &cell) const
| returns the beginning position of a cell
void | sendCellContent (QuattroSpreadsheetInternal::Cell const &cell, int sheetId)
| send the cell data
void | addDLLIdName (int id, librevenge::RVNGString const &name, bool func1)
| add a dll's correspondance between an id and a name
void | addUserFormat (int id, librevenge::RVNGString const &name)
| add a user format's correspondance between an id and a name
bool | readCell (std::shared_ptr< WPSStream > const &stream)
| reads a cell content data: zone 0xc-0x10 or 33
bool | readSheetSize (std::shared_ptr< WPSStream > const &stream)
| reads sheet size: zone 06
bool | readColumnRowDefaultSize (std::shared_ptr< WPSStream > const &stream)
| reads the sheet column/row default size: zone d2-d5
bool | readColumnSize (std::shared_ptr< WPSStream > const &stream)
| reads the column size: zone d8,d9
bool | readRowSize (std::shared_ptr< WPSStream > const &stream)
| reads the row size: zone d6,d7
bool | readRowRangeSize (std::shared_ptr< WPSStream > const &stream)
| reads the row size: zone 105,106
bool | readBeginEndSheet (std::shared_ptr< WPSStream > const &stream, int &sheetId)
| read the begin/end of a sheet zone: zone ca and cb
bool | readSheetName (std::shared_ptr< WPSStream > const &stream)
| reads sheet name: zone cc
bool | readCellStyle (std::shared_ptr< WPSStream > const &stream)
| reads a cell attribute: zone 0xce
bool | readCellReference (std::shared_ptr< WPSStream > const &stream, long endPos, QuattroFormulaInternal::CellReference &ref, Vec2i const &pos=Vec2i(0, 0), int sheetId=0) const
| try to read a cell reference

## Static Protected Member Functions
static bool | readViewInfo (std::shared_ptr< WPSStream > const &stream)
| reads a view info: zone 197/198
static bool | readCell (std::shared_ptr< WPSStream > const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName)
static void | updateCellWithUserFormat (QuattroSpreadsheetInternal::Cell &cell, librevenge::RVNGString const &format)
| try to update the cell's format using the user format

## 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)
std::shared_ptr< QuattroSpreadsheetInternal::State > | m_state
| the internal state

## Friends
class | QuattroParser

## Detailed Description

This class parses Quattro Pro spreadsheet file.

## Constructor & Destructor Documentation

## ◆ QuattroSpreadsheet() [1/2]

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

constructor

Referenced by operator=(), and QuattroSpreadsheet().

## ◆ ~QuattroSpreadsheet()

QuattroSpreadsheet::~QuattroSpreadsheet | ( |  | ) |

destructor

## ◆ QuattroSpreadsheet() [2/2]

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

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

## ◆ getReadCellReferenceFunction()

QuattroFormulaManager::CellReferenceFunction QuattroSpreadsheet::getReadCellReferenceFunction | ( |  | ) |
| protected

returns the function to read a cell's reference

Referenced by cleanState(), and QuattroSpreadsheet().

## ◆ 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 | ) |
| private delete

## ◆ readBeginEndSheet()

bool QuattroSpreadsheet::readBeginEndSheet | ( | std::shared_ptr< WPSStream > const & | 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 > const & | 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 > const & | stream,
|  | Vec2i | actPos,
|  | WKSContentListener::FormulaInstruction & | instr,
|  | int | sheetId,
|  | librevenge::RVNGString const & | fName )
| static protected

## ◆ readCellReference()

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

try to read a cell reference

Referenced by getReadCellReferenceFunction(), and readCellReference().

## ◆ readCellStyle()

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

reads a cell attribute: zone 0xce

## ◆ readColumnRowDefaultSize()

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

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

## ◆ readColumnSize()

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

reads the column size: zone d8,d9

## ◆ readRowRangeSize()

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

reads the row size: zone 105,106

## ◆ readRowSize()

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

reads the row size: zone d6,d7

## ◆ readSheetName()

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

reads sheet name: zone cc

## ◆ readSheetSize()

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

reads sheet size: zone 06

## ◆ readViewInfo()

bool QuattroSpreadsheet::readViewInfo | ( | std::shared_ptr< WPSStream > const & | stream | ) |
| static 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 sheetId'th spreadsheet

## ◆ setListener()

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

sets the listener

## ◆ updateCellWithUserFormat()

void QuattroSpreadsheet::updateCellWithUserFormat | ( | QuattroSpreadsheetInternal::Cell & | cell,
|  | librevenge::RVNGString const & | format )
| static 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 Symbol Documentation

## ◆ QuattroParser

friend class QuattroParser
| friend

Referenced by QuattroParser, and QuattroSpreadsheet().

## Member Data Documentation

## ◆ m_listener

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

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

## ◆ m_mainParser

QuattroParser& QuattroSpreadsheet::m_mainParser
| private

the listener (if set)

the main parser

Referenced by QuattroSpreadsheet(), 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(), QuattroSpreadsheet(), readBeginEndSheet(), readCell(), readCellStyle(), readColumnRowDefaultSize(), readColumnSize(), readRowRangeSize(), readRowSize(), readSheetName(), readSheetSize(), sendCellContent(), sendSpreadsheet(), and version().

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

- QuattroSpreadsheet.h
- QuattroSpreadsheet.cpp