[Libreoffice-commits] libvisio.git: src/lib
Fridrich Štrba
fridrich.strba at bluewin.ch
Mon Dec 14 10:17:43 PST 2015
src/lib/VSDGeometryList.cpp | 42 +++++++++++++++++++++---------------------
src/lib/VSDGeometryList.h | 5 ++---
2 files changed, 23 insertions(+), 24 deletions(-)
New commits:
commit 516f4f64d96e5880fdad683610af39a1d93900bc
Author: Fridrich Štrba <fridrich.strba at bluewin.ch>
Date: Mon Dec 14 19:14:46 2015 +0100
Revert "Try to prepare the VSDGeometryList to the rounded rectangles"
This commit was just plain silly and I should have taken just a bit
more of coffee instead. So, we kick it out again.
This reverts commit 59862251d109604ec0b6f196193734810334de03.
Change-Id: Ie2267aa8af22e76a02b2e08527dafbd1cc175c95
diff --git a/src/lib/VSDGeometryList.cpp b/src/lib/VSDGeometryList.cpp
index e11a22a..50cfb7e 100644
--- a/src/lib/VSDGeometryList.cpp
+++ b/src/lib/VSDGeometryList.cpp
@@ -20,7 +20,7 @@ class VSDGeometry : public VSDGeometryListElement
public:
VSDGeometry(unsigned id, unsigned level, const boost::optional<bool> &noFill,
const boost::optional<bool> &noLine, const boost::optional<bool> &noShow) :
- VSDGeometryListElement(id, level, 0.0), m_noFill(FROM_OPTIONAL(noFill, false)),
+ VSDGeometryListElement(id, level), m_noFill(FROM_OPTIONAL(noFill, false)),
m_noLine(FROM_OPTIONAL(noLine, false)), m_noShow(FROM_OPTIONAL(noShow, false)) {}
virtual ~VSDGeometry() {}
void handle(VSDCollector *collector) const;
@@ -34,7 +34,7 @@ class VSDEmpty : public VSDGeometryListElement
{
public:
VSDEmpty(unsigned id, unsigned level) :
- VSDGeometryListElement(id, level, 0.0) {}
+ VSDGeometryListElement(id, level) {}
virtual ~VSDEmpty() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -44,7 +44,7 @@ class VSDMoveTo : public VSDGeometryListElement
{
public:
VSDMoveTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
virtual ~VSDMoveTo() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -55,7 +55,7 @@ class VSDLineTo : public VSDGeometryListElement
{
public:
VSDLineTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
virtual ~VSDLineTo() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -66,7 +66,7 @@ class VSDArcTo : public VSDGeometryListElement
{
public:
VSDArcTo(unsigned id, unsigned level, const boost::optional<double> &x2, const boost::optional<double> &y2, const boost::optional<double> &bow) :
- VSDGeometryListElement(id, level, 0.0), m_x2(FROM_OPTIONAL(x2, 0.0)), m_y2(FROM_OPTIONAL(y2, 0.0)), m_bow(FROM_OPTIONAL(bow, 0.0)) {}
+ VSDGeometryListElement(id, level), m_x2(FROM_OPTIONAL(x2, 0.0)), m_y2(FROM_OPTIONAL(y2, 0.0)), m_bow(FROM_OPTIONAL(bow, 0.0)) {}
virtual ~VSDArcTo() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -79,7 +79,7 @@ public:
VSDEllipse(unsigned id, unsigned level, const boost::optional<double> &cx, const boost::optional<double> &cy,
const boost::optional<double> &xleft, const boost::optional<double> &yleft,
const boost::optional<double> &xtop, const boost::optional<double> &ytop) :
- VSDGeometryListElement(id, level, 0.0), m_cx(FROM_OPTIONAL(cx, 0.0)), m_cy(FROM_OPTIONAL(cy, 0.0)),
+ VSDGeometryListElement(id, level), m_cx(FROM_OPTIONAL(cx, 0.0)), m_cy(FROM_OPTIONAL(cy, 0.0)),
m_xleft(FROM_OPTIONAL(xleft, 0.0)), m_yleft(FROM_OPTIONAL(yleft, 0.0)), m_xtop(FROM_OPTIONAL(xtop, 0.0)),
m_ytop(FROM_OPTIONAL(ytop, 0.0)) {}
virtual ~VSDEllipse() {}
@@ -94,7 +94,7 @@ public:
VSDEllipticalArcTo(unsigned id, unsigned level, const boost::optional<double> &x3, const boost::optional<double> &y3,
const boost::optional<double> &x2, const boost::optional<double> &y2,
const boost::optional<double> &angle, const boost::optional<double> &ecc) :
- VSDGeometryListElement(id, level, 0.0), m_x3(FROM_OPTIONAL(x3, 0.0)), m_y3(FROM_OPTIONAL(y3, 0.0)), m_x2(FROM_OPTIONAL(x2, 0.0)),
+ VSDGeometryListElement(id, level), m_x3(FROM_OPTIONAL(x3, 0.0)), m_y3(FROM_OPTIONAL(y3, 0.0)), m_x2(FROM_OPTIONAL(x2, 0.0)),
m_y2(FROM_OPTIONAL(y2, 0.0)), m_angle(FROM_OPTIONAL(angle, 0.0)), m_ecc(FROM_OPTIONAL(ecc, 1.0)) {}
virtual ~VSDEllipticalArcTo() {}
void handle(VSDCollector *collector) const;
@@ -107,7 +107,7 @@ class VSDNURBSTo1 : public VSDGeometryListElement
public:
VSDNURBSTo1(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) :
- VSDGeometryListElement(id, level, 0.0), m_x2(x2), m_y2(y2), m_xType(xType), m_yType(yType), m_degree(degree), m_controlPoints(controlPoints), m_knotVector(knotVector), m_weights(weights) {}
+ VSDGeometryListElement(id, level), m_x2(x2), m_y2(y2), m_xType(xType), m_yType(yType), m_degree(degree), m_controlPoints(controlPoints), m_knotVector(knotVector), m_weights(weights) {}
virtual ~VSDNURBSTo1() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -123,7 +123,7 @@ class VSDNURBSTo2 : public VSDGeometryListElement
{
public:
VSDNURBSTo2(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, unsigned dataID) :
- VSDGeometryListElement(id, level, 0.0), m_dataID(dataID), m_x2(x2), m_y2(y2), m_knot(knot), m_knotPrev(knotPrev), m_weight(weight), m_weightPrev(weightPrev) {}
+ VSDGeometryListElement(id, level), m_dataID(dataID), m_x2(x2), m_y2(y2), m_knot(knot), m_knotPrev(knotPrev), m_weight(weight), m_weightPrev(weightPrev) {}
virtual ~VSDNURBSTo2() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -141,7 +141,7 @@ public:
VSDNURBSTo3(unsigned id, unsigned level, const boost::optional<double> &x2, const boost::optional<double> &y2, const boost::optional<double> &knot,
const boost::optional<double> &knotPrev, const boost::optional<double> &weight, const boost::optional<double> &weightPrev,
const boost::optional<NURBSData> &data) :
- VSDGeometryListElement(id, level, 0.0), m_data(FROM_OPTIONAL(data, NURBSData())), m_x2(FROM_OPTIONAL(x2, 0.0)), m_y2(FROM_OPTIONAL(y2, 0.0)),
+ VSDGeometryListElement(id, level), m_data(FROM_OPTIONAL(data, NURBSData())), m_x2(FROM_OPTIONAL(x2, 0.0)), m_y2(FROM_OPTIONAL(y2, 0.0)),
m_knot(FROM_OPTIONAL(knot, 0.0)), m_knotPrev(FROM_OPTIONAL(knotPrev, 0.0)), m_weight(FROM_OPTIONAL(weight, 0.0)), m_weightPrev(FROM_OPTIONAL(weightPrev, 0.0)) {}
virtual ~VSDNURBSTo3() {}
void handle(VSDCollector *collector) const;
@@ -157,7 +157,7 @@ class VSDPolylineTo1 : public VSDGeometryListElement
{
public:
VSDPolylineTo1(unsigned id , unsigned level, double x, double y, unsigned char xType, unsigned char yType, std::vector<std::pair<double, double> > points) :
- VSDGeometryListElement(id, level, 0.0), m_x(x), m_y(y), m_xType(xType), m_yType(yType), m_points(points) {}
+ VSDGeometryListElement(id, level), m_x(x), m_y(y), m_xType(xType), m_yType(yType), m_points(points) {}
virtual ~VSDPolylineTo1() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -171,7 +171,7 @@ class VSDPolylineTo2 : public VSDGeometryListElement
{
public:
VSDPolylineTo2(unsigned id , unsigned level, double x, double y, unsigned dataID) :
- VSDGeometryListElement(id, level, 0.0), m_dataID(dataID), m_x(x), m_y(y) {}
+ VSDGeometryListElement(id, level), m_dataID(dataID), m_x(x), m_y(y) {}
virtual ~VSDPolylineTo2() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -186,7 +186,7 @@ class VSDPolylineTo3 : public VSDGeometryListElement
public:
VSDPolylineTo3(unsigned id , unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
const boost::optional<PolylineData> &data) :
- VSDGeometryListElement(id, level, 0.0), m_data(FROM_OPTIONAL(data, PolylineData())), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
+ VSDGeometryListElement(id, level), m_data(FROM_OPTIONAL(data, PolylineData())), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
virtual ~VSDPolylineTo3() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -201,7 +201,7 @@ public:
VSDSplineStart(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
const boost::optional<double> &secondKnot, const boost::optional<double> &firstKnot,
const boost::optional<double> &lastKnot, const boost::optional<unsigned> °ree) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)), m_secondKnot(FROM_OPTIONAL(secondKnot, 0.0)),
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)), m_secondKnot(FROM_OPTIONAL(secondKnot, 0.0)),
m_firstKnot(FROM_OPTIONAL(firstKnot, 0.0)), m_lastKnot(FROM_OPTIONAL(lastKnot, 0.0)), m_degree(FROM_OPTIONAL(degree, 0)) {}
virtual ~VSDSplineStart() {}
void handle(VSDCollector *collector) const;
@@ -217,7 +217,7 @@ class VSDSplineKnot : public VSDGeometryListElement
public:
VSDSplineKnot(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
const boost::optional<double> &knot) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)), m_knot(FROM_OPTIONAL(knot, 0.0)) {}
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)), m_knot(FROM_OPTIONAL(knot, 0.0)) {}
virtual ~VSDSplineKnot() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -230,7 +230,7 @@ class VSDInfiniteLine : public VSDGeometryListElement
public:
VSDInfiniteLine(unsigned id, unsigned level, const boost::optional<double> &x1, const boost::optional<double> &y1,
const boost::optional<double> &x2, const boost::optional<double> &y2) :
- VSDGeometryListElement(id, level, 0.0), m_x1(FROM_OPTIONAL(x1, 0.0)), m_y1(FROM_OPTIONAL(y1, 0.0)),
+ VSDGeometryListElement(id, level), m_x1(FROM_OPTIONAL(x1, 0.0)), m_y1(FROM_OPTIONAL(y1, 0.0)),
m_x2(FROM_OPTIONAL(x2, 0.0)), m_y2(FROM_OPTIONAL(y2, 0.0)) {}
virtual ~VSDInfiniteLine() {}
void handle(VSDCollector *collector) const;
@@ -243,7 +243,7 @@ class VSDRelCubBezTo : public VSDGeometryListElement
public:
VSDRelCubBezTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y, const boost::optional<double> &a,
const boost::optional<double> &b, const boost::optional<double> &c, const boost::optional<double> &d) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)),
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)),
m_a(FROM_OPTIONAL(a, 0.0)), m_b(FROM_OPTIONAL(b, 0.0)), m_c(FROM_OPTIONAL(c, 0.0)), m_d(FROM_OPTIONAL(d, 0.0)) {}
virtual ~VSDRelCubBezTo() {}
void handle(VSDCollector *collector) const;
@@ -257,7 +257,7 @@ public:
VSDRelEllipticalArcTo(unsigned id, unsigned level, const boost::optional<double> &x3, const boost::optional<double> &y3,
const boost::optional<double> &x2, const boost::optional<double> &y2, const boost::optional<double> &angle,
const boost::optional<double> &ecc) :
- VSDGeometryListElement(id, level, 0.0), m_x3(FROM_OPTIONAL(x3, 0.0)), m_y3(FROM_OPTIONAL(y3, 0.0)),
+ VSDGeometryListElement(id, level), m_x3(FROM_OPTIONAL(x3, 0.0)), m_y3(FROM_OPTIONAL(y3, 0.0)),
m_x2(FROM_OPTIONAL(x2, 0.0)), m_y2(FROM_OPTIONAL(y2, 0.0)), m_angle(FROM_OPTIONAL(angle, 0.0)),
m_ecc(FROM_OPTIONAL(ecc, 1.0)) {}
virtual ~VSDRelEllipticalArcTo() {}
@@ -270,7 +270,7 @@ class VSDRelMoveTo : public VSDGeometryListElement
{
public:
VSDRelMoveTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
virtual ~VSDRelMoveTo() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -281,7 +281,7 @@ class VSDRelLineTo : public VSDGeometryListElement
{
public:
VSDRelLineTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)), m_y(FROM_OPTIONAL(y, 0.0)) {}
virtual ~VSDRelLineTo() {}
void handle(VSDCollector *collector) const;
VSDGeometryListElement *clone();
@@ -293,7 +293,7 @@ class VSDRelQuadBezTo : public VSDGeometryListElement
public:
VSDRelQuadBezTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
const boost::optional<double> &a, const boost::optional<double> &b) :
- VSDGeometryListElement(id, level, 0.0), m_x(FROM_OPTIONAL(x, 0.0)),
+ VSDGeometryListElement(id, level), m_x(FROM_OPTIONAL(x, 0.0)),
m_y(FROM_OPTIONAL(y, 0.0)), m_a(FROM_OPTIONAL(a, 0.0)), m_b(FROM_OPTIONAL(b, 0.0)) {}
virtual ~VSDRelQuadBezTo() {}
void handle(VSDCollector *collector) const;
diff --git a/src/lib/VSDGeometryList.h b/src/lib/VSDGeometryList.h
index 539ba7b..af1aa8a 100644
--- a/src/lib/VSDGeometryList.h
+++ b/src/lib/VSDGeometryList.h
@@ -26,8 +26,8 @@ class VSDCollector;
class VSDGeometryListElement
{
public:
- VSDGeometryListElement(unsigned id, unsigned level, double rounding)
- : m_id(id), m_level(level), m_rounding(rounding) {}
+ VSDGeometryListElement(unsigned id, unsigned level)
+ : m_id(id), m_level(level) {}
virtual ~VSDGeometryListElement() {}
virtual void handle(VSDCollector *collector) const = 0;
virtual VSDGeometryListElement *clone() = 0;
@@ -42,7 +42,6 @@ public:
protected:
unsigned m_id;
unsigned m_level;
- double m_rounding;
};
class VSDGeometryList
More information about the Libreoffice-commits
mailing list