This class parses Microsoft Works spreadsheet or a database file. More...
#include <WKS4.h>
Public Member Functions | |
| WKS4Parser (RVNGInputStreamPtr &input, WPSHeaderPtr &header) | |
| constructor | |
| ~WKS4Parser () | |
| 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 | |
| bool | getColor (int id, uint32_t &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 | readFont () |
| reads the fonts | |
| bool | readPrnt () |
| reads a printer data ? | |
| bool | readPrn2 () |
| reads another printer data. Seem simillar to ZZPrnt | |
| 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 | readChartFont () |
| reads a structure which seems to define two chart font (only present in windows file) | |
| bool | readChart2Font () |
| reads a structure which seems to define four chart font (only present in windows file) | |
| bool | readChartLimit () |
| reads end/begin of chart (only present in windows file) | |
| bool | readChartList () |
| reads a list of int/cellule which seems relative to a chart : CHECKME | |
| bool | readChartUnknown () |
| reads an unknown structure which seems relative to a chart : CHECKME | |
| bool | readUnknown0 () |
| reads some unknown zones 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 < WKS4ParserInternal::State > | m_state |
| the listener (if set) | |
| shared_ptr< WKS4Spreadsheet > | m_spreadsheetParser |
| the spreadsheet manager | |
Friends | |
| class | WKS4ParserInternal::SubDocument |
| class | WKS4Spreadsheet |
This class parses Microsoft Works spreadsheet or a database file.
| WKS4Parser::WKS4Parser | ( | RVNGInputStreamPtr & | input, |
| WPSHeaderPtr & | header | ||
| ) |
constructor
destructor
| bool WKS4Parser::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 WKS4Parser::checkHeader | ( | WPSHeader * | header, |
| bool | strict = false |
||
| ) |
checks if the document header is correct (or not)
Referenced by parse().
| shared_ptr< WKSContentListener > WKS4Parser::createListener | ( | librevenge::RVNGSpreadsheetInterface * | interface | ) | [protected] |
creates the main listener
Referenced by parse().
| bool WKS4Parser::getColor | ( | int | id, |
| uint32_t & | color | ||
| ) | const [protected] |
returns the color corresponding to an id
Referenced by WKS4Spreadsheet::readDOSCellExtraProperty(), and WKS4Spreadsheet::readStyle().
| bool WKS4Parser::getFont | ( | int | id, |
| WPSFont & | font, | ||
| libwps_tools_win::Font::Type & | type | ||
| ) | const [protected] |
returns the font corresponding to an id
Referenced by WKS4Spreadsheet::readStyle().
| void WKS4Parser::parse | ( | librevenge::RVNGSpreadsheetInterface * | documentInterface | ) | [virtual] |
called by WPSDocument to parse the file
Implements WKSParser.
| bool WKS4Parser::readChart2Font | ( | ) | [protected] |
reads a structure which seems to define four chart font (only present in windows file)
Referenced by readZone().
| bool WKS4Parser::readChartDef | ( | ) | [protected] |
reads a structure which seems to define a chart
Referenced by readZone().
| bool WKS4Parser::readChartFont | ( | ) | [protected] |
reads a structure which seems to define two chart font (only present in windows file)
Referenced by readZone().
| bool WKS4Parser::readChartLimit | ( | ) | [protected] |
reads end/begin of chart (only present in windows file)
Referenced by readZone().
| bool WKS4Parser::readChartList | ( | ) | [protected] |
reads a list of int/cellule which seems relative to a chart : CHECKME
Referenced by readZone().
| bool WKS4Parser::readChartName | ( | ) | [protected] |
reads the chart name or title
Referenced by readZone().
| bool WKS4Parser::readChartUnknown | ( | ) | [protected] |
reads an unknown structure which seems relative to a chart : CHECKME
Referenced by readZone().
| bool WKS4Parser::readFieldName | ( | ) | [protected] |
read a list of field name + ...
Referenced by readZone().
| bool WKS4Parser::readFont | ( | ) | [protected] |
reads the fonts
Referenced by readZone().
| bool WKS4Parser::readHeaderFooter | ( | bool | header | ) | [protected] |
reads the header/footer
Referenced by readZone().
| bool WKS4Parser::readPrn2 | ( | ) | [protected] |
reads another printer data. Seem simillar to ZZPrnt
Referenced by readZone().
| bool WKS4Parser::readPrnt | ( | ) | [protected] |
reads a printer data ?
Referenced by readZone().
| bool WKS4Parser::readUnknown0 | ( | ) | [protected] |
reads some unknown zones 0:7|0:9
Referenced by readZone().
| bool WKS4Parser::readUnknown1 | ( | ) | [protected] |
reads some unknown spreadsheet zones 0:18|0:19|0:20|0:27|0:2a
Referenced by readZone().
| bool WKS4Parser::readZone | ( | ) | [protected] |
reads a zone
Referenced by checkHeader(), and readZones().
| bool WKS4Parser::readZones | ( | ) | [protected] |
finds the different zones (spreadsheet, chart, print, ...)
Referenced by parse().
| void WKS4Parser::sendHeaderFooter | ( | bool | header | ) | [protected] |
send the header/footer
Referenced by WKS4ParserInternal::SubDocument::parse().
| int WKS4Parser::version | ( | ) | const [protected] |
return the file version
Reimplemented from WKSParser.
Referenced by readFont(), sendHeaderFooter(), and WKS4Spreadsheet::version().
friend class WKS4ParserInternal::SubDocument [friend] |
friend class WKS4Spreadsheet [friend] |
Referenced by WKS4Parser().
shared_ptr<WKSContentListener> WKS4Parser::m_listener [protected] |
Referenced by parse(), and sendHeaderFooter().
shared_ptr<WKS4Spreadsheet> WKS4Parser::m_spreadsheetParser [protected] |
the spreadsheet manager
Referenced by parse(), readChartDef(), readChartList(), readChartUnknown(), readZone(), and WKS4Parser().
shared_ptr<WKS4ParserInternal::State> WKS4Parser::m_state [protected] |
the listener (if set)
the internal state
Referenced by checkFilePosition(), checkHeader(), createListener(), getColor(), getFont(), readFieldName(), readFont(), readHeaderFooter(), readPrnt(), readZone(), sendHeaderFooter(), version(), and WKS4Parser().