summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNigel Hawkins <n.hawkins@gmx.com>2011-05-27 17:13:19 +0100
committerNigel Hawkins <n.hawkins@gmx.com>2011-05-27 17:23:59 +0100
commit380b9b03ec020fde483d34124e23a535a8ffb986 (patch)
tree2f338f80438bb47dcb666908ec6259a317641340 /svtools
parentf8e211422987d2e2270765f7c70257dcc1c52364 (diff)
Remove use of SvULongsSort in svlbox.cxx. LGPLv3+/MPL.
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svlbox.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index a543343ed59e..d6f1fd4a9504 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -45,12 +45,11 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <rtl/instance.hxx>
-#define _SVSTDARR_ULONGSSORT
-#include <svl/svstdarr.hxx>
-
#include <svtools/svmedit.hxx>
#include <svtools/svlbitm.hxx>
+#include <set>
+
using namespace ::com::sun::star::accessibility;
// Drag&Drop
@@ -1933,30 +1932,30 @@ sal_Bool SvLBox::NotifyAcceptDrop( SvLBoxEntry* )
namespace
{
- struct SortLBoxes : public rtl::Static<SvULongsSort, SortLBoxes> {};
+ struct SortLBoxes : public rtl::Static<std::set<sal_uLong>, SortLBoxes> {};
}
void SvLBox::AddBoxToDDList_Impl( const SvLBox& rB )
{
sal_uLong nVal = (sal_uLong)&rB;
- SortLBoxes::get().Insert( nVal );
+ SortLBoxes::get().insert( nVal );
}
void SvLBox::RemoveBoxFromDDList_Impl( const SvLBox& rB )
{
sal_uLong nVal = (sal_uLong)&rB;
- SortLBoxes::get().Remove( nVal );
+ SortLBoxes::get().erase( nVal );
}
IMPL_STATIC_LINK( SvLBox, DragFinishHdl_Impl, sal_Int8*, pAction )
{
sal_uLong nVal = (sal_uLong)pThis;
- sal_uInt16 nFnd;
- SvULongsSort &rSortLBoxes = SortLBoxes::get();
- if( rSortLBoxes.Seek_Entry( nVal, &nFnd ) )
+ std::set<sal_uLong> &rSortLBoxes = SortLBoxes::get();
+ std::set<sal_uLong>::const_iterator it = rSortLBoxes.find(nVal);
+ if( it != rSortLBoxes.end() )
{
pThis->DragFinished( *pAction );
- rSortLBoxes.Remove( nFnd, 1 );
+ rSortLBoxes.erase( it );
}
return 0;
}