VSDContentCollector.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 libvisio 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 VSDCONTENTCOLLECTOR_H
11 #define VSDCONTENTCOLLECTOR_H
12 
13 #include <locale.h>
14 #include <sstream>
15 #include <string>
16 #include <cmath>
17 #include <map>
18 #include <list>
19 #include <vector>
20 #include "libvisio_utils.h"
21 #include "VSDCollector.h"
22 #include "VSDParser.h"
23 #include "VSDOutputElementList.h"
24 #include "VSDStyles.h"
25 #include "VSDPages.h"
26 
27 namespace libvisio
28 {
29 
31 {
32 public:
34  librevenge::RVNGDrawingInterface *painter,
35  std::vector<std::map<unsigned, XForm> > &groupXFormsSequence,
36  std::vector<std::map<unsigned, unsigned> > &groupMembershipsSequence,
37  std::vector<std::list<unsigned> > &documentPageShapeOrders,
38  VSDStyles &styles, VSDStencils &stencils
39  );
41  {
42  if (m_txtxform) delete(m_txtxform);
43  };
44 
45  void collectEllipticalArcTo(unsigned id, unsigned level, double x3, double y3, double x2, double y2, double angle, double ecc);
46  void collectForeignData(unsigned level, const librevenge::RVNGBinaryData &binaryData);
47  void collectOLEList(unsigned id, unsigned level);
48  void collectOLEData(unsigned id, unsigned level, const librevenge::RVNGBinaryData &oleData);
49  void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop);
50  void collectLine(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
51  const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
52  const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding);
53  void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
54  const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
55  const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
56  const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY);
57  void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
58  const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
59  const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
60  const boost::optional<Colour> &shfgc);
61  void collectThemeReference(unsigned level, const boost::optional<long> &lineColour, const boost::optional<long> &fillColour,
62  const boost::optional<long> &shadowColour, const boost::optional<long> &fontColour);
63  void collectGeometry(unsigned id, unsigned level, bool noFill, bool noLine, bool noShow);
64  void collectMoveTo(unsigned id, unsigned level, double x, double y);
65  void collectLineTo(unsigned id, unsigned level, double x, double y);
66  void collectArcTo(unsigned id, unsigned level, double x2, double y2, double bow);
67  void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree,
68  const std::vector<std::pair<double, double> > &ctrlPnts, const std::vector<double> &kntVec, const std::vector<double> &weights);
69  void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, unsigned dataID);
70  void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, const NURBSData &data);
71  void collectPolylineTo(unsigned id, unsigned level, double x, double y, unsigned char xType, unsigned char yType,
72  const std::vector<std::pair<double, double> > &points);
73  void collectPolylineTo(unsigned id, unsigned level, double x, double y, unsigned dataID);
74  void collectPolylineTo(unsigned id, unsigned level, double x, double y, const PolylineData &data);
75  void collectShapeData(unsigned id, unsigned level, unsigned char xType, unsigned char yType, unsigned degree, double lastKnot,
76  std::vector<std::pair<double, double> > controlPoints, std::vector<double> knotVector, std::vector<double> weights);
77  void collectShapeData(unsigned id, unsigned level, unsigned char xType, unsigned char yType, std::vector<std::pair<double, double> > points);
78  void collectXFormData(unsigned level, const XForm &xform);
79  void collectTxtXForm(unsigned level, const XForm &txtxform);
80  void collectShapesOrder(unsigned id, unsigned level, const std::vector<unsigned> &shapeIds);
81  void collectForeignDataType(unsigned level, unsigned foreignType, unsigned foreignFormat, double offsetX, double offsetY, double width, double height);
82  void collectPageProps(unsigned id, unsigned level, double pageWidth, double pageHeight, double shadowOffsetX, double shadowOffsetY, double scale);
83  void collectPage(unsigned id, unsigned level, unsigned backgroundPageID, bool isBackgroundPage, const VSDName &pageName);
84  void collectShape(unsigned id, unsigned level, unsigned parent, unsigned masterPage, unsigned masterShape, unsigned lineStyle, unsigned fillStyle, unsigned textStyle);
85  void collectSplineStart(unsigned id, unsigned level, double x, double y, double secondKnot, double firstKnot, double lastKnot, unsigned degree);
86  void collectSplineKnot(unsigned id, unsigned level, double x, double y, double knot);
87  void collectSplineEnd();
88  void collectInfiniteLine(unsigned id, unsigned level, double x1, double y1, double x2, double y2);
89  void collectRelCubBezTo(unsigned id, unsigned level, double x, double y, double a, double b, double c, double d);
90  void collectRelEllipticalArcTo(unsigned id, unsigned level, double x, double y, double a, double b, double c, double d);
91  void collectRelLineTo(unsigned id, unsigned level, double x, double y);
92  void collectRelMoveTo(unsigned id, unsigned level, double x, double y);
93  void collectRelQuadBezTo(unsigned id, unsigned level, double x, double y, double a, double b);
94 
95  void collectUnhandledChunk(unsigned id, unsigned level);
96 
97  void collectText(unsigned level, const librevenge::RVNGBinaryData &textStream, TextFormat format);
98  void collectCharIX(unsigned id, unsigned level, unsigned charCount, const boost::optional<VSDName> &font,
99  const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
100  const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline,
101  const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps,
102  const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps, const boost::optional<bool> &superscript,
103  const boost::optional<bool> &subscript);
104  void collectDefaultCharStyle(unsigned charCount, const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour,
105  const boost::optional<double> &fontSize, const boost::optional<bool> &bold, const boost::optional<bool> &italic,
106  const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout,
107  const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps,
108  const boost::optional<bool> &smallcaps, const boost::optional<bool> &superscript, const boost::optional<bool> &subscript);
109  void collectParaIX(unsigned id, unsigned level, unsigned charCount, const boost::optional<double> &indFirst,
110  const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine,
111  const boost::optional<double> &spBefore, const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align,
112  const boost::optional<unsigned char> &bullet, const boost::optional<VSDName> &bulletStr, const boost::optional<VSDName> &bulletFont,
113  const boost::optional<double> &bulletFontSize, const boost::optional<double> &textPosAfterBullet,
114  const boost::optional<unsigned> &flags);
115  void collectDefaultParaStyle(unsigned charCount, const boost::optional<double> &indFirst, const boost::optional<double> &indLeft,
116  const boost::optional<double> &indRight, const boost::optional<double> &spLine, const boost::optional<double> &spBefore,
117  const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align,
118  const boost::optional<unsigned char> &bullet, const boost::optional<VSDName> &bulletStr,
119  const boost::optional<VSDName> &bulletFont, const boost::optional<double> &bulletFontSize,
120  const boost::optional<double> &textPosAfterBullet, const boost::optional<unsigned> &flags);
121  void collectTextBlock(unsigned level, const boost::optional<double> &leftMargin, const boost::optional<double> &rightMargin,
122  const boost::optional<double> &topMargin, const boost::optional<double> &bottomMargin,
123  const boost::optional<unsigned char> &verticalAlign, const boost::optional<bool> &isBgFilled,
124  const boost::optional<Colour> &bgColour, const boost::optional<double> &defaultTabStop,
125  const boost::optional<unsigned char> &textDirection);
126  void collectNameList(unsigned id, unsigned level);
127  void collectName(unsigned id, unsigned level, const librevenge::RVNGBinaryData &name, TextFormat format);
128  void collectPageSheet(unsigned id, unsigned level);
129  void collectMisc(unsigned level, const VSDMisc &misc);
130  void collectLayer(unsigned id, unsigned level, const VSDLayer &layer);
131  void collectLayerMem(unsigned level, const VSDName &layerMem);
132  void collectTabsDataList(unsigned level, const std::map<unsigned, VSDTabSet> &tabSets);
133 
134  // Style collectors
135  void collectStyleSheet(unsigned id, unsigned level, unsigned parentLineStyle, unsigned parentFillStyle, unsigned parentTextStyle);
136  void collectLineStyle(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
137  const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
138  const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding);
139  void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
140  const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
141  const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
142  const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY);
143  void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
144  const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
145  const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
146  const boost::optional<Colour> &shfgc);
147  void collectCharIXStyle(unsigned id, unsigned level, unsigned charCount, const boost::optional<VSDName> &font,
148  const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
149  const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline,
150  const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps,
151  const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps, const boost::optional<bool> &superscript,
152  const boost::optional<bool> &subscript);
153  void collectParaIXStyle(unsigned id, unsigned level, unsigned charCount, const boost::optional<double> &indFirst,
154  const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine,
155  const boost::optional<double> &spBefore, const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align,
156  const boost::optional<unsigned char> &bullet, const boost::optional<VSDName> &bulletStr,
157  const boost::optional<VSDName> &bulletFont, const boost::optional<double> &bulletFontSize,
158  const boost::optional<double> &textPosAfterBullet, const boost::optional<unsigned> &flags);
159  void collectTextBlockStyle(unsigned level, const boost::optional<double> &leftMargin, const boost::optional<double> &rightMargin,
160  const boost::optional<double> &topMargin, const boost::optional<double> &bottomMargin,
161  const boost::optional<unsigned char> &verticalAlign, const boost::optional<bool> &isBgFilled,
162  const boost::optional<Colour> &bgColour, const boost::optional<double> &defaultTabStop,
163  const boost::optional<unsigned char> &textDirection);
164  void collectStyleThemeReference(unsigned level, const boost::optional<long> &lineColour, const boost::optional<long> &fillColour,
165  const boost::optional<long> &shadowColour, const boost::optional<long> &fontColour);
166 
167  virtual void collectMetaData(const librevenge::RVNGPropertyList &metaData);
168 
169 
170  // Field list
171  void collectFieldList(unsigned id, unsigned level);
172  void collectTextField(unsigned id, unsigned level, int nameId, int formatStringId);
173  void collectNumericField(unsigned id, unsigned level, unsigned short format, double number, int formatStringId);
174 
175  void startPage(unsigned pageId);
176  void endPage();
177  void endPages();
178 
179 
180 private:
183  librevenge::RVNGDrawingInterface *m_painter;
184 
185  void applyXForm(double &x, double &y, const XForm &xform);
186 
187  void transformPoint(double &x, double &y, XForm *txtxform = 0);
188  void transformAngle(double &angle, XForm *txtxform = 0);
189  void transformFlips(bool &flipX, bool &flipY);
190 
191  double _NURBSBasis(unsigned knot, unsigned degree, double point, const std::vector<double> &knotVector);
192 
193  void _flushShape();
194  void _flushCurrentPath();
195  void _flushText();
197  void _flushCurrentPage();
198 
199  void _handleLevelChange(unsigned level);
200 
201  void _handleForeignData(const librevenge::RVNGBinaryData &data);
202 
203  void _lineProperties(const VSDLineStyle &style, librevenge::RVNGPropertyList &styleProps);
204  void _fillAndShadowProperties(const VSDFillStyle &style, librevenge::RVNGPropertyList &styleProps);
205 
206  void _applyLinePattern();
207  const char *_linePropertiesMarkerViewbox(unsigned marker);
208  const char *_linePropertiesMarkerPath(unsigned marker);
209  double _linePropertiesMarkerScale(unsigned marker);
210 
211  void appendCharacters(librevenge::RVNGString &text, const std::vector<unsigned char> &characters, TextFormat format);
212  void appendCharacters(librevenge::RVNGString &text, const std::vector<unsigned char> &characters);
213  void _convertDataToString(librevenge::RVNGString &result, const librevenge::RVNGBinaryData &data, TextFormat format);
214  bool parseFormatId(const char *formatString, unsigned short &result);
215  void _appendField(librevenge::RVNGString &text);
216 
217  // NURBS processing functions
218  bool _isUniform(const std::vector<double> &weights) const;
219  void _generatePolylineFromNURBS(unsigned degree, const std::vector<std::pair<double, double> > &controlPoints,
220  const std::vector<double> &knotVector, const std::vector<double> &weights);
221  void _generateBezierSegmentsFromNURBS(unsigned degree, const std::vector<std::pair<double, double> > &controlPoints,
222  const std::vector<double> &knotVector);
223  void _outputCubicBezierSegment(const std::vector<std::pair<double, double> > &points);
224  void _outputQuadraticBezierSegment(const std::vector<std::pair<double, double> > &points);
225  void _outputLinearBezierSegment(const std::vector<std::pair<double, double> > &points);
226  void _appendVisibleAndPrintable(librevenge::RVNGPropertyList &propList);
227  void _bulletFromParaFormat(VSDBullet &bullet, const VSDParaStyle &paraStyle);
228  void _listLevelFromBullet(librevenge::RVNGPropertyList &propList, const VSDBullet &bullet);
229  void _fillParagraphProperties(librevenge::RVNGPropertyList &propList, const VSDParaStyle &style);
230  void _fillTabSet(librevenge::RVNGPropertyList &propList, const VSDTabSet &tabSet);
231  void _fillCharProperties(librevenge::RVNGPropertyList &propList, const VSDCharStyle &style);
232  void _convertToPath(const std::vector<librevenge::RVNGPropertyList> &segmentVector,
233  librevenge::RVNGPropertyListVector &path, double rounding);
234 
236  double m_pageWidth;
237  double m_pageHeight;
240  double m_scale;
241  double m_x;
242  double m_y;
243  double m_originalX;
244  double m_originalY;
248  std::vector<librevenge::RVNGPropertyList> m_currentFillGeometry;
249  std::vector<librevenge::RVNGPropertyList> m_currentLineGeometry;
250  std::map<unsigned, XForm> *m_groupXForms;
251  librevenge::RVNGBinaryData m_currentForeignData;
252  librevenge::RVNGBinaryData m_currentOLEData;
253  librevenge::RVNGPropertyList m_currentForeignProps;
255  unsigned m_foreignType;
256  unsigned m_foreignFormat;
261  bool m_noLine;
262  bool m_noFill;
263  bool m_noShow;
264  std::map<unsigned short, VSDFont> m_fonts;
265  unsigned m_currentLevel;
267  std::vector<std::map<unsigned, XForm> > &m_groupXFormsSequence;
268  std::vector<std::map<unsigned, unsigned> > &m_groupMembershipsSequence;
269  std::vector<std::map<unsigned, unsigned> >::iterator m_groupMemberships;
272  std::map<unsigned, VSDOutputElementList> m_pageOutputDrawing;
273  std::map<unsigned, VSDOutputElementList> m_pageOutputText;
274  std::vector<std::list<unsigned> > &m_documentPageShapeOrders;
275  std::vector<std::list<unsigned> >::iterator m_pageShapeOrder;
277 
278  std::map<unsigned, NURBSData> m_NURBSData;
279  std::map<unsigned, PolylineData> m_polylineData;
280  librevenge::RVNGString m_currentText;
281  std::map<unsigned, librevenge::RVNGString> m_names, m_stencilNames;
282  std::vector<librevenge::RVNGString> m_fields;
284  unsigned m_fieldIndex;
285  std::vector<VSDCharStyle> m_charFormats;
286  std::vector<VSDParaStyle> m_paraFormats;
287 
291 
293 
296 
299 
303 
305 
307  unsigned m_currentPageID;
310 
312 
313  std::vector<std::pair<double, double> > m_splineControlPoints;
314  std::vector<double> m_splineKnotVector;
317  unsigned m_splineDegree;
318  unsigned m_splineLevel;
321 
323  std::vector<unsigned> m_currentLayerMem;
324  std::vector<VSDTabSet> m_tabSets;
325 };
326 
327 } // namespace libvisio
328 
329 #endif /* VSDCONTENTCOLLECTOR_H */
330 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
std::vector< std::list< unsigned > >::iterator m_pageShapeOrder
Definition: VSDContentCollector.h:275
VSDContentCollector(librevenge::RVNGDrawingInterface *painter, std::vector< std::map< unsigned, XForm > > &groupXFormsSequence, std::vector< std::map< unsigned, unsigned > > &groupMembershipsSequence, std::vector< std::list< unsigned > > &documentPageShapeOrders, VSDStyles &styles, VSDStencils &stencils)
Definition: VSDContentCollector.cpp:79
Definition: VSDStyles.h:499
std::vector< std::map< unsigned, unsigned > >::iterator m_groupMemberships
Definition: VSDContentCollector.h:269
void _generateBezierSegmentsFromNURBS(unsigned degree, const std::vector< std::pair< double, double > > &controlPoints, const std::vector< double > &knotVector)
Definition: VSDContentCollector.cpp:1672
bool m_noLine
Definition: VSDContentCollector.h:261
Definition: VSDStencils.h:26
void collectThemeReference(unsigned level, const boost::optional< long > &lineColour, const boost::optional< long > &fillColour, const boost::optional< long > &shadowColour, const boost::optional< long > &fontColour)
Definition: VSDContentCollector.cpp:1357
void collectShape(unsigned id, unsigned level, unsigned parent, unsigned masterPage, unsigned masterShape, unsigned lineStyle, unsigned fillStyle, unsigned textStyle)
Definition: VSDContentCollector.cpp:2221
void collectCharIXStyle(unsigned id, unsigned level, unsigned charCount, const boost::optional< VSDName > &font, const boost::optional< Colour > &fontColour, const boost::optional< double > &fontSize, const boost::optional< bool > &bold, const boost::optional< bool > &italic, const boost::optional< bool > &underline, const boost::optional< bool > &doubleunderline, const boost::optional< bool > &strikeout, const boost::optional< bool > &doublestrikeout, const boost::optional< bool > &allcaps, const boost::optional< bool > &initcaps, const boost::optional< bool > &smallcaps, const boost::optional< bool > &superscript, const boost::optional< bool > &subscript)
Definition: VSDContentCollector.cpp:2555
void transformAngle(double &angle, XForm *txtxform=0)
Definition: VSDContentCollector.cpp:2123
virtual ~VSDContentCollector()
Definition: VSDContentCollector.h:40
XForm m_xform
Definition: VSDContentCollector.h:245
bool parseFormatId(const char *formatString, unsigned short &result)
Definition: VSDContentCollector.cpp:3266
void collectText(unsigned level, const librevenge::RVNGBinaryData &textStream, TextFormat format)
Definition: VSDContentCollector.cpp:2386
void _convertToPath(const std::vector< librevenge::RVNGPropertyList > &segmentVector, librevenge::RVNGPropertyListVector &path, double rounding)
Definition: VSDContentCollector.cpp:407
bool m_isPageStarted
Definition: VSDContentCollector.h:235
void _fillCharProperties(librevenge::RVNGPropertyList &propList, const VSDCharStyle &style)
Definition: VSDContentCollector.cpp:842
std::vector< librevenge::RVNGString > m_fields
Definition: VSDContentCollector.h:282
std::vector< std::map< unsigned, XForm > > & m_groupXFormsSequence
Definition: VSDContentCollector.h:267
VSDLayerList m_currentLayerList
Definition: VSDContentCollector.h:322
std::vector< VSDParaStyle > m_paraFormats
Definition: VSDContentCollector.h:286
bool m_noShow
Definition: VSDContentCollector.h:263
void collectDefaultCharStyle(unsigned charCount, const boost::optional< VSDName > &font, const boost::optional< Colour > &fontColour, const boost::optional< double > &fontSize, const boost::optional< bool > &bold, const boost::optional< bool > &italic, const boost::optional< bool > &underline, const boost::optional< bool > &doubleunderline, const boost::optional< bool > &strikeout, const boost::optional< bool > &doublestrikeout, const boost::optional< bool > &allcaps, const boost::optional< bool > &initcaps, const boost::optional< bool > &smallcaps, const boost::optional< bool > &superscript, const boost::optional< bool > &subscript)
Definition: VSDContentCollector.cpp:2450
void collectMoveTo(unsigned id, unsigned level, double x, double y)
Definition: VSDContentCollector.cpp:1518
void collectEllipticalArcTo(unsigned id, unsigned level, double x3, double y3, double x2, double y2, double angle, double ecc)
Definition: VSDContentCollector.cpp:1040
Definition: VSDLayerList.h:33
Definition: VSDStyles.h:103
void collectRelLineTo(unsigned id, unsigned level, double x, double y)
Definition: VSDContentCollector.cpp:1293
void collectShapeData(unsigned id, unsigned level, unsigned char xType, unsigned char yType, unsigned degree, double lastKnot, std::vector< std::pair< double, double > > controlPoints, std::vector< double > knotVector, std::vector< double > weights)
Definition: VSDContentCollector.cpp:2020
double m_originalX
Definition: VSDContentCollector.h:243
Definition: VSDTypes.h:96
void collectForeignData(unsigned level, const librevenge::RVNGBinaryData &binaryData)
Definition: VSDContentCollector.cpp:1364
Definition: VSDTypes.h:233
void endPage()
Definition: VSDContentCollector.cpp:3242
const char * _linePropertiesMarkerViewbox(unsigned marker)
Definition: VSDContentCollector.cpp:110
void collectFillAndShadow(unsigned level, const boost::optional< Colour > &colourFG, const boost::optional< Colour > &colourBG, const boost::optional< unsigned char > &fillPattern, const boost::optional< double > &fillFGTransparency, const boost::optional< double > &fillBGTransparency, const boost::optional< unsigned char > &shadowPattern, const boost::optional< Colour > &shfgc, const boost::optional< double > &shadowOffsetX, const boost::optional< double > &shadowOffsetY)
Definition: VSDContentCollector.cpp:1340
void _generatePolylineFromNURBS(unsigned degree, const std::vector< std::pair< double, double > > &controlPoints, const std::vector< double > &knotVector, const std::vector< double > &weights)
Definition: VSDContentCollector.cpp:1775
void appendCharacters(librevenge::RVNGString &text, const std::vector< unsigned char > &characters, TextFormat format)
Definition: VSDContentCollector.cpp:3296
unsigned m_currentLevel
Definition: VSDContentCollector.h:265
librevenge::RVNGDrawingInterface * m_painter
Definition: VSDContentCollector.h:183
double m_shadowOffsetX
Definition: VSDContentCollector.h:238
Definition: VSDStyles.h:461
Definition: VSDTypes.h:224
void collectMisc(unsigned level, const VSDMisc &misc)
Definition: VSDContentCollector.cpp:3455
void _flushCurrentPage()
Definition: VSDContentCollector.cpp:993
void collectOLEData(unsigned id, unsigned level, const librevenge::RVNGBinaryData &oleData)
Definition: VSDContentCollector.cpp:1378
bool m_noFill
Definition: VSDContentCollector.h:262
void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop)
Definition: VSDContentCollector.cpp:1113
void collectUnhandledChunk(unsigned id, unsigned level)
Definition: VSDContentCollector.cpp:2342
void _flushShape()
Definition: VSDContentCollector.cpp:214
void collectStyleSheet(unsigned id, unsigned level, unsigned parentLineStyle, unsigned parentFillStyle, unsigned parentTextStyle)
Definition: VSDContentCollector.cpp:2501
Definition: VSDPages.h:34
VSDParaStyle m_defaultParaStyle
Definition: VSDContentCollector.h:295
unsigned m_splineDegree
Definition: VSDContentCollector.h:317
void collectNumericField(unsigned id, unsigned level, unsigned short format, double number, int formatStringId)
Definition: VSDContentCollector.cpp:3140
void collectSplineEnd()
Definition: VSDContentCollector.cpp:2368
void collectName(unsigned id, unsigned level, const librevenge::RVNGBinaryData &name, TextFormat format)
Definition: VSDContentCollector.cpp:2485
double m_scale
Definition: VSDContentCollector.h:240
void collectArcTo(unsigned id, unsigned level, double x2, double y2, double bow)
Definition: VSDContentCollector.cpp:1554
double m_splineX
Definition: VSDContentCollector.h:315
void collectNameList(unsigned id, unsigned level)
Definition: VSDContentCollector.cpp:2469
std::vector< std::map< unsigned, unsigned > > & m_groupMembershipsSequence
Definition: VSDContentCollector.h:268
void collectForeignDataType(unsigned level, unsigned foreignType, unsigned foreignFormat, double offsetX, double offsetY, double width, double height)
Definition: VSDContentCollector.cpp:2187
void collectGeometry(unsigned id, unsigned level, bool noFill, bool noLine, bool noShow)
Definition: VSDContentCollector.cpp:1503
Definition: VSDTypes.h:206
double m_pageHeight
Definition: VSDContentCollector.h:237
double m_foreignOffsetY
Definition: VSDContentCollector.h:258
void collectTextField(unsigned id, unsigned level, int nameId, int formatStringId)
Definition: VSDContentCollector.cpp:3117
void _outputQuadraticBezierSegment(const std::vector< std::pair< double, double > > &points)
Definition: VSDContentCollector.cpp:1631
std::vector< std::list< unsigned > > & m_documentPageShapeOrders
Definition: VSDContentCollector.h:274
const VSDShape * m_stencilShape
Definition: VSDContentCollector.h:301
void collectTextBlockStyle(unsigned level, const boost::optional< double > &leftMargin, const boost::optional< double > &rightMargin, const boost::optional< double > &topMargin, const boost::optional< double > &bottomMargin, const boost::optional< unsigned char > &verticalAlign, const boost::optional< bool > &isBgFilled, const boost::optional< Colour > &bgColour, const boost::optional< double > &defaultTabStop, const boost::optional< unsigned char > &textDirection)
Definition: VSDContentCollector.cpp:2567
void startPage(unsigned pageId)
Definition: VSDContentCollector.cpp:3218
VSDPage m_currentPage
Definition: VSDContentCollector.h:308
std::vector< librevenge::RVNGPropertyList > m_currentFillGeometry
Definition: VSDContentCollector.h:248
void collectLineStyle(unsigned level, const boost::optional< double > &strokeWidth, const boost::optional< Colour > &c, const boost::optional< unsigned char > &linePattern, const boost::optional< unsigned char > &startMarker, const boost::optional< unsigned char > &endMarker, const boost::optional< unsigned char > &lineCap, const boost::optional< double > &rounding)
Definition: VSDContentCollector.cpp:2512
void collectRelQuadBezTo(unsigned id, unsigned level, double x, double y, double a, double b)
Definition: VSDContentCollector.cpp:1307
void _handleLevelChange(unsigned level)
Definition: VSDContentCollector.cpp:3170
std::vector< VSDCharStyle > m_charFormats
Definition: VSDContentCollector.h:285
Definition: VSDStencils.h:78
void collectPage(unsigned id, unsigned level, unsigned backgroundPageID, bool isBackgroundPage, const VSDName &pageName)
Definition: VSDContentCollector.cpp:2211
double m_foreignOffsetX
Definition: VSDContentCollector.h:257
std::map< unsigned, XForm > * m_groupXForms
Definition: VSDContentCollector.h:250
Definition: VSDOutputElementList.h:23
void _fillAndShadowProperties(const VSDFillStyle &style, librevenge::RVNGPropertyList &styleProps)
Definition: VSDContentCollector.cpp:2798
bool m_isStencilStarted
Definition: VSDContentCollector.h:302
Definition: VSDContentCollector.h:30
VSDContentCollector & operator=(const VSDContentCollector &)
void collectShapesOrder(unsigned id, unsigned level, const std::vector< unsigned > &shapeIds)
Definition: VSDContentCollector.cpp:2182
Definition: VSDCollector.h:20
double _NURBSBasis(unsigned knot, unsigned degree, double point, const std::vector< double > &knotVector)
Definition: VSDContentCollector.cpp:1752
void _listLevelFromBullet(librevenge::RVNGPropertyList &propList, const VSDBullet &bullet)
Definition: VSDContentCollector.cpp:3569
VSDMisc m_misc
Definition: VSDContentCollector.h:247
unsigned m_foreignType
Definition: VSDContentCollector.h:255
Definition: VSDFieldList.h:81
Definition: VSDStyles.h:268
void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree, const std::vector< std::pair< double, double > > &ctrlPnts, const std::vector< double > &kntVec, const std::vector< double > &weights)
Definition: VSDContentCollector.cpp:1826
double m_splineLastKnot
Definition: VSDContentCollector.h:316
void collectInfiniteLine(unsigned id, unsigned level, double x1, double y1, double x2, double y2)
Definition: VSDContentCollector.cpp:1165
std::map< unsigned, VSDOutputElementList > m_pageOutputText
Definition: VSDContentCollector.h:273
std::map< unsigned short, VSDFont > m_fonts
Definition: VSDContentCollector.h:264
VSDFieldList m_stencilFields
Definition: VSDContentCollector.h:283
unsigned m_foreignFormat
Definition: VSDContentCollector.h:256
void collectLineTo(unsigned id, unsigned level, double x, double y)
Definition: VSDContentCollector.cpp:1536
void collectParaIX(unsigned id, unsigned level, unsigned charCount, const boost::optional< double > &indFirst, const boost::optional< double > &indLeft, const boost::optional< double > &indRight, const boost::optional< double > &spLine, const boost::optional< double > &spBefore, const boost::optional< double > &spAfter, const boost::optional< unsigned char > &align, const boost::optional< unsigned char > &bullet, const boost::optional< VSDName > &bulletStr, const boost::optional< VSDName > &bulletFont, const boost::optional< double > &bulletFontSize, const boost::optional< double > &textPosAfterBullet, const boost::optional< unsigned > &flags)
Definition: VSDContentCollector.cpp:2399
double m_foreignWidth
Definition: VSDContentCollector.h:259
double _linePropertiesMarkerScale(unsigned marker)
Definition: VSDContentCollector.cpp:195
void _flushText()
Definition: VSDContentCollector.cpp:552
double m_foreignHeight
Definition: VSDContentCollector.h:260
void collectOLEList(unsigned id, unsigned level)
Definition: VSDContentCollector.cpp:1370
librevenge::RVNGPropertyList m_currentForeignProps
Definition: VSDContentCollector.h:253
unsigned m_splineLevel
Definition: VSDContentCollector.h:318
std::map< unsigned, librevenge::RVNGString > m_names
Definition: VSDContentCollector.h:281
std::vector< librevenge::RVNGPropertyList > m_currentLineGeometry
Definition: VSDContentCollector.h:249
virtual void collectMetaData(const librevenge::RVNGPropertyList &metaData)
Definition: VSDContentCollector.cpp:3213
void applyXForm(double &x, double &y, const XForm &xform)
Definition: VSDContentCollector.cpp:2061
librevenge::RVNGString m_currentText
Definition: VSDContentCollector.h:280
void collectLine(unsigned level, const boost::optional< double > &strokeWidth, const boost::optional< Colour > &c, const boost::optional< unsigned char > &linePattern, const boost::optional< unsigned char > &startMarker, const boost::optional< unsigned char > &endMarker, const boost::optional< unsigned char > &lineCap, const boost::optional< double > &rounding)
Definition: VSDContentCollector.cpp:1332
std::vector< unsigned > m_currentLayerMem
Definition: VSDContentCollector.h:323
void _appendVisibleAndPrintable(librevenge::RVNGPropertyList &propList)
Definition: VSDContentCollector.cpp:3498
VSDLayerList m_layerList
Definition: VSDContentCollector.h:311
std::map< unsigned, VSDOutputElementList > m_pageOutputDrawing
Definition: VSDContentCollector.h:272
void collectPageSheet(unsigned id, unsigned level)
Definition: VSDContentCollector.cpp:2494
unsigned m_currentStyleSheet
Definition: VSDContentCollector.h:297
std::map< unsigned, librevenge::RVNGString > m_stencilNames
Definition: VSDContentCollector.h:281
void collectLayerMem(unsigned level, const VSDName &layerMem)
Definition: VSDContentCollector.cpp:3461
void collectFillStyle(unsigned level, const boost::optional< Colour > &colourFG, const boost::optional< Colour > &colourBG, const boost::optional< unsigned char > &fillPattern, const boost::optional< double > &fillFGTransparency, const boost::optional< double > &fillBGTransparency, const boost::optional< unsigned char > &shadowPattern, const boost::optional< Colour > &shfgc, const boost::optional< double > &shadowOffsetX, const boost::optional< double > &shadowOffsetY)
Definition: VSDContentCollector.cpp:2521
void collectTxtXForm(unsigned level, const XForm &txtxform)
Definition: VSDContentCollector.cpp:2051
void collectSplineStart(unsigned id, unsigned level, double x, double y, double secondKnot, double firstKnot, double lastKnot, unsigned degree)
Definition: VSDContentCollector.cpp:2347
void _outputCubicBezierSegment(const std::vector< std::pair< double, double > > &points)
Definition: VSDContentCollector.cpp:1603
void transformFlips(bool &flipX, bool &flipY)
Definition: VSDContentCollector.cpp:2141
void endPages()
Definition: VSDContentCollector.cpp:3261
std::map< unsigned, PolylineData > m_polylineData
Definition: VSDContentCollector.h:279
std::vector< VSDTabSet > m_tabSets
Definition: VSDContentCollector.h:324
Definition: VSDLayerList.h:21
librevenge::RVNGBinaryData m_currentOLEData
Definition: VSDContentCollector.h:252
TextFormat
Definition: VSDTypes.h:158
VSDStyles m_styles
Definition: VSDContentCollector.h:298
Definition: VSDStyles.h:175
double m_pageWidth
Definition: VSDContentCollector.h:236
unsigned m_fieldIndex
Definition: VSDContentCollector.h:284
unsigned m_backgroundPageID
Definition: VSDContentCollector.h:306
VSDPages m_pages
Definition: VSDContentCollector.h:309
VSDLineStyle m_lineStyle
Definition: VSDContentCollector.h:288
Definition: VSDStyles.h:46
VSDCharStyle m_defaultCharStyle
Definition: VSDContentCollector.h:294
void collectParaIXStyle(unsigned id, unsigned level, unsigned charCount, const boost::optional< double > &indFirst, const boost::optional< double > &indLeft, const boost::optional< double > &indRight, const boost::optional< double > &spLine, const boost::optional< double > &spBefore, const boost::optional< double > &spAfter, const boost::optional< unsigned char > &align, const boost::optional< unsigned char > &bullet, const boost::optional< VSDName > &bulletStr, const boost::optional< VSDName > &bulletFont, const boost::optional< double > &bulletFontSize, const boost::optional< double > &textPosAfterBullet, const boost::optional< unsigned > &flags)
Definition: VSDContentCollector.cpp:2540
VSDFillStyle m_fillStyle
Definition: VSDContentCollector.h:289
void collectLayer(unsigned id, unsigned level, const VSDLayer &layer)
Definition: VSDContentCollector.cpp:3492
void collectPageProps(unsigned id, unsigned level, double pageWidth, double pageHeight, double shadowOffsetX, double shadowOffsetY, double scale)
Definition: VSDContentCollector.cpp:2198
void collectStyleThemeReference(unsigned level, const boost::optional< long > &lineColour, const boost::optional< long > &fillColour, const boost::optional< long > &shadowColour, const boost::optional< long > &fontColour)
Definition: VSDContentCollector.cpp:3102
void collectXFormData(unsigned level, const XForm &xform)
Definition: VSDContentCollector.cpp:2045
bool m_isFirstGeometry
Definition: VSDContentCollector.h:276
void _handleForeignData(const librevenge::RVNGBinaryData &data)
Definition: VSDContentCollector.cpp:1384
void _convertDataToString(librevenge::RVNGString &result, const librevenge::RVNGBinaryData &data, TextFormat format)
Definition: VSDContentCollector.cpp:2476
Definition: libvisio_utils.h:75
void collectRelMoveTo(unsigned id, unsigned level, double x, double y)
Definition: VSDContentCollector.cpp:1300
void collectCharIX(unsigned id, unsigned level, unsigned charCount, const boost::optional< VSDName > &font, const boost::optional< Colour > &fontColour, const boost::optional< double > &fontSize, const boost::optional< bool > &bold, const boost::optional< bool > &italic, const boost::optional< bool > &underline, const boost::optional< bool > &doubleunderline, const boost::optional< bool > &strikeout, const boost::optional< bool > &doublestrikeout, const boost::optional< bool > &allcaps, const boost::optional< bool > &initcaps, const boost::optional< bool > &smallcaps, const boost::optional< bool > &superscript, const boost::optional< bool > &subscript)
Definition: VSDContentCollector.cpp:2426
void _outputLinearBezierSegment(const std::vector< std::pair< double, double > > &points)
Definition: VSDContentCollector.cpp:1654
std::vector< double > m_splineKnotVector
Definition: VSDContentCollector.h:314
void collectSplineKnot(unsigned id, unsigned level, double x, double y, double knot)
Definition: VSDContentCollector.cpp:2359
double m_originalY
Definition: VSDContentCollector.h:244
void collectTextBlock(unsigned level, const boost::optional< double > &leftMargin, const boost::optional< double > &rightMargin, const boost::optional< double > &topMargin, const boost::optional< double > &bottomMargin, const boost::optional< unsigned char > &verticalAlign, const boost::optional< bool > &isBgFilled, const boost::optional< Colour > &bgColour, const boost::optional< double > &defaultTabStop, const boost::optional< unsigned char > &textDirection)
Definition: VSDContentCollector.cpp:2460
Definition: VSDStyles.h:371
VSDThemeReference m_themeReference
Definition: VSDContentCollector.h:292
Definition: VSDPages.h:19
void _flushCurrentForeignData()
Definition: VSDContentCollector.cpp:945
librevenge::RVNGBinaryData m_currentForeignData
Definition: VSDContentCollector.h:251
void collectTabsDataList(unsigned level, const std::map< unsigned, VSDTabSet > &tabSets)
Definition: VSDContentCollector.cpp:2440
void collectDefaultParaStyle(unsigned charCount, const boost::optional< double > &indFirst, const boost::optional< double > &indLeft, const boost::optional< double > &indRight, const boost::optional< double > &spLine, const boost::optional< double > &spBefore, const boost::optional< double > &spAfter, const boost::optional< unsigned char > &align, const boost::optional< unsigned char > &bullet, const boost::optional< VSDName > &bulletStr, const boost::optional< VSDName > &bulletFont, const boost::optional< double > &bulletFontSize, const boost::optional< double > &textPosAfterBullet, const boost::optional< unsigned > &flags)
Definition: VSDContentCollector.cpp:2414
unsigned m_currentShapeId
Definition: VSDContentCollector.h:254
bool m_isBackgroundPage
Definition: VSDContentCollector.h:320
std::map< unsigned, NURBSData > m_NURBSData
Definition: VSDContentCollector.h:278
VSDStencils m_stencils
Definition: VSDContentCollector.h:300
double m_x
Definition: VSDContentCollector.h:241
double m_splineY
Definition: VSDContentCollector.h:315
void _lineProperties(const VSDLineStyle &style, librevenge::RVNGPropertyList &styleProps)
Definition: VSDContentCollector.cpp:2576
const char * _linePropertiesMarkerPath(unsigned marker)
Definition: VSDContentCollector.cpp:146
unsigned m_currentShapeLevel
Definition: VSDContentCollector.h:319
void collectRelEllipticalArcTo(unsigned id, unsigned level, double x, double y, double a, double b, double c, double d)
Definition: VSDContentCollector.cpp:1284
Definition: VSDTypes.h:123
void transformPoint(double &x, double &y, XForm *txtxform=0)
Definition: VSDContentCollector.cpp:2080
std::vector< std::pair< double, double > > m_splineControlPoints
Definition: VSDContentCollector.h:313
bool m_isShapeStarted
Definition: VSDContentCollector.h:266
void _fillTabSet(librevenge::RVNGPropertyList &propList, const VSDTabSet &tabSet)
Definition: VSDContentCollector.cpp:915
VSDTextBlockStyle m_textBlockStyle
Definition: VSDContentCollector.h:290
Definition: VSDTypes.h:23
void _fillParagraphProperties(librevenge::RVNGPropertyList &propList, const VSDParaStyle &style)
Definition: VSDContentCollector.cpp:876
unsigned m_currentPageID
Definition: VSDContentCollector.h:307
unsigned m_currentGeometryCount
Definition: VSDContentCollector.h:304
double m_y
Definition: VSDContentCollector.h:242
VSDOutputElementList * m_shapeOutputText
Definition: VSDContentCollector.h:271
Definition: VSDTypes.h:179
VSDOutputElementList * m_shapeOutputDrawing
Definition: VSDContentCollector.h:271
void _appendField(librevenge::RVNGString &text)
Definition: VSDContentCollector.cpp:3447
void collectFieldList(unsigned id, unsigned level)
Definition: VSDContentCollector.cpp:3111
void collectRelCubBezTo(unsigned id, unsigned level, double x, double y, double a, double b, double c, double d)
Definition: VSDContentCollector.cpp:1254
void collectPolylineTo(unsigned id, unsigned level, double x, double y, unsigned char xType, unsigned char yType, const std::vector< std::pair< double, double > > &points)
Definition: VSDContentCollector.cpp:1939
void _flushCurrentPath()
Definition: VSDContentCollector.cpp:250
double m_shadowOffsetY
Definition: VSDContentCollector.h:239
unsigned m_currentPageNumber
Definition: VSDContentCollector.h:270
XForm * m_txtxform
Definition: VSDContentCollector.h:246
void _bulletFromParaFormat(VSDBullet &bullet, const VSDParaStyle &paraStyle)
Definition: VSDContentCollector.cpp:3513
bool _isUniform(const std::vector< double > &weights) const
Definition: VSDContentCollector.cpp:1811

Generated for libvisio by doxygen 1.8.14