From e263e48bdb3df9a83259f1ba348783917df9e7e1 Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Sat, 21 May 2011 14:16:06 -0430 Subject: Remove uneeded parameter for Sort function. --- svl/inc/svl/slstitm.hxx | 2 +- svl/source/items/slstitm.cxx | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'svl') diff --git a/svl/inc/svl/slstitm.hxx b/svl/inc/svl/slstitm.hxx index e72a5ffde911..c758bb5f9ccb 100644 --- a/svl/inc/svl/slstitm.hxx +++ b/svl/inc/svl/slstitm.hxx @@ -75,7 +75,7 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const; virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const; - void Sort( sal_Bool bAscending = sal_True, List* pParallelList = 0 ); + void Sort( sal_Bool bAscending = sal_True); virtual bool PutValue ( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index e001bf1e23f2..455f93e5a197 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -51,7 +51,7 @@ public: SfxImpStringList() { nRefCount = 1; } ~SfxImpStringList(); - void Sort( sal_Bool bAscending, List* ); + void Sort( sal_Bool bAscending); }; //------------------------------------------------------------------------ @@ -70,9 +70,8 @@ SfxImpStringList::~SfxImpStringList() //------------------------------------------------------------------------ -void SfxImpStringList::Sort( sal_Bool bAscending, List* pParallelList ) +void SfxImpStringList::Sort( sal_Bool bAscending) { - DBG_ASSERT(!pParallelList || pParallelList->Count() >= aList.Count(),"Sort:ParallelList too small"); sal_uLong nCount = aList.Count(); if( nCount > 1 ) { @@ -102,13 +101,6 @@ void SfxImpStringList::Sort( sal_Bool bAscending, List* pParallelList ) bSwapped = sal_True; aList.Replace( pStr1, nCur + 1 ); aList.Replace( pStr2, nCur ); - if( pParallelList ) - { - void* p1 = pParallelList->GetObject( nCur ); - void* p2 = pParallelList->GetObject( nCur + 1 ); - pParallelList->Replace( p1, nCur + 1 ); - pParallelList->Replace( p2, nCur ); - } } } } @@ -355,11 +347,11 @@ int SfxStringListItem::IsPoolable() const //------------------------------------------------------------------------ -void SfxStringListItem::Sort( sal_Bool bAscending, List* pParallelList ) +void SfxStringListItem::Sort( sal_Bool bAscending) { DBG_ASSERT(GetRefCount()==0,"Sort:RefCount!=0"); if( pImp ) - pImp->Sort( bAscending, pParallelList ); + pImp->Sort( bAscending); } //---------------------------------------------------------------------------- -- cgit