summaryrefslogtreecommitdiff
path: root/sc/source/core/inc/adiasync.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-07-09 16:32:39 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-12 14:12:31 +0200
commit38b0ec8519c8692251c8973c724ef2097f12eefa (patch)
tree89cbbd70ec199104edab1236ff18b0dd67ff2f43 /sc/source/core/inc/adiasync.hxx
parentaa3a9f917f97ee87bfa5c6269bca1bff15542dbb (diff)
Convert SV_DECL_PTRARR_SORT(ScAddInAsyncs) to std::set
Change-Id: I08959c0de113264aaa7b1ca8c4f3124b2177d30f
Diffstat (limited to 'sc/source/core/inc/adiasync.hxx')
-rw-r--r--sc/source/core/inc/adiasync.hxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx
index 62cc2e7e89be..54625c80d81a 100644
--- a/sc/source/core/inc/adiasync.hxx
+++ b/sc/source/core/inc/adiasync.hxx
@@ -30,7 +30,6 @@
#define SC_ADIASYNC_HXX
#include <svl/broadcast.hxx>
-#include <svl/svarray.hxx>
#include <set>
#include "callform.hxx"
@@ -40,11 +39,6 @@ void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData );
}
-class ScAddInAsync;
-typedef ScAddInAsync* ScAddInAsyncPtr;
-SV_DECL_PTRARR_SORT( ScAddInAsyncs, ScAddInAsyncPtr, 4 )
-extern ScAddInAsyncs theAddInAsyncTbl; // in adiasync.cxx
-
class ScDocument;
class ScAddInDocs : public std::set<ScDocument*> {};
@@ -83,10 +77,18 @@ public:
void AddDocument( ScDocument* pDoc ) { pDocs->insert( pDoc ); }
// Vergleichsoperatoren fuer PtrArrSort
- sal_Bool operator < ( const ScAddInAsync& r ) { return nHandle < r.nHandle; }
- sal_Bool operator ==( const ScAddInAsync& r ) { return nHandle == r.nHandle; }
+ bool operator< ( const ScAddInAsync& r ) const { return nHandle < r.nHandle; }
+ bool operator==( const ScAddInAsync& r ) const { return nHandle == r.nHandle; }
};
+struct CompareScAddInAsync
+{
+ bool operator()( ScAddInAsync* const& lhs, ScAddInAsync* const& rhs ) const { return (*lhs)<(*rhs); }
+};
+class ScAddInAsyncs : public std::set<ScAddInAsync*, CompareScAddInAsync> {};
+
+extern ScAddInAsyncs theAddInAsyncTbl; // in adiasync.cxx
+
#endif