ClarisWksDbaseContent Class Reference documentation

Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ClarisWksDbaseContent Class Reference

small structure used to parse main content of a spreadsheet/database zone More...

`#include <ClarisWksDbaseContent.hxx>`

## Classes
struct | Column
| struct which stores a column in ClarisWksDbaseContent More...
struct | Record
| struct which stores a record in ClarisWksDbaseContent More...

## Public Member Functions
| ClarisWksDbaseContent (ClarisWksDocument &document, bool spreadsheet)
| constructor More...
| ~ClarisWksDbaseContent ()
| destructor More...
bool | readContent ()
| try to read the record structure More...
bool | readFormula (MWAWVec2i const &cPos, long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, std::string &error)
| read to read a formula More...
bool | getExtrema (MWAWVec2i &min, MWAWVec2i &max) const
| returns the dimension of the read data More...
bool | getRecordList (std::vector< int > &list) const
| returns the list of filled record/row More...
bool | getColumnList (int row, std::vector< int > &list) const
| returns the list of filled columns More...
bool | get (MWAWVec2i const &pos, Record &data) const
| retrieves the cell data More...
bool | send (MWAWVec2i const &pos)
| try to send a cell content to the listener More...
void | setDatabaseFormats (std::vector< ClarisWksStyleManager::CellFormat > const &format)
| set the field format ( for database ) More...

## Protected Member Functions
bool | readColumnList ()
| try to read the columns list structure(CTAB) More...
bool | readColumn (int c)
| try to read the column structure(COLM): a list of chnk More...
bool | readRecordList (MWAWVec2i const &where, Column &col)
| try to read a list of records(CHNK) More...
bool | readRecordSS (MWAWVec2i const &where, long pos, Record &record)
| try to read a spreadsheet record More...
bool | readRecordSSV1 (MWAWVec2i const &where, long pos, Record &record)
| try to read a spreadsheet record(v1-v3) More...
bool | readRecordDB (MWAWVec2i const &where, long pos, Record &record)
| try to read a database record More...
void | send (double val, bool isNotaNumber, ClarisWksStyleManager::CellFormat const &format)
| send a double with a corresponding cell format More...
bool | readCellInFormula (MWAWVec2i const &pos, MWAWCellContent::FormulaInstruction &instr)
| reads a cell More...
bool | readString (long endPos, std::string &res)
| try to read a string More...
bool | readNumber (long endPos, double &res, bool &isNan)
| try to read a number More...
void | updateCellPositionsSet () const
| update the position set More...

## Protected Attributes
int | m_version
| the file version More...
bool | m_isSpreadsheet
| a bool to know if this is a spreadsheet or a database More...
ClarisWksDocument & | m_document
| the document More...
MWAWParserStatePtr | m_parserState
| the parser state More...
std::map< int, Column > | m_idColumnMap
| a map col id to column More...
std::set< MWAWVec2i > | m_positionSet
| a set of cell position (sorted by row) More...
std::vector< ClarisWksStyleManager::CellFormat > | m_dbFormatList
| the databse format More...

## Detailed Description

small structure used to parse main content of a spreadsheet/database zone

## Constructor & Destructor Documentation

## ◆ ClarisWksDbaseContent()

ClarisWksDbaseContent::ClarisWksDbaseContent | ( | ClarisWksDocument & | document,
|  | bool | spreadsheet
| ) |  |

constructor

## ◆ ~ClarisWksDbaseContent()

ClarisWksDbaseContent::~ClarisWksDbaseContent | ( |  | ) |

destructor

## Member Function Documentation

## ◆ get()

bool ClarisWksDbaseContent::get | ( | MWAWVec2i const & | pos,
|  | ClarisWksDbaseContent::Record & | record
| ) |  | const

retrieves the cell data

Referenced by send().

## ◆ getColumnList()

bool ClarisWksDbaseContent::getColumnList | ( | int | row,
|  | std::vector< int > & | list
| ) |  | const

returns the list of filled columns

## ◆ getExtrema()

bool ClarisWksDbaseContent::getExtrema | ( | MWAWVec2i & | min,
|  | MWAWVec2i & | max
| ) |  | const

returns the dimension of the read data

## ◆ getRecordList()

bool ClarisWksDbaseContent::getRecordList | ( | std::vector< int > & | list | ) | const

returns the list of filled record/row

## ◆ readCellInFormula()

bool ClarisWksDbaseContent::readCellInFormula | ( | MWAWVec2i const & | pos,
|  | MWAWCellContent::FormulaInstruction & | instr
| ) |  |
| protected

reads a cell

Referenced by readFormula().

## ◆ readColumn()

bool ClarisWksDbaseContent::readColumn | ( | int | c | ) |
| protected

try to read the column structure(COLM): a list of chnk

Referenced by readColumnList().

## ◆ readColumnList()

bool ClarisWksDbaseContent::readColumnList | ( |  | ) |
| protected

try to read the columns list structure(CTAB)

Referenced by readContent().

## ◆ readContent()

bool ClarisWksDbaseContent::readContent | ( |  | ) |

try to read the record structure

ARGHH: this zone is almost the only zone which count the header in sz ...

## ◆ readFormula()

bool ClarisWksDbaseContent::readFormula | ( | MWAWVec2i const & | cPos,
|  | long | endPos,
|  | std::vector< MWAWCellContent::FormulaInstruction > & | formula,
|  | std::string & | error
| ) |  |

read to read a formula

Referenced by readFormula(), readRecordSS(), and readRecordSSV1().

## ◆ readNumber()

bool ClarisWksDbaseContent::readNumber | ( | long | endPos,
|  | double & | res,
|  | bool & | isNan
| ) |  |
| protected

try to read a number

Referenced by readFormula().

## ◆ readRecordDB()

bool ClarisWksDbaseContent::readRecordDB | ( | MWAWVec2i const & | where,
|  | long | pos,
|  | ClarisWksDbaseContent::Record & | record
| ) |  |
| protected

try to read a database record

Referenced by readRecordList().

## ◆ readRecordList()

bool ClarisWksDbaseContent::readRecordList | ( | MWAWVec2i const & | where,
|  | Column & | col
| ) |  |
| protected

try to read a list of records(CHNK)

Referenced by readColumn().

## ◆ readRecordSS()

bool ClarisWksDbaseContent::readRecordSS | ( | MWAWVec2i const & | where,
|  | long | pos,
|  | ClarisWksDbaseContent::Record & | record
| ) |  |
| protected

try to read a spreadsheet record

checkme: there does not seem to be alignment, but another variable before the result

Referenced by readRecordList().

## ◆ readRecordSSV1()

bool ClarisWksDbaseContent::readRecordSSV1 | ( | MWAWVec2i const & | where,
|  | long | pos,
|  | ClarisWksDbaseContent::Record & | record
| ) |  |
| protected

try to read a spreadsheet record(v1-v3)

Referenced by readRecordSS().

## ◆ readString()

bool ClarisWksDbaseContent::readString | ( | long | endPos,
|  | std::string & | res
| ) |  |
| protected

try to read a string

Referenced by readFormula().

## ◆ send() [1/2]

void ClarisWksDbaseContent::send | ( | double | val,
|  | bool | isNotaNumber,
|  | ClarisWksStyleManager::CellFormat const & | format
| ) |  |
| protected

send a double with a corresponding cell format

## ◆ send() [2/2]

bool ClarisWksDbaseContent::send | ( | MWAWVec2i const & | pos | ) |

try to send a cell content to the listener

Referenced by send().

## ◆ setDatabaseFormats()

void ClarisWksDbaseContent::setDatabaseFormats | ( | std::vector< ClarisWksStyleManager::CellFormat > const & | format | ) |

set the field format ( for database )

## ◆ updateCellPositionsSet()

void ClarisWksDbaseContent::updateCellPositionsSet | ( |  | ) | const
| protected

update the position set

Referenced by getColumnList().

## Member Data Documentation

## ◆ m_dbFormatList

std::vector<ClarisWksStyleManager::CellFormat> ClarisWksDbaseContent::m_dbFormatList
| protected

the databse format

Referenced by get(), and setDatabaseFormats().

## ◆ m_document

ClarisWksDocument& ClarisWksDbaseContent::m_document
| protected

the document

Referenced by readRecordDB(), readRecordSS(), and readRecordSSV1().

## ◆ m_idColumnMap

std::map<int, Column> ClarisWksDbaseContent::m_idColumnMap
| protected

a map col id to column

Referenced by get(), getColumnList(), getExtrema(), getRecordList(), readColumn(), and updateCellPositionsSet().

## ◆ m_isSpreadsheet

bool ClarisWksDbaseContent::m_isSpreadsheet
| protected

a bool to know if this is a spreadsheet or a database

Referenced by get(), readColumn(), readColumnList(), readContent(), readRecordList(), and setDatabaseFormats().

## ◆ m_parserState

MWAWParserStatePtr ClarisWksDbaseContent::m_parserState
| protected

the parser state

Referenced by ClarisWksDbaseContent(), readCellInFormula(), readColumn(), readColumnList(), readContent(), readFormula(), readNumber(), readRecordDB(), readRecordList(), readRecordSS(), readRecordSSV1(), readString(), and send().

## ◆ m_positionSet

std::set<MWAWVec2i> ClarisWksDbaseContent::m_positionSet
| mutableprotected

a set of cell position (sorted by row)

Referenced by getColumnList(), and updateCellPositionsSet().

## ◆ m_version

int ClarisWksDbaseContent::m_version
| protected

the file version

Referenced by ClarisWksDbaseContent(), readCellInFormula(), readRecordDB(), and readRecordSS().

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

- ClarisWksDbaseContent.hxx
- ClarisWksDbaseContent.cxx