summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-02-17 21:47:49 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-02-17 21:47:49 +0000
commitada6350a7cdf4984eb3ead31d938004bf9177ae8 (patch)
treefbe87fb987240955c6bfdbe3555ce1bd76393854 /svl
parent57c8929c6bf037a767e7016d28b7656cd8fddfb7 (diff)
Removed unused code from svl and sfx2
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/nranges.hxx2
-rw-r--r--svl/inc/svl/rngitem.hxx1
-rw-r--r--svl/source/items/nranges.cxx61
-rw-r--r--svl/source/items/rngitem_inc.cxx10
4 files changed, 0 insertions, 74 deletions
diff --git a/svl/inc/svl/nranges.hxx b/svl/inc/svl/nranges.hxx
index 2654a2125f99..badb3e924827 100644
--- a/svl/inc/svl/nranges.hxx
+++ b/svl/inc/svl/nranges.hxx
@@ -80,8 +80,6 @@ public:
NUMTYPE Count() const;
sal_Bool IsEmpty() const
{ return !_pRanges || 0 == *_pRanges; }
- sal_Bool Contains( NUMTYPE n ) const;
- sal_Bool Intersects( const SfxNumRanges & ) const;
operator const NUMTYPE* () const
{ return _pRanges; }
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index 0a90af8c16d5..02eeb06b10e6 100644
--- a/svl/inc/svl/rngitem.hxx
+++ b/svl/inc/svl/rngitem.hxx
@@ -67,7 +67,6 @@ public:
TYPEINFO();
SfxXRangeItem();
SfxXRangeItem( sal_uInt16 nWID, NUMTYPE nFrom, NUMTYPE nTo );
- SfxXRangeItem( sal_uInt16 nWID, SvStream &rStream );
SfxXRangeItem( const SfxXRangeItem& rItem );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx
index 5d7c034aa939..c3d89d8dec48 100644
--- a/svl/source/items/nranges.cxx
+++ b/svl/source/items/nranges.cxx
@@ -720,50 +720,6 @@ SfxNumRanges& SfxNumRanges::operator /=
//------------------------------------------------------------------------
-sal_Bool SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const
-
-/** <H3>Description</H3>
-
- Determines if at least one range in 'rRanges' intersects with one
- range in '*this'.
-
- sal_True, if there is at least one with:
- this->Contains( n ) && rRanges.Contains( n )
-*/
-
-{
- // special cases: one is empty
- if ( rRanges.IsEmpty() || IsEmpty() )
- return sal_False;
-
- // find at least one intersecting range
- const NUMTYPE *pRange1 = _pRanges;
- const NUMTYPE *pRange2 = rRanges._pRanges;
-
- do
- {
- // 1st range is smaller than 2nd range?
- if ( pRange1[1] < pRange2[0] )
- // => keep 1st range
- pRange1 += 2;
-
- // 2nd range is smaller than 1st range?
- else if ( pRange2[1] < pRange1[0] )
- // => skip 2nd range
- pRange2 += 2;
-
- // the ranges are overlappung
- else
- return sal_True;
- }
- while ( *pRange2 );
-
- // no intersection found
- return sal_False;
-}
-
-//------------------------------------------------------------------------
-
NUMTYPE SfxNumRanges::Count() const
/** <H3>Description</H3>
@@ -776,21 +732,4 @@ NUMTYPE SfxNumRanges::Count() const
return Capacity_Impl( _pRanges );
}
-//------------------------------------------------------------------------
-
-sal_Bool SfxNumRanges::Contains( NUMTYPE n ) const
-
-/** <H3>Description</H3>
-
- Determines if '*this' contains 'n'.
-*/
-
-{
- for ( NUMTYPE *pRange = _pRanges; *pRange && *pRange <= n; pRange += 2 )
- if ( pRange[0] <= n && n <= pRange[1] )
- return sal_True;
- return sal_False;
-
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/items/rngitem_inc.cxx b/svl/source/items/rngitem_inc.cxx
index 5be6228f147f..b1c21c3aa9f4 100644
--- a/svl/source/items/rngitem_inc.cxx
+++ b/svl/source/items/rngitem_inc.cxx
@@ -60,16 +60,6 @@ SfxXRangeItem::SfxXRangeItem( sal_uInt16 which, NUMTYPE from, NUMTYPE to ):
{
}
-
-// -----------------------------------------------------------------------
-
-SfxXRangeItem::SfxXRangeItem( sal_uInt16 nW, SvStream &rStream ) :
- SfxPoolItem( nW )
-{
- rStream >> nFrom;
- rStream >> nTo;
-}
-
// -----------------------------------------------------------------------
SfxXRangeItem::SfxXRangeItem( const SfxXRangeItem& rItem ) :