IWORKCollector.h Source File documentation

IWORKCollector.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 IWORKCOLLECTOR_H_INCLUDED
11 #define IWORKCOLLECTOR_H_INCLUDED
12
13 #include <deque>
14 #include <memory>
15 #include <stack>
16 #include <string>
17
18 #include <boost/optional.hpp>
19
20 #include "libetonyek_utils.h"
21 #include "IWORKPath_fwd.h"
22 #include "IWORKShape.h"
23 #include "IWORKStyle.h"
24 #include "IWORKStyleStack.h"
25 #include "IWORKStylesheet.h"
26 #include "IWORKTransformation.h"
27 #include "IWORKTypes.h"
28 #include "IWORKOutputManager.h"
29
30 namespace libetonyek
31 {
32
33 class IWORKDocumentInterface;
34 class IWORKLanguageManager;
35 class IWORKPropertyMap;
36 class IWORKRecorder;
37 class IWORKTable;
38 class IWORKText;
39 struct IWORKSize;
40
41 class IWORKCollector
42 {
43 private:
44 struct Level
45 {
46 IWORKGeometryPtr_t m_geometry;
47 IWORKStylePtr_t m_graphicStyle;
48 glm::dmat3 m_trafo;
49 glm::dmat3 m_previousTrafo;
50
51 Level();
52 };
53
54 public:
55 explicit IWORKCollector(IWORKDocumentInterface *document);
56 virtual ~IWORKCollector();
57
58 void setRecorder(const std::shared_ptr<IWORKRecorder> &recorder);
59
60 // collector functions
61
62 void collectStyle(const IWORKStylePtr_t &style);
63
64 void setGraphicStyle(const IWORKStylePtr_t &style);
65
66 void collectGeometry(const IWORKGeometryPtr_t &geometry);
67 void setAccumulateTransformTo(bool accumulate);
68
69 void collectBezier(const IWORKPathPtr_t &path);
70 void collectLine(const IWORKLinePtr_t &line);
71 void collectShape(const boost::optional<int> &order=boost::none, bool locked=false);
72
73 void collectBezierPath();
74 void collectPolygonPath(const IWORKSize &size, unsigned edges);
75 void collectRoundedRectanglePath(const IWORKSize &size, double radius);
76 void collectArrowPath(const IWORKSize &size, double headWidth, double stemRelYPos, bool doubleSided);
77 void collectStarPath(const IWORKSize &size, unsigned points, double innerRadius);
78 void collectConnectionPath(const IWORKConnectionPath &path);
79 void collectCalloutPath(const IWORKSize &size, double radius, double tailSize, double tailX, double tailY, bool quoteBubble);
80
81 void collectImage(const IWORKMediaContentPtr_t &image, const IWORKGeometryPtr_t &cropGeometry=IWORKGeometryPtr_t(),
82 const boost::optional<int> &order=boost::none, bool locked=false);
83 void collectMedia(const IWORKMediaContentPtr_t &content, const IWORKGeometryPtr_t &cropGeometry=IWORKGeometryPtr_t(), const boost::optional<int> &order=boost::none);
84
85 void collectStylesheet(const IWORKStylesheetPtr_t &stylesheet);
86
87 void collectMetadata(const IWORKMetadata &metadata);
88
89 void collectHeader(const std::string &name);
90 void collectFooter(const std::string &name);
91
92 void collectTable(const std::shared_ptr<IWORKTable> &table);
93 void collectText(const std::shared_ptr<IWORKText> &text);
94
95 void startDocument();
96 void endDocument();
97
98 void startAttachment();
99 void endAttachment();
100
101 void startAttachments();
102 void endAttachments();
103
104 void startGroup();
105 void endGroup();
106
107 // really add a group in the final file
108 void openGroup();
109 void closeGroup();
110
111 void startLevel();
112 void endLevel();
113
114 void pushStyle();
115 void popStyle();
116
117 void pushStylesheet(const IWORKStylesheetPtr_t &stylesheet);
118 void popStylesheet();
119 IWORKStylesheetPtr_t getStylesheet() const
120 {
121 if (m_stylesheetStack.empty())
122 return IWORKStylesheetPtr_t();
123 return m_stylesheetStack.top();
124 }
125
126 IWORKOutputManager &getOutputManager();
127
128 public:
129 virtual std::shared_ptr<IWORKTable> createTable(const IWORKTableNameMapPtr_t &tableNameMap, const IWORKLanguageManager &langManager) const;
130 virtual std::shared_ptr<IWORKText> createText(const IWORKLanguageManager &langManager, bool discardEmptyContent = false, bool allowListInsertion=true) const;
131
132 protected:
133 void fillMetadata(librevenge::RVNGPropertyList &props);
134
135 static void fillGraphicProps(const IWORKStylePtr_t style, librevenge::RVNGPropertyList &props,
136 bool isSurface=true, bool isFrame=false);
137 static void fillLayoutProps(const IWORKStylePtr_t style, librevenge::RVNGPropertyList &props);
138 static void fillWrapProps(const IWORKStylePtr_t style, librevenge::RVNGPropertyList &props,
139 const boost::optional<int> &order);
140 static void writeFill(const IWORKFill &fill, librevenge::RVNGPropertyList &props);
141 virtual void drawShape(const IWORKShapePtr_t &shape);
142
143 private:
144 void pushStyle(const IWORKStylePtr_t &style);
145
146 void collectHeaderFooter(const std::string &name, IWORKHeaderFooterMap_t &map);
147
148 void drawLine(const IWORKLinePtr_t &line);
149 void drawMedia(const IWORKMediaPtr_t &media);
150 virtual void drawTable() = 0;
151 virtual void drawMedia(double x, double y, const librevenge::RVNGPropertyList &data) = 0;
152 virtual void fillShapeProperties(librevenge::RVNGPropertyList &props) = 0;
153 virtual bool createFrameStylesForTextBox() const = 0;
154 virtual void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox, const librevenge::RVNGPropertyList &style) = 0;
155
156 protected:
157 IWORKCollector(const IWORKCollector &);
158 IWORKCollector &operator=(const IWORKCollector &);
159
160 IWORKDocumentInterface *m_document;
161 std::shared_ptr<IWORKRecorder> m_recorder;
162
163 std::stack<Level> m_levelStack;
164 IWORKStyleStack m_styleStack;
165 std::stack<IWORKStylesheetPtr_t> m_stylesheetStack;
166 IWORKOutputManager m_outputManager;
167
168 std::deque<IWORKStylePtr_t> m_newStyles;
169
170 std::shared_ptr<IWORKTable> m_currentTable;
171 std::shared_ptr<IWORKText> m_currentText;
172
173 IWORKHeaderFooterMap_t m_headers;
174 IWORKHeaderFooterMap_t m_footers;
175
176 std::stack<IWORKPathPtr_t> m_pathStack;
177 IWORKPathPtr_t m_currentPath;
178
179 std::stack<bool> m_attachmentStack;
180 bool m_inAttachment;
181 bool m_inAttachments;
182
183 private:
184 IWORKDataPtr_t m_currentData;
185 IWORKMediaContentPtr_t m_currentUnfiltered;
186 IWORKMediaContentPtr_t m_currentFiltered;
187 IWORKMediaContentPtr_t m_currentLeveled;
188 IWORKMediaContentPtr_t m_currentContent;
189
190 IWORKMetadata m_metadata;
191
192 bool m_accumulateTransform;
193 int m_groupLevel;
194 };
195
196 } // namespace libetonyek
197
198 #endif // IWORKCOLLECTOR_H_INCLUDED
199
200 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKCollector::m_currentPath
IWORKPathPtr_t m_currentPath
Definition: IWORKCollector.h:177
libetonyek::IWORKCollector::endDocument
void endDocument()
Definition: IWORKCollector.cpp:566
libetonyek::IWORKCollector::m_headers
IWORKHeaderFooterMap_t m_headers
Definition: IWORKCollector.h:173
libetonyek::IWORKCollector::getOutputManager
IWORKOutputManager & getOutputManager()
Definition: IWORKCollector.cpp:1034
libetonyek::IWORK_WRAP_DIRECTION_RIGHT
@ IWORK_WRAP_DIRECTION_RIGHT
Definition: IWORKEnum.h:162
libetonyek::IWORKMetadata::m_comment
std::string m_comment
Definition: IWORKTypes.h:334
libetonyek::IWORKShapePtr_t
std::shared_ptr< IWORKShape > IWORKShapePtr_t
Definition: IWORKShape.h:38
libetonyek::IWORKDocumentInterface
Definition: IWORKDocumentInterface.h:18
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::none
@ none
Definition: IWORKToken.h:666
libetonyek::IWORKStroke
Definition: IWORKTypes.h:277
libetonyek::IWORKCollector::m_pathStack
std::stack< IWORKPathPtr_t > m_pathStack
Definition: IWORKCollector.h:176
libetonyek::IWORK_LINE_CAP_ROUND
@ IWORK_LINE_CAP_ROUND
Definition: IWORKEnum.h:69
libetonyek::KEY1Token::table
@ table
Definition: KEY1Token.h:198
libetonyek::IWORKCollector::m_accumulateTransform
bool m_accumulateTransform
Definition: IWORKCollector.h:192
libetonyek::IWORKLanguageManager
Definition: IWORKLanguageManager.h:23
IWORKShape.h
libetonyek::IWORKCollector::startDocument
void startDocument()
Definition: IWORKCollector.cpp:561
libetonyek::IWORKCollector::startLevel
void startLevel()
Definition: IWORKCollector.cpp:635
m_opacity
double m_opacity
the opacity
Definition: IWORKCollector.cpp:224
libetonyek::IWORKToken::shape
@ shape
Definition: IWORKToken.h:394
libetonyek::IWORKShadow::m_offset
double m_offset
Definition: IWORKTypes.h:319
libetonyek::IWORKTableNameMapPtr_t
std::shared_ptr< IWORKTableNameMap_t > IWORKTableNameMapPtr_t
Definition: IWORKTypes_fwd.h:34
libetonyek::rad2deg
double rad2deg(double value)
Convert an angle from radians to degrees.
Definition: libetonyek_utils.cpp:239
libetonyek::IWORKDocumentInterface::startDocument
virtual void startDocument(const librevenge::RVNGPropertyList &propList)=0
libetonyek::IWORKCollector::collectHeader
void collectHeader(const std::string &name)
Definition: IWORKCollector.cpp:525
m_props
RVNGPropertyList & m_props
Definition: IWORKCollector.cpp:222
libetonyek::IWORKStrokeType
IWORKStrokeType
Definition: IWORKEnum.h:118
libetonyek::IWORKOutputElements::addDrawPolyline
void addDrawPolyline(const librevenge::RVNGPropertyList &propList)
Definition: IWORKOutputElements.cpp:988
IWORKProperties.h
libetonyek::IWORKToken::type
@ type
Definition: IWORKToken.h:486
IWORKOutputManager.h
libetonyek::IWORKCollector::m_outputManager
IWORKOutputManager m_outputManager
Definition: IWORKCollector.h:166
libetonyek::IWORKDataPtr_t
std::shared_ptr< IWORKData > IWORKDataPtr_t
Definition: IWORKTypes_fwd.h:49
libetonyek::IWORKPath
Definition: IWORKPath.h:28
libetonyek::IWORKToken::stylesheet
@ stylesheet
Definition: IWORKToken.h:417
libetonyek::IWORKCollector::m_newStyles
std::deque< IWORKStylePtr_t > m_newStyles
Definition: IWORKCollector.h:168
libetonyek::IWORKOutputManager::getCurrent
IWORKOutputElements & getCurrent()
Get the current output element.
Definition: IWORKOutputManager.cpp:57
m_graphicStyle
IWORKStylePtr_t m_graphicStyle
Definition: KEY2Parser.cpp:531
libetonyek::IWORKCollector::operator=
IWORKCollector & operator=(const IWORKCollector &)
libetonyek::IWORKMedia
Definition: IWORKTypes.h:158
libetonyek::IWORKCollector::collectArrowPath
void collectArrowPath(const IWORKSize &size, double headWidth, double stemRelYPos, bool doubleSided)
Definition: IWORKCollector.cpp:441
libetonyek::IWORKShape
Representation of a shape.
Definition: IWORKShape.h:26
libetonyek::makeStarPath
IWORKPathPtr_t makeStarPath(const IWORKSize &size, const unsigned points, const double innerRadius)
Definition: IWORKShape.cpp:258
libetonyek::IWORKExternalTextWrap
Definition: IWORKTypes.h:172
libetonyek::IWORKCollector::endGroup
void endGroup()
Definition: IWORKCollector.cpp:589
libetonyek::IWORK_GRADIENT_TYPE_LINEAR
@ IWORK_GRADIENT_TYPE_LINEAR
Definition: IWORKEnum.h:107
libetonyek::IWORKMetadata
Definition: IWORKTypes.h:327
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::IWORKCollector::m_currentUnfiltered
IWORKMediaContentPtr_t m_currentUnfiltered
Definition: IWORKCollector.h:185
libetonyek::IWORK_STROKE_TYPE_AUTO
@ IWORK_STROKE_TYPE_AUTO
Definition: IWORKEnum.h:123
libetonyek::IWORKPadding
Definition: IWORKTypes.h:99
libetonyek::IWORK_STROKE_TYPE_SOLID
@ IWORK_STROKE_TYPE_SOLID
Definition: IWORKEnum.h:121
libetonyek::IWORKHeaderFooterMap_t
std::unordered_map< std::string, IWORKOutputElements > IWORKHeaderFooterMap_t
Definition: IWORKTypes.h:40
libetonyek::IWORKMetadata::m_keywords
std::string m_keywords
Definition: IWORKTypes.h:333
libetonyek::IWORKCollector::m_footers
IWORKHeaderFooterMap_t m_footers
Definition: IWORKCollector.h:174
libetonyek::IWORK_WRAP_TYPE_NEITHER
@ IWORK_WRAP_TYPE_NEITHER
Definition: IWORKEnum.h:175
libetonyek::IWORKTextPtr_t
std::shared_ptr< IWORKText > IWORKTextPtr_t
Definition: IWORKText_fwd.h:18
libetonyek::IWORKVerticalAlignment
IWORKVerticalAlignment
Definition: IWORKEnum.h:111
libetonyek::IWORKStyleStack
Representation of a dynamic inheritance of styles.
Definition: IWORKStyleStack.h:34
libetonyek::IWORKCollector::collectPolygonPath
void collectPolygonPath(const IWORKSize &size, unsigned edges)
Definition: IWORKCollector.cpp:423
IWORKTable.h
libetonyek::IWORKCollector::collectImage
void collectImage(const IWORKMediaContentPtr_t &image, const IWORKGeometryPtr_t &cropGeometry=IWORKGeometryPtr_t(), const boost::optional< int > &order=boost::none, bool locked=false)
Definition: IWORKCollector.cpp:341
libetonyek::IWORKMarker
Definition: IWORKTypes.h:89
libetonyek::IWORKGeometry
Definition: IWORKTypes.h:61
libetonyek::IWORKCollector::drawTextBox
virtual void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox, const librevenge::RVNGPropertyList &style)=0
libetonyek::IWORKCollector::endLevel
void endLevel()
Definition: IWORKCollector.cpp:656
IWORKTransformation.h
libetonyek::makeCalloutPath
IWORKPathPtr_t makeCalloutPath(const IWORKSize &size, const double radius, const double tailSize, const double tailX, const double tailY)
Definition: IWORKShape.cpp:288
libetonyek::IWORKStyleStack::set
void set(const IWORKStylePtr_t &style)
Definition: IWORKStyleStack.cpp:45
libetonyek::IWORKCollector::Level::m_trafo
glm::dmat3 m_trafo
Definition: IWORKCollector.h:48
libetonyek::IWORKToken::locked
@ locked
Definition: IWORKToken.h:570
libetonyek::IWORKCollector::startAttachment
void startAttachment()
Definition: IWORKCollector.cpp:670
libetonyek::IWORKStylesheetPtr_t
std::shared_ptr< IWORKStylesheet > IWORKStylesheetPtr_t
Definition: IWORKStylesheet.h:19
libetonyek::IWORK_STROKE_TYPE_NONE
@ IWORK_STROKE_TYPE_NONE
Definition: IWORKEnum.h:120
libetonyek::IWORK_VERTICAL_ALIGNMENT_BOTTOM
@ IWORK_VERTICAL_ALIGNMENT_BOTTOM
Definition: IWORKEnum.h:115
libetonyek::IWORKToken::path
@ path
Definition: IWORKToken.h:358
libetonyek::IWORKCollector::Level
Definition: IWORKCollector.h:44
libetonyek::IWORKCollector::m_attachmentStack
std::stack< bool > m_attachmentStack
Definition: IWORKCollector.h:179
libetonyek::IWORKToken::align
@ align
Definition: IWORKToken.h:502
libetonyek::IWORKCollector::collectMedia
void collectMedia(const IWORKMediaContentPtr_t &content, const IWORKGeometryPtr_t &cropGeometry=IWORKGeometryPtr_t(), const boost::optional< int > &order=boost::none)
Definition: IWORKCollector.cpp:485
libetonyek::IWORKCollector::Level::m_graphicStyle
IWORKStylePtr_t m_graphicStyle
Definition: IWORKCollector.h:47
libetonyek::IWORKShadow::m_color
IWORKColor m_color
Definition: IWORKTypes.h:316
libetonyek::IWORKMediaContentPtr_t
std::shared_ptr< IWORKMediaContent > IWORKMediaContentPtr_t
Definition: IWORKTypes_fwd.h:54
libetonyek::etonyek_half_pi
const double etonyek_half_pi(1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00)
libetonyek::makeArrowPath
IWORKPathPtr_t makeArrowPath(const IWORKSize &size, const double headWidth, const double stemThickness)
Definition: IWORKShape.cpp:216
libetonyek::IWORK_VERTICAL_ALIGNMENT_MIDDLE
@ IWORK_VERTICAL_ALIGNMENT_MIDDLE
Definition: IWORKEnum.h:114
libetonyek::IWORKCollector::m_stylesheetStack
std::stack< IWORKStylesheetPtr_t > m_stylesheetStack
Definition: IWORKCollector.h:165
libetonyek::IWORKCollector::collectCalloutPath
void collectCalloutPath(const IWORKSize &size, double radius, double tailSize, double tailX, double tailY, bool quoteBubble)
Definition: IWORKCollector.cpp:472
libetonyek::IWORKCollector::m_metadata
IWORKMetadata m_metadata
Definition: IWORKCollector.h:190
libetonyek::IWORKCollector::collectLine
void collectLine(const IWORKLinePtr_t &line)
Definition: IWORKCollector.cpp:364
libetonyek::IWORKCollector::fillMetadata
void fillMetadata(librevenge::RVNGPropertyList &props)
Definition: IWORKCollector.cpp:769
libetonyek::IWORKCollector::drawLine
void drawLine(const IWORKLinePtr_t &line)
Definition: IWORKCollector.cpp:1039
libetonyek::IWORK_VERTICAL_ALIGNMENT_TOP
@ IWORK_VERTICAL_ALIGNMENT_TOP
Definition: IWORKEnum.h:113
libetonyek::IWORKOutputElements::addSetStyle
void addSetStyle(const librevenge::RVNGPropertyList &propList)
Definition: IWORKOutputElements.cpp:1133
libetonyek::IWORKCollector::endAttachments
void endAttachments()
Definition: IWORKCollector.cpp:715
libetonyek::IWORKCollector::collectTable
void collectTable(const std::shared_ptr< IWORKTable > &table)
Definition: IWORKCollector.cpp:535
libetonyek::IWORKCollector::IWORKCollector
IWORKCollector(IWORKDocumentInterface *document)
Definition: IWORKCollector.cpp:237
libetonyek::IWORKCollector::pushStylesheet
void pushStylesheet(const IWORKStylesheetPtr_t &stylesheet)
Definition: IWORKCollector.cpp:731
libetonyek::pt2in
double pt2in(const double d)
Convert a length from points to inches.
Definition: libetonyek_utils.cpp:225
libetonyek::IWORKConnectionPath
Definition: IWORKPath.h:87
libetonyek::IWORKCollector::m_styleStack
IWORKStyleStack m_styleStack
Definition: IWORKCollector.h:164
libetonyek::IWORKStyle::link
bool link(const IWORKStylesheetPtr_t &stylesheet)
Find the parent style by its ID.
Definition: IWORKStyle.cpp:38
libetonyek::GenericException
Definition: libetonyek_utils.h:151
libetonyek::IWORKCollector::pushStyle
void pushStyle()
Definition: IWORKCollector.cpp:721
libetonyek::IWORKCollector::m_currentTable
std::shared_ptr< IWORKTable > m_currentTable
Definition: IWORKCollector.h:170
libetonyek::IWORKMarker::m_scale
double m_scale
Definition: IWORKTypes.h:93
libetonyek::IWORKToken::size
@ size
Definition: IWORKToken.h:395
libetonyek::IWORKCollector::createTable
virtual std::shared_ptr< IWORKTable > createTable(const IWORKTableNameMapPtr_t &tableNameMap, const IWORKLanguageManager &langManager) const
Definition: IWORKCollector.cpp:625
libetonyek::IWORKPath::InvalidException
Definition: IWORKPath.h:34
libetonyek::PAG1Token::order
@ order
Definition: PAG1Token.h:43
libetonyek::IWORKToken::line
@ line
Definition: IWORKToken.h:298
libetonyek::IWORKToken::content
@ content
Definition: IWORKToken.h:163
libetonyek::IWORKCollector::m_groupLevel
int m_groupLevel
Definition: IWORKCollector.h:193
libetonyek::makeTransformation
glm::dmat3 makeTransformation(const IWORKGeometry &geometry)
Create a transformation from a geometry.
Definition: IWORKTransformation.cpp:19
libetonyek::IWORK_WRAP_DIRECTION_BOTH
@ IWORK_WRAP_DIRECTION_BOTH
Definition: IWORKEnum.h:160
libetonyek::IWORKOutputElements::addDrawPath
void addDrawPath(const librevenge::RVNGPropertyList &propList)
Definition: IWORKOutputElements.cpp:983
libetonyek::makePolygonPath
IWORKPathPtr_t makePolygonPath(const IWORKSize &size, const unsigned edges)
Path creator functions for stock shapes.
Definition: IWORKShape.cpp:175
libetonyek::IWORKToken::c
@ c
Definition: IWORKToken.h:509
libetonyek::IWORK_IMAGE_TYPE_SCALE_TO_FIT
@ IWORK_IMAGE_TYPE_SCALE_TO_FIT
Definition: IWORKEnum.h:102
IWORKPath.h
libetonyek::IWORKCollector::m_currentData
IWORKDataPtr_t m_currentData
Definition: IWORKCollector.h:184
libetonyek::IWORKMediaPtr_t
std::shared_ptr< IWORKMedia > IWORKMediaPtr_t
Definition: IWORKTypes_fwd.h:64
IWORKStylesheet.h
libetonyek::IWORKCollector::createText
virtual std::shared_ptr< IWORKText > createText(const IWORKLanguageManager &langManager, bool discardEmptyContent=false, bool allowListInsertion=true) const
Definition: IWORKCollector.cpp:630
libetonyek::IWORKCollector::Level::m_geometry
IWORKGeometryPtr_t m_geometry
Definition: IWORKCollector.h:46
libetonyek::getLength
unsigned long getLength(const RVNGInputStreamPtr_t &input)
Definition: libetonyek_utils.cpp:184
libetonyek::IWORKPathPtr_t
std::shared_ptr< IWORKPath > IWORKPathPtr_t
Definition: IWORKPath_fwd.h:20
libetonyek::IWORKCollector::collectRoundedRectanglePath
void collectRoundedRectanglePath(const IWORKSize &size, double radius)
Definition: IWORKCollector.cpp:432
libetonyek::IWORKCollector::m_currentLeveled
IWORKMediaContentPtr_t m_currentLeveled
Definition: IWORKCollector.h:187
libetonyek::IWORKCollector::startAttachments
void startAttachments()
Definition: IWORKCollector.cpp:709
libetonyek::IWORKToken::image
@ image
Definition: IWORKToken.h:260
libetonyek::IWORKCollector::m_inAttachment
bool m_inAttachment
Definition: IWORKCollector.h:180
libetonyek::IWORKToken::metadata
@ metadata
Definition: IWORKToken.h:323
libetonyek::IWORKToken::color
@ color
Definition: IWORKToken.h:151
m_geometry
const IWORKGeometryPtr_t m_geometry
Definition: IWORKRecorder.cpp:56
libetonyek::IWORK_LINE_JOIN_MITER
@ IWORK_LINE_JOIN_MITER
Definition: IWORKEnum.h:75
libetonyek::IWORK_STROKE_TYPE_DASHED
@ IWORK_STROKE_TYPE_DASHED
Definition: IWORKEnum.h:122
libetonyek::IWORKOutputElements::empty
bool empty() const
Definition: IWORKOutputElements.cpp:888
libetonyek::IWORKCollector::collectConnectionPath
void collectConnectionPath(const IWORKConnectionPath &path)
Definition: IWORKCollector.cpp:463
libetonyek::makeDoubleArrowPath
IWORKPathPtr_t makeDoubleArrowPath(const IWORKSize &size, const double headWidth, const double stemThickness)
Definition: IWORKShape.cpp:233
libetonyek::IWORKCollector::collectBezier
void collectBezier(const IWORKPathPtr_t &path)
Definition: IWORKCollector.cpp:330
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:411
IWORKDocumentInterface.h
libetonyek::IWORKShadow::m_opacity
double m_opacity
Definition: IWORKTypes.h:320
libetonyek::NUM1Token::document
@ document
Definition: NUM1Token.h:34
IWORKText.h
libetonyek::IWORKToken::pos
@ pos
Definition: IWORKToken.h:592
libetonyek_utils.h
libetonyek::IWORKToken::angle
@ angle
Definition: IWORKToken.h:505
libetonyek::IWORKCollector::collectShape
void collectShape(const boost::optional< int > &order=boost::none, bool locked=false)
Definition: IWORKCollector.cpp:382
libetonyek::IWORKTable
Definition: IWORKTable.h:29
libetonyek::IWORKLinePtr_t
std::shared_ptr< IWORKLine > IWORKLinePtr_t
Definition: IWORKTypes_fwd.h:45
libetonyek::makeRoundedRectanglePath
IWORKPathPtr_t makeRoundedRectanglePath(const IWORKSize &size, const double radius)
Definition: IWORKShape.cpp:189
libetonyek::IWORKToken::style
@ style
Definition: IWORKToken.h:414
libetonyek::IWORKCollector::popStylesheet
void popStylesheet()
Definition: IWORKCollector.cpp:742
IWORKTypes.h
y
double y
Definition: IWORKShape.cpp:46
libetonyek::IWORKCollector
Definition: IWORKCollector.h:41
libetonyek::IWORKOutputManager
A manager for output elements.
Definition: IWORKOutputManager.h:29
libetonyek::IWORKSize
Definition: IWORKTypes.h:44
libetonyek::IWORKCollector::m_currentFiltered
IWORKMediaContentPtr_t m_currentFiltered
Definition: IWORKCollector.h:186
libetonyek::IWORKCollector::startGroup
void startGroup()
Definition: IWORKCollector.cpp:578
libetonyek::IWORKCollector::fillLayoutProps
static void fillLayoutProps(const IWORKStylePtr_t style, librevenge::RVNGPropertyList &props)
Definition: IWORKCollector.cpp:948
libetonyek::IWORKCollector::fillWrapProps
static void fillWrapProps(const IWORKStylePtr_t style, librevenge::RVNGPropertyList &props, const boost::optional< int > &order)
Definition: IWORKCollector.cpp:984
libetonyek::IWORK_IMAGE_TYPE_TILE
@ IWORK_IMAGE_TYPE_TILE
Definition: IWORKEnum.h:100
libetonyek::IWORKCollector::setAccumulateTransformTo
void setAccumulateTransformTo(bool accumulate)
Definition: IWORKCollector.cpp:307
IWORKCollector.h
libetonyek::IWORKCollector::drawTable
virtual void drawTable()=0
x
double x
Definition: IWORKShape.cpp:45
libetonyek::IWORKToken::start
@ start
Definition: IWORKToken.h:405
libetonyek::IWORKFill
boost::variant< IWORKColor, IWORKGradient, IWORKMediaContent > IWORKFill
Definition: IWORKTypes.h:309
ETONYEK_NUM_ELEMENTS
#define ETONYEK_NUM_ELEMENTS(array)
Definition: libetonyek_utils.h:29
libetonyek::IWORKToken::_1
@ _1
Definition: IWORKToken.h:641
libetonyek::IWORK_WRAP_TYPE_DIRECTIONAL
@ IWORK_WRAP_TYPE_DIRECTIONAL
Definition: IWORKEnum.h:173
libetonyek::IWORKOutputElements::addCloseGroup
void addCloseGroup()
Definition: IWORKOutputElements.cpp:918
libetonyek::IWORK_IMAGE_TYPE_ORIGINAL_SIZE
@ IWORK_IMAGE_TYPE_ORIGINAL_SIZE
Definition: IWORKEnum.h:98
libetonyek::IWORK_IMAGE_TYPE_STRETCH
@ IWORK_IMAGE_TYPE_STRETCH
Definition: IWORKEnum.h:99
libetonyek::IWORKMetadata::m_author
std::string m_author
Definition: IWORKTypes.h:332
libetonyek::IWORKCollector::collectGeometry
void collectGeometry(const IWORKGeometryPtr_t &geometry)
Definition: IWORKCollector.cpp:312
IWORKOutputElements.h
libetonyek::IWORKToken::tailSize
@ tailSize
Definition: IWORKToken.h:617
libetonyek::IWORKToken::wrap
@ wrap
Definition: IWORKToken.h:496
libetonyek::IWORKCollector::m_currentContent
IWORKMediaContentPtr_t m_currentContent
Definition: IWORKCollector.h:188
libetonyek::IWORKToken::first
@ first
Definition: IWORKToken.h:524
libetonyek::IWORKToken::layoutStyle
@ layoutStyle
Definition: IWORKToken.h:295
libetonyek::IWORKToken::stroke
@ stroke
Definition: IWORKToken.h:412
libetonyek::IWORKCollector::collectFooter
void collectFooter(const std::string &name)
Definition: IWORKCollector.cpp:530
libetonyek::IWORK_LINE_JOIN_NONE
@ IWORK_LINE_JOIN_NONE
Definition: IWORKEnum.h:74
libetonyek::IWORKCollector::createFrameStylesForTextBox
virtual bool createFrameStylesForTextBox() const =0
libetonyek::IWORKGeometryPtr_t
std::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition: IWORKTypes_fwd.h:41
IWORKStyleStack.h
libetonyek::deg2rad
double deg2rad(double value)
Convert an angle from degrees to radians.
Definition: libetonyek_utils.cpp:230
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::IWORK_GRADIENT_TYPE_RADIAL
@ IWORK_GRADIENT_TYPE_RADIAL
Definition: IWORKEnum.h:108
libetonyek::IWORKToken::s
@ s
Definition: IWORKToken.h:387
libetonyek::IWORKShadow
Definition: IWORKTypes.h:312
libetonyek::IWORK_IMAGE_TYPE_SCALE_TO_FILL
@ IWORK_IMAGE_TYPE_SCALE_TO_FILL
Definition: IWORKEnum.h:101
libetonyek::IWORKCollector::setGraphicStyle
void setGraphicStyle(const IWORKStylePtr_t &style)
Definition: IWORKCollector.cpp:292
libetonyek::IWORKCollector::collectMetadata
void collectMetadata(const IWORKMetadata &metadata)
Definition: IWORKCollector.cpp:520
libetonyek::IWORKToken::end
@ end
Definition: IWORKToken.h:189
IWORKPath_fwd.h
libetonyek::IWORKCollector::collectStarPath
void collectStarPath(const IWORKSize &size, unsigned points, double innerRadius)
Definition: IWORKCollector.cpp:454
libetonyek::IWORKCollector::Level::m_previousTrafo
glm::dmat3 m_previousTrafo
Definition: IWORKCollector.h:49
libetonyek::IWORKMetadata::m_title
std::string m_title
Definition: IWORKTypes.h:331
libetonyek::IWORKCollector::collectStyle
void collectStyle(const IWORKStylePtr_t &style)
Definition: IWORKCollector.cpp:280
libetonyek::IWORKCollector::setRecorder
void setRecorder(const std::shared_ptr< IWORKRecorder > &recorder)
Definition: IWORKCollector.cpp:275
libetonyek::IWORKToken::fill
@ fill
Definition: IWORKToken.h:200
libetonyek::makeQuoteBubblePath
IWORKPathPtr_t makeQuoteBubblePath(const IWORKSize &size, const double radius, const double tailSize, const double tailX, const double tailY)
Definition: IWORKShape.cpp:430
libetonyek::IWORKOutputElements::addOpenGroup
void addOpenGroup(const librevenge::RVNGPropertyList &propList)
Definition: IWORKOutputElements.cpp:1073
libetonyek::IWORKCollector::closeGroup
void closeGroup()
Definition: IWORKCollector.cpp:614
libetonyek::IWORKCollector::collectStylesheet
void collectStylesheet(const IWORKStylesheetPtr_t &stylesheet)
Definition: IWORKCollector.cpp:508
libetonyek::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libetonyek_utils.h:82
libetonyek::IWORKStyleStack::pop
void pop()
Pop a style from the active styles stack.
Definition: IWORKStyleStack.cpp:40
libetonyek::IWORKCollector::~IWORKCollector
virtual ~IWORKCollector()
Definition: IWORKCollector.cpp:265
libetonyek::IWORKCollector::openGroup
void openGroup()
Definition: IWORKCollector.cpp:602
libetonyek::IWORK_LINE_CAP_NONE
@ IWORK_LINE_CAP_NONE
Definition: IWORKEnum.h:67
libetonyek::IWORKToken::padding
@ padding
Definition: IWORKToken.h:343
libetonyek::IWORKCollector::m_recorder
std::shared_ptr< IWORKRecorder > m_recorder
Definition: IWORKCollector.h:161
libetonyek::IWORK_LINE_JOIN_ROUND
@ IWORK_LINE_JOIN_ROUND
Definition: IWORKEnum.h:76
libetonyek::IWORKDocumentInterface::endDocument
virtual void endDocument()=0
libetonyek::IWORK_WRAP_DIRECTION_LEFT
@ IWORK_WRAP_DIRECTION_LEFT
Definition: IWORKEnum.h:161
IWORKRecorder.h
libetonyek::IWORKCollector::popStyle
void popStyle()
Definition: IWORKCollector.cpp:726
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
libetonyek::makeColor
librevenge::RVNGString makeColor(const IWORKColor &color)
Definition: libetonyek_utils.cpp:251
libetonyek::IWORK_LINE_CAP_BUTT
@ IWORK_LINE_CAP_BUTT
Definition: IWORKEnum.h:68
libetonyek::IWORKCollector::collectHeaderFooter
void collectHeaderFooter(const std::string &name, IWORKHeaderFooterMap_t &map)
Definition: IWORKCollector.cpp:755
libetonyek::IWORKCollector::writeFill
static void writeFill(const IWORKFill &fill, librevenge::RVNGPropertyList &props)
Definition: IWORKCollector.cpp:1249
libetonyek::KEY1Token::radius
@ radius
Definition: KEY1Token.h:185
libetonyek::IWORKCollector::fillShapeProperties
virtual void fillShapeProperties(librevenge::RVNGPropertyList &props)=0
libetonyek::IWORKCollector::fillGraphicProps
static void fillGraphicProps(const IWORKStylePtr_t style, librevenge::RVNGPropertyList &props, bool isSurface=true, bool isFrame=false)
Definition: IWORKCollector.cpp:781
libetonyek::IWORKCollector::m_inAttachments
bool m_inAttachments
Definition: IWORKCollector.h:181
libetonyek::IWORK_WRAP_TYPE_LARGEST
@ IWORK_WRAP_TYPE_LARGEST
Definition: IWORKEnum.h:174
libetonyek::IWORKCollector::drawMedia
void drawMedia(const IWORKMediaPtr_t &media)
Definition: IWORKCollector.cpp:1117
libetonyek::IWORKToken::geometry
@ geometry
Definition: IWORKToken.h:232
libetonyek::IWORKCollector::m_levelStack
std::stack< Level > m_levelStack
Definition: IWORKCollector.h:163
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKMarker::m_path
boost::optional< std::string > m_path
Definition: IWORKTypes.h:95
libetonyek::IWORKToken::data
@ data
Definition: IWORKToken.h:174
libetonyek::IWORKConnectionPath::getPath
IWORKPathPtr_t getPath() const
libetonyek::IWORKCollector::collectText
void collectText(const std::shared_ptr< IWORKText > &text)
Definition: IWORKCollector.cpp:549
libetonyek::IWORKCollector::m_currentText
std::shared_ptr< IWORKText > m_currentText
Definition: IWORKCollector.h:171
libetonyek::IWORKCollector::getStylesheet
IWORKStylesheetPtr_t getStylesheet() const
Definition: IWORKCollector.h:119
libetonyek::IWORKCollector::drawShape
virtual void drawShape(const IWORKShapePtr_t &shape)
Definition: IWORKCollector.cpp:1197
libetonyek::IWORKShadow::m_angle
double m_angle
Definition: IWORKTypes.h:317
libetonyek::IWORKStyleStack::push
void push()
Push a style onto the active styles stack.
Definition: IWORKStyleStack.cpp:30
libetonyek::KEY1Token::gradient
@ gradient
Definition: KEY1Token.h:58
IWORKStyle.h
libetonyek::IWORKCollector::Level::Level
Level()
Definition: IWORKCollector.cpp:229
libetonyek::IWORKToken::opacity
@ opacity
Definition: IWORKToken.h:588
libetonyek::IWORKCollector::collectBezierPath
void collectBezierPath()
Definition: IWORKCollector.cpp:418
libetonyek::IWORKCollector::m_document
IWORKDocumentInterface * m_document
Definition: IWORKCollector.h:160
libetonyek::IWORKToken::media
@ media
Definition: IWORKToken.h:321
libetonyek::IWORKOutputElements
Definition: IWORKOutputElements.h:32
libetonyek::IWORKToken::text
@ text
Definition: IWORKToken.h:465
libetonyek::IWORKCollector::endAttachment
void endAttachment()
Definition: IWORKCollector.cpp:686