ClarisWksDbaseContent Class Reference

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

#include <ClarisWksDbaseContent.hxx>

List of all members.

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
 ~ClarisWksDbaseContent ()
 destructor
bool readContent ()
 try to read the record structure
bool getExtrema (MWAWVec2i &min, MWAWVec2i &max) const
 returns the dimension of the read data
bool getRecordList (std::vector< int > &list) const
 returns the list of filled record (for database)
bool get (MWAWVec2i const &pos, Record &data) const
 retrieves the cell data
bool send (MWAWVec2i const &pos)
 try to send a cell content to the listener
void setDatabaseFormats (std::vector< ClarisWksStyleManager::CellFormat > const &format)
 set the field format ( for database )

Protected Member Functions

bool readColumnList ()
 try to read the columns list structure(CTAB)
bool readColumn (int c)
 try to read the column structure(COLM): a list of chnk
bool readRecordList (MWAWVec2i const &where, Column &col)
 try to read a list of records(CHNK)
bool readRecordSS (MWAWVec2i const &where, long pos, Record &record)
 try to read a spreadsheet record
bool readRecordSSV1 (MWAWVec2i const &where, long pos, Record &record)
 try to read a spreadsheet record(v1-v3)
bool readRecordDB (MWAWVec2i const &where, long pos, Record &record)
 try to read a database record
void send (double val, bool isNotaNumber, ClarisWksStyleManager::CellFormat const &format)
 send a double with a corresponding cell format
bool readCellInFormula (MWAWVec2i const &pos, MWAWCellContent::FormulaInstruction &instr)
 reads a cell
bool readString (long endPos, std::string &res)
 try to read a string
bool readNumber (long endPos, double &res, bool &isNan)
 try to read a number
bool readFormula (MWAWVec2i const &cPos, long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, std::string &error)
 read to read a formula

Protected Attributes

int m_version
 the file version
bool m_isSpreadsheet
 a bool to know if this is a spreadsheet or a database
ClarisWksDocumentm_document
 the document
MWAWParserStatePtr m_parserState
 the parser state
std::map< int, Columnm_idColumnMap
 a map col id to column
std::vector
< ClarisWksStyleManager::CellFormat
m_dbFormatList
 the databse format

Detailed Description

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


Constructor & Destructor Documentation

ClarisWksDbaseContent::ClarisWksDbaseContent ( ClarisWksDocument document,
bool  spreadsheet 
)

constructor


Member Function Documentation

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

retrieves the cell data

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

returns the dimension of the read data

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

returns the list of filled record (for database)

reads a cell

Referenced by readFormula().

bool ClarisWksDbaseContent::readColumn ( int  c) [protected]

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

Referenced by readColumnList().

try to read the columns list structure(CTAB)

Referenced by readContent().

try to read the record structure

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

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

read to read a formula

Referenced by readRecordSS(), and readRecordSSV1().

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

try to read a number

Referenced by readFormula().

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

try to read a database record

Referenced by readRecordList().

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

try to read a list of records(CHNK)

Referenced by readColumn().

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

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

try to read a spreadsheet record(v1-v3)

Referenced by readRecordSS().

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

try to read a string

Referenced by readFormula().

bool ClarisWksDbaseContent::send ( MWAWVec2i const &  pos)

try to send a cell content to the listener

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

send a double with a corresponding cell format

set the field format ( for database )


Member Data Documentation

the databse format

Referenced by get(), and setDatabaseFormats().

std::map<int, Column> ClarisWksDbaseContent::m_idColumnMap [protected]

a map col id to column

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

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

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


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