GreatWksDBParser.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33 
34 #ifndef GREAT_WKS_DB_PARSER
35 # define GREAT_WKS_DB_PARSER
36 
37 #include <string>
38 #include <vector>
39 
40 #include <librevenge/librevenge.h>
41 
42 #include "MWAWCell.hxx"
43 #include "MWAWDebug.hxx"
44 
45 #include "MWAWParser.hxx"
46 
48 {
49 struct Block;
50 struct BlockHeader;
51 struct Field;
52 class Cell;
53 struct State;
54 class SubDocument;
55 }
56 
57 class GreatWksDocument;
58 
62 {
64 public:
66  GreatWksDBParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
68  ~GreatWksDBParser() final;
69 
71  bool checkHeader(MWAWHeader *header, bool strict=false) final;
72 
73  // the main parse function
74  void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final;
75 
76 protected:
78  void init();
79 
81  void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface);
82 
84  bool sendDatabase();
85 
86  // interface with the text parser
87 
89  bool sendHF(int id);
90 
91 protected:
93  bool createZones();
94 
95  //
96  // low level
97  //
98 
100  bool readDatabase();
101 
103  bool readHeader();
105  bool readFields(MWAWEntry const &zone);
107  bool readField(GreatWksDBParserInternal::Field &field);
109  bool readFieldAuxis(MWAWEntry const &zon);
111  bool readFieldLinks(GreatWksDBParserInternal::Field &field);
113  bool readFieldRecords(GreatWksDBParserInternal::Field &field);
115  bool readFormLinks(MWAWEntry const &zone);
117  bool readForm(MWAWEntry const &zone);
119  bool readRowLinks(GreatWksDBParserInternal::Block &block);
121  bool readRowRecords(MWAWEntry const &zone);
123  bool readRecordList(GreatWksDBParserInternal::Block &block);
124 
126  bool readFreeList(GreatWksDBParserInternal::Block &block);
127 
129  bool readFormula(long endPos, std::vector<MWAWCellContent::FormulaInstruction> &formula);
133  bool readFormulaResult(long endPos, GreatWksDBParserInternal::Cell &cell, std::string &extra);
134 
136  bool readIntList(MWAWEntry const &zone, std::vector<int> &list);
138  bool readSmallZone(MWAWEntry const &zone);
140  bool checkSmallZone(MWAWEntry &zone);
142  std::shared_ptr<GreatWksDBParserInternal::Block> createBlock(GreatWksDBParserInternal::BlockHeader &entry);
144  bool readBlock(GreatWksDBParserInternal::Block &block, int fieldSize);
145 
146  // unknown zones
147 
149  bool readZone12(MWAWEntry const &zone);
150 
152  bool readBlockHeader2(GreatWksDBParserInternal::Block &block);
154  bool readBlockHeader(GreatWksDBParserInternal::BlockHeader &entry);
155 
156  //
157  // data
158  //
159 
161  std::shared_ptr<GreatWksDBParserInternal::State> m_state;
162 
164  std::shared_ptr<GreatWksDocument> m_document;
165 };
166 #endif
167 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWCellContent::FormulaInstruction::F_CellList
@ F_CellList
Definition: MWAWCell.hxx:398
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWDocument::MWAW_K_DATABASE
@ MWAW_K_DATABASE
database
Definition: MWAWDocument.hxx:87
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MWAWCell::getFormat
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:237
GreatWksDBParserInternal::State::m_footerPrint
bool m_footerPrint
Definition: GreatWksDBParser.cxx:442
GreatWksDBParser::readHeader
bool readHeader()
try to read the database header: list of zones, ...
Definition: GreatWksDBParser.cxx:774
MWAWSpreadsheetParser
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
GreatWksDBParserInternal::State::m_headerPrint
bool m_headerPrint
the header is printed
Definition: GreatWksDBParser.cxx:442
GreatWksDBParser::readForm
bool readForm(MWAWEntry const &zone)
try to read a form zone
Definition: GreatWksDBParser.cxx:2047
GreatWksDBParser::readField
bool readField(GreatWksDBParserInternal::Field &field)
try to read a field
Definition: GreatWksDBParser.cxx:1648
MWAWEntry::setName
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:148
GreatWksDBParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: GreatWksDBParser.cxx:467
GreatWksDBParserInternal::State::State
State()
constructor
Definition: GreatWksDBParser.cxx:419
MWAWCellContent::m_textEntry
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:489
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
GreatWksDBParser::checkSmallZone
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
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
GreatWksDBParserInternal::Field::m_isSequence
bool m_isSequence
true if the number is a sequence
Definition: GreatWksDBParser.cxx:243
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWCellContent::setValue
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:458
GreatWksDBParser::createZones
bool createZones()
finds the different objects zones
Definition: GreatWksDBParser.cxx:612
GreatWksDBParserInternal::Field::F_Summary
@ F_Summary
Definition: GreatWksDBParser.cxx:195
GreatWksDBParserInternal::Block
a big block of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:101
MWAWCell::F_DATE
@ F_DATE
Definition: MWAWCell.hxx:56
GreatWksDBParserInternal::Database::m_heightRows
std::vector< int > m_heightRows
the row height in points
Definition: GreatWksDBParser.cxx:407
GreatWksDBParserInternal::Field::F_Date
@ F_Date
Definition: GreatWksDBParser.cxx:195
GreatWksDBParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: GreatWksDBParser.cxx:444
GreatWksDBParser::m_document
std::shared_ptr< GreatWksDocument > m_document
the document
Definition: GreatWksDBParser.hxx:164
GreatWksDBParserInternal::Block::m_header
BlockHeader m_header
the corresponding entry header
Definition: GreatWksDBParser.cxx:156
MWAWCell::setPosition
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
MWAWEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
GreatWksDBParserInternal::Field::m_extra
std::string m_extra
extra data
Definition: GreatWksDBParser.cxx:250
MWAWCellContent::FormulaInstruction::F_Operator
@ F_Operator
Definition: MWAWCell.hxx:398
GreatWksDBParser::init
void init()
inits all internal variables
Definition: GreatWksDBParser.cxx:516
GreatWksDBParserInternal::State::m_blocks
std::vector< BlockHeader > m_blocks
the list of big blocks
Definition: GreatWksDBParser.cxx:438
GreatWksDBParser::readFormulaResult
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
MWAWCellContent::isValueSet
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:464
GreatWksDBParser::sendHF
bool sendHF(int id)
try to send the i^th header/footer
Definition: GreatWksDBParser.cxx:532
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
GreatWksDBParserInternal::SubDocument::SubDocument
SubDocument(GreatWksDBParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: GreatWksDBParser.cxx:452
GreatWksDBParserInternal::Field::F_Picture
@ F_Picture
Definition: GreatWksDBParser.cxx:195
GreatWksDBParserInternal::Block::getNumZones
size_t getNumZones() const
returns the number of zone
Definition: GreatWksDBParser.cxx:141
GreatWksDBParserInternal::Field
a field of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:193
GreatWksDBParserInternal::Database::m_numRecords
int m_numRecords
the number of records
Definition: GreatWksDBParser.cxx:395
MWAWCellContent::FormulaInstruction
small class use to define a formula instruction
Definition: MWAWCell.hxx:397
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
GreatWksDBParserInternal::Database::m_widthDefault
int m_widthDefault
the default column width
Definition: GreatWksDBParser.cxx:401
MWAWFontConverter.hxx
MWAWCell::getBasicCellName
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
GreatWksDBParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: GreatWksDBParser.cxx:457
GreatWksDBParserInternal::State::m_footerBlockHeader
MWAWEntry m_footerBlockHeader
the footer entry (in v2)
Definition: GreatWksDBParser.cxx:441
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
GreatWksDBParser::readDatabase
bool readDatabase()
read the database block
Definition: GreatWksDBParser.cxx:727
GreatWksDBParserInternal
Internal: the structures of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:64
MWAWPrinter.hxx
MWAWPosition::setAnchorToCell
void setAnchorToCell(librevenge::RVNGString const &cellName)
sets the anchor to a cell position
Definition: MWAWPosition.hxx:244
GreatWksDBParser::readRowLinks
bool readRowLinks(GreatWksDBParserInternal::Block &block)
try to read row record to small zone link (the 1th big zone)
Definition: GreatWksDBParser.cxx:1074
MWAWCellContent::FormulaInstruction::F_Function
@ F_Function
Definition: MWAWCell.hxx:398
GreatWksDBParser::readFieldLinks
bool readFieldLinks(GreatWksDBParserInternal::Field &field)
try to read a zone which links a field to zone record
Definition: GreatWksDBParser.cxx:1932
MWAWCell::setFormat
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
GreatWksDBParser
the main class to read a GreatWorks database file
Definition: GreatWksDBParser.hxx:62
GreatWksDBParser::readFieldAuxis
bool readFieldAuxis(MWAWEntry const &zon)
try to read a field extra v2 zone ( small zone 13)
Definition: GreatWksDBParser.cxx:1736
MWAWHeaderFooter::m_subDocument
MWAWSubDocumentPtr m_subDocument
the document data
Definition: MWAWPageSpan.hxx:92
MWAWParser::resetSpreadsheetListener
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
GreatWksDBParser::readRecordList
bool readRecordList(GreatWksDBParserInternal::Block &block)
try to read the record list (the 3th big zone)
Definition: GreatWksDBParser.cxx:995
MWAWCell::F_NUMBER_GENERIC
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
GreatWksDBParserInternal::Block::~Block
~Block()
destructor
Definition: GreatWksDBParser.cxx:132
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
GreatWksDBParserInternal::Block::Zone::Zone
Zone()
constructor
Definition: GreatWksDBParser.cxx:105
GreatWksDBParserInternal::Database::m_name
std::string m_name
the database name
Definition: GreatWksDBParser.cxx:411
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
MWAWCellContent::FormulaInstruction::m_content
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: MWAWCell.hxx:417
GreatWksDBParser::sendDatabase
bool sendDatabase()
try to send the main database
Definition: GreatWksDBParser.cxx:2181
GreatWksDBParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: GreatWksDBParser.cxx:470
GreatWksDBParserInternal::Field::m_linkZone
long m_linkZone
the file position which stores the position link to record zone
Definition: GreatWksDBParser.cxx:226
GreatWksDBParserInternal::Field::m_summaryField
int m_summaryField
the summary field
Definition: GreatWksDBParser.cxx:238
GreatWksDBParserInternal::Block::isEmpty
bool isEmpty() const
returns true if the zone list is empty
Definition: GreatWksDBParser.cxx:136
GreatWksDBParser::parse
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: GreatWksDBParser.cxx:540
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:45
GreatWksDBParser::readFormLinks
bool readFormLinks(MWAWEntry const &zone)
try to read the list of form
Definition: GreatWksDBParser.cxx:1993
GreatWksDBParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: GreatWksDBParser.cxx:2247
MWAWCell.hxx
Defines MWAWCell (cell content and format)
GreatWksDBParserInternal::Block::operator=
Block & operator=(Block const &orig)=delete
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
GreatWksDBParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: GreatWksDBParser.cxx:439
GreatWksDBParserInternal::Field::m_format
MWAWCell::Format m_format
the field format
Definition: GreatWksDBParser.cxx:224
MWAWSubDocument.hxx
GreatWksDBParserInternal::Block::m_zoneList
std::vector< Zone > m_zoneList
the zone list
Definition: GreatWksDBParser.cxx:158
MWAWParser::getSpreadsheetListener
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
GreatWksDBParser::readFieldRecords
bool readFieldRecords(GreatWksDBParserInternal::Field &field)
try to read a list of records corresponding to field
Definition: GreatWksDBParser.cxx:1811
GreatWksDBParserInternal::Cell::~Cell
~Cell() final
destructor
Definition: GreatWksDBParser.cxx:188
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWCellContent::m_formula
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:491
MWAWSpreadsheetListenerPtr
std::shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:563
MWAWSpreadsheetListener
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: MWAWSpreadsheetListener.hxx:66
GreatWksDBParserInternal::Field::m_id
int m_id
the field id
Definition: GreatWksDBParser.cxx:220
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
MWAWRSRCParser.hxx
GreatWksDBParserInternal::Database::m_heightDefault
int m_heightDefault
the default row height
Definition: GreatWksDBParser.cxx:405
libmwaw::Debug::dumpFile
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
GreatWksDBParser::readFormula
bool readFormula(long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula)
try to read a formula result in field definition
Definition: GreatWksDBParser.cxx:1421
MWAWPosition.hxx
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
MWAWCellContent::FormulaInstruction::m_type
Type m_type
the type
Definition: MWAWCell.hxx:415
GreatWksDBParser::createBlock
std::shared_ptr< GreatWksDBParserInternal::Block > createBlock(GreatWksDBParserInternal::BlockHeader &entry)
try to create a block corresponding to an entry
Definition: GreatWksDBParser.cxx:911
GreatWksDBParserInternal::Database::m_fieldList
std::vector< Field > m_fieldList
the list of field
Definition: GreatWksDBParser.cxx:399
GreatWksDBParserInternal::Cell::operator=
Cell & operator=(Cell const &)=default
GreatWksGraph.hxx
GreatWksDBParserInternal::Database::Database
Database()
constructor
Definition: GreatWksDBParser.cxx:348
GreatWksDBParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: GreatWksDBParser.cxx:443
MWAWCell::Format
a structure uses to define the format of a cell content
Definition: MWAWCell.hxx:60
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWEntry::name
std::string const & name() const
name of the entry
Definition: MWAWEntry.hxx:153
GreatWksDBParser::readFreeList
bool readFreeList(GreatWksDBParserInternal::Block &block)
try to read the free zone list: 0th big zone
Definition: GreatWksDBParser.cxx:1024
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
GreatWksDBParserInternal::Field::F_Text
@ F_Text
Definition: GreatWksDBParser.cxx:195
GreatWksDBParserInternal::State::m_headerBlockHeader
MWAWEntry m_headerBlockHeader
the header entry (in v2)
Definition: GreatWksDBParser.cxx:441
GreatWksDBParserInternal::BlockHeader::operator<<
friend std::ostream & operator<<(std::ostream &o, BlockHeader const &entry)
operator<<
Definition: GreatWksDBParser.cxx:85
GreatWksDBParserInternal::Cell::isEmpty
bool isEmpty() const
returns true if the cell do contain any content
Definition: GreatWksDBParser.cxx:177
GreatWksDBParserInternal::BlockHeader::m_name
std::string m_name
the block name
Definition: GreatWksDBParser.cxx:97
GreatWksDBParserInternal::Cell
a cell of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:166
MWAWCellContent::m_value
double m_value
the cell value
Definition: MWAWCell.hxx:485
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
libmwaw::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:188
GreatWksDBParser::GreatWksDBParser
GreatWksDBParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: GreatWksDBParser.cxx:504
GreatWksDBParserInternal::Cell::Cell
Cell()
constructor
Definition: GreatWksDBParser.cxx:169
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
GreatWksDBParserInternal::Database::convertInPoint
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
GreatWksDBParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: GreatWksDBParser.cxx:439
MWAWVec2< int >
GreatWksDBParserInternal::SubDocument
Internal: the subdocument of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:450
GreatWksDBParserInternal::Database
the database of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:345
MWAWCellContent
small class use to define a sheet cell content
Definition: MWAWCell.hxx:394
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
GreatWksDBParserInternal::BlockHeader::m_ptr
long m_ptr[3]
the list of pointer: first, next, end?
Definition: GreatWksDBParser.cxx:95
GreatWksDBParser::readBlock
bool readBlock(GreatWksDBParserInternal::Block &block, int fieldSize)
try to read a unknown block, knowing the field size
Definition: GreatWksDBParser.cxx:1150
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
GreatWksDBParser::~GreatWksDBParser
~GreatWksDBParser() final
destructor
Definition: GreatWksDBParser.cxx:512
GreatWksDBParser::readZone12
bool readZone12(MWAWEntry const &zone)
try to read the small zone 12(unknown format, maybe some preferences)
Definition: GreatWksDBParser.cxx:2107
GreatWksDBParserInternal::Cell::m_content
MWAWCellContent m_content
the cell content
Definition: GreatWksDBParser.cxx:183
GreatWksDBParserInternal::Block::Block
Block(BlockHeader const &header, Zone &zone)
constructor given a zone
Definition: GreatWksDBParser.cxx:125
GreatWksDBParser::readBlockHeader
bool readBlockHeader(GreatWksDBParserInternal::BlockHeader &entry)
try to read a big block entry
Definition: GreatWksDBParser.cxx:903
GreatWksDocument.hxx
GreatWksDBParserInternal::Field::operator<<
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: GreatWksDBParser.cxx:300
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
GreatWksDBParserInternal::Field::m_incrementNumber
int m_incrementNumber
the increment number (in case of progression sequence)
Definition: GreatWksDBParser.cxx:247
GreatWksDBParserInternal::Block::Zone::m_N
int m_N
the number of sub data
Definition: GreatWksDBParser.cxx:114
MWAWHeaderFooter::FOOTER
@ FOOTER
Definition: MWAWPageSpan.hxx:48
GreatWksDBParserInternal::Field::F_Formula
@ F_Formula
Definition: GreatWksDBParser.cxx:195
GreatWksDBParser::readRowRecords
bool readRowRecords(MWAWEntry const &zone)
try to read a list of records corresponding to a row
Definition: GreatWksDBParser.cxx:1214
MWAWCellContent::C_FORMULA
@ C_FORMULA
Definition: MWAWCell.hxx:433
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWParser::setSpreadsheetListener
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:147
GreatWksDBParserInternal::Field::F_Time
@ F_Time
Definition: GreatWksDBParser.cxx:195
MWAWCellContent::FormulaInstruction::F_Cell
@ F_Cell
Definition: MWAWCell.hxx:398
GreatWksDBParserInternal::BlockHeader
a big zone header of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:66
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
GreatWksDBParserInternal::Block::Zone::m_ptr
long m_ptr
the begin zone pointer
Definition: GreatWksDBParser.cxx:112
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
GreatWksDBParserInternal::State::m_idZonesMap
std::map< int, MWAWEntry > m_idZonesMap
a map id to zone used to stored the small zones
Definition: GreatWksDBParser.cxx:436
MWAWCell::F_NUMBER
@ F_NUMBER
Definition: MWAWCell.hxx:56
GreatWksDBParser.hxx
MWAWCell::F_TIME
@ F_TIME
Definition: MWAWCell.hxx:56
GreatWksDBParserInternal::Block::Zone
a small block of a GreatWksDBParserInternal::Block
Definition: GreatWksDBParser.cxx:103
GreatWksDocument
the main class to read/store generic data of a GreatWorks document
Definition: GreatWksDocument.hxx:61
MWAWGraphicStyle.hxx
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
GreatWksDBParser::readBlockHeader2
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
GreatWksDBParserInternal::Database::addCell
bool addCell(MWAWVec2i const &pos, Cell const &cell)
add a cell data in one given position
Definition: GreatWksDBParser.cxx:361
GreatWksDBParser::readSmallZone
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
GreatWksDBParserInternal::Cell::Cell
Cell(Cell const &)=default
MWAWCellContent::C_TEXT
@ C_TEXT
Definition: MWAWCell.hxx:433
MWAWCell::Format::m_format
FormatType m_format
the cell format : by default unknown
Definition: MWAWCell.hxx:95
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWSection.hxx
GreatWksText.hxx
GreatWksDBParser::readFields
bool readFields(MWAWEntry const &zone)
try to read the fields' zone
Definition: GreatWksDBParser.cxx:1556
MWAWCellContent::FormulaInstruction::m_position
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:423
MWAWCell::hasBorders
bool hasBorders() const
return true if the cell has some border
Definition: MWAWCell.hxx:308
GreatWksDBParser::readIntList
bool readIntList(MWAWEntry const &zone, std::vector< int > &list)
try to read a int's zone
Definition: GreatWksDBParser.cxx:1964
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
GreatWksDBParser::createDocument
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: GreatWksDBParser.cxx:569
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
MWAWSpreadsheetListener.hxx
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
GreatWksDBParserInternal::Field::Type
Type
the file type
Definition: GreatWksDBParser.cxx:195
GreatWksDBParserInternal::Field::updateCell
bool updateCell(int row, int numRow, Cell &cell) const
update the cell to correspond to the final data
Definition: GreatWksDBParser.cxx:253
GreatWksDBParserInternal::Block::getZone
Zone const & getZone(size_t i) const
returns the ith zone
Definition: GreatWksDBParser.cxx:146
GreatWksDBParserInternal::BlockHeader::isEmpty
bool isEmpty() const
returns true if the block is empty
Definition: GreatWksDBParser.cxx:74
GreatWksDBParserInternal::BlockHeader::BlockHeader
BlockHeader()
constructor
Definition: GreatWksDBParser.cxx:68
MWAWCellContent::FormulaInstruction::m_positionRelative
MWAWVec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:425
GreatWksDBParserInternal::Database::m_widthCols
std::vector< int > m_widthCols
the column size in points
Definition: GreatWksDBParser.cxx:403
GreatWksDBParserInternal::Database::getRowHeight
int getRowHeight(int row) const
returns the row size in point
Definition: GreatWksDBParser.cxx:376
MWAWCellContent::empty
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:450
GreatWksDBParserInternal::BlockHeader::isComplex
bool isComplex() const
returns true if the entry has many block
Definition: GreatWksDBParser.cxx:80
GreatWksDBParserInternal::Database::m_rowList
std::vector< MWAWEntry > m_rowList
the list of rows data
Definition: GreatWksDBParser.cxx:397
GreatWksDBParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: GreatWksDBParser.cxx:491
GreatWksDBParserInternal::Field::F_Unknown
@ F_Unknown
Definition: GreatWksDBParser.cxx:195
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
MWAWFont.hxx
librevenge
Definition: MWAWDocument.hxx:57
GreatWksDBParserInternal::Field::F_Number
@ F_Number
Definition: GreatWksDBParser.cxx:195
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
GreatWksDBParserInternal::Field::Field
Field()
constructor
Definition: GreatWksDBParser.cxx:197
MWAWCell
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
GreatWksDBParserInternal::Field::m_firstNumber
int m_firstNumber
the first number (in case of progression sequence)
Definition: GreatWksDBParser.cxx:245
MWAWCellContent::m_contentType
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:483
GreatWksDBParserInternal::Cell::m_pictEntry
MWAWEntry m_pictEntry
picture
Definition: GreatWksDBParser.cxx:185
MWAWCellContent::C_NUMBER
@ C_NUMBER
Definition: MWAWCell.hxx:433
GreatWksDBParserInternal::Field::m_name
std::string m_name
the field name
Definition: GreatWksDBParser.cxx:222
MWAWCell::position
MWAWVec2i const & position() const
position accessor
Definition: MWAWCell.hxx:184
GreatWksDBParserInternal::operator<<
std::ostream & operator<<(std::ostream &o, Field const &field)
Definition: GreatWksDBParser.cxx:300
MWAWVec2b
MWAWVec2< bool > MWAWVec2b
MWAWVec2 of bool.
Definition: libmwaw_internal.hxx:836
GreatWksDBParserInternal::Field::F_Memo
@ F_Memo
Definition: GreatWksDBParser.cxx:195
GreatWksDBParserInternal::Field::m_formula
std::vector< MWAWCellContent::FormulaInstruction > m_formula
the formula
Definition: GreatWksDBParser.cxx:233
GreatWksDBParserInternal::Block::Block
Block(Block const &orig)=delete
GreatWksDBParserInternal::Block::Block
Block(BlockHeader const &header)
constructor
Definition: GreatWksDBParser.cxx:119
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
GreatWksDBParserInternal::Database::m_rowCellsMap
std::map< int, std::vector< Cell > > m_rowCellsMap
the map row -> list of cells
Definition: GreatWksDBParser.cxx:409
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
GreatWksDBParserInternal::Field::m_type
Type m_type
the field type
Definition: GreatWksDBParser.cxx:218
GreatWksDBParser::m_state
std::shared_ptr< GreatWksDBParserInternal::State > m_state
the state
Definition: GreatWksDBParser.hxx:161
GreatWksDBParserInternal::State
Internal: the state of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:417
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
GreatWksDBParserInternal::Field::m_recordBlock
BlockHeader m_recordBlock
the block file position which stores the position of the field's record
Definition: GreatWksDBParser.cxx:228
GreatWksDBParserInternal::Block::Zone::m_dataSize
long m_dataSize
the data size
Definition: GreatWksDBParser.cxx:116
GreatWksDBParserInternal::State::m_database
Database m_database
the database
Definition: GreatWksDBParser.cxx:434
MWAWCell::F_TEXT
@ F_TEXT
Definition: MWAWCell.hxx:56
GreatWksDBParserInternal::Field::m_summaryType
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