MSPUBCollector.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 libmspub 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 INCLUDED_MSPUBCOLLECTOR_H
11 #define INCLUDED_MSPUBCOLLECTOR_H
12
13 #include <algorithm>
14 #include <functional>
15 #include <list>
16 #include <map>
17 #include <memory>
18 #include <set>
19 #include <string>
20 #include <vector>
21
22 #include <librevenge/librevenge.h>
23
24 #include "Arrow.h"
25 #include "BorderArtInfo.h"
26 #include "ColorReference.h"
27 #include "Coordinate.h"
28 #include "Dash.h"
29 #include "EmbeddedFontInfo.h"
30 #include "Fill.h"
31 #include "MSPUBContentChunkType.h"
32 #include "MSPUBTypes.h"
33 #include "PolygonUtils.h"
34 #include "Shadow.h"
35 #include "ShapeGroupElement.h"
36 #include "ShapeInfo.h"
37 #include "ShapeType.h"
38 #include "VerticalAlign.h"
39 #include "libmspub_utils.h"
40
41 namespace libmspub
42 {
43 class MSPUBCollector
44 {
45 friend class Fill;
46 friend class ImgFill;
47 friend class SolidFill;
48 friend class GradientFill;
49 friend class PatternFill;
50 public:
51 typedef std::list<ContentChunkReference>::const_iterator ccr_iterator_t;
52
53 MSPUBCollector(librevenge::RVNGDrawingInterface *painter);
54 virtual ~MSPUBCollector();
55
56 // collector functions
57 void collectMetaData(const librevenge::RVNGPropertyList &metaData);
58
59 bool addPage(unsigned seqNum);
60 bool addTextString(const std::vector<TextParagraph> &str, unsigned id);
61 void addTextShape(unsigned stringId, unsigned seqNum);
62 bool addImage(unsigned index, ImgType type, librevenge::RVNGBinaryData img);
63 void setBorderImageOffset(unsigned index, unsigned offset);
64 librevenge::RVNGBinaryData *addBorderImage(ImgType type, unsigned borderArtIndex);
65 void setShapePage(unsigned seqNum, unsigned pageSeqNum);
66
67 void setNextPage(unsigned seqNum);
68
69 void setShapeType(unsigned seqNum, ShapeType type);
70 void setShapeCropType(unsigned seqNum, ShapeType cropType);
71 void setShapePictureRecolor(unsigned seqNum, const ColorReference &recolor);
72 void setShapePictureBrightness(unsigned seqNum, int brightness);
73 void setShapePictureContrast(unsigned seqNum, int contrast);
74 void setShapeTableInfo(unsigned seqNum, const TableInfo &ti);
75 void setShapeBorderImageId(unsigned seqNum, unsigned borderImageId);
76 void setShapeCoordinatesInEmu(unsigned seqNum, int xs, int ys, int xe, int ye);
77 void setShapeImgIndex(unsigned seqNum, unsigned index);
78 void setShapeFill(unsigned seqNum, std::shared_ptr<Fill> fill, bool skipIfNotBg);
79 void setShapeDash(unsigned seqNum, const Dash &dash);
80 void setAdjustValue(unsigned seqNum, unsigned index, int adjust);
81 void setShapeRotation(unsigned seqNum, double rotation);
82 void setShapeFlip(unsigned, bool, bool);
83 void setShapeMargins(unsigned seqNum, unsigned left, unsigned top, unsigned right, unsigned bottom);
84 void setShapeBorderPosition(unsigned seqNum, BorderPosition pos);
85 void setShapeCoordinatesRotated90(unsigned seqNum);
86 void setShapeCustomPath(unsigned seqNum,
87 const DynamicCustomShape &shape);
88 void setShapeClipPath(unsigned seqNum, const std::vector<libmspub::Vertex> &clip);
89 void setShapeVerticalTextAlign(unsigned seqNum, VerticalAlign va);
90 void designateMasterPage(unsigned seqNum);
91 void setMasterPage(unsigned pageSeqNum, unsigned masterSeqNum);
92 void setShapeStretchBorderArt(unsigned seqNum);
93 void setShapeShadow(unsigned seqNum, const Shadow &shadow);
94
95 // Microsoft "Embedded OpenType" ... need to figure out how to convert
96 // this to a sane format and how to get LibreOffice to understand embedded fonts.
97 void addEOTFont(const librevenge::RVNGString &name, const librevenge::RVNGBinaryData &data);
98
99 void beginGroup();
100 bool endGroup();
101
102 void setShapeLineBackColor(unsigned seqNum, ColorReference backColor);
103 void addShapeLine(unsigned seqNum, Line line);
104 void setShapeOrder(unsigned seqNum);
105 void setPageBgShape(unsigned pageSeqNum, unsigned seqNum);
106 void setWidthInEmu(unsigned long);
107 void setHeightInEmu(unsigned long);
108 void setShapeNumColumns(unsigned seqNum, unsigned numColumns);
109 void setShapeColumnSpacing(unsigned seqNum, unsigned spacing);
110 void setShapeBeginArrow(unsigned seqNum, const Arrow &arrow);
111 void setShapeEndArrow(unsigned seqNum, const Arrow &arrow);
112
113 void addTextColor(ColorReference c);
114 void addFont(std::vector<unsigned char> name);
115
116 void addDefaultCharacterStyle(const CharacterStyle &style);
117 void addDefaultParagraphStyle(const ParagraphStyle &style);
118 void addPaletteColor(Color);
119 bool setCurrentGroupSeqNum(unsigned seqNum);
120
121 void useEncodingHeuristic();
122
123 void setTableCellTextEnds(unsigned textId, const std::vector<unsigned> &ends);
124 void setTextStringOffset(unsigned textId, unsigned offset);
125
126 bool go();
127
128 bool hasPage(unsigned seqNum) const;
129 private:
130
131 struct PageInfo
132 {
133 std::vector<std::shared_ptr<ShapeGroupElement>> m_shapeGroupsOrdered;
134 PageInfo() : m_shapeGroupsOrdered() { }
135 };
136
137 MSPUBCollector(const MSPUBCollector &);
138 MSPUBCollector &operator=(const MSPUBCollector &);
139
140 librevenge::RVNGDrawingInterface *m_painter;
141 std::list<ContentChunkReference> m_contentChunkReferences;
142 double m_width, m_height;
143 bool m_widthSet, m_heightSet;
144 unsigned short m_numPages;
145 std::map<unsigned, std::vector<TextParagraph> > m_textStringsById;
146 std::map<unsigned, PageInfo> m_pagesBySeqNum;
147 std::vector<std::pair<ImgType, librevenge::RVNGBinaryData> > m_images;
148 std::vector<BorderArtInfo> m_borderImages;
149 std::vector<ColorReference> m_textColors;
150 std::vector<std::vector<unsigned char> > m_fonts;
151 std::vector<CharacterStyle> m_defaultCharStyles;
152 std::vector<ParagraphStyle> m_defaultParaStyles;
153 std::map<unsigned, ShapeType> m_shapeTypesBySeqNum;
154 std::vector<Color> m_paletteColors;
155 std::vector<unsigned> m_shapeSeqNumsOrdered;
156 std::map<unsigned, unsigned> m_pageSeqNumsByShapeSeqNum;
157 std::map<unsigned, unsigned> m_bgShapeSeqNumsByPageSeqNum;
158 std::set<unsigned> m_skipIfNotBgSeqNums;
159 std::shared_ptr<ShapeGroupElement> m_currentShapeGroup;
160 std::vector<std::shared_ptr<ShapeGroupElement>> m_topLevelShapes;
161 std::map<unsigned, std::shared_ptr<ShapeGroupElement>> m_groupsBySeqNum;
162 std::list<EmbeddedFontInfo> m_embeddedFonts;
163 std::map<unsigned, ShapeInfo> m_shapeInfosBySeqNum;
164 std::set<unsigned> m_masterPages;
165 std::set<unsigned> m_shapesWithCoordinatesRotated90;
166 std::map<unsigned, unsigned> m_masterPagesByPageSeqNum;
167 std::map<unsigned, std::vector<unsigned> > m_tableCellTextEndsByTextId;
168 std::map<unsigned, unsigned> m_stringOffsetsByTextId;
169 mutable std::vector<bool> m_calculationValuesSeen;
170 std::vector<unsigned> m_pageSeqNumsOrdered;
171 bool m_encodingHeuristic;
172 std::vector<unsigned char> m_allText;
173 mutable boost::optional<const char *> m_calculatedEncoding;
174 librevenge::RVNGPropertyList m_metaData;
175
176 // helper functions
177 std::vector<int> getShapeAdjustValues(const ShapeInfo &info) const;
178 boost::optional<unsigned> getMasterPageSeqNum(unsigned pageSeqNum) const;
179 void setRectCoordProps(Coordinate, librevenge::RVNGPropertyList *) const;
180 boost::optional<std::vector<libmspub::TextParagraph> > getShapeText(const ShapeInfo &info) const;
181 void setupShapeStructures(ShapeGroupElement &elt);
182 void addBlackToPaletteIfNecessary();
183 void assignShapesToPages();
184 void writePage(unsigned pageSeqNum) const;
185 void writePageShapes(unsigned pageSeqNum) const;
186 void writePageBackground(unsigned pageSeqNum) const;
187 void writeImage(double x, double y, double height, double width,
188 ImgType type, const librevenge::RVNGBinaryData &blob,
189 boost::optional<Color> oneBitColor) const;
190 bool pageIsMaster(unsigned pageSeqNum) const;
191
192 std::function<void(void)> paintShape(const ShapeInfo &info, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform, bool isGroup, const VectorTransformation2D &thisTransform) const;
193 double getCalculationValue(const ShapeInfo &info, unsigned index, bool recursiveEntry, const std::vector<int> &adjustValues) const;
194
195 librevenge::RVNGPropertyList getCharStyleProps(const CharacterStyle &, boost::optional<unsigned> defaultCharStyleIndex) const;
196 librevenge::RVNGPropertyList getParaStyleProps(const ParagraphStyle &, boost::optional<unsigned> defaultParaStyleIndex) const;
197 double getSpecialValue(const ShapeInfo &info, const CustomShape &shape, int arg, const std::vector<int> &adjustValues) const;
198 void ponderStringEncoding(const std::vector<TextParagraph> &str);
199 const char *getCalculatedEncoding() const;
200 public:
201 static librevenge::RVNGString getColorString(const Color &);
202 };
203 } // namespace libmspub
204
205 #endif /* INCLUDED_MSPUBCOLLECTOR_H */
206 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libmspub::MSPUBCollector::setShapeClipPath
void setShapeClipPath(unsigned seqNum, const std::vector< libmspub::Vertex > &clip)
Definition: MSPUBCollector.cpp:528
libmspub::MSPUBCollector::addImage
bool addImage(unsigned index, ImgType type, librevenge::RVNGBinaryData img)
Definition: MSPUBCollector.cpp:1904
libmspub::MSPUBCollector::m_defaultParaStyles
std::vector< ParagraphStyle > m_defaultParaStyles
Definition: MSPUBCollector.h:152
libmspub::MSPUBCollector::addBlackToPaletteIfNecessary
void addBlackToPaletteIfNecessary()
Definition: MSPUBCollector.cpp:1718
libmspub::MSPUBCollector::setShapeBeginArrow
void setShapeBeginArrow(unsigned seqNum, const Arrow &arrow)
Definition: MSPUBCollector.cpp:367
libmspub::MSPUBCollector::m_shapeTypesBySeqNum
std::map< unsigned, ShapeType > m_shapeTypesBySeqNum
Definition: MSPUBCollector.h:153
libmspub::MSPUBCollector::setShapeBorderImageId
void setShapeBorderImageId(unsigned seqNum, unsigned borderImageId)
Definition: MSPUBCollector.cpp:517
libmspub::MSPUBCollector::ponderStringEncoding
void ponderStringEncoding(const std::vector< TextParagraph > &str)
Definition: MSPUBCollector.cpp:1877
Shadow.h
EmbeddedFontInfo.h
libmspub::MSPUBCollector::m_textStringsById
std::map< unsigned, std::vector< TextParagraph > > m_textStringsById
Definition: MSPUBCollector.h:145
libmspub::MSPUBCollector::writePageBackground
void writePageBackground(unsigned pageSeqNum) const
Definition: MSPUBCollector.cpp:1793
libmspub::MSPUBCollector::m_defaultCharStyles
std::vector< CharacterStyle > m_defaultCharStyles
Definition: MSPUBCollector.h:151
MSPUBContentChunkType.h
libmspub::MSPUBCollector::setBorderImageOffset
void setBorderImageOffset(unsigned index, unsigned offset)
Definition: MSPUBCollector.cpp:1933
libmspub::TableInfo
Definition: TableInfo.h:34
libmspub::Color
Definition: MSPUBTypes.h:199
libmspub::MSPUBCollector::setShapeShadow
void setShapeShadow(unsigned seqNum, const Shadow &shadow)
Definition: MSPUBCollector.cpp:503
libmspub::MSPUBCollector::setPageBgShape
void setPageBgShape(unsigned pageSeqNum, unsigned seqNum)
Definition: MSPUBCollector.cpp:575
ColorReference.h
libmspub::MSPUBCollector::m_painter
librevenge::RVNGDrawingInterface * m_painter
Definition: MSPUBCollector.h:140
libmspub::MSPUBCollector::setNextPage
void setNextPage(unsigned seqNum)
Definition: MSPUBCollector.cpp:458
libmspub::Arrow
Definition: Arrow.h:30
libmspub::MSPUBCollector::writeImage
void writeImage(double x, double y, double height, double width, ImgType type, const librevenge::RVNGBinaryData &blob, boost::optional< Color > oneBitColor) const
Definition: MSPUBCollector.cpp:1305
Fill.h
libmspub::MSPUBCollector::setShapeMargins
void setShapeMargins(unsigned seqNum, unsigned left, unsigned top, unsigned right, unsigned bottom)
Definition: MSPUBCollector.cpp:570
PolygonUtils.h
libmspub_utils.h
libmspub::MSPUBCollector::setShapeColumnSpacing
void setShapeColumnSpacing(unsigned seqNum, unsigned spacing)
Definition: MSPUBCollector.cpp:397
libmspub::MSPUBCollector::m_borderImages
std::vector< BorderArtInfo > m_borderImages
Definition: MSPUBCollector.h:148
libmspub::MSPUBCollector::m_fonts
std::vector< std::vector< unsigned char > > m_fonts
Definition: MSPUBCollector.h:150
libmspub::MSPUBCollector::addDefaultParagraphStyle
void addDefaultParagraphStyle(const ParagraphStyle &style)
Definition: MSPUBCollector.cpp:1477
libmspub::MSPUBCollector::PageInfo
Definition: MSPUBCollector.h:131
libmspub::MSPUBCollector::getParaStyleProps
librevenge::RVNGPropertyList getParaStyleProps(const ParagraphStyle &, boost::optional< unsigned > defaultParaStyleIndex) const
Definition: MSPUBCollector.cpp:1528
libmspub::MSPUBCollector::addBorderImage
librevenge::RVNGBinaryData * addBorderImage(ImgType type, unsigned borderArtIndex)
Definition: MSPUBCollector.cpp:1922
libmspub::Fill
Definition: Fill.h:23
libmspub::MSPUBCollector::setAdjustValue
void setAdjustValue(unsigned seqNum, unsigned index, int adjust)
Definition: MSPUBCollector.cpp:1467
libmspub::MSPUBCollector::setTextStringOffset
void setTextStringOffset(unsigned textId, unsigned offset)
Definition: MSPUBCollector.cpp:486
libmspub::MSPUBCollector::setRectCoordProps
void setRectCoordProps(Coordinate, librevenge::RVNGPropertyList *) const
Definition: MSPUBCollector.cpp:408
libmspub::DynamicCustomShape
Definition: PolygonUtils.h:91
libmspub::MSPUBCollector::setShapeNumColumns
void setShapeNumColumns(unsigned seqNum, unsigned numColumns)
Definition: MSPUBCollector.cpp:391
libmspub::MSPUBCollector::getShapeText
boost::optional< std::vector< libmspub::TextParagraph > > getShapeText(const ShapeInfo &info) const
Definition: MSPUBCollector.cpp:638
VerticalAlign.h
libmspub::MSPUBCollector::setShapeRotation
void setShapeRotation(unsigned seqNum, double rotation)
Definition: MSPUBCollector.cpp:1451
libmspub::MSPUBCollector::writePage
void writePage(unsigned pageSeqNum) const
Definition: MSPUBCollector.cpp:1754
libmspub::ImgFill
Definition: Fill.h:36
ShapeType.h
libmspub::MSPUBCollector::m_skipIfNotBgSeqNums
std::set< unsigned > m_skipIfNotBgSeqNums
Definition: MSPUBCollector.h:158
libmspub::MSPUBCollector::addTextShape
void addTextShape(unsigned stringId, unsigned seqNum)
Definition: MSPUBCollector.cpp:1493
libmspub::MSPUBCollector::designateMasterPage
void designateMasterPage(unsigned seqNum)
Definition: MSPUBCollector.cpp:1969
libmspub::MSPUBCollector::m_heightSet
bool m_heightSet
Definition: MSPUBCollector.h:143
libmspub::MSPUBCollector::setShapeCropType
void setShapeCropType(unsigned seqNum, ShapeType cropType)
Definition: MSPUBCollector.cpp:1979
libmspub::PatternFill
Definition: Fill.h:52
libmspub::BorderPosition
BorderPosition
Definition: MSPUBTypes.h:26
libmspub::ColorReference
Definition: ColorReference.h:17
libmspub::MSPUBCollector::setShapeFill
void setShapeFill(unsigned seqNum, std::shared_ptr< Fill > fill, bool skipIfNotBg)
Definition: MSPUBCollector.cpp:1509
libmspub::MSPUBCollector::getMasterPageSeqNum
boost::optional< unsigned > getMasterPageSeqNum(unsigned pageSeqNum) const
Definition: MSPUBCollector.cpp:1743
libmspub::MSPUBCollector::setMasterPage
void setMasterPage(unsigned pageSeqNum, unsigned masterSeqNum)
Definition: MSPUBCollector.cpp:1974
libmspub::MSPUBCollector::setShapeCoordinatesRotated90
void setShapeCoordinatesRotated90(unsigned seqNum)
Definition: MSPUBCollector.cpp:512
libmspub::MSPUBCollector::m_widthSet
bool m_widthSet
Definition: MSPUBCollector.h:143
libmspub::MSPUBCollector::setCurrentGroupSeqNum
bool setCurrentGroupSeqNum(unsigned seqNum)
Definition: MSPUBCollector.cpp:580
libmspub::MSPUBCollector::setShapeCustomPath
void setShapeCustomPath(unsigned seqNum, const DynamicCustomShape &shape)
Definition: MSPUBCollector.cpp:522
libmspub::MSPUBCollector::m_encodingHeuristic
bool m_encodingHeuristic
Definition: MSPUBCollector.h:171
libmspub::Dash
Definition: Dash.h:49
libmspub::MSPUBCollector::addEOTFont
void addEOTFont(const librevenge::RVNGString &name, const librevenge::RVNGBinaryData &data)
Definition: MSPUBCollector.cpp:344
libmspub::MSPUBCollector::m_tableCellTextEndsByTextId
std::map< unsigned, std::vector< unsigned > > m_tableCellTextEndsByTextId
Definition: MSPUBCollector.h:167
libmspub::MSPUBCollector::useEncodingHeuristic
void useEncodingHeuristic()
Definition: MSPUBCollector.cpp:498
libmspub::MSPUBCollector::setShapeStretchBorderArt
void setShapeStretchBorderArt(unsigned seqNum)
Definition: MSPUBCollector.cpp:403
libmspub::MSPUBCollector::m_embeddedFonts
std::list< EmbeddedFontInfo > m_embeddedFonts
Definition: MSPUBCollector.h:162
libmspub::GradientFill
Definition: Fill.h:76
libmspub::MSPUBCollector::~MSPUBCollector
virtual ~MSPUBCollector()
Definition: MSPUBCollector.cpp:1447
libmspub::MSPUBCollector::m_groupsBySeqNum
std::map< unsigned, std::shared_ptr< ShapeGroupElement > > m_groupsBySeqNum
Definition: MSPUBCollector.h:161
libmspub::MSPUBCollector::setShapeEndArrow
void setShapeEndArrow(unsigned seqNum, const Arrow &arrow)
Definition: MSPUBCollector.cpp:379
libmspub::MSPUBCollector::addDefaultCharacterStyle
void addDefaultCharacterStyle(const CharacterStyle &style)
Definition: MSPUBCollector.cpp:1472
libmspub::Coordinate
Definition: Coordinate.h:17
libmspub::MSPUBCollector::PageInfo::m_shapeGroupsOrdered
std::vector< std::shared_ptr< ShapeGroupElement > > m_shapeGroupsOrdered
Definition: MSPUBCollector.h:133
libmspub::MSPUBCollector::addTextString
bool addTextString(const std::vector< TextParagraph > &str, unsigned id)
Definition: MSPUBCollector.cpp:1866
libmspub::MSPUBCollector::m_pageSeqNumsByShapeSeqNum
std::map< unsigned, unsigned > m_pageSeqNumsByShapeSeqNum
Definition: MSPUBCollector.h:156
libmspub::MSPUBCollector::addPage
bool addPage(unsigned seqNum)
Definition: MSPUBCollector.cpp:1482
Dash.h
libmspub::MSPUBCollector::addTextColor
void addTextColor(ColorReference c)
Definition: MSPUBCollector.cpp:1964
libmspub::MSPUBCollector::getColorString
static librevenge::RVNGString getColorString(const Color &)
Definition: MSPUBCollector.cpp:1710
libmspub::MSPUBCollector::m_masterPages
std::set< unsigned > m_masterPages
Definition: MSPUBCollector.h:164
libmspub::MSPUBCollector::m_bgShapeSeqNumsByPageSeqNum
std::map< unsigned, unsigned > m_bgShapeSeqNumsByPageSeqNum
Definition: MSPUBCollector.h:157
libmspub::MSPUBCollector::m_shapesWithCoordinatesRotated90
std::set< unsigned > m_shapesWithCoordinatesRotated90
Definition: MSPUBCollector.h:165
libmspub::ImgType
ImgType
Definition: MSPUBTypes.h:213
libmspub::MSPUBCollector::m_numPages
unsigned short m_numPages
Definition: MSPUBCollector.h:144
libmspub::MSPUBCollector::collectMetaData
void collectMetaData(const librevenge::RVNGPropertyList &metaData)
Definition: MSPUBCollector.cpp:339
libmspub::MSPUBCollector::setShapeImgIndex
void setShapeImgIndex(unsigned seqNum, unsigned index)
Definition: MSPUBCollector.cpp:1498
libmspub::MSPUBCollector::getShapeAdjustValues
std::vector< int > getShapeAdjustValues(const ShapeInfo &info) const
Definition: MSPUBCollector.cpp:614
libmspub::MSPUBCollector::m_currentShapeGroup
std::shared_ptr< ShapeGroupElement > m_currentShapeGroup
Definition: MSPUBCollector.h:159
BorderArtInfo.h
libmspub::MSPUBCollector::m_contentChunkReferences
std::list< ContentChunkReference > m_contentChunkReferences
Definition: MSPUBCollector.h:141
libmspub::MSPUBCollector::addFont
void addFont(std::vector< unsigned char > name)
Definition: MSPUBCollector.cpp:1523
libmspub::MSPUBCollector::setShapePictureBrightness
void setShapePictureBrightness(unsigned seqNum, int brightness)
Definition: MSPUBCollector.cpp:355
libmspub::MSPUBCollector::setShapePictureContrast
void setShapePictureContrast(unsigned seqNum, int contrast)
Definition: MSPUBCollector.cpp:361
libmspub::MSPUBCollector::assignShapesToPages
void assignShapesToPages()
Definition: MSPUBCollector.cpp:1726
libmspub::MSPUBCollector::hasPage
bool hasPage(unsigned seqNum) const
Definition: MSPUBCollector.cpp:565
libmspub::MSPUBCollector::go
bool go()
Definition: MSPUBCollector.cpp:1822
libmspub::MSPUBCollector::operator=
MSPUBCollector & operator=(const MSPUBCollector &)
libmspub::MSPUBCollector::m_calculationValuesSeen
std::vector< bool > m_calculationValuesSeen
Definition: MSPUBCollector.h:169
libmspub::MSPUBCollector::getCalculationValue
double getCalculationValue(const ShapeInfo &info, unsigned index, bool recursiveEntry, const std::vector< int > &adjustValues) const
Definition: MSPUBCollector.cpp:1367
libmspub::MSPUBCollector::m_topLevelShapes
std::vector< std::shared_ptr< ShapeGroupElement > > m_topLevelShapes
Definition: MSPUBCollector.h:160
libmspub::MSPUBCollector::m_metaData
librevenge::RVNGPropertyList m_metaData
Definition: MSPUBCollector.h:174
libmspub::ParagraphStyle
Definition: MSPUBTypes.h:163
libmspub::MSPUBCollector::setShapeCoordinatesInEmu
void setShapeCoordinatesInEmu(unsigned seqNum, int xs, int ys, int xe, int ye)
Definition: MSPUBCollector.cpp:1518
libmspub::MSPUBCollector::getCalculatedEncoding
const char * getCalculatedEncoding() const
Definition: MSPUBCollector.cpp:1237
libmspub::MSPUBCollector::PageInfo::PageInfo
PageInfo()
Definition: MSPUBCollector.h:134
libmspub::MSPUBCollector::m_width
double m_width
Definition: MSPUBCollector.h:142
libmspub::MSPUBCollector::m_masterPagesByPageSeqNum
std::map< unsigned, unsigned > m_masterPagesByPageSeqNum
Definition: MSPUBCollector.h:166
libmspub
Definition: Arrow.h:13
libmspub::MSPUBCollector::setShapeBorderPosition
void setShapeBorderPosition(unsigned seqNum, BorderPosition pos)
Definition: MSPUBCollector.cpp:560
Arrow.h
libmspub::CustomShape
Definition: PolygonUtils.h:58
libmspub::MSPUBCollector::beginGroup
void beginGroup()
Definition: MSPUBCollector.cpp:533
libmspub::MSPUBCollector::m_shapeSeqNumsOrdered
std::vector< unsigned > m_shapeSeqNumsOrdered
Definition: MSPUBCollector.h:155
libmspub::MSPUBCollector::setShapePage
void setShapePage(unsigned seqNum, unsigned pageSeqNum)
Definition: MSPUBCollector.cpp:1958
libmspub::MSPUBCollector::m_calculatedEncoding
boost::optional< const char * > m_calculatedEncoding
Definition: MSPUBCollector.h:173
libmspub::MSPUBCollector::getCharStyleProps
librevenge::RVNGPropertyList getCharStyleProps(const CharacterStyle &, boost::optional< unsigned > defaultCharStyleIndex) const
Definition: MSPUBCollector.cpp:1611
libmspub::MSPUBCollector::setShapeDash
void setShapeDash(unsigned seqNum, const Dash &dash)
Definition: MSPUBCollector.cpp:1504
libmspub::MSPUBCollector::setShapeTableInfo
void setShapeTableInfo(unsigned seqNum, const TableInfo &ti)
Definition: MSPUBCollector.cpp:385
libmspub::MSPUBCollector::addShapeLine
void addShapeLine(unsigned seqNum, Line line)
Definition: MSPUBCollector.cpp:555
libmspub::MSPUBCollector::pageIsMaster
bool pageIsMaster(unsigned pageSeqNum) const
Definition: MSPUBCollector.cpp:1817
libmspub::MSPUBCollector::setShapeOrder
void setShapeOrder(unsigned seqNum)
Definition: MSPUBCollector.cpp:591
Coordinate.h
libmspub::MSPUBCollector::m_stringOffsetsByTextId
std::map< unsigned, unsigned > m_stringOffsetsByTextId
Definition: MSPUBCollector.h:168
libmspub::MSPUBCollector::m_allText
std::vector< unsigned char > m_allText
Definition: MSPUBCollector.h:172
libmspub::VectorTransformation2D
Definition: VectorTransformation2D.h:25
libmspub::CharacterStyle
Definition: MSPUBTypes.h:112
libmspub::MSPUBCollector::writePageShapes
void writePageShapes(unsigned pageSeqNum) const
Definition: MSPUBCollector.cpp:1786
libmspub::MSPUBCollector::m_images
std::vector< std::pair< ImgType, librevenge::RVNGBinaryData > > m_images
Definition: MSPUBCollector.h:147
libmspub::MSPUBCollector::ccr_iterator_t
std::list< ContentChunkReference >::const_iterator ccr_iterator_t
Definition: MSPUBCollector.h:51
libmspub::MSPUBCollector::addPaletteColor
void addPaletteColor(Color)
Definition: MSPUBCollector.cpp:600
MSPUBTypes.h
libmspub::MSPUBCollector::setShapePictureRecolor
void setShapePictureRecolor(unsigned seqNum, const ColorReference &recolor)
Definition: MSPUBCollector.cpp:349
libmspub::MSPUBCollector::setupShapeStructures
void setupShapeStructures(ShapeGroupElement &elt)
Definition: MSPUBCollector.cpp:652
ShapeGroupElement.h
ShapeInfo.h
libmspub::MSPUBCollector
Definition: MSPUBCollector.h:43
libmspub::MSPUBCollector::setShapeType
void setShapeType(unsigned seqNum, ShapeType type)
Definition: MSPUBCollector.cpp:1462
libmspub::MSPUBCollector::setShapeVerticalTextAlign
void setShapeVerticalTextAlign(unsigned seqNum, VerticalAlign va)
Definition: MSPUBCollector.cpp:373
libmspub::MSPUBCollector::m_height
double m_height
Definition: MSPUBCollector.h:142
libmspub::MSPUBCollector::MSPUBCollector
MSPUBCollector(librevenge::RVNGDrawingInterface *painter)
Definition: MSPUBCollector.cpp:463
libmspub::MSPUBCollector::m_pagesBySeqNum
std::map< unsigned, PageInfo > m_pagesBySeqNum
Definition: MSPUBCollector.h:146
libmspub::SolidFill
Definition: Fill.h:64
libmspub::MSPUBCollector::m_textColors
std::vector< ColorReference > m_textColors
Definition: MSPUBCollector.h:149
libmspub::VerticalAlign
VerticalAlign
Definition: VerticalAlign.h:15
libmspub::ShapeGroupElement
Definition: ShapeGroupElement.h:24
libmspub::MSPUBCollector::getSpecialValue
double getSpecialValue(const ShapeInfo &info, const CustomShape &shape, int arg, const std::vector< int > &adjustValues) const
Definition: MSPUBCollector.cpp:1327
libmspub::MSPUBCollector::m_shapeInfosBySeqNum
std::map< unsigned, ShapeInfo > m_shapeInfosBySeqNum
Definition: MSPUBCollector.h:163
libmspub::MSPUBCollector::setWidthInEmu
void setWidthInEmu(unsigned long)
Definition: MSPUBCollector.cpp:1890
libmspub::ShapeType
ShapeType
Definition: ShapeType.h:15
libmspub::ShapeInfo
Definition: ShapeInfo.h:37
libmspub::MSPUBCollector::setHeightInEmu
void setHeightInEmu(unsigned long)
Definition: MSPUBCollector.cpp:1897
libmspub::MSPUBCollector::paintShape
std::function< void(void)> paintShape(const ShapeInfo &info, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform, bool isGroup, const VectorTransformation2D &thisTransform) const
Definition: MSPUBCollector.cpp:680
libmspub::MSPUBCollector::endGroup
bool endGroup()
Definition: MSPUBCollector.cpp:543
libmspub::MSPUBCollector::m_paletteColors
std::vector< Color > m_paletteColors
Definition: MSPUBCollector.h:154
libmspub::MSPUBCollector::setTableCellTextEnds
void setTableCellTextEnds(unsigned textId, const std::vector< unsigned > &ends)
Definition: MSPUBCollector.cpp:492
libmspub::Line
Definition: Line.h:20
libmspub::Shadow
Definition: Shadow.h:26
libmspub::MSPUBCollector::setShapeFlip
void setShapeFlip(unsigned, bool, bool)
Definition: MSPUBCollector.cpp:1457
libmspub::MSPUBCollector::setShapeLineBackColor
void setShapeLineBackColor(unsigned seqNum, ColorReference backColor)
Definition: MSPUBCollector.cpp:1299
libmspub::MSPUBCollector::m_pageSeqNumsOrdered
std::vector< unsigned > m_pageSeqNumsOrdered
Definition: MSPUBCollector.h:170