diff options
author | Nigel Hawkins <n.hawkins@gmx.com> | 2011-06-14 15:07:37 +0100 |
---|---|---|
committer | Nigel Hawkins <n.hawkins@gmx.com> | 2011-06-14 15:07:37 +0100 |
commit | 398997a3e1034abbcaaea58a423ac8738549e0b8 (patch) | |
tree | 89bc4c362e692a66616d272ff519172775541cdd /svl/source | |
parent | fa3adcf3c174be1703838665b6a7970816fefba8 (diff) |
Remove definitions of SvUShortsSort. LGPLv3+/MPL
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/memtools/svarray.cxx | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx index 7d5984c6f6df..43eb637ae991 100644 --- a/svl/source/memtools/svarray.cxx +++ b/svl/source/memtools/svarray.cxx @@ -171,98 +171,6 @@ sal_Bool SvStringsISortDtor::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) co return sal_False; } -// ---------------- Ushorts ------------------------------------- - -/* SortArray fuer UShorts */ -sal_Bool SvUShortsSort::Seek_Entry( const sal_uInt16 aE, sal_uInt16* pP ) const -{ - register sal_uInt16 nO = SvUShorts::Count(), - nM, - nU = 0; - if( nO > 0 ) - { - nO--; - while( nU <= nO ) - { - nM = nU + ( nO - nU ) / 2; - if( *(pData + nM) == aE ) - { - if( pP ) *pP = nM; - return sal_True; - } - else if( *(pData + nM) < aE ) - nU = nM + 1; - else if( nM == 0 ) - { - if( pP ) *pP = nU; - return sal_False; - } - else - nO = nM - 1; - } - } - if( pP ) *pP = nU; - return sal_False; -} - -void SvUShortsSort::Insert( const SvUShortsSort * pI, sal_uInt16 nS, sal_uInt16 nE ) -{ - if( USHRT_MAX == nE ) - nE = pI->Count(); - sal_uInt16 nP; - const sal_uInt16 * pIArr = pI->GetData(); - for( ; nS < nE; ++nS ) - { - if( ! Seek_Entry( *(pIArr+nS), &nP) ) - SvUShorts::Insert( *(pIArr+nS), nP ); - if( ++nP >= Count() ) - { - SvUShorts::Insert( pI, nP, nS+1, nE ); - nS = nE; - } - } -} - -sal_Bool SvUShortsSort::Insert( const sal_uInt16 aE ) -{ - sal_uInt16 nP; - sal_Bool bExist = Seek_Entry( aE, &nP ); - if( !bExist ) - SvUShorts::Insert( aE, nP ); - return !bExist; -} - -sal_Bool SvUShortsSort::Insert( const sal_uInt16 aE, sal_uInt16& rP ) -{ - sal_Bool bExist = Seek_Entry( aE, &rP ); - if( !bExist ) - SvUShorts::Insert( aE, rP ); - return !bExist; -} - -void SvUShortsSort::Insert( const sal_uInt16* pE, sal_uInt16 nL) -{ - sal_uInt16 nP; - for( sal_uInt16 n = 0; n < nL; ++n ) - if( ! Seek_Entry( *(pE+n), &nP )) - SvUShorts::Insert( *(pE+n), nP ); -} - -// remove ab Pos -void SvUShortsSort::RemoveAt( const sal_uInt16 nP, sal_uInt16 nL ) -{ - if( nL ) - SvUShorts::Remove( nP, nL); -} - -// remove ab dem Eintrag -void SvUShortsSort::Remove( const sal_uInt16 aE, sal_uInt16 nL ) -{ - sal_uInt16 nP; - if( nL && Seek_Entry( aE, &nP ) ) - SvUShorts::Remove( nP, nL); -} - // ---------------- bytestrings ------------------------------------- // Array mit anderer Seek-Methode! |