Go to the documentation of this file.
34 #ifndef GREAT_WKS_DB_PARSER
35 # define GREAT_WKS_DB_PARSER
40 #include <librevenge/librevenge.h>
74 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
@ F_CellList
Definition: MWAWCell.hxx:398
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ MWAW_K_DATABASE
database
Definition: MWAWDocument.hxx:87
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:237
bool m_footerPrint
Definition: GreatWksDBParser.cxx:442
bool readHeader()
try to read the database header: list of zones, ...
Definition: GreatWksDBParser.cxx:774
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
bool m_headerPrint
the header is printed
Definition: GreatWksDBParser.cxx:442
bool readForm(MWAWEntry const &zone)
try to read a form zone
Definition: GreatWksDBParser.cxx:2047
bool readField(GreatWksDBParserInternal::Field &field)
try to read a field
Definition: GreatWksDBParser.cxx:1648
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:148
int m_id
the subdocument id
Definition: GreatWksDBParser.cxx:467
State()
constructor
Definition: GreatWksDBParser.cxx:419
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:489
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
bool checkSmallZone(MWAWEntry &zone)
check if a pointer correspond or not to a small zone entry, if so update the entry
Definition: GreatWksDBParser.cxx:1184
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
bool m_isSequence
true if the number is a sequence
Definition: GreatWksDBParser.cxx:243
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:458
bool createZones()
finds the different objects zones
Definition: GreatWksDBParser.cxx:612
@ F_Summary
Definition: GreatWksDBParser.cxx:195
a big block of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:101
@ F_DATE
Definition: MWAWCell.hxx:56
std::vector< int > m_heightRows
the row height in points
Definition: GreatWksDBParser.cxx:407
@ F_Date
Definition: GreatWksDBParser.cxx:195
int m_footerHeight
the footer height if known
Definition: GreatWksDBParser.cxx:444
std::shared_ptr< GreatWksDocument > m_document
the document
Definition: GreatWksDBParser.hxx:164
BlockHeader m_header
the corresponding entry header
Definition: GreatWksDBParser.cxx:156
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
std::string m_extra
extra data
Definition: GreatWksDBParser.cxx:250
@ F_Operator
Definition: MWAWCell.hxx:398
void init()
inits all internal variables
Definition: GreatWksDBParser.cxx:516
std::vector< BlockHeader > m_blocks
the list of big blocks
Definition: GreatWksDBParser.cxx:438
bool readFormulaResult(long endPos, GreatWksDBParserInternal::Cell &cell, std::string &extra)
try to read a formula result in a row content zone
Definition: GreatWksDBParser.cxx:1481
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:464
bool sendHF(int id)
try to send the i^th header/footer
Definition: GreatWksDBParser.cxx:532
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
SubDocument(GreatWksDBParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: GreatWksDBParser.cxx:452
@ F_Picture
Definition: GreatWksDBParser.cxx:195
size_t getNumZones() const
returns the number of zone
Definition: GreatWksDBParser.cxx:141
a field of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:193
int m_numRecords
the number of records
Definition: GreatWksDBParser.cxx:395
small class use to define a formula instruction
Definition: MWAWCell.hxx:397
int id() const
returns the id
Definition: MWAWEntry.hxx:164
int m_widthDefault
the default column width
Definition: GreatWksDBParser.cxx:401
static std::string getBasicCellName(MWAWVec2i const &pos)
return the name of a cell (given row and column) : 0,0 -> A1, 0,1 -> A2...
Definition: MWAWCell.cxx:345
~SubDocument() final
destructor
Definition: GreatWksDBParser.cxx:457
MWAWEntry m_footerBlockHeader
the footer entry (in v2)
Definition: GreatWksDBParser.cxx:441
int version() const
returns the works version
Definition: MWAWParser.hxx:108
bool readDatabase()
read the database block
Definition: GreatWksDBParser.cxx:727
Internal: the structures of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:64
void setAnchorToCell(librevenge::RVNGString const &cellName)
sets the anchor to a cell position
Definition: MWAWPosition.hxx:244
bool readRowLinks(GreatWksDBParserInternal::Block &block)
try to read row record to small zone link (the 1th big zone)
Definition: GreatWksDBParser.cxx:1074
@ F_Function
Definition: MWAWCell.hxx:398
bool readFieldLinks(GreatWksDBParserInternal::Field &field)
try to read a zone which links a field to zone record
Definition: GreatWksDBParser.cxx:1932
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
the main class to read a GreatWorks database file
Definition: GreatWksDBParser.hxx:62
bool readFieldAuxis(MWAWEntry const &zon)
try to read a field extra v2 zone ( small zone 13)
Definition: GreatWksDBParser.cxx:1736
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
bool readRecordList(GreatWksDBParserInternal::Block &block)
try to read the record list (the 3th big zone)
Definition: GreatWksDBParser.cxx:995
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
~Block()
destructor
Definition: GreatWksDBParser.cxx:132
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
Zone()
constructor
Definition: GreatWksDBParser.cxx:105
std::string m_name
the database name
Definition: GreatWksDBParser.cxx:411
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: MWAWCell.hxx:417
bool sendDatabase()
try to send the main database
Definition: GreatWksDBParser.cxx:2181
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: GreatWksDBParser.cxx:470
long m_linkZone
the file position which stores the position link to record zone
Definition: GreatWksDBParser.cxx:226
int m_summaryField
the summary field
Definition: GreatWksDBParser.cxx:238
bool isEmpty() const
returns true if the zone list is empty
Definition: GreatWksDBParser.cxx:136
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: GreatWksDBParser.cxx:540
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
bool readFormLinks(MWAWEntry const &zone)
try to read the list of form
Definition: GreatWksDBParser.cxx:1993
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: GreatWksDBParser.cxx:2247
Defines MWAWCell (cell content and format)
Block & operator=(Block const &orig)=delete
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
int m_actPage
the actual page
Definition: GreatWksDBParser.cxx:439
MWAWCell::Format m_format
the field format
Definition: GreatWksDBParser.cxx:224
std::vector< Zone > m_zoneList
the zone list
Definition: GreatWksDBParser.cxx:158
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
bool readFieldRecords(GreatWksDBParserInternal::Field &field)
try to read a list of records corresponding to field
Definition: GreatWksDBParser.cxx:1811
~Cell() final
destructor
Definition: GreatWksDBParser.cxx:188
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:491
std::shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:563
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: MWAWSpreadsheetListener.hxx:66
int m_id
the field id
Definition: GreatWksDBParser.cxx:220
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
int m_heightDefault
the default row height
Definition: GreatWksDBParser.cxx:405
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
bool readFormula(long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula)
try to read a formula result in field definition
Definition: GreatWksDBParser.cxx:1421
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
Type m_type
the type
Definition: MWAWCell.hxx:415
std::shared_ptr< GreatWksDBParserInternal::Block > createBlock(GreatWksDBParserInternal::BlockHeader &entry)
try to create a block corresponding to an entry
Definition: GreatWksDBParser.cxx:911
std::vector< Field > m_fieldList
the list of field
Definition: GreatWksDBParser.cxx:399
Cell & operator=(Cell const &)=default
Database()
constructor
Definition: GreatWksDBParser.cxx:348
int m_headerHeight
the header height if known
Definition: GreatWksDBParser.cxx:443
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
std::string const & name() const
name of the entry
Definition: MWAWEntry.hxx:153
bool readFreeList(GreatWksDBParserInternal::Block &block)
try to read the free zone list: 0th big zone
Definition: GreatWksDBParser.cxx:1024
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
@ F_Text
Definition: GreatWksDBParser.cxx:195
MWAWEntry m_headerBlockHeader
the header entry (in v2)
Definition: GreatWksDBParser.cxx:441
bool isEmpty() const
returns true if the cell do contain any content
Definition: GreatWksDBParser.cxx:177
a cell of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:166
double m_value
the cell value
Definition: MWAWCell.hxx:485
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:188
GreatWksDBParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: GreatWksDBParser.cxx:504
Cell()
constructor
Definition: GreatWksDBParser.cxx:169
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
std::vector< float > convertInPoint(std::vector< int > const &list) const
convert the m_widthCols in a vector of of point size
Definition: GreatWksDBParser.cxx:383
int m_numPages
the number of page of the final document
Definition: GreatWksDBParser.cxx:439
Internal: the subdocument of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:450
the database of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:345
small class use to define a sheet cell content
Definition: MWAWCell.hxx:394
Definition: libmwaw_internal.hxx:144
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
bool readBlock(GreatWksDBParserInternal::Block &block, int fieldSize)
try to read a unknown block, knowing the field size
Definition: GreatWksDBParser.cxx:1150
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
~GreatWksDBParser() final
destructor
Definition: GreatWksDBParser.cxx:512
bool readZone12(MWAWEntry const &zone)
try to read the small zone 12(unknown format, maybe some preferences)
Definition: GreatWksDBParser.cxx:2107
MWAWCellContent m_content
the cell content
Definition: GreatWksDBParser.cxx:183
Block(BlockHeader const &header, Zone &zone)
constructor given a zone
Definition: GreatWksDBParser.cxx:125
bool readBlockHeader(GreatWksDBParserInternal::BlockHeader &entry)
try to read a big block entry
Definition: GreatWksDBParser.cxx:903
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: GreatWksDBParser.cxx:300
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
int m_incrementNumber
the increment number (in case of progression sequence)
Definition: GreatWksDBParser.cxx:247
int m_N
the number of sub data
Definition: GreatWksDBParser.cxx:114
@ F_Formula
Definition: GreatWksDBParser.cxx:195
bool readRowRecords(MWAWEntry const &zone)
try to read a list of records corresponding to a row
Definition: GreatWksDBParser.cxx:1214
@ C_FORMULA
Definition: MWAWCell.hxx:433
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:147
@ F_Time
Definition: GreatWksDBParser.cxx:195
@ F_Cell
Definition: MWAWCell.hxx:398
long m_ptr
the begin zone pointer
Definition: GreatWksDBParser.cxx:112
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
std::map< int, MWAWEntry > m_idZonesMap
a map id to zone used to stored the small zones
Definition: GreatWksDBParser.cxx:436
@ F_NUMBER
Definition: MWAWCell.hxx:56
@ F_TIME
Definition: MWAWCell.hxx:56
a small block of a GreatWksDBParserInternal::Block
Definition: GreatWksDBParser.cxx:103
the main class to read/store generic data of a GreatWorks document
Definition: GreatWksDocument.hxx:61
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool readBlockHeader2(GreatWksDBParserInternal::Block &block)
try to read the 2th big zone (maybe a list of pointers, but I only see a list of 0:recordId )
Definition: GreatWksDBParser.cxx:1118
bool addCell(MWAWVec2i const &pos, Cell const &cell)
add a cell data in one given position
Definition: GreatWksDBParser.cxx:361
bool readSmallZone(MWAWEntry const &zone)
try to read an unknown small zone, ie. a default reader: type, 0, size, N, dSz
Definition: GreatWksDBParser.cxx:2142
Cell(Cell const &)=default
@ C_TEXT
Definition: MWAWCell.hxx:433
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
bool readFields(MWAWEntry const &zone)
try to read the fields' zone
Definition: GreatWksDBParser.cxx:1556
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:423
bool hasBorders() const
return true if the cell has some border
Definition: MWAWCell.hxx:308
bool readIntList(MWAWEntry const &zone, std::vector< int > &list)
try to read a int's zone
Definition: GreatWksDBParser.cxx:1964
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: GreatWksDBParser.cxx:569
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
Type
the file type
Definition: GreatWksDBParser.cxx:195
bool updateCell(int row, int numRow, Cell &cell) const
update the cell to correspond to the final data
Definition: GreatWksDBParser.cxx:253
Zone const & getZone(size_t i) const
returns the ith zone
Definition: GreatWksDBParser.cxx:146
MWAWVec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:425
std::vector< int > m_widthCols
the column size in points
Definition: GreatWksDBParser.cxx:403
int getRowHeight(int row) const
returns the row size in point
Definition: GreatWksDBParser.cxx:376
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:450
std::vector< MWAWEntry > m_rowList
the list of rows data
Definition: GreatWksDBParser.cxx:397
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: GreatWksDBParser.cxx:491
@ F_Unknown
Definition: GreatWksDBParser.cxx:195
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Definition: MWAWDocument.hxx:57
@ F_Number
Definition: GreatWksDBParser.cxx:195
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
Field()
constructor
Definition: GreatWksDBParser.cxx:197
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
int m_firstNumber
the first number (in case of progression sequence)
Definition: GreatWksDBParser.cxx:245
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:483
MWAWEntry m_pictEntry
picture
Definition: GreatWksDBParser.cxx:185
@ C_NUMBER
Definition: MWAWCell.hxx:433
std::string m_name
the field name
Definition: GreatWksDBParser.cxx:222
MWAWVec2i const & position() const
position accessor
Definition: MWAWCell.hxx:184
std::ostream & operator<<(std::ostream &o, Field const &field)
Definition: GreatWksDBParser.cxx:300
MWAWVec2< bool > MWAWVec2b
MWAWVec2 of bool.
Definition: libmwaw_internal.hxx:836
@ F_Memo
Definition: GreatWksDBParser.cxx:195
std::vector< MWAWCellContent::FormulaInstruction > m_formula
the formula
Definition: GreatWksDBParser.cxx:233
Block(Block const &orig)=delete
Block(BlockHeader const &header)
constructor
Definition: GreatWksDBParser.cxx:119
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::map< int, std::vector< Cell > > m_rowCellsMap
the map row -> list of cells
Definition: GreatWksDBParser.cxx:409
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
Type m_type
the field type
Definition: GreatWksDBParser.cxx:218
std::shared_ptr< GreatWksDBParserInternal::State > m_state
the state
Definition: GreatWksDBParser.hxx:161
Internal: the state of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:417
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
BlockHeader m_recordBlock
the block file position which stores the position of the field's record
Definition: GreatWksDBParser.cxx:228
long m_dataSize
the data size
Definition: GreatWksDBParser.cxx:116
Database m_database
the database
Definition: GreatWksDBParser.cxx:434
@ F_TEXT
Definition: MWAWCell.hxx:56
int m_summaryType
the summary type: 1:average, 2:count, 3:total, 4:minimum, 5:maximum
Definition: GreatWksDBParser.cxx:236
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20