QuattroSpreadsheet.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Major Contributor(s):
10  * Copyright (C) 2006, 2007 Andrew Ziem
11  * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
12  * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
13  *
14  * For minor contributions see the git repository.
15  *
16  * Alternatively, the contents of this file may be used under the terms
17  * of the GNU Lesser General Public License Version 2.1 or later
18  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19  * applicable instead of those above.
20  */
21 
22 #ifndef QUATTRO_SPREADSHEET_H
23 #define QUATTRO_SPREADSHEET_H
24 
25 #include <ostream>
26 #include <map>
27 #include <vector>
28 
29 #include <librevenge-stream/librevenge-stream.h>
30 
31 #include "libwps_internal.h"
32 
33 #include "WPSDebug.h"
34 #include "WKSContentListener.h"
35 
36 #include "QuattroFormula.h"
37 
39 {
40 class Cell;
41 class SpreadSheet;
42 struct State;
43 }
44 
45 class QuattroParser;
46 
52 {
53 public:
54  friend class QuattroParser;
55 
57  explicit QuattroSpreadsheet(QuattroParser &parser);
62  {
63  m_listener = listen;
64  }
66  void cleanState();
68  void updateState();
69 
70 protected:
72  int version() const;
75 
77  int getNumSpreadsheets() const;
79  librevenge::RVNGString getSheetName(int id) const;
81  void sendSpreadsheet(int sheetId, std::vector<Vec2i> const &listGraphicCells);
83  Vec2f getPosition(int sheetId, Vec2i const &cell) const;
85  void sendCellContent(QuattroSpreadsheetInternal::Cell const &cell, int sheetId);
86 
88  void addDLLIdName(int id, librevenge::RVNGString const &name, bool func1);
90  void addUserFormat(int id, librevenge::RVNGString const &name);
91 
92  //
93  // low level
94  //
96 
98  bool readCell(std::shared_ptr<WPSStream> const &stream);
100  bool readSheetSize(std::shared_ptr<WPSStream> const &stream);
102  bool readColumnRowDefaultSize(std::shared_ptr<WPSStream> const &stream);
104  bool readColumnSize(std::shared_ptr<WPSStream> const &stream);
106  bool readRowSize(std::shared_ptr<WPSStream> const &stream);
108  bool readRowRangeSize(std::shared_ptr<WPSStream> const &stream);
109 
111  bool readBeginEndSheet(std::shared_ptr<WPSStream> const &stream, int &sheetId);
113  bool readSheetName(std::shared_ptr<WPSStream> const &stream);
115  bool readCellStyle(std::shared_ptr<WPSStream> const &stream);
116 
118  bool readViewInfo(std::shared_ptr<WPSStream> const &stream);
119 
120  /* reads a cell */
121  bool readCell(std::shared_ptr<WPSStream> const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName) const;
123  void updateCellWithUserFormat(QuattroSpreadsheetInternal::Cell &cell, librevenge::RVNGString const &format);
125  bool readCellReference(std::shared_ptr<WPSStream> const &stream, long endPos,
127  Vec2i const &pos=Vec2i(0,0), int sheetId=0) const;
128 
129 private:
130  QuattroSpreadsheet(QuattroSpreadsheet const &orig) = delete;
131  QuattroSpreadsheet &operator=(QuattroSpreadsheet const &orig) = delete;
132  std::shared_ptr<WKSContentListener> m_listener;
136  std::shared_ptr<QuattroSpreadsheetInternal::State> m_state;
137 };
138 
139 #endif /* WPS4_H */
140 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WKSContentListener::FormulaInstruction::F_Text
Definition: WKSContentListener.h:59
WPSColor::white
static WPSColor white()
return the white color
Definition: libwps_internal.h:311
WPSCellFormat::F_BOOLEAN
Definition: WPSCell.h:54
QuattroSpreadsheetInternal::Spreadsheet::compressRowHeights
void compressRowHeights()
try to compress the list of row height
Definition: QuattroSpreadsheet.cpp:388
QuattroSpreadsheetInternal::State::m_actSheet
int m_actSheet
the actual sheet
Definition: QuattroSpreadsheet.cpp:522
QuattroFormula.h
QuattroSpreadsheetInternal::Spreadsheet::empty
bool empty() const
returns true if the spreedsheet is empty
Definition: QuattroSpreadsheet.cpp:293
QuattroSpreadsheet::readCellStyle
bool readCellStyle(std::shared_ptr< WPSStream > const &stream)
reads a cell attribute: zone 0xce
Definition: QuattroSpreadsheet.cpp:810
QuattroSpreadsheetInternal
Definition: QuattroSpreadsheet.cpp:49
QuattroSpreadsheetInternal::Spreadsheet::m_id
int m_id
the spreadsheet id
Definition: QuattroSpreadsheet.cpp:457
WKSContentListener::FormulaInstruction::m_fileName
librevenge::RVNGString m_fileName
the file name (external reference)
Definition: WKSContentListener.h:96
QuattroFormulaInternal::CellReference
small class use to store Quattro Pro cell reference (.wb1-3 and qpw)
Definition: QuattroFormula.h:42
libwps::DebugStream::str
static std::string str()
Definition: WPSDebug.h:200
QuattroSpreadsheet::~QuattroSpreadsheet
~QuattroSpreadsheet()
destructor
Definition: QuattroSpreadsheet.cpp:547
WPSCellFormat::HALIGN_FULL
Definition: WPSCell.h:47
WKSContentListener::CellContent::C_FORMULA
Definition: WKSContentListener.h:102
WPSCellFormat::VALIGN_CENTER
Definition: WPSCell.h:50
QuattroSpreadsheetInternal::Spreadsheet::setColumnWidth
void setColumnWidth(int col, int w=-1)
set the columns size
Definition: QuattroSpreadsheet.cpp:298
libwps::DebugFile::addPos
static void addPos(long)
Definition: WPSDebug.h:220
WKSContentListener::FormulaInstruction::F_Cell
Definition: WKSContentListener.h:59
WPSEntry::end
long end() const
returns the end offset
Definition: WPSEntry.h:76
QuattroFormulaManager::CellReferenceFunction
std::function< bool(std::shared_ptr< WPSStream > const &stream, long endPos, QuattroFormulaInternal::CellReference &ref, Vec2i const &cPos, int cSheet)> CellReferenceFunction
Definition: QuattroFormula.h:81
QuattroSpreadsheetInternal::Spreadsheet::getPosition
Vec2f getPosition(Vec2i const &cell) const
returns the cell position
Definition: QuattroSpreadsheet.cpp:422
QuattroSpreadsheetInternal::Cell::send
bool send(WPSListenerPtr &) final
call when a cell must be send
Definition: QuattroSpreadsheet.cpp:245
WPSCellFormat::WRAP_WRAP
Definition: WPSCell.h:52
WPSCell.h
QuattroSpreadsheet::updateCellWithUserFormat
void updateCellWithUserFormat(QuattroSpreadsheetInternal::Cell &cell, librevenge::RVNGString const &format)
try to update the cell's format using the user format
Definition: QuattroSpreadsheet.cpp:1675
QuattroSpreadsheet::m_listener
std::shared_ptr< WKSContentListener > m_listener
Definition: QuattroSpreadsheet.h:132
libwps_tools_win::Font::Type
Type
enum Type
Definition: libwps_tools_win.h:46
QuattroSpreadsheetInternal::Spreadsheet::getRowHeight
float getRowHeight(int row) const
returns the row size in point
Definition: QuattroSpreadsheet.cpp:368
QuattroSpreadsheetInternal::Style::m_extra
std::string m_extra
extra data
Definition: QuattroSpreadsheet.cpp:82
QuattroSpreadsheet::readSheetName
bool readSheetName(std::shared_ptr< WPSStream > const &stream)
reads sheet name: zone cc
Definition: QuattroSpreadsheet.cpp:1330
WPSTable.h
QuattroSpreadsheetInternal::Spreadsheet::m_numCols
int m_numCols
the number of columns
Definition: QuattroSpreadsheet.cpp:459
QuattroSpreadsheetInternal::Cell::updateFormat
void updateFormat()
update the cell format using file format
Definition: QuattroSpreadsheet.cpp:136
QuattroSpreadsheetInternal::Cell::m_fontType
libwps_tools_win::Font::Type m_fontType
font encoding type
Definition: QuattroSpreadsheet.cpp:231
QuattroSpreadsheet::readViewInfo
bool readViewInfo(std::shared_ptr< WPSStream > const &stream)
reads a view info: zone 197/198
Definition: QuattroSpreadsheet.cpp:1371
WPSCellFormat::HALIGN_DEFAULT
Definition: WPSCell.h:47
libwps
Definition: libwps_internal.cpp:38
QuattroSpreadsheet::addUserFormat
void addUserFormat(int id, librevenge::RVNGString const &name)
add a user format's correspondance between an id and a name
Definition: QuattroSpreadsheet.cpp:607
QuattroSpreadsheetInternal::Style::m_alignAcrossColumn
bool m_alignAcrossColumn
flag to know if we must align across column
Definition: QuattroSpreadsheet.cpp:80
WPSBorder::BottomBit
Definition: libwps_internal.h:401
WKSContentListener::FormulaInstruction::m_sheetId
int m_sheetId[2]
the sheet id
Definition: WKSContentListener.h:94
libwps::strncasecmp
static int strncasecmp(char const *s1, char const *s2, size_t n)
Definition: QuattroSpreadsheet.cpp:1658
QuattroSpreadsheet::sendCellContent
void sendCellContent(QuattroSpreadsheetInternal::Cell const &cell, int sheetId)
send the cell data
Definition: QuattroSpreadsheet.cpp:1900
QuattroSpreadsheetInternal::Spreadsheet::getWidths
std::vector< WPSColumnFormat > getWidths() const
return the columns format
Definition: QuattroSpreadsheet.cpp:307
QuattroSpreadsheetInternal::Spreadsheet::m_widthCols
std::vector< int > m_widthCols
the column size in TWIP
Definition: QuattroSpreadsheet.cpp:466
QuattroSpreadsheet::readBeginEndSheet
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:1283
QuattroSpreadsheetInternal::Spreadsheet
the spreadsheet of a Quattro Spreadsheet
Definition: QuattroSpreadsheet.cpp:261
QuattroSpreadsheet::cleanState
void cleanState()
clean internal state
Definition: QuattroSpreadsheet.cpp:551
WPSColumnFormat
Definition: WPSTable.h:39
WPSBorder::m_width
int m_width
the border width
Definition: libwps_internal.h:450
QuattroSpreadsheetInternal::Style::operator==
bool operator==(Style const &st) const
operator==
Definition: QuattroSpreadsheet.cpp:101
libwps_tools_win::Font::unicodeString
static librevenge::RVNGString unicodeString(const unsigned char *p, unsigned long size, Type type, bool skipUnknown=true)
converts a list of character in unicode
Definition: libwps_tools_win.cpp:7283
QuattroSpreadsheet::operator=
QuattroSpreadsheet & operator=(QuattroSpreadsheet const &orig)=delete
QuattroSpreadsheetInternal::State::m_formulaManager
QuattroFormulaManager m_formulaManager
the formula manager
Definition: QuattroSpreadsheet.cpp:526
WPSCellFormat::setFormat
void setFormat(FormatType form, int subForm=0)
sets the format type
Definition: WPSCell.h:167
QuattroSpreadsheet::sendSpreadsheet
void sendSpreadsheet(int sheetId, std::vector< Vec2i > const &listGraphicCells)
send the sheetId'th spreadsheet
Definition: QuattroSpreadsheet.cpp:1586
QuattroSpreadsheet::readCellReference
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:1495
WPSCellFormat::HALIGN_RIGHT
Definition: WPSCell.h:46
WPSFont
define the font properties
Definition: WPSFont.h:36
WPSColor::barycenter
static WPSColor barycenter(float alpha, WPSColor const &colA, float beta, WPSColor const &colB)
return alpha*colA+beta*colB
Definition: libwps_internal.cpp:386
QuattroSpreadsheet::QuattroSpreadsheet
QuattroSpreadsheet(QuattroParser &parser)
constructor
Definition: QuattroSpreadsheet.cpp:539
QuattroFormulaInternal::CellReference::addInstruction
void addInstruction(WKSContentListener::FormulaInstruction const &instr)
add an instruction
Definition: QuattroFormula.h:51
WPSEntry::valid
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:87
Vec2i
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
WPSCell::setPosition
void setPosition(Vec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: WPSCell.h:340
QuattroParser::getExternalFileName
bool getExternalFileName(int fId, librevenge::RVNGString &fName) const
returns the name of the fId file
Definition: Quattro.cpp:495
QuattroSpreadsheetInternal::Cell::m_content
WKSContentListener::CellContent m_content
the content
Definition: QuattroSpreadsheet.cpp:239
WKSContentListener::FormulaInstruction::m_type
What m_type
the type
Definition: WKSContentListener.h:77
WKSContentListener::FormulaInstruction::m_position
Vec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: WKSContentListener.h:85
QuattroSpreadsheetInternal::Cell::Cell
Cell(libwps_tools_win::Font::Type type)
constructor
Definition: QuattroSpreadsheet.cpp:114
WPSListenerPtr
std::shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition: libwps_internal.h:105
QuattroSpreadsheetInternal::Spreadsheet::getCell
Cell & getCell(Vec2i const &pos, libwps_tools_win::Font::Type type)
return a cell corresponding to a spreadsheet, create one if needed
Definition: QuattroSpreadsheet.cpp:277
WPSBorder::m_color
WPSColor m_color
the border color
Definition: libwps_internal.h:456
QuattroSpreadsheetInternal::Cell::m_hasGraphic
bool m_hasGraphic
a flag to know a cell has some graphic
Definition: QuattroSpreadsheet.cpp:241
QuattroSpreadsheetInternal::State::m_maxDimension
WPSVec3i m_maxDimension
the maximum col, row, sheet
Definition: QuattroSpreadsheet.cpp:520
Quattro.h
QuattroParser::getColor
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: Quattro.cpp:576
QuattroFormulaInternal::CellReference::m_cells
std::vector< WKSContentListener::FormulaInstruction > m_cells
the list of instruction coding each cell's block
Definition: QuattroFormula.h:70
QuattroSpreadsheetInternal::Cell::m_alignAcrossColumn
bool m_alignAcrossColumn
flag to know if we must align across column
Definition: QuattroSpreadsheet.cpp:237
Vec2f
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
QuattroSpreadsheetInternal::operator<<
std::ostream & operator<<(std::ostream &o, Style const &style)
operator<<
Definition: QuattroSpreadsheet.cpp:90
QuattroSpreadsheet::addDLLIdName
void addDLLIdName(int id, librevenge::RVNGString const &name, bool func1)
add a dll's correspondance between an id and a name
Definition: QuattroSpreadsheet.cpp:602
Vec2
small class which defines a vector with 2 elements
Definition: libwps_internal.h:534
QuattroSpreadsheetInternal::Style
a class used to store a style of a cell in QuattroSpreadsheet
Definition: QuattroSpreadsheet.cpp:52
WPSVec3< int >
WPSBorder::TopBit
Definition: libwps_internal.h:401
QuattroSpreadsheetInternal::State::m_version
int m_version
the file version
Definition: QuattroSpreadsheet.cpp:518
QuattroSpreadsheet::readSheetSize
bool readSheetSize(std::shared_ptr< WPSStream > const &stream)
reads sheet size: zone 06
Definition: QuattroSpreadsheet.cpp:1046
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
QuattroSpreadsheet
This class parses Quattro Pro spreadsheet file.
Definition: QuattroSpreadsheet.h:51
QuattroSpreadsheetInternal::Cell::sendContent
bool sendContent(WPSListenerPtr &) final
call when the content of a cell must be send
Definition: QuattroSpreadsheet.cpp:130
WPSFont::m_color
WPSColor m_color
the font color
Definition: WPSFont.h:89
WPSCellFormat::F_TIME
Definition: WPSCell.h:54
WPS_FALLTHROUGH
#define WPS_FALLTHROUGH
fall through attributes
Definition: libwps_internal.h:82
QuattroSpreadsheet::setListener
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: QuattroSpreadsheet.h:61
QuattroSpreadsheet::readColumnSize
bool readColumnSize(std::shared_ptr< WPSStream > const &stream)
reads the column size: zone d8,d9
Definition: QuattroSpreadsheet.cpp:1127
QuattroSpreadsheetInternal::Style::Style
Style(libwps_tools_win::Font::Type type)
construtor
Definition: QuattroSpreadsheet.cpp:55
WPSCellFormat::F_NUMBER
Definition: WPSCell.h:54
WKSContentListenerPtr
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
WKSContentListener::FormulaInstruction::m_sheetName
librevenge::RVNGString m_sheetName[2]
the sheet name
Definition: WKSContentListener.h:89
QuattroSpreadsheetInternal::Cell::m_fileFormat
int m_fileFormat
the file format
Definition: QuattroSpreadsheet.cpp:233
QuattroParser::sendPageGraphics
bool sendPageGraphics(int sheetId) const
send the page graphic corresponding to a sheet
Definition: Quattro.cpp:556
QuattroSpreadsheetInternal::State::m_idToSheetNameMap
std::map< int, librevenge::RVNGString > m_idToSheetNameMap
the map id to sheet's name
Definition: QuattroSpreadsheet.cpp:531
WKSContentListener::FormulaInstruction
small class use to define a formula instruction
Definition: WKSContentListener.h:57
WPSCellFormat::setDTFormat
void setDTFormat(FormatType form, std::string const &dtFormat="")
sets the format type
Definition: WPSCell.h:173
QuattroParser::readCString
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
WPSCellFormat::VALIGN_BOTTOM
Definition: WPSCell.h:50
WPSFont.h
WPSCellFormat::F_TEXT
Definition: WPSCell.h:54
WPSColumnFormat::m_useOptimalWidth
bool m_useOptimalWidth
a flag to know if we need to see use-optimal column width
Definition: WPSTable.h:88
QuattroParser::version
int version() const
return the file version
Definition: Quattro.cpp:485
WPSCellFormat::m_font
WPSFont m_font
the cell font ( used in spreadsheet code )
Definition: WPSCell.h:262
QuattroSpreadsheetInternal::State::m_stylesList
std::vector< Style > m_stylesList
the list of styles
Definition: QuattroSpreadsheet.cpp:524
QuattroSpreadsheetInternal::Spreadsheet::m_heightDefault
float m_heightDefault
the default row size in point
Definition: QuattroSpreadsheet.cpp:464
WPSBorder::RightBit
Definition: libwps_internal.h:401
WPSEntry.h
WPSFont::m_attributes
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:85
QuattroSpreadsheet::readColumnRowDefaultSize
bool readColumnRowDefaultSize(std::shared_ptr< WPSStream > const &stream)
reads the sheet column/row default size: zone d2-d5
Definition: QuattroSpreadsheet.cpp:1087
WPS_HIDDEN_BIT
#define WPS_HIDDEN_BIT
Definition: libwps_internal.h:516
libwps::DebugFile::addNote
static void addNote(char const *)
Definition: WPSDebug.h:221
WPSEntry::begin
long begin() const
returns the begin offset
Definition: WPSEntry.h:71
libwps::read8
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
WPSCellFormat
a structure used to defined the cell format
Definition: WPSCell.h:40
QuattroSpreadsheetInternal::Cell::m_styleId
int m_styleId
the style id
Definition: QuattroSpreadsheet.cpp:235
WPSColumnFormat::m_numRepeat
int m_numRepeat
the number times a column is repeated
Definition: WPSTable.h:92
QuattroParser::getField
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
libwps::readDouble8
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
WPSCellFormat::HALIGN_LEFT
Definition: WPSCell.h:46
WPSCellFormat::VALIGN_TOP
Definition: WPSCell.h:50
WKSContentListener::CellContent::m_textEntry
WPSEntry m_textEntry
the cell string
Definition: WKSContentListener.h:153
QuattroSpreadsheetInternal::Spreadsheet::setRowHeights
void setRowHeights(int minRow, int maxRow, int h)
set the rows size in TWIP
Definition: QuattroSpreadsheet.cpp:350
QuattroSpreadsheetInternal::Spreadsheet::Spreadsheet
Spreadsheet(int id, libwps_tools_win::Font::Type fontType)
a constructor
Definition: QuattroSpreadsheet.cpp:265
QuattroSpreadsheet::readRowRangeSize
bool readRowRangeSize(std::shared_ptr< WPSStream > const &stream)
reads the row size: zone 105,106
Definition: QuattroSpreadsheet.cpp:1230
QuattroSpreadsheetInternal::State::getSheet
std::shared_ptr< Spreadsheet > getSheet(int id, libwps_tools_win::Font::Type fontType)
returns the ith real spreadsheet
Definition: QuattroSpreadsheet.cpp:491
QuattroSpreadsheet::version
int version() const
return the file version
Definition: QuattroSpreadsheet.cpp:560
QuattroSpreadsheet::updateState
void updateState()
update the state (need to be called before sending data)
Definition: QuattroSpreadsheet.cpp:556
WPSCell
a structure used to defined the cell position, and a format
Definition: WPSCell.h:290
libwps::DebugStream
Definition: WPSDebug.h:191
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
QuattroSpreadsheetInternal::Spreadsheet::m_positionToCellMap
std::map< Vec2i, Cell > m_positionToCellMap
a map cell to not empty cells
Definition: QuattroSpreadsheet.cpp:470
WPSBorder
a border list
Definition: libwps_internal.h:394
QuattroParser::sendGraphics
bool sendGraphics(int sheetId, Vec2i const &cell) const
send the graphic corresponding to a cell
Definition: Quattro.cpp:561
QuattroSpreadsheetInternal::Style::m_fileFormat
int m_fileFormat
the file format
Definition: QuattroSpreadsheet.cpp:78
QuattroSpreadsheetInternal::Spreadsheet::m_widthDefault
float m_widthDefault
the default width size in point
Definition: QuattroSpreadsheet.cpp:468
QuattroParser
This class parses Quattro Pro spreadsheet: .wb1, ..., .wb3.
Definition: Quattro.h:53
libwps_tools_win.h
QuattroSpreadsheetInternal::Cell
a cellule of a Quattro spreadsheet
Definition: QuattroSpreadsheet.cpp:110
WPSVec3i
WPSVec3< int > WPSVec3i
WPSVec3 of int.
Definition: libwps_internal.h:1067
QuattroSpreadsheetInternal::Spreadsheet::getRowHeight
float getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: QuattroSpreadsheet.cpp:376
QuattroSpreadsheet::getReadCellReferenceFunction
QuattroFormulaManager::CellReferenceFunction getReadCellReferenceFunction()
returns the function to read a cell's reference
Definition: QuattroSpreadsheet.cpp:567
libwps::readU16
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
libwps_tools_win::Language::name
std::string name(long id)
returns the name given Windows© id
Definition: libwps_tools_win.cpp:7332
QuattroParser::getDefaultFontType
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Quattro.cpp:490
QuattroSpreadsheetInternal::State::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the ith spreadsheet
Definition: QuattroSpreadsheet.cpp:508
WPSBorder::Double
Definition: libwps_internal.h:399
QuattroSpreadsheet::getNumSpreadsheets
int getNumSpreadsheets() const
returns the number of spreadsheet
Definition: QuattroSpreadsheet.cpp:577
WPSCell::position
Vec2i & position()
position accessor
Definition: WPSCell.h:330
QuattroFormulaManager
a class to read formula in a wb1-wb3, qpw file
Definition: QuattroFormula.h:76
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
QuattroSpreadsheetInternal::Cell::m_stream
std::shared_ptr< WPSStream > m_stream
the text stream(used to send text's zone)
Definition: QuattroSpreadsheet.cpp:243
WPSCellFormat::getFont
const WPSFont & getFont() const
returns the font
Definition: WPSCell.h:99
WPSBorder::LeftBit
Definition: libwps_internal.h:401
WPSBorder::m_type
Type m_type
the border repetition
Definition: libwps_internal.h:448
WPSDebug.h
libwps::DebugFile::addDelimiter
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
QuattroSpreadsheetInternal::State::m_idToUserFormatMap
std::map< int, librevenge::RVNGString > m_idToUserFormatMap
map id to user format string
Definition: QuattroSpreadsheet.cpp:533
QuattroParser::getFont
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: Quattro.cpp:581
WPSCellFormat::setDigits
void setDigits(int newDigit)
set the number of digits ( for a number)
Definition: WPSCell.h:186
QuattroSpreadsheetInternal::Style::~Style
~Style() final
destructor
Definition: QuattroSpreadsheet.cpp:85
QuattroSpreadsheetInternal::State::m_spreadsheetMap
std::map< int, std::shared_ptr< Spreadsheet > > m_spreadsheetMap
the map of spreadsheet
Definition: QuattroSpreadsheet.cpp:529
QuattroSpreadsheetInternal::Spreadsheet::m_rowHeightMap
std::map< Vec2i, int > m_rowHeightMap
the map Vec2i(min row, max row) to size in TWIP
Definition: QuattroSpreadsheet.cpp:462
libwps::read16
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
libwps_internal.h
WPSRowFormat
Definition: WPSTable.h:100
WKSContentListener::FormulaInstruction::m_positionRelative
Vec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: WKSContentListener.h:87
WKSContentListener.h
WKSContentListener::CellContent::C_TEXT
Definition: WKSContentListener.h:102
WPSCellFormat::F_DATE
Definition: WPSCell.h:54
WPSColor
the class to store a color
Definition: libwps_internal.h:280
QuattroSpreadsheet::m_mainParser
QuattroParser & m_mainParser
the listener (if set)
Definition: QuattroSpreadsheet.h:134
QuattroSpreadsheet::getPosition
Vec2f getPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition: QuattroSpreadsheet.cpp:591
WPSStream.h
WKSContentListener::CellContent::C_NONE
Definition: WKSContentListener.h:102
Vec2b
Vec2< bool > Vec2b
Vec2 of bool.
Definition: libwps_internal.h:700
WKSContentListener::CellContent
small class use to define a sheet cell content
Definition: WKSContentListener.h:99
QuattroSpreadsheetInternal::State::State
State(QuattroFormulaManager::CellReferenceFunction const &readCellReference)
constructor
Definition: QuattroSpreadsheet.cpp:479
QuattroSpreadsheetInternal::Style::m_fontType
libwps_tools_win::Font::Type m_fontType
font encoding type
Definition: QuattroSpreadsheet.cpp:76
QuattroSpreadsheetInternal::Cell::operator<<
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: QuattroSpreadsheet.cpp:252
libwps::DebugFile
Definition: WPSDebug.h:207
QuattroSpreadsheetInternal::Spreadsheet::setRowHeight
void setRowHeight(int row, int h)
set the rows size in TWIP
Definition: QuattroSpreadsheet.cpp:338
QuattroSpreadsheet.h
QuattroSpreadsheet::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition: QuattroSpreadsheet.cpp:586
WPSCellFormat::compare
int compare(WPSCellFormat const &cell, bool onlyNumbering=false) const
a comparison function
Definition: WPSCell.cpp:366
QuattroSpreadsheetInternal::State
the state of QuattroSpreadsheet
Definition: QuattroSpreadsheet.cpp:476
WKSContentListener::FormulaInstruction::F_CellList
Definition: WKSContentListener.h:59
WKSContentListener::CellContent::C_NUMBER
Definition: WKSContentListener.h:102
WPSColor::black
static WPSColor black()
return the back color
Definition: libwps_internal.h:306
QuattroSpreadsheetInternal::Spreadsheet::m_dummyCell
Cell m_dummyCell
a dummy cell
Definition: QuattroSpreadsheet.cpp:472
QuattroSpreadsheet::readRowSize
bool readRowSize(std::shared_ptr< WPSStream > const &stream)
reads the row size: zone d6,d7
Definition: QuattroSpreadsheet.cpp:1181
QuattroSpreadsheet::m_state
std::shared_ptr< QuattroSpreadsheetInternal::State > m_state
the internal state
Definition: QuattroSpreadsheet.h:136
WPSCellFormat::HALIGN_CENTER
Definition: WPSCell.h:46
QuattroSpreadsheet::readCell
bool readCell(std::shared_ptr< WPSStream > const &stream)
reads a cell content data: zone 0xc-0x10 or 33
Definition: QuattroSpreadsheet.cpp:628

Generated on Tue Jan 21 2020 02:24:44 for libwps by doxygen 1.8.16