22#ifndef QUATTRO9_SPREADSHEET_H
23#define QUATTRO9_SPREADSHEET_H
29#include <librevenge-stream/librevenge-stream.h>
92 void addDLLIdName(
int id, librevenge::RVNGString
const &name,
bool func1);
94 void addUserFormat(
int id, librevenge::RVNGString
const &name);
97 std::vector<Quattro9ParserInternal::TextEntry>
const &entries);
111 bool readBeginSheet(std::shared_ptr<WPSStream>
const &stream,
int &sheetId);
113 bool readEndSheet(std::shared_ptr<WPSStream>
const &stream);
115 static bool readPageBreak(std::shared_ptr<WPSStream>
const &stream);
127 bool readEndColumn(std::shared_ptr<WPSStream>
const &stream);
129 bool readCellList(std::shared_ptr<WPSStream>
const &stream);
138 Vec2i const &pos=
Vec2i(0,0),
int sheetId=0)
const;
148 std::shared_ptr<Quattro9SpreadsheetInternal::State>
m_state;
This class parses Quattro Pro WP spreadsheet: .qpw.
Definition Quattro9.h:91
void sendCellContent(Quattro9SpreadsheetInternal::CellData const *cell, Vec2i pos, int sheetId, int numRepeated)
send the cell data
Definition Quattro9Spreadsheet.cpp:2137
Vec2f getPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition Quattro9Spreadsheet.cpp:863
bool readEndColumn(std::shared_ptr< WPSStream > const &stream)
read the end column zone: zone a02
Definition Quattro9Spreadsheet.cpp:1656
bool readColRowDimension(std::shared_ptr< WPSStream > const &stream)
read a col/row dimension: zone 633, 634
Definition Quattro9Spreadsheet.cpp:1466
bool readMergedCells(std::shared_ptr< WPSStream > const &stream)
read the merged cell: zone 61d
Definition Quattro9Spreadsheet.cpp:1543
bool readCellStyles(std::shared_ptr< WPSStream > const &stream)
reads a cell attribute: zone a
Definition Quattro9Spreadsheet.cpp:919
static bool readCell(std::shared_ptr< WPSStream > const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName)
Definition Quattro9Spreadsheet.cpp:1971
void updateState()
update the state (need to be called before sending data)
Definition Quattro9Spreadsheet.cpp:830
static bool readPageBreak(std::shared_ptr< WPSStream > const &stream)
read the page break zone: zone 617
Definition Quattro9Spreadsheet.cpp:1583
std::shared_ptr< Quattro9SpreadsheetInternal::State > m_state
the internal state
Definition Quattro9Spreadsheet.h:148
bool readDocumentFormulas(std::shared_ptr< WPSStream > const &stream)
reads the document formulas: zone 408
Definition Quattro9Spreadsheet.cpp:1264
bool readBeginColumn(std::shared_ptr< WPSStream > const &stream)
read the begin column zone: zone a01
Definition Quattro9Spreadsheet.cpp:1617
void sendSpreadsheet(int sheetId)
send the sheetId'th spreadsheet
Definition Quattro9Spreadsheet.cpp:2103
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition Quattro9Spreadsheet.h:66
int subversion() const
return the file sub version
Definition Quattro9Spreadsheet.cpp:841
bool readEndSheet(std::shared_ptr< WPSStream > const &stream)
read the end sheet zone: zone 602
Definition Quattro9Spreadsheet.cpp:1413
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition Quattro9Spreadsheet.cpp:874
~Quattro9Spreadsheet()
destructor
Definition Quattro9Spreadsheet.cpp:821
bool readCellList(std::shared_ptr< WPSStream > const &stream)
reads a cell list zone: zone c01
Definition Quattro9Spreadsheet.cpp:1671
std::shared_ptr< WKSContentListener > m_listener
Definition Quattro9Spreadsheet.h:144
friend class Quattro9Parser
Definition Quattro9Spreadsheet.h:59
void addDLLIdName(int id, librevenge::RVNGString const &name, bool func1)
add a dll's correspondance between an id and a name
Definition Quattro9Spreadsheet.cpp:879
bool readBeginSheet(std::shared_ptr< WPSStream > const &stream, int &sheetId)
read the begin sheet zone: zone 601
Definition Quattro9Spreadsheet.cpp:1333
std::set< int > getListSheets() const
return the list of sheet which contains data
Definition Quattro9Spreadsheet.cpp:858
bool readColRowDefault(std::shared_ptr< WPSStream > const &stream)
read a col/row default dimension: zone 631, 632
Definition Quattro9Spreadsheet.cpp:1430
Quattro9Spreadsheet(Quattro9Parser &parser)
constructor
Definition Quattro9Spreadsheet.cpp:813
bool readColRowDimensions(std::shared_ptr< WPSStream > const &stream)
read a col/row dimensions: zone 635, 636
Definition Quattro9Spreadsheet.cpp:1504
Quattro9Spreadsheet(Quattro9Spreadsheet const &orig)=delete
bool readCellReference(std::shared_ptr< WPSStream > const &stream, long endPos, QuattroFormulaInternal::CellReference &ref, Vec2i const &pos=Vec2i(0, 0), int sheetId=0) const
try to read a cell reference
Definition Quattro9Spreadsheet.cpp:2010
void addDocumentStrings(std::shared_ptr< WPSStream > const &stream, std::vector< Quattro9ParserInternal::TextEntry > const &entries)
set the document strings list
Definition Quattro9Spreadsheet.cpp:899
Quattro9Spreadsheet & operator=(Quattro9Spreadsheet const &orig)=delete
void addUserFormat(int id, librevenge::RVNGString const &name)
add a user format's correspondance between an id and a name
Definition Quattro9Spreadsheet.cpp:884
bool readCellResult(std::shared_ptr< WPSStream > const &stream)
reads a cell result zone: zone c02
Definition Quattro9Spreadsheet.cpp:1921
int version() const
return the file version
Definition Quattro9Spreadsheet.cpp:834
void cleanState()
clean internal state
Definition Quattro9Spreadsheet.cpp:825
QuattroFormulaManager::CellReferenceFunction getReadCellReferenceFunction()
returns the function to read a cell's reference
Definition Quattro9Spreadsheet.cpp:848
Quattro9Parser & m_mainParser
the listener (if set)
Definition Quattro9Spreadsheet.h:146
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition libwps_internal.h:114
Vec2< int > Vec2i
Vec2 of int.
Definition libwps_internal.h:702
Vec2< float > Vec2f
Vec2 of float.
Definition libwps_internal.h:704
Internal: namespace to define internal class of Quattro9Parser.
Definition Quattro9.cpp:58
Definition Quattro9Spreadsheet.cpp:51
a class used to store the cell(s) content of a Quattro Spreadsheet
Definition Quattro9Spreadsheet.cpp:234
the state of Quattro9Spreadsheet
Definition Quattro9Spreadsheet.cpp:751
small class use to define a formula instruction
Definition WKSContentListener.h:58