LotusParser Class Reference

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

#include <Lotus.h>

Inheritance diagram for LotusParser:
WKSParser

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< WKSContentListenercreateListener (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
RVNGInputStreamPtrgetInput ()
 
RVNGInputStreamPtr getFileInput ()
 
WPSHeaderPtrgetHeader ()
 
int version () const
 
void setVersion (int vers)
 
libwps::DebugFileascii ()
 a DebugFile used to write what we recognize when we parse the document More...
 

Protected Attributes

shared_ptr< WKSContentListenerm_listener
 
shared_ptr< LotusParserInternal::Statem_state
 the listener (if set) More...
 
shared_ptr< LotusStyleManagerm_styleManager
 the style manager More...
 
shared_ptr< LotusGraphm_graphParser
 the graph manager More...
 
shared_ptr< LotusSpreadsheetm_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(), 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().

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

shared_ptr<WKSContentListener> LotusParser::m_listener
protected

Referenced by parse().

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
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:

Generated on Wed Sep 23 2015 10:46:52 for libwps by doxygen 1.8.9.1