src/lib/VSDContentCollector.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit dc81ff725f10744ee9455a55b3c627bc02b78ab1 Author: David Tardon <dtar...@redhat.com> Date: Tue Oct 17 13:43:46 2017 +0200 ofz#3646 limit the max. degree of NURBS even more Change-Id: I4b48e78aca4953d60d5a2a5fab7869c0a292cc21 diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index c36b2a9..bfbba28 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -2111,7 +2111,7 @@ bool libvisio::VSDContentCollector::_isUniform(const std::vector<double> &weight return true; } -#define MAX_ALLOWED_NURBS_DEGREE 16 +#define MAX_ALLOWED_NURBS_DEGREE 8 void libvisio::VSDContentCollector::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, commit c32345e7eb1890d9f52f3dc02acc0952dd81e53f Author: David Tardon <dtar...@redhat.com> Date: Tue Oct 17 13:41:15 2017 +0200 avoid excessive reallocations Change-Id: Ibb224bb7f7854343fd336cf78f81a71a433f72af diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index 7412b98..c36b2a9 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -2062,6 +2062,11 @@ void libvisio::VSDContentCollector::_generatePolylineFromNURBS(unsigned degree, if (m_noShow) return; + if (!m_noFill) + m_currentFillGeometry.reserve(VSD_NUM_POLYLINES_PER_KNOT * knotVector.size()); + if (!m_noLine) + m_currentLineGeometry.reserve(VSD_NUM_POLYLINES_PER_KNOT * knotVector.size()); + for (unsigned i = 0; i < VSD_NUM_POLYLINES_PER_KNOT * knotVector.size(); i++) { librevenge::RVNGPropertyList node; commit 8bbd72308c0968084bb55173192863ca9554241c Author: David Tardon <dtar...@redhat.com> Date: Tue Oct 17 13:38:14 2017 +0200 restrict scope of var Change-Id: Ie6af8b5408b6dc8d5920843aafd92e935ef4df42 diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index 4d0bde7..7412b98 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -2062,11 +2062,10 @@ void libvisio::VSDContentCollector::_generatePolylineFromNURBS(unsigned degree, if (m_noShow) return; - librevenge::RVNGPropertyList node; - for (unsigned i = 0; i < VSD_NUM_POLYLINES_PER_KNOT * knotVector.size(); i++) { - node.clear(); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "L"); double x = 0; double y = 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits