diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-02-17 21:47:49 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-17 21:47:49 +0000 |
commit | ada6350a7cdf4984eb3ead31d938004bf9177ae8 (patch) | |
tree | fbe87fb987240955c6bfdbe3555ce1bd76393854 /svl/source/items | |
parent | 57c8929c6bf037a767e7016d28b7656cd8fddfb7 (diff) |
Removed unused code from svl and sfx2
Diffstat (limited to 'svl/source/items')
-rw-r--r-- | svl/source/items/nranges.cxx | 61 | ||||
-rw-r--r-- | svl/source/items/rngitem_inc.cxx | 10 |
2 files changed, 0 insertions, 71 deletions
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 ) : |