diff options
-rw-r--r-- | svl/inc/svl/svstdarr.hxx | 20 | ||||
-rw-r--r-- | svl/source/memtools/svarray.cxx | 97 |
2 files changed, 0 insertions, 117 deletions
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx index 0d46662237d4..bfeeb35d1c79 100644 --- a/svl/inc/svl/svstdarr.hxx +++ b/svl/inc/svl/svstdarr.hxx @@ -93,31 +93,11 @@ SV_DECL_PTRARR_VISIBILITY( SvByteStrings, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_BYTESTRINGS_DECL #endif -#ifndef _SVSTDARR_BYTESTRINGSDTOR_DECL -SV_DECL_PTRARR_DEL_VISIBILITY( SvByteStringsDtor, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSDTOR_DECL -#endif - -#ifndef _SVSTDARR_BYTESTRINGSSORT_DECL -SV_DECL_PTRARR_SORT_VISIBILITY( SvByteStringsSort, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSSORT_DECL -#endif - #ifndef _SVSTDARR_BYTESTRINGSSORTDTOR_DECL SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsSortDtor, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_BYTESTRINGSSORTDTOR_DECL #endif -#ifndef _SVSTDARR_BYTESTRINGSISORT_DECL -SV_DECL_PTRARR_SORT_VISIBILITY( SvByteStringsISort, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSISORT_DECL -#endif - -#ifndef _SVSTDARR_BYTESTRINGSISORTDTOR_DECL -SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsISortDtor, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSISORTDTOR_DECL -#endif - typedef std::deque< xub_StrLen > SvXub_StrLens; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx index 43eb637ae991..4032800e0a8b 100644 --- a/svl/source/memtools/svarray.cxx +++ b/svl/source/memtools/svarray.cxx @@ -71,12 +71,8 @@ SV_IMPL_OP_PTRARR_SORT( SvStringsSort, StringPtr ) SV_IMPL_OP_PTRARR_SORT( SvStringsSortDtor, StringPtr ) SV_IMPL_PTRARR( SvByteStrings, ByteStringPtr ) -SV_IMPL_PTRARR( SvByteStringsDtor, ByteStringPtr ) -SV_IMPL_OP_PTRARR_SORT( SvByteStringsSort, ByteStringPtr ) SV_IMPL_OP_PTRARR_SORT( SvByteStringsSortDtor, ByteStringPtr ) - - // ---------------- strings ------------------------------------- // Array mit anderer Seek-Methode! @@ -171,97 +167,4 @@ sal_Bool SvStringsISortDtor::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) co return sal_False; } -// ---------------- bytestrings ------------------------------------- - -// Array mit anderer Seek-Methode! -_SV_IMPL_SORTAR_ALG( SvByteStringsISort, ByteStringPtr ) -void SvByteStringsISort::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 *((ByteStringPtr*)pData+n); - SvPtrarr::Remove( nP, nL ); - } -} -sal_Bool SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const -{ - register sal_uInt16 nO = SvByteStringsISort_SAR::Count(), - nM, - nU = 0; - if( nO > 0 ) - { - nO--; - while( nU <= nO ) - { - nM = nU + ( nO - nU ) / 2; - StringCompare eCmp = (*((ByteStringPtr*)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; -} - - -// Array mit anderer Seek-Methode! -_SV_IMPL_SORTAR_ALG( SvByteStringsISortDtor, ByteStringPtr ) -void SvByteStringsISortDtor::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 *((ByteStringPtr*)pData+n); - SvPtrarr::Remove( nP, nL ); - } -} -sal_Bool SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const -{ - register sal_uInt16 nO = SvByteStringsISortDtor_SAR::Count(), - nM, - nU = 0; - if( nO > 0 ) - { - nO--; - while( nU <= nO ) - { - nM = nU + ( nO - nU ) / 2; - StringCompare eCmp = (*((ByteStringPtr*)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; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |