22#ifndef QUATTRO_SPREADSHEET_H
23#define QUATTRO_SPREADSHEET_H
29#include <librevenge-stream/librevenge-stream.h>
81 void sendSpreadsheet(
int sheetId, std::vector<Vec2i>
const &listGraphicCells);
88 void addDLLIdName(
int id, librevenge::RVNGString
const &name,
bool func1);
90 void addUserFormat(
int id, librevenge::RVNGString
const &name);
98 bool readCell(std::shared_ptr<WPSStream>
const &stream);
100 bool readSheetSize(std::shared_ptr<WPSStream>
const &stream);
106 bool readRowSize(std::shared_ptr<WPSStream>
const &stream);
113 bool readSheetName(std::shared_ptr<WPSStream>
const &stream);
115 bool readCellStyle(std::shared_ptr<WPSStream>
const &stream);
118 static bool readViewInfo(std::shared_ptr<WPSStream>
const &stream);
127 Vec2i const &pos=
Vec2i(0,0),
int sheetId=0)
const;
136 std::shared_ptr<QuattroSpreadsheetInternal::State>
m_state;
This class parses Quattro Pro spreadsheet: .wb1, ..., .wb3.
Definition Quattro.h:54
a cellule of a Quattro spreadsheet
Definition QuattroSpreadsheet.cpp:113
Vec2f getPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition QuattroSpreadsheet.cpp:619
void sendCellContent(QuattroSpreadsheetInternal::Cell const &cell, int sheetId)
send the cell data
Definition QuattroSpreadsheet.cpp:1923
QuattroSpreadsheet(QuattroParser &parser)
constructor
Definition QuattroSpreadsheet.cpp:567
bool readSheetName(std::shared_ptr< WPSStream > const &stream)
reads sheet name: zone cc
Definition QuattroSpreadsheet.cpp:1357
bool readCell(std::shared_ptr< WPSStream > const &stream)
reads a cell content data: zone 0xc-0x10 or 33
Definition QuattroSpreadsheet.cpp:656
friend class QuattroParser
Definition QuattroSpreadsheet.h:54
std::shared_ptr< WKSContentListener > m_listener
Definition QuattroSpreadsheet.h:132
void cleanState()
clean internal state
Definition QuattroSpreadsheet.cpp:579
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 QuattroSpreadsheet.cpp:1518
void addDLLIdName(int id, librevenge::RVNGString const &name, bool func1)
add a dll's correspondance between an id and a name
Definition QuattroSpreadsheet.cpp:630
bool readBeginEndSheet(std::shared_ptr< WPSStream > const &stream, int &sheetId)
read the begin/end of a sheet zone: zone ca and cb
Definition QuattroSpreadsheet.cpp:1310
QuattroParser & m_mainParser
the listener (if set)
Definition QuattroSpreadsheet.h:134
static void updateCellWithUserFormat(QuattroSpreadsheetInternal::Cell &cell, librevenge::RVNGString const &format)
try to update the cell's format using the user format
Definition QuattroSpreadsheet.cpp:1698
QuattroSpreadsheet(QuattroSpreadsheet const &orig)=delete
bool readColumnRowDefaultSize(std::shared_ptr< WPSStream > const &stream)
reads the sheet column/row default size: zone d2-d5
Definition QuattroSpreadsheet.cpp:1114
bool readCellStyle(std::shared_ptr< WPSStream > const &stream)
reads a cell attribute: zone 0xce
Definition QuattroSpreadsheet.cpp:837
~QuattroSpreadsheet()
destructor
Definition QuattroSpreadsheet.cpp:575
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition QuattroSpreadsheet.cpp:614
int getNumSpreadsheets() const
returns the number of spreadsheet
Definition QuattroSpreadsheet.cpp:605
QuattroSpreadsheet & operator=(QuattroSpreadsheet const &orig)=delete
void updateState()
update the state (need to be called before sending data)
Definition QuattroSpreadsheet.cpp:584
static bool readViewInfo(std::shared_ptr< WPSStream > const &stream)
reads a view info: zone 197/198
Definition QuattroSpreadsheet.cpp:1398
bool readRowSize(std::shared_ptr< WPSStream > const &stream)
reads the row size: zone d6,d7
Definition QuattroSpreadsheet.cpp:1208
bool readRowRangeSize(std::shared_ptr< WPSStream > const &stream)
reads the row size: zone 105,106
Definition QuattroSpreadsheet.cpp:1257
void sendSpreadsheet(int sheetId, std::vector< Vec2i > const &listGraphicCells)
send the sheetId'th spreadsheet
Definition QuattroSpreadsheet.cpp:1609
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition QuattroSpreadsheet.h:61
std::shared_ptr< QuattroSpreadsheetInternal::State > m_state
the internal state
Definition QuattroSpreadsheet.h:136
int version() const
return the file version
Definition QuattroSpreadsheet.cpp:588
bool readSheetSize(std::shared_ptr< WPSStream > const &stream)
reads sheet size: zone 06
Definition QuattroSpreadsheet.cpp:1073
bool readColumnSize(std::shared_ptr< WPSStream > const &stream)
reads the column size: zone d8,d9
Definition QuattroSpreadsheet.cpp:1154
void addUserFormat(int id, librevenge::RVNGString const &name)
add a user format's correspondance between an id and a name
Definition QuattroSpreadsheet.cpp:635
QuattroFormulaManager::CellReferenceFunction getReadCellReferenceFunction()
returns the function to read a cell's reference
Definition QuattroSpreadsheet.cpp:595
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
Definition QuattroSpreadsheet.cpp:52
the state of QuattroSpreadsheet
Definition QuattroSpreadsheet.cpp:479
small class use to define a formula instruction
Definition WKSContentListener.h:58