Go to the documentation of this file.
38 #ifndef MULTIPLAN_PARSER
39 # define MULTIPLAN_PARSER
73 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
@ F_CellList
Definition: MWAWCell.hxx:398
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
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
bool readHeaderFooter()
read the header/footer strings, ...
Definition: MultiplanParser.cxx:269
virtual class which defines the ancestor of all spreadsheet zone parser
Definition: MWAWParser.hxx:283
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
@ MWAW_T_MICROSOFTMULTIPLAN
Microsoft Multiplan: v1.11.
Definition: MWAWDocument.hxx:131
@ F_BOOLEAN
Definition: MWAWCell.hxx:56
bool readFormula(MWAWVec2i const &cellPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, long endPos, std::string &extra)
try to read a formula
Definition: MultiplanParser.cxx:1069
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:489
std::set< int > m_posToSharedDataSeen
a set a shared data already seen
Definition: MultiplanParser.cxx:95
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
static Functions const s_listOperators[]
Definition: MultiplanParser.cxx:992
@ MWAW_K_SPREADSHEET
spreadsheet
Definition: MWAWDocument.hxx:86
std::map< int, MWAWCellContent::FormulaInstruction > m_posToLinkMap
the list of link instruction
Definition: MultiplanParser.cxx:91
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
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
std::vector< float > getColumnsWidth() const
returns the column width in point
Definition: MultiplanParser.cxx:98
bool readZone1(MWAWEntry const &entry)
read an unknown zone: two blocks of 60 bytes
Definition: MultiplanParser.cxx:488
std::shared_ptr< MultiplanParserInternal::State > m_state
the state
Definition: MultiplanParser.hxx:127
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
Internal: the subdocument of a MultiplanParserInternal.
Definition: MultiplanParser.cxx:122
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:281
@ F_Operator
Definition: MWAWCell.hxx:398
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
small class use to define a formula instruction
Definition: MWAWCell.hxx:397
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
bool readZonesList()
read the spreadsheet zone list
Definition: MultiplanParser.cxx:404
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
@ F_Function
Definition: MWAWCell.hxx:398
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:242
void resetSpreadsheetListener()
resets the listener
Definition: MWAWParser.cxx:152
bool readZoneB()
read an unknown zone
Definition: MultiplanParser.cxx:856
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
char const * m_name
Definition: MultiplanParser.cxx:988
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MultiplanParser.cxx:156
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: MWAWCell.hxx:417
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:258
librevenge::RVNGString m_fileName
the file name (if not empty)
Definition: MWAWCell.hxx:429
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
bool sendCell(MWAWVec2i const &cellPos, int pos)
try to send a cell
Definition: MultiplanParser.cxx:1449
bool readPrinterInfo()
read the printer information
Definition: MultiplanParser.cxx:295
Defines MWAWCell (cell content and format)
State()
constructor
Definition: MultiplanParser.cxx:63
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
@ F_Text
Definition: MWAWCell.hxx:398
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
Internal: the structures of a MultiplanParser.
Definition: MultiplanParser.cxx:58
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
MWAWListenerPtr getMainListener()
returns the main listener
Definition: MWAWParser.cxx:120
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
void createDocument(librevenge::RVNGSpreadsheetInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MultiplanParser.cxx:213
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 checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MultiplanParser.cxx:1363
Type m_type
the type
Definition: MWAWCell.hxx:415
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool readDouble(double &value)
try to read a double value
Definition: MultiplanParser.cxx:946
bool readZoneC()
read an unknown zone
Definition: MultiplanParser.cxx:906
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
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
small class use to define a sheet cell content
Definition: MWAWCell.hxx:394
Definition: libmwaw_internal.hxx:144
std::vector< std::vector< int > > m_cellPositions
the positions of each cell: a vector for each row
Definition: MultiplanParser.cxx:85
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
bool readName(int pos, MWAWCellContent::FormulaInstruction &instruction)
reads a name and returns the cell's instruction
Definition: MultiplanParser.cxx:802
bool readLinkFilename(int pos, MWAWCellContent::FormulaInstruction &instruction)
read a link filename
Definition: MultiplanParser.cxx:647
bool readCellDataPosition(MWAWEntry const &entry)
read the cell data position
Definition: MultiplanParser.cxx:516
double m_doubleValue
value ( if type==F_Double )
Definition: MWAWCell.hxx:421
std::map< int, MWAWCellContent::FormulaInstruction > m_posToNameMap
the map name's pos to name's cell instruction
Definition: MultiplanParser.cxx:93
@ 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
bool readPrinterMessage()
read the printer message
Definition: MultiplanParser.cxx:362
@ F_Cell
Definition: MWAWCell.hxx:398
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
SubDocument(MultiplanParser &parser, MWAWInputStreamPtr const &input, MWAWEntry const &entry)
Definition: MultiplanParser.cxx:124
MWAWVec2i m_maximumCell
the maximumCell
Definition: MultiplanParser.cxx:79
@ F_NUMBER
Definition: MWAWCell.hxx:56
bool readColumnsPos()
read the columns limits pos
Definition: MultiplanParser.cxx:384
MWAWEntry m_hfpEntries[3]
the header/footer/printer message entries
Definition: MultiplanParser.cxx:83
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
std::set< int > m_cellPositionsSet
the list of all position (use for checking)
Definition: MultiplanParser.cxx:87
the main class to read a Multiplan document
Definition: MultiplanParser.hxx:61
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool sendSpreadsheet()
try to send the main spreadsheet
Definition: MultiplanParser.cxx:1661
@ C_TEXT
Definition: MWAWCell.hxx:433
@ F_Double
Definition: MWAWCell.hxx:398
static char const * s_listFunctions[]
Definition: MultiplanParser.cxx:1045
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:423
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
librevenge::RVNGString m_sheet[2]
the sheet names (if not empty)
Definition: MWAWCell.hxx:427
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
#define MWAW_N_ELEMENTS(m)
Definition: libmwaw_internal.hxx:111
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
~SubDocument() final
destructor
Definition: MultiplanParser.cxx:131
Internal: the state of a MultiplanParser.
Definition: MultiplanParser.cxx:61
Defines MWAWSpreadsheetListener: the libmwaw spreadsheet processor listener.
~MultiplanParser() final
destructor
Definition: MultiplanParser.cxx:178
MWAWVec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:425
MultiplanParser & m_multiParser
the main parser
Definition: MultiplanParser.cxx:141
bool readSharedData(int pos, int cellType, MWAWVec2i const &cellPos, MWAWCellContent &content)
read a shared data
Definition: MultiplanParser.cxx:695
bool readLink(int pos, MWAWCellContent::FormulaInstruction &instruction)
read a link given a position
Definition: MultiplanParser.cxx:551
Definition: MultiplanParser.cxx:987
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
MultiplanParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MultiplanParser.cxx:169
Definition: MWAWDocument.hxx:57
std::vector< int > m_columnPositions
the columns begin position in point
Definition: MultiplanParser.cxx:81
MWAWFont m_font
the default font
Definition: MultiplanParser.cxx:77
int m_arity
Definition: MultiplanParser.cxx:989
@ 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
MWAWEntry m_entries[9]
the different main spreadsheet zones
Definition: MultiplanParser.cxx:89
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:483
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
the main parse function
Definition: MultiplanParser.cxx:185
@ C_NUMBER
Definition: MWAWCell.hxx:433
MWAWVec2< bool > MWAWVec2b
MWAWVec2 of bool.
Definition: libmwaw_internal.hxx:836
bool sendText(MWAWEntry const &entry)
try to send a text zone
Definition: MultiplanParser.cxx:1423
@ 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 parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MultiplanParser.cxx:144
bool createZones()
finds the different objects zones
Definition: MultiplanParser.cxx:245
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
@ HALIGN_CENTER
Definition: MWAWCell.hxx:128
@ F_TEXT
Definition: MWAWCell.hxx:56
MWAWFont getFont() const
returns the font
Definition: MWAWCell.hxx:253
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20