Go to the documentation of this file.
22 #ifndef QUATTRO_DOS_SPREADSHEET_H
23 #define QUATTRO_DOS_SPREADSHEET_H
29 #include <librevenge-stream/librevenge-stream.h>
75 void sendSpreadsheet(
int sId, std::map<Vec2i,Vec2i>
const &chartCellMap);
118 std::vector<WKSContentListener::FormulaInstruction> &formula, std::string &error);
134 std::shared_ptr<QuattroDosSpreadsheetInternal::State>
m_state;
bool readCellProperty()
reads a Quattro Pro property (zone 0x9d)
Definition: QuattroDosSpreadsheet.cpp:989
std::map< Vec2i, int > m_rowHeightMap
the map Vec2i(min row, max row) to size in points
Definition: QuattroDosSpreadsheet.cpp:493
@ F_Text
Definition: WKSContentListener.h:59
a class used to store a style of a cell in QuattroDosSpreadsheet
Definition: QuattroDosSpreadsheet.cpp:51
bool empty() const
returns true if the spreedsheet is empty
Definition: QuattroDosSpreadsheet.cpp:479
void compressRowHeights()
try to compress the list of row height
Definition: QuattroDosSpreadsheet.cpp:445
Type
the spreadsheet type
Definition: QuattroDosSpreadsheet.cpp:299
std::shared_ptr< WKSContentListener > m_listener
Definition: QuattroDosSpreadsheet.h:130
librevenge::RVNGString m_fileName
the file name (external reference)
Definition: WKSContentListener.h:96
std::vector< std::shared_ptr< Spreadsheet > > m_spreadsheetList
the list of spreadsheet ( first: main spreadsheet, other report spreadsheet )
Definition: QuattroDosSpreadsheet.cpp:584
long m_eof
the last file position
Definition: QuattroDosSpreadsheet.cpp:577
static std::string str()
Definition: WPSDebug.h:200
Type m_type
the spreadsheet type
Definition: QuattroDosSpreadsheet.cpp:484
@ F_Long
Definition: WKSContentListener.h:59
@ C_FORMULA
Definition: WKSContentListener.h:102
a cellule of a Quattro spreadsheet
Definition: QuattroDosSpreadsheet.cpp:152
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
static void addPos(long)
Definition: WPSDebug.h:220
int m_widthDefault
the default width size in point
Definition: QuattroDosSpreadsheet.cpp:497
@ F_Cell
Definition: WKSContentListener.h:59
bool readSpreadsheetName()
reads a sheet name (zone 0xde), unused...
Definition: QuattroDosSpreadsheet.cpp:1626
int m_arity
Definition: QuattroDosSpreadsheet.cpp:1803
long end() const
returns the end offset
Definition: WPSEntry.h:76
bool readHiddenColumns()
reads the list of hidden columns zone ( unused )
Definition: QuattroDosSpreadsheet.cpp:760
bool checkFilePosition(long pos)
return true if the pos is in the file, update the file size if need
Definition: QuattroDosSpreadsheet.cpp:612
bool readCellStyle()
reads a Quattro Pro cell styles (zone 0xd8)
Definition: QuattroDosSpreadsheet.cpp:801
QuattroDosParser & m_mainParser
the listener (if set)
Definition: QuattroDosSpreadsheet.h:132
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition: QuattroDosSpreadsheet.cpp:629
StyleManager m_styleManager
the style manager
Definition: QuattroDosSpreadsheet.cpp:581
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
int getMaximalSheet(Spreadsheet::Type type=Spreadsheet::T_Spreadsheet) const
returns the maximal spreadsheet
Definition: QuattroDosSpreadsheet.cpp:521
@ F_Operator
Definition: WKSContentListener.h:59
bool readSpreadsheetOpen()
reads a sheet header zone 0:dc (Quattro Pro wq2)
Definition: QuattroDosSpreadsheet.cpp:1654
Style & operator=(Style const &)=default
@ BottomBit
Definition: libwps_internal.h:401
@ F_Double
Definition: WKSContentListener.h:59
double m_longValue
value ( if type==F_Long )
Definition: WKSContentListener.h:81
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: QuattroDos.cpp:239
@ F_Function
Definition: WKSContentListener.h:59
void sendSpreadsheet(int sId, std::map< Vec2i, Vec2i > const &chartCellMap)
send the sId'th spreadsheet
Definition: QuattroDosSpreadsheet.cpp:2210
RVNGInputStreamPtr m_input
the input
Definition: QuattroDosSpreadsheet.h:129
int m_width
the border width
Definition: libwps_internal.h:450
@ T_Report
Definition: QuattroDosSpreadsheet.cpp:299
~QuattroDosSpreadsheet()
destructor
Definition: QuattroDosSpreadsheet.cpp:601
std::ostream & operator<<(std::ostream &o, Style const &style)
operator<<
Definition: QuattroDosSpreadsheet.cpp:86
void pushNewSheet(std::shared_ptr< Spreadsheet > sheet)
create a new sheet and stack id
Definition: QuattroDosSpreadsheet.cpp:555
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: QuattroDosSpreadsheet.cpp:285
librevenge::RVNGString getSheetName(int id) const
returns the ith spreadsheet
Definition: QuattroDosSpreadsheet.cpp:543
double m_doubleValue
value ( if type==F_Double )
Definition: WKSContentListener.h:83
@ T_Filter
Definition: QuattroDosSpreadsheet.cpp:299
bool send(WPSListenerPtr &) final
call when a cell must be send
Definition: QuattroDosSpreadsheet.cpp:279
define the font properties
Definition: WPSFont.h:37
Style(libwps_tools_win::Font::Type type)
construtor
Definition: QuattroDosSpreadsheet.cpp:53
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:87
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
std::vector< WPSColumnFormat > getWidths() const
return the columns format
Definition: QuattroDosSpreadsheet.cpp:357
bool readCell()
reads a cell content data
Definition: QuattroDosSpreadsheet.cpp:1388
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
Spreadsheet & getActualSheet()
returns the actual sheet
Definition: QuattroDosSpreadsheet.cpp:550
void setPosition(Vec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: WPSCell.h:340
int version() const
return the file version
Definition: QuattroDosSpreadsheet.cpp:605
What m_type
the type
Definition: WKSContentListener.h:77
Vec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: WKSContentListener.h:85
std::shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition: libwps_internal.h:105
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
bool popSheet()
try to pop the actual sheet
Definition: QuattroDosSpreadsheet.cpp:566
bool get(int id, Style &style) const
returns the style with id
Definition: QuattroDosSpreadsheet.cpp:123
libwps_tools_win::Font::Type m_fontType
font encoding type
Definition: QuattroDosSpreadsheet.cpp:74
void print(int id, std::ostream &o) const
print a style
Definition: QuattroDosSpreadsheet.cpp:134
bool readSheetSize()
reads sheet size
Definition: QuattroDosSpreadsheet.cpp:640
static Functions const s_listFunctions[]
Definition: QuattroDosSpreadsheet.cpp:1806
Definition: QuattroDosSpreadsheet.cpp:1801
int version() const
return the file version
Definition: QuattroDos.cpp:221
@ C_UNKNOWN
Definition: WKSContentListener.h:102
bool readRowSize()
reads the column size ( in points )
Definition: QuattroDosSpreadsheet.cpp:681
Style(Style const &)=default
@ TopBit
Definition: libwps_internal.h:401
std::stack< std::shared_ptr< Spreadsheet > > m_spreadsheetStack
the stack of spreadsheet id
Definition: QuattroDosSpreadsheet.cpp:586
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
bool readColumnSize()
reads the column size ( in ??? )
Definition: QuattroDosSpreadsheet.cpp:714
WPSColor m_color
the font color
Definition: WPSFont.h:89
bool readPString(librevenge::RVNGString &string, long maxSize)
try to read a basic pascal string, knowing the maximum size(excluding string size)
Definition: QuattroDos.cpp:865
Vec2i m_lastCellPos
the last cell position
Definition: QuattroDosSpreadsheet.cpp:501
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
librevenge::RVNGString m_sheetName[2]
the sheet name
Definition: WKSContentListener.h:89
Vec2f getZoneSize(Vec2i const &cell0, Vec2i const &cell1) const
return the size of the zone containning two cells
Definition: QuattroDosSpreadsheet.cpp:414
small class use to define a formula instruction
Definition: WKSContentListener.h:58
int m_numCols
the number of columns
Definition: QuattroDosSpreadsheet.cpp:488
WKSContentListener::CellContent m_content
the content
Definition: QuattroDosSpreadsheet.cpp:276
libwps::DebugFile & m_asciiFile
the ascii file
Definition: QuattroDosSpreadsheet.h:136
@ RightBit
Definition: libwps_internal.h:401
float getRowHeight(int row) const
returns the row size in point
Definition: QuattroDosSpreadsheet.cpp:388
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:85
bool sendChart(int sheetId, Vec2i const &cell, Vec2f const &chartSize)
try to send the chart corresponding to sheetId and a position
Definition: QuattroDos.cpp:247
#define WPS_HIDDEN_BIT
Definition: libwps_internal.h:516
static void addNote(char const *)
Definition: WPSDebug.h:221
void setColumnWidth(int col, int w=-1)
set the columns size
Definition: QuattroDosSpreadsheet.cpp:348
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: QuattroDos.cpp:265
long begin() const
returns the begin offset
Definition: WPSEntry.h:71
std::shared_ptr< Spreadsheet > getSheet(Spreadsheet::Type type, int id)
returns the ith real spreadsheet
Definition: QuattroDosSpreadsheet.cpp:532
void updateFormat()
update the cell format using file format
Definition: QuattroDosSpreadsheet.cpp:174
QuattroDosSpreadsheet(QuattroDosParser &parser)
constructor
Definition: QuattroDosSpreadsheet.cpp:592
libwps_tools_win::Font::Type m_fontType
font encoding type
Definition: QuattroDosSpreadsheet.cpp:272
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
double m_size
font size
Definition: WPSFont.h:83
std::vector< int > m_widthCols
the column size in TWIP (?)
Definition: QuattroDosSpreadsheet.cpp:491
std::string m_extra
extra data
Definition: QuattroDosSpreadsheet.cpp:78
Cell(libwps_tools_win::Font::Type type)
constructor
Definition: QuattroDosSpreadsheet.cpp:155
int m_fileFormat
the file format
Definition: QuattroDosSpreadsheet.cpp:76
int m_id
the spreadsheet id
Definition: QuattroDosSpreadsheet.cpp:486
This class parses Quattro Pro DOS spreadsheet file.
Definition: QuattroDosSpreadsheet.h:50
bool readSpreadsheetClose()
reads a sheet header zone 0:dd (Quattro Pro wq2)
Definition: QuattroDosSpreadsheet.cpp:1694
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
WPSEntry m_textEntry
the cell string
Definition: WKSContentListener.h:153
bool sendContent(WPSListenerPtr &) final
call when the content of a cell must be send
Definition: QuattroDosSpreadsheet.cpp:167
the state of QuattroDosSpreadsheet
Definition: QuattroDosSpreadsheet.cpp:509
Cell * getLastCell()
returns the last cell
Definition: QuattroDosSpreadsheet.cpp:326
a structure used to defined the cell position, and a format
Definition: WPSCell.h:291
void setRowHeight(int row, int h)
set the rows size
Definition: QuattroDosSpreadsheet.cpp:408
Definition: WPSDebug.h:192
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
librevenge::RVNGString getFileName(int fId) const
returns the name of the fId file
Definition: QuattroDos.cpp:278
a border list
Definition: libwps_internal.h:395
State()
constructor
Definition: QuattroDosSpreadsheet.cpp:511
the style manager
Definition: QuattroDosSpreadsheet.cpp:108
~Style() final
destructor
Definition: QuattroDosSpreadsheet.cpp:81
int getNumSpreadsheets() const
returns the number of spreadsheet
Definition: QuattroDosSpreadsheet.cpp:624
std::map< Vec2i, Cell > m_positionToCellMap
a map cell to not empty cells
Definition: QuattroDosSpreadsheet.cpp:499
std::map< int, Style > m_idStyleMap
the styles
Definition: QuattroDosSpreadsheet.cpp:147
void insertChartPositions(std::map< Vec2i, Vec2i > const &chartPosMap, libwps_tools_win::Font::Type type)
Definition: QuattroDosSpreadsheet.cpp:332
bool readFormula(long endPos, Vec2i const &pos, int sheetId, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error)
Definition: QuattroDosSpreadsheet.cpp:1856
char const * m_name
Definition: QuattroDosSpreadsheet.cpp:1802
int m_heightDefault
the default row size in point
Definition: QuattroDosSpreadsheet.cpp:495
bool readUserStyle()
reads a Quattro Pro style ( zone 0xc9)
Definition: QuattroDosSpreadsheet.cpp:1129
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: WKSContentListener.h:79
This class parses Quattro Pro spreadsheet: .wq1 and wq2.
Definition: QuattroDos.h:49
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
@ Double
Definition: libwps_internal.h:399
@ T_Spreadsheet
Definition: QuattroDosSpreadsheet.cpp:299
Vec2i & position()
position accessor
Definition: WPSCell.h:330
std::vector< int > m_rowPageBreaksList
the list of row page break
Definition: QuattroDosSpreadsheet.cpp:503
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
bool readCellFormulaResult()
reads the result of a text formula
Definition: QuattroDosSpreadsheet.cpp:1585
@ LeftBit
Definition: libwps_internal.h:401
the spreadsheet of a QuattroDos Spreadsheet
Definition: QuattroDosSpreadsheet.cpp:296
Type m_type
the border repetition
Definition: libwps_internal.h:448
void add(int id, Style const &st)
add a new style and returns its id
Definition: QuattroDosSpreadsheet.cpp:113
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
float getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: QuattroDosSpreadsheet.cpp:396
Cell & getCell(Vec2i const &pos, libwps_tools_win::Font::Type type)
return a cell corresponding to a spreadsheet, create one if needed
Definition: QuattroDosSpreadsheet.cpp:314
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
libwps::DebugFile & ascii()
returns the debug file
Definition: QuattroDosSpreadsheet.h:124
Vec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: WKSContentListener.h:87
@ C_TEXT
Definition: WKSContentListener.h:102
the class to store a color
Definition: libwps_internal.h:281
int m_version
the file version
Definition: QuattroDosSpreadsheet.cpp:579
QuattroDosSpreadsheet & operator=(QuattroDosSpreadsheet const &orig)=delete
@ C_NONE
Definition: WKSContentListener.h:102
Spreadsheet(Type type=T_Spreadsheet, int id=0)
a constructor
Definition: QuattroDosSpreadsheet.cpp:302
Vec2< bool > Vec2b
Vec2 of bool.
Definition: libwps_internal.h:700
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: QuattroDosSpreadsheet.h:59
small class use to define a sheet cell content
Definition: WKSContentListener.h:100
void sendCellContent(QuattroDosSpreadsheetInternal::Cell const &cell, int cellChartSheetId=-1, Vec2f const &chartSize=Vec2f())
send the cell data
Definition: QuattroDosSpreadsheet.cpp:2263
Definition: WPSDebug.h:208
QuattroDosSpreadsheet(QuattroDosSpreadsheet const &orig)=delete
int m_fileFormat
the file format
Definition: QuattroDosSpreadsheet.cpp:274
@ F_CellList
Definition: WKSContentListener.h:59
Definition: QuattroDosSpreadsheet.cpp:46
StyleManager()
Definition: QuattroDosSpreadsheet.cpp:110
bool operator==(Style const &st) const
operator==
Definition: QuattroDosSpreadsheet.cpp:97
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: QuattroDos.cpp:260
@ C_NUMBER
Definition: WKSContentListener.h:102
static WPSColor black()
return the back color
Definition: libwps_internal.h:306
std::shared_ptr< QuattroDosSpreadsheetInternal::State > m_state
the internal state
Definition: QuattroDosSpreadsheet.h:134
Generated on Sun Dec 8 2024 07:45:01 for libwps by
doxygen 1.8.20