summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-02-21 10:26:56 -0800
committerJoseph Powers <jpowers27@cox.net>2011-02-21 10:26:56 -0800
commitb5863b83d212ae344cefe0aefdfd4caddaded02b (patch)
tree5f16177006f16e32c389c201aaafa7843b865737
parent2868cfdcbaa5d76d854bc55aa8c33621acdb8ad2 (diff)
Remove classes DdeServiceList & DdeTopicList
These don't appear to be used anywhere.
-rw-r--r--svl/inc/svl/svdde.hxx41
-rw-r--r--svl/source/svdde/ddeinf.cxx136
2 files changed, 1 insertions, 176 deletions
diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx
index 9ed45a146be8..3b642ad85f20 100644
--- a/svl/inc/svl/svdde.hxx
+++ b/svl/inc/svl/svdde.hxx
@@ -34,6 +34,7 @@
#include <tools/string.hxx>
#include <tools/list.hxx>
#include <tools/link.hxx>
+#include <vector>
class DdeString;
class DdeData;
@@ -68,12 +69,6 @@ typedef List DdeItems;
DECLARE_LIST( DdeTransactions, DdeTransaction* )
DECLARE_LIST( DdeFormats, long )
-
-#ifndef STRING_LIST
-#define STRING_LIST
-DECLARE_LIST( StringList, String * )
-#endif
-
// -----------
// - DdeData -
// -----------
@@ -107,40 +102,6 @@ public:
static ULONG GetExternalFormat( ULONG nFmt );
static ULONG GetInternalFormat( ULONG nFmt );
};
-// ------------------
-// - DdeServiceList -
-// ------------------
-
-class DdeServiceList
-{
- StringList aServices;
-
-public:
- DdeServiceList( const String* = NULL );
- ~DdeServiceList();
-
- StringList& GetServices() { return aServices; }
-
-private:
- DdeServiceList( const DdeServiceList& );
- const DdeServiceList& operator= ( const DdeServiceList& );
-};
-
-// ----------------
-// - DdeTopicList -
-// ----------------
-
-class DdeTopicList
-{
- StringList aTopics;
-
- DECL_LINK( Data, DdeData* );
-public:
- DdeTopicList( const String& );
- ~DdeTopicList();
-
- StringList& GetTopics() { return aTopics; }
-};
// ------------------
// - DdeTransaction -
diff --git a/svl/source/svdde/ddeinf.cxx b/svl/source/svdde/ddeinf.cxx
index 377dde44fdba..f93d1b653a9f 100644
--- a/svl/source/svdde/ddeinf.cxx
+++ b/svl/source/svdde/ddeinf.cxx
@@ -53,140 +53,4 @@ HDDEDATA CALLBACK _export DdeInternal::InfCallback(
return (HDDEDATA)DDE_FNOTPROCESSED;
}
-// --- DdeServiceList::DdeServiceList() ----------------------------
-
-DdeServiceList::DdeServiceList( const String* pTopic )
-{
- DWORD hDdeInst = NULL;
- HCONVLIST hConvList = NULL;
- HCONV hConv = NULL;
- UINT nStatus = DMLERR_NO_ERROR;
- HSZ hTopic = NULL;
-
-#ifndef OS2 // YD FIXME
-
- nStatus = DdeInitialize( &hDdeInst, (PFNCALLBACK) DdeInternal::InfCallback,
- APPCLASS_STANDARD | APPCMD_CLIENTONLY |
- CBF_FAIL_ALLSVRXACTIONS |
- CBF_SKIP_ALLNOTIFICATIONS, 0L );
-
- if ( nStatus == DMLERR_NO_ERROR )
- {
- if ( pTopic )
- {
- LPCTSTR p = reinterpret_cast<LPCTSTR>(pTopic->GetBuffer());
-#ifdef __MINGW32__
- hTopic = DdeCreateStringHandle( hDdeInst, const_cast<LPTSTR>(p), CP_WINUNICODE );
-#else
- hTopic = DdeCreateStringHandle( hDdeInst, p, CP_WINUNICODE );
-#endif
- }
-
- hConvList = DdeConnectList( hDdeInst, NULL, hTopic, NULL, NULL );
- nStatus = DdeGetLastError( hDdeInst );
- }
-
- if ( nStatus == DMLERR_NO_ERROR )
- {
- while ( ( hConv = DdeQueryNextServer( hConvList, hConv ) ) != NULL)
- {
- CONVINFO aInf;
- TCHAR buf[256], *p;
- HSZ h;
-#ifdef OS2
- aInf.nSize = sizeof( aInf );
-#else
- aInf.cb = sizeof( aInf );
-#endif
- if( DdeQueryConvInfo( hConv, QID_SYNC, &aInf))
- {
- h = aInf.hszServiceReq;
- if ( !h )
-#ifndef OS2
- h = aInf.hszSvcPartner;
-#else
- h = aInf.hszPartner;
-#endif
- DdeQueryString( hDdeInst, h, buf, sizeof(buf) / sizeof(TCHAR), CP_WINUNICODE );
- p = buf + lstrlen( buf );
- *p++ = '|'; *p = 0;
- DdeQueryString( hDdeInst, aInf.hszTopic, p, sizeof(buf)/sizeof(TCHAR)-lstrlen( buf ),
- CP_WINUNICODE );
- aServices.Insert( new String( reinterpret_cast<const sal_Unicode*>(buf) ) );
- }
- }
- DdeDisconnectList( hConvList );
- }
-
- if ( hTopic)
- DdeFreeStringHandle( hDdeInst, hTopic );
- if ( hDdeInst )
- DdeUninitialize( hDdeInst );
-
-#endif
-
-}
-
-// --- DdeServiceList::~DdeServiceList() ---------------------------
-
-DdeServiceList::~DdeServiceList()
-{
- String* s;
- while ( ( s = aServices.First() ) != NULL )
- {
- aServices.Remove( s );
- delete s;
- }
-}
-
-// --- DdeTopicList::DdeTopicList() --------------------------------
-
-DdeTopicList::DdeTopicList( const String& rService )
-{
- DdeConnection aSys( rService, String( reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC) ) );
-
- if ( !aSys.GetError() )
- {
- DdeRequest aReq( aSys, String( reinterpret_cast<const sal_Unicode*>(SZDDESYS_ITEM_TOPICS) ), 500 );
- aReq.SetDataHdl( LINK( this, DdeTopicList, Data ) );
- aReq.Execute();
- }
-}
-
-// --- DdeTopicList::~DdeTopicList() -------------------------------
-
-DdeTopicList::~DdeTopicList()
-{
- String* s;
- while ( ( s = aTopics.First() ) != NULL )
- {
- aTopics.Remove( s );
- delete s;
- }
-}
-
-// --- DdeTopicList::Data() --------------------------------------------
-
-IMPL_LINK( DdeTopicList, Data, DdeData*, pData )
-{
- char* p = (char*) (const void *) *pData;
- char* q = p;
- short i;
- char buf[256];
-
- while ( *p && *p != '\r' && *p != '\n' )
- {
- q = buf; i = 0;
- while ( i < 255 && *p && *p != '\r' && *p != '\n' && *p != '\t' )
- *q++ = *p++, i++;
- *q = 0;
- while ( *p && *p != '\r' && *p != '\n' && *p != '\t' )
- p++;
- aTopics.Insert( new String( String::CreateFromAscii(buf) ) );
- if ( *p == '\t' )
- p++;
- }
- return 0;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */