From cb22d026f28016a262df1aea284f30c61ee0e249 Mon Sep 17 00:00:00 2001 From: Matthias Seidel Date: Sun, 9 Apr 2023 18:02:35 +0200 Subject: [PATCH 1/2] Remove unused(?) code Gluepoint is actually generated here: https://github.com/apache/openoffice/blob/trunk/main/svx/source/sdr/primitive2d/sdrprimitivetools.cxx#L80 This part looks like a leftover for me. "SdrGluePoint::Draw" is only to be found in this file and nowhere else: http://opengrok.openoffice.org/search?project=trunk&full=%22SdrGluePoint%3A%3ADraw%22 --- main/svx/source/svdraw/svdglue.cxx | 39 ------------------------------ 1 file changed, 39 deletions(-) diff --git a/main/svx/source/svdraw/svdglue.cxx b/main/svx/source/svdraw/svdglue.cxx index d2765a38af..bafa04468f 100644 --- a/main/svx/source/svdraw/svdglue.cxx +++ b/main/svx/source/svdraw/svdglue.cxx @@ -247,45 +247,6 @@ void SdrGluePoint::Shear(const Point& rRef, long /*nWink*/, double tn, FASTBOOL if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt); } -// Unused code?! -void SdrGluePoint::Draw(OutputDevice& rOut, const SdrObject* pObj) const -{ - Color aBackPenColor(COL_WHITE); - Color aForePenColor(COL_LIGHTBLUE); - - bool bMapMerk=rOut.IsMapModeEnabled(); - Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); - aPt=rOut.LogicToPixel(aPt); - rOut.EnableMapMode(sal_False); - long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel - - rOut.SetLineColor( aBackPenColor ); - rOut.DrawLine(Point(x-2,y-3),Point(x+3,y+2)); - rOut.DrawLine(Point(x-3,y-2),Point(x+2,y+3)); - rOut.DrawLine(Point(x-3,y+2),Point(x+2,y-3)); - rOut.DrawLine(Point(x-2,y+3),Point(x+3,y-2)); - - if (bNoPercent) - { - switch (GetHorzAlign()) - { - case SDRHORZALIGN_LEFT : rOut.DrawLine(Point(x-3,y-1),Point(x-3,y+1)); break; - case SDRHORZALIGN_RIGHT : rOut.DrawLine(Point(x+3,y-1),Point(x+3,y+1)); break; - } - - switch (GetVertAlign()) - { - case SDRVERTALIGN_TOP : rOut.DrawLine(Point(x-1,y-3),Point(x+1,y-3)); break; - case SDRVERTALIGN_BOTTOM: rOut.DrawLine(Point(x-1,y+3),Point(x+1,y+3)); break; - } - } - - rOut.SetLineColor( aForePenColor ); - rOut.DrawLine(Point(x-2,y-2),Point(x+2,y+2)); - rOut.DrawLine(Point(x-2,y+2),Point(x+2,y-2)); - rOut.EnableMapMode(bMapMerk); -} - void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const { bool bMapMerk=rWin.IsMapModeEnabled(); From c34a9fb71f40bdf53dc033d340e7c281d9db31cf Mon Sep 17 00:00:00 2001 From: Arrigo Marchiori Date: Sun, 30 Apr 2023 22:09:02 +0200 Subject: [PATCH 2/2] Remove the declaration of method SdrGluePoint::Draw --- main/svx/inc/svx/svdglue.hxx | 1 - 1 file changed, 1 deletion(-) diff --git a/main/svx/inc/svx/svdglue.hxx b/main/svx/inc/svx/svdglue.hxx index dda2f52209..a2dedec747 100644 --- a/main/svx/inc/svx/svdglue.hxx +++ b/main/svx/inc/svx/svdglue.hxx @@ -95,7 +95,6 @@ public: void SetHorzAlign(sal_uInt16 nAlg) { nAlign=(nAlign&0xFF00)|(nAlg&0x00FF); } sal_uInt16 GetVertAlign() const { return nAlign&0xFF00; } void SetVertAlign(sal_uInt16 nAlg) { nAlign=(nAlign&0x00FF)|(nAlg&0xFF00); } - void Draw(OutputDevice& rOut, const SdrObject* pObj) const; FASTBOOL IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const; void Invalidate(Window& rWin, const SdrObject* pObj) const; Point GetAbsolutePos(const SdrObject& rObj) const;