diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-20 12:47:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-20 17:55:36 +0000 |
commit | aba0f624c8d4770b8a84a46add07c71656e96318 (patch) | |
tree | d385702d539150e3aa8ed7d52b3a3537b8abe48e /sw/source/uibase | |
parent | e8260df1d67baf807771cd5c740164a227856515 (diff) |
loplugin:expandablemethodds in sw(part3)
Change-Id: I7db01985a35407e4169709ede5324656c6629047
Reviewed-on: https://gerrit.libreoffice.org/30095
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/AnchorOverlayObject.cxx | 18 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 3 |
2 files changed, 8 insertions, 13 deletions
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx index 5d6a2ad1df9b..c3a6ea8a863d 100644 --- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx +++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx @@ -72,12 +72,8 @@ public: {} // data access - const basegfx::B2DPolygon& getTriangle() const { return maTriangle; } const basegfx::B2DPolygon& getLine() const { return maLine; } - const basegfx::B2DPolygon& getLineTop() const { return maLineTop; } - AnchorState getAnchorState() const { return maAnchorState; } const basegfx::BColor& getColor() const { return maColor; } - double getDiscreteLineWidth() const { return mfDiscreteLineWidth; } bool getLineSolid() const { return mbLineSolid; } virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const override; @@ -97,7 +93,7 @@ drawinglayer::primitive2d::Primitive2DContainer AnchorPrimitive::create2DDecompo // create triangle const drawinglayer::primitive2d::Primitive2DReference aTriangle( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - basegfx::B2DPolyPolygon(getTriangle()), + basegfx::B2DPolyPolygon(maTriangle), getColor())); aRetval.push_back(aTriangle); @@ -106,7 +102,7 @@ drawinglayer::primitive2d::Primitive2DContainer AnchorPrimitive::create2DDecompo // prepare view-independent LineWidth and color const drawinglayer::attribute::LineAttribute aLineAttribute( getColor(), - getDiscreteLineWidth() * getDiscreteUnit()); + mfDiscreteLineWidth * getDiscreteUnit()); if ( AS_ALL == maAnchorState || AS_START == maAnchorState ) @@ -151,7 +147,7 @@ drawinglayer::primitive2d::Primitive2DContainer AnchorPrimitive::create2DDecompo // the other parts are created const drawinglayer::primitive2d::Primitive2DReference aLineTop( new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - getLineTop(), + maLineTop, aLineAttribute)); aRetval.push_back(aLineTop); @@ -166,12 +162,12 @@ bool AnchorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive { const AnchorPrimitive& rCompare = static_cast< const AnchorPrimitive& >(rPrimitive); - return (getTriangle() == rCompare.getTriangle() + return (maTriangle == rCompare.maTriangle && getLine() == rCompare.getLine() - && getLineTop() == rCompare.getLineTop() - && getAnchorState() == rCompare.getAnchorState() + && maLineTop == rCompare.maLineTop + && maAnchorState == rCompare.maAnchorState && getColor() == rCompare.getColor() - && getDiscreteLineWidth() == rCompare.getDiscreteLineWidth() + && mfDiscreteLineWidth == rCompare.mfDiscreteLineWidth && getLineSolid() == rCompare.getLineSolid()); } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 8cdd2b8155ad..5b450303a053 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -232,7 +232,6 @@ public: const Point& GetLastPos() const { return aLastPos; } void SetLastPos( const Point& rNew ) { aLastPos = rNew; } void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); } - const Point& GetPos() { return pHdl->GetPos(); } const Point& GetHdlPos() { return aHdlPos; } SdrHdl* GetHdl() const { return pHdl; } void ChgHdl( SdrHdl* pNew ) @@ -245,7 +244,7 @@ public: } const Point GetPosForHitTest( const OutputDevice& rOut ) { - Point aHitTestPos( GetPos() ); + Point aHitTestPos( pHdl->GetPos() ); aHitTestPos = rOut.LogicToPixel( aHitTestPos ); if ( bTopRightHandle ) { |