VSDXContentCollector.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libvisio
3  * Version: MPL 1.1 / GPLv2+ / LGPLv2+
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License or as specified alternatively below. You may obtain a copy of
8  * the License at http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * Major Contributor(s):
16  * Copyright (C) 2011 Fridrich Strba <fridrich.strba@bluewin.ch>
17  * Copyright (C) 2011 Eilidh McAdam <tibbylickle@gmail.com>
18  *
19  *
20  * All Rights Reserved.
21  *
22  * For minor contributions see the git repository.
23  *
24  * Alternatively, the contents of this file may be used under the terms of
25  * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
26  * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
27  * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
28  * instead of those above.
29  */
30 
31 #ifndef VSDXCONTENTCOLLECTOR_H
32 #define VSDXCONTENTCOLLECTOR_H
33 
34 #include <locale.h>
35 #include <sstream>
36 #include <string>
37 #include <cmath>
38 #include <map>
39 #include <list>
40 #include <vector>
41 #include <libwpg/libwpg.h>
42 #include "libvisio_utils.h"
43 #include "VSDXCollector.h"
44 #include "VSDXParser.h"
45 #include "VSDXOutputElementList.h"
46 #include "VSDXStyles.h"
47 #include "VSDXPages.h"
48 
49 namespace libvisio
50 {
51 
53 {
54 public:
56  libwpg::WPGPaintInterface *painter,
57  std::vector<std::map<unsigned, XForm> > &groupXFormsSequence,
58  std::vector<std::map<unsigned, unsigned> > &groupMembershipsSequence,
59  std::vector<std::list<unsigned> > &documentPageShapeOrders,
60  VSDXStyles &styles, VSDXStencils &stencils
61  );
63  {
64  if (m_txtxform) delete(m_txtxform);
65  };
66 
67  void collectEllipticalArcTo(unsigned id, unsigned level, double x3, double y3, double x2, double y2, double angle, double ecc);
68  void collectForeignData(unsigned id, unsigned level, const WPXBinaryData &binaryData);
69  void collectOLEList(unsigned id, unsigned level);
70  void collectOLEData(unsigned id, unsigned level, const WPXBinaryData &oleData);
71  void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop);
72  void collectLine(unsigned id, unsigned level, double strokeWidth, Colour c, unsigned linePattern, unsigned char startMarker, unsigned char endMarker, unsigned lineCap);
73  void collectFillAndShadow(unsigned id, unsigned level, unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern,
74  unsigned fillFGTransparency, unsigned fillBGTransparency, unsigned shadowPattern, Colour shfgc,
75  double shadowOffsetX, double shadowOffsetY);
76  void collectFillAndShadow(unsigned id, unsigned level, unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern,
77  unsigned fillFGTransparency, unsigned fillBGTransparency, unsigned shadowPattern, Colour shfgc);
78  void collectGeometry(unsigned id, unsigned level, unsigned char geomFlags);
79  void collectMoveTo(unsigned id, unsigned level, double x, double y);
80  void collectLineTo(unsigned id, unsigned level, double x, double y);
81  void collectArcTo(unsigned id, unsigned level, double x2, double y2, double bow);
82  void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree,
83  std::vector<std::pair<double, double> > controlPoints, std::vector<double> knotVector, std::vector<double> weights);
84  void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, unsigned dataID);
85  void collectPolylineTo(unsigned id , unsigned level, double x, double y, unsigned char xType, unsigned char yType,
86  std::vector<std::pair<double, double> > &points);
87  void collectPolylineTo(unsigned id , unsigned level, double x, double y, unsigned dataID);
88  void collectShapeData(unsigned id, unsigned level, unsigned char xType, unsigned char yType, unsigned degree, double lastKnot,
89  std::vector<std::pair<double, double> > controlPoints, std::vector<double> knotVector, std::vector<double> weights);
90  void collectShapeData(unsigned id, unsigned level, unsigned char xType, unsigned char yType, std::vector<std::pair<double, double> > points);
91  void collectXFormData(unsigned id, unsigned level, const XForm &xform);
92  void collectTxtXForm(unsigned id, unsigned level, const XForm &txtxform);
93  void collectShapeId(unsigned id, unsigned level, unsigned shapeId);
94  void collectForeignDataType(unsigned id, unsigned level, unsigned foreignType, unsigned foreignFormat, double offsetX, double offsetY, double width, double height);
95  void collectPageProps(unsigned id, unsigned level, double pageWidth, double pageHeight, double shadowOffsetX, double shadowOffsetY, double scale);
96  void collectPage(unsigned id, unsigned level, unsigned backgroundPageID, unsigned currentPageID);
97  void collectShape(unsigned id, unsigned level, unsigned masterPage, unsigned masterShape, unsigned lineStyle, unsigned fillStyle, unsigned textStyle);
98  void collectSplineStart(unsigned id, unsigned level, double x, double y, double secondKnot, double firstKnot, double lastKnot, unsigned degree);
99  void collectSplineKnot(unsigned id, unsigned level, double x, double y, double knot);
100  void collectSplineEnd();
101  void collectInfiniteLine(unsigned id, unsigned level, double x1, double y1, double x2, double y2);
102 
103  void collectUnhandledChunk(unsigned id, unsigned level);
104 
105  void collectColours(const std::vector<Colour> &colours);
106  void collectFont(unsigned short fontID, const WPXBinaryData &textStream, TextFormat format);
107  void collectText(unsigned id, unsigned level, const WPXBinaryData &textStream, TextFormat format);
108  void collectVSDXCharStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
109  double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
110  bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, WPXString fontFace);
111  void collectVSDXParaStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,
112  double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags);
113  void collectTextBlock(unsigned id, unsigned level, double leftMargin, double rightMargin, double topMargin, double bottomMargin, unsigned char verticalAlign,
114  unsigned char bgClrId, const Colour &bgColour, double defaultTabStop, unsigned char textDirection);
115  void collectNameList(unsigned id, unsigned level);
116  void collectName(unsigned id, unsigned level, const WPXBinaryData &name, TextFormat format);
117 
118 
119  // Style collectors
120  void collectStyleSheet(unsigned id, unsigned level, unsigned parentLineStyle, unsigned parentFillStyle, unsigned parentTextStyle);
121  void collectLineStyle(unsigned id, unsigned level, double strokeWidth, Colour c, unsigned char linePattern, unsigned char startMarker, unsigned char endMarker, unsigned char lineCap);
122  void collectFillStyle(unsigned id, unsigned level, unsigned char colourIndexFG, unsigned char colourIndexBG, unsigned char fillPattern,
123  unsigned char fillFGTransparency, unsigned char fillBGTransparency, unsigned char shadowPattern, Colour shfgc,
124  double shadowOffsetX, double shadowOffsetY);
125  void collectFillStyle(unsigned id, unsigned level, unsigned char colourIndexFG, unsigned char colourIndexBG, unsigned char fillPattern,
126  unsigned char fillFGTransparency, unsigned char fillBGTransparency, unsigned char shadowPattern, Colour shfgc);
127  void collectCharIXStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
128  double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
129  bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, WPXString fontFace);
130  void collectParaIXStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,
131  double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags);
132  void collectTextBlockStyle(unsigned id, unsigned level, double leftMargin, double rightMargin, double topMargin, double bottomMargin, unsigned char verticalAlign,
133  unsigned char bgClrId, const Colour &bgColour, double defaultTabStop, unsigned char textDirection);
134 
135  // Field list
136  void collectFieldList(unsigned id, unsigned level);
137  void collectTextField(unsigned id, unsigned level, int nameId, int formatStringId);
138  void collectNumericField(unsigned id, unsigned level, unsigned short format, double number, int formatStringId);
139 
140  void startPage();
141  void endPage();
142  void endPages();
143 
144 
145 private:
148  libwpg::WPGPaintInterface *m_painter;
149 
150  void applyXForm(double &x, double &y, const XForm &xform);
151 
152  void transformPoint(double &x, double &y, XForm *txtxform = 0);
153  void transformAngle(double &angle, XForm *txtxform = 0);
154  void transformFlips(bool &flipX, bool &flipY);
155 
156  double _NURBSBasis(unsigned knot, unsigned degree, double point, const std::vector<double> &knotVector);
157 
158  void _flushCurrentPath();
159  void _flushText();
161  void _flushCurrentPage();
162 
163  void _handleLevelChange(unsigned level);
164  void _appendUTF16LE(WPXString &text, WPXInputStream *input);
165  void _appendUCS4(WPXString &text, unsigned ucs4Character);
166 
167  void _handleForeignData(const WPXBinaryData &data);
168 
169  void lineStyleFromStyleSheet(unsigned styleId);
170  void fillStyleFromStyleSheet(unsigned styleId);
171  void lineStyleFromStyleSheet(const VSDXLineStyle *style);
172  void fillStyleFromStyleSheet(const VSDXFillStyle *style);
173 
174  void _applyLinePattern();
175  void _lineProperties(double strokeWidth, Colour c, unsigned linePattern, unsigned startMarker, unsigned endMarker, unsigned lineCap);
176  const char *_linePropertiesMarkerViewbox(unsigned marker);
177  const char *_linePropertiesMarkerPath(unsigned marker);
178  double _linePropertiesMarkerScale(unsigned marker);
179  void _fillAndShadowProperties(unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern,
180  unsigned fillFGTransparency, unsigned fillBGTransparency,
181  unsigned shadowPattern, Colour shfgc, double shadowOffsetX, double shadowOffsetY);
182 
183  void _convertDataToString(WPXString &result, const WPXBinaryData &data, TextFormat format);
184  bool parseFormatId( const char *formatString, unsigned short &result );
185 
187  double m_pageWidth;
188  double m_pageHeight;
191  double m_scale;
192  double m_x;
193  double m_y;
194  double m_originalX;
195  double m_originalY;
198  std::vector<WPXPropertyList> m_currentGeometry;
199  std::map<unsigned, XForm> &m_groupXForms;
200  WPXBinaryData m_currentForeignData;
201  WPXBinaryData m_currentOLEData;
202  WPXPropertyList m_currentForeignProps;
204  unsigned m_foreignType;
205  unsigned m_foreignFormat;
210  WPXPropertyList m_styleProps;
211  ::WPXString m_lineColour;
212  ::WPXString m_fillType;
213  unsigned m_linePattern;
214  unsigned m_fillPattern;
217  bool m_noLine;
218  bool m_noFill;
219  bool m_noShow;
220  std::vector<Colour> m_colours;
221  std::map<unsigned short, WPXString> m_fonts;
222  unsigned m_currentLevel;
224  std::map<unsigned, unsigned> &m_groupMemberships;
225  std::vector<std::map<unsigned, XForm> > &m_groupXFormsSequence;
226  std::vector<std::map<unsigned, unsigned> > &m_groupMembershipsSequence;
229  std::map<unsigned, VSDXOutputElementList> m_pageOutputDrawing;
230  std::map<unsigned, VSDXOutputElementList> m_pageOutputText;
231  std::vector<std::list<unsigned> > &m_documentPageShapeOrders;
232  std::list<unsigned> &m_pageShapeOrder;
234 
235  std::map<unsigned, NURBSData> m_NURBSData;
236  std::map<unsigned, PolylineData> m_polylineData;
237  WPXBinaryData m_textStream;
238  std::map<unsigned, WPXString> m_names, m_stencilNames;
239  std::vector<WPXString> m_fields;
241  unsigned m_fieldIndex;
243  std::vector<VSDXCharStyle> m_charFormats;
244  std::vector<VSDXParaStyle> m_paraFormats;
245 
247 
250 
252 
256 
258 
260  unsigned m_currentPageID;
263 
264  std::vector<std::pair<double, double> > m_splineControlPoints;
265  std::vector<double> m_splineKnotVector;
268  unsigned m_splineDegree;
269  unsigned m_splineLevel;
270 };
271 
272 } // namespace libvisio
273 
274 #endif /* VSDXCONTENTCOLLECTOR_H */
275 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
VSDXStencils m_stencils
Definition: VSDXContentCollector.h:253
VSDXCharStyle m_defaultCharStyle
Definition: VSDXContentCollector.h:248
VSDXStyles m_styles
Definition: VSDXContentCollector.h:251
Definition: VSDXStencils.h:82
unsigned m_backgroundPageID
Definition: VSDXContentCollector.h:259
WPXPropertyList m_currentForeignProps
Definition: VSDXContentCollector.h:202
void collectCharIXStyle(unsigned id, unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId, double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout, bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, WPXString fontFace)
Definition: VSDXContentCollector.cpp:2055
void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree, std::vector< std::pair< double, double > > controlPoints, std::vector< double > knotVector, std::vector< double > weights)
Definition: VSDXContentCollector.cpp:1383
WPXBinaryData m_currentOLEData
Definition: VSDXContentCollector.h:201
const char * _linePropertiesMarkerViewbox(unsigned marker)
Definition: VSDXContentCollector.cpp:466
VSDXParaStyle m_defaultParaStyle
Definition: VSDXContentCollector.h:249
double _NURBSBasis(unsigned knot, unsigned degree, double point, const std::vector< double > &knotVector)
Definition: VSDXContentCollector.cpp:1449
void _flushText()
Definition: VSDXContentCollector.cpp:633
Definition: VSDXStyles.h:60
std::map< unsigned, VSDXOutputElementList > m_pageOutputText
Definition: VSDXContentCollector.h:230
unsigned m_linePattern
Definition: VSDXContentCollector.h:213
std::map< unsigned, VSDXOutputElementList > m_pageOutputDrawing
Definition: VSDXContentCollector.h:229
double m_foreignOffsetY
Definition: VSDXContentCollector.h:207
std::map< unsigned, WPXString > m_stencilNames
Definition: VSDXContentCollector.h:238
std::map< unsigned, unsigned > & m_groupMemberships
Definition: VSDXContentCollector.h:224
void lineStyleFromStyleSheet(unsigned styleId)
Definition: VSDXContentCollector.cpp:2076
std::vector< std::map< unsigned, unsigned > > & m_groupMembershipsSequence
Definition: VSDXContentCollector.h:226
Definition: VSDXTypes.h:68
void collectForeignData(unsigned id, unsigned level, const WPXBinaryData &binaryData)
Definition: VSDXContentCollector.cpp:1148
unsigned m_currentPageID
Definition: VSDXContentCollector.h:260
void collectFieldList(unsigned id, unsigned level)
Definition: VSDXContentCollector.cpp:2099
Definition: VSDXStyles.h:144
void collectStyleSheet(unsigned id, unsigned level, unsigned parentLineStyle, unsigned parentFillStyle, unsigned parentTextStyle)
Definition: VSDXContentCollector.cpp:2035
void collectShape(unsigned id, unsigned level, unsigned masterPage, unsigned masterShape, unsigned lineStyle, unsigned fillStyle, unsigned textStyle)
Definition: VSDXContentCollector.cpp:1754
Definition: VSDXOutputElementList.h:45
void applyXForm(double &x, double &y, const XForm &xform)
Definition: VSDXContentCollector.cpp:1617
void collectForeignDataType(unsigned id, unsigned level, unsigned foreignType, unsigned foreignFormat, double offsetX, double offsetY, double width, double height)
Definition: VSDXContentCollector.cpp:1723
void endPages()
Definition: VSDXContentCollector.cpp:2244
void collectTxtXForm(unsigned id, unsigned level, const XForm &txtxform)
Definition: VSDXContentCollector.cpp:1607
void collectOLEData(unsigned id, unsigned level, const WPXBinaryData &oleData)
Definition: VSDXContentCollector.cpp:1162
unsigned m_foreignFormat
Definition: VSDXContentCollector.h:205
void fillStyleFromStyleSheet(unsigned styleId)
Definition: VSDXContentCollector.cpp:2087
const char * _linePropertiesMarkerPath(unsigned marker)
Definition: VSDXContentCollector.cpp:502
Definition: VSDXPages.h:53
unsigned m_foreignType
Definition: VSDXContentCollector.h:204
unsigned m_fillFGTransparency
Definition: VSDXContentCollector.h:215
VSDXContentCollector(libwpg::WPGPaintInterface *painter, std::vector< std::map< unsigned, XForm > > &groupXFormsSequence, std::vector< std::map< unsigned, unsigned > > &groupMembershipsSequence, std::vector< std::list< unsigned > > &documentPageShapeOrders, VSDXStyles &styles, VSDXStencils &stencils)
Definition: VSDXContentCollector.cpp:49
double m_shadowOffsetX
Definition: VSDXContentCollector.h:189
libwpg::WPGPaintInterface * m_painter
Definition: VSDXContentCollector.h:148
unsigned m_fieldIndex
Definition: VSDXContentCollector.h:241
double m_originalX
Definition: VSDXContentCollector.h:194
bool m_isFirstGeometry
Definition: VSDXContentCollector.h:233
WPXBinaryData m_textStream
Definition: VSDXContentCollector.h:237
double m_shadowOffsetY
Definition: VSDXContentCollector.h:190
std::map< unsigned short, WPXString > m_fonts
Definition: VSDXContentCollector.h:221
VSDXFieldList m_stencilFields
Definition: VSDXContentCollector.h:240
void transformFlips(bool &flipX, bool &flipY)
Definition: VSDXContentCollector.cpp:1687
void collectTextField(unsigned id, unsigned level, int nameId, int formatStringId)
Definition: VSDXContentCollector.cpp:2105
void collectText(unsigned id, unsigned level, const WPXBinaryData &textStream, TextFormat format)
Definition: VSDXContentCollector.cpp:1963
const VSDXStencilShape * m_stencilShape
Definition: VSDXContentCollector.h:254
void collectFillAndShadow(unsigned id, unsigned level, unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern, unsigned fillFGTransparency, unsigned fillBGTransparency, unsigned shadowPattern, Colour shfgc, double shadowOffsetX, double shadowOffsetY)
Definition: VSDXContentCollector.cpp:1135
double m_splineY
Definition: VSDXContentCollector.h:266
void _flushCurrentPath()
Definition: VSDXContentCollector.cpp:570
void collectPolylineTo(unsigned id, unsigned level, double x, double y, unsigned char xType, unsigned char yType, std::vector< std::pair< double, double > > &points)
Definition: VSDXContentCollector.cpp:1513
void collectUnhandledChunk(unsigned id, unsigned level)
Definition: VSDXContentCollector.cpp:1903
Definition: VSDXPages.h:39
std::vector< WPXString > m_fields
Definition: VSDXContentCollector.h:239
double m_pageWidth
Definition: VSDXContentCollector.h:187
Definition: VSDXCollector.h:40
double m_x
Definition: VSDXContentCollector.h:192
unsigned m_currentPageNumber
Definition: VSDXContentCollector.h:227
std::vector< double > m_splineKnotVector
Definition: VSDXContentCollector.h:265
void _appendUCS4(WPXString &text, unsigned ucs4Character)
Definition: VSDXContentCollector.cpp:2311
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: VSDXContentCollector.cpp:1576
VSDXPages m_pages
Definition: VSDXContentCollector.h:262
XForm m_xform
Definition: VSDXContentCollector.h:196
void collectArcTo(unsigned id, unsigned level, double x2, double y2, double bow)
Definition: VSDXContentCollector.cpp:1339
void startPage()
Definition: VSDXContentCollector.cpp:2206
void collectFont(unsigned short fontID, const WPXBinaryData &textStream, TextFormat format)
Definition: VSDXContentCollector.cpp:1916
unsigned m_splineLevel
Definition: VSDXContentCollector.h:269
Definition: VSDXStencils.h:44
void collectOLEList(unsigned id, unsigned level)
Definition: VSDXContentCollector.cpp:1154
VSDXOutputElementList * m_shapeOutputText
Definition: VSDXContentCollector.h:228
void collectShapeId(unsigned id, unsigned level, unsigned shapeId)
Definition: VSDXContentCollector.cpp:1718
double m_foreignOffsetX
Definition: VSDXContentCollector.h:206
void endPage()
Definition: VSDXContentCollector.cpp:2233
Definition: VSDXStyles.h:212
double m_splineLastKnot
Definition: VSDXContentCollector.h:267
void _lineProperties(double strokeWidth, Colour c, unsigned linePattern, unsigned startMarker, unsigned endMarker, unsigned lineCap)
Definition: VSDXContentCollector.cpp:420
void collectLineStyle(unsigned id, unsigned level, double strokeWidth, Colour c, unsigned char linePattern, unsigned char startMarker, unsigned char endMarker, unsigned char lineCap)
Definition: VSDXContentCollector.cpp:2040
double m_foreignWidth
Definition: VSDXContentCollector.h:208
void collectSplineEnd()
Definition: VSDXContentCollector.cpp:1945
std::vector< VSDXCharStyle > m_charFormats
Definition: VSDXContentCollector.h:243
Definition: VSDXContentCollector.h:52
unsigned m_currentLevel
Definition: VSDXContentCollector.h:222
Definition: VSDXFieldList.h:102
void collectVSDXCharStyle(unsigned id, unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId, double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout, bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, WPXString fontFace)
Definition: VSDXContentCollector.cpp:1979
void collectVSDXParaStyle(unsigned id, unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight, double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags)
Definition: VSDXContentCollector.cpp:1971
WPXPropertyList m_styleProps
Definition: VSDXContentCollector.h:210
void collectSplineKnot(unsigned id, unsigned level, double x, double y, double knot)
Definition: VSDXContentCollector.cpp:1936
TextFormat m_textFormat
Definition: VSDXContentCollector.h:242
void collectLineTo(unsigned id, unsigned level, double x, double y)
Definition: VSDXContentCollector.cpp:1324
void collectPage(unsigned id, unsigned level, unsigned backgroundPageID, unsigned currentPageID)
Definition: VSDXContentCollector.cpp:1747
void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop)
Definition: VSDXContentCollector.cpp:1011
TextFormat
Definition: VSDXTypes.h:179
double m_splineX
Definition: VSDXContentCollector.h:266
void collectGeometry(unsigned id, unsigned level, unsigned char geomFlags)
Definition: VSDXContentCollector.cpp:1274
void collectSplineStart(unsigned id, unsigned level, double x, double y, double secondKnot, double firstKnot, double lastKnot, unsigned degree)
Definition: VSDXContentCollector.cpp:1924
::WPXString m_fillType
Definition: VSDXContentCollector.h:212
unsigned m_fillPattern
Definition: VSDXContentCollector.h:214
void collectMoveTo(unsigned id, unsigned level, double x, double y)
Definition: VSDXContentCollector.cpp:1309
std::vector< Colour > m_colours
Definition: VSDXContentCollector.h:220
unsigned m_splineDegree
Definition: VSDXContentCollector.h:268
double _linePropertiesMarkerScale(unsigned marker)
Definition: VSDXContentCollector.cpp:551
void collectLine(unsigned id, unsigned level, double strokeWidth, Colour c, unsigned linePattern, unsigned char startMarker, unsigned char endMarker, unsigned lineCap)
Definition: VSDXContentCollector.cpp:1129
std::vector< WPXPropertyList > m_currentGeometry
Definition: VSDXContentCollector.h:198
void transformAngle(double &angle, XForm *txtxform=0)
Definition: VSDXContentCollector.cpp:1669
::WPXString m_lineColour
Definition: VSDXContentCollector.h:211
void _convertDataToString(WPXString &result, const WPXBinaryData &data, TextFormat format)
Definition: VSDXContentCollector.cpp:2006
double m_y
Definition: VSDXContentCollector.h:193
void collectTextBlock(unsigned id, unsigned level, double leftMargin, double rightMargin, double topMargin, double bottomMargin, unsigned char verticalAlign, unsigned char bgClrId, const Colour &bgColour, double defaultTabStop, unsigned char textDirection)
Definition: VSDXContentCollector.cpp:1991
Definition: libvisio_utils.h:78
std::vector< std::pair< double, double > > m_splineControlPoints
Definition: VSDXContentCollector.h:264
void collectNameList(unsigned id, unsigned level)
Definition: VSDXContentCollector.cpp:1999
void collectEllipticalArcTo(unsigned id, unsigned level, double x3, double y3, double x2, double y2, double angle, double ecc)
Definition: VSDXContentCollector.cpp:944
Definition: VSDXStyles.h:86
void collectTextBlockStyle(unsigned id, unsigned level, double leftMargin, double rightMargin, double topMargin, double bottomMargin, unsigned char verticalAlign, unsigned char bgClrId, const Colour &bgColour, double defaultTabStop, unsigned char textDirection)
Definition: VSDXContentCollector.cpp:2069
double m_foreignHeight
Definition: VSDXContentCollector.h:209
std::vector< VSDXParaStyle > m_paraFormats
Definition: VSDXContentCollector.h:244
bool m_isShapeStarted
Definition: VSDXContentCollector.h:223
double m_pageHeight
Definition: VSDXContentCollector.h:188
bool m_noShow
Definition: VSDXContentCollector.h:219
std::vector< std::map< unsigned, XForm > > & m_groupXFormsSequence
Definition: VSDXContentCollector.h:225
bool parseFormatId(const char *formatString, unsigned short &result)
Definition: VSDXContentCollector.cpp:2359
void _appendUTF16LE(WPXString &text, WPXInputStream *input)
Definition: VSDXContentCollector.cpp:2251
VSDXContentCollector & operator=(const VSDXContentCollector &)
void _flushCurrentPage()
Definition: VSDXContentCollector.cpp:898
void _fillAndShadowProperties(unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern, unsigned fillFGTransparency, unsigned fillBGTransparency, unsigned shadowPattern, Colour shfgc, double shadowOffsetX, double shadowOffsetY)
Definition: VSDXContentCollector.cpp:81
std::list< unsigned > & m_pageShapeOrder
Definition: VSDXContentCollector.h:232
XForm * m_txtxform
Definition: VSDXContentCollector.h:197
void collectPageProps(unsigned id, unsigned level, double pageWidth, double pageHeight, double shadowOffsetX, double shadowOffsetY, double scale)
Definition: VSDXContentCollector.cpp:1734
bool m_isPageStarted
Definition: VSDXContentCollector.h:186
double m_scale
Definition: VSDXContentCollector.h:191
void collectColours(const std::vector< Colour > &colours)
Definition: VSDXContentCollector.cpp:1908
void collectInfiniteLine(unsigned id, unsigned level, double x1, double y1, double x2, double y2)
Definition: VSDXContentCollector.cpp:1049
void _handleLevelChange(unsigned level)
Definition: VSDXContentCollector.cpp:2158
Definition: VSDXTypes.h:38
void _applyLinePattern()
Definition: VSDXContentCollector.cpp:246
unsigned m_currentShapeId
Definition: VSDXContentCollector.h:203
void transformPoint(double &x, double &y, XForm *txtxform=0)
Definition: VSDXContentCollector.cpp:1636
std::map< unsigned, PolylineData > m_polylineData
Definition: VSDXContentCollector.h:236
void collectXFormData(unsigned id, unsigned level, const XForm &xform)
Definition: VSDXContentCollector.cpp:1601
unsigned m_fillBGTransparency
Definition: VSDXContentCollector.h:216
WPXBinaryData m_currentForeignData
Definition: VSDXContentCollector.h:200
VSDXTextBlockStyle m_textBlockStyle
Definition: VSDXContentCollector.h:246
std::map< unsigned, NURBSData > m_NURBSData
Definition: VSDXContentCollector.h:235
Definition: VSDXStyles.h:178
void _flushCurrentForeignData()
Definition: VSDXContentCollector.cpp:853
std::vector< std::list< unsigned > > & m_documentPageShapeOrders
Definition: VSDXContentCollector.h:231
unsigned m_currentGeometryCount
Definition: VSDXContentCollector.h:257
bool m_noFill
Definition: VSDXContentCollector.h:218
VSDXOutputElementList * m_shapeOutputDrawing
Definition: VSDXContentCollector.h:228
Definition: VSDXStyles.h:42
void _handleForeignData(const WPXBinaryData &data)
Definition: VSDXContentCollector.cpp:1168
std::map< unsigned, XForm > & m_groupXForms
Definition: VSDXContentCollector.h:199
void collectFillStyle(unsigned id, unsigned level, unsigned char colourIndexFG, unsigned char colourIndexBG, unsigned char fillPattern, unsigned char fillFGTransparency, unsigned char fillBGTransparency, unsigned char shadowPattern, Colour shfgc, double shadowOffsetX, double shadowOffsetY)
Definition: VSDXContentCollector.cpp:2045
double m_originalY
Definition: VSDXContentCollector.h:195
void collectName(unsigned id, unsigned level, const WPXBinaryData &name, TextFormat format)
Definition: VSDXContentCollector.cpp:2026
bool m_isStencilStarted
Definition: VSDXContentCollector.h:255
void collectParaIXStyle(unsigned id, unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight, double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags)
Definition: VSDXContentCollector.cpp:2062
bool m_noLine
Definition: VSDXContentCollector.h:217
std::map< unsigned, WPXString > m_names
Definition: VSDXContentCollector.h:238
void collectNumericField(unsigned id, unsigned level, unsigned short format, double number, int formatStringId)
Definition: VSDXContentCollector.cpp:2128
VSDXPage m_currentPage
Definition: VSDXContentCollector.h:261
virtual ~VSDXContentCollector()
Definition: VSDXContentCollector.h:62

Generated for libvisio by doxygen 1.8.13