Kaydet (Commit) 96ec36cf authored tarafından Michael Stahl's avatar Michael Stahl

ucb: replace "SimpleList" trash

* pointless use of void*
* stupid casting everywhere
* ridiculously overloaded Remove()
* defensively programmed implementation

Change-Id: I1c86ffac636cafbe3e13e668a65a2b14377b6e95
üst a564821e
...@@ -85,28 +85,6 @@ public: ...@@ -85,28 +85,6 @@ public:
}; };
class SimpleList
{
std::deque < void* > maData;
public:
SimpleList(){}
~SimpleList(){ Clear(); }
sal_uInt32 Count() { return (sal_uInt32) maData.size(); }
void Clear() { maData.clear(); }
void Remove( sal_uInt32 nPos );
void Remove( void* pData );
void Append( void* pData )
{ maData.push_back( pData ); }
void Insert( void* pData, sal_uInt32 nPos );
void* GetObject( sal_uInt32 nPos ) const;
void Replace( void* pData, sal_uInt32 nPos );
};
#define RESULTSET_SERVICE_NAME "com.sun.star.ucb.SortedResultSet" #define RESULTSET_SERVICE_NAME "com.sun.star.ucb.SortedResultSet"
...@@ -131,8 +109,8 @@ class SortedResultSet: public cppu::WeakImplHelper < ...@@ -131,8 +109,8 @@ class SortedResultSet: public cppu::WeakImplHelper <
SortInfo* mpSortInfo; SortInfo* mpSortInfo;
osl::Mutex maMutex; osl::Mutex maMutex;
SortedEntryList maS2O; // maps the sorted entries to the original ones SortedEntryList maS2O; // maps the sorted entries to the original ones
SimpleList maO2S; // maps the original Entries to the sorted ones std::deque<sal_IntPtr> m_O2S; /// maps the original Entries to the sorted ones
SimpleList maModList; // keeps track of modified entries std::deque<SortListData*> m_ModList; /// keeps track of modified entries
sal_IntPtr mnLastSort; // index of the last sorted entry; sal_IntPtr mnLastSort; // index of the last sorted entry;
sal_IntPtr mnCurEntry; // index of the current entry sal_IntPtr mnCurEntry; // index of the current entry
sal_IntPtr mnCount; // total count of the elements sal_IntPtr mnCount; // total count of the elements
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment