LotusSpreadsheet Class Reference documentation

- Main Page
- Namespaces
- Classes
- Files

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

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

This class parses Microsoft Works spreadsheet file. More...

`#include <LotusSpreadsheet.h>`

## Public Member Functions
| LotusSpreadsheet (LotusParser &parser)
| constructor More...
| ~LotusSpreadsheet ()
| destructor More...
void | cleanState ()
| clean internal state More...
void | updateState ()
| update internal state (must be called one time before sending data) More...
void | setListener (WKSContentListenerPtr &listen)
| sets the listener More...
void | setLastSpreadsheetId (int id)
| set the last spreadsheet number ( default 0) More...

## 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 | hasSomeSpreadsheetData () const
| returns true if some spreadshet are defined More...
void | sendSpreadsheet (int sheetId)
| send the data More...
void | sendCellContent (LotusSpreadsheetInternal::Cell const &cell, LotusSpreadsheetInternal::Style const &style)
| send the cell data More...
bool | readSheetName ()
| reads a sheet name More...
bool | readColumnDefinition ()
| reads the columns definitions More...
bool | readColumnSizes ()
| reads the column sizes ( in char ) More...
bool | readRowFormats ()
| reads the row formats More...
bool | readRowFormat (LotusSpreadsheetInternal::Style &style, int &numCell, long endPos)
| reads a cell's row format More...
bool | readRowSizes (long endPos)
| reads the row size ( in pt*32 ) More...
bool | readCell ()
| reads a cell More...
bool | readCellName ()
| reads a cell or list of cell name More...
bool | readCell (int sId, bool isList, WKSContentListener::FormulaInstruction &instr)
bool | readFormula (long endPos, int sId, bool newFormula, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error)

## Private Member Functions
| LotusSpreadsheet (LotusSpreadsheet const &orig)
LotusSpreadsheet & | operator= (LotusSpreadsheet const &orig)
libwps::DebugFile & | ascii ()
| returns the debug file More...

## Private Attributes
RVNGInputStreamPtr | m_input
| the input More...
shared_ptr< WKSContentListener > | m_listener
LotusParser & | m_mainParser
| the listener (if set) More...
shared_ptr< LotusStyleManager > | m_styleManager
| the style manager More...
shared_ptr< LotusSpreadsheetInternal::State > | m_state
| the internal state More...
libwps::DebugFile & | m_asciiFile
| the ascii file More...

## Friends
class | LotusParser

## Detailed Description

This class parses Microsoft Works spreadsheet file.

## Constructor & Destructor Documentation

LotusSpreadsheet::LotusSpreadsheet | ( | LotusParser & | parser | ) |

constructor

LotusSpreadsheet::~LotusSpreadsheet | ( |  | ) |

destructor

LotusSpreadsheet::LotusSpreadsheet | ( | LotusSpreadsheet const & | orig | ) |
| private

## Member Function Documentation

libwps::DebugFile& LotusSpreadsheet::ascii | ( |  | ) |
| inlineprivate

returns the debug file

Referenced by readCell(), readCellName(), readColumnDefinition(), readColumnSizes(), readRowFormats(), readRowSizes(), and readSheetName().

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

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

void LotusSpreadsheet::cleanState | ( |  | ) |

clean internal state

bool LotusSpreadsheet::hasSomeSpreadsheetData | ( |  | ) | const
| protected

returns true if some spreadshet are defined

LotusSpreadsheet& LotusSpreadsheet::operator= | ( | LotusSpreadsheet const & | orig | ) |
| private

bool LotusSpreadsheet::readCell | ( |  | ) |
| protected

reads a cell

Referenced by readFormula().

bool LotusSpreadsheet::readCell | ( | int | sId,
|  | bool | isList,
|  | WKSContentListener::FormulaInstruction & | instr
| ) |  |
| protected

bool LotusSpreadsheet::readCellName | ( |  | ) |
| protected

reads a cell or list of cell name

bool LotusSpreadsheet::readColumnDefinition | ( |  | ) |
| protected

reads the columns definitions

bool LotusSpreadsheet::readColumnSizes | ( |  | ) |
| protected

reads the column sizes ( in char )

bool LotusSpreadsheet::readFormula | ( | long | endPos,
|  | int | sId,
|  | bool | newFormula,
|  | std::vector< WKSContentListener::FormulaInstruction > & | formula,
|  | std::string & | error
| ) |  |
| protected

Referenced by readCell().

bool LotusSpreadsheet::readRowFormat | ( | LotusSpreadsheetInternal::Style & | style,
|  | int & | numCell,
|  | long | endPos
| ) |  |
| protected

reads a cell's row format

Referenced by readRowFormats().

bool LotusSpreadsheet::readRowFormats | ( |  | ) |
| protected

reads the row formats

bool LotusSpreadsheet::readRowSizes | ( | long | endPos | ) |
| protected

reads the row size ( in pt*32 )

bool LotusSpreadsheet::readSheetName | ( |  | ) |
| protected

reads a sheet name

void LotusSpreadsheet::sendCellContent | ( | LotusSpreadsheetInternal::Cell const & | cell,
|  | LotusSpreadsheetInternal::Style const & | style
| ) |  |
| protected

send the cell data

Referenced by sendSpreadsheet().

void LotusSpreadsheet::sendSpreadsheet | ( | int | sheetId | ) |
| protected

send the data

void LotusSpreadsheet::setLastSpreadsheetId | ( | int | id | ) |

set the last spreadsheet number ( default 0)

void LotusSpreadsheet::setListener | ( | WKSContentListenerPtr & | listen | ) |
| inline

sets the listener

void LotusSpreadsheet::updateState | ( |  | ) |

update internal state (must be called one time before sending data)

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

return the file version

## Friends And Related Function Documentation

friend class LotusParser
| friend

## Member Data Documentation

libwps::DebugFile& LotusSpreadsheet::m_asciiFile
| private

the ascii file

Referenced by ascii().

RVNGInputStreamPtr LotusSpreadsheet::m_input
| private

the input

Referenced by checkFilePosition(), readCell(), readCellName(), readColumnDefinition(), readColumnSizes(), readFormula(), readRowFormat(), readRowFormats(), readRowSizes(), readSheetName(), and sendCellContent().

shared_ptr<WKSContentListener> LotusSpreadsheet::m_listener
| private

Referenced by sendCellContent(), sendSpreadsheet(), and setListener().

LotusParser& LotusSpreadsheet::m_mainParser
| private

the listener (if set)

the main parser

Referenced by readRowFormats(), readSheetName(), sendSpreadsheet(), and version().

shared_ptr<LotusSpreadsheetInternal::State> LotusSpreadsheet::m_state
| private

the internal state

Referenced by checkFilePosition(), cleanState(), hasSomeSpreadsheetData(), LotusSpreadsheet(), readCell(), readCellName(), readColumnDefinition(), readColumnSizes(), readFormula(), readRowFormats(), readRowSizes(), readSheetName(), sendSpreadsheet(), setLastSpreadsheetId(), updateState(), and version().

shared_ptr<LotusStyleManager> LotusSpreadsheet::m_styleManager
| private

the style manager

Referenced by readRowFormat().

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

- LotusSpreadsheet.h
- LotusSpreadsheet.cpp