Go to the documentation of this file.
34 #ifndef MS_WKS_SS_PARSER
35 # define MS_WKS_SS_PARSER
78 void parse(librevenge::RVNGSpreadsheetInterface *documentInterface);
85 void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface);
117 shared_ptr<MsWksSSParserInternal::State>
m_state;
void sendNote(int id)
try to send a note
Definition: MsWksSSParser.cxx:281
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ Time
Definition: libmwaw_internal.hxx:371
std::vector< int > m_widthCols
the column size in pixels(?)
Definition: MsWksSSParser.cxx:115
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:281
int m_actPage
the actual page
Definition: MsWksSSParser.cxx:153
a zone of a MsWksDocument ( main, header, footer )
Definition: MsWksDocument.hxx:80
bool readCell(int sz, MWAWVec2i const &cellPos, MsWksSSParserInternal::Cell &cell)
reads a cell content data
Definition: MsWksSSParser.cxx:845
@ F_BOOLEAN
Definition: MWAWCell.hxx:56
the main class to read/store generic data of a MsWorks document v1-v3
Definition: MsWksDocument.hxx:69
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:137
std::string m_name
the spreadsheet name
Definition: MsWksSSParser.cxx:123
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:438
@ 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
Spreadsheet()
constructor
Definition: MsWksSSParser.cxx:98
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
virtual ~MsWksSSParser()
destructor
Definition: MsWksSSParser.cxx:230
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
virtual ~SubDocument()
destructor
Definition: MsWksSSParser.cxx:168
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:255
shared_ptr< MsWksDocument > m_document
the actual zone
Definition: MsWksSSParser.hxx:123
MWAWVec2i getRightBottomPosition() const
returns the last Right Bottom cell position
Definition: MsWksSSParser.cxx:126
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWksSSParser.cxx:344
@ 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
std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: MsWksSSParser.cxx:85
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
@ F_UNKNOWN
Definition: MWAWCell.hxx:56
SubDocument(MsWksSSParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: MsWksSSParser.cxx:164
@ C_NONE
Definition: MWAWCell.hxx:390
the class to store a color
Definition: libmwaw_internal.hxx:182
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: MsWksSSParser.cxx:85
std::vector< Cell > m_cells
the list of not empty cells
Definition: MsWksSSParser.cxx:117
int version() const
returns the works version
Definition: MWAWParser.hxx:108
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
the spreadsheet of a of a MsWksSSParser
Definition: MsWksSSParser.cxx:95
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: MsWksSSParser.cxx:186
int m_noteId
the note id
Definition: MsWksSSParser.cxx:81
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:216
@ Simple
Definition: MWAWFont.hxx:49
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: MWAWOLEParser.hxx:86
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:140
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
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
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:232
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
@ Date
Definition: libmwaw_internal.hxx:371
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
Internal: the subdocument of a MsWksSSParser.
Definition: MsWksSSParser.cxx:162
MWAWCellContent m_content
the cell content
Definition: MsWksSSParser.cxx:78
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
SubDocumentType
Definition: libmwaw_internal.hxx:178
void setProtected(bool fl)
sets the cell's protected flag
Definition: MWAWCell.hxx:244
virtual ~Cell()
destructor
Definition: MsWksSSParser.cxx:139
@ 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
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
a border
Definition: libmwaw_internal.hxx:314
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
double m_value
the cell value
Definition: MWAWCell.hxx:434
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
int m_numPages
the number of page of the final document
Definition: MsWksSSParser.cxx:153
small class use to define a sheet cell content
Definition: MWAWCell.hxx:356
bool createZones()
finds the different objects zones
Definition: MsWksSSParser.cxx:370
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
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: MsWksSSParser.cxx:202
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MsWksSSParser.cxx:1200
bool isFontSet() const
returns true if the font has been set
Definition: MWAWCell.hxx:222
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
a field
Definition: libmwaw_internal.hxx:369
@ PageNumber
Definition: libmwaw_internal.hxx:371
the main class to read a Microsoft Works spreadsheet file
Definition: MsWksSSParser.hxx:66
std::vector< float > convertInPoint(std::vector< int > const &list, float defSize) const
convert the m_widthCols in a vector of of point size
Definition: MsWksSSParser.cxx:100
std::vector< int > m_listPageBreaks
the list of page break
Definition: MsWksSSParser.cxx:119
a cell of a MsWksSSParser
Definition: MsWksSSParser.cxx:62
@ C_FORMULA
Definition: MWAWCell.hxx:390
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void setSpreadsheetListener(MWAWSpreadsheetListenerPtr &listener)
sets the spreadsheet listener
Definition: MWAWParser.cxx:135
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: MsWksSSParser.cxx:173
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
bool readSSheetZone()
try to read the spreadsheet data zone
Definition: MsWksSSParser.cxx:435
@ F_NUMBER
Definition: MWAWCell.hxx:56
@ F_TIME
Definition: MWAWCell.hxx:56
Internal: the structures of a MsWksSSParser.
Definition: MsWksSSParser.cxx:59
@ italicBit
Definition: MWAWFont.hxx:182
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MsWksSSParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MsWksSSParser.cxx:216
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
@ C_TEXT
Definition: MWAWCell.hxx:390
Spreadsheet m_spreadsheet
the spreadsheet
Definition: MsWksSSParser.cxx:152
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
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
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
@ Z_MAIN
Definition: MsWksDocument.hxx:78
bool readEndHeader()
reads the end of the header
bool isEmpty() const
returns true if the cell do contain any content
Definition: MsWksSSParser.cxx:69
std::vector< MWAWEntry > m_listZones
the list of different Zones
Definition: MsWksSSParser.hxx:120
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
State()
constructor
Definition: MsWksSSParser.cxx:147
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:399
bool sendSpreadsheet()
try to send the main spreadsheet
Definition: MsWksSSParser.cxx:1137
void init()
inits all internal variables
Definition: MsWksSSParser.cxx:234
int m_zoneId
the parser zone id
Definition: MsWksDocument.hxx:86
Cell()
constructor
Definition: MsWksSSParser.cxx:65
MWAWFont m_font
the default font
Definition: MsWksSSParser.cxx:113
@ 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
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:517
Class to store font.
Definition: MWAWFont.hxx:44
std::map< int, MWAWEntry > m_idNoteMap
a map id->note content
Definition: MsWksSSParser.cxx:121
int m_pageLength
the page length in point (if known)
Definition: MsWksSSParser.cxx:156
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
@ Title
Definition: libmwaw_internal.hxx:371
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:432
@ C_NUMBER
Definition: MWAWCell.hxx:390
shared_ptr< MsWksSSParserInternal::State > m_state
the state
Definition: MsWksSSParser.hxx:117
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
int m_id
the subdocument id
Definition: MsWksSSParser.cxx:183
@ C_UNKNOWN
Definition: MWAWCell.hxx:390
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
@ HALIGN_CENTER
Definition: MWAWCell.hxx:116
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface)
virtual function used to parse the input
Definition: MsWksSSParser.cxx:248
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Internal: the state of a MsWksSSParser.
Definition: MsWksSSParser.cxx:145
@ F_TEXT
Definition: MWAWCell.hxx:56
MWAWFont getFont() const
returns the font
Definition: MWAWCell.hxx:227
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18