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 | |
| ~CWDbaseContent () | |
| destructor | |
| bool | readContent () |
| try to read the record structure | |
| bool | getExtrema (Vec2i &min, Vec2i &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 | send (Vec2i const &pos) |
| try to send a cell content to the listener | |
| void | setDatabaseFormats (std::vector< CWStyleManager::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 (Vec2i const &where, Column &col) |
| try to read a list of records(CHNK) | |
| bool | readRecordSS (Vec2i const &where, long pos, Record &record) |
| try to read a spreadsheet record | |
| bool | readRecordSSV1 (Vec2i const &where, long pos, Record &record) |
| try to read a spreadsheet record(v1-v3) | |
| bool | readRecordDB (Vec2i const &where, long pos, Record &record) |
| try to read a database record | |
| void | send (double val, CWStyleManager::CellFormat const &format) |
| send a double with a corresponding cell format | |
Protected Attributes | |
| int | m_version |
| the file version | |
| bool | m_isSpreadsheet |
| a bool to know if this is a spreadsheet or a database | |
| MWAWParserStatePtr | m_parserState |
| the parser state | |
| shared_ptr< CWStyleManager > | m_styleManager |
| the style manager | |
| std::map< int, Column > | m_idColumnMap |
| a map col id to column | |
| std::vector < CWStyleManager::CellFormat > | m_dbFormatList |
| the databse format | |
small structure used to parse main content of a spreadsheet/database zone
| CWDbaseContent::CWDbaseContent | ( | MWAWParserStatePtr | parserState, |
| shared_ptr< CWStyleManager > | styleManager, | ||
| bool | spreadsheet | ||
| ) |
constructor
destructor
| 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, |
| 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 )
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] |
the parser state
Referenced by CWDbaseContent(), readColumn(), readColumnList(), readContent(), readRecordDB(), readRecordList(), readRecordSS(), readRecordSSV1(), and send().
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().