This class parses Microsoft Works spreadsheet or a database file. More...
#include <WKS4.h>
 
  
 | Public Member Functions | |
| WKS4Parser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN, char const *password=0) | |
| constructor  More... | |
| ~WKS4Parser () | |
| 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... | |
| libwps::WPSCreator | getCreator () const | 
| returns the creator  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 | parseFormatStream () | 
| check for the existence of a format stream, if it exists, parse it  More... | |
| void | resetMainInput (RVNGInputStreamPtr newInput) | 
| reset the main input  More... | |
| bool | readZones () | 
| finds the different zones (spreadsheet, chart, print, ...)  More... | |
| bool | readZone () | 
| reads a zone  More... | |
| bool | readZoneQuattro () | 
| reads a Quattro Pro zone  More... | |
| bool | readFont () | 
| reads a mswork font  More... | |
| bool | readPrnt () | 
| reads a printer data ?  More... | |
| bool | readPrn2 () | 
| reads another printer data. Seem simillar to ZZPrnt  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 | readChartFont () | 
| reads a structure which seems to define two chart font (only present in windows file)  More... | |
| bool | readChart2Font () | 
| reads a structure which seems to define four chart font (only present in windows file)  More... | |
| bool | readChartLimit () | 
| reads end/begin of chart (only present in windows file)  More... | |
| bool | readChartList () | 
| reads a list of int/cellule which seems relative to a chart : CHECKME  More... | |
| bool | readChartUnknown () | 
| reads an unknown structure which seems relative to a chart : CHECKME  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 () | 
| void | resetInput (RVNGInputStreamPtr 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  More... | |
| Static Protected Member Functions | |
| static RVNGInputStreamPtr | decodeStream (RVNGInputStreamPtr input, long endPos, std::vector< uint8_t > const &key) | 
| try to decode a stream, if successful, replace the stream'input by the new one  More... | |
| Protected Attributes | |
| shared_ptr< WKSContentListener > | m_listener | 
| shared_ptr< WKS4ParserInternal::State > | m_state | 
| the listener (if set)  More... | |
| shared_ptr< WKS4Spreadsheet > | m_spreadsheetParser | 
| the spreadsheet manager  More... | |
| Friends | |
| class | WKS4ParserInternal::SubDocument | 
| class | WKS4Spreadsheet | 
This class parses Microsoft Works spreadsheet or a database file.
| WKS4Parser::WKS4Parser | ( | RVNGInputStreamPtr & | input, | 
| WPSHeaderPtr & | header, | ||
| libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN, | ||
| char const * | password = 0 | ||
| ) | 
constructor
| WKS4Parser::~WKS4Parser | ( | ) | 
destructor
| 
 | protected | 
return true if the pos is in the file, update the file size if need
Referenced by checkHeader(), readZone(), readZoneQuattro(), readZones(), and WKS4Spreadsheet::setListener().
| bool WKS4Parser::checkHeader | ( | WPSHeader * | header, | 
| bool | strict = false | ||
| ) | 
checks if the document header is correct (or not)
Referenced by parse().
| 
 | protected | 
creates the main listener
Referenced by parse().
| 
 | staticprotected | 
try to decode a stream, if successful, replace the stream'input by the new one
Referenced by readZone().
| 
 | protected | 
returns the color corresponding to an id
Referenced by WKS4Spreadsheet::readMsWorksDOSCellExtraProperty(), and WKS4Spreadsheet::readMsWorksStyle().
| 
 | protected | 
returns the creator
| 
 | protected | 
returns the default font type, ie.
the encoding given by the constructor if given or the encoding deduiced from the version.
Referenced by WKS4Spreadsheet::readCell(), readFont(), WKS4Spreadsheet::readMsWorksDOSCellExtraProperty(), WKS4Spreadsheet::readMsWorksDOSCellProperty(), WKS4Spreadsheet::readMsWorksDOSFieldProperty(), WKS4Spreadsheet::readMsWorksStyle(), and WKS4Spreadsheet::sendCellContent().
| 
 | protected | 
returns the font corresponding to an id
Referenced by WKS4Spreadsheet::readMsWorksStyle().
| 
 | protected | 
returns the true if the file has LICS characters
Referenced by WKS4Spreadsheet::hasLICSCharacters(), sendHeaderFooter(), and WKS4Spreadsheet::setListener().
| 
 | virtual | 
called by WPSDocument to parse the file
Implements WKSParser.
| 
 | protected | 
check for the existence of a format stream, if it exists, parse it
Referenced by parse().
| 
 | protected | 
reads a structure which seems to define four chart font (only present in windows file)
Referenced by readZone().
| 
 | protected | 
reads a structure which seems to define a chart
Referenced by readZone().
| 
 | protected | 
reads a structure which seems to define two chart font (only present in windows file)
Referenced by readZone().
| 
 | protected | 
reads end/begin of chart (only present in windows file)
Referenced by readZone().
| 
 | protected | 
reads a list of int/cellule which seems relative to a chart : CHECKME
Referenced by readZone().
| 
 | protected | 
reads the chart name or title
Referenced by readZone().
| 
 | protected | 
reads an unknown structure which seems relative to a chart : CHECKME
Referenced by readZone().
| 
 | protected | 
read a list of field name + ...
Referenced by readZone().
| 
 | protected | 
reads a mswork font
Referenced by readZone().
| 
 | protected | 
reads the header/footer
Referenced by readZone().
| 
 | protected | 
reads another printer data. Seem simillar to ZZPrnt
Referenced by readZone().
| 
 | protected | 
reads a printer data ?
Referenced by readZone().
| 
 | protected | 
reads some unknown spreadsheet zones 0:18|0:19|0:20|0:27|0:2a
Referenced by readZone().
| 
 | protected | 
reads windows record 0:7|0:9
Referenced by readZone().
| 
 | protected | 
reads a zone
Referenced by checkHeader(), and readZones().
| 
 | protected | 
reads a Quattro Pro zone
Referenced by readZones().
| 
 | protected | 
finds the different zones (spreadsheet, chart, print, ...)
Referenced by parse().
| 
 | protected | 
reset the main input
Referenced by readZone().
| 
 | protected | 
send the header/footer
Referenced by WKS4ParserInternal::SubDocument::parse().
| 
 | protected | 
return the file version
Referenced by hasLICSCharacters(), readZones(), WKS4Spreadsheet::setListener(), and WKS4Spreadsheet::version().
| 
 | friend | 
| 
 | friend | 
Referenced by WKS4Spreadsheet::setListener(), and WKS4Parser().
| 
 | protected | 
Referenced by parse(), sendHeaderFooter(), and WKS4Spreadsheet::setListener().
| 
 | protected | 
the spreadsheet manager
Referenced by parse(), readChartDef(), readChartList(), readChartUnknown(), readZone(), readZones(), resetMainInput(), and WKS4Parser().
| 
 | protected | 
the listener (if set)
the internal state
Referenced by checkFilePosition(), checkHeader(), createListener(), getColor(), getCreator(), getDefaultFontType(), getFont(), hasLICSCharacters(), parseFormatStream(), readFieldName(), readFont(), readHeaderFooter(), readPrnt(), readZone(), readZones(), sendHeaderFooter(), version(), and WKS4Parser().