QuattroDosSpreadsheet Class Reference

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

#include <QuattroDosSpreadsheet.h>

Public Member Functions

 QuattroDosSpreadsheet (QuattroDosParser &parser)
 constructor More...
 
 ~QuattroDosSpreadsheet ()
 destructor More...
 
void setListener (WKSContentListenerPtr &listen)
 sets the listener More...
 

Protected Member Functions

bool checkFilePosition (long pos)
 return true if the pos is in the file, update the file size if need More...
 
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 sId, std::map< Vec2i, Vec2i > const &chartCellMap)
 send the sId'th spreadsheet More...
 
void sendCellContent (QuattroDosSpreadsheetInternal::Cell const &cell, int sheetId, int cellChartSheetId=-1, Vec2f const &chartSize=Vec2f())
 send the cell data More...
 
bool readSpreadsheetOpen ()
 reads a sheet header zone 0:dc (Quattro Pro wq2) More...
 
bool readSpreadsheetClose ()
 reads a sheet header zone 0:dd (Quattro Pro wq2) More...
 
bool readCell ()
 reads a cell content data More...
 
bool readCellFormulaResult ()
 reads the result of a text formula More...
 
bool readSheetSize ()
 reads sheet size More...
 
bool readSpreadsheetName ()
 reads a sheet name (zone 0xde), unused... More...
 
bool readColumnSize ()
 reads the column size ( in ??? ) More...
 
bool readRowSize ()
 reads the column size ( in points ) More...
 
bool readHiddenColumns ()
 reads the list of hidden columns zone ( unused ) More...
 
bool readCellProperty ()
 reads a Quattro Pro property (zone 0x9d) More...
 
bool readCellStyle ()
 reads a Quattro Pro cell styles (zone 0xd8) More...
 
bool readUserStyle ()
 reads a Quattro Pro style ( zone 0xc9) More...
 
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
 
QuattroDosSpreadsheetoperator= (QuattroDosSpreadsheet const &orig)=delete
 
libwps::DebugFileascii ()
 returns the debug file More...
 

Private Attributes

RVNGInputStreamPtr m_input
 the input More...
 
std::shared_ptr< WKSContentListenerm_listener
 
QuattroDosParserm_mainParser
 the listener (if set) More...
 
std::shared_ptr< QuattroDosSpreadsheetInternal::Statem_state
 the internal state More...
 
libwps::DebugFilem_asciiFile
 the ascii file More...
 

Friends

class QuattroDosParser
 

Detailed Description

This class parses Quattro Pro DOS spreadsheet file.

Constructor & Destructor Documentation

QuattroDosSpreadsheet::QuattroDosSpreadsheet ( QuattroDosParser parser)
explicit

constructor

QuattroDosSpreadsheet::~QuattroDosSpreadsheet ( )

destructor

QuattroDosSpreadsheet::QuattroDosSpreadsheet ( QuattroDosSpreadsheet const &  orig)
privatedelete

Member Function Documentation

bool QuattroDosSpreadsheet::checkFilePosition ( long  pos)
protected

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

int QuattroDosSpreadsheet::getNumSpreadsheets ( ) const
protected

returns the number of spreadsheet

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

returns the name of the id's spreadsheet

Referenced by sendCellContent().

QuattroDosSpreadsheet& QuattroDosSpreadsheet::operator= ( QuattroDosSpreadsheet const &  orig)
privatedelete
bool QuattroDosSpreadsheet::readCell ( )
protected

reads a cell content data

Referenced by readFormula().

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

reads the result of a text formula

bool QuattroDosSpreadsheet::readCellProperty ( )
protected

reads a Quattro Pro property (zone 0x9d)

bool QuattroDosSpreadsheet::readCellStyle ( )
protected

reads a Quattro Pro cell styles (zone 0xd8)

bool QuattroDosSpreadsheet::readColumnSize ( )
protected

reads the column size ( in ??? )

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

Referenced by readCell().

bool QuattroDosSpreadsheet::readHiddenColumns ( )
protected

reads the list of hidden columns zone ( unused )

bool QuattroDosSpreadsheet::readRowSize ( )
protected

reads the column size ( in points )

bool QuattroDosSpreadsheet::readSheetSize ( )
protected

reads sheet size

bool QuattroDosSpreadsheet::readSpreadsheetClose ( )
protected

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

bool QuattroDosSpreadsheet::readSpreadsheetName ( )
protected

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

bool QuattroDosSpreadsheet::readSpreadsheetOpen ( )
protected

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

bool QuattroDosSpreadsheet::readUserStyle ( )
protected

reads a Quattro Pro style ( zone 0xc9)

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

send the cell data

Referenced by sendSpreadsheet().

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

send the sId'th spreadsheet

void QuattroDosSpreadsheet::setListener ( WKSContentListenerPtr listen)
inline

sets the listener

int QuattroDosSpreadsheet::version ( ) const
protected

Friends And Related Function Documentation

friend class QuattroDosParser
friend

Member Data Documentation

libwps::DebugFile& QuattroDosSpreadsheet::m_asciiFile
private

the ascii file

Referenced by ascii().

std::shared_ptr<WKSContentListener> QuattroDosSpreadsheet::m_listener
private
QuattroDosParser& QuattroDosSpreadsheet::m_mainParser
private

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

Generated on Fri Jun 2 2023 06:42:50 for libwps by doxygen 1.8.10