QuattroDosSpreadsheet Class Reference documentation

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

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

`#include <QuattroDosSpreadsheet.h>`

## Public Member Functions
| QuattroDosSpreadsheet (QuattroDosParser &parser)
| constructor
| ~QuattroDosSpreadsheet ()
| 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
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 sId, std::map< Vec2i, Vec2i > const &chartCellMap)
| send the sId'th spreadsheet
void | sendCellContent (QuattroDosSpreadsheetInternal::Cell const &cell, int sheetId, int cellChartSheetId=-1, Vec2f const &chartSize=Vec2f())
| send the cell data
bool | readSpreadsheetOpen ()
| reads a sheet header zone 0:dc (Quattro Pro wq2)
bool | readSpreadsheetClose ()
| reads a sheet header zone 0:dd (Quattro Pro wq2)
bool | readCell ()
| reads a cell content data
bool | readCellFormulaResult ()
| reads the result of a text formula
bool | readSheetSize ()
| reads sheet size
bool | readSpreadsheetName ()
| reads a sheet name (zone 0xde), unused...
bool | readColumnSize ()
| reads the column size ( in ??? )
bool | readRowSize ()
| reads the column size ( in points )
bool | readHiddenColumns ()
| reads the list of hidden columns zone ( unused )
bool | readCellProperty ()
| reads a Quattro Pro property (zone 0x9d)
bool | readCellStyle ()
| reads a Quattro Pro cell styles (zone 0xd8)
bool | readUserStyle ()
| reads a Quattro Pro style ( zone 0xc9)
bool | readCell (Vec2i actPos, WKSContentListener::FormulaInstruction &instr, bool hasSheetId=false, int sheetId=0)
bool | readFormula (long endPos, Vec2i const &pos, int sheetId, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error)

## Private Member Functions
| QuattroDosSpreadsheet (QuattroDosSpreadsheet const &orig)=delete
QuattroDosSpreadsheet & | operator= (QuattroDosSpreadsheet const &orig)=delete
libwps::DebugFile & | ascii ()
| returns the debug file

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

## Friends
class | QuattroDosParser

## Detailed Description

This class parses Quattro Pro DOS spreadsheet file.

## Constructor & Destructor Documentation

## ◆ QuattroDosSpreadsheet() [1/2]

QuattroDosSpreadsheet::QuattroDosSpreadsheet | ( | QuattroDosParser & | parser | ) |
| explicit

constructor

## ◆ ~QuattroDosSpreadsheet()

QuattroDosSpreadsheet::~QuattroDosSpreadsheet | ( |  | ) |

destructor

## ◆ QuattroDosSpreadsheet() [2/2]

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

## Member Function Documentation

## ◆ ascii()

libwps::DebugFile & QuattroDosSpreadsheet::ascii | ( |  | ) |
| inlineprivate

returns the debug file

Referenced by readCell(), readCellFormulaResult(), readCellProperty(), readCellStyle(), readColumnSize(), readFormula(), readHiddenColumns(), readRowSize(), readSheetSize(), readSpreadsheetClose(), readSpreadsheetName(), readSpreadsheetOpen(), and readUserStyle().

## ◆ checkFilePosition()

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

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

## ◆ getNumSpreadsheets()

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

returns the number of spreadsheet

## ◆ getSheetName()

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

returns the name of the id's spreadsheet

Referenced by sendCellContent().

## ◆ operator=()

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

## ◆ readCell() [1/2]

bool QuattroDosSpreadsheet::readCell | ( |  | ) |
| protected

reads a cell content data

Referenced by readFormula().

## ◆ readCell() [2/2]

bool QuattroDosSpreadsheet::readCell | ( | Vec2i | actPos,
|  | WKSContentListener::FormulaInstruction & | instr,
|  | bool | hasSheetId = false,
|  | int | sheetId = 0 )
| protected

## ◆ readCellFormulaResult()

bool QuattroDosSpreadsheet::readCellFormulaResult | ( |  | ) |
| protected

reads the result of a text formula

## ◆ readCellProperty()

bool QuattroDosSpreadsheet::readCellProperty | ( |  | ) |
| protected

reads a Quattro Pro property (zone 0x9d)

## ◆ readCellStyle()

bool QuattroDosSpreadsheet::readCellStyle | ( |  | ) |
| protected

reads a Quattro Pro cell styles (zone 0xd8)

## ◆ readColumnSize()

bool QuattroDosSpreadsheet::readColumnSize | ( |  | ) |
| protected

reads the column size ( in ??? )

## ◆ readFormula()

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

Referenced by readCell().

## ◆ readHiddenColumns()

bool QuattroDosSpreadsheet::readHiddenColumns | ( |  | ) |
| protected

reads the list of hidden columns zone ( unused )

## ◆ readRowSize()

bool QuattroDosSpreadsheet::readRowSize | ( |  | ) |
| protected

reads the column size ( in points )

## ◆ readSheetSize()

bool QuattroDosSpreadsheet::readSheetSize | ( |  | ) |
| protected

reads sheet size

## ◆ readSpreadsheetClose()

bool QuattroDosSpreadsheet::readSpreadsheetClose | ( |  | ) |
| protected

reads a sheet header zone 0:dd (Quattro Pro wq2)

## ◆ readSpreadsheetName()

bool QuattroDosSpreadsheet::readSpreadsheetName | ( |  | ) |
| protected

reads a sheet name (zone 0xde), unused...

## ◆ readSpreadsheetOpen()

bool QuattroDosSpreadsheet::readSpreadsheetOpen | ( |  | ) |
| protected

reads a sheet header zone 0:dc (Quattro Pro wq2)

## ◆ readUserStyle()

bool QuattroDosSpreadsheet::readUserStyle | ( |  | ) |
| protected

reads a Quattro Pro style ( zone 0xc9)

## ◆ sendCellContent()

void QuattroDosSpreadsheet::sendCellContent | ( | QuattroDosSpreadsheetInternal::Cell const & | cell,
|  | int | sheetId,
|  | int | cellChartSheetId = -1,
|  | Vec2f const & | chartSize = Vec2f() )
| protected

send the cell data

Referenced by sendSpreadsheet().

## ◆ sendSpreadsheet()

void QuattroDosSpreadsheet::sendSpreadsheet | ( | int | sId,
|  | std::map< Vec2i, Vec2i > const & | chartCellMap )
| protected

send the sId'th spreadsheet

## ◆ setListener()

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

sets the listener

## ◆ version()

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

return the file version

Referenced by readCell(), readCell(), readCellFormulaResult(), readCellStyle(), readFormula(), readSheetSize(), and readUserStyle().

## Friends And Related Symbol Documentation

## ◆ QuattroDosParser

friend class QuattroDosParser
| friend

## Member Data Documentation

## ◆ m_asciiFile

libwps::DebugFile& QuattroDosSpreadsheet::m_asciiFile
| private

the ascii file

Referenced by ascii().

## ◆ m_input

RVNGInputStreamPtr QuattroDosSpreadsheet::m_input
| private

the input

Referenced by checkFilePosition(), readCell(), readCell(), readCellFormulaResult(), readCellProperty(), readCellStyle(), readColumnSize(), readFormula(), readHiddenColumns(), readRowSize(), readSheetSize(), readSpreadsheetClose(), readSpreadsheetName(), readSpreadsheetOpen(), readUserStyle(), and sendCellContent().

## ◆ m_listener

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

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

## ◆ m_mainParser

QuattroDosParser& QuattroDosSpreadsheet::m_mainParser
| private

the listener (if set)

the main parser

Referenced by readCell(), readCell(), readCellFormulaResult(), readCellProperty(), readCellStyle(), readSpreadsheetName(), readUserStyle(), sendCellContent(), sendSpreadsheet(), and version().

## ◆ m_state

std::shared_ptr<QuattroDosSpreadsheetInternal::State> QuattroDosSpreadsheet::m_state
| private

the internal state

Referenced by checkFilePosition(), getNumSpreadsheets(), getSheetName(), readCell(), readCellProperty(), readCellStyle(), readColumnSize(), readRowSize(), readSheetSize(), readSpreadsheetClose(), readSpreadsheetName(), readSpreadsheetOpen(), readUserStyle(), sendSpreadsheet(), and version().

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

- QuattroDosSpreadsheet.h
- QuattroDosSpreadsheet.cpp