diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-26 16:37:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-26 16:39:26 +0100 |
commit | 70cc2b191b95fbc210bc1f0f6a7159f341894f0f (patch) | |
tree | a70f4957c454b443520cbf91250c41d9eea80017 /include/basic | |
parent | 8757bea2e88c6e349e1fe98d8e9695d7b9c6179e (diff) |
First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.
Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
Diffstat (limited to 'include/basic')
-rw-r--r-- | include/basic/modsizeexceeded.hxx | 4 | ||||
-rw-r--r-- | include/basic/sbmeth.hxx | 8 | ||||
-rw-r--r-- | include/basic/sbmod.hxx | 18 | ||||
-rw-r--r-- | include/basic/sbstar.hxx | 16 | ||||
-rw-r--r-- | include/basic/sbx.hxx | 40 | ||||
-rw-r--r-- | include/basic/sbxcore.hxx | 10 | ||||
-rw-r--r-- | include/basic/sbxmeth.hxx | 2 | ||||
-rw-r--r-- | include/basic/sbxobj.hxx | 12 | ||||
-rw-r--r-- | include/basic/sbxprop.hxx | 2 | ||||
-rw-r--r-- | include/basic/sbxvar.hxx | 24 |
10 files changed, 69 insertions, 67 deletions
diff --git a/include/basic/modsizeexceeded.hxx b/include/basic/modsizeexceeded.hxx index fae9ffc05196..7b6a12769c46 100644 --- a/include/basic/modsizeexceeded.hxx +++ b/include/basic/modsizeexceeded.hxx @@ -35,8 +35,8 @@ class BASIC_DLLPUBLIC ModuleSizeExceeded : public ::cppu::WeakImplHelper1< ::com // UNO interface public: - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException, std::exception ) { return m_lContinuations; } - com::sun::star::uno::Any SAL_CALL getRequest() throw( com::sun::star::uno::RuntimeException, std::exception ) + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE { return m_lContinuations; } + com::sun::star::uno::Any SAL_CALL getRequest() throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE { return m_aRequest; } diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx index 1b2ab4c84736..134748041306 100644 --- a/include/basic/sbmeth.hxx +++ b/include/basic/sbmeth.hxx @@ -46,14 +46,14 @@ class BASIC_DLLPUBLIC SbMethod : public SbxMethod SbxArrayRef refStatics; BASIC_DLLPRIVATE SbMethod( const OUString&, SbxDataType, SbModule* ); BASIC_DLLPRIVATE SbMethod( const SbMethod& ); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; virtual ~SbMethod(); public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMETHOD,2); TYPEINFO_OVERRIDE(); - virtual SbxInfo* GetInfo(); + virtual SbxInfo* GetInfo() SAL_OVERRIDE; SbxArray* GetStatics(); void ClearStatics(); SbModule* GetModule() { return pMod; } @@ -64,7 +64,7 @@ public: // Interface to execute a method from the applications virtual ErrCode Call( SbxValue* pRet = NULL, SbxVariable* pCaller = NULL ); - virtual void Broadcast( sal_uIntPtr nHintId ); + virtual void Broadcast( sal_uIntPtr nHintId ) SAL_OVERRIDE; }; SV_DECL_IMPL_REF(SbMethod) diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx index 6d67e8c9e760..e1cc3ea62a54 100644 --- a/include/basic/sbmod.hxx +++ b/include/basic/sbmod.hxx @@ -85,21 +85,21 @@ protected: const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16& ) const; const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16&, sal_Bool bFollowJumps, const SbiImage* pImg=NULL ) const; - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; - virtual sal_Bool LoadCompleted(); + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; + virtual sal_Bool LoadCompleted() SAL_OVERRIDE; virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, - const SfxHint& rHint, const TypeId& rHintType ); + const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint ); virtual ~SbModule(); public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2); TYPEINFO_OVERRIDE(); SbModule( const OUString&, sal_Bool bCompat = sal_False ); - virtual void SetParent( SbxObject* ); - virtual void Clear(); + virtual void SetParent( SbxObject* ) SAL_OVERRIDE; + virtual void Clear() SAL_OVERRIDE; - virtual SbxVariable* Find( const OUString&, SbxClassType ); + virtual SbxVariable* Find( const OUString&, SbxClassType ) SAL_OVERRIDE; virtual const OUString& GetSource() const; const OUString& GetSource32() const; @@ -153,9 +153,9 @@ public: ~SbClassModuleObject(); // Overridden to support NameAccess etc. - virtual SbxVariable* Find( const OUString&, SbxClassType ); + virtual SbxVariable* Find( const OUString&, SbxClassType ) SAL_OVERRIDE; - virtual void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); + virtual void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ) SAL_OVERRIDE; SbModule* getClassModule( void ) { return mpClassModule; } diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx index d24c80369861..bf63b6cd1232 100644 --- a/include/basic/sbstar.hxx +++ b/include/basic/sbstar.hxx @@ -75,8 +75,8 @@ private: BASIC_DLLPRIVATE sal_Bool RTError( SbError, const OUString& rMsg, sal_Int32, sal_Int32, sal_Int32 ); BASIC_DLLPRIVATE sal_uInt16 BreakPoint( sal_Int32 nLine, sal_Int32 nCol1, sal_Int32 nCol2 ); BASIC_DLLPRIVATE sal_uInt16 StepPoint( sal_Int32 nLine, sal_Int32 nCol1, sal_Int32 nCol2 ); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; protected: virtual sal_Bool ErrorHdl(); @@ -92,15 +92,15 @@ public: // #51727 SetModified overridden so that the Modfied-State is // not delivered to Parent. - virtual void SetModified( sal_Bool ); + virtual void SetModified( sal_Bool ) SAL_OVERRIDE; void* operator new( size_t ); void operator delete( void* ); - virtual void Insert( SbxVariable* ); + virtual void Insert( SbxVariable* ) SAL_OVERRIDE; using SbxObject::Remove; - virtual void Remove( SbxVariable* ); - virtual void Clear(); + virtual void Remove( SbxVariable* ) SAL_OVERRIDE; + virtual void Clear() SAL_OVERRIDE; BasicLibInfo* GetLibInfo() { return pLibInfo; } void SetLibInfo( BasicLibInfo* p ) { pLibInfo = p; } @@ -121,8 +121,8 @@ public: static OUString GetErrorMsg(); static sal_Int32 GetErl(); - virtual SbxVariable* Find( const OUString&, SbxClassType ); - virtual sal_Bool Call( const OUString&, SbxArray* = NULL ); + virtual SbxVariable* Find( const OUString&, SbxClassType ) SAL_OVERRIDE; + virtual sal_Bool Call( const OUString&, SbxArray* = NULL ) SAL_OVERRIDE; SbxArray* GetModules() { return pModules; } SbxObject* GetRtl() { return pRtl; } diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx index 949a1d3e9c60..ab97b8c345d4 100644 --- a/include/basic/sbx.hxx +++ b/include/basic/sbx.hxx @@ -103,9 +103,9 @@ class BASIC_DLLPUBLIC SbxAlias : public SbxVariable, public SfxListener { SbxVariableRef xAlias; virtual ~SbxAlias(); - virtual void Broadcast( sal_uIntPtr ); + virtual void Broadcast( sal_uIntPtr ) SAL_OVERRIDE; virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, - const SfxHint& rHint, const TypeId& rHintType ); + const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; public: SbxAlias( const SbxAlias& ); SbxAlias& operator=( const SbxAlias& ); @@ -131,8 +131,8 @@ class BASIC_DLLPUBLIC SbxArray : public SbxBase protected: SbxDataType eType; // Data type of the array virtual ~SbxArray(); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_ARRAY,1); @@ -140,10 +140,10 @@ public: SbxArray( SbxDataType=SbxVARIANT ); SbxArray( const SbxArray& ); SbxArray& operator=( const SbxArray& ); - virtual void Clear(); + virtual void Clear() SAL_OVERRIDE; sal_uInt16 Count() const; - virtual SbxDataType GetType() const; - virtual SbxClassType GetClass() const; + virtual SbxDataType GetType() const SAL_OVERRIDE; + virtual SbxClassType GetClass() const SAL_OVERRIDE; SbxVariableRef& GetRef( sal_uInt16 ); SbxVariable* Get( sal_uInt16 ); void Put( SbxVariable*, sal_uInt16 ); @@ -178,8 +178,8 @@ protected: sal_uInt16 Offset( const short* ); sal_uInt32 Offset32( const sal_Int32* ); sal_uInt32 Offset32( SbxArray* ); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; virtual ~SbxDimArray(); public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DIMARRAY,1); @@ -187,7 +187,7 @@ public: SbxDimArray( SbxDataType=SbxVARIANT ); SbxDimArray( const SbxDimArray& ); SbxDimArray& operator=( const SbxDimArray& ); - virtual void Clear(); + virtual void Clear() SAL_OVERRIDE; using SbxArray::GetRef; using SbxArray::Get; SbxVariable* Get( const short* ); @@ -217,9 +217,9 @@ class BASIC_DLLPUBLIC SbxCollection : public SbxObject BASIC_DLLPRIVATE void Initialize(); protected: virtual ~SbxCollection(); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, - const SfxHint& rHint, const TypeId& rHintType ); + const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; // Overridable methods (why not pure virtual?): virtual void CollAdd( SbxArray* pPar ); virtual void CollItem( SbxArray* pPar ); @@ -231,9 +231,9 @@ public: SbxCollection( const OUString& rClassname ); SbxCollection( const SbxCollection& ); SbxCollection& operator=( const SbxCollection& ); - virtual SbxVariable* FindUserData( sal_uInt32 nUserData ); - virtual SbxVariable* Find( const OUString&, SbxClassType ); - virtual void Clear(); + virtual SbxVariable* FindUserData( sal_uInt32 nUserData ) SAL_OVERRIDE; + virtual SbxVariable* Find( const OUString&, SbxClassType ) SAL_OVERRIDE; + virtual void Clear() SAL_OVERRIDE; }; class BASIC_DLLPUBLIC SbxStdCollection : public SbxCollection @@ -242,17 +242,17 @@ protected: OUString aElemClass; sal_Bool bAddRemoveOk; virtual ~SbxStdCollection(); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; - virtual void CollAdd( SbxArray* pPar ); - virtual void CollRemove( SbxArray* pPar ); + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; + virtual void CollAdd( SbxArray* pPar ) SAL_OVERRIDE; + virtual void CollRemove( SbxArray* pPar ) SAL_OVERRIDE; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_FIXCOLLECTION,1); TYPEINFO_OVERRIDE(); SbxStdCollection( const OUString& rClassname, const OUString& rElemClass, sal_Bool=sal_True ); SbxStdCollection( const SbxStdCollection& ); SbxStdCollection& operator=( const SbxStdCollection& ); - virtual void Insert( SbxVariable* ); + virtual void Insert( SbxVariable* ) SAL_OVERRIDE; const OUString& GetElementClass() const { return aElemClass; } }; diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx index 78208982c8f5..c7c240d38da7 100644 --- a/include/basic/sbxcore.hxx +++ b/include/basic/sbxcore.hxx @@ -36,15 +36,17 @@ class SvStream; // This version of the Macros does not define Load/StorePrivateData()-methods #define SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer ) \ - virtual sal_uInt32 GetCreator() const { return nCre; } \ - virtual sal_uInt16 GetVersion() const { return nVer; } \ - virtual sal_uInt16 GetSbxId() const { return nSbxId; } + virtual sal_uInt32 GetCreator() const SAL_OVERRIDE { return nCre; } \ + virtual sal_uInt16 GetVersion() const SAL_OVERRIDE { return nVer; } \ + virtual sal_uInt16 GetSbxId() const SAL_OVERRIDE { return nSbxId; } // This version of the macro defines Load/StorePrivateData()-methods #define SBX_DECL_PERSIST( nCre, nSbxId, nVer ) \ virtual sal_Bool LoadPrivateData( SvStream&, sal_uInt16 ); \ virtual sal_Bool StorePrivateData( SvStream& ) const; \ - SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer ) + virtual sal_uInt32 GetCreator() const { return nCre; } \ + virtual sal_uInt16 GetVersion() const { return nVer; } \ + virtual sal_uInt16 GetSbxId() const { return nSbxId; } class SbxBase; class SbxFactory; diff --git a/include/basic/sbxmeth.hxx b/include/basic/sbxmeth.hxx index 2c07361ac9d7..c442bacaebc1 100644 --- a/include/basic/sbxmeth.hxx +++ b/include/basic/sbxmeth.hxx @@ -32,7 +32,7 @@ public: SbxMethod( const SbxMethod& r ); ~SbxMethod(); SbxMethod& operator=( const SbxMethod& r ) { SbxVariable::operator=( r ); return *this; } - virtual SbxClassType GetClass() const; + virtual SbxClassType GetClass() const SAL_OVERRIDE; }; #endif diff --git a/include/basic/sbxobj.hxx b/include/basic/sbxobj.hxx index 6a06cca53570..57c92bfd2eb8 100644 --- a/include/basic/sbxobj.hxx +++ b/include/basic/sbxobj.hxx @@ -37,20 +37,20 @@ protected: SbxProperty* pDfltProp; // Default-Property OUString aClassName; // Classname OUString aDfltPropName; - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; virtual ~SbxObject(); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, - const SfxHint& rHint, const TypeId& rHintType ); + const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_OBJECT,1); TYPEINFO_OVERRIDE(); SbxObject( const OUString& rClassname ); SbxObject( const SbxObject& ); SbxObject& operator=( const SbxObject& ); - virtual SbxDataType GetType() const; - virtual SbxClassType GetClass() const; - virtual void Clear(); + virtual SbxDataType GetType() const SAL_OVERRIDE; + virtual SbxClassType GetClass() const SAL_OVERRIDE; + virtual void Clear() SAL_OVERRIDE; virtual sal_Bool IsClass( const OUString& ) const; const OUString& GetClassName() const { return aClassName; } diff --git a/include/basic/sbxprop.hxx b/include/basic/sbxprop.hxx index a58616ed900b..3a9cd23c2545 100644 --- a/include/basic/sbxprop.hxx +++ b/include/basic/sbxprop.hxx @@ -33,7 +33,7 @@ public: virtual ~SbxProperty(); SbxProperty& operator=( const SbxProperty& r ) { SbxVariable::operator=( r ); return *this; } - virtual SbxClassType GetClass() const; + virtual SbxClassType GetClass() const SAL_OVERRIDE; }; SV_DECL_REF(SbxProperty) diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index 04a88eb15265..686577ac0a74 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -99,8 +99,8 @@ protected: virtual void Broadcast( sal_uIntPtr ); // Broadcast-Call virtual ~SbxValue(); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VALUE,1); TYPEINFO_OVERRIDE(); @@ -108,8 +108,8 @@ public: SbxValue( SbxDataType, void* = NULL ); SbxValue( const SbxValue& ); SbxValue& operator=( const SbxValue& ); - virtual void Clear(); - virtual sal_Bool IsFixed() const; + virtual void Clear() SAL_OVERRIDE; + virtual sal_Bool IsFixed() const SAL_OVERRIDE; sal_Bool IsInteger() const { return sal_Bool( GetType() == SbxINTEGER ); } sal_Bool IsLong() const { return sal_Bool( GetType() == SbxLONG ); } @@ -135,8 +135,8 @@ public: sal_Bool IsNumericRTL() const; // #41692 Interface for Basic sal_Bool ImpIsNumeric( bool bOnlyIntntl ) const; // Implementation - virtual SbxClassType GetClass() const; - virtual SbxDataType GetType() const; + virtual SbxClassType GetClass() const SAL_OVERRIDE; + virtual SbxDataType GetType() const SAL_OVERRIDE; SbxDataType GetFullType() const; sal_Bool SetType( SbxDataType ); @@ -300,8 +300,8 @@ protected: sal_uIntPtr nUserData; // User data for Call() SbxObject* pParent; // Currently attached object virtual ~SbxVariable(); - virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); - virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; + virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VARIABLE,2); TYPEINFO_OVERRIDE(); @@ -316,13 +316,13 @@ public: virtual const OUString& GetName( SbxNameType = SbxNAME_NONE ) const; sal_uInt16 GetHashCode() const { return nHash; } - virtual void SetModified( sal_Bool ); + virtual void SetModified( sal_Bool ) SAL_OVERRIDE; sal_uIntPtr GetUserData() const { return nUserData; } void SetUserData( sal_uIntPtr n ) { nUserData = n; } - virtual SbxDataType GetType() const; - virtual SbxClassType GetClass() const; + virtual SbxDataType GetType() const SAL_OVERRIDE; + virtual SbxClassType GetClass() const SAL_OVERRIDE; // Parameter-Interface virtual SbxInfo* GetInfo(); @@ -334,7 +334,7 @@ public: // Due to data reduction and better DLL-hierarchie currently via casting SfxBroadcaster& GetBroadcaster(); sal_Bool IsBroadcaster() const { return sal_Bool( pCst != NULL ); } - virtual void Broadcast( sal_uIntPtr nHintId ); + virtual void Broadcast( sal_uIntPtr nHintId ) SAL_OVERRIDE; inline const SbxObject* GetParent() const { return pParent; } SbxObject* GetParent(); |