diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx index d90dbed606e7..2415ad8e03ba 100644 --- a/include/svl/svdde.hxx +++ b/include/svl/svdde.hxx @@ -180,7 +180,7 @@ class SVL_DLLPUBLIC DdeConnection std::vector aTransactions; DdeString* pService; DdeString* pTopic; - DdeImp* pImp; + std::unique_ptr pImp; public: DdeConnection( SAL_UNUSED_PARAMETER const OUString&, SAL_UNUSED_PARAMETER const OUString& ); diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index 5707b0c40878..d97a9cdf4fe6 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -23,7 +23,7 @@ #include #include "ddeimp.hxx" #include - +#include #include #include @@ -144,9 +144,9 @@ HDDEDATA CALLBACK DdeInternal::CliCallback( UINT nCode, UINT nCbType, return nRet; } -DdeConnection::DdeConnection( const OUString& rService, const OUString& rTopic ) +DdeConnection::DdeConnection( const OUString& rService, const OUString& rTopic ): + pImp(o3tl::make_unique()) { - pImp = new DdeImp; pImp->nStatus = DMLERR_NO_ERROR; pImp->hConv = nullptr; @@ -206,7 +206,6 @@ DdeConnection::~DdeConnection() ImpDeinitInstData(); } } - delete pImp; } bool DdeConnection::IsConnected() diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 7f032ef20446..856d79dc5db2 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -77,6 +77,8 @@ void const * DdeData::getData() const return nullptr; } +struct DdeImp {}; + long DdeConnection::GetError() { return 0L;