Go to the documentation of this file.
34 #ifndef BEAGLE_WKS_DB_PARSER
35 # define BEAGLE_WKS_DB_PARSER
40 #include <librevenge/librevenge.h>
74 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
@ F_CellList
Definition: MWAWCell.hxx:398
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
BeagleWksDBParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: BeagleWksDBParser.cxx:269
@ MWAW_K_DATABASE
database
Definition: MWAWDocument.hxx:87
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:237
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
std::string m_name
the database name
Definition: BeagleWksDBParser.cxx:137
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
MWAWVec2f m_dim
the dimension
Definition: BeagleWksStructManager.hxx:139
bool sendFrame(BeagleWksStructManager::Frame const &frame)
try to send a frame
Definition: BeagleWksDBParser.cxx:1459
MWAWCellContent m_content
the cell content
Definition: BeagleWksDBParser.cxx:90
std::string m_name
the field name
Definition: BeagleWksDBParser.cxx:88
std::multimap< std::string, MWAWEntry > m_typeEntryMap
the type entry map
Definition: BeagleWksDBParser.cxx:211
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:489
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
bool sendText(MWAWEntry const &entry, bool headerFooter=false)
try to send a text zone
Definition: BeagleWksDBParser.cxx:1499
void setPagePos(int pg, MWAWVec2f const &newOrig) const
sets/resets the page and the origin
Definition: MWAWPosition.hxx:230
int m_formula
the formula id
Definition: BeagleWksDBParser.cxx:92
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:458
@ F_DATE
Definition: MWAWCell.hxx:56
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
bool readRow()
read a row
Definition: BeagleWksDBParser.cxx:949
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
MWAWBorder m_border
the border
Definition: BeagleWksStructManager.hxx:145
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:281
int m_numPages
the number of page of the final document
Definition: BeagleWksDBParser.cxx:212
bool readFormat(MWAWCell &cell, std::string &extra)
try to read a cell's format+font
Definition: BeagleWksDBParser.cxx:802
@ 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
@ Picture
Definition: BeagleWksDBParser.cxx:64
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
int m_footerHeight
the footer height if known
Definition: BeagleWksDBParser.cxx:215
int id() const
returns the id
Definition: MWAWEntry.hxx:164
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
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
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
@ Formula
Definition: BeagleWksDBParser.cxx:64
Database m_database
the database
Definition: BeagleWksDBParser.cxx:209
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
the main class to read a BeagleWorks database file
Definition: BeagleWksDBParser.hxx:62
MWAWVec2f m_origin
the origin ( for a page frame )
Definition: BeagleWksStructManager.hxx:137
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: BeagleWksDBParser.cxx:293
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
Internal: the state of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:194
@ Time
Definition: BeagleWksDBParser.cxx:64
void setAnchorToCell(librevenge::RVNGString const &cellName)
sets the anchor to a cell position
Definition: MWAWPosition.hxx:244
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: BeagleWksDBParser.cxx:315
int m_page
the page ( for a page frame )
Definition: BeagleWksStructManager.hxx:141
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
@ WDynamic
Definition: MWAWPosition.hxx:53
static std::vector< float > convertInPoint(std::vector< int > const &list, float defSize)
convert the m_widthCols, m_heightRows in a vector of of point size
Definition: BeagleWksDBParser.cxx:115
std::vector< std::vector< MWAWCellContent > > m_records
the list of not empty cells (one list by row )
Definition: BeagleWksDBParser.cxx:133
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
@ Simple
Definition: MWAWFont.hxx:49
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
bool readDatabase()
read the database zone
Definition: BeagleWksDBParser.cxx:713
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
Database()
constructor
Definition: BeagleWksDBParser.cxx:106
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
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:258
~BeagleWksDBParser() final
destructor
Definition: BeagleWksDBParser.cxx:277
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:190
SubDocument(SubDocument const &orig)=delete
Type m_type
the cell type
Definition: BeagleWksDBParser.cxx:86
Defines MWAWCell (cell content and format)
Internal: the cell of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:62
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
bool readLayouts()
read the layout zone
Definition: BeagleWksDBParser.cxx:1210
void init()
inits all internal variables
Definition: BeagleWksDBParser.cxx:281
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
the main class to read the structure shared between different BeagleWorks files
Definition: BeagleWksStructManager.hxx:57
State()
constructor
Definition: BeagleWksDBParser.cxx:196
Cell(Cell const &)=default
SubDocumentType
Definition: libmwaw_internal.hxx:188
int m_actPage
the actual page
Definition: BeagleWksDBParser.cxx:212
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
Internal: a structure use to store a frame in a BeagleWorks files.
Definition: BeagleWksStructManager.hxx:102
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:401
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
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: MWAWSpreadsheetListener.hxx:66
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: BeagleWksDBParser.cxx:306
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
bool readRSRCZones()
read the resource fork zone
Definition: BeagleWksDBParser.cxx:619
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
Internal: the subdocument of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:221
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
T x() const
first element
Definition: libmwaw_internal.hxx:668
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: BeagleWksDBParser.cxx:344
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
@ MWAW_T_BEAGLEWORKS
BeagleWorks (v1.0)/WordPerfect Works (v1.2): export database(as spreadsheet), draw,...
Definition: MWAWDocument.hxx:103
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool empty() const
returns true if the field has no content
Definition: BeagleWksDBParser.cxx:81
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
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
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
bool readLayout(int id)
read a layout zone
Definition: BeagleWksDBParser.cxx:1236
Type
the cell type
Definition: BeagleWksDBParser.cxx:64
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
std::shared_ptr< BeagleWksDBParserInternal::State > m_state
the state
Definition: BeagleWksDBParser.hxx:137
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
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
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
int m_pictId
the picture id
Definition: BeagleWksStructManager.hxx:135
bool readPrintInfo()
read the print info zone
Definition: BeagleWksDBParser.cxx:657
int m_numFields
the number of rows
Definition: BeagleWksDBParser.cxx:129
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
std::shared_ptr< BeagleWksStructManager > m_structureManager
the structure manager
Definition: BeagleWksDBParser.hxx:140
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
virtual bool operator!=(MWAWSubDocument const &doc) const
comparison operator!=
Definition: MWAWSubDocument.cxx:49
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
std::vector< Cell > m_fields
the list of fields
Definition: BeagleWksDBParser.cxx:131
int m_pictureId
picture id
Definition: BeagleWksDBParser.cxx:94
bool readFields()
read the fields list
Definition: BeagleWksDBParser.cxx:1085
Cell(MWAWVec2i pos=MWAWVec2i(0, 0))
constructor
Definition: BeagleWksDBParser.cxx:66
@ C_FORMULA
Definition: MWAWCell.hxx:433
bool sendPicture(int pId, MWAWPosition const &pos, bool readEDTP, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: BeagleWksDBParser.cxx:1474
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
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
@ F_NUMBER
Definition: MWAWCell.hxx:56
bool sendDatabase()
try to send the main database
Definition: BeagleWksDBParser.cxx:1535
@ F_TIME
Definition: MWAWCell.hxx:56
@ Number
Definition: BeagleWksDBParser.cxx:64
@ italicBit
Definition: MWAWFont.hxx:190
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
@ C_TEXT
Definition: MWAWCell.hxx:433
int m_wrap
the wrapping: 0=none, 1=rectangle, 2=irregular
Definition: BeagleWksStructManager.hxx:143
SubDocument(BeagleWksDBParser &pars, MWAWInputStreamPtr const &input, MWAWEntry const &entry)
Definition: BeagleWksDBParser.cxx:223
@ Page
Definition: MWAWPosition.hxx:51
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: BeagleWksDBParser.cxx:1600
int m_headerHeight
the header height if known
Definition: BeagleWksDBParser.cxx:214
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
@ Memo
Definition: BeagleWksDBParser.cxx:64
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
std::vector< MWAWEntry > m_memos
the list of memo strings entry
Definition: BeagleWksDBParser.cxx:135
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
@ Text
Definition: BeagleWksDBParser.cxx:64
~SubDocument() final
destructor
Definition: BeagleWksDBParser.cxx:229
@ Unknown
Definition: BeagleWksDBParser.cxx:64
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
Internal: the structures of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:60
bool m_isEmpty
flag to know if the cell is empty
Definition: BeagleWksDBParser.cxx:96
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:450
bool sendPageFrames()
try to send the page graphic
Definition: BeagleWksDBParser.cxx:1451
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
@ WNone
Definition: MWAWPosition.hxx:53
Definition: MWAWDocument.hxx:57
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: BeagleWksDBParser.cxx:232
@ 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
Class to store font.
Definition: MWAWFont.hxx:44
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: BeagleWksDBParser.cxx:246
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
long m_databaseBegin
the database begin position
Definition: BeagleWksDBParser.cxx:207
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:483
@ C_NUMBER
Definition: MWAWCell.hxx:433
~Cell() final
destructor
Definition: BeagleWksDBParser.cxx:99
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: BeagleWksDBParser.cxx:298
@ 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
int m_bordersSet
the list of border which are set in form libmwaw::LeftBit|...
Definition: BeagleWksStructManager.hxx:147
bool createZones()
finds the different objects zones
Definition: BeagleWksDBParser.cxx:391
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
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
SubDocument & operator=(SubDocument const &orig)=delete
@ HALIGN_CENTER
Definition: MWAWCell.hxx:128
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
void updateWithContent(Cell &cell, MWAWVec2i const &pos, MWAWCellContent const &content) const
update a field with the record data
Definition: BeagleWksDBParser.cxx:140
@ F_TEXT
Definition: MWAWCell.hxx:56
@ Date
Definition: BeagleWksDBParser.cxx:64
Internal: the spreadsheet of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:104
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20