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) final;
void sendNote(int id)
try to send a note
Definition: MsWksSSParser.cxx:300
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ Time
Definition: libmwaw_internal.hxx:401
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
std::vector< int > m_widthCols
the column size in pixels(?)
Definition: MsWksSSParser.cxx:130
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
int m_actPage
the actual page
Definition: MsWksSSParser.cxx:171
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:862
@ 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:148
std::string m_name
the spreadsheet name
Definition: MsWksSSParser.cxx:138
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:489
@ MWAW_K_SPREADSHEET
spreadsheet
Definition: MWAWDocument.hxx:86
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
Spreadsheet()
constructor
Definition: MsWksSSParser.cxx:105
~MsWksSSParser() final
destructor
Definition: MsWksSSParser.cxx:249
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
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:458
@ F_DATE
Definition: MWAWCell.hxx:56
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
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:281
MWAWVec2i getRightBottomPosition() const
returns the last Right Bottom cell position
Definition: MsWksSSParser.cxx:141
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWksSSParser.cxx:363
@ boldBit
Definition: MWAWFont.hxx:190
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:464
std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: MsWksSSParser.cxx:92
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
Cell & operator=(Cell &&)=default
@ F_UNKNOWN
Definition: MWAWCell.hxx:56
@ C_NONE
Definition: MWAWCell.hxx:433
the class to store a color
Definition: libmwaw_internal.hxx:192
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: MsWksSSParser.cxx:92
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:565
std::vector< Cell > m_cells
the list of not empty cells
Definition: MsWksSSParser.cxx:132
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:102
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MsWksSSParser.cxx:1215
int m_noteId
the note id
Definition: MsWksSSParser.cxx:88
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
@ 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
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
@ 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:258
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
Defines MWAWCell (cell content and format)
@ Date
Definition: libmwaw_internal.hxx:401
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MsWksSSParser.cxx:202
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
Internal: the subdocument of a MsWksSSParser.
Definition: MsWksSSParser.cxx:180
MWAWCellContent m_content
the cell content
Definition: MsWksSSParser.cxx:85
MWAWSpreadsheetListenerPtr & getSpreadsheetListener()
returns the spreadsheet listener
Definition: MWAWParser.hxx:140
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void setProtected(bool fl)
sets the cell's protected flag
Definition: MWAWCell.hxx:270
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
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MsWksSSParser.cxx:218
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
Cell & operator=(Cell const &)=default
double m_value
the cell value
Definition: MWAWCell.hxx:485
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
std::shared_ptr< MsWksSSParserInternal::State > m_state
the state
Definition: MsWksSSParser.hxx:117
int m_numPages
the number of page of the final document
Definition: MsWksSSParser.cxx:171
small class use to define a sheet cell content
Definition: MWAWCell.hxx:394
bool createZones()
finds the different objects zones
Definition: MsWksSSParser.cxx:389
Definition: libmwaw_internal.hxx:144
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
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() final
destructor
Definition: MsWksSSParser.cxx:189
std::shared_ptr< MsWksDocument > m_document
the actual zone
Definition: MsWksSSParser.hxx:123
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
SubDocument(MsWksSSParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: MsWksSSParser.cxx:182
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
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:115
std::vector< int > m_listPageBreaks
the list of page break
Definition: MsWksSSParser.cxx:134
a cell of a MsWksSSParser
Definition: MsWksSSParser.cxx:62
@ 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
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
bool readSSheetZone()
try to read the spreadsheet data zone
Definition: MsWksSSParser.cxx:454
@ F_NUMBER
Definition: MWAWCell.hxx:56
Cell(Cell const &)=default
@ F_TIME
Definition: MWAWCell.hxx:56
Internal: the structures of a MsWksSSParser.
Definition: MsWksSSParser.cxx:59
@ italicBit
Definition: MWAWFont.hxx:190
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
@ C_TEXT
Definition: MWAWCell.hxx:433
Spreadsheet m_spreadsheet
the spreadsheet
Definition: MsWksSSParser.cxx:170
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
~Cell() final
destructor
Definition: MsWksSSParser.cxx:153
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
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
@ Z_MAIN
Definition: MsWksDocument.hxx:78
bool readEndHeader()
reads the end of the header
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
bool isEmpty() const
returns true if the cell do contain any content
Definition: MsWksSSParser.cxx:76
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:161
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
virtual function used to parse the input
Definition: MsWksSSParser.cxx:267
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:450
bool sendSpreadsheet()
try to send the main spreadsheet
Definition: MsWksSSParser.cxx:1154
void init()
inits all internal variables
Definition: MsWksSSParser.cxx:253
Cell()
constructor
Definition: MsWksSSParser.cxx:65
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Definition: MWAWDocument.hxx:57
MWAWFont m_font
the default font
Definition: MsWksSSParser.cxx:128
@ 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
std::map< int, MWAWEntry > m_idNoteMap
a map id->note content
Definition: MsWksSSParser.cxx:136
int m_pageLength
the page length in point (if known)
Definition: MsWksSSParser.cxx:174
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
@ Title
Definition: libmwaw_internal.hxx:401
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
int m_id
the subdocument id
Definition: MsWksSSParser.cxx:199
MsWksSSParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MsWksSSParser.cxx:232
@ C_UNKNOWN
Definition: MWAWCell.hxx:433
@ HALIGN_CENTER
Definition: MWAWCell.hxx:128
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Internal: the state of a MsWksSSParser.
Definition: MsWksSSParser.cxx:159
@ F_TEXT
Definition: MWAWCell.hxx:56
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20