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:
68  virtual ~GreatWksDBParser();
69 
71  bool checkHeader(MWAWHeader *header, bool strict=false);
72 
73  // the main parse function
74  void parse(librevenge::RVNGSpreadsheetInterface *documentInterface);
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);
109  bool readFieldAuxis(MWAWEntry const &zon);
115  bool readFormLinks(MWAWEntry const &zone);
117  bool readForm(MWAWEntry const &zone);
121  bool readRowRecords(MWAWEntry const &zone);
124 
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  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 
155 
156  //
157  // data
158  //
159 
161  shared_ptr<GreatWksDBParserInternal::State> m_state;
162 
164  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:360
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
MWAWCell::getFormat
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:211
GreatWksDBParserInternal::State::m_footerPrint
bool m_footerPrint
Definition: GreatWksDBParser.cxx:402
GreatWksDBParser::readHeader
bool readHeader()
try to read the database header: list of zones, ...
Definition: GreatWksDBParser.cxx:737
MWAWSpreadsheetParser
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:281
GreatWksDBParserInternal::State::m_headerPrint
bool m_headerPrint
the header is printed
Definition: GreatWksDBParser.cxx:402
GreatWksDBParser::readForm
bool readForm(MWAWEntry const &zone)
try to read a form zone
Definition: GreatWksDBParser.cxx:2016
GreatWksDBParser::readField
bool readField(GreatWksDBParserInternal::Field &field)
try to read a field
Definition: GreatWksDBParser.cxx:1617
MWAWEntry::setName
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:137
GreatWksDBParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: GreatWksDBParser.cxx:431
GreatWksDBParserInternal::State::State
State()
constructor
Definition: GreatWksDBParser.cxx:389
MWAWCellContent::m_textEntry
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:438
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
MWAWSpreadsheetListenerPtr
shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:515
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:1151
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
GreatWksDBParserInternal::Field::m_isSequence
bool m_isSequence
true if the number is a sequence
Definition: GreatWksDBParser.cxx:220
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
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:407
GreatWksDBParserInternal::SubDocument::operator!=
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: GreatWksDBParser.cxx:455
GreatWksDBParser::createZones
bool createZones()
finds the different objects zones
Definition: GreatWksDBParser.cxx:574
GreatWksDBParserInternal::Field::F_Summary
@ F_Summary
Definition: GreatWksDBParser.cxx:183
GreatWksDBParserInternal::Block
a big block of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:100
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:377
GreatWksDBParserInternal::Field::F_Date
@ F_Date
Definition: GreatWksDBParser.cxx:183
GreatWksDBParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: GreatWksDBParser.cxx:404
GreatWksDBParserInternal::Block::m_header
BlockHeader m_header
the corresponding entry header
Definition: GreatWksDBParser.cxx:148
MWAWCell::setPosition
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
MWAWEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:110
GreatWksDBParserInternal::Field::m_extra
std::string m_extra
extra data
Definition: GreatWksDBParser.cxx:227
MWAWCellContent::FormulaInstruction::F_Operator
@ F_Operator
Definition: MWAWCell.hxx:360
GreatWksDBParser::init
void init()
inits all internal variables
Definition: GreatWksDBParser.cxx:478
GreatWksDBParserInternal::State::m_blocks
std::vector< BlockHeader > m_blocks
the list of big blocks
Definition: GreatWksDBParser.cxx:398
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:1449
MWAWCellContent::isValueSet
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:413
GreatWksDBParser::sendHF
bool sendHF(int id)
try to send the i^th header/footer
Definition: GreatWksDBParser.cxx:494
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
GreatWksDBParserInternal::Field::F_Picture
@ F_Picture
Definition: GreatWksDBParser.cxx:183
GreatWksDBParserInternal::Block::getNumZones
size_t getNumZones() const
returns the number of zone
Definition: GreatWksDBParser.cxx:133
GreatWksDBParserInternal::Field
a field of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:181
GreatWksDBParserInternal::Database::m_numRecords
int m_numRecords
the number of records
Definition: GreatWksDBParser.cxx:365
MWAWCellContent::FormulaInstruction
small class use to define a formula instruction
Definition: MWAWCell.hxx:359
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:153
GreatWksDBParserInternal::Database::m_widthDefault
int m_widthDefault
the default column width
Definition: GreatWksDBParser.cxx:371
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:342
GreatWksDBParserInternal::State::m_footerBlockHeader
MWAWEntry m_footerBlockHeader
the footer entry (in v2)
Definition: GreatWksDBParser.cxx:401
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
GreatWksDBParser::readDatabase
bool readDatabase()
read the database block
Definition: GreatWksDBParser.cxx:690
GreatWksDBParserInternal
Internal: the structures of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:64
MWAWPrinter.hxx
GreatWksDBParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: GreatWksDBParser.cxx:2216
MWAWPosition::setAnchorToCell
void setAnchorToCell(librevenge::RVNGString const &cellName)
sets the anchor to a cell position
Definition: MWAWPosition.hxx:228
GreatWksDBParser::readRowLinks
bool readRowLinks(GreatWksDBParserInternal::Block &block)
try to read row record to small zone link (the 1th big zone)
Definition: GreatWksDBParser.cxx:1041
MWAWCellContent::FormulaInstruction::F_Function
@ F_Function
Definition: MWAWCell.hxx:360
GreatWksDBParser::readFieldLinks
bool readFieldLinks(GreatWksDBParserInternal::Field &field)
try to read a zone which links a field to zone record
Definition: GreatWksDBParser.cxx:1901
MWAWCell::setFormat
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:216
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:1705
MWAWHeaderFooter::m_subDocument
MWAWSubDocumentPtr m_subDocument
the document data
Definition: MWAWPageSpan.hxx:89
MWAWParser::resetSpreadsheetListener
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:140
GreatWksDBParser::readRecordList
bool readRecordList(GreatWksDBParserInternal::Block &block)
try to read the record list (the 3th big zone)
Definition: GreatWksDBParser.cxx:959
MWAWCell::F_NUMBER_GENERIC
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
GreatWksDBParserInternal::Block::~Block
~Block()
destructor
Definition: GreatWksDBParser.cxx:124
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
GreatWksDBParserInternal::Block::Zone::Zone
Zone()
constructor
Definition: GreatWksDBParser.cxx:104
GreatWksDBParserInternal::Database::m_name
std::string m_name
the database name
Definition: GreatWksDBParser.cxx:381
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:376
GreatWksDBParser::sendDatabase
bool sendDatabase()
try to send the main database
Definition: GreatWksDBParser.cxx:2150
GreatWksDBParserInternal::Field::m_linkZone
long m_linkZone
the file position which stores the position link to record zone
Definition: GreatWksDBParser.cxx:203
GreatWksDBParserInternal::Field::m_summaryField
int m_summaryField
the summary field
Definition: GreatWksDBParser.cxx:215
GreatWksDBParserInternal::Block::isEmpty
bool isEmpty() const
returns true if the zone list is empty
Definition: GreatWksDBParser.cxx:128
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:1962
MWAWCell.hxx
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:399
GreatWksDBParserInternal::Field::m_format
MWAWCell::Format m_format
the field format
Definition: GreatWksDBParser.cxx:201
MWAWSubDocument.hxx
GreatWksDBParserInternal::Block::m_zoneList
std::vector< Zone > m_zoneList
the zone list
Definition: GreatWksDBParser.cxx:150
MWAWParser::getSpreadsheetListener
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
MWAWCell::Format::m_numberFormat
NumberType m_numberFormat
the numeric format
Definition: MWAWCell.hxx:85
GreatWksDBParser::readFieldRecords
bool readFieldRecords(GreatWksDBParserInternal::Field &field)
try to read a list of records corresponding to field
Definition: GreatWksDBParser.cxx:1780
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:178
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
MWAWCellContent::m_formula
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:440
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:197
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:105
MWAWRSRCParser.hxx
GreatWksDBParserInternal::Database::m_heightDefault
int m_heightDefault
the default row height
Definition: GreatWksDBParser.cxx:375
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:197
GreatWksDBParser::readFormula
bool readFormula(long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula)
try to read a formula result in field definition
Definition: GreatWksDBParser.cxx:1388
MWAWPosition.hxx
GreatWksDBParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: GreatWksDBParser.cxx:434
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
MWAWCellContent::FormulaInstruction::m_type
Type m_type
the type
Definition: MWAWCell.hxx:374
GreatWksDBParserInternal::Database::m_fieldList
std::vector< Field > m_fieldList
the list of field
Definition: GreatWksDBParser.cxx:369
GreatWksGraph.hxx
GreatWksDBParser::~GreatWksDBParser
virtual ~GreatWksDBParser()
destructor
Definition: GreatWksDBParser.cxx:474
GreatWksDBParserInternal::Database::Database
Database()
constructor
Definition: GreatWksDBParser.cxx:326
GreatWksDBParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: GreatWksDBParser.cxx:403
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
GreatWksDBParserInternal::SubDocument::operator==
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: GreatWksDBParser.cxx:421
MWAWEntry::name
std::string const & name() const
name of the entry
Definition: MWAWEntry.hxx:142
GreatWksDBParser::readFreeList
bool readFreeList(GreatWksDBParserInternal::Block &block)
try to read the free zone list: 0th big zone
Definition: GreatWksDBParser.cxx:988
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
GreatWksDBParserInternal::Field::F_Text
@ F_Text
Definition: GreatWksDBParser.cxx:183
GreatWksDBParserInternal::State::m_headerBlockHeader
MWAWEntry m_headerBlockHeader
the header entry (in v2)
Definition: GreatWksDBParser.cxx:401
GreatWksDBParserInternal::BlockHeader::operator<<
friend std::ostream & operator<<(std::ostream &o, BlockHeader const &entry)
operator<<
Definition: GreatWksDBParser.cxx:84
GreatWksDBParserInternal::Cell::isEmpty
bool isEmpty() const
returns true if the cell do contain any content
Definition: GreatWksDBParser.cxx:165
GreatWksDBParserInternal::BlockHeader::m_name
std::string m_name
the block name
Definition: GreatWksDBParser.cxx:96
GreatWksDBParserInternal::Cell
a cell of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:158
MWAWCellContent::m_value
double m_value
the cell value
Definition: MWAWCell.hxx:434
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
libmwaw::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:178
GreatWksDBParserInternal::Cell::Cell
Cell()
constructor
Definition: GreatWksDBParser.cxx:161
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:353
GreatWksDBParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: GreatWksDBParser.cxx:399
GreatWksDBParserInternal::Block::operator=
Block & operator=(Block const &orig)
MWAWVec2< int >
GreatWksDBParserInternal::SubDocument
Internal: the subdocument of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:410
GreatWksDBParserInternal::Database
the database of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:323
GreatWksDBParser::m_document
shared_ptr< GreatWksDocument > m_document
the document
Definition: GreatWksDBParser.hxx:164
MWAWCellContent
small class use to define a sheet cell content
Definition: MWAWCell.hxx:356
libmwaw::ParseException
Definition: libmwaw_internal.hxx:142
MWAWDebug.hxx
GreatWksDBParserInternal::Block::Block
Block(Block const &orig)
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:72
GreatWksDBParserInternal::BlockHeader::m_ptr
long m_ptr[3]
the list of pointer: first, next, end?
Definition: GreatWksDBParser.cxx:94
GreatWksDBParser::readBlock
bool readBlock(GreatWksDBParserInternal::Block &block, int fieldSize)
try to read a unknown block, knowing the field size
Definition: GreatWksDBParser.cxx:1117
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
GreatWksDBParserInternal::SubDocument::~SubDocument
virtual ~SubDocument()
destructor
Definition: GreatWksDBParser.cxx:416
GreatWksDBParser::readZone12
bool readZone12(MWAWEntry const &zone)
try to read the small zone 12(unknown format, maybe some preferences)
Definition: GreatWksDBParser.cxx:2076
GreatWksDBParserInternal::Cell::m_content
MWAWCellContent m_content
the cell content
Definition: GreatWksDBParser.cxx:171
GreatWksDBParserInternal::Block::Block
Block(BlockHeader const &header, Zone &zone)
constructor given a zone
Definition: GreatWksDBParser.cxx:119
GreatWksDBParser::readBlockHeader
bool readBlockHeader(GreatWksDBParserInternal::BlockHeader &entry)
try to read a big block entry
Definition: GreatWksDBParser.cxx:867
GreatWksDBParserInternal::SubDocument::SubDocument
SubDocument(GreatWksDBParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: GreatWksDBParser.cxx:412
GreatWksDBParser::createBlock
shared_ptr< GreatWksDBParserInternal::Block > createBlock(GreatWksDBParserInternal::BlockHeader &entry)
try to create a block corresponding to an entry
Definition: GreatWksDBParser.cxx:875
GreatWksDocument.hxx
GreatWksDBParserInternal::Field::operator<<
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: GreatWksDBParser.cxx:278
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
GreatWksDBParserInternal::Field::m_incrementNumber
int m_incrementNumber
the increment number (in case of progression sequence)
Definition: GreatWksDBParser.cxx:224
GreatWksDBParserInternal::Block::Zone::m_N
int m_N
the number of sub data
Definition: GreatWksDBParser.cxx:110
MWAWHeaderFooter::FOOTER
@ FOOTER
Definition: MWAWPageSpan.hxx:48
GreatWksDBParserInternal::Field::F_Formula
@ F_Formula
Definition: GreatWksDBParser.cxx:183
GreatWksDBParser::readRowRecords
bool readRowRecords(MWAWEntry const &zone)
try to read a list of records corresponding to a row
Definition: GreatWksDBParser.cxx:1181
MWAWCellContent::C_FORMULA
@ C_FORMULA
Definition: MWAWCell.hxx:390
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:135
GreatWksDBParserInternal::Field::F_Time
@ F_Time
Definition: GreatWksDBParser.cxx:183
MWAWCellContent::FormulaInstruction::F_Cell
@ F_Cell
Definition: MWAWCell.hxx:360
GreatWksDBParserInternal::BlockHeader
a big zone header of a GreatWksDBParser
Definition: GreatWksDBParser.cxx:66
MWAWHeader.hxx
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
GreatWksDBParser::m_state
shared_ptr< GreatWksDBParserInternal::State > m_state
the state
Definition: GreatWksDBParser.hxx:161
GreatWksDBParserInternal::Block::Zone::m_ptr
long m_ptr
the begin zone pointer
Definition: GreatWksDBParser.cxx:108
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
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:396
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:102
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:1085
GreatWksDBParserInternal::Database::addCell
bool addCell(MWAWVec2i const &pos, Cell const &cell)
add a cell data in one given position
Definition: GreatWksDBParser.cxx:331
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:2111
MWAWCellContent::C_TEXT
@ C_TEXT
Definition: MWAWCell.hxx:390
MWAWCell::Format::m_format
FormatType m_format
the cell format : by default unknown
Definition: MWAWCell.hxx:83
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:1524
MWAWCellContent::FormulaInstruction::m_position
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:382
MWAWCell::hasBorders
bool hasBorders() const
return true if the cell has some border
Definition: MWAWCell.hxx:272
GreatWksDBParser::readIntList
bool readIntList(MWAWEntry const &zone, std::vector< int > &list)
try to read a int's zone
Definition: GreatWksDBParser.cxx:1933
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
GreatWksDBParser::createDocument
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: GreatWksDBParser.cxx:531
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
MWAWRSRCParserPtr
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:223
GreatWksDBParserInternal::Cell::~Cell
virtual ~Cell()
destructor
Definition: GreatWksDBParser.cxx:176
MWAWSpreadsheetListener.hxx
GreatWksDBParserInternal::Field::Type
Type
the file type
Definition: GreatWksDBParser.cxx:183
GreatWksDBParserInternal::Field::updateCell
bool updateCell(int row, int numRow, Cell &cell) const
update the cell to correspond to the final data
Definition: GreatWksDBParser.cxx:230
GreatWksDBParserInternal::Block::getZone
Zone const & getZone(size_t i) const
returns the ith zone
Definition: GreatWksDBParser.cxx:138
GreatWksDBParserInternal::BlockHeader::isEmpty
bool isEmpty() const
returns true if the block is empty
Definition: GreatWksDBParser.cxx:73
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:384
GreatWksDBParserInternal::Database::m_widthCols
std::vector< int > m_widthCols
the column size in points
Definition: GreatWksDBParser.cxx:373
GreatWksDBParserInternal::Database::getRowHeight
int getRowHeight(int row) const
returns the row size in point
Definition: GreatWksDBParser.cxx:346
MWAWCellContent::empty
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:399
GreatWksDBParserInternal::BlockHeader::isComplex
bool isComplex() const
returns true if the entry has many block
Definition: GreatWksDBParser.cxx:79
GreatWksDBParserInternal::Database::m_rowList
std::vector< MWAWEntry > m_rowList
the list of rows data
Definition: GreatWksDBParser.cxx:367
GreatWksDBParserInternal::Field::F_Unknown
@ F_Unknown
Definition: GreatWksDBParser.cxx:183
MWAWFont.hxx
GreatWksDBParser::GreatWksDBParser
GreatWksDBParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: GreatWksDBParser.cxx:468
GreatWksDBParserInternal::Field::F_Number
@ F_Number
Definition: GreatWksDBParser.cxx:183
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
GreatWksDBParserInternal::Field::Field
Field()
constructor
Definition: GreatWksDBParser.cxx:185
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:222
MWAWCellContent::m_contentType
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:432
GreatWksDBParserInternal::Cell::m_pictEntry
MWAWEntry m_pictEntry
picture
Definition: GreatWksDBParser.cxx:173
MWAWCellContent::C_NUMBER
@ C_NUMBER
Definition: MWAWCell.hxx:390
GreatWksDBParserInternal::Field::m_name
std::string m_name
the field name
Definition: GreatWksDBParser.cxx:199
GreatWksDBParser::parse
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface)
virtual function used to parse the input
Definition: GreatWksDBParser.cxx:502
MWAWCell::position
MWAWVec2i const & position() const
position accessor
Definition: MWAWCell.hxx:158
GreatWksDBParserInternal::operator<<
std::ostream & operator<<(std::ostream &o, Field const &field)
Definition: GreatWksDBParser.cxx:278
MWAWVec2b
MWAWVec2< bool > MWAWVec2b
MWAWVec2 of bool.
Definition: libmwaw_internal.hxx:779
GreatWksDBParserInternal::Field::F_Memo
@ F_Memo
Definition: GreatWksDBParser.cxx:183
GreatWksDBParserInternal::Field::m_formula
std::vector< MWAWCellContent::FormulaInstruction > m_formula
the formula
Definition: GreatWksDBParser.cxx:210
GreatWksDBParserInternal::Block::Block
Block(BlockHeader const &header)
constructor
Definition: GreatWksDBParser.cxx:115
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
GreatWksDBParserInternal::Database::m_rowCellsMap
std::map< int, std::vector< Cell > > m_rowCellsMap
the map row -> list of cells
Definition: GreatWksDBParser.cxx:379
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWListenerPtr
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
MWAWParser.hxx
GreatWksDBParserInternal::Field::m_type
Type m_type
the field type
Definition: GreatWksDBParser.cxx:195
GreatWksDBParserInternal::State
Internal: the state of a GreatWksDBParser.
Definition: GreatWksDBParser.cxx:387
MWAWSubDocument::m_input
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
GreatWksDBParserInternal::Field::m_recordBlock
BlockHeader m_recordBlock
the block file position which stores the position of the field's record
Definition: GreatWksDBParser.cxx:205
GreatWksDBParserInternal::Block::Zone::m_dataSize
long m_dataSize
the data size
Definition: GreatWksDBParser.cxx:112
GreatWksDBParserInternal::State::m_database
Database m_database
the database
Definition: GreatWksDBParser.cxx:394
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:213

Generated on Wed Jun 17 2020 06:30:09 for libmwaw by doxygen 1.8.18