LotusParser Class Reference

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

#include <Lotus.h>

Inheritance diagram for LotusParser:
WKSParser

List of all members.

Public Member Functions

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

Protected Attributes

shared_ptr< WKSContentListenerm_listener
shared_ptr
< LotusParserInternal::State
m_state
 the listener (if set)
shared_ptr< LotusStyleManagerm_styleManager
 the style manager
shared_ptr< LotusGraphm_graphParser
 the graph manager
shared_ptr< LotusSpreadsheetm_spreadsheetParser
 the spreadsheet manager

Friends

class LotusParserInternal::SubDocument
class LotusGraph
class LotusSpreadsheet
class LotusStyleManager

Detailed Description

This class parses a WK2..WK4 Lotus spreadsheet.


Constructor & Destructor Documentation

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(), and readZones().

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().

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::sendSpreadsheet(), 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]

Friends And Related Function Documentation

friend class LotusGraph [friend]

Referenced by LotusParser().

friend class LotusParserInternal::SubDocument [friend]
friend class LotusSpreadsheet [friend]

Referenced by LotusParser().

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().

Referenced by parse().

the spreadsheet manager

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

the style manager

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


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