This class parses Quattro Pro spreadsheet: .wq1 and wq2. More...
#include <Quattro.h>
Public Member Functions | |
| QuattroParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN) | |
| constructor | |
| ~QuattroParser () | |
| destructor | |
| void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) |
| called by WPSDocument to parse the file | |
| bool | checkHeader (WPSHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
Protected Member Functions | |
| bool | checkFilePosition (long pos) |
| return true if the pos is in the file, update the file size if need | |
| int | version () const |
| return the file version | |
| libwps_tools_win::Font::Type | getDefaultFontType () const |
| returns the default font type, ie. | |
| bool | hasLICSCharacters () const |
| returns the true if the file has LICS characters | |
| bool | getColor (int id, WPSColor &color) const |
| returns the color corresponding to an id | |
| bool | getFont (int id, WPSFont &font, libwps_tools_win::Font::Type &type) const |
| returns the font corresponding to an id | |
| shared_ptr< WKSContentListener > | createListener (librevenge::RVNGSpreadsheetInterface *interface) |
| creates the main listener | |
| void | sendHeaderFooter (bool header) |
| send the header/footer | |
| bool | readZones () |
| finds the different zones (spreadsheet, chart, print, ...) | |
| bool | readZone () |
| reads a zone | |
| bool | readUserFonts () |
| reads the user fonts | |
| bool | readHeaderFooter (bool header) |
| reads the header/footer | |
| bool | readFieldName () |
| read a list of field name + ... | |
| bool | readChartName () |
| reads the chart name or title | |
| bool | readChartDef () |
| reads a structure which seems to define a chart | |
| bool | readWindowRecord () |
| reads windows record 0:7|0:9 | |
| bool | readUnknown1 () |
| reads some unknown spreadsheet zones 0:18|0:19|0:20|0:27|0:2a | |
Protected Attributes | |
| shared_ptr< WKSContentListener > | m_listener |
| shared_ptr < QuattroParserInternal::State > | m_state |
| the listener (if set) | |
| shared_ptr< QuattroSpreadsheet > | m_spreadsheetParser |
| the spreadsheet manager | |
Friends | |
| class | QuattroParserInternal::SubDocument |
| class | QuattroSpreadsheet |
This class parses Quattro Pro spreadsheet: .wq1 and wq2.
| QuattroParser::QuattroParser | ( | RVNGInputStreamPtr & | input, |
| WPSHeaderPtr & | header, | ||
| libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN |
||
| ) |
constructor
destructor
| 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(), and readZones().
| 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(), and sendHeaderFooter().
| 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
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
Reimplemented from WKSParser.
Referenced by hasLICSCharacters(), readUnknown1(), and QuattroSpreadsheet::version().
friend class QuattroParserInternal::SubDocument [friend] |
friend class QuattroSpreadsheet [friend] |
Referenced by QuattroParser().
shared_ptr<WKSContentListener> QuattroParser::m_listener [protected] |
Referenced by parse(), and sendHeaderFooter().
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().