IWAParser.h Source File documentation

IWAParser.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/*
3 * This file is part of the libetonyek project.
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
10#ifndef IWAPARSER_H_INCLUDED
11#define IWAPARSER_H_INCLUDED
12
13#include <deque>
14#include <functional>
15#include <map>
16#include <memory>
17#include <string>
18#include <unordered_map>
19
20#include <boost/optional.hpp>
21#include <boost/variant.hpp>
22
23#if defined(__GNUC__) && !defined(__clang__)
24#pragma GCC diagnostic push
25#pragma GCC diagnostic ignored "-Weffc++"
26#endif
27#include <mdds/flat_segment_tree.hpp>
28#if defined(__GNUC__) && !defined(__clang__)
29#pragma GCC diagnostic pop
30#endif
31
32#include "libetonyek_utils.h"
33#include "IWAMessage.h"
34#include "IWAObjectIndex.h"
35#include "IWORKLanguageManager.h"
36#include "IWORKOutputElements.h"
37#include "IWORKStyle_fwd.h"
38#include "IWORKTypes.h"
39
40namespace libetonyek
41{
42
43class IWORKCollector;
44class IWAObjectIndex;
45class IWORKPropertyMap;
46class IWORKTable;
47class IWORKText;
48
49 class IWAParser
50{
51 friend class IWAObjectIndex; // for readColor
52
53 // disable copying
54 IWAParser(const IWAParser &);
55 IWAParser &operator=(const IWAParser &);
56public:
57 IWAParser(const RVNGInputStreamPtr_t &fragments, const RVNGInputStreamPtr_t &package, IWORKCollector &collector);
58 virtual ~IWAParser()
59 {
60 }
61
62 bool parse();
63
64protected:
65 class ObjectMessage
66 {
67 public:
68 ObjectMessage(IWAParser &parser, unsigned id, unsigned type = 0);
69 ~ObjectMessage();
70
71 operator bool() const;
72 const IWAMessage &get() const;
73
74 unsigned getType() const;
75
76 friend const IWAMessage &get(const ObjectMessage &msg)
77 {
78 return msg.get();
79 }
80
81 private:
82 IWAParser &m_parser;
83 boost::optional<IWAMessage> m_message;
84 const unsigned m_id;
85 unsigned m_type;
86 };
87 friend class ObjectMessage;
88
89 typedef std::map<unsigned, IWORKStylePtr_t> StyleMap_t;
90 typedef std::function<void(unsigned, IWORKStylePtr_t &)> StyleParseFun_t;
91
92protected:
93 static boost::optional<unsigned> readRef(const IWAMessage &msg, unsigned field);
94 static std::deque<unsigned> readRefs(const IWAMessage &msg, unsigned field);
95 static boost::optional<IWORKPosition> readPosition(const IWAMessage &msg, unsigned field);
96 static boost::optional<IWORKSize> readSize(const IWAMessage &msg, unsigned field);
97 static boost::optional<IWORKColor> readColor(const IWAMessage &msg, unsigned field);
98 static boost::optional<std::string> readUUID(const IWAMessage &msg, unsigned field);
99 static boost::optional<uint64_t> readUID(const IWAMessage &msg, unsigned field);
100 static std::deque<uint64_t> readUIDs(const IWAMessage &msg, unsigned field);
101 static void readStroke(const IWAMessage &msg, IWORKStroke &stroke);
102 bool readFill(const IWAMessage &msg, IWORKFill &fill);
103 static void readGradient(const IWAMessage &msg, IWORKGradient &gradient);
104 static void readShadow(const IWAMessage &msg, IWORKShadow &shadow);
105 static void readPadding(const IWAMessage &msg, IWORKPadding &padding);
106 static void readDropCap(const IWAMessage &msg, IWORKDropCap &cap);
107
108 bool dispatchShape(unsigned id);
109 bool dispatchShapeWithMessage(const IWAMessage &msg, unsigned type);
110 bool parseText(unsigned id, bool createNoteAsFootnote=true, const std::function<void(unsigned, IWORKStylePtr_t)> &openPageSpan=nullptr);
111 void parseComment(unsigned id);
112 void parseAuthorInComment(unsigned id);
113 void parseCustomFormat(unsigned id);
114
115 virtual bool parseShapePlacement(const IWAMessage &msg, IWORKGeometryPtr_t &geometry, boost::optional<unsigned> &flags);
116 void parseMask(unsigned id, IWORKGeometryPtr_t &geometry, IWORKPathPtr_t &path);
117 void updateGeometryUsingTextRef(unsigned id, IWORKGeometry &geometry, unsigned flags);
118
119 const IWORKStylePtr_t queryCharacterStyle(unsigned id) const;
120 const IWORKStylePtr_t queryDropCapStyle(unsigned id) const;
121 const IWORKStylePtr_t queryParagraphStyle(unsigned id) const;
122 const IWORKStylePtr_t querySectionStyle(unsigned id) const;
123
124 const IWORKStylePtr_t queryGraphicStyle(unsigned id) const;
125 const IWORKStylePtr_t queryMediaStyle(unsigned id) const;
126 const IWORKStylePtr_t queryCellStyle(unsigned id) const;
127 const IWORKStylePtr_t queryTableStyle(unsigned id) const;
128 const IWORKStylePtr_t queryListStyle(unsigned id) const;
129
130 const IWORKStylePtr_t queryStyle(unsigned id, StyleMap_t &styleMap, StyleParseFun_t parse) const;
131 boost::optional<unsigned> getObjectType(unsigned id) const;
132
133protected:
134 IWORKFormatNameMap m_formatNameMap;
135 IWORKLanguageManager m_langManager;
136 IWORKTableNameMapPtr_t m_tableNameMap;
137 std::shared_ptr<IWORKText> m_currentText;
138
139private:
140 struct Format
141 {
142 Format();
143 boost::optional<IWORKCellType> m_type;
144 boost::variant<IWORKNumberFormat,IWORKDateTimeFormat,IWORKDurationFormat> m_format;
145 };
146
147 struct PageMaster
148 {
149 PageMaster();
150 IWORKStylePtr_t m_style;
151 bool m_headerFootersSameAsPrevious;
152 };
153
154 struct TableHeader
155 {
156 TableHeader(unsigned count, float defValue=0);
157
158 mdds::flat_segment_tree<unsigned, float> m_sizes;
159 mdds::flat_segment_tree<unsigned, bool> m_hidden;
160 };
161
162 typedef std::map<unsigned, boost::variant<std::string, unsigned, IWORKFormulaPtr_t, Format> > DataList_t;
163
164 struct ConditionRule
165 {
166 ConditionRule();
167
168 IWORKFormulaPtr_t m_formula;
169 boost::optional<unsigned> m_cellStyleRef;
170 boost::optional<unsigned> m_paragraphStyleRef;
171 };
172
173 typedef std::deque<ConditionRule> ConditionRule_t;
174 typedef std::map<unsigned, ConditionRule_t> ConditionRuleList_t;
175
176 struct TableInfo
177 {
178 TableInfo(const std::shared_ptr<IWORKTable> &table, unsigned columns, unsigned rows);
179
180 std::shared_ptr<IWORKTable> m_table;
181
182 const unsigned m_columns;
183 const unsigned m_rows;
184
185 IWORKStylePtr_t m_style;
186
187 TableHeader m_columnHeader;
188 TableHeader m_rowHeader;
189
190 DataList_t m_simpleTextList;
191 DataList_t m_cellStyleList;
192 ConditionRuleList_t m_conditionStyleList;
193 DataList_t m_formattedTextList;
194 DataList_t m_formulaList;
195 DataList_t m_formatList;
196 DataList_t m_newFormatList;
197 DataList_t m_commentList;
198 };
199
200private:
201 virtual bool parseDocument() = 0;
202
203private:
204 void queryObject(unsigned id, unsigned &type, boost::optional<IWAMessage> &msg) const;
205 const RVNGInputStreamPtr_t queryFile(unsigned id) const;
206
207 void parseObjectIndex();
208
209 void parseCharacterStyle(unsigned id, IWORKStylePtr_t &style);
210 void parseDropCapStyle(unsigned id, IWORKStylePtr_t &style);
211 void parseParagraphStyle(unsigned id, IWORKStylePtr_t &style);
212 void parseSectionStyle(unsigned id, IWORKStylePtr_t &style);
213
214 void parseGraphicStyle(unsigned id, IWORKStylePtr_t &style);
215 void parseMediaStyle(unsigned id, IWORKStylePtr_t &style);
216 void parseCellStyle(unsigned id, IWORKStylePtr_t &style);
217 void parseTableStyle(unsigned id, IWORKStylePtr_t &style);
218 void parseListStyle(unsigned id, IWORKStylePtr_t &style);
219
220 void parseHeaderAndFooter(unsigned id, IWORKPageMaster &hf);
221 void parsePageMaster(unsigned id, PageMaster &pageMaster);
222
223 void parseTabularModel(unsigned id);
224 void parseDataList(unsigned id, DataList_t &dataList);
225 void parseTile(unsigned id, unsigned decalY);
226 void parseTileDefinition(unsigned row, unsigned col, RVNGInputStreamPtr_t &input, unsigned endPos, bool oldFormat);
227 void parseTableHeaders(unsigned id, TableHeader &header);
228 void parseTableGridLines(unsigned id, IWORKGridLineMap_t (&gridLines)[4]);
229 void parseTableGridLine(unsigned id, IWORKGridLineMap_t &gridLines);
230 void parseLink(unsigned id, std::string &url);
231
232 bool parseAttachment(unsigned id);
233 bool parseConditionRules(unsigned id, ConditionRule_t &rules);
234 bool parseDrawableShape(const IWAMessage &msg, bool isConnectionLine=false);
235 bool parseGroup(const IWAMessage &msg);
236 bool parseShapePlacement(const IWAMessage &msg);
237 bool parseImage(const IWAMessage &msg);
238 bool parseTabularInfo(const IWAMessage &msg);
239 bool parsePath(const IWAMessage &msg, IWORKPathPtr_t &path);
240 bool parseFormula(const IWAMessage &msg, IWORKFormulaPtr_t &formula);
241 bool parseFormat(const IWAMessage &msg, Format &format);
242 virtual bool parseStickyNote(const IWAMessage &msg);
243
244 bool parseArrowProperties(const IWAMessage &msg, IWORKPropertyMap &props, bool headArrow);
245 void parseCharacterProperties(const IWAMessage &msg, IWORKPropertyMap &props);
246 void parseColumnsProperties(const IWAMessage &msg, IWORKPropertyMap &props);
247
248private:
249 IWORKCollector &m_collector;
250
251 IWAObjectIndex m_index;
252
253 std::deque<unsigned> m_visited;
254
255 mutable StyleMap_t m_charStyles;
256 mutable StyleMap_t m_dropCapStyles;
257 mutable StyleMap_t m_paraStyles;
258 mutable StyleMap_t m_sectionStyles;
259
260 mutable StyleMap_t m_graphicStyles;
261 mutable StyleMap_t m_mediaStyles;
262 mutable StyleMap_t m_cellStyles;
263 mutable StyleMap_t m_tableStyles;
264 mutable StyleMap_t m_listStyles;
265
266 std::shared_ptr<TableInfo> m_currentTable;
267 std::map<uint64_t,Format> m_uidFormatMap;
268};
269
270}
271
272#endif
273
274/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWAMessage.h
IWAObjectIndex.h
IWORKLanguageManager.h
IWORKOutputElements.h
IWORKStyle_fwd.h
IWORKTypes.h
libetonyek::IWAMessage
Definition IWAMessage.h:22
libetonyek::IWAObjectIndex
Definition IWAObjectIndex.h:27
libetonyek::IWAParser::ObjectMessage
Definition IWAParser.h:66
libetonyek::IWAParser::ObjectMessage::m_message
boost::optional< IWAMessage > m_message
Definition IWAParser.h:83
libetonyek::IWAParser::ObjectMessage::get
friend const IWAMessage & get(const ObjectMessage &msg)
Definition IWAParser.h:76
libetonyek::IWAParser::ObjectMessage::m_id
const unsigned m_id
Definition IWAParser.h:84
libetonyek::IWAParser::ObjectMessage::getType
unsigned getType() const
Definition IWAParser.cpp:244
libetonyek::IWAParser::ObjectMessage::m_type
unsigned m_type
Definition IWAParser.h:85
libetonyek::IWAParser::ObjectMessage::~ObjectMessage
~ObjectMessage()
Definition IWAParser.cpp:224
libetonyek::IWAParser::ObjectMessage::m_parser
IWAParser & m_parser
Definition IWAParser.h:82
libetonyek::IWAParser::ObjectMessage::get
const IWAMessage & get() const
Definition IWAParser.cpp:239
libetonyek::IWAParser::ObjectMessage::ObjectMessage
ObjectMessage(IWAParser &parser, unsigned id, unsigned type=0)
Definition IWAParser.cpp:194
libetonyek::IWAParser::querySectionStyle
const IWORKStylePtr_t querySectionStyle(unsigned id) const
Definition IWAParser.cpp:1033
libetonyek::IWAParser::m_cellStyles
StyleMap_t m_cellStyles
Definition IWAParser.h:262
libetonyek::IWAParser::parseTabularModel
void parseTabularModel(unsigned id)
Definition IWAParser.cpp:2518
libetonyek::IWAParser::parseTableGridLine
void parseTableGridLine(unsigned id, IWORKGridLineMap_t &gridLines)
Definition IWAParser.cpp:3297
libetonyek::IWAParser::parseDataList
void parseDataList(unsigned id, DataList_t &dataList)
Definition IWAParser.cpp:2724
libetonyek::IWAParser::parseCharacterProperties
void parseCharacterProperties(const IWAMessage &msg, IWORKPropertyMap &props)
Definition IWAParser.cpp:2236
libetonyek::IWAParser::queryObject
void queryObject(unsigned id, unsigned &type, boost::optional< IWAMessage > &msg) const
Definition IWAParser.cpp:249
libetonyek::IWAParser::m_currentTable
std::shared_ptr< TableInfo > m_currentTable
Definition IWAParser.h:266
libetonyek::IWAParser::parseTableStyle
void parseTableStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:2035
libetonyek::IWAParser::DataList_t
std::map< unsigned, boost::variant< std::string, unsigned, IWORKFormulaPtr_t, Format > > DataList_t
Definition IWAParser.h:162
libetonyek::IWAParser::parseFormula
bool parseFormula(const IWAMessage &msg, IWORKFormulaPtr_t &formula)
Definition IWAParser.cpp:3511
libetonyek::IWAParser::queryMediaStyle
const IWORKStylePtr_t queryMediaStyle(unsigned id) const
Definition IWAParser.cpp:1043
libetonyek::IWAParser::parseConditionRules
bool parseConditionRules(unsigned id, ConditionRule_t &rules)
Definition IWAParser.cpp:3487
libetonyek::IWAParser::m_currentText
std::shared_ptr< IWORKText > m_currentText
Definition IWAParser.h:137
libetonyek::IWAParser::parseColumnsProperties
void parseColumnsProperties(const IWAMessage &msg, IWORKPropertyMap &props)
Definition IWAParser.cpp:2276
libetonyek::IWAParser::parseAuthorInComment
void parseAuthorInComment(unsigned id)
Definition IWAParser.cpp:2448
libetonyek::IWAParser::parseGroup
bool parseGroup(const IWAMessage &msg)
Definition IWAParser.cpp:1560
libetonyek::IWAParser::parseTile
void parseTile(unsigned id, unsigned decalY)
Definition IWAParser.cpp:3177
libetonyek::IWAParser::m_langManager
IWORKLanguageManager m_langManager
Definition IWAParser.h:135
libetonyek::IWAParser::StyleMap_t
std::map< unsigned, IWORKStylePtr_t > StyleMap_t
Definition IWAParser.h:89
libetonyek::IWAParser::parseImage
bool parseImage(const IWAMessage &msg)
Definition IWAParser.cpp:2394
libetonyek::IWAParser::updateGeometryUsingTextRef
void updateGeometryUsingTextRef(unsigned id, IWORKGeometry &geometry, unsigned flags)
Definition IWAParser.cpp:620
libetonyek::IWAParser::m_graphicStyles
StyleMap_t m_graphicStyles
Definition IWAParser.h:260
libetonyek::IWAParser::queryStyle
const IWORKStylePtr_t queryStyle(unsigned id, StyleMap_t &styleMap, StyleParseFun_t parse) const
Definition IWAParser.cpp:1005
libetonyek::IWAParser::parseSectionStyle
void parseSectionStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:1796
libetonyek::IWAParser::readRef
static boost::optional< unsigned > readRef(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:264
libetonyek::IWAParser::queryGraphicStyle
const IWORKStylePtr_t queryGraphicStyle(unsigned id) const
Definition IWAParser.cpp:1038
libetonyek::IWAParser::parseShapePlacement
virtual bool parseShapePlacement(const IWAMessage &msg, IWORKGeometryPtr_t &geometry, boost::optional< unsigned > &flags)
Definition IWAParser.cpp:1579
libetonyek::IWAParser::parse
bool parse()
Definition IWAParser.cpp:188
libetonyek::IWAParser::m_tableStyles
StyleMap_t m_tableStyles
Definition IWAParser.h:263
libetonyek::IWAParser::queryTableStyle
const IWORKStylePtr_t queryTableStyle(unsigned id) const
Definition IWAParser.cpp:1053
libetonyek::IWAParser::parseText
bool parseText(unsigned id, bool createNoteAsFootnote=true, const std::function< void(unsigned, IWORKStylePtr_t)> &openPageSpan=nullptr)
Definition IWAParser.cpp:674
libetonyek::IWAParser::parseTileDefinition
void parseTileDefinition(unsigned row, unsigned col, RVNGInputStreamPtr_t &input, unsigned endPos, bool oldFormat)
Definition IWAParser.cpp:2817
libetonyek::IWAParser::parseTableGridLines
void parseTableGridLines(unsigned id, IWORKGridLineMap_t(&gridLines)[4])
Definition IWAParser.cpp:3275
libetonyek::IWAParser::~IWAParser
virtual ~IWAParser()
Definition IWAParser.h:58
libetonyek::IWAParser::m_mediaStyles
StyleMap_t m_mediaStyles
Definition IWAParser.h:261
libetonyek::IWAParser::parseHeaderAndFooter
void parseHeaderAndFooter(unsigned id, IWORKPageMaster &hf)
Definition IWAParser.cpp:2357
libetonyek::IWAParser::parseCellStyle
void parseCellStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:1952
libetonyek::IWAParser::queryCharacterStyle
const IWORKStylePtr_t queryCharacterStyle(unsigned id) const
Definition IWAParser.cpp:1018
libetonyek::IWAParser::readColor
static boost::optional< IWORKColor > readColor(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:308
libetonyek::IWAParser::readFill
bool readFill(const IWAMessage &msg, IWORKFill &fill)
Definition IWAParser.cpp:443
libetonyek::IWAParser::m_paraStyles
StyleMap_t m_paraStyles
Definition IWAParser.h:257
libetonyek::IWAParser::readPadding
static void readPadding(const IWAMessage &msg, IWORKPadding &padding)
Definition IWAParser.cpp:555
libetonyek::IWAParser::m_sectionStyles
StyleMap_t m_sectionStyles
Definition IWAParser.h:258
libetonyek::IWAParser::StyleParseFun_t
std::function< void(unsigned, IWORKStylePtr_t &)> StyleParseFun_t
Definition IWAParser.h:90
libetonyek::IWAParser::parseParagraphStyle
void parseParagraphStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:1696
libetonyek::IWAParser::queryFile
const RVNGInputStreamPtr_t queryFile(unsigned id) const
Definition IWAParser.cpp:259
libetonyek::IWAParser::readStroke
static void readStroke(const IWAMessage &msg, IWORKStroke &stroke)
Definition IWAParser.cpp:376
libetonyek::IWAParser::dispatchShapeWithMessage
bool dispatchShapeWithMessage(const IWAMessage &msg, unsigned type)
Definition IWAParser.cpp:591
libetonyek::IWAParser::getObjectType
boost::optional< unsigned > getObjectType(unsigned id) const
Definition IWAParser.cpp:254
libetonyek::IWAParser::queryParagraphStyle
const IWORKStylePtr_t queryParagraphStyle(unsigned id) const
Definition IWAParser.cpp:1028
libetonyek::IWAParser::parseTabularInfo
bool parseTabularInfo(const IWAMessage &msg)
Definition IWAParser.cpp:2506
libetonyek::IWAParser::readUUID
static boost::optional< std::string > readUUID(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:341
libetonyek::IWAParser::parseLink
void parseLink(unsigned id, std::string &url)
Definition IWAParser.cpp:3821
libetonyek::IWAParser::IWAObjectIndex
friend class IWAObjectIndex
Definition IWAParser.h:51
libetonyek::IWAParser::queryListStyle
const IWORKStylePtr_t queryListStyle(unsigned id) const
Definition IWAParser.cpp:1058
libetonyek::IWAParser::readDropCap
static void readDropCap(const IWAMessage &msg, IWORKDropCap &cap)
Definition IWAParser.cpp:563
libetonyek::IWAParser::m_dropCapStyles
StyleMap_t m_dropCapStyles
Definition IWAParser.h:256
libetonyek::IWAParser::readRefs
static std::deque< unsigned > readRefs(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:271
libetonyek::IWAParser::parseDrawableShape
bool parseDrawableShape(const IWAMessage &msg, bool isConnectionLine=false)
Definition IWAParser.cpp:1289
libetonyek::IWAParser::readUID
static boost::optional< uint64_t > readUID(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:319
libetonyek::IWAParser::m_index
IWAObjectIndex m_index
Definition IWAParser.h:251
libetonyek::IWAParser::readPosition
static boost::optional< IWORKPosition > readPosition(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:286
libetonyek::IWAParser::parseDropCapStyle
void parseDropCapStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:1664
libetonyek::IWAParser::ObjectMessage
friend class ObjectMessage
Definition IWAParser.h:87
libetonyek::IWAParser::ConditionRuleList_t
std::map< unsigned, ConditionRule_t > ConditionRuleList_t
Definition IWAParser.h:174
libetonyek::IWAParser::parsePageMaster
void parsePageMaster(unsigned id, PageMaster &pageMaster)
Definition IWAParser.cpp:2319
libetonyek::IWAParser::queryCellStyle
const IWORKStylePtr_t queryCellStyle(unsigned id) const
Definition IWAParser.cpp:1048
libetonyek::IWAParser::parseMediaStyle
void parseMediaStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:1912
libetonyek::IWAParser::dispatchShape
bool dispatchShape(unsigned id)
Definition IWAParser.cpp:583
libetonyek::IWAParser::ConditionRule_t
std::deque< ConditionRule > ConditionRule_t
Definition IWAParser.h:173
libetonyek::IWAParser::operator=
IWAParser & operator=(const IWAParser &)
libetonyek::IWAParser::m_visited
std::deque< unsigned > m_visited
Definition IWAParser.h:253
libetonyek::IWAParser::parseFormat
bool parseFormat(const IWAMessage &msg, Format &format)
Definition IWAParser.cpp:3333
libetonyek::IWAParser::parseTableHeaders
void parseTableHeaders(unsigned id, TableHeader &header)
Definition IWAParser.cpp:3251
libetonyek::IWAParser::readUIDs
static std::deque< uint64_t > readUIDs(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:329
libetonyek::IWAParser::parseAttachment
bool parseAttachment(unsigned id)
Definition IWAParser.cpp:1063
libetonyek::IWAParser::parseArrowProperties
bool parseArrowProperties(const IWAMessage &msg, IWORKPropertyMap &props, bool headArrow)
Definition IWAParser.cpp:1160
libetonyek::IWAParser::parseCustomFormat
void parseCustomFormat(unsigned id)
Definition IWAParser.cpp:3461
libetonyek::IWAParser::m_formatNameMap
IWORKFormatNameMap m_formatNameMap
Definition IWAParser.h:134
libetonyek::IWAParser::parseGraphicStyle
void parseGraphicStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:1820
libetonyek::IWAParser::readShadow
static void readShadow(const IWAMessage &msg, IWORKShadow &shadow)
Definition IWAParser.cpp:537
libetonyek::IWAParser::parseMask
void parseMask(unsigned id, IWORKGeometryPtr_t &geometry, IWORKPathPtr_t &path)
Definition IWAParser.cpp:1622
libetonyek::IWAParser::parsePath
bool parsePath(const IWAMessage &msg, IWORKPathPtr_t &path)
Definition IWAParser.cpp:1193
libetonyek::IWAParser::parseListStyle
void parseListStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:2079
libetonyek::IWAParser::parseObjectIndex
void parseObjectIndex()
Definition IWAParser.cpp:1635
libetonyek::IWAParser::queryDropCapStyle
const IWORKStylePtr_t queryDropCapStyle(unsigned id) const
Definition IWAParser.cpp:1023
libetonyek::IWAParser::parseComment
void parseComment(unsigned id)
Definition IWAParser.cpp:2473
libetonyek::IWAParser::parseStickyNote
virtual bool parseStickyNote(const IWAMessage &msg)
Definition IWAParser.cpp:1283
libetonyek::IWAParser::readGradient
static void readGradient(const IWAMessage &msg, IWORKGradient &gradient)
Definition IWAParser.cpp:504
libetonyek::IWAParser::readSize
static boost::optional< IWORKSize > readSize(const IWAMessage &msg, unsigned field)
Definition IWAParser.cpp:297
libetonyek::IWAParser::m_tableNameMap
IWORKTableNameMapPtr_t m_tableNameMap
Definition IWAParser.h:136
libetonyek::IWAParser::IWAParser
IWAParser(const IWAParser &)
libetonyek::IWAParser::m_charStyles
StyleMap_t m_charStyles
Definition IWAParser.h:255
libetonyek::IWAParser::m_listStyles
StyleMap_t m_listStyles
Definition IWAParser.h:264
libetonyek::IWAParser::parseCharacterStyle
void parseCharacterStyle(unsigned id, IWORKStylePtr_t &style)
Definition IWAParser.cpp:1640
libetonyek::IWAParser::parseDocument
virtual bool parseDocument()=0
libetonyek::IWAParser::m_uidFormatMap
std::map< uint64_t, Format > m_uidFormatMap
Definition IWAParser.h:267
libetonyek::IWAParser::m_collector
IWORKCollector & m_collector
Definition IWAParser.h:249
libetonyek::IWORKCollector
Definition IWORKCollector.h:42
libetonyek::IWORKLanguageManager
Definition IWORKLanguageManager.h:24
libetonyek::IWORKPropertyMap
Represents a (hierarchical) property map.
Definition IWORKPropertyMap.h:25
libetonyek::IWORKTable
Definition IWORKTable.h:32
libetonyek::IWORKText
Definition IWORKText.h:34
libetonyek_utils.h
libetonyek::IWORKToken::fill
@ fill
Definition IWORKToken.h:204
libetonyek::IWORKToken::padding
@ padding
Definition IWORKToken.h:349
libetonyek::IWORKToken::row
@ row
Definition IWORKToken.h:390
libetonyek::IWORKToken::format
@ format
Definition IWORKToken.h:537
libetonyek::IWORKToken::col
@ col
Definition IWORKToken.h:154
libetonyek::IWORKToken::rows
@ rows
Definition IWORKToken.h:392
libetonyek::IWORKToken::type
@ type
Definition IWORKToken.h:493
libetonyek::IWORKToken::cap
@ cap
Definition IWORKToken.h:517
libetonyek::IWORKToken::path
@ path
Definition IWORKToken.h:365
libetonyek::IWORKToken::header
@ header
Definition IWORKToken.h:256
libetonyek::IWORKToken::flags
@ flags
Definition IWORKToken.h:534
libetonyek::IWORKToken::style
@ style
Definition IWORKToken.h:421
libetonyek::IWORKToken::stroke
@ stroke
Definition IWORKToken.h:419
libetonyek::IWORKToken::count
@ count
Definition IWORKToken.h:522
libetonyek::IWORKToken::geometry
@ geometry
Definition IWORKToken.h:236
libetonyek::IWORKToken::formula
@ formula
Definition IWORKToken.h:228
libetonyek::IWORKToken::columns
@ columns
Definition IWORKToken.h:158
libetonyek::KEY1Token::table
@ table
Definition KEY1Token.h:198
libetonyek::KEY1Token::gradient
@ gradient
Definition KEY1Token.h:58
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::IWORKFill
boost::variant< IWORKColor, IWORKGradient, IWORKMediaContent > IWORKFill
Definition IWORKTypes.h:309
libetonyek::IWORKFormatNameMap
std::unordered_map< std::string, std::string > IWORKFormatNameMap
Definition IWORKTypes_fwd.h:32
libetonyek::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition libetonyek_utils.h:82
libetonyek::IWORKGridLineMap_t
std::map< unsigned, IWORKGridLine_t > IWORKGridLineMap_t
Definition IWORKTypes.h:122
libetonyek::IWORKPathPtr_t
std::shared_ptr< IWORKPath > IWORKPathPtr_t
Definition IWORKPath_fwd.h:22
libetonyek::IWORKFormulaPtr_t
std::shared_ptr< IWORKFormula > IWORKFormulaPtr_t
Definition IWORKTypes.h:123
libetonyek::IWORKGeometryPtr_t
std::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition IWORKTypes_fwd.h:45
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23
libetonyek::IWORKTableNameMapPtr_t
std::shared_ptr< IWORKTableNameMap_t > IWORKTableNameMapPtr_t
Definition IWORKTypes_fwd.h:36
libetonyek::IWAParser::ConditionRule::ConditionRule
ConditionRule()
Definition IWAParser.cpp:141
libetonyek::IWAParser::ConditionRule::m_cellStyleRef
boost::optional< unsigned > m_cellStyleRef
Definition IWAParser.h:169
libetonyek::IWAParser::ConditionRule::m_formula
IWORKFormulaPtr_t m_formula
Definition IWAParser.h:168
libetonyek::IWAParser::ConditionRule::m_paragraphStyleRef
boost::optional< unsigned > m_paragraphStyleRef
Definition IWAParser.h:170
libetonyek::IWAParser::Format
Definition IWAParser.h:141
libetonyek::IWAParser::Format::Format
Format()
Definition IWAParser.cpp:123
libetonyek::IWAParser::Format::m_type
boost::optional< IWORKCellType > m_type
Definition IWAParser.h:143
libetonyek::IWAParser::Format::m_format
boost::variant< IWORKNumberFormat, IWORKDateTimeFormat, IWORKDurationFormat > m_format
Definition IWAParser.h:144
libetonyek::IWAParser::PageMaster
Definition IWAParser.h:148
libetonyek::IWAParser::PageMaster::PageMaster
PageMaster()
Definition IWAParser.cpp:129
libetonyek::IWAParser::PageMaster::m_headerFootersSameAsPrevious
bool m_headerFootersSameAsPrevious
Definition IWAParser.h:151
libetonyek::IWAParser::PageMaster::m_style
IWORKStylePtr_t m_style
Definition IWAParser.h:150
libetonyek::IWAParser::TableHeader
Definition IWAParser.h:155
libetonyek::IWAParser::TableHeader::m_hidden
mdds::flat_segment_tree< unsigned, bool > m_hidden
Definition IWAParser.h:159
libetonyek::IWAParser::TableHeader::m_sizes
mdds::flat_segment_tree< unsigned, float > m_sizes
Definition IWAParser.h:158
libetonyek::IWAParser::TableHeader::TableHeader
TableHeader(unsigned count, float defValue=0)
Definition IWAParser.cpp:135
libetonyek::IWAParser::TableInfo::TableInfo
TableInfo(const std::shared_ptr< IWORKTable > &table, unsigned columns, unsigned rows)
Definition IWAParser.cpp:148
libetonyek::IWAParser::TableInfo::m_formatList
DataList_t m_formatList
Definition IWAParser.h:195
libetonyek::IWAParser::TableInfo::m_simpleTextList
DataList_t m_simpleTextList
Definition IWAParser.h:190
libetonyek::IWAParser::TableInfo::m_newFormatList
DataList_t m_newFormatList
Definition IWAParser.h:196
libetonyek::IWAParser::TableInfo::m_columnHeader
TableHeader m_columnHeader
Definition IWAParser.h:187
libetonyek::IWAParser::TableInfo::m_formattedTextList
DataList_t m_formattedTextList
Definition IWAParser.h:193
libetonyek::IWAParser::TableInfo::m_formulaList
DataList_t m_formulaList
Definition IWAParser.h:194
libetonyek::IWAParser::TableInfo::m_commentList
DataList_t m_commentList
Definition IWAParser.h:197
libetonyek::IWAParser::TableInfo::m_cellStyleList
DataList_t m_cellStyleList
Definition IWAParser.h:191
libetonyek::IWAParser::TableInfo::m_rowHeader
TableHeader m_rowHeader
Definition IWAParser.h:188
libetonyek::IWAParser::TableInfo::m_conditionStyleList
ConditionRuleList_t m_conditionStyleList
Definition IWAParser.h:192
libetonyek::IWAParser::TableInfo::m_style
IWORKStylePtr_t m_style
Definition IWAParser.h:185
libetonyek::IWAParser::TableInfo::m_rows
const unsigned m_rows
Definition IWAParser.h:183
libetonyek::IWAParser::TableInfo::m_columns
const unsigned m_columns
Definition IWAParser.h:182
libetonyek::IWAParser::TableInfo::m_table
std::shared_ptr< IWORKTable > m_table
Definition IWAParser.h:180
libetonyek::IWORKDropCap
Definition IWORKTypes.h:313
libetonyek::IWORKGeometry
Definition IWORKTypes.h:62
libetonyek::IWORKGradient
Definition IWORKTypes.h:300
libetonyek::IWORKPadding
Definition IWORKTypes.h:100
libetonyek::IWORKPageMaster
Definition IWORKTypes.h:376
libetonyek::IWORKShadow
Definition IWORKTypes.h:331
libetonyek::IWORKStroke
Definition IWORKTypes.h:278