Quattro9Spreadsheet.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 QUATTRO9_SPREADSHEET_H
23 #define QUATTRO9_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 struct CellData;
41 class SpreadSheet;
42 struct State;
43 }
44 
45 namespace Quattro9ParserInternal
46 {
47 struct TextEntry;
48 }
49 
50 class Quattro9Parser;
51 
57 {
58 public:
59  friend class Quattro9Parser;
60 
62  explicit Quattro9Spreadsheet(Quattro9Parser &parser);
67  {
68  m_listener = listen;
69  }
71  void cleanState();
73  void updateState();
74 
75 protected:
77  int version() const;
80 
82  int getNumSpreadsheets() const;
84  librevenge::RVNGString getSheetName(int id) const;
86  void sendSpreadsheet(int sheetId);
88  Vec2f getPosition(int sheetId, Vec2i const &cell) const;
90  void addDLLIdName(int id, librevenge::RVNGString const &name, bool func1);
92  void addUserFormat(int id, librevenge::RVNGString const &name);
94  void addDocumentStrings(std::shared_ptr<WPSStream> const &stream,
95  std::vector<Quattro9ParserInternal::TextEntry> const &entries);
96 
97  //
98  // low level
99  //
100 
102  void sendCellContent(Quattro9SpreadsheetInternal::CellData const *cell, Vec2i pos, int sheetId, int numRepeated);
103 
105  bool readCellStyles(std::shared_ptr<WPSStream> const &stream);
107  bool readDocumentFormulas(std::shared_ptr<WPSStream> const &stream);
109  bool readBeginSheet(std::shared_ptr<WPSStream> const &stream, int &sheetId);
111  bool readEndSheet(std::shared_ptr<WPSStream> const &stream);
113  static bool readPageBreak(std::shared_ptr<WPSStream> const &stream);
115  bool readMergedCells(std::shared_ptr<WPSStream> const &stream);
117  bool readColRowDefault(std::shared_ptr<WPSStream> const &stream);
119  bool readColRowDimension(std::shared_ptr<WPSStream> const &stream);
121  bool readColRowDimensions(std::shared_ptr<WPSStream> const &stream);
123  bool readBeginColumn(std::shared_ptr<WPSStream> const &stream);
125  bool readEndColumn(std::shared_ptr<WPSStream> const &stream);
127  bool readCellList(std::shared_ptr<WPSStream> const &stream);
129  bool readCellResult(std::shared_ptr<WPSStream> const &stream);
130 
131  /* reads a cell */
132  static bool readCell(std::shared_ptr<WPSStream> const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName);
134  bool readCellReference(std::shared_ptr<WPSStream> const &stream, long endPos,
136  Vec2i const &pos=Vec2i(0,0), int sheetId=0) const;
138 
139 private:
140  Quattro9Spreadsheet(Quattro9Spreadsheet const &orig) = delete;
141  Quattro9Spreadsheet &operator=(Quattro9Spreadsheet const &orig) = delete;
142  std::shared_ptr<WKSContentListener> m_listener;
146  std::shared_ptr<Quattro9SpreadsheetInternal::State> m_state;
147 };
148 
149 #endif /* WPS4_H */
150 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WKSContentListener::FormulaInstruction::F_Text
@ F_Text
Definition: WKSContentListener.h:59
Quattro9Spreadsheet::readBeginSheet
bool readBeginSheet(std::shared_ptr< WPSStream > const &stream, int &sheetId)
read the begin sheet zone: zone 601
Definition: Quattro9Spreadsheet.cpp:1259
WPSColor::white
static WPSColor white()
return the white color
Definition: libwps_internal.h:311
WPSCellFormat::F_BOOLEAN
@ F_BOOLEAN
Definition: WPSCell.h:54
QuattroFormula.h
Quattro9SpreadsheetInternal::CellData::m_flagList
std::vector< int > m_flagList
a list of flag (for formula)
Definition: Quattro9Spreadsheet.cpp:375
Quattro9SpreadsheetInternal::Spreadsheet::update
void update()
update the spreadsheet: check for merged cell, ...
Definition: Quattro9Spreadsheet.cpp:460
WKSContentListener::FormulaInstruction::m_fileName
librevenge::RVNGString m_fileName
the file name (external reference)
Definition: WKSContentListener.h:96
WKSContentListener::CellContent::m_formula
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: WKSContentListener.h:155
QuattroFormulaInternal::CellReference
small class use to store Quattro Pro cell reference (.wb1-3 and qpw)
Definition: QuattroFormula.h:42
Quattro9SpreadsheetInternal::Spreadsheet::setColRowSize
void setColRowSize(int which, int pos, int w)
set the col/row size in TWIP
Definition: Quattro9Spreadsheet.cpp:585
libwps::DebugStream::str
static std::string str()
Definition: WPSDebug.h:200
Quattro9Spreadsheet::operator=
Quattro9Spreadsheet & operator=(Quattro9Spreadsheet const &orig)=delete
WPSCellFormat::HALIGN_FULL
@ HALIGN_FULL
Definition: WPSCell.h:47
WKSContentListener::CellContent::C_FORMULA
@ C_FORMULA
Definition: WKSContentListener.h:102
WPSCellFormat::VALIGN_CENTER
@ VALIGN_CENTER
Definition: WPSCell.h:50
libwps::DebugFile::addPos
static void addPos(long)
Definition: WPSDebug.h:220
Quattro9SpreadsheetInternal::CellData::m_type
int m_type
the cell type
Definition: Quattro9Spreadsheet.cpp:363
WKSContentListener::FormulaInstruction::F_Cell
@ F_Cell
Definition: WKSContentListener.h:59
Quattro9Spreadsheet::m_listener
std::shared_ptr< WKSContentListener > m_listener
Definition: Quattro9Spreadsheet.h:142
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
WPSCellFormat::WRAP_WRAP
@ WRAP_WRAP
Definition: WPSCell.h:52
WPSCell.h
Quattro9SpreadsheetInternal::Style::m_fileFormat
int m_fileFormat
the file format
Definition: Quattro9Spreadsheet.cpp:76
WPSEntry::setLength
void setLength(long l)
sets the zone size
Definition: WPSEntry.h:62
Quattro9Spreadsheet::getPosition
Vec2f getPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition: Quattro9Spreadsheet.cpp:836
libwps_tools_win::Font::Type
Type
enum Type
Definition: libwps_tools_win.h:46
Quattro9SpreadsheetInternal::Spreadsheet::getColumn
Column & getColumn(int col)
returns a ref to column data (or to invalidColumn if called with bad column)
Definition: Quattro9Spreadsheet.cpp:661
Quattro9Spreadsheet::addDocumentStrings
void addDocumentStrings(std::shared_ptr< WPSStream > const &stream, std::vector< Quattro9ParserInternal::TextEntry > const &entries)
set the document strings list
Definition: Quattro9Spreadsheet.cpp:872
Quattro9Parser::getDefaultFontType
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Quattro9.cpp:422
Quattro9Spreadsheet
This class parses Quattro9 Pro spreadsheet file.
Definition: Quattro9Spreadsheet.h:56
WPSTable.h
Quattro9SpreadsheetInternal::Spreadsheet::getPosition
Vec2f getPosition(Vec2i const &cell) const
returns the cell position
Definition: Quattro9Spreadsheet.cpp:625
Quattro9SpreadsheetInternal::Spreadsheet::getCell
const CellData * getCell(Vec2i const &pos) const
returns the cell corresponding to a position (if it exist)
Definition: Quattro9Spreadsheet.cpp:715
Quattro9Spreadsheet::readBeginColumn
bool readBeginColumn(std::shared_ptr< WPSStream > const &stream)
read the begin column zone: zone a01
Definition: Quattro9Spreadsheet.cpp:1542
Quattro9ParserInternal::TextEntry::getString
librevenge::RVNGString getString(std::shared_ptr< WPSStream > const &stream, libwps_tools_win::Font::Type type=libwps_tools_win::Font::WIN3_WEUROPE) const
returns the string
Definition: Quattro9.cpp:280
Quattro9Spreadsheet::m_mainParser
Quattro9Parser & m_mainParser
the listener (if set)
Definition: Quattro9Spreadsheet.h:144
WPSBorder::BottomBit
@ BottomBit
Definition: libwps_internal.h:401
WKSContentListener::FormulaInstruction::m_sheetId
int m_sheetId[2]
the sheet id
Definition: WKSContentListener.h:94
Quattro9SpreadsheetInternal::CellData::CellData
CellData()
constructor
Definition: Quattro9Spreadsheet.cpp:236
Quattro9Spreadsheet::readCellStyles
bool readCellStyles(std::shared_ptr< WPSStream > const &stream)
reads a cell attribute: zone a
Definition: Quattro9Spreadsheet.cpp:892
Quattro9SpreadsheetInternal::Column::m_rowToCellResMap
std::map< int, std::pair< std::shared_ptr< WPSStream >, Quattro9ParserInternal::TextEntry > > m_rowToCellResMap
a map row to cell result
Definition: Quattro9Spreadsheet.cpp:443
WPSColumnFormat
Definition: WPSTable.h:39
WPSBorder::m_width
int m_width
the border width
Definition: libwps_internal.h:450
Quattro9Spreadsheet::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition: Quattro9Spreadsheet.cpp:847
Quattro9Spreadsheet::sendCellContent
void sendCellContent(Quattro9SpreadsheetInternal::CellData const *cell, Vec2i pos, int sheetId, int numRepeated)
send the cell data
Definition: Quattro9Spreadsheet.cpp:2045
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
Quattro9SpreadsheetInternal::Style::operator==
bool operator==(Style const &st) const
operator==
Definition: Quattro9Spreadsheet.cpp:99
Quattro9Spreadsheet::readColRowDimensions
bool readColRowDimensions(std::shared_ptr< WPSStream > const &stream)
read a col/row dimensions: zone 635, 636
Definition: Quattro9Spreadsheet.cpp:1430
Quattro9Spreadsheet::sendSpreadsheet
void sendSpreadsheet(int sheetId)
send the sheetId'th spreadsheet
Definition: Quattro9Spreadsheet.cpp:2011
WPSColor::isWhite
bool isWhite() const
return true if the color is white
Definition: libwps_internal.h:350
Quattro9Parser
This class parses Quattro Pro WP spreadsheet: .qpw.
Definition: Quattro9.h:89
WPSCellFormat::setFormat
void setFormat(FormatType form, int subForm=0)
sets the format type
Definition: WPSCell.h:167
WPSCellFormat::HALIGN_RIGHT
@ HALIGN_RIGHT
Definition: WPSCell.h:46
WPSFont
define the font properties
Definition: WPSFont.h:36
QuattroFormulaInternal::CellReference::addInstruction
void addInstruction(WKSContentListener::FormulaInstruction const &instr)
add an instruction
Definition: QuattroFormula.h:51
WPSEntry
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:38
Vec2i
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
Quattro9SpreadsheetInternal::Spreadsheet::m_mergedCellList
std::vector< WPSBox2i > m_mergedCellList
the merge cells
Definition: Quattro9Spreadsheet.cpp:729
WPSCell::setPosition
void setPosition(Vec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: WPSCell.h:340
Quattro9SpreadsheetInternal::State::m_stylesList
std::vector< Style > m_stylesList
the list of styles
Definition: Quattro9Spreadsheet.cpp:777
Quattro9SpreadsheetInternal::State::m_idToUserFormatMap
std::map< int, librevenge::RVNGString > m_idToUserFormatMap
map id to user format string
Definition: Quattro9Spreadsheet.cpp:783
Quattro9SpreadsheetInternal::Spreadsheet::m_invalidColumn
Column m_invalidColumn
a extra column used to return an invalid column
Definition: Quattro9Spreadsheet.cpp:734
Quattro9SpreadsheetInternal::CellData::getFlag
int getFlag(int row) const
returns the flag value corresponding to a row
Definition: Quattro9Spreadsheet.cpp:289
WKSContentListener::FormulaInstruction::m_type
What m_type
the type
Definition: WKSContentListener.h:77
Quattro9SpreadsheetInternal::Spreadsheet::m_colToColumnMap
std::map< int, Column > m_colToColumnMap
a map col to column data
Definition: Quattro9Spreadsheet.cpp:731
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
Quattro9Spreadsheet::readColRowDefault
bool readColRowDefault(std::shared_ptr< WPSStream > const &stream)
read a col/row default dimension: zone 631, 632
Definition: Quattro9Spreadsheet.cpp:1356
WPSBorder::m_color
WPSColor m_color
the border color
Definition: libwps_internal.h:456
Quattro9Spreadsheet::Quattro9Spreadsheet
Quattro9Spreadsheet(Quattro9Parser &parser)
constructor
Definition: Quattro9Spreadsheet.cpp:789
WPSGraphicStyle::Pattern::m_colors
WPSColor m_colors[2]
the two indexed colors
Definition: WPSGraphicStyle.h:190
Quattro9SpreadsheetInternal::Column::getCell
const CellData * getCell(int row) const
returns the cell corresponding to a row (if it exist)
Definition: Quattro9Spreadsheet.cpp:432
Quattro9SpreadsheetInternal::State
the state of Quattro9Spreadsheet
Definition: Quattro9Spreadsheet.cpp:738
QuattroFormulaInternal::CellReference::m_cells
std::vector< WKSContentListener::FormulaInstruction > m_cells
the list of instruction coding each cell's block
Definition: QuattroFormula.h:70
Quattro9.h
Vec2f
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
WPSGraphicStyle::Pattern::getAverageColor
bool getAverageColor(WPSColor &col) const
return the average color
Definition: WPSGraphicStyle.cpp:61
Quattro9SpreadsheetInternal::Spreadsheet::setColRowSizes
void setColRowSizes(int which, int minPos, int maxPos, int w)
set the col/row size in TWIP
Definition: Quattro9Spreadsheet.cpp:602
Quattro9SpreadsheetInternal::Style::~Style
~Style() final
destructor
Definition: Quattro9Spreadsheet.cpp:83
Quattro9Spreadsheet::readPageBreak
static bool readPageBreak(std::shared_ptr< WPSStream > const &stream)
read the page break zone: zone 617
Definition: Quattro9Spreadsheet.cpp:1508
Quattro9SpreadsheetInternal::Column::Column
Column()
constructor
Definition: Quattro9Spreadsheet.cpp:382
Quattro9Spreadsheet::readEndSheet
bool readEndSheet(std::shared_ptr< WPSStream > const &stream)
read the end sheet zone: zone 602
Definition: Quattro9Spreadsheet.cpp:1339
Quattro9SpreadsheetInternal::Spreadsheet
the spreadsheet of a Quattro Spreadsheet
Definition: Quattro9Spreadsheet.cpp:447
Quattro9Spreadsheet::m_state
std::shared_ptr< Quattro9SpreadsheetInternal::State > m_state
the internal state
Definition: Quattro9Spreadsheet.h:146
Vec2< int >
Quattro9SpreadsheetInternal::Style::m_extra
std::string m_extra
extra data
Definition: Quattro9Spreadsheet.cpp:80
Quattro9Parser::getExternalFileName
bool getExternalFileName(int fId, librevenge::RVNGString &fName) const
returns the name of the fId file
Definition: Quattro9.cpp:427
WPSBorder::TopBit
@ TopBit
Definition: libwps_internal.h:401
Quattro9Spreadsheet::readCellResult
bool readCellResult(std::shared_ptr< WPSStream > const &stream)
reads a cell result zone: zone c02
Definition: Quattro9Spreadsheet.cpp:1830
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
libwps::readU32
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
Quattro9Spreadsheet::version
int version() const
return the file version
Definition: Quattro9Spreadsheet.cpp:810
WPSFont::m_color
WPSColor m_color
the font color
Definition: WPSFont.h:91
Quattro9SpreadsheetInternal::CellData::getDouble
double getDouble(int row) const
returns the double value corresponding to a row
Definition: Quattro9Spreadsheet.cpp:252
WPSCellFormat::F_TIME
@ F_TIME
Definition: WPSCell.h:54
WPSEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: WPSEntry.h:57
Quattro9SpreadsheetInternal::operator<<
std::ostream & operator<<(std::ostream &o, Style const &style)
operator<<
Definition: Quattro9Spreadsheet.cpp:88
WPSCellFormat::F_NUMBER
@ 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
Quattro9SpreadsheetInternal::Column::updateListOfRows
void updateListOfRows(std::set< int > &rows) const
update a list of row (needed to know what row must be sent)
Definition: Quattro9Spreadsheet.cpp:415
Quattro9SpreadsheetInternal::Column::add
void add(int row, std::shared_ptr< WPSStream > const &stream, Quattro9ParserInternal::TextEntry const &entry)
add a cell result
Definition: Quattro9Spreadsheet.cpp:405
Quattro9ParserInternal::TextEntry
Definition: Quattro9.h:42
libwps_tools_win::Font::UNKNOWN
@ UNKNOWN
Definition: libwps_tools_win.h:63
Quattro9SpreadsheetInternal::Style::m_alignAcrossColumn
bool m_alignAcrossColumn
flag to know if we must align across column
Definition: Quattro9Spreadsheet.cpp:78
Quattro9Spreadsheet::readMergedCells
bool readMergedCells(std::shared_ptr< WPSStream > const &stream)
read the merged cell: zone 61d
Definition: Quattro9Spreadsheet.cpp:1469
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
WPSCellFormat::VALIGN_BOTTOM
@ VALIGN_BOTTOM
Definition: WPSCell.h:50
WPSBorder::Dot
@ Dot
Definition: libwps_internal.h:397
Quattro9SpreadsheetInternal::Column
Internal: a list of cell and result of Quattro9SpreadsheetInternal.
Definition: Quattro9Spreadsheet.cpp:379
WPSFont.h
WPSCellFormat::F_TEXT
@ 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
Quattro9SpreadsheetInternal::CellData::getInt
int getInt(int row) const
returns the int value corresponding to a row
Definition: Quattro9Spreadsheet.cpp:326
WPSBorder::RightBit
@ RightBit
Definition: libwps_internal.h:401
WPSEntry.h
Quattro9SpreadsheetInternal::State::m_spreadsheetMap
std::map< int, std::shared_ptr< Spreadsheet > > m_spreadsheetMap
the map of spreadsheet
Definition: Quattro9Spreadsheet.cpp:779
WPS_HIDDEN_BIT
#define WPS_HIDDEN_BIT
Definition: libwps_internal.h:516
libwps::readDouble4
bool readDouble4(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 4 bytes: mantisse 2.5 bytes, exponent 1.5 bytes
Definition: libwps_internal.cpp:90
libwps::DebugFile::addNote
static void addNote(char const *)
Definition: WPSDebug.h:221
Quattro9SpreadsheetInternal::CellData::m_doubleList
std::vector< double > m_doubleList
the list of double values
Definition: Quattro9Spreadsheet.cpp:373
Quattro9SpreadsheetInternal::State::m_documentFormulas
std::pair< std::shared_ptr< WPSStream >, std::vector< WPSEntry > > m_documentFormulas
the document formulas
Definition: Quattro9Spreadsheet.cpp:769
Quattro9Spreadsheet::getReadCellReferenceFunction
QuattroFormulaManager::CellReferenceFunction getReadCellReferenceFunction()
returns the function to read a cell's reference
Definition: Quattro9Spreadsheet.cpp:817
Quattro9ParserInternal
Internal: namespace to define internal class of Quattro9Parser.
Definition: Quattro9.cpp:57
Quattro9SpreadsheetInternal::State::State
State(QuattroFormulaManager::CellReferenceFunction const &readCellReference)
constructor
Definition: Quattro9Spreadsheet.cpp:741
Quattro9Spreadsheet::cleanState
void cleanState()
clean internal state
Definition: Quattro9Spreadsheet.cpp:801
Quattro9SpreadsheetInternal::State::m_actualSpreadsheet
std::shared_ptr< Spreadsheet > m_actualSpreadsheet
the actual sheet
Definition: Quattro9Spreadsheet.cpp:773
Quattro9SpreadsheetInternal::Cell::Cell
Cell()
constructor
Definition: Quattro9Spreadsheet.cpp:112
Quattro9SpreadsheetInternal::State::m_version
int m_version
the file version
Definition: Quattro9Spreadsheet.cpp:765
Quattro9SpreadsheetInternal::State::m_formulaManager
QuattroFormulaManager m_formulaManager
the formula manager
Definition: Quattro9Spreadsheet.cpp:771
Quattro9Parser::readFilePositions
static bool readFilePositions(std::shared_ptr< WPSStream > const &stream, long(&filePos)[2])
read a zone which contains two files position (prev and next): zone 2,402,602,a02
Definition: Quattro9.cpp:1689
Quattro9SpreadsheetInternal::CellData::m_intList
std::vector< int > m_intList
the list of int values
Definition: Quattro9Spreadsheet.cpp:371
Quattro9SpreadsheetInternal::Cell::send
bool send(WPSListenerPtr &) final
call when a cell must be send
Definition: Quattro9Spreadsheet.cpp:225
WPSCellFormat
a structure used to defined the cell format
Definition: WPSCell.h:40
Quattro9SpreadsheetInternal::State::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the ith spreadsheet
Definition: Quattro9Spreadsheet.cpp:755
WPSBorder::m_style
Style m_style
the border style
Definition: libwps_internal.h:446
Quattro9SpreadsheetInternal::State::m_actualColumn
int m_actualColumn
the actual column
Definition: Quattro9Spreadsheet.cpp:775
Quattro9Parser::getPattern
bool getPattern(int id, WPSGraphicStyle::Pattern &pattern) const
returns the pattern corresponding to a pattern id between 0 and 24
Definition: Quattro9.cpp:496
Quattro9Parser::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: Quattro9.cpp:444
WPSColumnFormat::m_numRepeat
int m_numRepeat
the number times a column is repeated
Definition: WPSTable.h:92
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
WPSBorder::Dash
@ Dash
Definition: libwps_internal.h:397
WPSCellFormat::HALIGN_LEFT
@ HALIGN_LEFT
Definition: WPSCell.h:46
Quattro9Parser::getColor
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: Quattro9.cpp:491
WPSCellFormat::VALIGN_TOP
@ VALIGN_TOP
Definition: WPSCell.h:50
Quattro9SpreadsheetInternal::State::m_idToSheetNameMap
std::map< int, librevenge::RVNGString > m_idToSheetNameMap
the map id to sheet's name
Definition: Quattro9Spreadsheet.cpp:781
Quattro9SpreadsheetInternal::Cell
a cellule of a Quattro spreadsheet
Definition: Quattro9Spreadsheet.cpp:108
Quattro9Spreadsheet.h
Quattro9ParserInternal::TextEntry::getDebugString
std::string getDebugString(std::shared_ptr< WPSStream > const &stream) const
internal: returns a debug string
Definition: Quattro9.cpp:313
Quattro9Spreadsheet::readCell
static bool readCell(std::shared_ptr< WPSStream > const &stream, Vec2i actPos, WKSContentListener::FormulaInstruction &instr, int sheetId, librevenge::RVNGString const &fName)
Definition: Quattro9Spreadsheet.cpp:1880
WKSContentListener::CellContent::m_contentType
ContentType m_contentType
the content type ( by default unknown )
Definition: WKSContentListener.h:147
Quattro9Spreadsheet::readColRowDimension
bool readColRowDimension(std::shared_ptr< WPSStream > const &stream)
read a col/row dimension: zone 633, 634
Definition: Quattro9Spreadsheet.cpp:1392
Quattro9SpreadsheetInternal::Spreadsheet::m_id
int m_id
the spreadsheet id
Definition: Quattro9Spreadsheet.cpp:722
WPSCell
a structure used to defined the cell position, and a format
Definition: WPSCell.h:290
libwps::DebugStream
Definition: WPSDebug.h:191
Quattro9SpreadsheetInternal::Spreadsheet::m_defaultSizes
Vec2i m_defaultSizes
the default col/row size in TWIP
Definition: Quattro9Spreadsheet.cpp:725
Quattro9Spreadsheet::readDocumentFormulas
bool readDocumentFormulas(std::shared_ptr< WPSStream > const &stream)
reads the document formulas: zone 408
Definition: Quattro9Spreadsheet.cpp:1190
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
WPSBorder
a border list
Definition: libwps_internal.h:394
Quattro9SpreadsheetInternal::Spreadsheet::getRowHeight
WPSRowFormat getRowHeight(int row) const
returns the row size in point
Definition: Quattro9Spreadsheet.cpp:545
Quattro9Spreadsheet::~Quattro9Spreadsheet
~Quattro9Spreadsheet()
destructor
Definition: Quattro9Spreadsheet.cpp:797
Quattro9SpreadsheetInternal::CellData::m_rows
Vec2i m_rows
the min/max row
Definition: Quattro9Spreadsheet.cpp:365
libwps_tools_win.h
Quattro9Spreadsheet::setListener
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: Quattro9Spreadsheet.h:66
Quattro9SpreadsheetInternal::Spreadsheet::m_sizesMap
std::map< Vec2i, int > m_sizesMap[2]
the map Vec2i(min, max) to col/row size in TWIP
Definition: Quattro9Spreadsheet.cpp:727
Quattro9Spreadsheet::readEndColumn
bool readEndColumn(std::shared_ptr< WPSStream > const &stream)
read the end column zone: zone a02
Definition: Quattro9Spreadsheet.cpp:1581
Quattro9Parser::readPString
bool readPString(std::shared_ptr< WPSStream > const &stream, long endPos, Quattro9ParserInternal::TextEntry &entry)
try to read a string: length[2bytes], unknow[bytes] followed by the string
Definition: Quattro9.cpp:1258
WPSCellFormat::setFont
void setFont(WPSFont const &font)
sets the font
Definition: WPSCell.h:104
Quattro9Spreadsheet::addUserFormat
void addUserFormat(int id, librevenge::RVNGString const &name)
add a user format's correspondance between an id and a name
Definition: Quattro9Spreadsheet.cpp:857
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
@ Double
Definition: libwps_internal.h:399
Quattro9SpreadsheetInternal::Style
a class used to store a style of a cell in Quattro9Spreadsheet
Definition: Quattro9Spreadsheet.cpp:53
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
WPSCellFormat::getFont
const WPSFont & getFont() const
returns the font
Definition: WPSCell.h:99
Quattro9SpreadsheetInternal::Cell::sendContent
bool sendContent(WPSListenerPtr &) final
call when the content of a cell must be send
Definition: Quattro9Spreadsheet.cpp:219
Quattro9SpreadsheetInternal::CellData
a class used to store the cell(s) content of a Quattro Spreadsheet
Definition: Quattro9Spreadsheet.cpp:233
WPSBorder::LeftBit
@ 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
Quattro9Spreadsheet::addDLLIdName
void addDLLIdName(int id, librevenge::RVNGString const &name, bool func1)
add a dll's correspondance between an id and a name
Definition: Quattro9Spreadsheet.cpp:852
WPSCellFormat::setDigits
void setDigits(int newDigit)
set the number of digits ( for a number)
Definition: WPSCell.h:186
Quattro9SpreadsheetInternal::Column::m_rowsToCellMap
std::map< Vec2i, CellData > m_rowsToCellMap
a map rows to cell data
Definition: Quattro9Spreadsheet.cpp:441
Quattro9SpreadsheetInternal::Spreadsheet::Spreadsheet
Spreadsheet(int id)
a constructor
Definition: Quattro9Spreadsheet.cpp:451
libwps::read16
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
Quattro9SpreadsheetInternal::Style::Style
Style()
construtor
Definition: Quattro9Spreadsheet.cpp:56
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
WPSGraphicStyle::Pattern
a basic pattern used in a WPSGraphicStyle:
Definition: WPSGraphicStyle.h:88
WKSContentListener::CellContent::C_TEXT
@ C_TEXT
Definition: WKSContentListener.h:102
WPSCellFormat::F_DATE
@ F_DATE
Definition: WPSCell.h:54
WPSColor
the class to store a color
Definition: libwps_internal.h:280
Quattro9Parser::version
int version() const
return the file version
Definition: Quattro9.cpp:417
Quattro9Spreadsheet::updateState
void updateState()
update the state (need to be called before sending data)
Definition: Quattro9Spreadsheet.cpp:806
WPSBox2< int >
Quattro9Parser::sendPageGraphics
bool sendPageGraphics(int sheetId) const
send the page graphic corresponding to a sheet
Definition: Quattro9.cpp:501
libwps_tools_win::Font::getFontType
static Type getFontType(librevenge::RVNGString &name)
returns the type of the font using the fontName
Definition: libwps_tools_win.cpp:39
Quattro9SpreadsheetInternal::Spreadsheet::getListCellsInARow
std::vector< Vec2i > getListCellsInARow(int row) const
returns the list of columns in which a row cell exists
Definition: Quattro9Spreadsheet.cpp:692
Quattro9SpreadsheetInternal::CellData::m_span
Vec2i m_span
the column row/span
Definition: Quattro9Spreadsheet.cpp:367
WPSStream.h
Vec2b
Vec2< bool > Vec2b
Vec2 of bool.
Definition: libwps_internal.h:700
WKSContentListener::CellContent::setValue
void setValue(double value)
sets the double value
Definition: WKSContentListener.h:126
WPSBorder::LargeDot
@ LargeDot
Definition: libwps_internal.h:397
WKSContentListener::CellContent
small class use to define a sheet cell content
Definition: WKSContentListener.h:99
Quattro9SpreadsheetInternal::State::m_documentStrings
std::pair< std::shared_ptr< WPSStream >, std::vector< Quattro9ParserInternal::TextEntry > > m_documentStrings
the document strings
Definition: Quattro9Spreadsheet.cpp:767
Quattro9Spreadsheet::readCellList
bool readCellList(std::shared_ptr< WPSStream > const &stream)
reads a cell list zone: zone c01
Definition: Quattro9Spreadsheet.cpp:1596
libwps::DebugFile
Definition: WPSDebug.h:207
WPSCellFormat::compare
int compare(WPSCellFormat const &cell, bool onlyNumbering=false) const
a comparison function
Definition: WPSCell.cpp:366
WKSContentListener::FormulaInstruction::F_CellList
@ F_CellList
Definition: WKSContentListener.h:59
Quattro9SpreadsheetInternal::Spreadsheet::getListSendRow
std::set< int > getListSendRow() const
returns the list of rows which need to be opened, ...
Definition: Quattro9Spreadsheet.cpp:674
Quattro9SpreadsheetInternal::Spreadsheet::getWidths
std::vector< WPSColumnFormat > getWidths() const
return the columns format
Definition: Quattro9Spreadsheet.cpp:553
Quattro9SpreadsheetInternal::Column::add
void add(Vec2i limits, CellData const &cell)
add a cell/list of cells data
Definition: Quattro9Spreadsheet.cpp:388
Quattro9SpreadsheetInternal::CellData::m_style
int m_style
the style id
Definition: Quattro9Spreadsheet.cpp:369
WKSContentListener::CellContent::C_NUMBER
@ C_NUMBER
Definition: WKSContentListener.h:102
WPSColor::black
static WPSColor black()
return the back color
Definition: libwps_internal.h:306
Quattro9SpreadsheetInternal::Cell::updateFormat
void updateFormat(int fileFormat)
update the cell format using file format
Definition: Quattro9Spreadsheet.cpp:116
WPSColor::isBlack
bool isBlack() const
return true if the color is black
Definition: libwps_internal.h:345
WPSFont::m_name
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
Quattro9Parser::getFont
bool getFont(int id, WPSFont &font) const
returns the font corresponding to an id
Definition: Quattro9.cpp:509
Quattro9Spreadsheet::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: Quattro9Spreadsheet.cpp:1919
Quattro9SpreadsheetInternal::CellData::empty
bool empty() const
returns true if the cell contains no data (and is not a merged cell)
Definition: Quattro9Spreadsheet.cpp:247
WPSCellFormat::HALIGN_CENTER
@ HALIGN_CENTER
Definition: WPSCell.h:46
Quattro9SpreadsheetInternal
Definition: Quattro9Spreadsheet.cpp:50
Quattro9Spreadsheet::getNumSpreadsheets
int getNumSpreadsheets() const
returns the number of spreadsheet
Definition: Quattro9Spreadsheet.cpp:827
WPSCell::setNumSpannedCells
void setNumSpannedCells(Vec2i numSpanned)
sets the number of spanned cells : Vec2i(1,1) means 1 cellule
Definition: WPSCell.h:351

Generated on Sat Apr 4 2020 08:40:32 for libwps by doxygen 1.8.17