Go to the documentation of this file.
34 #ifndef GREAT_WKS_SS_PARSER
35 # define GREAT_WKS_SS_PARSER
40 #include <librevenge/librevenge.h>
71 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
int m_heightDefault
the default row height
Definition: GreatWksSSParser.cxx:161
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:474
@ F_BOOLEAN
Definition: MWAWCell.hxx:56
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
@ MWAW_K_SPREADSHEET
spreadsheet
Definition: MWAWDocument.hxx:86
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
Style getStyle(int id) const
returns the style corresponding to an id
Definition: GreatWksSSParser.cxx:200
std::string m_name
the spreadsheet name
Definition: GreatWksSSParser.cxx:167
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
MWAWCellContent m_content
the cell content
Definition: GreatWksSSParser.cxx:97
@ F_DATE
Definition: MWAWCell.hxx:56
bool readSpreadsheet()
read the spreadsheet block ( many unknown data )
Definition: GreatWksSSParser.cxx:414
std::shared_ptr< GreatWksDocument > m_document
the document
Definition: GreatWksSSParser.hxx:113
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
bool readStyles()
try to read the styles
Definition: GreatWksSSParser.cxx:1179
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:281
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
@ boldBit
Definition: MWAWFont.hxx:190
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
int getRowHeight(int row) const
returns the row size in point
Definition: GreatWksSSParser.cxx:121
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: GreatWksSSParser.cxx:262
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
@ C_NONE
Definition: MWAWCell.hxx:433
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWVec2i getRightBottomPosition() const
returns the last Right Bottom cell position
Definition: GreatWksSSParser.cxx:170
int version() const
returns the works version
Definition: MWAWParser.hxx:108
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
@ Simple
Definition: MWAWFont.hxx:49
Internal: the state of a GreatWksSSParser.
Definition: GreatWksSSParser.cxx:184
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
a cell of a GreatWksSSParser
Definition: GreatWksSSParser.cxx:81
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
~SubDocument() final
destructor
Definition: GreatWksSSParser.cxx:229
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: MWAWGraphicStyle.hxx:363
the spreadsheet of a of a MsWksSSParser
Definition: GreatWksSSParser.cxx:108
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
@ embossBit
Definition: MWAWFont.hxx:190
Defines MWAWCell (cell content and format)
std::vector< Cell > m_cells
the list of not empty cells
Definition: GreatWksSSParser.cxx:165
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:427
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
Cell & operator=(Cell &&)=default
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
SubDocumentType
Definition: libmwaw_internal.hxx:188
bool isEmpty() const
returns true if the cell do contain any content
Definition: GreatWksSSParser.cxx:91
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
void setProtected(bool fl)
sets the cell's protected flag
Definition: MWAWCell.hxx:270
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: GreatWksSSParser.cxx:340
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
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: MWAWSpreadsheetListener.hxx:66
GreatWksSSParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: GreatWksSSParser.cxx:275
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
void init()
inits all internal variables
Definition: GreatWksSSParser.cxx:287
int m_id
the subdocument id
Definition: GreatWksSSParser.cxx:239
a style of a GreatWksSSParser
Definition: GreatWksSSParser.cxx:65
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
~GreatWksSSParser() final
destructor
Definition: GreatWksSSParser.cxx:283
bool m_headerPrint
the header is printed
Definition: GreatWksSSParser.cxx:215
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:188
Spreadsheet m_spreadsheet
the spreadsheet
Definition: GreatWksSSParser.cxx:209
State()
constructor
Definition: GreatWksSSParser.cxx:186
bool createZones()
finds the different objects zones
Definition: GreatWksSSParser.cxx:383
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
@ RightBit
Definition: libmwaw_internal.hxx:178
small class use to define a sheet cell content
Definition: MWAWCell.hxx:394
int m_widthDefault
the default column width
Definition: GreatWksSSParser.cxx:157
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
MWAWEntry m_headerEntry
the header entry (in v2)
Definition: GreatWksSSParser.cxx:214
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
SubDocument(GreatWksSSParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: GreatWksSSParser.cxx:225
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: GreatWksSSParser.cxx:1280
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: GreatWksSSParser.cxx:242
~Cell() final
destructor
Definition: GreatWksSSParser.cxx:102
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
std::vector< int > m_widthCols
the column size in points
Definition: GreatWksSSParser.cxx:159
int m_footerHeight
the footer height if known
Definition: GreatWksSSParser.cxx:217
bool sendHF(int id)
try to send the i^th header/footer
Definition: GreatWksSSParser.cxx:303
@ C_FORMULA
Definition: MWAWCell.hxx:433
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:147
Cell & operator=(Cell const &)=default
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
@ F_NUMBER
Definition: MWAWCell.hxx:56
@ F_TIME
Definition: MWAWCell.hxx:56
@ LeftBit
Definition: libmwaw_internal.hxx:178
the main class to read/store generic data of a GreatWorks document
Definition: GreatWksDocument.hxx:61
@ italicBit
Definition: MWAWFont.hxx:190
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: GreatWksSSParser.cxx:311
MWAWEntry m_footerEntry
the footer entry (in v2)
Definition: GreatWksSSParser.cxx:214
@ C_TEXT
Definition: MWAWCell.hxx:433
Cell()
constructor
Definition: GreatWksSSParser.cxx:84
std::vector< int > m_heightRows
the row height in points
Definition: GreatWksSSParser.cxx:163
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
Internal: the subdocument of a GreatWksSSParser.
Definition: GreatWksSSParser.cxx:223
bool sendSpreadsheet()
try to send the main spreadsheet
Definition: GreatWksSSParser.cxx:772
bool m_footerPrint
Definition: GreatWksSSParser.cxx:215
MWAWFont m_font
the font style
Definition: GreatWksSSParser.cxx:74
@ TopBit
Definition: libmwaw_internal.hxx:178
Spreadsheet()
constructor
Definition: GreatWksSSParser.cxx:111
int m_style
the cell style
Definition: GreatWksSSParser.cxx:99
bool hasBorders() const
return true if the cell has some border
Definition: MWAWCell.hxx:308
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWCell.cxx:382
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
double getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: GreatWksSSParser.cxx:128
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
int m_numPages
the number of page of the final document
Definition: GreatWksSSParser.cxx:212
int m_actPage
the actual page
Definition: GreatWksSSParser.cxx:212
@ Double
Definition: MWAWFont.hxx:51
int m_headerHeight
the header height if known
Definition: GreatWksSSParser.cxx:216
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:450
std::shared_ptr< GreatWksSSParserInternal::State > m_state
the state
Definition: GreatWksSSParser.hxx:110
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Cell(Cell const &)=default
Definition: MWAWDocument.hxx:57
@ 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
std::vector< float > convertInPoint(std::vector< int > const &list) const
convert the m_widthCols in a vector of of point size
Definition: GreatWksSSParser.cxx:145
MWAWColor m_backgroundColor
the cell background color
Definition: GreatWksSSParser.cxx:76
Style()
constructor
Definition: GreatWksSSParser.cxx:68
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
bool readCell(GreatWksSSParserInternal::Cell &cell)
try to read a cell
Definition: GreatWksSSParser.cxx:873
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:483
@ C_NUMBER
Definition: MWAWCell.hxx:433
@ 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
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
std::vector< Style > m_styleList
the list of style
Definition: GreatWksSSParser.cxx:211
@ HALIGN_CENTER
Definition: MWAWCell.hxx:128
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Internal: the structures of a GreatWksSSParser.
Definition: GreatWksSSParser.cxx:62
bool readChart()
try to read the chart zone: v2
Definition: GreatWksSSParser.cxx:829
@ F_TEXT
Definition: MWAWCell.hxx:56
the main class to read a GreatWorks spreadsheet file
Definition: GreatWksSSParser.hxx:59
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20