Go to the documentation of this file.
34 #ifndef MS_WKS_DB_PARSER
35 # define MS_WKS_DB_PARSER
78 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
~SubDocument() final
destructor
Definition: MsWksDBParser.cxx:497
@ 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
int m_pageLength
the page length in point (if known)
Definition: MsWksDBParser.cxx:482
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: MsWksDBParser.cxx:572
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
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
a zone of a MsWksDocument ( main, header, footer )
Definition: MsWksDocument.hxx:80
the main class to read/store generic data of a MsWorks document v1-v3
Definition: MsWksDocument.hxx:69
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:148
int m_height
the height
Definition: MsWksDBParser.cxx:196
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:489
void init()
inits all internal variables
Definition: MsWksDBParser.cxx:558
bool readFormTypes(MsWksDBParserInternal::Form &form)
read a form types
Definition: MsWksDBParser.cxx:1141
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::vector< int > m_widthCols
the column size in pixels(?)
Definition: MsWksDBParser.cxx:473
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
Internal: the state of a MsWksDBParser.
Definition: MsWksDBParser.cxx:457
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
@ F_DATE
Definition: MWAWCell.hxx:56
DataBase m_database
the database
Definition: MsWksDBParser.cxx:471
bool readFieldTypes()
reads the list of the fields type v3-v4
Definition: MsWksDBParser.cxx:1521
int m_serialId
serialized field identificator
Definition: MsWksDBParser.cxx:191
int m_numRecords
the number of records
Definition: MsWksDBParser.cxx:289
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
FormVisibility
Definition: MsWksDBParser.cxx:303
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:281
@ F_Operator
Definition: MWAWCell.hxx:398
@ boldBit
Definition: MWAWFont.hxx:190
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:464
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
small class use to define a formula instruction
Definition: MWAWCell.hxx:397
std::ostream & operator<<(std::ostream &o, SerialFormula const &form)
operator<<
Definition: MsWksDBParser.cxx:139
the class to store a color
Definition: libmwaw_internal.hxx:192
@ V_VALUE
Definition: MsWksDBParser.cxx:303
~MsWksDBParser() final
destructor
Definition: MsWksDBParser.cxx:554
int version() const
returns the works version
Definition: MWAWParser.hxx:108
FieldType()
constructor
Definition: MsWksDBParser.cxx:152
@ V_NAMEVALUE
Definition: MsWksDBParser.cxx:303
bool readReportHeader()
read a report header
Definition: MsWksDBParser.cxx:2057
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
@ V_UNKNOWN
Definition: MsWksDBParser.cxx:303
State()
constructor
Definition: MsWksDBParser.cxx:459
@ F_Function
Definition: MWAWCell.hxx:398
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MsWksDBParser.cxx:510
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWksDBParser.cxx:607
int m_numPages
the number of page of the final document
Definition: MsWksDBParser.cxx:479
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
@ Simple
Definition: MWAWFont.hxx:49
bool readFieldTypesV2()
reads the list of the fields type v2
Definition: MsWksDBParser.cxx:1709
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: MWAWOLEParser.hxx:86
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
int m_actPage
the actual page
Definition: MsWksDBParser.cxx:479
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
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
std::shared_ptr< MsWksDBParserInternal::State > m_state
the state
Definition: MsWksDBParser.hxx:166
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:258
bool createZones()
finds the different objects zones
Definition: MsWksDBParser.cxx:633
void updateWithContent(MWAWVec2i const &pos, MWAWCellContent const &content)
update a field with the record data
Definition: MsWksDBParser.cxx:223
bool m_used
a flag to know if the field is used or not
Definition: MsWksDBParser.cxx:187
@ embossBit
Definition: MWAWFont.hxx:190
Defines MWAWCell (cell content and format)
std::string m_extra
extra data
Definition: MsWksDBParser.cxx:198
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
@ F_Text
Definition: MWAWCell.hxx:398
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
bool readUnknownV2()
reads an unknown zone V2
Definition: MsWksDBParser.cxx:2676
Internal: the structures of a MsWksDBParser.
Definition: MsWksDBParser.cxx:59
int m_id
the subdocument id
Definition: MsWksDBParser.cxx:507
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
bool readDataBase()
try to read the database zone
Definition: MsWksDBParser.cxx:698
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
@ shadowBit
Definition: MWAWFont.hxx:191
bool m_isSerial
a flag to deferentiate a serial formula to a formula
Definition: MsWksDBParser.cxx:189
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: MWAWSpreadsheetListener.hxx:66
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
bool readReportV2()
reads a report zone in v.2 file
Definition: MsWksDBParser.cxx:2237
Type m_type
the type
Definition: MWAWCell.hxx:415
bool readDefaultValues()
reads the default value
Definition: MsWksDBParser.cxx:2535
bool readColSize(std::vector< int > &colSize)
reads the list of the columns size
Definition: MsWksDBParser.cxx:2635
std::vector< std::vector< MWAWCellContent > > m_listRecords
the list of record by row
Definition: MsWksDBParser.cxx:296
SerialFormula m_serialFormula
the serial formula ( if the field is serialized )
Definition: MsWksDBParser.cxx:193
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool readForm()
reads one form
Definition: MsWksDBParser.cxx:1030
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
int m_numReports
the number of report
Definition: MsWksDBParser.cxx:477
small class use to define a sheet cell content
Definition: MWAWCell.hxx:394
Definition: libmwaw_internal.hxx:144
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
SubDocument(MsWksDBParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: MsWksDBParser.cxx:490
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
the main class to read a Microsoft Works database file and convert it in a spreadsheet file
Definition: MsWksDBParser.hxx:66
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
FieldType(FieldType const &)=default
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
std::vector< FieldType > m_listFieldTypes
the list of field type
Definition: MsWksDBParser.cxx:293
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MsWksDBParser.cxx:2746
std::shared_ptr< MsWksDocument > m_document
the actual zone
Definition: MsWksDBParser.hxx:172
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
double m_longValue
value ( if type==F_Long )
Definition: MWAWCell.hxx:419
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
@ V_UNDEF
Definition: MsWksDBParser.cxx:303
the type of each field
Definition: MsWksDBParser.cxx:149
DataBase()
constructor
Definition: MsWksDBParser.cxx:265
bool readFormula()
reads the formula value
Definition: MsWksDBParser.cxx:2351
~FieldType() final
destructor
Definition: MsWksDBParser.cxx:201
@ V_HEADER
Definition: MsWksDBParser.cxx:303
@ C_FORMULA
Definition: MWAWCell.hxx:433
std::string m_name
the field name
Definition: MsWksDBParser.cxx:184
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:147
@ F_Cell
Definition: MWAWCell.hxx:398
bool sendDatabase()
try to send the main database
Definition: MsWksDBParser.cxx:2298
@ F_Long
Definition: MWAWCell.hxx:398
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
bool readReports()
reads the reports
Definition: MsWksDBParser.cxx:1971
std::vector< MWAWEntry > m_listZones
the list of different Zones
Definition: MsWksDBParser.hxx:169
@ F_NUMBER
Definition: MWAWCell.hxx:56
Internal: the subdocument of a MsWksDBParser.
Definition: MsWksDBParser.cxx:488
@ F_TIME
Definition: MWAWCell.hxx:56
FieldType & operator=(FieldType const &)=default
int m_numFields
the number of fields
Definition: MsWksDBParser.cxx:286
Forms m_forms
the forms
Definition: MsWksDBParser.cxx:475
@ italicBit
Definition: MWAWFont.hxx:190
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MsWksDBParser.cxx:523
@ C_TEXT
Definition: MWAWCell.hxx:433
bool empty() const
returns true if the field has no content
Definition: MsWksDBParser.cxx:173
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MsWksDBParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MsWksDBParser.cxx:537
bool readSerialFormula()
reads the serial value
Definition: MsWksDBParser.cxx:2453
@ Z_MAIN
Definition: MsWksDocument.hxx:78
bool readFormV2()
reads a list of dimension(?) corresponding to the fields type v2
Definition: MsWksDBParser.cxx:894
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
bool readFilters()
reads the filters
Definition: MsWksDBParser.cxx:1850
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
@ V_HIDDEN
Definition: MsWksDBParser.cxx:303
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:450
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Definition: MWAWDocument.hxx:57
@ HALIGN_LEFT
Definition: MWAWCell.hxx:128
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
the database
Definition: MsWksDBParser.cxx:262
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
std::vector< float > convertInPoint(std::vector< int > const &list, float defSize) const
convert the m_widthCols in a vector of of point size
Definition: MsWksDBParser.cxx:273
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:483
@ C_NUMBER
Definition: MWAWCell.hxx:433
bool readForms()
reads all the form
Definition: MsWksDBParser.cxx:966
bool readRecords(bool onlyCheck)
reads the database contents: field's names and values
Definition: MsWksDBParser.cxx:1298
@ HALIGN_RIGHT
Definition: MWAWCell.hxx:128
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
@ C_UNKNOWN
Definition: MWAWCell.hxx:433
@ HALIGN_CENTER
Definition: MWAWCell.hxx:128
MWAWCellContent m_content
the cell content
Definition: MsWksDBParser.cxx:182
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
@ F_TEXT
Definition: MWAWCell.hxx:56
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20