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);
85 void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface);
166 shared_ptr<MsWksDBParserInternal::State>
m_state;
@ F_CellList
Definition: MWAWCell.hxx:360
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:436
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:211
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:281
a zone of a MsWksDocument ( main, header, footer )
Definition: MsWksDocument.hxx:80
shared_ptr< MsWksDocument > m_document
the actual zone
Definition: MsWksDBParser.hxx:172
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:137
int m_height
the height
Definition: MsWksDBParser.cxx:179
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:438
void init()
inits all internal variables
Definition: MsWksDBParser.cxx:511
shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:515
bool readFormTypes(MsWksDBParserInternal::Form &form)
read a form types
Definition: MsWksDBParser.cxx:1095
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
std::vector< int > m_widthCols
the column size in pixels(?)
Definition: MsWksDBParser.cxx:427
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
Internal: the state of a MsWksDBParser.
Definition: MsWksDBParser.cxx:417
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface)
virtual function used to parse the input
Definition: MsWksDBParser.cxx:525
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:407
@ F_DATE
Definition: MWAWCell.hxx:56
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: MsWksDBParser.cxx:479
DataBase m_database
the database
Definition: MsWksDBParser.cxx:425
bool readFieldTypes()
reads the list of the fields type v3-v4
Definition: MsWksDBParser.cxx:1474
int m_serialId
serialized field identificator
Definition: MsWksDBParser.cxx:174
int m_numRecords
the number of records
Definition: MsWksDBParser.cxx:267
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
FormVisibility
Definition: MsWksDBParser.cxx:281
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:255
@ F_Operator
Definition: MWAWCell.hxx:360
@ boldBit
Definition: MWAWFont.hxx:182
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:413
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
small class use to define a formula instruction
Definition: MWAWCell.hxx:359
std::ostream & operator<<(std::ostream &o, SerialFormula const &form)
operator<<
Definition: MsWksDBParser.cxx:133
the class to store a color
Definition: libmwaw_internal.hxx:182
@ V_VALUE
Definition: MsWksDBParser.cxx:281
int version() const
returns the works version
Definition: MWAWParser.hxx:108
FieldType()
constructor
Definition: MsWksDBParser.cxx:146
SubDocument(MsWksDBParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: MsWksDBParser.cxx:444
@ V_NAMEVALUE
Definition: MsWksDBParser.cxx:281
bool readReportHeader()
read a report header
Definition: MsWksDBParser.cxx:2010
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
@ V_UNKNOWN
Definition: MsWksDBParser.cxx:281
State()
constructor
Definition: MsWksDBParser.cxx:419
@ F_Function
Definition: MWAWCell.hxx:360
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWksDBParser.cxx:560
int m_numPages
the number of page of the final document
Definition: MsWksDBParser.cxx:433
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:216
@ Simple
Definition: MWAWFont.hxx:49
bool readFieldTypesV2()
reads the list of the fields type v2
Definition: MsWksDBParser.cxx:1662
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: MWAWOLEParser.hxx:86
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:140
int m_actPage
the actual page
Definition: MsWksDBParser.cxx:433
@ 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:376
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:232
bool createZones()
finds the different objects zones
Definition: MsWksDBParser.cxx:586
void updateWithContent(MWAWVec2i const &pos, MWAWCellContent const &content)
update a field with the record data
Definition: MsWksDBParser.cxx:206
bool m_used
a flag to know if the field is used or not
Definition: MsWksDBParser.cxx:170
@ embossBit
Definition: MWAWFont.hxx:182
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: MsWksDBParser.cxx:466
std::string m_extra
extra data
Definition: MsWksDBParser.cxx:181
MsWksDBParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MsWksDBParser.cxx:493
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
@ F_Text
Definition: MWAWCell.hxx:360
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
bool readUnknownV2()
reads an unknown zone V2
Definition: MsWksDBParser.cxx:2625
Internal: the structures of a MsWksDBParser.
Definition: MsWksDBParser.cxx:59
int m_id
the subdocument id
Definition: MsWksDBParser.cxx:463
SubDocumentType
Definition: libmwaw_internal.hxx:178
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: MsWksDBParser.cxx:453
bool readDataBase()
try to read the database zone
Definition: MsWksDBParser.cxx:651
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:440
@ shadowBit
Definition: MWAWFont.hxx:183
bool m_isSerial
a flag to deferentiate a serial formula to a formula
Definition: MsWksDBParser.cxx:172
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
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
bool readReportV2()
reads a report zone in v.2 file
Definition: MsWksDBParser.cxx:2190
Type m_type
the type
Definition: MWAWCell.hxx:374
bool readDefaultValues()
reads the default value
Definition: MsWksDBParser.cxx:2484
bool readColSize(std::vector< int > &colSize)
reads the list of the columns size
Definition: MsWksDBParser.cxx:2584
std::vector< std::vector< MWAWCellContent > > m_listRecords
the list of record by row
Definition: MsWksDBParser.cxx:274
SerialFormula m_serialFormula
the serial formula ( if the field is serialized )
Definition: MsWksDBParser.cxx:176
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
bool readForm()
reads one form
Definition: MsWksDBParser.cxx:984
double m_value
the cell value
Definition: MWAWCell.hxx:434
int m_numReports
the number of report
Definition: MsWksDBParser.cxx:431
small class use to define a sheet cell content
Definition: MWAWCell.hxx:356
Definition: libmwaw_internal.hxx:142
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
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:61
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1134
std::vector< FieldType > m_listFieldTypes
the list of field type
Definition: MsWksDBParser.cxx:271
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
double m_longValue
value ( if type==F_Long )
Definition: MWAWCell.hxx:378
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MsWksDBParser.cxx:2695
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
@ V_UNDEF
Definition: MsWksDBParser.cxx:281
the type of each field
Definition: MsWksDBParser.cxx:143
DataBase()
constructor
Definition: MsWksDBParser.cxx:249
bool readFormula()
reads the formula value
Definition: MsWksDBParser.cxx:2304
@ V_HEADER
Definition: MsWksDBParser.cxx:281
@ C_FORMULA
Definition: MWAWCell.hxx:390
std::string m_name
the field name
Definition: MsWksDBParser.cxx:167
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:135
@ F_Cell
Definition: MWAWCell.hxx:360
virtual ~SubDocument()
destructor
Definition: MsWksDBParser.cxx:448
bool sendDatabase()
try to send the main database
Definition: MsWksDBParser.cxx:2251
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
@ F_Long
Definition: MWAWCell.hxx:360
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
bool readReports()
reads the reports
Definition: MsWksDBParser.cxx:1924
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:442
@ F_TIME
Definition: MWAWCell.hxx:56
int m_numFields
the number of fields
Definition: MsWksDBParser.cxx:264
Forms m_forms
the forms
Definition: MsWksDBParser.cxx:429
friend std::ostream & operator<<(std::ostream &o, FieldType const &fType)
operator<<
Definition: MsWksDBParser.cxx:188
@ italicBit
Definition: MWAWFont.hxx:182
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
@ C_TEXT
Definition: MWAWCell.hxx:390
bool empty() const
returns true if the field has no content
Definition: MsWksDBParser.cxx:156
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:382
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:88
virtual ~MsWksDBParser()
destructor
Definition: MsWksDBParser.cxx:507
bool readSerialFormula()
reads the serial value
Definition: MsWksDBParser.cxx:2406
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
@ Z_MAIN
Definition: MsWksDocument.hxx:78
bool readFormV2()
reads a list of dimension(?) corresponding to the fields type v2
Definition: MsWksDBParser.cxx:847
bool readFilters()
reads the filters
Definition: MsWksDBParser.cxx:1803
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:281
shared_ptr< MsWksDBParserInternal::State > m_state
the state
Definition: MsWksDBParser.hxx:166
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:399
@ HALIGN_LEFT
Definition: MWAWCell.hxx:116
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
the database
Definition: MsWksDBParser.cxx:246
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:251
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:432
@ C_NUMBER
Definition: MWAWCell.hxx:390
bool readForms()
reads all the form
Definition: MsWksDBParser.cxx:920
bool readRecords(bool onlyCheck)
reads the database contents: field's names and values
Definition: MsWksDBParser.cxx:1251
@ HALIGN_RIGHT
Definition: MWAWCell.hxx:116
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:445
@ C_UNKNOWN
Definition: MWAWCell.hxx:390
virtual ~FieldType()
destructor
Definition: MsWksDBParser.cxx:184
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
@ HALIGN_CENTER
Definition: MWAWCell.hxx:116
MWAWCellContent m_content
the cell content
Definition: MsWksDBParser.cxx:165
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
@ F_TEXT
Definition: MWAWCell.hxx:56
MWAWFont getFont() const
returns the font
Definition: MWAWCell.hxx:227
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18