diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-13 13:24:28 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-08-14 07:15:01 +0000 |
commit | adbc556c91ea4afaf3e952aa0a8329e004add63e (patch) | |
tree | b5d03e056f129abcddf6a53934db07ec611ac19f /include | |
parent | c8f0b37528b69b77dbe8596915e34fd915e34b8d (diff) |
make Link<> instances typed
and remove some unused code
Change-Id: I934824401b5c528b07ad76f753f78440c4492885
Reviewed-on: https://gerrit.libreoffice.org/17703
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/svdde.hxx | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx index a616268b5a75..9889774f3226 100644 --- a/include/svl/svdde.hxx +++ b/include/svl/svdde.hxx @@ -98,8 +98,8 @@ protected: short nType; sal_IntPtr nId; sal_IntPtr nTime; - Link<> aData; - Link<> aDone; + Link<const DdeData*,void> aData; + Link<bool,void> aDone; bool bBusy; DdeTransaction( DdeConnection&, SAL_UNUSED_PARAMETER const OUString&, SAL_UNUSED_PARAMETER long = 0 ); @@ -112,11 +112,11 @@ public: void Execute(); - void SetDataHdl( const Link<>& rLink ) { aData = rLink; } - const Link<>& GetDataHdl() const { return aData; } + void SetDataHdl( const Link<const DdeData*,void>& rLink ) { aData = rLink; } + const Link<const DdeData*,void>& GetDataHdl() const { return aData; } - void SetDoneHdl( const Link<>& rLink ) { aDone = rLink; } - const Link<>& GetDoneHdl() const { return aDone; } + void SetDoneHdl( const Link<bool,void>& rLink ) { aDone = rLink; } + const Link<bool,void>& GetDoneHdl() const { return aDone; } void SetFormat( SotClipboardFormatId nFmt ) { aDdeData.SetFormat( nFmt ); } SotClipboardFormatId GetFormat() const { return aDdeData.GetFormat(); } @@ -138,14 +138,14 @@ private: class SVL_DLLPUBLIC DdeLink : public DdeTransaction { - Link<> aNotify; + Link<void*,void> aNotify; public: DdeLink( DdeConnection&, const OUString&, long = 0 ); virtual ~DdeLink(); - void SetNotifyHdl( const Link<>& rLink ) { aNotify = rLink; } - const Link<>& GetNotifyHdl() const { return aNotify; } + void SetNotifyHdl( const Link<void*,void>& rLink ) { aNotify = rLink; } + const Link<void*,void>& GetNotifyHdl() const { return aNotify; } void Notify(); }; @@ -288,8 +288,6 @@ class SVL_DLLPUBLIC DdeTopic SVL_DLLPRIVATE void _Disconnect( sal_IntPtr ); public: - void Connect( sal_IntPtr ); - void Disconnect( sal_IntPtr ); virtual DdeData* Get(SotClipboardFormatId); virtual bool Put( const DdeData* ); virtual bool Execute( const OUString* ); @@ -306,40 +304,24 @@ private: friend class DdeItem; private: - DdeString* pName; - OUString aItem; + DdeString* pName; + OUString aItem; std::vector<DdeItem*> aItems; - Link<> aConnectLink; - Link<> aDisconnectLink; - Link<> aGetLink; - Link<> aPutLink; - Link<> aExecLink; public: DdeTopic( SAL_UNUSED_PARAMETER const OUString& ); virtual ~DdeTopic(); - const OUString GetName() const; + const OUString GetName() const; long GetConvId(); - void SetConnectHdl( const Link<>& rLink ) { aConnectLink = rLink; } - const Link<>& GetConnectHdl() const { return aConnectLink; } - void SetDisconnectHdl( const Link<>& rLink ) { aDisconnectLink = rLink; } - const Link<>& GetDisconnectHdl() const { return aDisconnectLink; } - void SetGetHdl( const Link<>& rLink ) { aGetLink = rLink; } - const Link<>& GetGetHdl() const { return aGetLink; } - void SetPutHdl( const Link<>& rLink ) { aPutLink = rLink; } - const Link<>& GetPutHdl() const { return aPutLink; } - void SetExecuteHdl( const Link<>& rLink ) { aExecLink = rLink; } - const Link<>& GetExecuteHdl() const { return aExecLink; } - void NotifyClient( const OUString& ); bool IsSystemTopic(); void InsertItem( DdeItem* ); // For own superclasses DdeItem* AddItem( const DdeItem& ); // Will be cloned void RemoveItem( const DdeItem& ); - const OUString& GetCurItem() { return aItem; } + const OUString& GetCurItem() { return aItem; } const std::vector<DdeItem*>& GetItems() const { return aItems; } private: |