Quattro9Spreadsheet Class Reference

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

#include <Quattro9Spreadsheet.h>

Public Member Functions

 Quattro9Spreadsheet (Quattro9Parser &parser)
 constructor
 ~Quattro9Spreadsheet ()
 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)
 send the sheetId'th spreadsheet
Vec2f getPosition (int sheetId, Vec2i const &cell) const
 returns the beginning position of a cell
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
void addDocumentStrings (std::shared_ptr< WPSStream > const &stream, std::vector< Quattro9ParserInternal::TextEntry > const &entries)
 set the document strings list
void sendCellContent (Quattro9SpreadsheetInternal::CellData const *cell, Vec2i pos, int sheetId, int numRepeated)
 send the cell data
bool readCellStyles (std::shared_ptr< WPSStream > const &stream)
 reads a cell attribute: zone a
bool readDocumentFormulas (std::shared_ptr< WPSStream > const &stream)
 reads the document formulas: zone 408
bool readBeginSheet (std::shared_ptr< WPSStream > const &stream, int &sheetId)
 read the begin sheet zone: zone 601
bool readEndSheet (std::shared_ptr< WPSStream > const &stream)
 read the end sheet zone: zone 602
bool readMergedCells (std::shared_ptr< WPSStream > const &stream)
 read the merged cell: zone 61d
bool readColRowDefault (std::shared_ptr< WPSStream > const &stream)
 read a col/row default dimension: zone 631, 632
bool readColRowDimension (std::shared_ptr< WPSStream > const &stream)
 read a col/row dimension: zone 633, 634
bool readColRowDimensions (std::shared_ptr< WPSStream > const &stream)
 read a col/row dimensions: zone 635, 636
bool readBeginColumn (std::shared_ptr< WPSStream > const &stream)
 read the begin column zone: zone a01
bool readEndColumn (std::shared_ptr< WPSStream > const &stream)
 read the end column zone: zone a02
bool readCellList (std::shared_ptr< WPSStream > const &stream)
 reads a cell list zone: zone c01
bool readCellResult (std::shared_ptr< WPSStream > const &stream)
 reads a cell result zone: zone c02
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 readPageBreak (std::shared_ptr< WPSStream > const &stream)
 read the page break zone: zone 617
static bool readCell (std::shared_ptr< WPSStream > const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName)

Private Member Functions

 Quattro9Spreadsheet (Quattro9Spreadsheet const &orig)=delete
Quattro9Spreadsheetoperator= (Quattro9Spreadsheet const &orig)=delete

Private Attributes

std::shared_ptr< WKSContentListenerm_listener
Quattro9Parserm_mainParser
 the listener (if set)
std::shared_ptr< Quattro9SpreadsheetInternal::Statem_state
 the internal state

Friends

class Quattro9Parser

Detailed Description

This class parses Quattro9 Pro spreadsheet file.

Constructor & Destructor Documentation

◆ Quattro9Spreadsheet() [1/2]

Quattro9Spreadsheet::Quattro9Spreadsheet ( Quattro9Parser & parser)
explicit

constructor

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

◆ ~Quattro9Spreadsheet()

Quattro9Spreadsheet::~Quattro9Spreadsheet ( )

destructor

◆ Quattro9Spreadsheet() [2/2]

Quattro9Spreadsheet::Quattro9Spreadsheet ( Quattro9Spreadsheet const & orig)
privatedelete

Member Function Documentation

◆ addDLLIdName()

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

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

◆ addDocumentStrings()

void Quattro9Spreadsheet::addDocumentStrings ( std::shared_ptr< WPSStream > const & stream,
std::vector< Quattro9ParserInternal::TextEntry > const & entries )
protected

set the document strings list

◆ addUserFormat()

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

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

◆ cleanState()

void Quattro9Spreadsheet::cleanState ( )

clean internal state

◆ getNumSpreadsheets()

int Quattro9Spreadsheet::getNumSpreadsheets ( ) const
protected

returns the number of spreadsheet

◆ getPosition()

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

returns the beginning position of a cell

◆ getReadCellReferenceFunction()

QuattroFormulaManager::CellReferenceFunction Quattro9Spreadsheet::getReadCellReferenceFunction ( )
protected

returns the function to read a cell's reference

Referenced by cleanState(), and Quattro9Spreadsheet().

◆ getSheetName()

librevenge::RVNGString Quattro9Spreadsheet::getSheetName ( int id) const
protected

returns the name of the id's spreadsheet

Referenced by sendCellContent().

◆ operator=()

Quattro9Spreadsheet & Quattro9Spreadsheet::operator= ( Quattro9Spreadsheet const & orig)
privatedelete

◆ readBeginColumn()

bool Quattro9Spreadsheet::readBeginColumn ( std::shared_ptr< WPSStream > const & stream)
protected

read the begin column zone: zone a01

◆ readBeginSheet()

bool Quattro9Spreadsheet::readBeginSheet ( std::shared_ptr< WPSStream > const & stream,
int & sheetId )
protected

read the begin sheet zone: zone 601

◆ readCell()

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

Referenced by readCellReference().

◆ readCellList()

bool Quattro9Spreadsheet::readCellList ( std::shared_ptr< WPSStream > const & stream)
protected

reads a cell list zone: zone c01

◆ readCellReference()

bool Quattro9Spreadsheet::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().

◆ readCellResult()

bool Quattro9Spreadsheet::readCellResult ( std::shared_ptr< WPSStream > const & stream)
protected

reads a cell result zone: zone c02

◆ readCellStyles()

bool Quattro9Spreadsheet::readCellStyles ( std::shared_ptr< WPSStream > const & stream)
protected

reads a cell attribute: zone a

◆ readColRowDefault()

bool Quattro9Spreadsheet::readColRowDefault ( std::shared_ptr< WPSStream > const & stream)
protected

read a col/row default dimension: zone 631, 632

◆ readColRowDimension()

bool Quattro9Spreadsheet::readColRowDimension ( std::shared_ptr< WPSStream > const & stream)
protected

read a col/row dimension: zone 633, 634

◆ readColRowDimensions()

bool Quattro9Spreadsheet::readColRowDimensions ( std::shared_ptr< WPSStream > const & stream)
protected

read a col/row dimensions: zone 635, 636

◆ readDocumentFormulas()

bool Quattro9Spreadsheet::readDocumentFormulas ( std::shared_ptr< WPSStream > const & stream)
protected

reads the document formulas: zone 408

◆ readEndColumn()

bool Quattro9Spreadsheet::readEndColumn ( std::shared_ptr< WPSStream > const & stream)
protected

read the end column zone: zone a02

◆ readEndSheet()

bool Quattro9Spreadsheet::readEndSheet ( std::shared_ptr< WPSStream > const & stream)
protected

read the end sheet zone: zone 602

◆ readMergedCells()

bool Quattro9Spreadsheet::readMergedCells ( std::shared_ptr< WPSStream > const & stream)
protected

read the merged cell: zone 61d

◆ readPageBreak()

bool Quattro9Spreadsheet::readPageBreak ( std::shared_ptr< WPSStream > const & stream)
staticprotected

read the page break zone: zone 617

◆ sendCellContent()

void Quattro9Spreadsheet::sendCellContent ( Quattro9SpreadsheetInternal::CellData const * cell,
Vec2i pos,
int sheetId,
int numRepeated )
protected

send the cell data

Referenced by sendSpreadsheet().

◆ sendSpreadsheet()

void Quattro9Spreadsheet::sendSpreadsheet ( int sheetId)
protected

send the sheetId'th spreadsheet

◆ setListener()

void Quattro9Spreadsheet::setListener ( WKSContentListenerPtr & listen)
inline

sets the listener

◆ updateState()

void Quattro9Spreadsheet::updateState ( )

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

◆ version()

int Quattro9Spreadsheet::version ( ) const
protected

return the file version

Referenced by readCellStyles().

◆ Quattro9Parser

friend class Quattro9Parser
friend

Member Data Documentation

◆ m_listener

std::shared_ptr<WKSContentListener> Quattro9Spreadsheet::m_listener
private

◆ m_mainParser

Quattro9Parser& Quattro9Spreadsheet::m_mainParser
private

◆ m_state


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

Generated on Sat Jul 19 2025 05:24:40 for libwps by doxygen 1.14.0