From 5fb78604c1c3e91beb867c352928af9e1ef57a26 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 26 Mar 2014 11:54:10 +0100 Subject: Split TYPEINFO into plain and TYPEINFO_OVERRIDE ...where the latter contains SAL_OVERRIDE annotations Change-Id: Id64794b388d83dfe7026440e8b20a5b5efd412d1 --- include/tools/errinf.hxx | 8 ++++---- include/tools/pstm.hxx | 2 +- include/tools/rtti.hxx | 7 +++++++ include/tools/stream.hxx | 4 ++-- 4 files changed, 14 insertions(+), 7 deletions(-) (limited to 'include/tools') diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx index 3b0ec00d798c..89155398e59e 100644 --- a/include/tools/errinf.hxx +++ b/include/tools/errinf.hxx @@ -57,7 +57,7 @@ private: EDcr_Impl* pImpl; public: - TYPEINFO(); + TYPEINFO_OVERRIDE(); DynamicErrorInfo(sal_uIntPtr lUserId, sal_uInt16 nMask); virtual ~DynamicErrorInfo(); @@ -72,7 +72,7 @@ private: OUString aString; public: - TYPEINFO(); + TYPEINFO_OVERRIDE(); StringErrorInfo( sal_uIntPtr lUserId, const OUString& aStringP, @@ -87,7 +87,7 @@ private: OUString aArg2; public: - TYPEINFO(); + TYPEINFO_OVERRIDE(); TwoStringErrorInfo(sal_uIntPtr nUserID, const OUString & rTheArg1, const OUString & rTheArg2, sal_uInt16 nFlags = 0): @@ -102,7 +102,7 @@ public: class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo { public: - TYPEINFO(); + TYPEINFO_OVERRIDE(); MessageInfo(sal_uIntPtr UserId, sal_uInt16 nFlags = 0) : DynamicErrorInfo(UserId, nFlags) {} diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx index 660fb3145132..14d14493e95c 100644 --- a/include/tools/pstm.hxx +++ b/include/tools/pstm.hxx @@ -54,7 +54,7 @@ public: SV_DECL_IMPL_REF(SvRttiBase) #define SV_DECL_PERSIST( Class, CLASS_ID ) \ - TYPEINFO(); \ + TYPEINFO_OVERRIDE(); \ static sal_Int32 StaticClassId() { return CLASS_ID; } \ static void * CreateInstance( SvPersistBase ** ppBase ); \ friend SvPersistStream& operator >> ( SvPersistStream & rStm, \ diff --git a/include/tools/rtti.hxx b/include/tools/rtti.hxx index 3e2676baa7c8..83bd5671d40c 100644 --- a/include/tools/rtti.hxx +++ b/include/tools/rtti.hxx @@ -32,6 +32,13 @@ typedef void* (*TypeId)(); virtual TypeId Type() const; \ virtual bool IsA( TypeId aSameOrSuperType ) const +#define TYPEINFO_OVERRIDE() \ + static void* CreateType(); \ + static TypeId StaticType(); \ + static bool IsOf( TypeId aSameOrSuperType ); \ + virtual TypeId Type() const SAL_OVERRIDE; \ + virtual bool IsA( TypeId aSameOrSuperType ) const SAL_OVERRIDE + #define TYPEINFO_VISIBILITY(visibility) \ visibility static void* CreateType(); \ visibility static TypeId StaticType(); \ diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index e7760fdbe4a1..3eb2fd4ea279 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -148,7 +148,7 @@ SV_DECL_IMPL_REF(SvLockBytes); class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes { public: - TYPEINFO(); + TYPEINFO_OVERRIDE(); SvOpenLockBytes() : SvLockBytes(0, false) {} SvOpenLockBytes(SvStream * pStream, bool bOwner): @@ -174,7 +174,7 @@ class SvAsyncLockBytes: public SvOpenLockBytes bool m_bTerminated; public: - TYPEINFO(); + TYPEINFO_OVERRIDE(); SvAsyncLockBytes(SvStream * pStream, bool bOwner): SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(false) {} -- cgit