[Libreoffice-commits] core.git: svl/source

Stephan Bergmann sbergman at redhat.com
Thu Oct 6 11:07:57 UTC 2016


 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(-)

New commits:
commit 65b1fee217f03dcaff498ba21fac77ef8a320a0b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Oct 6 13:05:05 2016 +0200

    Replace DdeString conversion opreator with proper function
    
    Change-Id: Ia6a9b40ea33dd9bff8322d8cff1692926f6d1db0

diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx
index b46d80c..b6e5626 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 6c7b3d3..9584817 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 40287da..e224b83 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 723986c..ea549b4 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<const sal_Unicode*>(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<DdeTopic*>::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<DdeItem*>::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() );
     }
 }
 


More information about the Libreoffice-commits mailing list