This class parses Microsoft PocketExcel spreadsheet 1.0, 1.1. More...
#include <PocketExcel.h>
Public Member Functions | |
| PocketExcelParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header) | |
| constructor | |
| ~PocketExcelParser () override | |
| 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 | |
| std::shared_ptr< WKSContentListener > | createListener (librevenge::RVNGSpreadsheetInterface *interface) |
| creates the main listener | |
| bool | readZones (librevenge::RVNGSpreadsheetInterface *documentInterface) |
| finds the different zones (spreadsheet, chart, print, ...) | |
| bool | readZone (librevenge::RVNGSpreadsheetInterface *documentInterface) |
| tries to read a zone. | |
| bool | readBeginZone () |
| tries to read the begining of a block: 09 | |
| bool | readSheetName () |
| tries to read the sheet name zone: 85 | |
| bool | readCell () |
| tries to read a cell: 1: blank, 3: number, 4: label | |
| bool | readDefColInfo () |
| tries to read the default column info: 55 | |
| bool | readColInfo () |
| tries to read the column information: 7d | |
| bool | readFontDescription () |
| tries to read a font description: 32 | |
| bool | readCellFormat () |
| tries to read a cellule format : e0 | |
| bool | readName () |
| tries to read a defined name: 8 | |
| bool | readNumberFormat () |
| tries to read a format zone: 1e | |
| bool | readPaneInfo () |
| tries to read the pane information: 41 | |
| bool | readDefRowHeight () |
| tries to read the default row heights: 25 | |
| bool | readRowHeight () |
| tries to read a row height: 8 | |
| bool | readSelection () |
| tries to read the current selection: 1d | |
| bool | readSheetInfo () |
| tries to read the sheet window info: 3e | |
| void | updateFmtWithUserFormat (WPSCellFormat &fmt, librevenge::RVNGString const &format) |
| try to update a cell format using the custom string | |
| librevenge::RVNGString | readString (int N) |
| try to read a string, ie. N unicode characters | |
| bool | updateCell (int row, int col, int relPos, Vec2i const &actPos, WKSContentListener::FormulaInstruction &instr, int which=0) |
| try to update a cell position | |
| bool | readFormula (long endPos, Vec2i const &cellPos, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &extra) |
| try to read a formula | |
| bool | sendSheet (PocketExcelParserInternal::Sheet const &sheet, int id) |
| try to send a sheet | |
| void | sendCellContent (PocketExcelParserInternal::Cell const &cell, Vec2i const &pos) |
| send the cell data | |
| 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< PocketExcelParserInternal::State > | m_state |
| the listener (if set) | |
This class parses Microsoft PocketExcel spreadsheet 1.0, 1.1.
| libwps::PocketExcelParser::PocketExcelParser | ( | RVNGInputStreamPtr & | input, |
| WPSHeaderPtr & | header ) |
constructor
|
override |
destructor
|
protected |
return true if the pos is in the file, update the file size if need
Referenced by checkHeader(), readBeginZone(), readCell(), readCellFormat(), readColInfo(), readDefColInfo(), readDefRowHeight(), readFontDescription(), readName(), readNumberFormat(), readPaneInfo(), readRowHeight(), readSelection(), readSheetInfo(), readSheetName(), readString(), and readZone().
| bool libwps::PocketExcelParser::checkHeader | ( | WPSHeader * | header, |
| bool | strict = false ) |
checks if the document header is correct (or not)
Referenced by libwps::WPSDocument::isFileFormatSupported(), and parse().
|
protected |
creates the main listener
Referenced by readZone().
|
finalvirtual |
called by WPSDocument to parse the file
Implements WKSParser.
|
protected |
tries to read the begining of a block: 09
Referenced by readZone().
|
protected |
tries to read a cell: 1: blank, 3: number, 4: label
Referenced by readZone().
|
protected |
tries to read a cellule format : e0
Referenced by readZone().
|
protected |
tries to read the column information: 7d
Referenced by readZone().
|
protected |
tries to read the default column info: 55
Referenced by readZone().
|
protected |
tries to read the default row heights: 25
Referenced by readZone().
|
protected |
tries to read a font description: 32
Referenced by readZone().
|
protected |
try to read a formula
Referenced by readCell().
|
protected |
tries to read a defined name: 8
Referenced by readZone().
|
protected |
tries to read a format zone: 1e
Referenced by readZone().
|
protected |
tries to read the pane information: 41
Referenced by readZone().
|
protected |
tries to read a row height: 8
Referenced by readZone().
|
protected |
tries to read the current selection: 1d
Referenced by readZone().
|
protected |
tries to read the sheet window info: 3e
Referenced by readZone().
|
protected |
tries to read the sheet name zone: 85
Referenced by readZone().
|
protected |
try to read a string, ie. N unicode characters
Referenced by readCell(), readFontDescription(), readFormula(), readName(), readNumberFormat(), and readSheetName().
|
protected |
tries to read a zone.
Referenced by checkHeader(), and readZones().
|
protected |
finds the different zones (spreadsheet, chart, print, ...)
Referenced by parse().
|
protected |
send the cell data
Referenced by sendSheet().
|
protected |
try to send a sheet
Referenced by readZone().
|
protected |
try to update a cell position
Referenced by readFormula().
|
protected |
try to update a cell format using the custom string
Referenced by readNumberFormat().
|
protected |
Referenced by parse(), PocketExcelParser(), readZone(), sendCellContent(), and sendSheet().
|
protected |
the listener (if set)
the internal state
Referenced by checkFilePosition(), checkHeader(), PocketExcelParser(), readBeginZone(), readCell(), readCellFormat(), readColInfo(), readDefColInfo(), readDefRowHeight(), readFontDescription(), readFormula(), readName(), readNumberFormat(), readRowHeight(), readSheetInfo(), readSheetName(), readString(), readZone(), and sendSheet().