[Libreoffice-commits] .: svl/inc svl/source
Joseph Powers
jpowers at kemper.freedesktop.org
Mon Feb 21 10:27:18 PST 2011
svl/inc/svl/svdde.hxx | 41 -------------
svl/source/svdde/ddeinf.cxx | 138 --------------------------------------------
2 files changed, 2 insertions(+), 177 deletions(-)
New commits:
commit 3233b666d82f3a1e3443732c1ac2a7c81502a259
Author: Joseph Powers <jpowers27 at cox.net>
Date: Mon Feb 21 10:26:56 2011 -0800
Remove classes DdeServiceList & DdeTopicList
These don't appear to be used anywhere.
diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx
index b7b300f..42cff86 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 1d281b3..f93d1b6 100644
--- a/svl/source/svdde/ddeinf.cxx
+++ b/svl/source/svdde/ddeinf.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -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: */
More information about the Libreoffice-commits
mailing list