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);
81 void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface);
137 shared_ptr<BeagleWksDBParserInternal::State>
m_state;
@ F_CellList
Definition: MWAWCell.hxx:360
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: BeagleWksDBParser.cxx:233
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ MWAW_K_DATABASE
database
Definition: MWAWDocument.hxx:87
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:211
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
std::string m_name
the database name
Definition: BeagleWksDBParser.cxx:124
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:281
MWAWVec2f m_dim
the dimension
Definition: BeagleWksStructManager.hxx:130
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: BeagleWksDBParser.cxx:214
bool sendFrame(BeagleWksStructManager::Frame const &frame)
try to send a frame
Definition: BeagleWksDBParser.cxx:1446
MWAWCellContent m_content
the cell content
Definition: BeagleWksDBParser.cxx:82
std::string m_name
the field name
Definition: BeagleWksDBParser.cxx:80
std::multimap< std::string, MWAWEntry > m_typeEntryMap
the type entry map
Definition: BeagleWksDBParser.cxx:193
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:438
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
void setPagePos(int pg, MWAWVec2f const &newOrig) const
sets/resets the page and the origin
Definition: MWAWPosition.hxx:214
int m_formula
the formula id
Definition: BeagleWksDBParser.cxx:84
shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:515
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
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:407
@ F_DATE
Definition: MWAWCell.hxx:56
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
bool readRow()
read a row
Definition: BeagleWksDBParser.cxx:935
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:110
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
MWAWBorder m_border
the border
Definition: BeagleWksStructManager.hxx:136
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:255
int m_numPages
the number of page of the final document
Definition: BeagleWksDBParser.cxx:194
bool readFormat(MWAWCell &cell, std::string &extra)
try to read a cell's format+font
Definition: BeagleWksDBParser.cxx:788
@ 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
@ 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:197
small class use to define a formula instruction
Definition: MWAWCell.hxx:359
int id() const
returns the id
Definition: MWAWEntry.hxx:153
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:425
@ Formula
Definition: BeagleWksDBParser.cxx:64
Database m_database
the database
Definition: BeagleWksDBParser.cxx:191
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
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:128
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: BeagleWksDBParser.cxx:278
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
Internal: the state of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:182
@ Time
Definition: BeagleWksDBParser.cxx:64
void setAnchorToCell(librevenge::RVNGString const &cellName)
sets the anchor to a cell position
Definition: MWAWPosition.hxx:228
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: BeagleWksDBParser.cxx:1587
int m_page
the page ( for a page frame )
Definition: BeagleWksStructManager.hxx:132
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:102
std::vector< std::vector< MWAWCellContent > > m_records
the list of not empty cells (one list by row )
Definition: BeagleWksDBParser.cxx:120
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:216
@ Simple
Definition: MWAWFont.hxx:49
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:140
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
bool readDatabase()
read the database zone
Definition: BeagleWksDBParser.cxx:699
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
Database()
constructor
Definition: BeagleWksDBParser.cxx:98
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:232
bool sendText(MWAWEntry entry, bool headerFooter=false)
try to send a text zone
Definition: BeagleWksDBParser.cxx:1486
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:182
shared_ptr< BeagleWksDBParserInternal::State > m_state
the state
Definition: BeagleWksDBParser.hxx:137
Type m_type
the cell type
Definition: BeagleWksDBParser.cxx:78
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:1196
void init()
inits all internal variables
Definition: BeagleWksDBParser.cxx:266
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
shared_ptr< BeagleWksStructManager > m_structureManager
the structure manager
Definition: BeagleWksDBParser.hxx:140
State()
constructor
Definition: BeagleWksDBParser.cxx:184
SubDocumentType
Definition: libmwaw_internal.hxx:178
int m_actPage
the actual page
Definition: BeagleWksDBParser.cxx:194
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
Internal: a structure use to store a frame in a BeagleWorks files.
Definition: BeagleWksStructManager.hxx:102
virtual ~SubDocument()
destructor
Definition: BeagleWksDBParser.cxx:211
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:268
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:440
@ shadowBit
Definition: MWAWFont.hxx:183
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:121
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:291
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:604
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
T y() const
second element
Definition: libmwaw_internal.hxx:620
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
Internal: the subdocument of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:203
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:66
Type m_type
the type
Definition: MWAWCell.hxx:374
T x() const
first element
Definition: libmwaw_internal.hxx:615
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: BeagleWksDBParser.cxx:329
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:56
SubDocument & operator=(SubDocument const &orig)
bool empty() const
returns true if the field has no content
Definition: BeagleWksDBParser.cxx:73
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface)
virtual function used to parse the input
Definition: BeagleWksDBParser.cxx:300
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
double m_value
the cell value
Definition: MWAWCell.hxx:434
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:262
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWGraphicStyle.cxx:172
bool readLayout(int id)
read a layout zone
Definition: BeagleWksDBParser.cxx:1222
Type
the cell type
Definition: BeagleWksDBParser.cxx:64
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
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
BeagleWksDBParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: BeagleWksDBParser.cxx:256
int m_pictId
the picture id
Definition: BeagleWksStructManager.hxx:126
bool readPrintInfo()
read the print info zone
Definition: BeagleWksDBParser.cxx:643
int m_numFields
the number of rows
Definition: BeagleWksDBParser.cxx:116
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
virtual bool operator!=(MWAWSubDocument const &doc) const
comparison operator!=
Definition: MWAWSubDocument.cxx:62
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:218
std::vector< Cell > m_fields
the list of fields
Definition: BeagleWksDBParser.cxx:118
int m_pictureId
picture id
Definition: BeagleWksDBParser.cxx:86
SubDocument(SubDocument const &orig)
bool readFields()
read the fields list
Definition: BeagleWksDBParser.cxx:1071
Cell(MWAWVec2i pos=MWAWVec2i(0, 0))
constructor
Definition: BeagleWksDBParser.cxx:66
@ C_FORMULA
Definition: MWAWCell.hxx:390
bool sendPicture(int pId, MWAWPosition const &pos, bool readEDTP, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: BeagleWksDBParser.cxx:1461
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
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
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
@ F_NUMBER
Definition: MWAWCell.hxx:56
bool sendDatabase()
try to send the main database
Definition: BeagleWksDBParser.cxx:1522
@ F_TIME
Definition: MWAWCell.hxx:56
virtual ~Cell()
destructor
Definition: BeagleWksDBParser.cxx:91
@ Number
Definition: BeagleWksDBParser.cxx:64
@ italicBit
Definition: MWAWFont.hxx:182
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
virtual ~BeagleWksDBParser()
destructor
Definition: BeagleWksDBParser.cxx:262
@ C_TEXT
Definition: MWAWCell.hxx:390
int m_wrap
the wrapping: 0=none, 1=rectangle, 2=irregular
Definition: BeagleWksStructManager.hxx:134
@ Page
Definition: MWAWPosition.hxx:51
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:382
int m_headerHeight
the header height if known
Definition: BeagleWksDBParser.cxx:196
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
@ Memo
Definition: BeagleWksDBParser.cxx:64
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
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:88
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:223
std::vector< MWAWEntry > m_memos
the list of memo strings entry
Definition: BeagleWksDBParser.cxx:122
@ Text
Definition: BeagleWksDBParser.cxx:64
@ 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:88
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:399
bool sendPageFrames()
try to send the page graphic
Definition: BeagleWksDBParser.cxx:1437
@ WNone
Definition: MWAWPosition.hxx:53
@ 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
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
long m_databaseBegin
the database begin position
Definition: BeagleWksDBParser.cxx:189
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:432
@ C_NUMBER
Definition: MWAWCell.hxx:390
MWAWVec2i const & position() const
position accessor
Definition: MWAWCell.hxx:158
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: BeagleWksDBParser.cxx:283
@ 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
int m_bordersSet
the list of border which are set in form libmwaw::LeftBit|...
Definition: BeagleWksStructManager.hxx:138
bool createZones()
finds the different objects zones
Definition: BeagleWksDBParser.cxx:376
SubDocument(BeagleWksDBParser &pars, MWAWInputStreamPtr input, MWAWEntry const &entry)
Definition: BeagleWksDBParser.cxx:205
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
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
@ HALIGN_CENTER
Definition: MWAWCell.hxx:116
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
void updateWithContent(Cell &cell, MWAWVec2i const &pos, MWAWCellContent const &content) const
update a field with the record data
Definition: BeagleWksDBParser.cxx:127
@ F_TEXT
Definition: MWAWCell.hxx:56
@ Date
Definition: BeagleWksDBParser.cxx:64
Internal: the spreadsheet of a BeagleWksDBParser.
Definition: BeagleWksDBParser.cxx:96
MWAWFont getFont() const
returns the font
Definition: MWAWCell.hxx:227
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: BeagleWksDBParser.cxx:219
Generated on Wed Jun 17 2020 06:30:08 for libmwaw by
doxygen 1.8.18