QuattroSpreadsheet Class Reference

This class parses Quattro Pro DOS 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...
 

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...
 
bool hasLICSCharacters () const
 returns the true if the file has LICS characters More...
 
int getNumSpreadsheets () const
 returns the number of spreadsheet More...
 
void sendSpreadsheet (int sId)
 send the sId'th spreadsheet More...
 
void sendCellContent (QuattroSpreadsheetInternal::Cell const &cell)
 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

 QuattroSpreadsheet (QuattroSpreadsheet const &orig)
 
QuattroSpreadsheetoperator= (QuattroSpreadsheet const &orig)
 
libwps::DebugFileascii ()
 returns the debug file More...
 

Private Attributes

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

Friends

class QuattroParser
 

Detailed Description

This class parses Quattro Pro DOS 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)
private

Member Function Documentation

◆ ascii()

◆ checkFilePosition()

bool QuattroSpreadsheet::checkFilePosition ( long  pos)
protected

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

◆ getNumSpreadsheets()

int QuattroSpreadsheet::getNumSpreadsheets ( ) const
protected

returns the number of spreadsheet

◆ hasLICSCharacters()

bool QuattroSpreadsheet::hasLICSCharacters ( ) const
protected

returns the true if the file has LICS characters

Referenced by sendCellContent().

◆ operator=()

QuattroSpreadsheet& QuattroSpreadsheet::operator= ( QuattroSpreadsheet const &  orig)
private

◆ readCell() [1/2]

bool QuattroSpreadsheet::readCell ( )
protected

reads a cell content data

Referenced by readFormula(), and readSpreadsheetClose().

◆ readCell() [2/2]

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

◆ readCellFormulaResult()

bool QuattroSpreadsheet::readCellFormulaResult ( )
protected

reads the result of a text formula

◆ readCellProperty()

bool QuattroSpreadsheet::readCellProperty ( )
protected

reads a Quattro Pro property (zone 0x9d)

◆ readCellStyle()

bool QuattroSpreadsheet::readCellStyle ( )
protected

reads a Quattro Pro cell styles (zone 0xd8)

◆ readColumnSize()

bool QuattroSpreadsheet::readColumnSize ( )
protected

reads the column size ( in ??? )

◆ readFormula()

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

Referenced by readCell().

◆ readHiddenColumns()

bool QuattroSpreadsheet::readHiddenColumns ( )
protected

reads the list of hidden columns zone ( unused )

◆ readRowSize()

bool QuattroSpreadsheet::readRowSize ( )
protected

reads the column size ( in points )

◆ readSheetSize()

bool QuattroSpreadsheet::readSheetSize ( )
protected

reads sheet size

◆ readSpreadsheetClose()

bool QuattroSpreadsheet::readSpreadsheetClose ( )
protected

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

◆ readSpreadsheetName()

bool QuattroSpreadsheet::readSpreadsheetName ( )
protected

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

◆ readSpreadsheetOpen()

bool QuattroSpreadsheet::readSpreadsheetOpen ( )
protected

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

◆ readUserStyle()

bool QuattroSpreadsheet::readUserStyle ( )
protected

reads a Quattro Pro style ( zone 0xc9)

◆ sendCellContent()

void QuattroSpreadsheet::sendCellContent ( QuattroSpreadsheetInternal::Cell const &  cell)
protected

send the cell data

Referenced by sendSpreadsheet().

◆ sendSpreadsheet()

void QuattroSpreadsheet::sendSpreadsheet ( int  sId)
protected

send the sId'th spreadsheet

◆ setListener()

void QuattroSpreadsheet::setListener ( WKSContentListenerPtr listen)
inline

sets the listener

◆ version()

int QuattroSpreadsheet::version ( ) const
protected

return the file version

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

Friends And Related Function Documentation

◆ QuattroParser

friend class QuattroParser
friend

Member Data Documentation

◆ m_asciiFile

libwps::DebugFile& QuattroSpreadsheet::m_asciiFile
private

the ascii file

◆ m_input

◆ m_listener

shared_ptr<WKSContentListener> QuattroSpreadsheet::m_listener
private

Referenced by sendCellContent(), and sendSpreadsheet().

◆ m_mainParser

QuattroParser& QuattroSpreadsheet::m_mainParser
private

the listener (if set)

the main parser

Referenced by hasLICSCharacters(), readCell(), readCellProperty(), readCellStyle(), readUserStyle(), and version().

◆ m_state


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

Generated on Fri Jun 16 2017 12:32:59 for libwps by doxygen 1.8.13