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:380
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:268
@ MWAW_K_DATABASE
database
Definition: MWAWDocument.hxx:87
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:547
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:231
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
std::string m_name
the database name
Definition: BeagleWksDBParser.cxx:136
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:1458
MWAWCellContent m_content
the cell content
Definition: BeagleWksDBParser.cxx:89
std::string m_name
the field name
Definition: BeagleWksDBParser.cxx:87
std::multimap< std::string, MWAWEntry > m_typeEntryMap
the type entry map
Definition: BeagleWksDBParser.cxx:210
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:469
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
bool sendText(MWAWEntry const &entry, bool headerFooter=false)
try to send a text zone
Definition: BeagleWksDBParser.cxx:1498
void setPagePos(int pg, MWAWVec2f const &newOrig) const
sets/resets the page and the origin
Definition: MWAWPosition.hxx:227
int m_formula
the formula id
Definition: BeagleWksDBParser.cxx:91
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:838
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:438
@ F_DATE
Definition: MWAWCell.hxx:56
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:234
bool readRow()
read a row
Definition: BeagleWksDBParser.cxx:948
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:183
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:119
@ 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:275
int m_numPages
the number of page of the final document
Definition: BeagleWksDBParser.cxx:211
bool readFormat(MWAWCell &cell, std::string &extra)
try to read a cell's format+font
Definition: BeagleWksDBParser.cxx:801
@ 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:444
@ 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:214
int id() const
returns the id
Definition: MWAWEntry.hxx:162
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
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
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:208
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:135
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:292
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
Internal: the state of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:193
@ Time
Definition: BeagleWksDBParser.cxx:64
void setAnchorToCell(librevenge::RVNGString const &cellName)
sets the anchor to a cell position
Definition: MWAWPosition.hxx:241
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: BeagleWksDBParser.cxx:314
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:187
@ 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:114
std::vector< std::vector< MWAWCellContent > > m_records
the list of not empty cells (one list by row )
Definition: BeagleWksDBParser.cxx:132
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:236
@ 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:712
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
Database()
constructor
Definition: BeagleWksDBParser.cxx:105
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:252
~BeagleWksDBParser() final
destructor
Definition: BeagleWksDBParser.cxx:276
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:85
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:1209
void init()
inits all internal variables
Definition: BeagleWksDBParser.cxx:280
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
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:195
SubDocumentType
Definition: libmwaw_internal.hxx:188
int m_actPage
the actual page
Definition: BeagleWksDBParser.cxx:211
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:304
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:471
std::shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:559
@ 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:130
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:305
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:618
T y() const
second element
Definition: libmwaw_internal.hxx:669
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
Internal: the subdocument of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:220
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:75
T x() const
first element
Definition: libmwaw_internal.hxx:664
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: BeagleWksDBParser.cxx:343
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:65
bool empty() const
returns true if the field has no content
Definition: BeagleWksDBParser.cxx:80
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
double m_value
the cell value
Definition: MWAWCell.hxx:465
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:557
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:275
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:91
bool readLayout(int id)
read a layout zone
Definition: BeagleWksDBParser.cxx:1235
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:376
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:81
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:70
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:656
int m_numFields
the number of rows
Definition: BeagleWksDBParser.cxx:128
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:167
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:197
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:130
int m_pictureId
picture id
Definition: BeagleWksDBParser.cxx:93
bool readFields()
read the fields list
Definition: BeagleWksDBParser.cxx:1084
Cell(MWAWVec2i pos=MWAWVec2i(0, 0))
constructor
Definition: BeagleWksDBParser.cxx:66
@ C_FORMULA
Definition: MWAWCell.hxx:416
bool sendPicture(int pId, MWAWPosition const &pos, bool readEDTP, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: BeagleWksDBParser.cxx:1473
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:380
long end() const
returns the end offset
Definition: MWAWEntry.hxx:86
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:1534
@ 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:416
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:222
@ 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:1599
int m_headerHeight
the header height if known
Definition: BeagleWksDBParser.cxx:213
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:192
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:97
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:134
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
@ Text
Definition: BeagleWksDBParser.cxx:64
~SubDocument() final
destructor
Definition: BeagleWksDBParser.cxx:228
@ 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:95
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:430
bool sendPageFrames()
try to send the page graphic
Definition: BeagleWksDBParser.cxx:1450
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:549
@ WNone
Definition: MWAWPosition.hxx:53
Definition: MWAWDocument.hxx:57
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: BeagleWksDBParser.cxx:231
@ HALIGN_LEFT
Definition: MWAWCell.hxx:125
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
Class to store font.
Definition: MWAWFont.hxx:44
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: BeagleWksDBParser.cxx:245
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
long m_databaseBegin
the database begin position
Definition: BeagleWksDBParser.cxx:206
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:463
@ C_NUMBER
Definition: MWAWCell.hxx:416
~Cell() final
destructor
Definition: BeagleWksDBParser.cxx:98
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: BeagleWksDBParser.cxx:297
@ HALIGN_RIGHT
Definition: MWAWCell.hxx:125
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:834
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:390
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:96
SubDocument & operator=(SubDocument const &orig)=delete
@ HALIGN_CENTER
Definition: MWAWCell.hxx:125
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:139
@ F_TEXT
Definition: MWAWCell.hxx:56
@ Date
Definition: BeagleWksDBParser.cxx:64
Internal: the spreadsheet of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:103
Generated on Tue Apr 24 2018 22:55:11 for libmwaw by
doxygen 1.8.20