From 9556b3847edb9223db7c65614b49e10d4566b712 Mon Sep 17 00:00:00 2001 From: August Sodora Date: Wed, 11 Jan 2012 18:01:02 -0500 Subject: [PATCH] Remove SvStringISort --- svl/inc/svl/svstdarr.hxx | 5 ---- svl/source/memtools/svarray.cxx | 48 --------------------------------- 2 files changed, 53 deletions(-) diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx index 1d1b6e825713..1533e473dccb 100644 --- a/svl/inc/svl/svstdarr.hxx +++ b/svl/inc/svl/svstdarr.hxx @@ -50,11 +50,6 @@ SV_DECL_PTRARR_DEL_VISIBILITY( SvStringsDtor, StringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_STRINGSDTOR_DECL #endif -#ifndef _SVSTDARR_STRINGSISORT_DECL -SV_DECL_PTRARR_SORT_VISIBILITY( SvStringsISort, StringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_STRINGSISORT_DECL -#endif - #ifndef _SVSTDARR_STRINGSISORTDTOR_DECL SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvStringsISortDtor, StringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_STRINGSISORTDTOR_DECL diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx index 52f3f0c09460..a8bbb685abeb 100644 --- a/svl/source/memtools/svarray.cxx +++ b/svl/source/memtools/svarray.cxx @@ -28,7 +28,6 @@ #define _SVSTDARR_STRINGSDTOR #define _SVSTDARR_STRINGSSORTDTOR -#define _SVSTDARR_STRINGSISORT #include #include @@ -45,53 +44,6 @@ SV_IMPL_PTRARR( SvStringsDtor, StringPtr ) // ---------------- strings ------------------------------------- -// Array with different Seek method -_SV_IMPL_SORTAR_ALG( SvStringsISort, StringPtr ) -void SvStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) -{ - if( nL ) - { - DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" ); - for( sal_uInt16 n=nP; n < nP + nL; n++ ) - delete *((StringPtr*)pData+n); - SvPtrarr::Remove( nP, nL ); - } -} -sal_Bool SvStringsISort::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) const -{ - register sal_uInt16 nO = SvStringsISort_SAR::Count(), - nM, - nU = 0; - if( nO > 0 ) - { - nO--; - while( nU <= nO ) - { - nM = nU + ( nO - nU ) / 2; - StringCompare eCmp = (*((StringPtr*)pData + nM))-> - CompareIgnoreCaseToAscii( *(aE) ); - if( COMPARE_EQUAL == eCmp ) - { - if( pP ) *pP = nM; - return sal_True; - } - else if( COMPARE_LESS == eCmp ) - 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; -} - -// ---------------- strings ------------------------------------- - // Array with different Seek method _SV_IMPL_SORTAR_ALG( SvStringsISortDtor, StringPtr ) void SvStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )