QuattroParser Class Reference

This class parses Quattro Pro spreadsheet: .wq1 and wq2. More...

#include <Quattro.h>

Inheritance diagram for QuattroParser:
WKSParser

Public Member Functions

 QuattroParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN)
 constructor More...
 
 ~QuattroParser ()
 destructor More...
 
void parse (librevenge::RVNGSpreadsheetInterface *documentInterface)
 called by WPSDocument to parse the file More...
 
bool checkHeader (WPSHeader *header, bool strict=false)
 checks if the document header is correct (or not) More...
 
- Public Member Functions inherited from WKSParser
 WKSParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header)
 
virtual ~WKSParser ()
 

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...
 
libwps_tools_win::Font::Type getDefaultFontType () const
 returns the default font type, ie. More...
 
bool hasLICSCharacters () const
 returns the true if the file has LICS characters More...
 
bool getColor (int id, WPSColor &color) const
 returns the color corresponding to an id More...
 
bool getFont (int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
 returns the font corresponding to an id More...
 
shared_ptr< WKSContentListenercreateListener (librevenge::RVNGSpreadsheetInterface *interface)
 creates the main listener More...
 
void sendHeaderFooter (bool header)
 send the header/footer More...
 
bool readZones ()
 finds the different zones (spreadsheet, chart, print, ...) More...
 
bool readZone ()
 reads a zone More...
 
bool readUserFonts ()
 reads the user fonts More...
 
bool readHeaderFooter (bool header)
 reads the header/footer More...
 
bool readFieldName ()
 read a list of field name + ... More...
 
bool readChartName ()
 reads the chart name or title More...
 
bool readChartDef ()
 reads a structure which seems to define a chart More...
 
bool readWindowRecord ()
 reads windows record 0:7|0:9 More...
 
bool readUnknown1 ()
 reads some unknown spreadsheet zones 0:18|0:19|0:20|0:27|0:2a More...
 
- Protected Member Functions inherited from WKSParser
RVNGInputStreamPtrgetInput ()
 
RVNGInputStreamPtr getFileInput ()
 
WPSHeaderPtrgetHeader ()
 
int version () const
 
void setVersion (int vers)
 
libwps::DebugFileascii ()
 a DebugFile used to write what we recognize when we parse the document More...
 

Protected Attributes

shared_ptr< WKSContentListenerm_listener
 
shared_ptr< QuattroParserInternal::Statem_state
 the listener (if set) More...
 
shared_ptr< QuattroSpreadsheetm_spreadsheetParser
 the spreadsheet manager More...
 

Friends

class QuattroParserInternal::SubDocument
 
class QuattroSpreadsheet
 

Detailed Description

This class parses Quattro Pro spreadsheet: .wq1 and wq2.

Constructor & Destructor Documentation

§ QuattroParser()

QuattroParser::QuattroParser ( RVNGInputStreamPtr input,
WPSHeaderPtr header,
libwps_tools_win::Font::Type  encoding = libwps_tools_win::Font::UNKNOWN 
)

constructor

§ ~QuattroParser()

QuattroParser::~QuattroParser ( )

destructor

Member Function Documentation

§ checkFilePosition()

bool QuattroParser::checkFilePosition ( long  pos)
protected

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

Referenced by checkHeader(), readZone(), readZones(), and QuattroSpreadsheet::setListener().

§ checkHeader()

bool QuattroParser::checkHeader ( WPSHeader header,
bool  strict = false 
)

checks if the document header is correct (or not)

Referenced by parse().

§ createListener()

shared_ptr< WKSContentListener > QuattroParser::createListener ( librevenge::RVNGSpreadsheetInterface *  interface)
protected

creates the main listener

Referenced by parse().

§ getColor()

bool QuattroParser::getColor ( int  id,
WPSColor color 
) const
protected

returns the color corresponding to an id

Referenced by QuattroSpreadsheet::readCellStyle(), and QuattroSpreadsheet::readUserStyle().

§ getDefaultFontType()

libwps_tools_win::Font::Type QuattroParser::getDefaultFontType ( ) const
protected

returns the default font type, ie.

the encoding given by the constructor if given or the encoding deduiced from the version.

Referenced by QuattroSpreadsheet::readCell(), QuattroSpreadsheet::readCellProperty(), QuattroSpreadsheet::readCellStyle(), readUserFonts(), and QuattroSpreadsheet::readUserStyle().

§ getFont()

bool QuattroParser::getFont ( int  id,
WPSFont font,
libwps_tools_win::Font::Type type 
) const
protected

returns the font corresponding to an id

Referenced by QuattroSpreadsheet::readCellProperty().

§ hasLICSCharacters()

bool QuattroParser::hasLICSCharacters ( ) const
protected

returns the true if the file has LICS characters

Referenced by QuattroSpreadsheet::hasLICSCharacters(), sendHeaderFooter(), and QuattroSpreadsheet::setListener().

§ parse()

void QuattroParser::parse ( librevenge::RVNGSpreadsheetInterface *  documentInterface)
virtual

called by WPSDocument to parse the file

Implements WKSParser.

§ readChartDef()

bool QuattroParser::readChartDef ( )
protected

reads a structure which seems to define a chart

Referenced by readZone().

§ readChartName()

bool QuattroParser::readChartName ( )
protected

reads the chart name or title

Referenced by readZone().

§ readFieldName()

bool QuattroParser::readFieldName ( )
protected

read a list of field name + ...

Referenced by readZone().

§ readHeaderFooter()

bool QuattroParser::readHeaderFooter ( bool  header)
protected

reads the header/footer

Referenced by readZone().

§ readUnknown1()

bool QuattroParser::readUnknown1 ( )
protected

reads some unknown spreadsheet zones 0:18|0:19|0:20|0:27|0:2a

Note
this zones seems to consist of a list of flags potentially followed by other data

Referenced by readZone().

§ readUserFonts()

bool QuattroParser::readUserFonts ( )
protected

reads the user fonts

Referenced by readZone().

§ readWindowRecord()

bool QuattroParser::readWindowRecord ( )
protected

reads windows record 0:7|0:9

Referenced by readZone().

§ readZone()

bool QuattroParser::readZone ( )
protected

reads a zone

Referenced by checkHeader(), and readZones().

§ readZones()

bool QuattroParser::readZones ( )
protected

finds the different zones (spreadsheet, chart, print, ...)

Referenced by parse().

§ sendHeaderFooter()

void QuattroParser::sendHeaderFooter ( bool  header)
protected

send the header/footer

Referenced by QuattroParserInternal::SubDocument::parse().

§ version()

int QuattroParser::version ( ) const
protected

Friends And Related Function Documentation

§ QuattroParserInternal::SubDocument

§ QuattroSpreadsheet

friend class QuattroSpreadsheet
friend

Member Data Documentation

§ m_listener

shared_ptr<WKSContentListener> QuattroParser::m_listener
protected

§ m_spreadsheetParser

shared_ptr<QuattroSpreadsheet> QuattroParser::m_spreadsheetParser
protected

the spreadsheet manager

Referenced by parse(), QuattroParser(), readChartDef(), readZone(), and readZones().

§ m_state


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

Generated on Wed Oct 26 2016 16:54:38 for libwps by doxygen 1.8.12