27#include <librevenge-stream/librevenge-stream.h>
82 char const *password=
nullptr);
86 void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final;
160 bool createListener(librevenge::RVNGSpreadsheetInterface *interface);
170 bool checkHeader(std::shared_ptr<WPSStream> stream,
bool mainStream,
bool strict);
172 bool readZones(std::shared_ptr<WPSStream> stream);
176 bool readZone(std::shared_ptr<WPSStream> &stream);
178 bool readZone1(std::shared_ptr<WPSStream> stream);
182 bool readZone4(std::shared_ptr<WPSStream> stream);
186 bool readRefZone(std::shared_ptr<WPSStream> stream);
188 static bool readZone7(std::shared_ptr<WPSStream> stream);
190 bool readZone8(std::shared_ptr<WPSStream> stream);
194 static bool readZoneV3(std::shared_ptr<WPSStream> stream);
198 bool readSheetSize(std::shared_ptr<WPSStream> stream,
long endPos,
int &row,
int &col,
int &sheet);
216 std::shared_ptr<LotusParserInternal::State>
m_state;
This class parses Microsoft Works chart file.
Definition LotusChart.h:54
This class parses Microsoft Works graph file.
Definition LotusGraph.h:56
friend class LotusChart
Definition Lotus.h:75
friend class LotusSpreadsheet
Definition Lotus.h:77
bool readZones(std::shared_ptr< WPSStream > stream)
finds the different zones (spreadsheet, chart, print, ...)
Definition Lotus.cpp:544
bool readSheetSize(std::shared_ptr< WPSStream > stream, long endPos, int &row, int &col, int &sheet)
reads a basic sheet size : mainly for debugging
Definition Lotus.cpp:2992
std::shared_ptr< LotusStyleManager > m_styleManager
the style manager
Definition Lotus.h:218
bool updateEmbeddedObject(int id, WPSEmbeddedObject &object) const
try to retrieve the content of a graphic, knowing it local id
Definition Lotus.cpp:292
bool readZone(std::shared_ptr< WPSStream > &stream)
reads a zone
Definition Lotus.cpp:616
bool readLinkZone(std::shared_ptr< WPSStream > stream)
reads a link
Definition Lotus.cpp:3161
std::shared_ptr< LotusGraph > m_graphParser
the graph manager
Definition Lotus.h:222
bool readChartZone(std::shared_ptr< WPSStream > stream)
reads a zone of type 5: 123 files
Definition Lotus.cpp:2500
~LotusParser() final
destructor
Definition Lotus.cpp:237
std::shared_ptr< LotusSpreadsheet > m_spreadsheetParser
the spreadsheet manager
Definition Lotus.h:224
bool getLeftTopPosition(Vec2i const &cell, int spreadsheet, Vec2f &pos) const
returns the left top position of a cell
Definition Lotus.cpp:277
bool readMacFontName(std::shared_ptr< WPSStream > stream, long endPos)
reads a mac font name
Definition Lotus.cpp:3009
bool readZone8(std::shared_ptr< WPSStream > stream)
reads a zone of type 8: 123 files
Definition Lotus.cpp:2812
std::vector< uint32_t > getUnicodeVectorForLMBCS(std::string const &text) const
returns the unicode list corresponding to a LMBCS sequence
Definition Lotus.cpp:3534
std::string getDebugStringForLMBCS(std::string const &text) const
small debug function used to print text with format sequence
Definition Lotus.cpp:3712
void sendGraphics(int sheetId)
send the graphics corresponding to a sheetId
Definition Lotus.cpp:272
std::shared_ptr< WPSOLE1Parser > m_ole1Parser
the ole1 parser
Definition Lotus.h:226
LotusParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, char const *password=nullptr)
constructor
Definition Lotus.cpp:220
static RVNGInputStreamPtr decodeStream(RVNGInputStreamPtr input, long endPos, std::vector< uint8_t > const &key)
try to decode a stream, if successful, replace the stream'input by the new one
Definition Lotus.cpp:3790
static std::vector< uint8_t > retrievePasswordKeys(std::vector< uint8_t > const &fileKeys)
try to guess a password knowing its file keys. Returns the keys if it founds a valid password
Definition Lotus.cpp:3852
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition Lotus.cpp:391
librevenge::RVNGString getStringForLMBCS(std::string const &text) const
returns the string corresponding to a LMBCS sequence
Definition Lotus.cpp:3508
bool readSheetZone(std::shared_ptr< WPSStream > stream)
reads a zone of type 2: 123 files
Definition Lotus.cpp:2017
bool parseFormatStream()
check for the existence of a format stream, if it exists, parse it
Definition Lotus.cpp:520
static bool readZoneV3(std::shared_ptr< WPSStream > stream)
parse a wk123 zone
Definition Lotus.cpp:1809
static bool readVersionZone(std::shared_ptr< WPSStream > stream)
reads a zone of type a: 123 files
Definition Lotus.cpp:2954
bool readZone1(std::shared_ptr< WPSStream > stream)
reads a zone of type 1: 123 files
Definition Lotus.cpp:1833
bool createZones()
try to parse the different zones
Definition Lotus.cpp:478
bool sendChart(int cId, WPSPosition const &pos, WPSGraphicStyle const &style)
try to send a chart
Definition Lotus.cpp:287
std::shared_ptr< LotusParserInternal::State > m_state
the listener (if set)
Definition Lotus.h:216
Link const * getLink(std::string const &lId) const
returns a link corresponding to an id or nullptr
Definition Lotus.cpp:261
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition Lotus.cpp:282
friend class LotusParserInternal::SubDocument
Definition Lotus.h:74
static bool readZone7(std::shared_ptr< WPSStream > stream)
reads a zone of type 7: 123 files
Definition Lotus.cpp:2686
std::shared_ptr< LotusChart > m_chartParser
the chart manager
Definition Lotus.h:220
bool readRefZone(std::shared_ptr< WPSStream > stream)
reads a zone of type 6: 123 files
Definition Lotus.cpp:2600
bool readDocumentInfoMac(std::shared_ptr< WPSStream > stream, long endPos)
reads a mac document info zone: zone 1b, then 2af8
Definition Lotus.cpp:3264
bool readExtFormats(std::shared_ptr< WPSStream > stream)
parse the extended formats zones 1B
Definition Lotus.cpp:1376
friend class LotusGraph
Definition Lotus.h:76
bool readZone4(std::shared_ptr< WPSStream > stream)
reads a zone of type 4: 123 files
Definition Lotus.cpp:2316
int version() const
return the file version
Definition Lotus.cpp:241
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
called by WPSDocument to parse the file
Definition Lotus.cpp:307
bool readFMTStyleName(std::shared_ptr< WPSStream > stream)
reads a format style name: b6
Definition Lotus.cpp:3114
std::shared_ptr< WKSContentListener > m_listener
Definition Lotus.h:214
bool createListener(librevenge::RVNGSpreadsheetInterface *interface)
creates the main listener
Definition Lotus.cpp:372
bool hasGraphics(int sheetId) const
return true if the sheet sheetId has some graphic
Definition Lotus.cpp:267
bool getFont(int id, WPSFont &font) const
returns the font corresponding to an id
Definition Lotus.cpp:249
void sendText(RVNGInputStreamPtr &input, WPSEntry const &entry) const
try to send a LBMCS text
Definition Lotus.cpp:3336
friend class LotusStyleManager
Definition Lotus.h:78
This class parses Microsoft Works spreadsheet file.
Definition LotusSpreadsheet.h:53
This class parses the Lotus style.
Definition LotusStyleManager.h:51
WKSParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header)
Definition WKSParser.cpp:30
basic class to store an entry in a file This contained :
Definition WPSEntry.h:39
define the font properties
Definition WPSFont.h:37
a structure used to define a picture style
Definition WPSGraphicStyle.h:38
a class used to parse a container which is used by Lotus123 (and also by RagTime).
Definition WPSOLE1Parser.h:50
Class to define the position of an object (textbox, picture, ..) in the document.
Definition WPSPosition.h:40
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition libwps_internal.h:109
Vec2< int > Vec2i
Vec2 of int.
Definition libwps_internal.h:702
Vec2< float > Vec2f
Vec2 of float.
Definition libwps_internal.h:704
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition libwps_internal.h:87
WPSVec3< int > WPSVec3i
WPSVec3 of int.
Definition libwps_internal.h:1067
Internal: namespace to define internal class of LotusParser.
Definition Lotus.cpp:62
the state of LotusParser
Definition Lotus.cpp:65
basic struct used to store link
Definition Lotus.h:92
Link()
constructor
Definition Lotus.h:94
WPSVec3i m_cells[2]
the cell positions
Definition Lotus.h:98
std::string m_linkName
the link name
Definition Lotus.h:100
small class use to define a embedded object
Definition libwps_internal.h:1077