From df1a10dafd3a2263d6e46edcaa6e6c0a64a80598 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Thu, 21 Dec 2017 07:13:16 +0100 Subject: Directly access own data members, remove unused methods Change-Id: Id86d66738da2f6e4b86d4a4ee8da54940c751787 --- include/svx/svddrag.hxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include/svx') 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; } -- cgit v1.2.3