QuattroParser Class Reference documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

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

`#include <Quattro.h>`

Inheritance diagram for QuattroParser:

## 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< WKSContentListener > | createListener (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
RVNGInputStreamPtr & | getInput ()
RVNGInputStreamPtr | getFileInput ()
WPSHeaderPtr & | getHeader ()
int | version () const
void | setVersion (int vers)
libwps::DebugFile & | ascii ()
| a DebugFile used to write what we recognize when we parse the document More...

## Protected Attributes
shared_ptr< WKSContentListener > | m_listener
shared_ptr< QuattroParserInternal::State > | m_state
| the listener (if set) More...
shared_ptr< QuattroSpreadsheet > | m_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 | ( | RVNGInputStreamPtr & | input,
|  | WPSHeaderPtr & | header,
|  | libwps_tools_win::Font::Type | encoding = `libwps_tools_win::Font::UNKNOWN`
| ) |  |

constructor

QuattroParser::~QuattroParser | ( |  | ) |

destructor

## Member Function Documentation

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().

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

checks if the document header is correct (or not)

Referenced by parse().

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

creates the main listener

Referenced by parse().

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

returns the color corresponding to an id

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

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().

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().

bool QuattroParser::hasLICSCharacters | ( |  | ) | const
| protected

returns the true if the file has LICS characters

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

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

called by WPSDocument to parse the file

Implements WKSParser.

bool QuattroParser::readChartDef | ( |  | ) |
| protected

reads a structure which seems to define a chart

Referenced by readZone().

bool QuattroParser::readChartName | ( |  | ) |
| protected

reads the chart name or title

Referenced by readZone().

bool QuattroParser::readFieldName | ( |  | ) |
| protected

read a list of field name + ...

Referenced by readZone().

bool QuattroParser::readHeaderFooter | ( | bool | header | ) |
| protected

reads the header/footer

Referenced by readZone().

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().

bool QuattroParser::readUserFonts | ( |  | ) |
| protected

reads the user fonts

Referenced by readZone().

bool QuattroParser::readWindowRecord | ( |  | ) |
| protected

reads windows record 0:7|0:9

Referenced by readZone().

bool QuattroParser::readZone | ( |  | ) |
| protected

reads a zone

Referenced by checkHeader(), and readZones().

bool QuattroParser::readZones | ( |  | ) |
| protected

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

Referenced by parse().

void QuattroParser::sendHeaderFooter | ( | bool | header | ) |
| protected

send the header/footer

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

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

return the file version

Referenced by hasLICSCharacters(), readUnknown1(), QuattroSpreadsheet::setListener(), and QuattroSpreadsheet::version().

## Friends And Related Function Documentation

friend class QuattroParserInternal::SubDocument
| friend

friend class QuattroSpreadsheet
| friend

Referenced by QuattroParser(), and QuattroSpreadsheet::setListener().

## Member Data Documentation

shared_ptr<WKSContentListener> QuattroParser::m_listener
| protected

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

shared_ptr<QuattroSpreadsheet> QuattroParser::m_spreadsheetParser
| protected

the spreadsheet manager

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

shared_ptr<QuattroParserInternal::State> QuattroParser::m_state
| protected

the listener (if set)

the internal state

Referenced by checkFilePosition(), checkHeader(), createListener(), getColor(), getDefaultFontType(), getFont(), hasLICSCharacters(), QuattroParser(), readHeaderFooter(), readUserFonts(), sendHeaderFooter(), and version().

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

- Quattro.h
- Quattro.cpp