QuattroDosSpreadsheet.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_DOS_SPREADSHEET_H
23 #define QUATTRO_DOS_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 
37 {
38 class Cell;
39 class SpreadSheet;
40 struct State;
41 }
42 
43 class QuattroDosParser;
44 
50 {
51 public:
52  friend class QuattroDosParser;
53 
55  explicit QuattroDosSpreadsheet(QuattroDosParser &parser);
60  {
61  m_listener = listen;
62  }
63 
64 protected:
66  bool checkFilePosition(long pos);
68  int version() const;
69 
71  int getNumSpreadsheets() const;
73  librevenge::RVNGString getSheetName(int id) const;
75  void sendSpreadsheet(int sId, std::map<Vec2i,Vec2i> const &chartCellMap);
76 
78  void sendCellContent(QuattroDosSpreadsheetInternal::Cell const &cell, int cellChartSheetId=-1, Vec2f const &chartSize=Vec2f());
79 
81 
83  bool readSpreadsheetOpen();
85  bool readSpreadsheetClose();
86 
87  //
88  // low level
89  //
91 
93  bool readCell();
95  bool readCellFormulaResult();
97  bool readSheetSize();
99  bool readSpreadsheetName();
101  bool readColumnSize();
103  bool readRowSize();
105  bool readHiddenColumns();
106 
108  bool readCellProperty();
110  bool readCellStyle();
112  bool readUserStyle();
113 
114  /* reads a cell */
115  bool readCell(Vec2i actPos, WKSContentListener::FormulaInstruction &instr, bool hasSheetId=false, int sheetId=0);
116  /* reads a formula */
117  bool readFormula(long endPos, Vec2i const &pos, int sheetId,
118  std::vector<WKSContentListener::FormulaInstruction> &formula, std::string &error);
119 
120 private:
121  QuattroDosSpreadsheet(QuattroDosSpreadsheet const &orig) = delete;
125  {
126  return m_asciiFile;
127  }
130  std::shared_ptr<WKSContentListener> m_listener;
134  std::shared_ptr<QuattroDosSpreadsheetInternal::State> m_state;
137 };
138 
139 #endif /* WPS4_H */
140 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
QuattroDosSpreadsheet::readCellProperty
bool readCellProperty()
reads a Quattro Pro property (zone 0x9d)
Definition: QuattroDosSpreadsheet.cpp:989
QuattroDosSpreadsheetInternal::Spreadsheet::m_rowHeightMap
std::map< Vec2i, int > m_rowHeightMap
the map Vec2i(min row, max row) to size in points
Definition: QuattroDosSpreadsheet.cpp:493
WKSContentListener::FormulaInstruction::F_Text
Definition: WKSContentListener.h:59
QuattroDosSpreadsheetInternal::Style
a class used to store a style of a cell in QuattroDosSpreadsheet
Definition: QuattroDosSpreadsheet.cpp:50
QuattroDosSpreadsheetInternal::Spreadsheet::empty
bool empty() const
returns true if the spreedsheet is empty
Definition: QuattroDosSpreadsheet.cpp:479
QuattroDosSpreadsheetInternal::Spreadsheet::compressRowHeights
void compressRowHeights()
try to compress the list of row height
Definition: QuattroDosSpreadsheet.cpp:445
WPSCellFormat::F_BOOLEAN
Definition: WPSCell.h:54
QuattroDosSpreadsheetInternal::Spreadsheet::Type
Type
the spreadsheet type
Definition: QuattroDosSpreadsheet.cpp:299
QuattroDosSpreadsheetInternal::Functions::m_name
const char * m_name
Definition: QuattroDosSpreadsheet.cpp:1802
QuattroDosSpreadsheet::m_listener
std::shared_ptr< WKSContentListener > m_listener
Definition: QuattroDosSpreadsheet.h:130
WKSContentListener::FormulaInstruction::m_fileName
librevenge::RVNGString m_fileName
the file name (external reference)
Definition: WKSContentListener.h:96
QuattroDosSpreadsheetInternal::State::m_spreadsheetList
std::vector< std::shared_ptr< Spreadsheet > > m_spreadsheetList
the list of spreadsheet ( first: main spreadsheet, other report spreadsheet )
Definition: QuattroDosSpreadsheet.cpp:584
QuattroDosSpreadsheetInternal::State::m_eof
long m_eof
the last file position
Definition: QuattroDosSpreadsheet.cpp:577
libwps::DebugStream::str
static std::string str()
Definition: WPSDebug.h:200
QuattroDosSpreadsheetInternal::Spreadsheet::m_type
Type m_type
the spreadsheet type
Definition: QuattroDosSpreadsheet.cpp:484
WKSContentListener::FormulaInstruction::F_Long
Definition: WKSContentListener.h:59
WKSContentListener::CellContent::C_FORMULA
Definition: WKSContentListener.h:102
QuattroDosSpreadsheetInternal::Cell
a cellule of a Quattro spreadsheet
Definition: QuattroDosSpreadsheet.cpp:151
WPS_BOLD_BIT
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
libwps::DebugFile::addPos
static void addPos(long)
Definition: WPSDebug.h:220
QuattroDosSpreadsheetInternal::Spreadsheet::m_widthDefault
int m_widthDefault
the default width size in point
Definition: QuattroDosSpreadsheet.cpp:497
WKSContentListener::FormulaInstruction::F_Cell
Definition: WKSContentListener.h:59
QuattroDosSpreadsheet::readSpreadsheetName
bool readSpreadsheetName()
reads a sheet name (zone 0xde), unused...
Definition: QuattroDosSpreadsheet.cpp:1626
QuattroDosSpreadsheetInternal::Functions::m_arity
int m_arity
Definition: QuattroDosSpreadsheet.cpp:1803
WPSEntry::end
long end() const
returns the end offset
Definition: WPSEntry.h:76
WPSCell.h
QuattroDosSpreadsheet::readHiddenColumns
bool readHiddenColumns()
reads the list of hidden columns zone ( unused )
Definition: QuattroDosSpreadsheet.cpp:760
QuattroDosSpreadsheet::checkFilePosition
bool checkFilePosition(long pos)
return true if the pos is in the file, update the file size if need
Definition: QuattroDosSpreadsheet.cpp:612
libwps_tools_win::Font::Type
Type
enum Type
Definition: libwps_tools_win.h:46
QuattroDosSpreadsheet::readCellStyle
bool readCellStyle()
reads a Quattro Pro cell styles (zone 0xd8)
Definition: QuattroDosSpreadsheet.cpp:801
QuattroDosSpreadsheet::m_mainParser
QuattroDosParser & m_mainParser
the listener (if set)
Definition: QuattroDosSpreadsheet.h:132
QuattroDosSpreadsheet::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition: QuattroDosSpreadsheet.cpp:629
QuattroDosSpreadsheetInternal::State::m_styleManager
StyleManager m_styleManager
the style manager
Definition: QuattroDosSpreadsheet.cpp:581
WPSTable.h
WPS_UNDERLINE_BIT
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
QuattroDosSpreadsheetInternal::State::getMaximalSheet
int getMaximalSheet(Spreadsheet::Type type=Spreadsheet::T_Spreadsheet) const
returns the maximal spreadsheet
Definition: QuattroDosSpreadsheet.cpp:521
WPSCellFormat::HALIGN_DEFAULT
Definition: WPSCell.h:47
WKSContentListener::FormulaInstruction::F_Operator
Definition: WKSContentListener.h:59
QuattroDosSpreadsheet::readSpreadsheetOpen
bool readSpreadsheetOpen()
reads a sheet header zone 0:dc (Quattro Pro wq2)
Definition: QuattroDosSpreadsheet.cpp:1654
QuattroDosSpreadsheetInternal::Style::operator=
Style & operator=(Style const &)=default
WPSBorder::BottomBit
Definition: libwps_internal.h:401
WKSContentListener::FormulaInstruction::F_Double
Definition: WKSContentListener.h:59
WKSContentListener::FormulaInstruction::m_longValue
double m_longValue
value ( if type==F_Long )
Definition: WKSContentListener.h:81
QuattroDosParser::getDefaultFontType
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: QuattroDos.cpp:239
WKSContentListener::FormulaInstruction::F_Function
Definition: WKSContentListener.h:59
QuattroDosSpreadsheet::sendSpreadsheet
void sendSpreadsheet(int sId, std::map< Vec2i, Vec2i > const &chartCellMap)
send the sId'th spreadsheet
Definition: QuattroDosSpreadsheet.cpp:2210
WPSColumnFormat
Definition: WPSTable.h:39
QuattroDosSpreadsheet::m_input
RVNGInputStreamPtr m_input
the input
Definition: QuattroDosSpreadsheet.h:129
WPSBorder::m_width
int m_width
the border width
Definition: libwps_internal.h:450
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
QuattroDosSpreadsheetInternal::Spreadsheet::T_Report
Definition: QuattroDosSpreadsheet.cpp:299
QuattroDosSpreadsheet::~QuattroDosSpreadsheet
~QuattroDosSpreadsheet()
destructor
Definition: QuattroDosSpreadsheet.cpp:601
QuattroDosSpreadsheetInternal::operator<<
std::ostream & operator<<(std::ostream &o, Style const &style)
operator<<
Definition: QuattroDosSpreadsheet.cpp:86
QuattroDosSpreadsheetInternal::State::pushNewSheet
void pushNewSheet(std::shared_ptr< Spreadsheet > sheet)
create a new sheet and stack id
Definition: QuattroDosSpreadsheet.cpp:555
QuattroDosSpreadsheetInternal::Cell::operator<<
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: QuattroDosSpreadsheet.cpp:285
QuattroDosSpreadsheetInternal::State::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the ith spreadsheet
Definition: QuattroDosSpreadsheet.cpp:543
WKSContentListener::FormulaInstruction::m_doubleValue
double m_doubleValue
value ( if type==F_Double )
Definition: WKSContentListener.h:83
WPSCellFormat::setFormat
void setFormat(FormatType form, int subForm=0)
sets the format type
Definition: WPSCell.h:167
QuattroDosSpreadsheetInternal::Spreadsheet::T_Filter
Definition: QuattroDosSpreadsheet.cpp:299
QuattroDosSpreadsheetInternal::Cell::send
bool send(WPSListenerPtr &) final
call when a cell must be send
Definition: QuattroDosSpreadsheet.cpp:279
WPSCellFormat::HALIGN_RIGHT
Definition: WPSCell.h:46
WPSFont
define the font properties
Definition: WPSFont.h:36
QuattroDosSpreadsheetInternal::Style::Style
Style(libwps_tools_win::Font::Type type)
construtor
Definition: QuattroDosSpreadsheet.cpp:53
WPSEntry::valid
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:87
WPS_ITALICS_BIT
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
QuattroDosSpreadsheetInternal::Spreadsheet::getWidths
std::vector< WPSColumnFormat > getWidths() const
return the columns format
Definition: QuattroDosSpreadsheet.cpp:357
QuattroDosSpreadsheet::readCell
bool readCell()
reads a cell content data
Definition: QuattroDosSpreadsheet.cpp:1388
Vec2i
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
QuattroDosSpreadsheetInternal::State::getActualSheet
Spreadsheet & getActualSheet()
returns the actual sheet
Definition: QuattroDosSpreadsheet.cpp:550
WPSCell::setPosition
void setPosition(Vec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: WPSCell.h:340
QuattroDosSpreadsheet::version
int version() const
return the file version
Definition: QuattroDosSpreadsheet.cpp:605
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
WPSListenerPtr
std::shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition: libwps_internal.h:105
Vec2f
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
QuattroDosSpreadsheetInternal::State::popSheet
bool popSheet()
try to pop the actual sheet
Definition: QuattroDosSpreadsheet.cpp:566
QuattroDosSpreadsheetInternal::StyleManager::get
bool get(int id, Style &style) const
returns the style with id
Definition: QuattroDosSpreadsheet.cpp:123
QuattroDosSpreadsheetInternal::Style::m_fontType
libwps_tools_win::Font::Type m_fontType
font encoding type
Definition: QuattroDosSpreadsheet.cpp:74
QuattroDosSpreadsheetInternal::StyleManager::print
void print(int id, std::ostream &o) const
print a style
Definition: QuattroDosSpreadsheet.cpp:134
QuattroDosSpreadsheet::readSheetSize
bool readSheetSize()
reads sheet size
Definition: QuattroDosSpreadsheet.cpp:640
QuattroDosSpreadsheetInternal::Functions
Definition: QuattroDosSpreadsheet.cpp:1800
QuattroDosParser::version
int version() const
return the file version
Definition: QuattroDos.cpp:221
WKSContentListener::CellContent::C_UNKNOWN
Definition: WKSContentListener.h:102
Vec2< int >
QuattroDosSpreadsheet::readRowSize
bool readRowSize()
reads the column size ( in points )
Definition: QuattroDosSpreadsheet.cpp:681
WPSBorder::TopBit
Definition: libwps_internal.h:401
QuattroDosSpreadsheetInternal::State::m_spreadsheetStack
std::stack< std::shared_ptr< Spreadsheet > > m_spreadsheetStack
the stack of spreadsheet id
Definition: QuattroDosSpreadsheet.cpp:586
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
QuattroDosSpreadsheet::readColumnSize
bool readColumnSize()
reads the column size ( in ??? )
Definition: QuattroDosSpreadsheet.cpp:714
WPSFont::m_color
WPSColor m_color
the font color
Definition: WPSFont.h:89
WPSCellFormat::F_TIME
Definition: WPSCell.h:54
QuattroDosParser::readPString
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
QuattroDosSpreadsheetInternal::Spreadsheet::m_lastCellPos
Vec2i m_lastCellPos
the last cell position
Definition: QuattroDosSpreadsheet.cpp:501
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
QuattroDosSpreadsheetInternal::Spreadsheet::getZoneSize
Vec2f getZoneSize(Vec2i const &cell0, Vec2i const &cell1) const
return the size of the zone containning two cells
Definition: QuattroDosSpreadsheet.cpp:414
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
QuattroDosSpreadsheetInternal::Spreadsheet::m_numCols
int m_numCols
the number of columns
Definition: QuattroDosSpreadsheet.cpp:488
QuattroDosSpreadsheetInternal::Cell::m_content
WKSContentListener::CellContent m_content
the content
Definition: QuattroDosSpreadsheet.cpp:276
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
WPSCellFormat::m_font
WPSFont m_font
the cell font ( used in spreadsheet code )
Definition: WPSCell.h:262
QuattroDosSpreadsheet::m_asciiFile
libwps::DebugFile & m_asciiFile
the ascii file
Definition: QuattroDosSpreadsheet.h:136
WPSBorder::RightBit
Definition: libwps_internal.h:401
WPSEntry.h
QuattroDosSpreadsheetInternal::Spreadsheet::getRowHeight
float getRowHeight(int row) const
returns the row size in point
Definition: QuattroDosSpreadsheet.cpp:388
WPSFont::m_attributes
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:85
QuattroDosParser::sendChart
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
WPS_HIDDEN_BIT
#define WPS_HIDDEN_BIT
Definition: libwps_internal.h:516
libwps::DebugFile::addNote
static void addNote(char const *)
Definition: WPSDebug.h:221
QuattroDosSpreadsheetInternal::Spreadsheet::setColumnWidth
void setColumnWidth(int col, int w=-1)
set the columns size
Definition: QuattroDosSpreadsheet.cpp:348
QuattroDosParser::getFont
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: QuattroDos.cpp:265
WPSEntry::begin
long begin() const
returns the begin offset
Definition: WPSEntry.h:71
QuattroDosSpreadsheetInternal::State::getSheet
std::shared_ptr< Spreadsheet > getSheet(Spreadsheet::Type type, int id)
returns the ith real spreadsheet
Definition: QuattroDosSpreadsheet.cpp:532
QuattroDosSpreadsheetInternal::Cell::updateFormat
void updateFormat()
update the cell format using file format
Definition: QuattroDosSpreadsheet.cpp:174
QuattroDosSpreadsheet::QuattroDosSpreadsheet
QuattroDosSpreadsheet(QuattroDosParser &parser)
constructor
Definition: QuattroDosSpreadsheet.cpp:592
QuattroDosSpreadsheetInternal::Cell::m_fontType
libwps_tools_win::Font::Type m_fontType
font encoding type
Definition: QuattroDosSpreadsheet.cpp:272
libwps::read8
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
WPSFont::m_size
double m_size
font size
Definition: WPSFont.h:83
QuattroDosSpreadsheetInternal::Spreadsheet::m_widthCols
std::vector< int > m_widthCols
the column size in TWIP (?)
Definition: QuattroDosSpreadsheet.cpp:491
WPSCellFormat
a structure used to defined the cell format
Definition: WPSCell.h:40
QuattroDosSpreadsheetInternal::Style::m_extra
std::string m_extra
extra data
Definition: QuattroDosSpreadsheet.cpp:78
QuattroDosSpreadsheetInternal::Cell::Cell
Cell(libwps_tools_win::Font::Type type)
constructor
Definition: QuattroDosSpreadsheet.cpp:155
QuattroDosSpreadsheetInternal::Style::m_fileFormat
int m_fileFormat
the file format
Definition: QuattroDosSpreadsheet.cpp:76
QuattroDosSpreadsheetInternal::Spreadsheet::m_id
int m_id
the spreadsheet id
Definition: QuattroDosSpreadsheet.cpp:486
QuattroDosSpreadsheet
This class parses Quattro Pro DOS spreadsheet file.
Definition: QuattroDosSpreadsheet.h:49
WPSColumnFormat::m_numRepeat
int m_numRepeat
the number times a column is repeated
Definition: WPSTable.h:92
QuattroDosSpreadsheet::readSpreadsheetClose
bool readSpreadsheetClose()
reads a sheet header zone 0:dd (Quattro Pro wq2)
Definition: QuattroDosSpreadsheet.cpp:1694
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
WKSContentListener::CellContent::m_textEntry
WPSEntry m_textEntry
the cell string
Definition: WKSContentListener.h:153
QuattroDosSpreadsheetInternal::Cell::sendContent
bool sendContent(WPSListenerPtr &) final
call when the content of a cell must be send
Definition: QuattroDosSpreadsheet.cpp:167
QuattroDosSpreadsheetInternal::State
the state of QuattroDosSpreadsheet
Definition: QuattroDosSpreadsheet.cpp:508
QuattroDosSpreadsheetInternal::Spreadsheet::getLastCell
Cell * getLastCell()
returns the last cell
Definition: QuattroDosSpreadsheet.cpp:326
WPSCell
a structure used to defined the cell position, and a format
Definition: WPSCell.h:290
QuattroDosSpreadsheetInternal::Spreadsheet::setRowHeight
void setRowHeight(int row, int h)
set the rows size
Definition: QuattroDosSpreadsheet.cpp:408
libwps::DebugStream
Definition: WPSDebug.h:191
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
QuattroDosSpreadsheetInternal::s_listFunctions
static const Functions s_listFunctions[]
Definition: QuattroDosSpreadsheet.cpp:1806
WPSBorder
a border list
Definition: libwps_internal.h:394
QuattroDosSpreadsheetInternal::State::State
State()
constructor
Definition: QuattroDosSpreadsheet.cpp:511
QuattroDosSpreadsheetInternal::StyleManager
the style manager
Definition: QuattroDosSpreadsheet.cpp:107
QuattroDosSpreadsheetInternal::Style::~Style
~Style() final
destructor
Definition: QuattroDosSpreadsheet.cpp:81
QuattroDosSpreadsheet::getNumSpreadsheets
int getNumSpreadsheets() const
returns the number of spreadsheet
Definition: QuattroDosSpreadsheet.cpp:624
QuattroDosSpreadsheetInternal::Spreadsheet::m_positionToCellMap
std::map< Vec2i, Cell > m_positionToCellMap
a map cell to not empty cells
Definition: QuattroDosSpreadsheet.cpp:499
QuattroDosSpreadsheetInternal::StyleManager::m_idStyleMap
std::map< int, Style > m_idStyleMap
the styles
Definition: QuattroDosSpreadsheet.cpp:147
QuattroDosSpreadsheetInternal::Spreadsheet::insertChartPositions
void insertChartPositions(std::map< Vec2i, Vec2i > const &chartPosMap, libwps_tools_win::Font::Type type)
Definition: QuattroDosSpreadsheet.cpp:332
QuattroDosSpreadsheet::readFormula
bool readFormula(long endPos, Vec2i const &pos, int sheetId, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error)
Definition: QuattroDosSpreadsheet.cpp:1856
libwps_tools_win.h
WPSCellFormat::hasBorders
bool hasBorders() const
return true if the cell has some border
Definition: WPSCell.h:204
QuattroDos.h
QuattroDosSpreadsheetInternal::Spreadsheet::m_heightDefault
int m_heightDefault
the default row size in point
Definition: QuattroDosSpreadsheet.cpp:495
QuattroDosSpreadsheet::readUserStyle
bool readUserStyle()
reads a Quattro Pro style ( zone 0xc9)
Definition: QuattroDosSpreadsheet.cpp:1129
WKSContentListener::FormulaInstruction::m_content
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: WKSContentListener.h:79
QuattroDosParser
This class parses Quattro Pro spreadsheet: .wq1 and wq2.
Definition: QuattroDos.h:48
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
WPSBorder::Double
Definition: libwps_internal.h:399
QuattroDosSpreadsheetInternal::Spreadsheet::T_Spreadsheet
Definition: QuattroDosSpreadsheet.cpp:299
WPSCell::position
Vec2i & position()
position accessor
Definition: WPSCell.h:330
QuattroDosSpreadsheetInternal::Spreadsheet::m_rowPageBreaksList
std::vector< int > m_rowPageBreaksList
the list of row page break
Definition: QuattroDosSpreadsheet.cpp:503
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
QuattroDosSpreadsheet::readCellFormulaResult
bool readCellFormulaResult()
reads the result of a text formula
Definition: QuattroDosSpreadsheet.cpp:1585
WPSCellFormat::getFont
const WPSFont & getFont() const
returns the font
Definition: WPSCell.h:99
WPSCellFormat::borders
const std::vector< WPSBorder > & borders() const
return the cell border: libwps::LeftBit | ...
Definition: WPSCell.h:210
WPSBorder::LeftBit
Definition: libwps_internal.h:401
QuattroDosSpreadsheetInternal::Spreadsheet
the spreadsheet of a QuattroDos Spreadsheet
Definition: QuattroDosSpreadsheet.cpp:295
WPSBorder::m_type
Type m_type
the border repetition
Definition: libwps_internal.h:448
QuattroDosSpreadsheetInternal::StyleManager::add
void add(int id, Style const &st)
add a new style and returns its id
Definition: QuattroDosSpreadsheet.cpp:113
WPSDebug.h
libwps::DebugFile::addDelimiter
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
WPSCellFormat::setDigits
void setDigits(int newDigit)
set the number of digits ( for a number)
Definition: WPSCell.h:186
QuattroDosSpreadsheetInternal::Spreadsheet::getRowHeight
float getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: QuattroDosSpreadsheet.cpp:396
QuattroDosSpreadsheetInternal::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: QuattroDosSpreadsheet.cpp:314
libwps::read16
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
QuattroDosSpreadsheet::ascii
libwps::DebugFile & ascii()
returns the debug file
Definition: QuattroDosSpreadsheet.h:124
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
QuattroDosSpreadsheetInternal::State::m_version
int m_version
the file version
Definition: QuattroDosSpreadsheet.cpp:579
QuattroDosSpreadsheet::operator=
QuattroDosSpreadsheet & operator=(QuattroDosSpreadsheet const &orig)=delete
WKSContentListener::CellContent::C_NONE
Definition: WKSContentListener.h:102
QuattroDosSpreadsheetInternal::Spreadsheet::Spreadsheet
Spreadsheet(Type type=T_Spreadsheet, int id=0)
a constructor
Definition: QuattroDosSpreadsheet.cpp:302
Vec2b
Vec2< bool > Vec2b
Vec2 of bool.
Definition: libwps_internal.h:700
QuattroDosSpreadsheet::setListener
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: QuattroDosSpreadsheet.h:59
WKSContentListener::CellContent
small class use to define a sheet cell content
Definition: WKSContentListener.h:99
QuattroDosSpreadsheet::sendCellContent
void sendCellContent(QuattroDosSpreadsheetInternal::Cell const &cell, int cellChartSheetId=-1, Vec2f const &chartSize=Vec2f())
send the cell data
Definition: QuattroDosSpreadsheet.cpp:2263
libwps::DebugFile
Definition: WPSDebug.h:207
WPSCellFormat::compare
int compare(WPSCellFormat const &cell, bool onlyNumbering=false) const
a comparison function
Definition: WPSCell.cpp:366
QuattroDosSpreadsheetInternal::Cell::m_fileFormat
int m_fileFormat
the file format
Definition: QuattroDosSpreadsheet.cpp:274
WKSContentListener::FormulaInstruction::F_CellList
Definition: WKSContentListener.h:59
WPSCellFormat::backgroundColor
WPSColor backgroundColor() const
returns the background color
Definition: WPSCell.h:230
QuattroDosSpreadsheetInternal
Definition: QuattroDosSpreadsheet.cpp:45
QuattroDosSpreadsheetInternal::StyleManager::StyleManager
StyleManager()
Definition: QuattroDosSpreadsheet.cpp:110
QuattroDosSpreadsheetInternal::Style::operator==
bool operator==(Style const &st) const
operator==
Definition: QuattroDosSpreadsheet.cpp:97
QuattroDosParser::getColor
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: QuattroDos.cpp:260
WKSContentListener::CellContent::C_NUMBER
Definition: WKSContentListener.h:102
WPSColor::black
static WPSColor black()
return the back color
Definition: libwps_internal.h:306
QuattroDosSpreadsheet.h
QuattroDosSpreadsheet::m_state
std::shared_ptr< QuattroDosSpreadsheetInternal::State > m_state
the internal state
Definition: QuattroDosSpreadsheet.h:134
WPSCellFormat::HALIGN_CENTER
Definition: WPSCell.h:46

Generated on Wed Jul 24 2024 03:39:20 for libwps by doxygen 1.8.16