diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-12-21 07:13:16 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-12-27 16:34:12 +0100 |
commit | df1a10dafd3a2263d6e46edcaa6e6c0a64a80598 (patch) | |
tree | a1410b1d4202b403e7d072dac2e27e2f59806a92 /include/svx | |
parent | 13153921bc8b548dd41915146ace9733e21c966f (diff) |
Directly access own data members, remove unused methods
Change-Id: Id86d66738da2f6e4b86d4a4ee8da54940c751787
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/svddrag.hxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx index d8dc4acbc1a9..7bedb45fc5b9 100644 --- a/include/svx/svddrag.hxx +++ b/include/svx/svddrag.hxx @@ -77,6 +77,8 @@ class SVX_DLLPUBLIC SdrDragStat final void Clear(); + sal_Int32 GetPrevPos() const { return mvPnts.size()-(mvPnts.size()>1 ? 2 : 1); } + public: SdrDragStat() { Reset(); } ~SdrDragStat(); @@ -88,14 +90,10 @@ public: const Point& GetPoint(sal_Int32 nNum) const { return mvPnts[nNum]; } sal_Int32 GetPointCount() const { return mvPnts.size(); } const Point& GetStart() const { return mvPnts[0]; } - void SetStart(const Point &pt) { mvPnts[0] = pt; } - const Point& GetPrev() const { return mvPnts[GetPointCount()-(GetPointCount()>=2 ? 2:1)]; } - void SetPrev(const Point &pt) { mvPnts[GetPointCount()-(GetPointCount()>=2 ? 2:1)] = pt; } + const Point& GetPrev() const { return mvPnts[GetPrevPos()]; } const Point& GetPos0() const { return aPos0; } const Point& GetNow() const { return mvPnts.back(); } void SetNow(Point const &pt) { mvPnts.back() = pt; } - const Point& GetRealNow() const { return aRealNow; } - void SetRealNow(Point const &pt) { aRealNow = pt; } const Point& GetRef1() const { return aRef1; } void SetRef1(const Point &pt) { aRef1 = pt; } const Point& GetRef2() const { return aRef2; } |