Go to the documentation of this file.
27 #include <librevenge-stream/librevenge-stream.h>
83 char const *password=
nullptr);
87 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
95 Link() : m_name(), m_linkName()
157 bool createListener(librevenge::RVNGSpreadsheetInterface *interface);
167 bool checkHeader(std::shared_ptr<WPSStream> stream,
bool mainStream,
bool strict);
169 bool readZones(std::shared_ptr<WPSStream> stream);
173 bool readZone(std::shared_ptr<WPSStream> &stream);
175 bool readZone1(std::shared_ptr<WPSStream> stream);
179 static bool readZone4(std::shared_ptr<WPSStream> stream);
181 static bool readChartZone(std::shared_ptr<WPSStream> stream);
183 static bool readRefZone(std::shared_ptr<WPSStream> stream);
185 static bool readZone7(std::shared_ptr<WPSStream> stream);
187 bool readZone8(std::shared_ptr<WPSStream> stream);
191 static bool readZoneV3(std::shared_ptr<WPSStream> stream);
211 std::shared_ptr<LotusParserInternal::State>
m_state;
int m_maxSheet
the last sheet number
Definition: Lotus.cpp:208
std::vector< unsigned long > m_zone1Stack
a unknown Zone1 stack of increasing(?) numbers
Definition: Lotus.cpp:222
Link()
constructor
Definition: Lotus.h:95
bool hasGraphics(int sheetId) const
return true if the sheet sheetId has some graphic
Definition: Lotus.cpp:303
friend class LotusStyleManager
Definition: Lotus.h:78
librevenge::RVNGString m_linkName
the link name
Definition: Lotus.h:103
bool m_isMacFile
flag to know if this is a mac file
Definition: Lotus.cpp:200
static std::string str()
Definition: WPSDebug.h:200
static bool open(std::string const &)
Definition: WPSDebug.h:215
WPSPageSpan m_pageSpan
the actual document size
Definition: Lotus.cpp:206
static void addPos(long)
Definition: WPSDebug.h:220
This class parses Microsoft Works chart file.
Definition: LotusChart.h:54
bool readLinkZone(std::shared_ptr< WPSStream > stream)
reads a link
Definition: Lotus.cpp:3115
bool encodeLotusPassword(char const *password, uint16_t &key, std::vector< uint8_t > &keys, uint8_t const(&defValues)[16])
returns the checksum and the keys (to encode a lotus file) given a password file
Definition: libwps_internal.cpp:977
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition: Lotus.cpp:318
std::shared_ptr< LotusChart > m_chartParser
the chart manager
Definition: Lotus.h:216
bool m_isEncrypted
true if the file is encrypted
Definition: Lotus.cpp:232
std::map< int, int > getDataZoneIdToSheetIdMap() const
returns a map dataZoneId to sheet final id
Definition: Lotus.cpp:142
bool readZone(std::shared_ptr< WPSStream > &stream)
reads a zone
Definition: Lotus.cpp:649
bool readMacFontName(std::shared_ptr< WPSStream > stream, long endPos)
reads a mac font name
Definition: Lotus.cpp:2948
bool createZones()
try to parse the different zones
Definition: Lotus.cpp:514
bool updateEmbeddedObject(int id, WPSEmbeddedObject &object) const
try to retrieve the content of a graphic, knowing it local id
Definition: Lotus.cpp:328
Definition: libwps_internal.cpp:39
small structure use to store a stream and it debug file
Definition: WPSStream.h:30
bool readSheetZone(std::shared_ptr< WPSStream > stream)
reads a zone of type 2: 123 files
Definition: Lotus.cpp:1973
bool parseFormatStream()
check for the existence of a format stream, if it exists, parse it
Definition: Lotus.cpp:553
void getLevels(WPSVec3i &minC, WPSVec3i &maxC) const
returns the min and max cell
Definition: Lotus.cpp:127
bool readZone1(std::shared_ptr< WPSStream > stream)
reads a zone of type 1: 123 files
Definition: Lotus.cpp:1789
friend class LotusSpreadsheet
Definition: Lotus.h:77
int m_actualZoneId
the actual zone id
Definition: Lotus.cpp:210
WPSVec3i m_cells[2]
the cell positions
Definition: Lotus.h:101
bool readDocumentInfoMac(std::shared_ptr< WPSStream > stream, long endPos)
reads a mac document info zone: zone 1b, then 2af8
Definition: Lotus.cpp:3232
static void reset()
Definition: WPSDebug.h:224
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
called by WPSDocument to parse the file
Definition: Lotus.cpp:343
This class parses the Lotus style.
Definition: LotusStyleManager.h:48
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Lotus.cpp:273
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:3366
std::map< int, int > m_dataZoneIdToSheetZoneIdMap
a map to retrieve the sheet zone id from the data sheet zone id
Definition: Lotus.cpp:216
the font of a LotusParser
Definition: Lotus.cpp:64
define the font properties
Definition: WPSFont.h:37
std::shared_ptr< LotusSpreadsheet > m_spreadsheetParser
the spreadsheet manager
Definition: Lotus.h:220
static bool readZone7(std::shared_ptr< WPSStream > stream)
reads a zone of type 7: 123 files
Definition: Lotus.cpp:2642
std::vector< Vec2i > m_actualLevels
the actual zone: (0,0), table list, col list, row list
Definition: Lotus.cpp:220
std::string m_name
the basic name(used to retrieve a data)
Definition: Lotus.h:99
WPSFont getDefaultFont() const
returns a default font (Courier12) with file's version to define the default encoding */
Definition: Lotus.cpp:116
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
Font(libwps_tools_win::Font::Type type)
constructor
Definition: Lotus.cpp:66
friend class LotusGraph
Definition: Lotus.h:76
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: Lotus.cpp:427
internal class used to create a RVNGInputStream from a unsigned char's pointer
Definition: WPSStringStream.h:42
State(State const &)=delete
std::string getZone1StackDebugName() const
returns a name corresponding to the zone1 stack(for debugging)
Definition: Lotus.cpp:184
static bool readVersionZone(std::shared_ptr< WPSStream > stream)
reads a zone of type a: 123 files
Definition: Lotus.cpp:2910
std::vector< Link > getLinksList(int lId) const
returns a list of links corresponding to an id
Definition: Lotus.cpp:291
RVNGInputStreamPtr & getInput()
Definition: WKSParser.h:41
Definition: libwps_internal.h:152
Definition: libwps_internal.h:157
std::shared_ptr< LotusGraph > m_graphParser
the graph manager
Definition: Lotus.h:218
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
This class parses a wk3,wk4,123 Lotus spreadsheet.
Definition: Lotus.h:73
int version() const
return the file version
Definition: Lotus.cpp:265
State operator=(State const &)=delete
int m_actualZoneParentId
the actual zone parent id
Definition: Lotus.cpp:212
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
a class used to parse a container which is used by Lotus123 (and also by RagTime).
Definition: WPSOLE1Parser.h:50
State(libwps_tools_win::Font::Type fontType, char const *password)
constructor
Definition: Lotus.cpp:83
bool m_inMainContentBlock
a flag used to know if we are in the main block or no
Definition: Lotus.cpp:202
std::shared_ptr< LotusParserInternal::State > m_state
the listener (if set)
Definition: Lotus.h:212
bool readDataZone(std::shared_ptr< WPSStream > stream)
parse the different zones 1B
Definition: Lotus.cpp:1332
a structure used to define a picture style
Definition: WPSGraphicStyle.h:38
libwps_tools_win::Font::Type getDefaultFontType() const
return the default font style
Definition: Lotus.cpp:108
static bool readRefZone(std::shared_ptr< WPSStream > stream)
reads a zone of type 6: 123 files
Definition: Lotus.cpp:2556
bool readDouble4(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 4 bytes: mantisse 2.5 bytes, exponent 1.5 bytes
Definition: libwps_internal.cpp:90
static void addNote(char const *)
Definition: WPSDebug.h:221
@ WPS_SPREADSHEET
Definition: WPSDocument.h:62
std::multimap< int, LotusParser::Link > m_linkIdToLinkMap
a multimap link id to link zone
Definition: Lotus.cpp:218
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
double m_size
font size
Definition: WPSFont.h:85
small class use to define a embedded object
Definition: libwps_internal.h:1077
bool getLeftTopPosition(Vec2i const &cell, int spreadsheet, Vec2f &pos) const
returns the left top position of a cell
Definition: Lotus.cpp:313
std::map< int, Font > m_fontsMap
the fonts map
Definition: Lotus.cpp:204
the state of LotusParser
Definition: Lotus.cpp:81
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
Font(Font const &)=default
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: Lotus.cpp:278
bool readZone8(std::shared_ptr< WPSStream > stream)
reads a zone of type 8: 123 files
Definition: Lotus.cpp:2768
Definition: WPSDebug.h:192
std::shared_ptr< WKSContentListener > m_listener
Definition: Lotus.h:210
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
libwps_tools_win::Font::Type m_fontType
the user font type
Definition: Lotus.cpp:196
std::shared_ptr< LotusStyleManager > m_styleManager
the style manager
Definition: Lotus.h:214
std::vector< int > m_sheetZoneIdList
the list of sheet main zone id
Definition: Lotus.cpp:214
friend class LotusChart
Definition: Lotus.h:75
void sendGraphics(int sheetId)
send the graphics corresponding to a sheetId
Definition: Lotus.cpp:308
WPSVec3< int > WPSVec3i
WPSVec3 of int.
Definition: libwps_internal.h:1067
Definition: WPSPageSpan.h:39
bool readData(RVNGInputStreamPtr &input, unsigned long size, librevenge::RVNGBinaryData &data)
try to read sz bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:332
LotusParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN, char const *password=nullptr)
constructor
Definition: Lotus.cpp:243
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
@ WPS_LOTUS
Lotus DOS(wk1), Apple(Lotus 123 v1), Windows(wk3,wk4,123) spreadsheets.
Definition: WPSDocument.h:49
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:40
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
std::shared_ptr< WPSOLE1Parser > m_ole1Parser
the ole1 parser
Definition: Lotus.h:222
bool m_isDecoded
true if the main stream has been decoded
Definition: Lotus.cpp:234
bool sendChart(int cId, WPSPosition const &pos, WPSGraphicStyle const &style)
try to send a chart
Definition: Lotus.cpp:323
This class parses Microsoft Works spreadsheet file.
Definition: LotusSpreadsheet.h:53
static bool readZone4(std::shared_ptr< WPSStream > stream)
reads a zone of type 4: 123 files
Definition: Lotus.cpp:2272
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:3304
Internal: namespace to define internal class of LotusParser.
Definition: Lotus.cpp:61
~LotusParser() final
destructor
Definition: Lotus.cpp:261
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
libwps::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: WKSParser.h:63
int m_version
the file version
Definition: Lotus.cpp:198
This class parses Microsoft Works graph file.
Definition: LotusGraph.h:56
WPSBox2< int > WPSBox2i
WPSBox2 of int.
Definition: libwps_internal.h:888
static bool readZoneV3(std::shared_ptr< WPSStream > stream)
parse a wk123 zone
Definition: Lotus.cpp:1765
std::vector< bool > m_sheetSubZoneOpened
some sheet sub zones (SheetZone)
Definition: Lotus.cpp:224
static bool readChartZone(std::shared_ptr< WPSStream > stream)
reads a zone of type 5: 123 files
Definition: Lotus.cpp:2456
std::string getLevelsDebugName() const
returns a name corresponding to the actual level(for debugging)
Definition: Lotus.cpp:160
Definition: WKSContentListener.h:54
Definition: WPSOLEStream.h:34
RVNGInputStreamPtr getFileInput()
Definition: WKSParser.cpp:44
bool createListener(librevenge::RVNGSpreadsheetInterface *interface)
creates the main listener
Definition: Lotus.cpp:408
Definition: WPSDebug.h:208
bool readZones(std::shared_ptr< WPSStream > stream)
finds the different zones (spreadsheet, chart, print, ...)
Definition: Lotus.cpp:577
char const * m_password
the password (if known)
Definition: Lotus.cpp:230
librevenge::RVNGPropertyList m_metaData
the metadata
Definition: Lotus.cpp:227
basic struct used to store link
Definition: Lotus.h:93
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
static void setStream(RVNGInputStreamPtr)
Definition: WPSDebug.h:212
static bool readFMTStyleName(std::shared_ptr< WPSStream > stream)
reads a format style name: b6
Definition: Lotus.cpp:3068
friend class LotusParserInternal::SubDocument
Definition: Lotus.h:74
Definition: WKSParser.h:34
Generated on Sat Sep 5 2020 04:52:14 for libwps by
doxygen 1.8.19