diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-07 13:51:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-07 13:52:47 +0200 |
commit | 7e68c64c1ed2cd14ccb4cf259831089c1aeb43b2 (patch) | |
tree | 697d2162fde229d6bc4fa8fba113b878ec019cf2 /svl | |
parent | 98ecb80ad8601b03509cb791b2db845350ac8d2d (diff) |
Make _WIN32-only DDE code use proper HCONV
...instead of various integer types. Revealed that the GetConvId functions were
unused.
Change-Id: I6c6427bd8c14166e58bed3405084e3919bdc97f9
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/svdde/ddecli.cxx | 5 | ||||
-rw-r--r-- | svl/source/svdde/ddeimp.hxx | 2 | ||||
-rw-r--r-- | svl/source/svdde/ddesvr.cxx | 28 |
3 files changed, 8 insertions, 27 deletions
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index b6e562616b19..d81d57c65259 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -236,11 +236,6 @@ const OUString DdeConnection::GetTopicName() return pTopic->toOUString(); } -sal_IntPtr DdeConnection::GetConvId() -{ - return (sal_IntPtr)pImp->hConv; -} - const std::vector<DdeConnection*>& DdeConnection::GetConnections() { DdeInstData* pInst = ImpGetInstData(); diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx index 95848172d952..492f1dc74f17 100644 --- a/svl/source/svdde/ddeimp.hxx +++ b/svl/source/svdde/ddeimp.hxx @@ -87,7 +87,6 @@ public: sal_uInt16 nRefCount; std::vector<DdeConnection*> aConnections; // Server - sal_IntPtr hCurConvSvr; DWORD hDdeInstSvr; short nInstanceSvr; DdeServices* pServicesSvr; @@ -97,7 +96,6 @@ public: DdeInstData() : nRefCount(0) - , hCurConvSvr(0) , hDdeInstSvr(0) , nInstanceSvr(0) , pServicesSvr(NULL) diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index ea549b4d2eff..36070360ea8f 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -36,10 +36,10 @@ enum DdeItemType struct DdeItemImpData { - sal_uLong nHCnv; + HCONV nHCnv; sal_uInt16 nCnt; - explicit DdeItemImpData( sal_uLong nH ) : nHCnv( nH ), nCnt( 1 ) {} + explicit DdeItemImpData( HCONV nH ) : nHCnv( nH ), nCnt( 1 ) {} }; class DdeItemImp { @@ -194,7 +194,7 @@ HDDEDATA CALLBACK DdeInternal::SvrCallback( found: if ( nCode == XTYP_DISCONNECT) { - pC->pTopic->Disconnect( (sal_IntPtr) hConv ); + pC->pTopic->Disconnect( hConv ); for ( ConvList::iterator it = pService->pConv->begin(); it != pService->pConv->end(); ++it @@ -226,7 +226,6 @@ found: (pTopic->aItem).clear(); bool bRes = false; - pInst->hCurConvSvr = (sal_IntPtr)hConv; switch( nCode ) { case XTYP_REQUEST: @@ -287,7 +286,6 @@ found: else bRes = pTopic->Put( &d ); } - pInst->hCurConvSvr = 0; if ( bRes ) return (HDDEDATA)DDE_FACK; else @@ -328,15 +326,13 @@ found: if (pItem) { - pItem->IncMonitor( (sal_IntPtr)hConv ); - pInst->hCurConvSvr = 0; + pItem->IncMonitor( hConv ); } } return (HDDEDATA)sal_True; case XTYP_ADVSTOP: - pItem->DecMonitor( (sal_IntPtr)hConv ); - pInst->hCurConvSvr = 0; + pItem->DecMonitor( hConv ); return (HDDEDATA)sal_True; case XTYP_EXECUTE: @@ -354,7 +350,6 @@ found: else bRes = pTopic->Execute( &aName ); } - pInst->hCurConvSvr = 0; if ( bRes ) return (HDDEDATA)DDE_FACK; else @@ -674,7 +669,7 @@ void DdeTopic::NotifyClient( const OUString& rItem ) } } -void DdeTopic::Disconnect( sal_IntPtr nId ) +void DdeTopic::Disconnect( HCONV nId ) { std::vector<DdeItem*>::iterator iter; for (iter = aItems.begin(); iter != aItems.end(); ++iter) @@ -696,13 +691,6 @@ bool DdeTopic::Execute( const OUString* ) return false; } -long DdeTopic::GetConvId() -{ - DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); - return pInst->hCurConvSvr; -} - bool DdeTopic::StartAdviseLoop() { return false; @@ -762,7 +750,7 @@ void DdeItem::NotifyClient() } } -void DdeItem::IncMonitor( sal_uLong nHCnv ) +void DdeItem::IncMonitor( HCONV nHCnv ) { if( !pImpData ) { @@ -783,7 +771,7 @@ void DdeItem::IncMonitor( sal_uLong nHCnv ) pImpData->push_back( DdeItemImpData( nHCnv ) ); } -void DdeItem::DecMonitor( sal_uLong nHCnv ) +void DdeItem::DecMonitor( HCONV nHCnv ) { if( pImpData ) { |