From 65b1fee217f03dcaff498ba21fac77ef8a320a0b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 6 Oct 2016 13:05:05 +0200 Subject: Replace DdeString conversion opreator with proper function Change-Id: Ia6a9b40ea33dd9bff8322d8cff1692926f6d1db0 --- svl/source/svdde/ddecli.cxx | 4 ++-- svl/source/svdde/ddeimp.hxx | 2 +- svl/source/svdde/ddestrg.cxx | 2 +- svl/source/svdde/ddesvr.cxx | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'svl') diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index b46d80cd3875..b6e562616b19 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -172,7 +172,7 @@ DdeConnection::DdeConnection( const OUString& rService, const OUString& rTopic ) if ( pImp->nStatus == DMLERR_NO_ERROR ) { - pImp->hConv = DdeConnect( pInst->hDdeInstCli,*pService,*pTopic, NULL); + pImp->hConv = DdeConnect( pInst->hDdeInstCli,pService->getHSZ(),pTopic->getHSZ(), NULL); if( !pImp->hConv ) pImp->nStatus = DdeGetLastError( pInst->hDdeInstCli ); } @@ -277,7 +277,7 @@ DdeTransaction::~DdeTransaction() void DdeTransaction::Execute() { - HSZ hItem = *pName; + HSZ hItem = pName->getHSZ(); void* pData = (void*)aDdeData.getData(); DWORD nData = (DWORD)aDdeData.getSize(); SotClipboardFormatId nIntFmt = aDdeData.pImp->nFmt; diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx index 6c7b3d3a9506..95848172d952 100644 --- a/svl/source/svdde/ddeimp.hxx +++ b/svl/source/svdde/ddeimp.hxx @@ -66,7 +66,7 @@ public: ~DdeString(); int operator==( HSZ ); - operator HSZ(); + HSZ getHSZ(); OUString toOUString() const { return m_aString; } }; diff --git a/svl/source/svdde/ddestrg.cxx b/svl/source/svdde/ddestrg.cxx index 40287dab93fd..e224b83a6596 100644 --- a/svl/source/svdde/ddestrg.cxx +++ b/svl/source/svdde/ddestrg.cxx @@ -48,7 +48,7 @@ int DdeString::operator==( HSZ h ) return( !DdeCmpStringHandles( hString, h ) ); } -DdeString::operator HSZ() +HSZ DdeString::getHSZ() { return hString; } diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 723986ca042b..ea549b4d2eff 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -129,11 +129,11 @@ HDDEDATA CALLBACK DdeInternal::SvrCallback( if( !hText1 || s == reinterpret_cast(chTopicBuf) ) { DdeString aDStr( pInst->hDdeInstSvr, s ); - pTopic = FindTopic( *pService, (HSZ)aDStr ); + pTopic = FindTopic( *pService, aDStr.getHSZ() ); if( pTopic ) { - q->hszSvc = *pService->pName; - q->hszTopic = *pTopic->pName; + q->hszSvc = pService->pName->getHSZ(); + q->hszTopic = pTopic->pName->getHSZ(); q++; } } @@ -467,7 +467,7 @@ DdeService::DdeService( const OUString& rService ) pName = new DdeString( pInst->hDdeInstSvr, rService ); if ( nStatus == DMLERR_NO_ERROR ) { - if ( !DdeNameService( pInst->hDdeInstSvr, *pName, NULL, + if ( !DdeNameService( pInst->hDdeInstSvr, pName->getHSZ(), NULL, DNS_REGISTER | DNS_FILTEROFF ) ) { nStatus = DMLERR_SYS_ERROR; @@ -532,7 +532,7 @@ void DdeService::RemoveTopic( const DdeTopic& rTopic ) std::vector::iterator iter; for ( iter = aTopics.begin(); iter != aTopics.end(); ++iter ) { - if ( !DdeCmpStringHandles (*(*iter)->pName, *rTopic.pName ) ) + if ( !DdeCmpStringHandles ((*iter)->pName->getHSZ(), rTopic.pName->getHSZ() ) ) { aTopics.erase(iter); // Delete all conversions! @@ -647,7 +647,7 @@ void DdeTopic::RemoveItem( const DdeItem& r ) std::vector::iterator iter; for (iter = aItems.begin(); iter != aItems.end(); ++iter) { - if ( !DdeCmpStringHandles (*(*iter)->pName, *r.pName ) ) + if ( !DdeCmpStringHandles ((*iter)->pName->getHSZ(), r.pName->getHSZ() ) ) break; } @@ -668,7 +668,7 @@ void DdeTopic::NotifyClient( const OUString& rItem ) { if ( (*iter)->GetName().equals(rItem) && (*iter)->pImpData) { - DdePostAdvise( pInst->hDdeInstSvr, *pName, *(*iter)->pName ); + DdePostAdvise( pInst->hDdeInstSvr, pName->getHSZ(), (*iter)->pName->getHSZ() ); break; } } @@ -758,7 +758,7 @@ void DdeItem::NotifyClient() { DdeInstData* pInst = ImpGetInstData(); DBG_ASSERT(pInst,"SVDDE:No instance data"); - DdePostAdvise( pInst->hDdeInstSvr, *pMyTopic->pName, *pName ); + DdePostAdvise( pInst->hDdeInstSvr, pMyTopic->pName->getHSZ(), pName->getHSZ() ); } } -- cgit