From 006b71d4e9caebb9a0f76688f129b490aa778188 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 13 Sep 2011 13:35:35 +0100 Subject: move init into default ctor, and make non-copyable --- svl/source/svdde/ddecli.cxx | 8 -------- svl/source/svdde/ddeimp.hxx | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'svl') diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index fa0192830d80..0edab7f2e96c 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -43,14 +43,6 @@ DdeInstData* ImpInitInstData() { DdeInstData* pData = new DdeInstData; - pData->nRefCount = 0; - pData->aConnections.clear(); - pData->hCurConvSvr = 0; - pData->hDdeInstSvr = 0; - pData->nInstanceSvr = 0; - pData->pServicesSvr = NULL; - pData->hDdeInstCli = 0; - pData-> nInstanceCli = 0; DdeInstData** ppInst = (DdeInstData**)GetAppData( SHL_SVDDE ); *ppInst = pData; diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx index d3b7d84221bd..a6f7cd5d832c 100644 --- a/svl/source/svdde/ddeimp.hxx +++ b/svl/source/svdde/ddeimp.hxx @@ -34,6 +34,7 @@ #include #include +#include #include class DdeService; @@ -122,8 +123,9 @@ struct DdeDataImp class DdeConnection; class DdeServices; -struct DdeInstData +class DdeInstData : private boost::noncopyable { +public: sal_uInt16 nRefCount; std::vector aConnections; // Server @@ -134,6 +136,17 @@ struct DdeInstData // Client DWORD hDdeInstCli; short nInstanceCli; + + DdeInstData() + : nRefCount(0) + , hCurConvSvr(0) + , hDdeInstSvr(0) + , nInstanceSvr(0) + , pServicesSvr(NULL) + , hDdeInstCli(0) + , nInstanceCli(0) + { + } }; #ifndef SHL_SVDDE -- cgit