CWDbaseContent Class Reference

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

#include <CWDbaseContent.hxx>

Classes

struct  Column
 struct which stores a column in CWDbaseContent More...
 
struct  Record
 struct which stores a record in CWDbaseContent More...
 

Public Member Functions

 CWDbaseContent (MWAWParserStatePtr parserState, shared_ptr< CWStyleManager > styleManager, bool spreadsheet)
 constructor More...
 
 ~CWDbaseContent ()
 destructor More...
 
bool readContent ()
 try to read the record structure More...
 
bool getExtrema (Vec2i &min, Vec2i &max) const
 returns the dimension of the read data More...
 
bool getRecordList (std::vector< int > &list) const
 returns the list of filled record (for database) More...
 
bool send (Vec2i const &pos)
 try to send a cell content to the listener More...
 
void setDatabaseFormats (std::vector< CWStyleManager::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 (Vec2i const &where, Column &col)
 try to read a list of records(CHNK) More...
 
bool readRecordSS (Vec2i const &where, long pos, Record &record)
 try to read a spreadsheet record More...
 
bool readRecordSSV1 (Vec2i const &where, long pos, Record &record)
 try to read a spreadsheet record(v1-v3) More...
 
bool readRecordDB (Vec2i const &where, long pos, Record &record)
 try to read a database record More...
 
void send (double val, bool isNotaNumber, CWStyleManager::CellFormat const &format)
 send a double with a corresponding cell format 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...
 
MWAWParserStatePtr m_parserState
 the parser state More...
 
shared_ptr< CWStyleManagerm_styleManager
 the style manager More...
 
std::map< int, Columnm_idColumnMap
 a map col id to column More...
 
std::vector
< CWStyleManager::CellFormat
m_dbFormatList
 the databse format More...
 

Detailed Description

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

Constructor & Destructor Documentation

CWDbaseContent::CWDbaseContent ( MWAWParserStatePtr  parserState,
shared_ptr< CWStyleManager styleManager,
bool  spreadsheet 
)

constructor

CWDbaseContent::~CWDbaseContent ( )

destructor

Member Function Documentation

bool CWDbaseContent::getExtrema ( Vec2i min,
Vec2i max 
) const

returns the dimension of the read data

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

returns the list of filled record (for database)

bool CWDbaseContent::readColumn ( int  c)
protected

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

Referenced by readColumnList().

bool CWDbaseContent::readColumnList ( )
protected

try to read the columns list structure(CTAB)

Referenced by readContent().

bool CWDbaseContent::readContent ( )

try to read the record structure

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

bool CWDbaseContent::readRecordDB ( Vec2i const &  where,
long  pos,
CWDbaseContent::Record record 
)
protected

try to read a database record

Referenced by readRecordList().

bool CWDbaseContent::readRecordList ( Vec2i const &  where,
Column col 
)
protected

try to read a list of records(CHNK)

Referenced by readColumn().

bool CWDbaseContent::readRecordSS ( Vec2i const &  where,
long  pos,
CWDbaseContent::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 CWDbaseContent::readRecordSSV1 ( Vec2i const &  where,
long  pos,
CWDbaseContent::Record record 
)
protected

try to read a spreadsheet record(v1-v3)

Referenced by readRecordSS().

bool CWDbaseContent::send ( Vec2i const &  pos)

try to send a cell content to the listener

void CWDbaseContent::send ( double  val,
bool  isNotaNumber,
CWStyleManager::CellFormat const &  format 
)
protected

send a double with a corresponding cell format

void CWDbaseContent::setDatabaseFormats ( std::vector< CWStyleManager::CellFormat > const &  format)

set the field format ( for database )

Member Data Documentation

std::vector<CWStyleManager::CellFormat> CWDbaseContent::m_dbFormatList
protected

the databse format

Referenced by send(), and setDatabaseFormats().

std::map<int, Column> CWDbaseContent::m_idColumnMap
protected

a map col id to column

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

bool CWDbaseContent::m_isSpreadsheet
protected

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

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

MWAWParserStatePtr CWDbaseContent::m_parserState
protected
shared_ptr<CWStyleManager> CWDbaseContent::m_styleManager
protected

the style manager

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

int CWDbaseContent::m_version
protected

the file version

Referenced by CWDbaseContent(), readRecordDB(), readRecordSS(), and send().


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

Generated on Tue Mar 10 2015 17:32:09 for libmwaw by doxygen 1.8.5