summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-04-27 16:54:28 -0430
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-05-06 10:17:57 +0200
commit7d2adfa11422c73540199cfd5bc451c305c70fc0 (patch)
treee6eb1316ba07652b429e623abf2e20a686efed6e /svl
parenta39d4eae6ddd14a677ce140bf0482cff7331d536 (diff)
Remove DECLARE_LIST(DdeTopics,DdeTopic*)
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/svdde.hxx6
-rw-r--r--svl/source/svdde/ddeimp.hxx1
-rw-r--r--svl/source/svdde/ddesvr.cxx40
3 files changed, 22 insertions, 25 deletions
diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx
index 80481f2a4eb2..5c42e84ca2e5 100644
--- a/svl/inc/svl/svdde.hxx
+++ b/svl/inc/svl/svdde.hxx
@@ -56,11 +56,9 @@ struct Conversation;
#ifndef _SVDDE_NOLISTS
DECLARE_LIST( DdeServices, DdeService* )
-DECLARE_LIST( DdeTopics, DdeTopic* )
DECLARE_LIST( DdeItems, DdeItem* )
#else
typedef List DdeServices;
-typedef List DdeTopics;
typedef List DdeItems;
#endif
@@ -392,7 +390,7 @@ protected:
const DdeTopic* GetSysTopic() const { return pSysTopic; }
private:
- DdeTopics aTopics;
+ std::vector<DdeTopic*> aTopics;
DdeFormats aFormats;
DdeTopic* pSysTopic;
DdeString* pName;
@@ -409,7 +407,7 @@ public:
short GetError() { return nStatus; }
static DdeServices& GetServices();
- DdeTopics& GetTopics() { return aTopics; }
+ std::vector<DdeTopic*>& GetTopics() { return aTopics; }
void AddTopic( const DdeTopic& );
void RemoveTopic( const DdeTopic& );
diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx
index b462f0bcc616..d2c33e00a917 100644
--- a/svl/source/svdde/ddeimp.hxx
+++ b/svl/source/svdde/ddeimp.hxx
@@ -55,7 +55,6 @@
class DdeService;
class DdeTopic;
class DdeItem;
-class DdeTopics;
class DdeItems;
// ----------------
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index a2ff3fda485b..6423e1b37d97 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -121,10 +121,10 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
{
if ( !hText2 || ( *pService->pName == hText2 ) )
{
- for( pTopic = pService->aTopics.First(); pTopic;
- pTopic = pService->aTopics.Next() )
+ std::vector<DdeTopic*>::const_iterator iter;
+ for (iter = pService->aTopics.begin(); iter != pService->aTopics.end(); ++iter)
{
- if ( !hText1 || (*pTopic->pName == hText1) )
+ if ( !hText1 || iter->pName == hText1 )
nTopics++;
}
}
@@ -403,17 +403,17 @@ DdeService* DdeInternal::FindService( HSZ hService )
DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic )
{
- DdeTopic* s;
- DdeTopics& rTopics = rService.aTopics;
+ std::vector<DdeTopic*>::iterator iter;
+ std::vector<DdeTopic*> &rTopics = rService.aTopics;
int bWeiter = sal_False;
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
do { // middle check loop
- for ( s = rTopics.First(); s; s = rTopics.Next() )
+ for ( iter = rTopics.begin(); iter != rTopics.end(); ++iter )
{
- if ( *s->pName == hTopic )
- return s;
+ if ( iter->pName == hTopic )
+ return *iter;
}
bWeiter = !bWeiter;
@@ -559,19 +559,19 @@ DdeServices& DdeService::GetServices()
void DdeService::AddTopic( const DdeTopic& rTopic )
{
RemoveTopic( rTopic );
- aTopics.Insert( (DdeTopic*) &rTopic );
+ aTopics.push_back(&rTopic);
}
// --- DdeService::RemoveTopic() -----------------------------------
void DdeService::RemoveTopic( const DdeTopic& rTopic )
{
- DdeTopic* t;
- for ( t = aTopics.First(); t; t = aTopics.Next() )
+ std::vector<DdeTopic*>::iterator iter;
+ for ( iter = aTopics.begin(); iter != aTopics.end(); ++iter )
{
- if ( !DdeCmpStringHandles (*t->pName, *rTopic.pName ) )
+ if ( !DdeCmpStringHandles (*iter->pName, *rTopic.pName ) )
{
- aTopics.Remove( t );
+ aTopics.erase(iter);
// JP 27.07.95: und alle Conversions loeschen !!!
// (sonst wird auf geloeschten Topics gearbeitet!!)
for( size_t n = pConv->size(); n; )
@@ -986,14 +986,14 @@ void DdeGetPutItem::AdviseLoop( sal_Bool )
String DdeService::SysItems()
{
String s;
- DdeTopic* t;
- for ( t = aTopics.First(); t; t = aTopics.Next() )
+ std::vector<DdeTopic*>::iterator iter;
+ for ( iter = aTopics.begin(); iter != aTopics.end(); ++iter )
{
- if ( t->GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC) )
+ if ( iter->GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC) )
{
short n = 0;
DdeItem* pi;
- for ( pi = t->aItems.First(); pi; pi = t->aItems.Next(), n++ )
+ for ( pi = iter->aItems.First(); pi; pi = iter->aItems.Next(), n++ )
{
if ( n )
s += '\t';
@@ -1011,14 +1011,14 @@ String DdeService::SysItems()
String DdeService::Topics()
{
String s;
- DdeTopic* t;
+ std::vector<DdeTopic*>::iterator iter;
short n = 0;
- for ( t = aTopics.First(); t; t = aTopics.Next(), n++ )
+ for ( iter = aTopics.begin(); iter != aTopics.end(); ++iter, n++ )
{
if ( n )
s += '\t';
- s += t->GetName();
+ s += iter->GetName();
}
s += String::CreateFromAscii("\r\n");