- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
LotusParser Class Reference

This class parses a WK2..WK4 Lotus spreadsheet. More...

`#include <Lotus.h>`

Inheritance diagram for LotusParser:

## Public Member Functions
| LotusParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN)
| constructor More...
| ~LotusParser ()
| 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...
bool | getFont (int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
| returns the font corresponding to an id More...
libwps_tools_win::Font::Type | getDefaultFontType () const
| returns the default font type, ie. More...
bool | hasGraphics (int sheetId) const
| return true if the sheet sheetId has some graphic More...
void | sendGraphics (int sheetId)
| send the graphics corresponding to a sheetId More...
shared_ptr< WKSContentListener > | createListener (librevenge::RVNGSpreadsheetInterface *interface)
| creates the main listener More...
bool | readZones ()
| finds the different zones (spreadsheet, chart, print, ...) More...
bool | readDataZone ()
| parse the different zones 1B More...
bool | readZone ()
| reads a zone More...
bool | readMacFontName (long endPos)
| reads a mac font name More...
bool | readFMTFontName ()
| reads a format font name More...
bool | readLinkZone ()
| reads a link More...
bool | readDocumentInfoMac (long endPos)
| reads a mac document info zone: zone 1b, then 2af8 More...
bool | readChartDefinition ()
| reads a chart definitions More...
bool | readChartName ()
| reads the chart name or title More...
Protected Member Functions inherited from WKSParser
RVNGInputStreamPtr & | getInput ()
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...

## Protected Attributes
shared_ptr< WKSContentListener > | m_listener
shared_ptr< LotusParserInternal::State > | m_state
| the listener (if set) More...
shared_ptr< LotusStyleManager > | m_styleManager
| the style manager More...
shared_ptr< LotusGraph > | m_graphParser
| the graph manager More...
shared_ptr< LotusSpreadsheet > | m_spreadsheetParser
| the spreadsheet manager More...

## Friends
class | LotusParserInternal::SubDocument
class | LotusGraph
class | LotusSpreadsheet
class | LotusStyleManager

## Detailed Description

This class parses a WK2..WK4 Lotus spreadsheet.

## Constructor & Destructor Documentation

LotusParser::LotusParser | ( | RVNGInputStreamPtr & | input,
|  | WPSHeaderPtr & | header,
|  | libwps_tools_win::Font::Type | encoding = `libwps_tools_win::Font::UNKNOWN`
| ) |  |

constructor

LotusParser::~LotusParser | ( |  | ) |

destructor

## Member Function Documentation

bool LotusParser::checkFilePosition | ( | long | pos | ) |
| protected

return true if the pos is in the file, update the file size if need

Referenced by checkHeader(), readZone(), readZones(), and LotusSpreadsheet::setListener().

bool LotusParser::checkHeader | ( | WPSHeader * | header,
|  | bool | strict = `false`
| ) |  |

checks if the document header is correct (or not)

Referenced by parse().

shared_ptr< WKSContentListener > LotusParser::createListener | ( | librevenge::RVNGSpreadsheetInterface * | interface | ) |
| protected

creates the main listener

Referenced by parse().

libwps_tools_win::Font::Type LotusParser::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 LotusStyleManager::readFontStyle(), LotusSpreadsheet::readRowFormats(), LotusSpreadsheet::readSheetName(), LotusSpreadsheet::sendRowContent(), and LotusGraph::sendTextBox().

bool LotusParser::getFont | ( | int | id,
|  | WPSFont & | font,
|  | libwps_tools_win::Font::Type & | type
| ) |  | const
| protected

returns the font corresponding to an id

Referenced by LotusGraph::sendTextBox(), and LotusStyleManager::updateState().

bool LotusParser::hasGraphics | ( | int | sheetId | ) | const
| protected

return true if the sheet sheetId has some graphic

void LotusParser::parse | ( | librevenge::RVNGSpreadsheetInterface * | documentInterface | ) |
| virtual

called by WPSDocument to parse the file

Implements WKSParser.

bool LotusParser::readChartDefinition | ( |  | ) |
| protected

reads a chart definitions

Referenced by readZone().

bool LotusParser::readChartName | ( |  | ) |
| protected

reads the chart name or title

Referenced by readZone().

bool LotusParser::readDataZone | ( |  | ) |
| protected

parse the different zones 1B

Referenced by readZone().

bool LotusParser::readDocumentInfoMac | ( | long | endPos | ) |
| protected

reads a mac document info zone: zone 1b, then 2af8

Referenced by readDataZone().

bool LotusParser::readFMTFontName | ( |  | ) |
| protected

reads a format font name

Referenced by readZone().

bool LotusParser::readLinkZone | ( |  | ) |
| protected

reads a link

Referenced by readZone().

bool LotusParser::readMacFontName | ( | long | endPos | ) |
| protected

reads a mac font name

Referenced by readDataZone().

bool LotusParser::readZone | ( |  | ) |
| protected

reads a zone

Referenced by checkHeader(), and readZones().

bool LotusParser::readZones | ( |  | ) |
| protected

finds the different zones (spreadsheet, chart, print, ...)

Referenced by parse().

void LotusParser::sendGraphics | ( | int | sheetId | ) |
| protected

send the graphics corresponding to a sheetId

Referenced by LotusSpreadsheet::sendSpreadsheet().

int LotusParser::version | ( |  | ) | const
| protected

return the file version

Referenced by readMacFontName(), readZone(), LotusSpreadsheet::setListener(), LotusGraph::version(), LotusSpreadsheet::version(), and LotusStyleManager::version().

## Friends And Related Function Documentation

friend class LotusGraph
| friend

Referenced by LotusParser().

friend class LotusParserInternal::SubDocument
| friend

friend class LotusSpreadsheet
| friend

Referenced by LotusParser(), and LotusSpreadsheet::setListener().

friend class LotusStyleManager
| friend

Referenced by LotusParser().

## Member Data Documentation

shared_ptr<LotusGraph> LotusParser::m_graphParser
| protected

the graph manager

Referenced by hasGraphics(), LotusParser(), parse(), readDataZone(), readZones(), and sendGraphics().

shared_ptr<WKSContentListener> LotusParser::m_listener
| protected

Referenced by parse(), and LotusSpreadsheet::setListener().

shared_ptr<LotusSpreadsheet> LotusParser::m_spreadsheetParser
| protected

the spreadsheet manager

Referenced by LotusParser(), parse(), readDataZone(), readZone(), and readZones().

shared_ptr<LotusParserInternal::State> LotusParser::m_state
| protected

the listener (if set)

the internal state

Referenced by checkFilePosition(), checkHeader(), createListener(), getDefaultFontType(), getFont(), LotusParser(), parse(), readDocumentInfoMac(), readMacFontName(), readZone(), readZones(), and version().

shared_ptr<LotusStyleManager> LotusParser::m_styleManager
| protected

the style manager

Referenced by LotusParser(), parse(), readDataZone(), and readZones().

The documentation for this class was generated from the following files:

- Lotus.h
- Lotus.cpp