This class parses Quattro Pro spreadsheet: .wq1 and wq2. More...
#include <QuattroDos.h>
Public Member Functions | |
QuattroDosParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN) | |
constructor | |
~QuattroDosParser () final | |
destructor | |
void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) final |
called by WPSDocument to parse the file | |
bool | checkHeader (WPSHeader *header, bool strict=false) |
checks if the document header is correct (or not) | |
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 | |
int | version () const |
return the file version | |
libwps_tools_win::Font::Type | getDefaultFontType () const |
returns the default font type, ie. | |
librevenge::RVNGString | getFileName (int fId) const |
returns the name of the fId file | |
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 | |
librevenge::RVNGString | getSheetName (int id) const |
returns the name of the id's spreadsheet | |
bool | sendChart (int sheetId, Vec2i const &cell, Vec2f const &chartSize) |
try to send the chart corresponding to sheetId and a position | |
std::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 | readFont (WPSFont &font, libwps_tools_win::Font::Type &type) |
try to read a font | |
bool | readHeaderFooter (bool header) |
reads the header/footer | |
bool | readFieldName () |
read a list of field name + ... | |
bool | readFileName () |
read a file name | |
bool | readPString (librevenge::RVNGString &string, long maxSize) |
try to read a basic pascal string, knowing the maximum size(excluding string size) | |
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 Member Functions inherited from WKSParser | |
RVNGInputStreamPtr & | getInput () |
void | resetInput (RVNGInputStreamPtr const &newInput) |
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 |
Protected Attributes | |
std::shared_ptr< WKSContentListener > | m_listener |
std::shared_ptr< QuattroDosParserInternal::State > | m_state |
the listener (if set) | |
std::shared_ptr< QuattroDosSpreadsheet > | m_spreadsheetParser |
the spreadsheet manager | |
std::shared_ptr< QuattroDosChart > | m_chartParser |
the chart manager |
Friends | |
class | QuattroDosParserInternal::SubDocument |
class | QuattroDosChart |
class | QuattroDosSpreadsheet |
This class parses Quattro Pro spreadsheet: .wq1 and wq2.
QuattroDosParser::QuattroDosParser | ( | RVNGInputStreamPtr & | input, |
WPSHeaderPtr & | header, | ||
libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN ) |
constructor
|
final |
destructor
|
protected |
return true if the pos is in the file, update the file size if need
Referenced by checkHeader(), QuattroDosSpreadsheet, readFont(), readPString(), readZone(), and readZones().
bool QuattroDosParser::checkHeader | ( | WPSHeader * | header, |
bool | strict = false ) |
checks if the document header is correct (or not)
Referenced by libwps::WPSDocument::isFileFormatSupported(), parse(), and QuattroDosSpreadsheet.
|
protected |
creates the main listener
Referenced by parse(), and QuattroDosSpreadsheet.
|
protected |
returns the color corresponding to an id
Referenced by QuattroDosSpreadsheet.
|
protected |
returns the default font type, ie.
the encoding given by the constructor if given or the encoding deduiced from the version.
Referenced by QuattroDosSpreadsheet, readFont(), readPString(), and readUserFonts().
|
protected |
returns the name of the fId file
Referenced by QuattroDosSpreadsheet.
|
protected |
returns the font corresponding to an id
Referenced by QuattroDosSpreadsheet.
|
protected |
returns the name of the id's spreadsheet
Referenced by QuattroDosSpreadsheet.
|
finalvirtual |
|
protected |
read a list of field name + ...
Referenced by QuattroDosSpreadsheet, and readZone().
|
protected |
read a file name
Referenced by QuattroDosSpreadsheet, and readZone().
|
protected |
try to read a font
Referenced by QuattroDosSpreadsheet, and readUserFonts().
|
protected |
reads the header/footer
Referenced by QuattroDosSpreadsheet, and readZone().
|
protected |
try to read a basic pascal string, knowing the maximum size(excluding string size)
Referenced by QuattroDosSpreadsheet, readFieldName(), and readFileName().
|
protected |
reads some unknown spreadsheet zones 0:18|0:19|0:20|0:27|0:2a
Referenced by QuattroDosSpreadsheet, and readZone().
|
protected |
reads the user fonts
Referenced by QuattroDosSpreadsheet, and readZone().
|
protected |
reads windows record 0:7|0:9
Referenced by QuattroDosSpreadsheet, and readZone().
|
protected |
reads a zone
Referenced by checkHeader(), QuattroDosSpreadsheet, and readZones().
|
protected |
finds the different zones (spreadsheet, chart, print, ...)
Referenced by parse(), and QuattroDosSpreadsheet.
|
protected |
try to send the chart corresponding to sheetId and a position
Referenced by QuattroDosSpreadsheet.
|
protected |
send the header/footer
Referenced by QuattroDosParserInternal::SubDocument::parse(), and QuattroDosSpreadsheet.
|
protected |
return the file version
Referenced by QuattroDosSpreadsheet, and readUnknown1().
|
friend |
Referenced by QuattroDosChart, and QuattroDosParser().
|
friend |
|
friend |
Referenced by QuattroDosParser(), and QuattroDosSpreadsheet.
|
protected |
the chart manager
Referenced by parse(), QuattroDosParser(), readZone(), and sendChart().
|
protected |
Referenced by parse(), QuattroDosParser(), and sendHeaderFooter().
|
protected |
the spreadsheet manager
Referenced by getSheetName(), parse(), QuattroDosParser(), readZone(), and readZones().
|
protected |
the listener (if set)
the internal state
Referenced by checkFilePosition(), checkHeader(), createListener(), getColor(), getDefaultFontType(), getFileName(), getFont(), QuattroDosParser(), readFileName(), readFont(), readHeaderFooter(), readUserFonts(), sendHeaderFooter(), and version().