summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-02-06 14:47:47 +0100
committerThorsten Behrens <tbehrens@suse.com>2013-02-27 15:40:16 +0100
commit875c997c7da116402509d0bd75e8c15a66a40529 (patch)
tree9f6234505873cb9a4d13bf150a6483e71eb11aed /tools
parent408d5d92ee262c1d06109b190968d56c0c52c378 (diff)
fdo#39446 - Bloat Removal. Removing uncallable code with callcatcher
Removed several unused methods. Could not remove ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() and ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&) because it breaks compilation (they are implementing pure virtual methods). Should Test::test1Table1Page() really be removed? (test class) Conflicts: unusedcode.easy Change-Id: I98a761f66f28e3a82661c10a5fa1dc7e109fff2f
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/line.hxx1
-rw-r--r--tools/source/generic/line.cxx57
2 files changed, 0 insertions, 58 deletions
diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx
index fba5e214e078..e1b62ffd00f8 100644
--- a/tools/inc/tools/line.hxx
+++ b/tools/inc/tools/line.hxx
@@ -49,7 +49,6 @@ public:
sal_Bool Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const;
sal_Bool Intersection( const Line& rLine, Point& rIntersection ) const;
- sal_Bool Intersection( const Rectangle& rRect, Line& rIntersection ) const;
double GetDistance( const double& rPtX, const double& rPtY ) const;
double GetDistance( const Point& rPoint ) const { return( GetDistance( rPoint.X(), rPoint.Y() ) ); }
diff --git a/tools/source/generic/line.cxx b/tools/source/generic/line.cxx
index 4c7e69123f92..11bf510bd057 100644
--- a/tools/source/generic/line.cxx
+++ b/tools/source/generic/line.cxx
@@ -98,63 +98,6 @@ sal_Bool Line::Intersection( const Line& rLine, double& rIntersectionX, double&
return bOk;
}
-sal_Bool Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
-{
- const sal_Bool bStartInside = rRect.IsInside( maStart );
- const sal_Bool bEndInside = rRect.IsInside( maEnd );
- sal_Bool bRet = sal_True;
-
- if( bStartInside && bEndInside )
- {
- // line completely inside rect
- rIntersection.maStart = maStart;
- rIntersection.maEnd = maEnd;
- }
- else
- {
- // calculate intersections
- const Point aTL( rRect.TopLeft() ), aTR( rRect.TopRight() );
- const Point aBR( rRect.BottomRight() ), aBL( rRect.BottomLeft() );
- Point aIntersect1, aIntersect2;
- Point* pCurIntersection = &aIntersect1;
-
- if( Intersection( Line( aTL, aTR ), *pCurIntersection ) )
- pCurIntersection = &aIntersect2;
-
- if( Intersection( Line( aTR, aBR ), *pCurIntersection ) )
- pCurIntersection = ( pCurIntersection == &aIntersect1 ) ? &aIntersect2 : NULL;
-
- if( pCurIntersection && Intersection( Line( aBR, aBL ), *pCurIntersection ) )
- pCurIntersection = ( pCurIntersection == &aIntersect1 ) ? &aIntersect2 : NULL;
-
- if( pCurIntersection && Intersection( Line( aBL, aTL ), *pCurIntersection ) )
- pCurIntersection = ( pCurIntersection == &aIntersect1 ) ? &aIntersect2 : NULL;
-
- if( !pCurIntersection )
- {
- // two intersections
- rIntersection.maStart = aIntersect1;
- rIntersection.maEnd = aIntersect2;
- }
- else if( pCurIntersection == &aIntersect2 )
- {
- // one intersection
- rIntersection.maStart = aIntersect1;
-
- if( ( maStart != aIntersect1 ) && bStartInside )
- rIntersection.maEnd = maStart;
- else if( ( maEnd != aIntersect1 ) && bEndInside )
- rIntersection.maEnd = maEnd;
- else
- rIntersection.maEnd = rIntersection.maStart;
- }
- else
- bRet = sal_False;
- }
-
- return bRet;
-}
-
double Line::GetDistance( const double& rPtX, const double& rPtY ) const
{
double fDist;