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);
78 void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface);
110 shared_ptr<GreatWksSSParserInternal::State>
m_state;
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:151
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:281
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:453
@ F_BOOLEAN
Definition: MWAWCell.hxx:56
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
@ MWAW_K_SPREADSHEET
spreadsheet
Definition: MWAWDocument.hxx:86
shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:515
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
Style getStyle(int id) const
returns the style corresponding to an id
Definition: GreatWksSSParser.cxx:182
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface)
virtual function used to parse the input
Definition: GreatWksSSParser.cxx:296
std::string m_name
the spreadsheet name
Definition: GreatWksSSParser.cxx:157
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
MWAWCellContent m_content
the cell content
Definition: GreatWksSSParser.cxx:92
@ F_DATE
Definition: MWAWCell.hxx:56
bool readSpreadsheet()
read the spreadsheet block ( many unknown data )
Definition: GreatWksSSParser.cxx:399
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
virtual ~GreatWksSSParser()
destructor
Definition: GreatWksSSParser.cxx:268
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
bool readStyles()
try to read the styles
Definition: GreatWksSSParser.cxx:1167
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:255
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
@ boldBit
Definition: MWAWFont.hxx:182
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
int getRowHeight(int row) const
returns the row size in point
Definition: GreatWksSSParser.cxx:111
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: GreatWksSSParser.cxx:229
@ BottomBit
Definition: libmwaw_internal.hxx:168
@ C_NONE
Definition: MWAWCell.hxx:390
the class to store a color
Definition: libmwaw_internal.hxx:182
MWAWVec2i getRightBottomPosition() const
returns the last Right Bottom cell position
Definition: GreatWksSSParser.cxx:160
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:216
@ Simple
Definition: MWAWFont.hxx:49
Internal: the state of a GreatWksSSParser.
Definition: GreatWksSSParser.cxx:175
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:140
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:296
a cell of a GreatWksSSParser
Definition: GreatWksSSParser.cxx:79
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:271
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:232
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:247
shared_ptr< GreatWksSSParserInternal::State > m_state
the state
Definition: GreatWksSSParser.hxx:110
the spreadsheet of a of a MsWksSSParser
Definition: GreatWksSSParser.cxx:103
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:127
@ embossBit
Definition: MWAWFont.hxx:182
std::vector< Cell > m_cells
the list of not empty cells
Definition: GreatWksSSParser.cxx:155
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:406
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:171
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
SubDocumentType
Definition: libmwaw_internal.hxx:178
bool isEmpty() const
returns true if the cell do contain any content
Definition: GreatWksSSParser.cxx:86
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
void setProtected(bool fl)
sets the cell's protected flag
Definition: MWAWCell.hxx:244
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: GreatWksSSParser.cxx:325
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:440
@ shadowBit
Definition: MWAWFont.hxx:183
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
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: GreatWksSSParser.cxx:216
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
void init()
inits all internal variables
Definition: GreatWksSSParser.cxx:272
int m_id
the subdocument id
Definition: GreatWksSSParser.cxx:226
a style of a GreatWksSSParser
Definition: GreatWksSSParser.cxx:65
GreatWksSSParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: GreatWksSSParser.cxx:262
a border
Definition: libmwaw_internal.hxx:314
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:265
bool m_headerPrint
the header is printed
Definition: GreatWksSSParser.cxx:197
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:242
SubDocument(GreatWksSSParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: GreatWksSSParser.cxx:207
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:178
shared_ptr< GreatWksDocument > m_document
the document
Definition: GreatWksSSParser.hxx:113
Spreadsheet m_spreadsheet
the spreadsheet
Definition: GreatWksSSParser.cxx:191
State()
constructor
Definition: GreatWksSSParser.cxx:177
bool createZones()
finds the different objects zones
Definition: GreatWksSSParser.cxx:368
@ RightBit
Definition: libmwaw_internal.hxx:168
small class use to define a sheet cell content
Definition: MWAWCell.hxx:356
int m_widthDefault
the default column width
Definition: GreatWksSSParser.cxx:147
Definition: libmwaw_internal.hxx:142
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
MWAWEntry m_headerEntry
the header entry (in v2)
Definition: GreatWksSSParser.cxx:196
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
virtual ~Cell()
destructor
Definition: GreatWksSSParser.cxx:97
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
std::vector< int > m_widthCols
the column size in points
Definition: GreatWksSSParser.cxx:149
int m_footerHeight
the footer height if known
Definition: GreatWksSSParser.cxx:199
bool sendHF(int id)
try to send the i^th header/footer
Definition: GreatWksSSParser.cxx:288
@ C_FORMULA
Definition: MWAWCell.hxx:390
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:245
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:135
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
@ F_TIME
Definition: MWAWCell.hxx:56
@ LeftBit
Definition: libmwaw_internal.hxx:168
the main class to read/store generic data of a GreatWorks document
Definition: GreatWksDocument.hxx:61
@ italicBit
Definition: MWAWFont.hxx:182
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWEntry m_footerEntry
the footer entry (in v2)
Definition: GreatWksSSParser.cxx:196
@ C_TEXT
Definition: MWAWCell.hxx:390
Cell()
constructor
Definition: GreatWksSSParser.cxx:82
std::vector< int > m_heightRows
the row height in points
Definition: GreatWksSSParser.cxx:153
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: GreatWksSSParser.cxx:249
Internal: the subdocument of a GreatWksSSParser.
Definition: GreatWksSSParser.cxx:205
bool sendSpreadsheet()
try to send the main spreadsheet
Definition: GreatWksSSParser.cxx:759
bool m_footerPrint
Definition: GreatWksSSParser.cxx:197
MWAWFont m_font
the font style
Definition: GreatWksSSParser.cxx:72
@ TopBit
Definition: libmwaw_internal.hxx:168
Spreadsheet()
constructor
Definition: GreatWksSSParser.cxx:106
int m_style
the cell style
Definition: GreatWksSSParser.cxx:94
bool hasBorders() const
return true if the cell has some border
Definition: MWAWCell.hxx:272
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:379
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
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
double getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: GreatWksSSParser.cxx:118
int m_numPages
the number of page of the final document
Definition: GreatWksSSParser.cxx:194
int m_actPage
the actual page
Definition: GreatWksSSParser.cxx:194
virtual ~SubDocument()
destructor
Definition: GreatWksSSParser.cxx:211
@ Double
Definition: MWAWFont.hxx:51
int m_headerHeight
the header height if known
Definition: GreatWksSSParser.cxx:198
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:399
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: GreatWksSSParser.cxx:1271
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
@ 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
std::vector< float > convertInPoint(std::vector< int > const &list) const
convert the m_widthCols in a vector of of point size
Definition: GreatWksSSParser.cxx:135
MWAWColor m_backgroundColor
the cell background color
Definition: GreatWksSSParser.cxx:74
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:862
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
@ 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
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
std::vector< Style > m_styleList
the list of style
Definition: GreatWksSSParser.cxx:193
@ HALIGN_CENTER
Definition: MWAWCell.hxx:116
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Internal: the structures of a GreatWksSSParser.
Definition: GreatWksSSParser.cxx:62
bool readChart()
try to read the chart zone: v2
Definition: GreatWksSSParser.cxx:818
@ F_TEXT
Definition: MWAWCell.hxx:56
the main class to read a GreatWorks spreadsheet file
Definition: GreatWksSSParser.hxx:59
Generated on Wed Jun 17 2020 06:30:10 for libmwaw by
doxygen 1.8.18