diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-30 01:13:38 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-30 01:13:48 +0200 |
commit | 844398a67eb872ab215fd0ece146d0505565b76c (patch) | |
tree | 1ba907189de16091b12748e51ac984ec31502a50 /src | |
parent | 20b1b16a14e0d8bbd06e7aec10f06898bdbee4ff (diff) |
Reorder the geometries of the geometry list already in parser
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/VSD11Parser.cpp | 10 | ||||
-rw-r--r-- | src/lib/VSDXCollector.h | 2 | ||||
-rw-r--r-- | src/lib/VSDXContentCollector.cpp | 178 | ||||
-rw-r--r-- | src/lib/VSDXContentCollector.h | 6 | ||||
-rw-r--r-- | src/lib/VSDXGeometryList.cpp | 47 | ||||
-rw-r--r-- | src/lib/VSDXGeometryList.h | 3 | ||||
-rw-r--r-- | src/lib/VSDXParser.cpp | 16 | ||||
-rw-r--r-- | src/lib/VSDXParser.h | 3 | ||||
-rw-r--r-- | src/lib/VSDXStylesCollector.cpp | 2 | ||||
-rw-r--r-- | src/lib/VSDXStylesCollector.h | 2 |
10 files changed, 112 insertions, 157 deletions
diff --git a/src/lib/VSD11Parser.cpp b/src/lib/VSD11Parser.cpp index f063f5e..4e34896 100644 --- a/src/lib/VSD11Parser.cpp +++ b/src/lib/VSD11Parser.cpp @@ -71,7 +71,7 @@ bool libvisio::VSD11Parser::parse() delete trailerStream; return false; } - + VSDXContentCollector contentCollector(m_painter, groupXFormsSequence, groupMembershipsSequence); m_collector = &contentCollector; if (!parseDocument(trailerStream)) @@ -174,6 +174,12 @@ bool libvisio::VSD11Parser::getChunkHeader(WPXInputStream *input) { m_header.trailer = 0; } + + if (m_header.level < 3) + { + m_geomList.handle(m_collector); + m_geomList.clear(); + } return true; } @@ -290,5 +296,7 @@ void libvisio::VSD11Parser::handlePage(WPXInputStream *input) input->seek(endPos, WPX_SEEK_SET); } + m_geomList.handle(m_collector); + m_geomList.clear(); m_collector->endPage(); } diff --git a/src/lib/VSDXCollector.h b/src/lib/VSDXCollector.h index 10762d9..fdab752 100644 --- a/src/lib/VSDXCollector.h +++ b/src/lib/VSDXCollector.h @@ -37,7 +37,7 @@ public: virtual void collectEllipse(unsigned id, unsigned level, double cx, double cy, double aa, double dd) = 0; virtual void collectLine(unsigned id, unsigned level, double strokeWidth, Colour c, unsigned linePattern) = 0; virtual void collectFillAndShadow(unsigned id, unsigned level, unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern) = 0; - virtual void collectGeomList(unsigned id, unsigned level, const std::vector<unsigned> &geometryOrder) = 0; + virtual void collectGeomList(unsigned id, unsigned level) = 0; virtual void collectGeometry(unsigned id, unsigned level, unsigned geomFlags) = 0; virtual void collectMoveTo(unsigned id, unsigned level, double x, double y) = 0; virtual void collectLineTo(unsigned id, unsigned level, double x, double y) = 0; diff --git a/src/lib/VSDXContentCollector.cpp b/src/lib/VSDXContentCollector.cpp index 1079a75..c32b5c4 100644 --- a/src/lib/VSDXContentCollector.cpp +++ b/src/lib/VSDXContentCollector.cpp @@ -27,9 +27,9 @@ libvisio::VSDXContentCollector::VSDXContentCollector( std::vector<std::map<unsigned, unsigned> > &groupMembershipsSequence ) : m_painter(painter), m_isPageStarted(false), m_pageWidth(0.0), m_pageHeight(0.0), - m_scale(1.0), m_x(0.0), m_y(0.0), m_xform(), m_currentGeometryOrder(), m_currentGeometry(), - m_currentComplexGeometry(), m_groupXForms(groupXFormsSequence[0]), m_currentForeignData(), - m_currentForeignProps(), m_currentShapeId(0), m_foreignType(0), m_foreignFormat(0), m_styleProps(), + m_scale(1.0), m_x(0.0), m_y(0.0), m_xform(), m_currentGeometry(), + m_groupXForms(groupXFormsSequence[0]), m_currentForeignData(), m_currentForeignProps(), + m_currentShapeId(0), m_foreignType(0), m_foreignFormat(0), m_styleProps(), m_lineColour("black"), m_fillType("none"), m_linePattern(1), m_fillPattern(1), m_gradientProps(), m_noLine(false), m_noFill(false), m_noShow(false), m_currentLevel(0), m_isShapeStarted(false), m_groupMemberships(groupMembershipsSequence[0]), @@ -77,153 +77,64 @@ void libvisio::VSDXContentCollector::flipPoint(double &x, double &y, const XForm void libvisio::VSDXContentCollector::_flushCurrentPath() { + WPXPropertyListVector path; double startX = 0; double startY = 0; double x = 0; double y = 0; bool firstPoint = true; - WPXPropertyListVector path; - std::map<unsigned int, WPXPropertyList>::iterator iter; - std::map<unsigned int, WPXPropertyListVector>::iterator itervec; - if (m_currentGeometryOrder.size()) + for (unsigned i = 0; i < m_currentGeometry.size(); i++) { - for (unsigned i = 0; i < m_currentGeometryOrder.size(); i++) + if (firstPoint) + { + x = m_currentGeometry[i]["svg:x"]->getDouble(); + y = m_currentGeometry[i]["svg:y"]->getDouble(); + startX = x; + startY = y; + firstPoint = false; + } + else if (m_currentGeometry[i]["libwpg:path-action"]->getStr() == "M") { - iter = m_currentGeometry.find(m_currentGeometryOrder[i]); - if (iter != m_currentGeometry.end()) + if (startX == x && startY == y) { - if (firstPoint) - { - x = (iter->second)["svg:x"]->getDouble(); - y = (iter->second)["svg:y"]->getDouble(); - startX = x; - startY = y; - firstPoint = false; - } - else if ((iter->second)["libwpg:path-action"]->getStr() == "M") - { - if (startX == x && startY == y) - { - WPXPropertyList closedPath; - closedPath.insert("libwpg:path-action", "Z"); - path.append(closedPath); - } - if (path.count() && !m_noShow) - { -#if 0 - m_shapeOutput->push_back(new VSDXStyleOutputElement(m_styleProps, m_gradientProps)); - m_shapeOutput->push_back(new VSDXPathOutputElement(path)); -#else - m_painter->setStyle(m_styleProps, m_gradientProps); - m_painter->drawPath(path); -#endif - } - - path = WPXPropertyListVector(); - x = (iter->second)["svg:x"]->getDouble(); - y = (iter->second)["svg:y"]->getDouble(); - startX = x; - startY = y; - } - else - { - x = (iter->second)["svg:x"]->getDouble(); - y = (iter->second)["svg:y"]->getDouble(); - } - path.append(iter->second); + WPXPropertyList closedPath; + closedPath.insert("libwpg:path-action", "Z"); + path.append(closedPath); } - else + if (path.count() && !m_noShow) { - itervec = m_currentComplexGeometry.find(m_currentGeometryOrder[i]); - if (itervec != m_currentComplexGeometry.end()) - { - WPXPropertyListVector::Iter iter2(itervec->second); - for (; iter2.next();) - { - if (firstPoint) - { - x = (iter2())["svg:x"]->getDouble(); - y = (iter2())["svg:y"]->getDouble(); - startX = x; - startY = y; - firstPoint = false; - } - else if ((iter2())["libwpg:path-action"]->getStr() == "M") - { - if (startX == x && startY == y) - { - WPXPropertyList closedPath; - closedPath.insert("libwpg:path-action", "Z"); - path.append(closedPath); - } - if (path.count() && !m_noShow) - { #if 0 - m_shapeOutput->push_back(new VSDXStyleOutputElement(m_styleProps, m_gradientProps)); - m_shapeOutput->push_back(new VSDXPathOutputElement(path)); + m_shapeOutput->push_back(new VSDXStyleOutputElement(m_styleProps, m_gradientProps)); + m_shapeOutput->push_back(new VSDXPathOutputElement(path)); #else - m_painter->setStyle(m_styleProps, m_gradientProps); - m_painter->drawPath(path); + m_painter->setStyle(m_styleProps, m_gradientProps); + m_painter->drawPath(path); #endif - } - - path = WPXPropertyListVector(); - x = (iter2())["svg:x"]->getDouble(); - y = (iter2())["svg:y"]->getDouble(); - startX = x; - startY = y; - } - else - { - x = (iter2())["svg:x"]->getDouble(); - y = (iter2())["svg:y"]->getDouble(); - } - path.append(iter2()); - } - } } - } - if (startX == x && startY == y && path.count()) - { - WPXPropertyList closedPath; - closedPath.insert("libwpg:path-action", "Z"); - path.append(closedPath); + path = WPXPropertyListVector(); + x = m_currentGeometry[i]["svg:x"]->getDouble(); + y = m_currentGeometry[i]["svg:y"]->getDouble(); + startX = x; + startY = y; } - if (path.count() && !m_noShow) + else { -#if 0 - m_shapeOutput->push_back(new VSDXStyleOutputElement(m_styleProps, m_gradientProps)); - m_shapeOutput->push_back(new VSDXPathOutputElement(path)); -#else - m_painter->setStyle(m_styleProps, m_gradientProps); - m_painter->drawPath(path); -#endif + x = m_currentGeometry[i]["svg:x"]->getDouble(); + y = m_currentGeometry[i]["svg:y"]->getDouble(); } + path.append(m_currentGeometry[i]); } - else + if (path.count() && !m_noShow) { - for (iter=m_currentGeometry.begin(); iter != m_currentGeometry.end(); iter++) - path.append(iter->second); - for (itervec=m_currentComplexGeometry.begin(); itervec != m_currentComplexGeometry.end(); itervec++) - { - WPXPropertyListVector::Iter iter2(itervec->second); - for (; iter2.next();) - path.append(iter2()); - } - if (path.count() && !m_noShow) - { #if 0 - m_shapeOutput->push_back(new VSDXStyleOutputElement(m_styleProps, m_gradientProps)); - m_shapeOutput->push_back(new VSDXPathOutputElement(path)); + m_shapeOutput->push_back(new VSDXStyleOutputElement(m_styleProps, m_gradientProps)); + m_shapeOutput->push_back(new VSDXPathOutputElement(path)); #else - m_painter->setStyle(m_styleProps, m_gradientProps); - m_painter->drawPath(path); + m_painter->setStyle(m_styleProps, m_gradientProps); + m_painter->drawPath(path); #endif - } } m_currentGeometry.clear(); - m_currentComplexGeometry.clear(); - m_currentGeometryOrder.clear(); } void libvisio::VSDXContentCollector::_flushCurrentForeignData() @@ -313,7 +224,7 @@ void libvisio::VSDXContentCollector::collectEllipticalArcTo(unsigned id, unsigne arc.insert("svg:x", m_scale*m_x); arc.insert("svg:y", m_scale*m_y); arc.insert("libwpg:path-action", "A"); - m_currentGeometry[id] = arc; + m_currentGeometry.push_back(arc); } void libvisio::VSDXContentCollector::collectEllipse(unsigned id, unsigned level, double cx, double cy, double aa, double dd) @@ -603,13 +514,10 @@ void libvisio::VSDXContentCollector::collectForeignData(unsigned id, unsigned le } } -void libvisio::VSDXContentCollector::collectGeomList(unsigned id, unsigned level, const std::vector<unsigned> &geometryOrder) +void libvisio::VSDXContentCollector::collectGeomList(unsigned id, unsigned level) { _flushCurrentPath(); _handleLevelChange(level); - m_currentGeometryOrder.clear(); - for (unsigned j = 0; j< geometryOrder.size(); j++) - m_currentGeometryOrder.push_back(geometryOrder[j]); m_noShow = false; } @@ -642,7 +550,7 @@ void libvisio::VSDXContentCollector::collectMoveTo(unsigned id, unsigned level, end.insert("svg:x", m_scale*m_x); end.insert("svg:y", m_scale*m_y); end.insert("libwpg:path-action", "M"); - m_currentGeometry[id] = end; + m_currentGeometry.push_back(end); } void libvisio::VSDXContentCollector::collectLineTo(unsigned id, unsigned level, double x, double y) @@ -656,7 +564,7 @@ void libvisio::VSDXContentCollector::collectLineTo(unsigned id, unsigned level, end.insert("svg:x", m_scale*m_x); end.insert("svg:y", m_scale*m_y); end.insert("libwpg:path-action", "L"); - m_currentGeometry[id] = end; + m_currentGeometry.push_back(end); } void libvisio::VSDXContentCollector::collectArcTo(unsigned id, unsigned level, double x2, double y2, double bow) @@ -674,7 +582,7 @@ void libvisio::VSDXContentCollector::collectArcTo(unsigned id, unsigned level, d end.insert("svg:x", m_scale*m_x); end.insert("svg:y", m_scale*m_y); end.insert("libwpg:path-action", "L"); - m_currentGeometry[id] = end; + m_currentGeometry.push_back(end); } else { @@ -693,7 +601,7 @@ void libvisio::VSDXContentCollector::collectArcTo(unsigned id, unsigned level, d arc.insert("svg:x", m_scale*m_x); arc.insert("svg:y", m_scale*m_y); arc.insert("libwpg:path-action", "A"); - m_currentGeometry[id] = arc; + m_currentGeometry.push_back(arc); } } diff --git a/src/lib/VSDXContentCollector.h b/src/lib/VSDXContentCollector.h index 990239e..167a6df 100644 --- a/src/lib/VSDXContentCollector.h +++ b/src/lib/VSDXContentCollector.h @@ -49,7 +49,7 @@ public: void collectEllipse(unsigned id, unsigned level, double cx, double cy, double aa, double dd); void collectLine(unsigned id, unsigned level, double strokeWidth, Colour c, unsigned linePattern); void collectFillAndShadow(unsigned id, unsigned level, unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern); - void collectGeomList(unsigned id, unsigned level, const std::vector<unsigned> &geometryOrder); + void collectGeomList(unsigned id, unsigned level); void collectGeometry(unsigned id, unsigned level, unsigned geomFlags); void collectMoveTo(unsigned id, unsigned level, double x, double y); void collectLineTo(unsigned id, unsigned level, double x, double y); @@ -94,9 +94,7 @@ private: double m_x; double m_y; XForm m_xform; - std::vector<unsigned> m_currentGeometryOrder; - std::map<unsigned, WPXPropertyList> m_currentGeometry; - std::map<unsigned, WPXPropertyListVector> m_currentComplexGeometry; + std::vector<WPXPropertyList> m_currentGeometry; std::map<unsigned, XForm> &m_groupXForms; WPXBinaryData m_currentForeignData; WPXPropertyList m_currentForeignProps; diff --git a/src/lib/VSDXGeometryList.cpp b/src/lib/VSDXGeometryList.cpp index 0d28d0b..e7c9d42 100644 --- a/src/lib/VSDXGeometryList.cpp +++ b/src/lib/VSDXGeometryList.cpp @@ -17,6 +17,7 @@ * Boston, MA 02111-1301 USA */ +#include "VSDXCollector.h" #include "VSDXGeometryList.h" namespace libvisio { @@ -35,7 +36,7 @@ public: VSDXGeometry(unsigned id, unsigned level, unsigned geomFlags) : m_id(id), m_level(level), m_geomFlags(geomFlags) {} ~VSDXGeometry() {} - void handle(VSDXCollector *collector) { collector->collectGeometry(m_id, m_level, m_geomFlags); } + void handle(VSDXCollector *collector); private: unsigned m_id; unsigned m_level; @@ -48,7 +49,7 @@ public: VSDXMoveTo(unsigned id, unsigned level, double x, double y) : m_id(id), m_level(level), m_x(x), m_y(y) {} ~VSDXMoveTo() {} - void handle(VSDXCollector *collector) { collector->collectMoveTo(m_id, m_level, m_x, m_y); } + void handle(VSDXCollector *collector); private: unsigned m_id, m_level; double m_x, m_y; @@ -60,7 +61,7 @@ public: VSDXLineTo(unsigned id, unsigned level, double x, double y) : m_id(id), m_level(level), m_x(x), m_y(y) {} ~VSDXLineTo() {} - void handle(VSDXCollector *collector) { collector->collectLineTo(m_id, m_level, m_x, m_y); } + void handle(VSDXCollector *collector); private: unsigned m_id, m_level; double m_x, m_y; @@ -72,7 +73,7 @@ public: VSDXArcTo(unsigned id, unsigned level, double x2, double y2, double bow) : m_id(id), m_level(level), m_x2(x2), m_y2(y2), m_bow(bow) {} ~VSDXArcTo() {} - void handle(VSDXCollector *collector) { collector->collectArcTo(m_id, m_level, m_x2, m_y2, m_bow); } + void handle(VSDXCollector *collector); private: unsigned m_id, m_level; double m_x2, m_y2, m_bow; @@ -84,7 +85,7 @@ public: VSDXEllipse(unsigned id, unsigned level, double cx, double cy, double aa, double dd) : m_id(id), m_level(level), m_cx(cx), m_cy(cy), m_aa(aa), m_dd(dd) {} ~VSDXEllipse() {} - void handle(VSDXCollector *collector) { collector->collectEllipse(m_id, m_level, m_cx, m_cy, m_aa, m_dd); } + void handle(VSDXCollector *collector); private: unsigned m_id, m_level; double m_cx, m_cy, m_aa, m_dd; @@ -96,7 +97,7 @@ public: VSDXEllipticalArcTo(unsigned id, unsigned level, double x3, double y3, double x2, double y2, double angle, double ecc) : m_id(id), m_level(level), m_x3(x3), m_y3(y3), m_x2(x2), m_y2(y2), m_angle(angle), m_ecc(ecc) {} ~VSDXEllipticalArcTo() {} - void handle(VSDXCollector *collector) { collector->collectEllipticalArcTo(m_id, m_level, m_x3, m_y3, m_x2, m_y2, m_angle, m_ecc); } + void handle(VSDXCollector *collector); private: unsigned m_id, m_level; double m_x3, m_y3, m_x2, m_y2, m_angle, m_ecc; @@ -105,6 +106,36 @@ private: } // namespace libvisio +void libvisio::VSDXGeometry::handle(VSDXCollector *collector) +{ + collector->collectGeometry(m_id, m_level, m_geomFlags); +} + +void libvisio::VSDXMoveTo::handle(VSDXCollector *collector) +{ + collector->collectMoveTo(m_id, m_level, m_x, m_y); +} + +void libvisio::VSDXLineTo::handle(VSDXCollector *collector) +{ + collector->collectLineTo(m_id, m_level, m_x, m_y); +} + +void libvisio::VSDXArcTo::handle(VSDXCollector *collector) +{ + collector->collectArcTo(m_id, m_level, m_x2, m_y2, m_bow); +} + +void libvisio::VSDXEllipse::handle(VSDXCollector *collector) +{ + collector->collectEllipse(m_id, m_level, m_cx, m_cy, m_aa, m_dd); +} + +void libvisio::VSDXEllipticalArcTo::handle(VSDXCollector *collector) +{ + collector->collectEllipticalArcTo(m_id, m_level, m_x3, m_y3, m_x2, m_y2, m_angle, m_ecc); +} + libvisio::VSDXGeometryList::VSDXGeometryList() { } @@ -153,6 +184,8 @@ void libvisio::VSDXGeometryList::setElementsOrder(const std::vector<unsigned> &e void libvisio::VSDXGeometryList::handle(VSDXCollector *collector) { + if (empty()) + return; std::map<unsigned, VSDXGeometryListElement *>::iterator iter; if (m_elementsOrder.size()) { @@ -174,4 +207,6 @@ void libvisio::VSDXGeometryList::clear() { for (std::map<unsigned, VSDXGeometryListElement *>::iterator iter = m_elements.begin(); iter != m_elements.end(); iter++) delete iter->second; + m_elements.clear(); + m_elementsOrder.clear(); } diff --git a/src/lib/VSDXGeometryList.h b/src/lib/VSDXGeometryList.h index 47b6af8..797b518 100644 --- a/src/lib/VSDXGeometryList.h +++ b/src/lib/VSDXGeometryList.h @@ -23,11 +23,11 @@ #include <vector> #include <map> -#include "VSDXCollector.h" namespace libvisio { class VSDXGeometryListElement; +class VSDXCollector; class VSDXGeometryList { @@ -44,6 +44,7 @@ public: void setElementsOrder(const std::vector<unsigned> &m_elementsOrder); void handle(VSDXCollector *collector); void clear(); + bool empty() const { return (!m_elements.size()); } private: std::map<unsigned, VSDXGeometryListElement *> m_elements; std::vector<unsigned> m_elementsOrder; diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp index c3071f8..4776b52 100644 --- a/src/lib/VSDXParser.cpp +++ b/src/lib/VSDXParser.cpp @@ -65,7 +65,7 @@ void libvisio::VSDXParser::readEllipticalArcTo(WPXInputStream *input) input->seek(1, WPX_SEEK_CUR); double ecc = readDouble(input); // Eccentricity - m_collector->collectEllipticalArcTo(m_header.id, m_header.level, x3, y3, x2, y2, angle, ecc); + m_geomList.addEllipticalArcTo(m_header.id, m_header.level, x3, y3, x2, y2, angle, ecc); } @@ -95,7 +95,7 @@ void libvisio::VSDXParser::readEllipse(WPXInputStream *input) input->seek(1, WPX_SEEK_CUR); double dd = readDouble(input); - m_collector->collectEllipse(m_header.id, m_header.level, cx, cy, aa, dd); + m_geomList.addEllipse(m_header.id, m_header.level, cx, cy, aa, dd); } void libvisio::VSDXParser::readLine(WPXInputStream *input) @@ -135,14 +135,16 @@ void libvisio::VSDXParser::readGeomList(WPXInputStream *input) for (unsigned i = 0; i < (childrenListLength / sizeof(uint32_t)); i++) geometryOrder.push_back(readU32(input)); - m_collector->collectGeomList(m_header.id, m_header.level, geometryOrder); + m_geomList.setElementsOrder(geometryOrder); + // We want the collectors to still get the level information + m_collector->collectGeomList(m_header.id, m_header.level); } void libvisio::VSDXParser::readGeometry(WPXInputStream *input) { unsigned geomFlags = readU8(input); - m_collector->collectGeometry(m_header.id, m_header.level, geomFlags); + m_geomList.addGeometry(m_header.id, m_header.level, geomFlags); } void libvisio::VSDXParser::readMoveTo(WPXInputStream *input) @@ -152,7 +154,7 @@ void libvisio::VSDXParser::readMoveTo(WPXInputStream *input) input->seek(1, WPX_SEEK_CUR); double y = readDouble(input); - m_collector->collectMoveTo(m_header.id, m_header.level, x, y); + m_geomList.addMoveTo(m_header.id, m_header.level, x, y); } void libvisio::VSDXParser::readLineTo(WPXInputStream *input) @@ -162,7 +164,7 @@ void libvisio::VSDXParser::readLineTo(WPXInputStream *input) input->seek(1, WPX_SEEK_CUR); double y = readDouble(input); - m_collector->collectLineTo(m_header.id, m_header.level, x, y); + m_geomList.addLineTo(m_header.id, m_header.level, x, y); } void libvisio::VSDXParser::readArcTo(WPXInputStream *input) @@ -174,7 +176,7 @@ void libvisio::VSDXParser::readArcTo(WPXInputStream *input) input->seek(1, WPX_SEEK_CUR); double bow = readDouble(input); - m_collector->collectArcTo(m_header.id, m_header.level, x2, y2, bow); + m_geomList.addArcTo(m_header.id, m_header.level, x2, y2, bow); } void libvisio::VSDXParser::readXFormData(WPXInputStream *input) diff --git a/src/lib/VSDXParser.h b/src/lib/VSDXParser.h index 9e35d36..80a5153 100644 --- a/src/lib/VSDXParser.h +++ b/src/lib/VSDXParser.h @@ -28,6 +28,7 @@ #include <libwpd/libwpd.h> #include <libwpg/libwpg.h> #include "VSDXTypes.h" +#include "VSDXGeometryList.h" namespace libvisio { @@ -68,6 +69,8 @@ protected: libwpg::WPGPaintInterface *m_painter; ChunkHeader m_header; VSDXCollector *m_collector; + VSDXGeometryList m_geomList; + }; } // namespace libvisio diff --git a/src/lib/VSDXStylesCollector.cpp b/src/lib/VSDXStylesCollector.cpp index 404b817..cbd90d9 100644 --- a/src/lib/VSDXStylesCollector.cpp +++ b/src/lib/VSDXStylesCollector.cpp @@ -65,7 +65,7 @@ void libvisio::VSDXStylesCollector::collectFillAndShadow(unsigned id, unsigned l _handleLevelChange(level); } -void libvisio::VSDXStylesCollector::collectGeomList(unsigned id, unsigned level, const std::vector<unsigned> &geometryOrder) +void libvisio::VSDXStylesCollector::collectGeomList(unsigned id, unsigned level) { _handleLevelChange(level); } diff --git a/src/lib/VSDXStylesCollector.h b/src/lib/VSDXStylesCollector.h index bc85952..b2ec65c 100644 --- a/src/lib/VSDXStylesCollector.h +++ b/src/lib/VSDXStylesCollector.h @@ -43,7 +43,7 @@ public: void collectEllipse(unsigned id, unsigned level, double cx, double cy, double aa, double dd); void collectLine(unsigned id, unsigned level, double strokeWidth, Colour c, unsigned linePattern); void collectFillAndShadow(unsigned id, unsigned level, unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern); - void collectGeomList(unsigned id, unsigned level, const std::vector<unsigned> &geometryOrder); + void collectGeomList(unsigned id, unsigned level); void collectGeometry(unsigned id, unsigned level, unsigned geomFlags); void collectMoveTo(unsigned id, unsigned level, double x, double y); void collectLineTo(unsigned id, unsigned level, double x, double y); |