Go to the documentation of this file.
28 #include <librevenge-stream/librevenge-stream.h>
63 std::string
getDebugString(std::shared_ptr<WPSStream>
const &stream)
const;
99 char const *password=
nullptr);
103 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
119 librevenge::RVNGString const &fileName) const;
~SubDocument() final
destructor
Definition: Quattro9.cpp:67
@ F_Text
Definition: WKSContentListener.h:59
bool readDocumentFields(std::shared_ptr< WPSStream > const &stream)
read a zone 406 which contains a list of fields
Definition: Quattro9.cpp:1521
libwps_tools_win::Font::Type getDefaultFontType() const
return the default font style
Definition: Quattro9.cpp:146
bool empty() const
returns true if the string is empty
Definition: Quattro9.h:54
Internal: the subdocument of a WPS4Parser.
Definition: Quattro9.cpp:60
#define WPS_STRIKEOUT_BIT
Definition: libwps_internal.h:507
static std::string str()
Definition: WPSDebug.h:200
static bool open(std::string const &)
Definition: WPSDebug.h:215
std::shared_ptr< Quattro9Spreadsheet > m_spreadsheetParser
the spreadsheet manager
Definition: Quattro9.h:208
std::vector< WPSFont > m_fontsList
the list of fonts
Definition: Quattro9.h:67
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
static void addPos(long)
Definition: WPSDebug.h:220
void setPageSpan(const int pageSpan)
Definition: WPSPageSpan.h:166
void setLength(long l)
sets the zone size
Definition: WPSEntry.h:62
const char * m_password
the password (if known)
Definition: Quattro9.cpp:167
#define WPS_SUBSCRIPT_BIT
Definition: libwps_internal.h:500
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Quattro9.cpp:422
std::shared_ptr< WKSContentListener > createListener(librevenge::RVNGSpreadsheetInterface *interface)
creates the main listener
Definition: Quattro9.cpp:581
void sendHeaderFooter(bool header)
send the header/footer
Definition: Quattro9.cpp:1740
This class parses Quattro9 Pro spreadsheet file.
Definition: Quattro9Spreadsheet.h:56
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
Definition: libwps_internal.cpp:38
librevenge::RVNGString getString(std::shared_ptr< WPSStream > const &stream, libwps_tools_win::Font::Type type=libwps_tools_win::Font::WIN3_WEUROPE) const
returns the string
Definition: Quattro9.cpp:280
~Quattro9Parser() final
destructor
Definition: Quattro9.cpp:413
#define WPS_SUPERSCRIPT_BIT
Definition: libwps_internal.h:499
static RVNGInputStreamPtr decodeStream(RVNGInputStreamPtr input, std::vector< uint8_t > const &key)
try to decode a stream, if successful, replace the stream'input by the new one
Definition: Quattro9.cpp:1808
small structure use to store a stream and it debug file
Definition: WPSStream.h:29
std::string m_extra
the extra data
Definition: Quattro9.cpp:120
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: Quattro9.cpp:70
int m_version
the file version
Definition: Quattro9.cpp:165
librevenge::RVNGPropertyList m_metaData
the meta data
Definition: Quattro9.cpp:169
static void reset()
Definition: WPSDebug.h:224
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: WPSOLEParser.h:85
#define WPS_OUTLINE_BIT
Definition: libwps_internal.h:501
This class parses Quattro Pro WP spreadsheet: .qpw.
Definition: Quattro9.h:89
#define WPS_DOUBLE_UNDERLINE_BIT
Definition: libwps_internal.h:505
define the font properties
Definition: WPSFont.h:36
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:89
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:38
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
std::map< int, int > m_posFontIdMap
the position to font map(complex text)
Definition: Quattro9.h:69
What m_type
the type
Definition: WKSContentListener.h:77
internal class used to create a RVNGInputStream from a unsigned char's pointer
Definition: WPSStringStream.h:41
bool parse(RVNGInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition: WPSOLEParser.cpp:318
a zone name
Definition: Quattro9.cpp:109
bool m_header
a flag to known if we need to send the header or the footer
Definition: Quattro9.cpp:82
bool readDocumentStrings(std::shared_ptr< WPSStream > const &stream)
read a zone 407 which contains a list of stream
Definition: Quattro9.cpp:1627
static bool readOleBOlePart(std::shared_ptr< WPSStream > stream)
try to read the BOlePart sub stream: a zone which contains 5 long
Definition: Quattro9.cpp:1784
RVNGInputStreamPtr & getInput()
Definition: WKSParser.h:41
Definition: libwps_internal.h:151
std::string flattenFileName(std::string const &name)
Definition: WPSDebug.h:185
Definition: libwps_internal.h:156
bool getExternalFileName(int fId, librevenge::RVNGString &fName) const
returns the name of the fId file
Definition: Quattro9.cpp:427
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
bool readZones()
finds the different zones in the main OLE stream (spreadsheet, chart, print, ...)
Definition: Quattro9.cpp:648
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
WPSColor m_color
the font color
Definition: WPSFont.h:91
void setBegin(long off)
sets the begin offset
Definition: WPSEntry.h:57
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
called by WPSDocument to parse the file
Definition: Quattro9.cpp:535
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
int m_actualSheet
the actual sheet id
Definition: Quattro9.cpp:181
Definition: Quattro9.h:42
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
SubDocumentType
Definition: libwps_internal.h:248
small class use to define a formula instruction
Definition: WKSContentListener.h:57
bool m_isDecoded
true if the main stream has been decoded
Definition: Quattro9.cpp:187
bool readZone(std::shared_ptr< WPSStream > &stream)
try to read a zone
Definition: Quattro9.cpp:725
std::shared_ptr< Quattro9Graph > m_graphParser
the graph manager
Definition: Quattro9.h:206
SubDocument(RVNGInputStreamPtr const &input, Quattro9Parser &pars, bool header)
constructor for a text entry
Definition: Quattro9.cpp:64
libwps_tools_win::Font::Type m_fontType
the user font type
Definition: Quattro9.cpp:163
bool m_isEncrypted
true if the file is encrypted
Definition: Quattro9.cpp:185
bool readFontStyles(std::shared_ptr< WPSStream > const &stream)
read a font style zone: zone 7
Definition: Quattro9.cpp:1336
a structure used to define a picture style
Definition: WPSGraphicStyle.h:37
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
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: Quattro9.cpp:599
static WPSFont getDefaultFont()
returns a default font with file's version */
Definition: Quattro9.cpp:153
Internal: namespace to define internal class of Quattro9Parser.
Definition: Quattro9.cpp:57
@ WPS_SPREADSHEET
Definition: WPSDocument.h:61
std::map< int, ZoneName > m_idToZoneNameMap
map zone id to zone name
Definition: Quattro9.cpp:189
static bool readFilePositions(std::shared_ptr< WPSStream > const &stream, long(&filePos)[2])
read a zone which contains two files position (prev and next): zone 2,402,602,a02
Definition: Quattro9.cpp:1689
ZoneName(char const *name, char const *extra=nullptr)
constructor
Definition: Quattro9.cpp:112
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
double m_size
font size
Definition: WPSFont.h:85
bool getPattern(int id, WPSGraphicStyle::Pattern &pattern) const
returns the pattern corresponding to a pattern id between 0 and 24
Definition: Quattro9.cpp:496
bool getField(int fId, librevenge::RVNGString &text, QuattroFormulaInternal::CellReference &ref, librevenge::RVNGString const &fileName) const
returns the text and cell of a field instruction
Definition: Quattro9.cpp:444
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: Quattro9.cpp:491
@ WPS_QUATTRO_PRO
Quattro Pro wq1,wq2, wb1,wb2,wb3, qpw spreadsheets and qpw spreadsheet.
Definition: WPSDocument.h:50
std::string m_extra
extra data
Definition: Quattro9.h:73
std::string getDebugString(std::shared_ptr< WPSStream > const &stream) const
internal: returns a debug string
Definition: Quattro9.cpp:313
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
State(libwps_tools_win::Font::Type fontType, char const *password)
constructor
Definition: Quattro9.cpp:127
std::map< int, librevenge::RVNGString > m_idToExternalFileMap
map id to filename
Definition: Quattro9.cpp:175
Basic class used to store a spreadsheet sub document.
Definition: WKSSubDocument.h:35
Definition: WPSDebug.h:191
std::pair< std::shared_ptr< WPSStream >, std::vector< TextEntry > > m_actualStrings
the actual string list
Definition: Quattro9.cpp:183
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
std::string m_name
the zone name
Definition: Quattro9.cpp:118
std::vector< librevenge::RVNGString > m_fontNamesList
the font name list
Definition: Quattro9.cpp:171
Vec2f getCellPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition: Quattro9.cpp:520
int m_flag
the flag
Definition: Quattro9.h:71
the state of Quattro9Parser
Definition: Quattro9.cpp:124
Definition: WPSPageSpan.h:38
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: WKSContentListener.h:79
bool readPString(std::shared_ptr< WPSStream > const &stream, long endPos, Quattro9ParserInternal::TextEntry &entry)
try to read a string: length[2bytes], unknow[bytes] followed by the string
Definition: Quattro9.cpp:1258
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
std::shared_ptr< WKSContentListener > m_listener
Definition: Quattro9.h:202
bool readTextStyles(std::shared_ptr< WPSStream > const &stream, long endPos, Quattro9ParserInternal::TextEntry &entry)
read a text entry style zone
Definition: Quattro9.cpp:1406
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
std::map< int, std::pair< librevenge::RVNGString, QuattroFormulaInternal::CellReference > > m_idToFieldMap
map id to field
Definition: Quattro9.cpp:179
std::shared_ptr< Quattro9ParserInternal::State > m_state
the listener (if set)
Definition: Quattro9.h:204
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
void send(std::shared_ptr< WPSStream > const &stream, WPSFont const &font, libwps_tools_win::Font::Type type, WKSContentListenerPtr &listener)
sends the text to the main listener
Definition: Quattro9.cpp:322
std::map< int, librevenge::RVNGString > m_idToExternalNameMap
map id to external name
Definition: Quattro9.cpp:177
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
static bool readOleLinkInfo(std::shared_ptr< WPSStream > stream)
try to read the link info sub stream
Definition: Quattro9.cpp:1754
a basic pattern used in a WPSGraphicStyle:
Definition: WPSGraphicStyle.h:88
the class to store a color
Definition: libwps_internal.h:280
bool readTextFontStyles(std::shared_ptr< WPSStream > const &stream, int dataSz, WPSFont &font)
read a font style in a text entry zone
Definition: Quattro9.cpp:1458
int version() const
return the file version
Definition: Quattro9.cpp:417
This class parses Quattro9Pro graph file.
Definition: Quattro9Graph.h:52
bool sendPageGraphics(int sheetId) const
send the page graphic corresponding to a sheet
Definition: Quattro9.cpp:501
#define WPS_SHADOW_BIT
Definition: libwps_internal.h:503
std::vector< WPSFont > m_fontsList
the font list
Definition: Quattro9.cpp:173
Definition: WKSContentListener.h:53
Definition: WPSOLEStream.h:33
RVNGInputStreamPtr getFileInput()
Definition: WKSParser.cpp:44
Definition: WPSDebug.h:207
void addDocumentStrings()
add the document strings to the spreadsheetParser
Definition: Quattro9.cpp:525
WPSEntry m_entry
the text entry
Definition: Quattro9.h:65
bool parseOLEStream(RVNGInputStreamPtr input, std::string const &avoid="")
try to parse the OLE stream(except the main stream)
Definition: Quattro9.cpp:675
TextEntry()
constructor
Definition: Quattro9.h:45
Quattro9Parser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN, char const *password=nullptr)
constructor
Definition: Quattro9.cpp:404
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
bool getFont(int id, WPSFont &font) const
returns the font corresponding to an id
Definition: Quattro9.cpp:509
static void setStream(RVNGInputStreamPtr)
Definition: WPSDebug.h:212
bool readFontNames(std::shared_ptr< WPSStream > const &stream)
read a font name zone: zone 6
Definition: Quattro9.cpp:1293
Definition: WKSParser.h:33
Generated on Sun Apr 5 2020 00:00:00 for libwps by
doxygen 1.8.17