summaryrefslogtreecommitdiff
path: root/svl/source/svdde
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-13 13:35:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-13 13:35:35 +0100
commit006b71d4e9caebb9a0f76688f129b490aa778188 (patch)
tree4f6bce8c1900f572b03ebd1bb0441db88af2c8dd /svl/source/svdde
parent2240a98e68db581993621451701e3e47495895e4 (diff)
move init into default ctor, and make non-copyable
Diffstat (limited to 'svl/source/svdde')
-rw-r--r--svl/source/svdde/ddecli.cxx8
-rw-r--r--svl/source/svdde/ddeimp.hxx15
2 files changed, 14 insertions, 9 deletions
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 <tools/string.hxx>
#include <tools/shl.hxx>
+#include <boost/noncopyable.hpp>
#include <vector>
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<DdeConnection*> 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