Go to the documentation of this file.
34 #ifndef BEAGLE_WKS_SS_PARSER
35 # define BEAGLE_WKS_SS_PARSER
40 #include <librevenge/librevenge.h>
77 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
@ S_Pie
Definition: MWAWChart.hxx:121
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
MWAWVec2f m_dim
the dimension
Definition: BeagleWksStructManager.hxx:139
MWAWGraphicStyle m_style
the graphic style
Definition: MWAWChart.hxx:140
SubDocument(SubDocument const &orig)=delete
@ F_BOOLEAN
Definition: MWAWCell.hxx:56
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
void setPagePos(int pg, MWAWVec2f const &newOrig) const
sets/resets the page and the origin
Definition: MWAWPosition.hxx:230
@ MWAW_K_SPREADSHEET
spreadsheet
Definition: MWAWDocument.hxx:86
#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
a axis in a chart
Definition: MWAWChart.hxx:62
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
@ F_DATE
Definition: MWAWCell.hxx:56
SubDocument(BeagleWksSSParser &pars, MWAWInputStreamPtr &input, MWAWEntry const &entry)
Definition: BeagleWksSSParser.cxx:274
@ A_Numeric
Definition: MWAWChart.hxx:64
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
double getRowHeight(int row) const
returns the height of a row in point
Definition: BeagleWksSSParser.cxx:102
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
bool addFormula(MWAWVec2i const &cellPos, std::vector< MWAWCellContent::FormulaInstruction > const &formula)
try to associate a formula to a cell
Definition: BeagleWksSSParser.cxx:160
MWAWBorder m_border
the border
Definition: BeagleWksStructManager.hxx:145
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:281
@ boldBit
Definition: MWAWFont.hxx:190
@ T_Title
Definition: MWAWChart.hxx:145
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
Cell(MWAWVec2i pos=MWAWVec2i(0, 0))
constructor
Definition: BeagleWksSSParser.cxx:65
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
@ A_Logarithmic
Definition: MWAWChart.hxx:64
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
@ BottomBit
Definition: libmwaw_internal.hxx:178
@ F_UNKNOWN
Definition: MWAWCell.hxx:56
int id() const
returns the id
Definition: MWAWEntry.hxx:164
Internal: the chart of a BeagleWksSSParser.
Definition: BeagleWksSSParser.cxx:173
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
the class to store a color
Definition: libmwaw_internal.hxx:192
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: BeagleWksSSParser.cxx:1562
@ C_Text
Definition: MWAWChart.hxx:147
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: BeagleWksSSParser.cxx:410
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
@ S_Bar
Definition: MWAWChart.hxx:121
MWAWVec2f m_origin
the origin ( for a page frame )
Definition: BeagleWksStructManager.hxx:137
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
bool sendSpreadsheet()
try to send the main spreadsheet
Definition: BeagleWksSSParser.cxx:1493
MWAWCellContent m_content
the cell content
Definition: BeagleWksSSParser.cxx:77
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
Spreadsheet m_spreadsheet
the spreadsheet
Definition: BeagleWksSSParser.cxx:256
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
@ Simple
Definition: MWAWFont.hxx:49
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
a legend in a chart
Definition: MWAWChart.hxx:88
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:332
void newPage(int number)
adds a new page
Definition: BeagleWksSSParser.cxx:365
MWAWEntry m_textEntry
the text entry
Definition: MWAWChart.hxx:170
void setMin(MWAWVec2< T > const &x)
resets the minimum point
Definition: libmwaw_internal.hxx:1085
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
std::vector< int > m_widthCols
the column size in points
Definition: BeagleWksSSParser.cxx:151
long m_spreadsheetBegin
the spreadsheet begin position
Definition: BeagleWksSSParser.cxx:254
@ S_Line
Definition: MWAWChart.hxx:121
Internal: the cell of a BeagleWksSSParser.
Definition: BeagleWksSSParser.cxx:63
~SubDocument() final
destructor
Definition: BeagleWksSSParser.cxx:280
BeagleWksSSParser * m_parser
the main parser
Definition: BeagleWksSSParser.cxx:184
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
a text zone a chart
Definition: MWAWChart.hxx:143
Defines MWAWCell (cell content and format)
bool readSpreadsheet()
read the spreadsheet zone
Definition: BeagleWksSSParser.cxx:929
@ S_Stock
Definition: MWAWChart.hxx:121
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
Internal: the subdocument of a BeagleWksSSParser.
Definition: BeagleWksSSParser.cxx:272
static bool getColor(int id, MWAWColor &color)
returns a color corresponding to an id
Definition: BeagleWksSSParser.cxx:221
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
int m_numRows
the number of rows
Definition: BeagleWksSSParser.cxx:149
SubDocumentType
Definition: libmwaw_internal.hxx:188
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
std::vector< int > m_heightRows
the row size in points
Definition: BeagleWksSSParser.cxx:153
std::shared_ptr< BeagleWksSSParserInternal::State > m_state
the state
Definition: BeagleWksSSParser.hxx:153
double getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: BeagleWksSSParser.cxx:109
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:401
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
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
bool sendText(MWAWEntry const &entry, bool headerFooter=false)
try to send a text zone
Definition: BeagleWksSSParser.cxx:1457
the main class to read a BeagleWorks spreadsheet file
Definition: BeagleWksSSParser.hxx:64
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
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: BeagleWksSSParser.cxx:126
MWAWInputStreamPtr m_input
the input
Definition: BeagleWksSSParser.cxx:186
T x() const
first element
Definition: libmwaw_internal.hxx:668
void init()
inits all internal variables
Definition: BeagleWksSSParser.cxx:331
SubDocument & operator=(SubDocument const &orig)=delete
bool readRSRCZones()
read the resource fork zone
Definition: BeagleWksSSParser.cxx:542
@ S_Column
Definition: MWAWChart.hxx:121
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
@ S_Area
Definition: MWAWChart.hxx:121
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
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
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWGraphicStyle.cxx:232
int m_formula
the formula id
Definition: BeagleWksSSParser.cxx:79
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: BeagleWksSSParser.cxx:348
bool m_showLabel
show or not the label
Definition: MWAWChart.hxx:81
@ PageBreak
Definition: MWAWListener.hxx:58
int m_lastReadRow
the last read rows
Definition: BeagleWksSSParser.cxx:157
bool readCellSheet(BeagleWksSSParserInternal::Cell &cell)
read a cell row
Definition: BeagleWksSSParser.cxx:1010
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
@ RightBit
Definition: libmwaw_internal.hxx:178
bool m_isEmpty
flag to know if the cell is empty
Definition: BeagleWksSSParser.cxx:81
bool sendPageFrames()
try to send the page graphic
Definition: BeagleWksSSParser.cxx:1409
void setMax(MWAWVec2< T > const &y)
resets the maximum point
Definition: libmwaw_internal.hxx:1090
bool createZones()
finds the different objects zones
Definition: BeagleWksSSParser.cxx:457
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
bool m_showGrid
show or not the grid
Definition: MWAWChart.hxx:79
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
Chart operator=(Chart const &orig)=delete
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
BeagleWksSSParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: BeagleWksSSParser.cxx:319
bool readFormula(BeagleWksSSParserInternal::Spreadsheet &sheet)
read the differents formula
Definition: BeagleWksSSParser.cxx:1360
std::shared_ptr< BeagleWksStructManager > m_structureManager
the structure manager
Definition: BeagleWksSSParser.hxx:156
bool sendFrame(BeagleWksStructManager::Frame const &frame)
try to send a frame
Definition: BeagleWksSSParser.cxx:1417
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
void updateWidthCols()
update the number of columns and the width
Definition: BeagleWksSSParser.cxx:139
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: BeagleWksSSParser.cxx:296
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
@ A_Sequence
Definition: MWAWChart.hxx:64
bool sendPicture(int pId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: BeagleWksSSParser.cxx:1432
MWAWBox2i m_range
the data range
Definition: MWAWChart.hxx:138
@ C_FORMULA
Definition: MWAWCell.hxx:433
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:147
virtual bool sendContent(MWAWListenerPtr listener, MWAWTable &table)
function called when the content of a cell must be send to the listener, ie.
Definition: MWAWCell.cxx:501
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
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
~BeagleWksSSParser() final
destructor
Definition: BeagleWksSSParser.cxx:327
@ F_NUMBER
Definition: MWAWCell.hxx:56
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: BeagleWksSSParser.cxx:381
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
@ F_TIME
Definition: MWAWCell.hxx:56
std::vector< Cell > m_cells
the list of not empty cells
Definition: BeagleWksSSParser.cxx:155
@ LeftBit
Definition: libmwaw_internal.hxx:178
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: BeagleWksSSParser.cxx:343
@ italicBit
Definition: MWAWFont.hxx:190
Internal: the structures of a BeagleWksSSParser.
Definition: BeagleWksSSParser.cxx:61
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
Internal: the state of a BeagleWksSSParser.
Definition: BeagleWksSSParser.cxx:206
Type m_type
the zone type
Definition: MWAWChart.hxx:162
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool readZone0()
read an unknown zone ( which appears before and after the columns's width zone )
Definition: BeagleWksSSParser.cxx:1291
a series in a chart
Definition: MWAWChart.hxx:119
@ C_TEXT
Definition: MWAWCell.hxx:433
int m_wrap
the wrapping: 0=none, 1=rectangle, 2=irregular
Definition: BeagleWksStructManager.hxx:143
@ S_Scatter
Definition: MWAWChart.hxx:121
@ Page
Definition: MWAWPosition.hxx:51
@ TopBit
Definition: libmwaw_internal.hxx:178
bool readRowSheet(BeagleWksSSParserInternal::Spreadsheet &sheet)
read the spreadsheet row
Definition: BeagleWksSSParser.cxx:961
a class used to store a chart associated to a spreadsheet ....
Definition: MWAWChart.hxx:58
ContentType m_contentType
the content type
Definition: MWAWChart.hxx:164
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
bool readPrintInfo()
read the print info zone
Definition: BeagleWksSSParser.cxx:580
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWCell.cxx:382
Chart(Chart const &orig)=delete
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
MWAWFont m_font
the zone format
Definition: MWAWChart.hxx:172
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
bool readChart()
read a chart
Definition: BeagleWksSSParser.cxx:670
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
bool readColumnWidths(BeagleWksSSParserInternal::Spreadsheet &sheet)
read the columns widths
Definition: BeagleWksSSParser.cxx:1312
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
~Cell() final
destructor
Definition: BeagleWksSSParser.cxx:84
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: BeagleWksSSParser.cxx:356
MWAWColor backgroundColor() const
returns the background color
Definition: MWAWCell.hxx:327
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
@ WNone
Definition: MWAWPosition.hxx:53
Definition: MWAWDocument.hxx:57
void sendContent(TextZone const &zone, MWAWListenerPtr &listener) final
send a zone content
Definition: BeagleWksSSParser.cxx:192
@ 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
bool m_show
show or not the legend
Definition: MWAWChart.hxx:106
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
@ C_NUMBER
Definition: MWAWCell.hxx:433
MWAWVec2i const & position() const
position accessor
Definition: MWAWCell.hxx:184
State()
constructor
Definition: BeagleWksSSParser.cxx:208
std::string m_spreadsheetName
the spreadsheet name
Definition: BeagleWksSSParser.cxx:258
Type m_type
the type
Definition: MWAWChart.hxx:136
Spreadsheet()
constructor
Definition: BeagleWksSSParser.cxx:91
@ HALIGN_RIGHT
Definition: MWAWCell.hxx:128
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: BeagleWksSSParser.cxx:283
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
Cell(Cell const &)=default
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
Chart(std::string const &name, BeagleWksSSParser &parser)
constructor
Definition: BeagleWksSSParser.cxx:175
std::multimap< std::string, MWAWEntry > m_typeEntryMap
the type entry map
Definition: BeagleWksSSParser.cxx:262
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
Type m_type
the sequence type
Definition: MWAWChart.hxx:77
@ HALIGN_CENTER
Definition: MWAWCell.hxx:128
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
@ F_TEXT
Definition: MWAWCell.hxx:56
Internal: the spreadsheet of a BeagleWksSSParser.
Definition: BeagleWksSSParser.cxx:89
std::vector< std::shared_ptr< Chart > > m_chartList
the list of chart
Definition: BeagleWksSSParser.cxx:260
bool readChartZone()
read the chart zone
Definition: BeagleWksSSParser.cxx:636
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20