WKS4Spreadsheet.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 WKS4_SPREADSHEET_H
23 #define WKS4_SPREADSHEET_H
24 
25 #include <ostream>
26 #include <vector>
27 
28 #include <librevenge-stream/librevenge-stream.h>
29 
30 #include "libwps_internal.h"
31 
32 #include "WPSDebug.h"
33 #include "WKSContentListener.h"
34 
36 {
37 class Cell;
38 class SpreadSheet;
39 struct State;
40 }
41 
42 class WKS4Parser;
43 
49 {
50 public:
51  friend class WKS4Parser;
52 
54  explicit WKS4Spreadsheet(WKS4Parser &parser);
59  {
60  m_listener = listen;
61  }
62 
63 protected:
65  bool checkFilePosition(long pos);
67  int version() const;
69  void resetInput(RVNGInputStreamPtr const &input);
70 
72  int getNumSpreadsheets() const;
74  void sendSpreadsheet(int sId);
76  librevenge::RVNGString getSheetName(int id) const;
77 
80 
82 
84  bool readReportOpen();
86  bool readReportClose();
87 
89  bool readFilterOpen();
91  bool readFilterClose();
92 
93  //
94  // low level
95  //
97 
99  bool readCell();
101  bool readCellFormulaResult();
103  bool readSheetSize();
105  bool readColumnSize();
107  bool readHiddenColumns();
108 
117 
119  bool readMsWorksColumnSize();
121  bool readMsWorksRowSize();
123  bool readMsWorksPageBreak();
125  bool readMsWorksStyle();
126 
127  /* reads a cell */
129  /* reads a formula */
130  bool readFormula(long endPos, Vec2i const &pos,
131  std::vector<WKSContentListener::FormulaInstruction> &formula, std::string &error);
132 
133 private:
134  WKS4Spreadsheet(WKS4Spreadsheet const &orig) = delete;
135  WKS4Spreadsheet &operator=(WKS4Spreadsheet const &orig) = delete;
138  {
139  return m_asciiFile;
140  }
143  std::shared_ptr<WKSContentListener> m_listener;
147  std::shared_ptr<WKS4SpreadsheetInternal::State> m_state;
150 };
151 
152 #endif /* WPS4_SPREADSHEET_H */
153 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WKSContentListener::FormulaInstruction::F_Text
Definition: WKSContentListener.h:59
WKS4SpreadsheetInternal::Spreadsheet::getRowHeight
float getRowHeight(int row) const
returns the row size in point
Definition: WKS4Spreadsheet.cpp:302
WKS4Spreadsheet::readMsWorksDOSPageBreak
bool readMsWorksDOSPageBreak()
reads a page break (in a dos file)
Definition: WKS4Spreadsheet.cpp:1372
WPSColor::white
static WPSColor white()
return the white color
Definition: libwps_internal.h:311
WKS4SpreadsheetInternal::Spreadsheet::m_type
Type m_type
the spreadsheet type
Definition: WKS4Spreadsheet.cpp:402
WPSCellFormat::F_BOOLEAN
Definition: WPSCell.h:54
WKS4SpreadsheetInternal::State::pushNewSheet
void pushNewSheet(std::shared_ptr< Spreadsheet > sheet)
create a new sheet and stack id
Definition: WKS4Spreadsheet.cpp:473
WPSCellFormat::m_subFormat
int m_subFormat
the sub format
Definition: WPSCell.h:276
WKS4Spreadsheet::checkFilePosition
bool checkFilePosition(long pos)
return true if the pos is in the file, update the file size if need
Definition: WKS4Spreadsheet.cpp:536
WKS4Spreadsheet::readFormula
bool readFormula(long endPos, Vec2i const &pos, std::vector< WKSContentListener::FormulaInstruction > &formula, std::string &error)
Definition: WKS4Spreadsheet.cpp:1910
WPSCellFormat::FormatType
FormatType
the different types of cell's field
Definition: WPSCell.h:54
WKS4Spreadsheet::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the name of the id's spreadsheet
Definition: WKS4Spreadsheet.cpp:553
libwps::DebugStream::str
static std::string str()
Definition: WPSDebug.h:200
WKS4Spreadsheet::resetInput
void resetInput(RVNGInputStreamPtr const &input)
reset the main input
Definition: WKS4Spreadsheet.cpp:524
WKSContentListener::FormulaInstruction::F_Long
Definition: WKSContentListener.h:59
WPSCellFormat::HALIGN_FULL
Definition: WPSCell.h:47
WKSContentListener::CellContent::C_FORMULA
Definition: WKSContentListener.h:102
WKS4Spreadsheet::readCellFormulaResult
bool readCellFormulaResult()
reads the result of a text formula
Definition: WKS4Spreadsheet.cpp:1745
WPS_BOLD_BIT
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
WKS4SpreadsheetInternal::Functions::m_name
const char * m_name
Definition: WKS4Spreadsheet.cpp:1856
WPSCellFormat::VALIGN_CENTER
Definition: WPSCell.h:50
libwps::DebugFile::addPos
static void addPos(long)
Definition: WPSDebug.h:220
WKSContentListener::FormulaInstruction::F_Cell
Definition: WKSContentListener.h:59
WKS4SpreadsheetInternal::State
the state of WKS4Spreadsheet
Definition: WKS4Spreadsheet.cpp:426
WPSEntry::end
long end() const
returns the end offset
Definition: WPSEntry.h:76
WKS4Spreadsheet::readReportClose
bool readReportClose()
reads the report's end zone 18:54
Definition: WKS4Spreadsheet.cpp:2312
WKS4SpreadsheetInternal::StyleManager
the style manager
Definition: WKS4Spreadsheet.cpp:133
WKS4SpreadsheetInternal::Spreadsheet::setColumnWidth
void setColumnWidth(int col, int w=-1)
set the columns size
Definition: WKS4Spreadsheet.cpp:293
WKS4SpreadsheetInternal::Style::Style
Style(libwps_tools_win::Font::Type type)
construtor
Definition: WKS4Spreadsheet.cpp:53
WPSCell.h
WKS4SpreadsheetInternal::Spreadsheet::Type
Type
the spreadsheet type
Definition: WKS4Spreadsheet.cpp:259
libwps_tools_win::Font::Type
Type
enum Type
Definition: libwps_tools_win.h:46
WKS4SpreadsheetInternal::State::m_styleManager
StyleManager m_styleManager
the style manager
Definition: WKS4Spreadsheet.cpp:499
WKS4Spreadsheet::setListener
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: WKS4Spreadsheet.h:58
WKS4SpreadsheetInternal::Spreadsheet::getCell
Cell & getCell(Vec2i const &pos)
return a cell corresponding to a spreadsheet, create one if needed
Definition: WKS4Spreadsheet.cpp:274
WKS4SpreadsheetInternal::Spreadsheet::setRowHeight
void setRowHeight(int row, int h)
set the rows size
Definition: WKS4Spreadsheet.cpp:325
WPSTable.h
WPS_UNDERLINE_BIT
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
WKS4Spreadsheet::getNumSpreadsheets
int getNumSpreadsheets() const
returns the number of spreadsheet
Definition: WKS4Spreadsheet.cpp:548
WKS4SpreadsheetInternal::Spreadsheet::getWidths
std::vector< WPSColumnFormat > getWidths(float defSize=72) const
return the columns format
Definition: WKS4Spreadsheet.cpp:366
WKS4SpreadsheetInternal::Spreadsheet::T_Report
Definition: WKS4Spreadsheet.cpp:259
WPSCellFormat::HALIGN_DEFAULT
Definition: WPSCell.h:47
WKSContentListener::FormulaInstruction::F_Operator
Definition: WKSContentListener.h:59
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
WKS4SpreadsheetInternal::Style
a class used to store a style of a cell in WKS4Spreadsheet
Definition: WKS4Spreadsheet.cpp:50
WKS4Spreadsheet::readHiddenColumns
bool readHiddenColumns()
reads the list of hidden columns zone ( unused )
Definition: WKS4Spreadsheet.cpp:648
WPSCellFormat::F_UNKNOWN
Definition: WPSCell.h:54
WKSContentListener::FormulaInstruction::F_Function
Definition: WKSContentListener.h:59
WKS4SpreadsheetInternal::Cell
a cellule of a WKS4 spreadsheet
Definition: WKS4Spreadsheet.cpp:186
WKS4SpreadsheetInternal::Style::m_unknFlags
int m_unknFlags[10]
some flag
Definition: WKS4Spreadsheet.cpp:79
WKS4Spreadsheet.h
WPSColumnFormat
Definition: WPSTable.h:39
WPSBorder::m_width
int m_width
the border width
Definition: libwps_internal.h:450
WKS4SpreadsheetInternal::Spreadsheet::m_heightDefault
int m_heightDefault
the default row size in point
Definition: WKS4Spreadsheet.cpp:415
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
WKSContentListener::FormulaInstruction::m_doubleValue
double m_doubleValue
value ( if type==F_Double )
Definition: WKSContentListener.h:83
WKS4Spreadsheet::m_listener
std::shared_ptr< WKSContentListener > m_listener
Definition: WKS4Spreadsheet.h:143
WKS4Parser::getDefaultFontType
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: WKS4.cpp:287
WKS4Spreadsheet::WKS4Spreadsheet
WKS4Spreadsheet(WKS4Parser &parser)
constructor
Definition: WKS4Spreadsheet.cpp:510
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
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
WKS4SpreadsheetInternal
Definition: WKS4Spreadsheet.cpp:45
WKS4SpreadsheetInternal::Style::m_fileFont
WPSFont m_fileFont
the font
Definition: WKS4Spreadsheet.cpp:75
WPSCellFormat::m_digits
int m_digits
the number of digits
Definition: WPSCell.h:280
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
WPSCell::setPosition
void setPosition(Vec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: WPSCell.h:340
WKS4SpreadsheetInternal::Spreadsheet::m_numCols
int m_numCols
the number of columns
Definition: WKS4Spreadsheet.cpp:406
WKS4SpreadsheetInternal::Spreadsheet::m_rowHeightMap
std::map< Vec2i, int > m_rowHeightMap
the map Vec2i(min row, max row) to size in TWIP (?)
Definition: WKS4Spreadsheet.cpp:413
WKS4SpreadsheetInternal::Functions::m_arity
int m_arity
Definition: WKS4Spreadsheet.cpp:1857
WKSContentListener::FormulaInstruction::m_type
What m_type
the type
Definition: WKSContentListener.h:77
WKS4SpreadsheetInternal::State::m_spreadsheetList
std::vector< std::shared_ptr< Spreadsheet > > m_spreadsheetList
the list of spreadsheet ( first: main spreadsheet, other report spreadsheet )
Definition: WKS4Spreadsheet.cpp:502
WKSContentListener::FormulaInstruction::m_position
Vec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: WKSContentListener.h:85
WKS4Spreadsheet::version
int version() const
return the file version
Definition: WKS4Spreadsheet.cpp:529
WPSListenerPtr
std::shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition: libwps_internal.h:105
WKS4Spreadsheet::sendCellContent
void sendCellContent(WKS4SpreadsheetInternal::Cell const &cell)
send the cell data
Definition: WKS4Spreadsheet.cpp:2396
WKS4SpreadsheetInternal::State::m_eof
long m_eof
the last file position
Definition: WKS4Spreadsheet.cpp:495
WPSBorder::m_color
WPSColor m_color
the border color
Definition: libwps_internal.h:456
WKS4SpreadsheetInternal::Style::operator==
bool operator==(Style const &st) const
operator==
Definition: WKS4Spreadsheet.cpp:116
WKS4SpreadsheetInternal::State::getActualSheet
Spreadsheet & getActualSheet()
returns the actual sheet
Definition: WKS4Spreadsheet.cpp:468
WKS4SpreadsheetInternal::Spreadsheet::m_rowPageBreaksList
std::vector< int > m_rowPageBreaksList
the list of row page break
Definition: WKS4Spreadsheet.cpp:421
WKS4SpreadsheetInternal::Style::m_extra
std::string m_extra
extra data
Definition: WKS4Spreadsheet.cpp:81
WKS4Parser::getFont
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: WKS4.cpp:305
WKS4SpreadsheetInternal::StyleManager::add
int add(Style const &st, bool dosFile)
add a new style and returns its id
Definition: WKS4Spreadsheet.cpp:139
WKS4Spreadsheet::m_state
std::shared_ptr< WKS4SpreadsheetInternal::State > m_state
the internal state
Definition: WKS4Spreadsheet.h:147
WKS4.h
WKSContentListener::CellContent::C_UNKNOWN
Definition: WKSContentListener.h:102
Vec2< int >
WKS4SpreadsheetInternal::State::m_spreadsheetStack
std::stack< std::shared_ptr< Spreadsheet > > m_spreadsheetStack
the stack of spreadsheet id
Definition: WKS4Spreadsheet.cpp:504
WKS4Spreadsheet::readMsWorksStyle
bool readMsWorksStyle()
reads a style
Definition: WKS4Spreadsheet.cpp:798
WPSBorder::TopBit
Definition: libwps_internal.h:401
WPSCellFormat::m_format
FormatType m_format
the cell format : by default unknown
Definition: WPSCell.h:274
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
WKS4SpreadsheetInternal::Spreadsheet::empty
bool empty() const
returns true if the spreedsheet is empty
Definition: WKS4Spreadsheet.cpp:397
WKS4SpreadsheetInternal::Cell::m_extraTextEntryList
std::vector< WPSEntry > m_extraTextEntryList
As very long text is splitted in zone 0xf and then in zone 0x36, the list of zone36 text entries....
Definition: WKS4Spreadsheet.cpp:218
WPSCellFormat::F_TIME
Definition: WPSCell.h:54
WKS4SpreadsheetInternal::Cell::send
bool send(WPSListenerPtr &) final
call when a cell must be send
Definition: WKS4Spreadsheet.cpp:221
WPS_FALLTHROUGH
#define WPS_FALLTHROUGH
fall through attributes
Definition: libwps_internal.h:82
WPSEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: WPSEntry.h:55
WKS4Spreadsheet::readMsWorksPageBreak
bool readMsWorksPageBreak()
reads a page break
Definition: WKS4Spreadsheet.cpp:768
WKS4SpreadsheetInternal::State::getSheet
std::shared_ptr< Spreadsheet > getSheet(Spreadsheet::Type type, int id)
returns the ith real spreadsheet
Definition: WKS4Spreadsheet.cpp:450
WPSCellFormat::F_NUMBER
Definition: WPSCell.h:54
WKSContentListenerPtr
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
WKS4SpreadsheetInternal::StyleManager::size
int size() const
returns the number of style
Definition: WKS4Spreadsheet.cpp:163
WKS4SpreadsheetInternal::Cell::sendContent
bool sendContent(WPSListenerPtr &) final
call when the content of a cell must be send
Definition: WKS4Spreadsheet.cpp:203
WKSContentListener::FormulaInstruction
small class use to define a formula instruction
Definition: WKSContentListener.h:57
WKS4SpreadsheetInternal::s_listFunctions
static const Functions s_listFunctions[]
Definition: WKS4Spreadsheet.cpp:1860
WPSCellFormat::VALIGN_BOTTOM
Definition: WPSCell.h:50
WPSBorder::Dot
Definition: libwps_internal.h:397
WPSFont.h
WPSCellFormat::F_TEXT
Definition: WPSCell.h:54
WKS4Spreadsheet::readMsWorksDOSCellExtraProperty
bool readMsWorksDOSCellExtraProperty()
reads the actual cell addendum properties ( contains at least the color)
Definition: WKS4Spreadsheet.cpp:1298
WKS4Spreadsheet::m_asciiFile
libwps::DebugFile & m_asciiFile
the ascii file
Definition: WKS4Spreadsheet.h:149
WPSColumnFormat::m_useOptimalWidth
bool m_useOptimalWidth
a flag to know if we need to see use-optimal column width
Definition: WPSTable.h:88
WKS4Spreadsheet::readMsWorksRowSize
bool readMsWorksRowSize()
reads the row size ( in ???)
Definition: WKS4Spreadsheet.cpp:731
WKS4SpreadsheetInternal::Style::m_fontType
libwps_tools_win::Font::Type m_fontType
font encoding type
Definition: WKS4Spreadsheet.cpp:77
WPSBorder::RightBit
Definition: libwps_internal.h:401
WPSEntry.h
WKS4Spreadsheet::~WKS4Spreadsheet
~WKS4Spreadsheet()
destructor
Definition: WKS4Spreadsheet.cpp:520
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
WKS4SpreadsheetInternal::operator<<
std::ostream & operator<<(std::ostream &o, Style const &style)
operator<<
Definition: WKS4Spreadsheet.cpp:89
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
WKS4SpreadsheetInternal::State::State
State()
constructor
Definition: WKS4Spreadsheet.cpp:429
WKS4Spreadsheet::readMsWorksColumnSize
bool readMsWorksColumnSize()
reads the column size ( in ???)
Definition: WKS4Spreadsheet.cpp:692
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
WKS4SpreadsheetInternal::State::getMaximalSheet
int getMaximalSheet(Spreadsheet::Type type=Spreadsheet::T_Spreadsheet) const
returns the maximal spreadsheet
Definition: WKS4Spreadsheet.cpp:439
WPSBorder::m_style
Style m_style
the border style
Definition: libwps_internal.h:446
WKS4SpreadsheetInternal::Spreadsheet::m_id
int m_id
the spreadsheet id
Definition: WKS4Spreadsheet.cpp:404
WKS4Parser::readCString
bool readCString(librevenge::RVNGString &string, long maxSize)
try to read a basic C string, knowing the maximum size
Definition: WKS4.cpp:1388
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
Definition: libwps_internal.h:397
WKS4Spreadsheet::m_mainParser
WKS4Parser & m_mainParser
the listener (if set)
Definition: WKS4Spreadsheet.h:145
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
WKS4Spreadsheet::readCell
bool readCell()
reads a cell content data
Definition: WKS4Spreadsheet.cpp:1405
WKS4SpreadsheetInternal::Spreadsheet::m_widthCols
std::vector< int > m_widthCols
the column size in TWIP (?)
Definition: WKS4Spreadsheet.cpp:411
WPSCell
a structure used to defined the cell position, and a format
Definition: WPSCell.h:290
libwps::DebugStream
Definition: WPSDebug.h:191
WPSCellFormat::HorizontalAlignment
HorizontalAlignment
the default horizontal alignement.
Definition: WPSCell.h:46
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
WKS4SpreadsheetInternal::Spreadsheet::T_Filter
Definition: WKS4Spreadsheet.cpp:259
WPSBorder
a border list
Definition: libwps_internal.h:394
WKS4SpreadsheetInternal::Spreadsheet
the spreadsheet of a WPS4Spreadsheet
Definition: WKS4Spreadsheet.cpp:255
WKS4Spreadsheet::readReportOpen
bool readReportOpen()
reads the report's header zone 17:54
Definition: WKS4Spreadsheet.cpp:2244
libwps_tools_win.h
WKS4Spreadsheet::readSheetSize
bool readSheetSize()
reads sheet size
Definition: WKS4Spreadsheet.cpp:564
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
WPSEntry::setEnd
void setEnd(long e)
sets the end offset
Definition: WPSEntry.h:65
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
WKS4Spreadsheet::readFilterClose
bool readFilterClose()
reads the filter's end zone 11:54
Definition: WKS4Spreadsheet.cpp:2210
WKS4Spreadsheet::operator=
WKS4Spreadsheet & operator=(WKS4Spreadsheet const &orig)=delete
WPSBorder::Double
Definition: libwps_internal.h:399
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WKS4Spreadsheet::ascii
libwps::DebugFile & ascii()
returns the debug file
Definition: WKS4Spreadsheet.h:137
WPSBorder::LeftBit
Definition: libwps_internal.h:401
WPSBorder::m_type
Type m_type
the border repetition
Definition: libwps_internal.h:448
WKS4Spreadsheet::readFilterOpen
bool readFilterOpen()
reads the filter's header zone 10:54
Definition: WKS4Spreadsheet.cpp:2184
WPSDebug.h
libwps::DebugFile::addDelimiter
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
WKS4SpreadsheetInternal::Spreadsheet::T_Spreadsheet
Definition: WKS4Spreadsheet.cpp:259
WKS4SpreadsheetInternal::Spreadsheet::m_numRows
int m_numRows
the number of rows
Definition: WKS4Spreadsheet.cpp:408
libwps::read16
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
WKS4SpreadsheetInternal::Cell::Cell
Cell()
constructor
Definition: WKS4Spreadsheet.cpp:190
WKS4SpreadsheetInternal::StyleManager::StyleManager
StyleManager()
Definition: WKS4Spreadsheet.cpp:136
libwps_internal.h
WPSRowFormat
Definition: WPSTable.h:100
WKS4SpreadsheetInternal::Spreadsheet::m_positionToCellMap
std::map< Vec2i, Cell > m_positionToCellMap
a map cell to not empty cells
Definition: WKS4Spreadsheet.cpp:417
WKSContentListener::FormulaInstruction::m_positionRelative
Vec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: WKSContentListener.h:87
WKS4Spreadsheet
This class parses Microsoft Works spreadsheet file.
Definition: WKS4Spreadsheet.h:48
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
WKS4Spreadsheet::readMsWorksDOSCellProperty
bool readMsWorksDOSCellProperty()
reads actualCell properties
Definition: WKS4Spreadsheet.cpp:1042
WKS4SpreadsheetInternal::Cell::m_content
WKSContentListener::CellContent m_content
the content
Definition: WKS4Spreadsheet.cpp:214
WKS4SpreadsheetInternal::Cell::m_styleId
int m_styleId
the style
Definition: WKS4Spreadsheet.cpp:210
WKS4Spreadsheet::readColumnSize
bool readColumnSize()
reads the column size ( in ??? )
Definition: WKS4Spreadsheet.cpp:602
WKS4SpreadsheetInternal::Spreadsheet::getLastCell
Cell * getLastCell()
returns the last cell
Definition: WKS4Spreadsheet.cpp:286
WKSContentListener::CellContent::C_NONE
Definition: WKSContentListener.h:102
WKS4SpreadsheetInternal::Spreadsheet::getRowHeight
float getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: WKS4Spreadsheet.cpp:313
WKS4SpreadsheetInternal::Spreadsheet::m_lastCellPos
Vec2i m_lastCellPos
the last cell position
Definition: WKS4Spreadsheet.cpp:419
Vec2b
Vec2< bool > Vec2b
Vec2 of bool.
Definition: libwps_internal.h:700
WPSBorder::LargeDot
Definition: libwps_internal.h:397
WKS4SpreadsheetInternal::Cell::operator<<
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: WKS4Spreadsheet.cpp:228
WPSCellFormat::m_protected
bool m_protected
cell protected
Definition: WPSCell.h:282
WKSContentListener::CellContent
small class use to define a sheet cell content
Definition: WKSContentListener.h:99
WKS4Parser::version
int version() const
return the file version
Definition: WKS4.cpp:256
WKS4Parser
This class parses Microsoft Works spreadsheet or a database file.
Definition: WKS4.h:48
WKS4Spreadsheet::m_input
RVNGInputStreamPtr m_input
the input
Definition: WKS4Spreadsheet.h:142
WKS4SpreadsheetInternal::StyleManager::m_stylesList
std::vector< Style > m_stylesList
the styles
Definition: WKS4Spreadsheet.cpp:182
libwps::DebugFile
Definition: WPSDebug.h:207
WKS4SpreadsheetInternal::Style::operator=
Style & operator=(Style const &)=default
WKS4SpreadsheetInternal::StyleManager::get
bool get(int id, Style &style) const
returns the style with id
Definition: WKS4Spreadsheet.cpp:152
WPSCellFormat::compare
int compare(WPSCellFormat const &cell, bool onlyNumbering=false) const
a comparison function
Definition: WPSCell.cpp:366
WKSContentListener::FormulaInstruction::F_CellList
Definition: WKSContentListener.h:59
WKS4Spreadsheet::readMsWorksDOSFieldProperty
bool readMsWorksDOSFieldProperty()
reads a field property
Definition: WKS4Spreadsheet.cpp:1211
WKS4Parser::getColor
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: WKS4.cpp:300
WKSContentListener::CellContent::C_NUMBER
Definition: WKSContentListener.h:102
WKS4SpreadsheetInternal::Spreadsheet::compressRowHeights
void compressRowHeights()
try to compress the list of row height
Definition: WKS4Spreadsheet.cpp:331
WKS4SpreadsheetInternal::Style::~Style
~Style() final
destructor
Definition: WKS4Spreadsheet.cpp:84
WKS4SpreadsheetInternal::Functions
Definition: WKS4Spreadsheet.cpp:1854
WKS4SpreadsheetInternal::State::getSheetName
librevenge::RVNGString getSheetName(int id) const
returns the ith spreadsheet
Definition: WKS4Spreadsheet.cpp:461
WKS4SpreadsheetInternal::State::m_version
int m_version
the file version
Definition: WKS4Spreadsheet.cpp:497
WPSColor::black
static WPSColor black()
return the back color
Definition: libwps_internal.h:306
WKS4Spreadsheet::sendSpreadsheet
void sendSpreadsheet(int sId)
send the sId'th spreadsheet
Definition: WKS4Spreadsheet.cpp:2346
WKS4SpreadsheetInternal::State::popSheet
bool popSheet()
try to pop the actual sheet
Definition: WKS4Spreadsheet.cpp:484
WKS4SpreadsheetInternal::Cell::m_hAlignement
WPSCellFormat::HorizontalAlignment m_hAlignement
the horizontal align (in dos file)
Definition: WKS4Spreadsheet.cpp:212
WKS4SpreadsheetInternal::StyleManager::print
void print(int id, std::ostream &o) const
print a style
Definition: WKS4Spreadsheet.cpp:168
WPSCellFormat::HALIGN_CENTER
Definition: WPSCell.h:46
WKS4SpreadsheetInternal::Spreadsheet::Spreadsheet
Spreadsheet(Type type=T_Spreadsheet, int id=0)
a constructor
Definition: WKS4Spreadsheet.cpp:262

Generated on Tue Jan 21 2020 18:52:40 for libwps by doxygen 1.8.16