summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-06 11:28:44 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-06 11:46:53 +0000
commit88e3b846b8a4bd4ce5507d1bc5441ee4167e5326 (patch)
tree6dbff3db12e6394534ee331644424691bad6325b
parentce28d83912d14bc81c455af64893842de78a8c8d (diff)
remove some dead bits of DDE
Change-Id: Ieb1d4e23f1a62b56d14a655a676d9c7d5f33c51c Reviewed-on: https://gerrit.libreoffice.org/23849 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--include/svl/svdde.hxx9
-rw-r--r--sfx2/source/appl/lnkbase2.cxx16
-rw-r--r--svl/source/svdde/ddesvr.cxx42
-rw-r--r--svl/unx/source/svdde/ddedummy.cxx30
4 files changed, 9 insertions, 88 deletions
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx
index aef9bed26559..524bd5ece1b0 100644
--- a/include/svl/svdde.hxx
+++ b/include/svl/svdde.hxx
@@ -260,7 +260,6 @@ public:
// A Warm-/Hot-Link is created. Return true if successful
virtual bool StartAdviseLoop();
- bool StopAdviseLoop();
private:
friend class DdeInternal;
@@ -298,19 +297,11 @@ class SVL_DLLPUBLIC DdeService
{
friend class DdeInternal;
-public:
- bool IsBusy();
- OUString GetHelp();
- // Eventually creating a new item. return 0 -> Topic creation failed
- bool MakeTopic( const OUString& rItem );
-
protected:
OUString Topics();
OUString Formats();
OUString SysItems();
OUString Status();
- OUString SysTopicGet( const OUString& );
- bool SysTopicExecute( const OUString* );
const DdeTopic* GetSysTopic() const { return pSysTopic; }
private:
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 21b3207ce10c..ea424ae9cfe7 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -171,18 +171,10 @@ static DdeTopic* FindTopic( const OUString & rLinkName, sal_uInt16* pItemStt )
std::vector<DdeTopic*>& rTopics = pService->GetTopics();
- for( int i = 0; i < 2; ++i )
- {
- for( std::vector<DdeTopic*>::iterator iterTopic = rTopics.begin();
- iterTopic != rTopics.end(); ++iterTopic )
- if( (*iterTopic)->GetName() == sTopic )
- return *iterTopic;
-
- // Topic not found?
- // then we try once to create it
- if( i || !pService->MakeTopic( sTopic ) )
- break; // did not work, exiting
- }
+ for( std::vector<DdeTopic*>::iterator iterTopic = rTopics.begin();
+ iterTopic != rTopics.end(); ++iterTopic )
+ if( (*iterTopic)->GetName() == sTopic )
+ return *iterTopic;
break;
}
}
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 266db826dc8b..43040c93ae6b 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -245,9 +245,9 @@ found:
else if ( pTopic->aItem == reinterpret_cast<const sal_Unicode*>(SZDDESYS_ITEM_FORMATS) )
aRes = pService->Formats();
else if ( pTopic->aItem == reinterpret_cast<const sal_Unicode*>(SZDDESYS_ITEM_HELP) )
- aRes = pService->GetHelp();
+ aRes = OUString();
else
- aRes = pService->SysTopicGet( pTopic->aItem );
+ aRes = OUString();
if ( !aRes.isEmpty() )
pData = new DdeData( aRes );
@@ -337,8 +337,6 @@ found:
case XTYP_ADVSTOP:
pItem->DecMonitor( (sal_IntPtr)hConv );
- if( !pItem->pImpData )
- pTopic->StopAdviseLoop();
pInst->hCurConvSvr = 0;
return (HDDEDATA)sal_True;
@@ -353,7 +351,7 @@ found:
aName = (const sal_Unicode *)aExec.pImp->pData;
if( pTopic->IsSystemTopic() )
- bRes = pService->SysTopicExecute( &aName );
+ bRes = false;
else
bRes = pTopic->Execute( &aName );
}
@@ -403,7 +401,7 @@ DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic )
// Let's query our subclass
TCHAR chBuf[250];
DdeQueryString(pInst->hDdeInstSvr,hTopic,chBuf,sizeof(chBuf)/sizeof(TCHAR),CP_WINUNICODE );
- bContinue = rService.MakeTopic( reinterpret_cast<const sal_Unicode*>(chBuf) );
+ bContinue = false;
// We need to search again
}
while( bContinue );
@@ -711,11 +709,6 @@ bool DdeTopic::StartAdviseLoop()
return false;
}
-bool DdeTopic::StopAdviseLoop()
-{
- return false;
-}
-
DdeItem::DdeItem( const sal_Unicode* p )
{
DdeInstData* pInst = ImpGetInstData();
@@ -940,17 +933,7 @@ OUString DdeService::Formats()
OUString DdeService::Status()
{
- return IsBusy() ? OUString("Busy\r\n") : OUString("Ready\r\n");
-}
-
-bool DdeService::IsBusy()
-{
- return false;
-}
-
-OUString DdeService::GetHelp()
-{
- return OUString();
+ return OUString("Ready\r\n");
}
bool DdeTopic::MakeItem( const OUString& )
@@ -958,19 +941,4 @@ bool DdeTopic::MakeItem( const OUString& )
return false;
}
-bool DdeService::MakeTopic( const OUString& )
-{
- return false;
-}
-
-OUString DdeService::SysTopicGet( const OUString& )
-{
- return OUString();
-}
-
-bool DdeService::SysTopicExecute( const OUString* )
-{
- return false;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx
index fb9446115137..fc158a3035e9 100644
--- a/svl/unx/source/svdde/ddedummy.cxx
+++ b/svl/unx/source/svdde/ddedummy.cxx
@@ -173,11 +173,6 @@ bool DdeTopic::StartAdviseLoop()
return false;
}
-bool DdeTopic::StopAdviseLoop()
-{
- return false;
-}
-
bool DdeTopic::Execute( SAL_UNUSED_PARAMETER const OUString* )
{
return false;
@@ -220,30 +215,10 @@ OUString DdeService::Status()
return OUString();
}
-OUString DdeService::SysTopicGet(const OUString& rString)
-{
- return rString;
-}
-
-bool DdeService::SysTopicExecute(SAL_UNUSED_PARAMETER const OUString*)
-{
- return false;
-}
-
DdeService::~DdeService()
{
}
-bool DdeService::IsBusy()
-{
- return false;
-}
-
-OUString DdeService::GetHelp()
-{
- return OUString();
-}
-
void DdeService::AddFormat(SAL_UNUSED_PARAMETER SotClipboardFormatId)
{
}
@@ -256,11 +231,6 @@ void DdeService::RemoveTopic( SAL_UNUSED_PARAMETER const DdeTopic& )
{
}
-bool DdeService::MakeTopic( SAL_UNUSED_PARAMETER const OUString& )
-{
- return false;
-}
-
const OUString DdeService::GetName() const
{
return OUString();