Go to the documentation of this file.
27 #include <librevenge-stream/librevenge-stream.h>
57 char const *password=
nullptr);
61 void parse(librevenge::RVNGSpreadsheetInterface *documentInterface)
final;
66 bool readCString(librevenge::RVNGString &
string,
long maxSize);
94 std::shared_ptr<WKSContentListener>
createListener(librevenge::RVNGSpreadsheetInterface *interface);
147 std::shared_ptr<WKS4ParserInternal::State>
m_state;
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: WKS4.cpp:413
bool parseFormatStream()
check for the existence of a format stream, if it exists, parse it
Definition: WKS4.cpp:538
libwps_tools_win::Font::Type getDefaultFontType() const
return the default font style
Definition: WKS4.cpp:146
std::string m_extra
public field use to add a message when the font is printed
Definition: WPSFont.h:96
#define WPS_STRIKEOUT_BIT
Definition: libwps_internal.h:507
SubDocument(RVNGInputStreamPtr const &input, WKS4Parser &pars, bool header)
constructor for a text entry
Definition: WKS4.cpp:77
static std::string str()
Definition: WPSDebug.h:200
libwps::WPSCreator m_creator
the application
Definition: WKS4.cpp:172
static bool open(std::string const &)
Definition: WPSDebug.h:215
void sendHeaderFooter(bool header)
send the header/footer
Definition: WKS4.cpp:1491
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
char const * m_password
the password (if known)
Definition: WKS4.cpp:192
std::shared_ptr< WKS4Spreadsheet > m_spreadsheetParser
the spreadsheet manager
Definition: WKS4.h:152
static void addPos(long)
Definition: WPSDebug.h:220
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
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: WKS4.cpp:1836
@ WPS_SYMPHONY
Lotus Symphony files(untested, probably DOS documents)
Definition: WPSDocument.h:52
bool readZones()
finds the different zones (spreadsheet, chart, print, ...)
Definition: WKS4.cpp:554
bool readUnknown1()
reads some unknown spreadsheet zones 0:18|0:19|0:20|0:27|0:2a
Definition: WKS4.cpp:1764
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
Definition: libwps_internal.cpp:39
librevenge::RVNGString m_footerString
the footer string
Definition: WKS4.cpp:189
bool readPrnt()
reads a printer data ?
Definition: WKS4.cpp:1551
void resetMainInput(RVNGInputStreamPtr newInput)
reset the main input
Definition: WKS4.cpp:266
bool readZone()
reads a zone
Definition: WKS4.cpp:610
Font(libwps_tools_win::Font::Type type)
constructor
Definition: WKS4.cpp:58
static void reset()
Definition: WPSDebug.h:224
void resetInput(RVNGInputStreamPtr const &newInput)
Definition: WKSParser.h:45
@ ALL
Definition: WPSPageSpan.h:44
bool readWindowRecord()
reads windows record 0:7|0:9
Definition: WKS4.cpp:1715
Internal: namespace to define internal class of WKS4Parser.
Definition: WKS4.cpp:53
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: WKS4.cpp:287
define the font properties
Definition: WPSFont.h:37
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
State & operator=(State const &)=delete
@ HEADER
Definition: WPSPageSpan.h:43
@ FOOTER
Definition: WPSPageSpan.h:43
librevenge::RVNGString m_headerString
the header string
Definition: WKS4.cpp:187
@ WPS_DATABASE
Definition: WPSDocument.h:61
int m_version
the file version
Definition: WKS4.cpp:178
internal class used to create a RVNGInputStream from a unsigned char's pointer
Definition: WPSStringStream.h:42
the font of a WKS4Parser
Definition: WKS4.cpp:56
libwps_tools_win::Font::Type m_fontType
the user font type
Definition: WKS4.cpp:176
WPSFont getDefaultFont() const
returns a default font (Courier12) with file's version to define the default encoding */
Definition: WKS4.cpp:158
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: WKS4.cpp:305
RVNGInputStreamPtr & getInput()
Definition: WKSParser.h:41
Definition: libwps_internal.h:152
Definition: libwps_internal.h:157
WPSCreator
Definition: WPSDocument.h:48
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
bool m_isSpreadsheet
boolean to know if the file is a spreadsheet file or a database file
Definition: WKS4.cpp:174
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
long m_eof
the last file position
Definition: WKS4.cpp:170
WPSColor m_color
the font color
Definition: WPSFont.h:91
the state of WKS4Parser
Definition: WKS4.cpp:123
bool checkFilePosition(long pos)
return true if the pos is in the file, update the file size if need
Definition: WKS4.cpp:274
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
SubDocumentType
Definition: libwps_internal.h:248
bool m_header
a flag to known if we need to send the header or the footer
Definition: WKS4.cpp:95
~WKS4Parser() override
destructor
Definition: WKS4.cpp:252
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:87
static void addNote(char const *)
Definition: WPSDebug.h:221
std::shared_ptr< WKS4Chart > m_chartParser
the chart manager
Definition: WKS4.h:150
State(libwps_tools_win::Font::Type fontType, char const *password)
constructor
Definition: WKS4.cpp:125
@ WPS_SPREADSHEET
Definition: WPSDocument.h:61
This class parses Microsoft Works chart file.
Definition: WKS4Chart.h:50
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
double m_size
font size
Definition: WPSFont.h:85
std::shared_ptr< WKSContentListener > createListener(librevenge::RVNGSpreadsheetInterface *interface)
creates the main listener
Definition: WKS4.cpp:388
std::shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition: libwps_internal.h:111
bool readCString(librevenge::RVNGString &string, long maxSize)
try to read a basic C string, knowing the maximum size
Definition: WKS4.cpp:1388
bool readPrn2()
reads another printer data. Seem simillar to ZZPrnt
Definition: WKS4.cpp:1602
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
Basic class used to store a spreadsheet sub document.
Definition: WKSSubDocument.h:36
Definition: WPSDebug.h:192
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
bool m_isEncrypted
true if the file is encrypted
Definition: WKS4.cpp:194
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition: WKS4.cpp:318
Definition: WPSPageSpan.h:39
void setHeaderFooter(const HeaderFooterType type, const HeaderFooterOccurrence occurrence, WPSSubDocumentPtr &subDocument)
Definition: WPSPageSpan.cpp:111
libwps::WPSCreator getCreator() const
returns the creator
Definition: WKS4.cpp:292
bool m_hasLICSCharacters
flag to know if the character
Definition: WKS4.cpp:180
std::vector< Font > m_fontsList
the fonts list
Definition: WKS4.cpp:182
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
State(State const &)=delete
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
called by WPSDocument to parse the file
Definition: WKS4.cpp:324
@ WPS_LOTUS
Lotus DOS(wk1), Apple(Lotus 123 v1), Windows(wk3,wk4,123) spreadsheets.
Definition: WPSDocument.h:49
bool readHeaderFooter(bool header)
reads the header/footer
Definition: WKS4.cpp:1503
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
bool readZoneQuattro()
reads a Quattro Pro zone
Definition: WKS4.cpp:1362
libwps_tools_win::Font::Type m_type
font encoding type
Definition: WKS4.cpp:65
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
bool readDataToEnd(RVNGInputStreamPtr &input, librevenge::RVNGBinaryData &data)
try to read the last bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:346
~SubDocument() final
destructor
Definition: WKS4.cpp:80
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
This class parses Microsoft Works spreadsheet file.
Definition: WKS4Spreadsheet.h:49
the class to store a color
Definition: libwps_internal.h:281
std::shared_ptr< WKS4ParserInternal::State > m_state
the listener (if set)
Definition: WKS4.h:148
WKS4Parser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN, char const *password=nullptr)
constructor
Definition: WKS4.cpp:242
bool m_isDecoded
true if the main stream has been decoded
Definition: WKS4.cpp:196
Font(Font const &)=default
Definition: WKSContentListener.h:54
virtual bool operator==(std::shared_ptr< WKSSubDocument > const &doc) const final
operator==
Definition: WKS4.cpp:83
libwps::WPSCreator creator() const
return the file creator
Definition: WKS4.cpp:261
int version() const
return the file version
Definition: WKS4.cpp:256
This class parses Microsoft Works spreadsheet or a database file.
Definition: WKS4.h:49
RVNGInputStreamPtr getFileInput()
Definition: WKSParser.cpp:44
@ WPS_MSWORKS
Definition: WPSDocument.h:48
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: WKS4.cpp:300
bool readFont()
reads a mswork font
Definition: WKS4.cpp:1410
WPSPageSpan m_pageSpan
the actual document size
Definition: WKS4.cpp:184
Internal: the subdocument of a WPS4Parser.
Definition: WKS4.cpp:74
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
static void setStream(RVNGInputStreamPtr)
Definition: WPSDebug.h:212
bool readFieldName()
read a list of field name + ...
Definition: WKS4.cpp:1647
std::shared_ptr< WKSContentListener > m_listener
Definition: WKS4.h:146
Definition: WKSParser.h:34
Generated on Sat Apr 4 2020 02:16:56 for libwps by
doxygen 1.8.18