Go to the documentation of this file.
27 #include <librevenge-stream/librevenge-stream.h>
63 char const *password=
nullptr);
67 void parse(
librevenge::RVNGSpreadsheetInterface *documentInterface) final;
SubDocument(RVNGInputStreamPtr const &input, QuattroParser &pars, bool header)
constructor for a text entry
Definition: Quattro.cpp:84
@ F_Text
Definition: WKSContentListener.h:59
std::string m_extra
the extra data
Definition: Quattro.cpp:140
static bool readOleBOlePart(std::shared_ptr< WPSStream > stream)
try to read the BOlePart sub stream: a zone which contains 5 long
Definition: Quattro.cpp:2649
std::shared_ptr< WKSContentListener > m_listener
Definition: Quattro.h:176
bool parseOLEStream(RVNGInputStreamPtr input, std::string const &avoid="")
try to parse the OLE stream(except the main stream)
Definition: Quattro.cpp:820
void sendHeaderFooter(bool header)
send the header/footer
Definition: Quattro.cpp:1987
#define WPS_STRIKEOUT_BIT
Definition: libwps_internal.h:507
bool readOLEZones(std::shared_ptr< WPSStream > &stream)
finds the different OLE zones: wb2
Definition: Quattro.cpp:875
static std::string str()
Definition: WPSDebug.h:200
static bool open(std::string const &)
Definition: WPSDebug.h:215
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
Vec2f getCellPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition: Quattro.cpp:571
static void addPos(long)
Definition: WPSDebug.h:220
std::shared_ptr< QuattroGraph > m_graphParser
the graph manager
Definition: Quattro.h:182
void setPageSpan(const int pageSpan)
Definition: WPSPageSpan.h:166
std::string m_name
the zone name
Definition: Quattro.cpp:138
bool readOleLinkInfo(std::shared_ptr< WPSStream > stream, librevenge::RVNGString &link)
try to read the link info sub stream
Definition: Quattro.cpp:2618
librevenge::RVNGString m_footerString
the footer string
Definition: Quattro.cpp:213
#define WPS_SUBSCRIPT_BIT
Definition: libwps_internal.h:500
std::vector< Font > m_fontsList
the font list
Definition: Quattro.cpp:198
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
State(libwps_tools_win::Font::Type fontType, char const *password)
constructor
Definition: Quattro.cpp:147
Definition: libwps_internal.cpp:39
RVNGInputStreamPtr getOLEInputStream(RVNGInputStreamPtr input)
Definition: WPSOLEStream.cpp:1881
ZoneName(char const *name, char const *extra=nullptr)
constructor
Definition: Quattro.cpp:132
std::map< int, librevenge::RVNGString > m_idToExternalFileMap
map id to filename
Definition: Quattro.cpp:202
bool m_readingZone341
true if zone 341 is being read. Avoids recursion.
Definition: Quattro.cpp:223
#define WPS_SUPERSCRIPT_BIT
Definition: libwps_internal.h:499
small structure use to store a stream and it debug file
Definition: WPSStream.h:30
~SubDocument() final
destructor
Definition: Quattro.cpp:87
Font(libwps_tools_win::Font::Type type)
constructor
Definition: Quattro.cpp:65
the state of QuattroParser
Definition: Quattro.cpp:145
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: Quattro.cpp:90
bool m_isEncrypted
true if the file is encrypted
Definition: Quattro.cpp:217
libwps_tools_win::Font::Type m_fontType
the user font type
Definition: Quattro.cpp:190
static void reset()
Definition: WPSDebug.h:224
bool readFontDef(std::shared_ptr< WPSStream > stream)
read a font: zone cf, fc and 110
Definition: Quattro.cpp:1842
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: WPSOLEParser.h:86
static void skipZone(long, long)
Definition: WPSDebug.h:226
@ ALL
Definition: WPSPageSpan.h:44
bool readQueryCommand(std::shared_ptr< WPSStream > stream)
read the table query command zone: 12f
Definition: Quattro.cpp:2160
#define WPS_OUTLINE_BIT
Definition: libwps_internal.h:501
librevenge::RVNGString m_headerString
the header string
Definition: Quattro.cpp:211
#define WPS_DOUBLE_UNDERLINE_BIT
Definition: libwps_internal.h:505
define the font properties
Definition: WPSFont.h:37
bool readFieldName(std::shared_ptr< WPSStream > stream)
read a list of field name + ...: zone b
Definition: Quattro.cpp:1721
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
@ HEADER
Definition: WPSPageSpan.h:43
@ FOOTER
Definition: WPSPageSpan.h:43
libwps_tools_win::Font::Type getDefaultFontType() const
return the default font style
Definition: Quattro.cpp:170
std::shared_ptr< QuattroParserInternal::State > m_state
the listener (if set)
Definition: Quattro.h:178
bool getExternalFileName(int fId, librevenge::RVNGString &fName) const
returns the name of the fId file
Definition: Quattro.cpp:495
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:42
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: Quattro.cpp:576
bool parse(RVNGInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition: WPSOLEParser.cpp:318
char const * m_password
the password (if known)
Definition: Quattro.cpp:215
RVNGInputStreamPtr & getInput()
Definition: WKSParser.h:41
Definition: libwps_internal.h:152
std::string flattenFileName(std::string const &name)
Definition: WPSDebug.h:185
Definition: libwps_internal.h:157
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
This class parses Quattro Pro spreadsheet file.
Definition: QuattroSpreadsheet.h:52
int m_actualSheet
the actual sheet
Definition: Quattro.cpp:196
void parse(librevenge::RVNGSpreadsheetInterface *documentInterface) final
called by WPSDocument to parse the file
Definition: Quattro.cpp:595
QuattroParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN, char const *password=nullptr)
constructor
Definition: Quattro.cpp:470
bool sendPageGraphics(int sheetId) const
send the page graphic corresponding to a sheet
Definition: Quattro.cpp:556
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:58
bool readZone(std::shared_ptr< WPSStream > &stream)
try to read a zone
Definition: Quattro.cpp:968
bool readCString(std::shared_ptr< WPSStream > stream, librevenge::RVNGString &string, long maxSize)
try to read a basic C string, knowing the maximum size
Definition: Quattro.cpp:1699
std::map< int, librevenge::RVNGString > m_idToExternalNameMap
map id to external name
Definition: Quattro.cpp:204
int version() const
return the file version
Definition: Quattro.cpp:485
State & operator=(State const &)=delete
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
@ WPS_SPREADSHEET
Definition: WPSDocument.h:62
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
double m_size
font size
Definition: WPSFont.h:85
std::shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition: libwps_internal.h:111
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: Quattro.cpp:507
bool readDouble8(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 8 bytes: mantisse 6.5 bytes, exponent 1.5 bytes
Definition: libwps_internal.cpp:173
Internal: namespace to define internal class of QuattroParser.
Definition: Quattro.cpp:60
@ WPS_QUATTRO_PRO
Quattro Pro wq1,wq2, wb1,wb2,wb3, qpw spreadsheets and qpw spreadsheet.
Definition: WPSDocument.h:50
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
This class parses QuattroPro graph file.
Definition: QuattroGraph.h:56
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
~QuattroParser() final
destructor
Definition: Quattro.cpp:481
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: Quattro.cpp:673
bool sendGraphics(int sheetId, Vec2i const &cell) const
send the graphic corresponding to a cell
Definition: Quattro.cpp:561
static bool readSerieExtension(std::shared_ptr< WPSStream > stream)
read the serie extension zone: 2dc
Definition: Quattro.cpp:2480
std::map< int, ZoneName > m_idToZoneNameMap
map zone id to zone name
Definition: Quattro.cpp:221
This class parses Quattro Pro spreadsheet: .wb1, ..., .wb3.
Definition: Quattro.h:54
bool readPaneAttribute(std::shared_ptr< WPSStream > stream)
read the pane attribute: d1
Definition: Quattro.cpp:2373
Definition: WPSPageSpan.h:39
bool readZone341(std::shared_ptr< WPSStream > stream)
reads a big zone(chart?) which contains sub zones: 341
Definition: Quattro.cpp:2550
void setHeaderFooter(const HeaderFooterType type, const HeaderFooterOccurrence occurrence, WPSSubDocumentPtr &subDocument)
Definition: WPSPageSpan.cpp:111
State(State const &)=delete
librevenge::RVNGPropertyList m_metaData
the meta data
Definition: Quattro.cpp:194
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: WKSContentListener.h:79
bool readZones()
finds the different zones (spreadsheet, chart, print, ...)
Definition: Quattro.cpp:760
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Quattro.cpp:490
bool readColorList(std::shared_ptr< WPSStream > stream)
read a color lits: zone e8
Definition: Quattro.cpp:1905
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
std::shared_ptr< QuattroSpreadsheet > m_spreadsheetParser
the spreadsheet manager
Definition: Quattro.h:184
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: Quattro.cpp:581
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
the font of a QuattroParser
Definition: Quattro.cpp:63
bool m_header
a flag to known if we need to send the header or the footer
Definition: Quattro.cpp:102
Font(Font const &)=default
bool readOptimizer(std::shared_ptr< WPSStream > stream)
read the first optimizer zone: 103
Definition: Quattro.cpp:2039
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 readCellPosition(std::shared_ptr< WPSStream > stream)
read the cell's position: zone 96
Definition: Quattro.cpp:2339
the class to store a color
Definition: libwps_internal.h:281
static WPSFont getDefaultFont()
returns a default font (Courier12) with file's version to define the default encoding */
Definition: Quattro.cpp:180
std::shared_ptr< WKSContentListener > createListener(librevenge::RVNGSpreadsheetInterface *interface)
creates the main listener
Definition: Quattro.cpp:643
#define WPS_SHADOW_BIT
Definition: libwps_internal.h:503
RVNGInputStreamPtr decodeStream(RVNGInputStreamPtr input, std::vector< uint8_t > const &key) const
try to decode a stream, if successful, replace the stream'input by the new one
Definition: Quattro.cpp:2673
Definition: WKSContentListener.h:54
std::map< int, std::pair< librevenge::RVNGString, QuattroFormulaInternal::CellReference > > m_idToFieldMap
map id to field
Definition: Quattro.cpp:206
Definition: WPSOLEStream.h:34
std::vector< WPSColor > m_colorsList
the color list
Definition: Quattro.cpp:200
bool readBlockList(std::shared_ptr< WPSStream > stream)
reads some cell reference list (potential followed by other data)
Definition: Quattro.cpp:2214
RVNGInputStreamPtr getFileInput()
Definition: WKSParser.cpp:44
bool m_isDecoded
true if the main stream has been decoded
Definition: Quattro.cpp:219
Definition: WPSDebug.h:208
WPSPageSpan m_pageSpan
the actual document size
Definition: Quattro.cpp:208
bool readStyleName(std::shared_ptr< WPSStream > stream)
read a style name: zone d0
Definition: Quattro.cpp:1941
Internal: the subdocument of a WPS4Parser.
Definition: Quattro.cpp:81
int m_version
the file version
Definition: Quattro.cpp:192
bool readExternalData(std::shared_ptr< WPSStream > stream)
read a external filename/name: zone 97,98
Definition: Quattro.cpp:1793
bool isBlack() const
return true if the color is black
Definition: libwps_internal.h:345
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
static void setStream(RVNGInputStreamPtr)
Definition: WPSDebug.h:212
a zone name
Definition: Quattro.cpp:130
bool readHeaderFooter(std::shared_ptr< WPSStream > stream, bool header)
reads the header/footer: zone 25,26
Definition: Quattro.cpp:2000
Definition: WKSParser.h:34
Generated on Sat Sep 12 2020 08:41:48 for libwps by
doxygen 1.8.18