diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-08 09:54:16 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-09 10:06:11 +0200 |
commit | 5906a2a6380dc8f748a3c6f4fa0778e237abdff2 (patch) | |
tree | 0c3f41c74e68229b1633973d25e96a8896d6e450 /include | |
parent | 7a39ae04220d70caef0335ed47452b36cd2e98c7 (diff) |
convert Link<> to typed
Change-Id: I184d836e944d6dcfd17233a7a83680f1c1bff9bf
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/fmobjfac.hxx | 2 | ||||
-rw-r--r-- | include/svx/galmisc.hxx | 8 | ||||
-rw-r--r-- | include/svx/objfac3d.hxx | 2 | ||||
-rw-r--r-- | include/svx/svdetc.hxx | 13 | ||||
-rw-r--r-- | include/svx/svdobj.hxx | 12 |
5 files changed, 18 insertions, 19 deletions
diff --git a/include/svx/fmobjfac.hxx b/include/svx/fmobjfac.hxx index 81b880102f10..c5eac5e51182 100644 --- a/include/svx/fmobjfac.hxx +++ b/include/svx/fmobjfac.hxx @@ -31,7 +31,7 @@ public: FmFormObjFactory(); ~FmFormObjFactory(); - DECL_STATIC_LINK(FmFormObjFactory, MakeObject, SdrObjFactory*); + DECL_STATIC_LINK_TYPED(FmFormObjFactory, MakeObject, SdrObjFactory*, void); }; #endif // _FM_FMOBJFAC_HXX diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index dce7dfa6b80a..56ff7d31afc1 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -64,8 +64,6 @@ enum SgaObjKind #define IV_IMAPINFO (sal_uInt32('S')*0x00000001+sal_uInt32('D')*0x00000100+sal_uInt32('U')*0x00010000+sal_uInt32('D')*0x01000000) #define ID_IMAPINFO 2 -#define USERDATA_HDL() (LINK(this,SgaUserDataFactory,MakeUserData)) - #define GAL_RES(nId) ResId(nId, *GetGalleryResMgr()) #define GAL_RESSTR(nId) GAL_RES(nId).toString() #define STREAMBUF_SIZE 16384L @@ -129,10 +127,10 @@ public: class SgaUserDataFactory { public: - SgaUserDataFactory() { SdrObjFactory::InsertMakeUserDataHdl( USERDATA_HDL() ); } - ~SgaUserDataFactory() { SdrObjFactory::RemoveMakeUserDataHdl( USERDATA_HDL() ); } + SgaUserDataFactory() { SdrObjFactory::InsertMakeUserDataHdl( LINK(this,SgaUserDataFactory,MakeUserData) ); } + ~SgaUserDataFactory() { SdrObjFactory::RemoveMakeUserDataHdl( LINK(this,SgaUserDataFactory,MakeUserData) ); } - DECL_STATIC_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory* ); + DECL_STATIC_LINK_TYPED( SgaUserDataFactory, MakeUserData, SdrObjFactory*, void ); }; class GraphicFilter; diff --git a/include/svx/objfac3d.hxx b/include/svx/objfac3d.hxx index 734dc529cefd..5b625f91dd32 100644 --- a/include/svx/objfac3d.hxx +++ b/include/svx/objfac3d.hxx @@ -40,7 +40,7 @@ public: E3dObjFactory(); ~E3dObjFactory(); - DECL_STATIC_LINK(E3dObjFactory, MakeObject, SdrObjFactory*); + DECL_STATIC_LINK_TYPED(E3dObjFactory, MakeObject, SdrObjFactory*, void); }; diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx index d69ea2a1146f..822a9be3e00f 100644 --- a/include/svx/svdetc.hxx +++ b/include/svx/svdetc.hxx @@ -173,21 +173,22 @@ public: }; +class SdrObjFactory; class SdrLinkList { - std::vector<Link<>*> aList; + std::vector<Link<SdrObjFactory*,void> > aList; protected: - unsigned FindEntry(const Link<>& rLink) const; + unsigned FindEntry(const Link<SdrObjFactory*,void>& rLink) const; public: SdrLinkList(): aList() {} ~SdrLinkList() { Clear(); } SVX_DLLPUBLIC void Clear(); unsigned GetLinkCount() const { return (unsigned)aList.size(); } - Link<>& GetLink(unsigned nNum) { return *aList[nNum]; } - const Link<>& GetLink(unsigned nNum) const { return *aList[nNum]; } - void InsertLink(const Link<>& rLink, unsigned nPos=0xFFFF); - void RemoveLink(const Link<>& rLink); + Link<SdrObjFactory*,void>& GetLink(unsigned nNum) { return aList[nNum]; } + const Link<SdrObjFactory*,void>& GetLink(unsigned nNum) const { return aList[nNum]; } + void InsertLink(const Link<SdrObjFactory*,void>& rLink, unsigned nPos=0xFFFF); + void RemoveLink(const Link<SdrObjFactory*,void>& rLink); }; SdrLinkList& ImpGetUserMakeObjHdl(); diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 830cfed95246..50bec71e3ecd 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -992,8 +992,8 @@ private: class SVX_DLLPUBLIC SdrObjFactory { public: - sal_uInt32 nInventor; - sal_uInt16 nIdentifier; + sal_uInt32 nInventor; + sal_uInt16 nIdentifier; // for MakeNewObj(): SdrPage* pPage; @@ -1014,10 +1014,10 @@ private: public: static SdrObject* MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pPage, SdrModel* pModel=NULL); static SdrObject* MakeNewObject( sal_uInt32 nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage ); - static void InsertMakeObjectHdl(const Link<>& rLink); - static void RemoveMakeObjectHdl(const Link<>& rLink); - static void InsertMakeUserDataHdl(const Link<>& rLink); - static void RemoveMakeUserDataHdl(const Link<>& rLink); + static void InsertMakeObjectHdl(const Link<SdrObjFactory*,void>& rLink); + static void RemoveMakeObjectHdl(const Link<SdrObjFactory*,void>& rLink); + static void InsertMakeUserDataHdl(const Link<SdrObjFactory*,void>& rLink); + static void RemoveMakeUserDataHdl(const Link<SdrObjFactory*,void>& rLink); }; typedef tools::WeakReference< SdrObject > SdrObjectWeakRef; |