diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-20 12:38:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-26 08:42:28 +0200 |
commit | b44cbb26efe1d0b0950b1e1613e131b506dc3876 (patch) | |
tree | 9b4d5d99e5dad0971079b997a02a6d96536709ca /include/sot | |
parent | 26ad60aec69310fecd918f1c2e09056aa4782320 (diff) |
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
Diffstat (limited to 'include/sot')
-rw-r--r-- | include/sot/factory.hxx | 2 | ||||
-rw-r--r-- | include/sot/object.hxx | 2 | ||||
-rw-r--r-- | include/sot/storage.hxx | 44 |
3 files changed, 24 insertions, 24 deletions
diff --git a/include/sot/factory.hxx b/include/sot/factory.hxx index 60094b4772d8..e08847b93f30 100644 --- a/include/sot/factory.hxx +++ b/include/sot/factory.hxx @@ -58,7 +58,7 @@ public: const OUString & rClassName, CreateInstanceType ); void PutSuperClass( const SotFactory * ); - virtual void * CreateInstance( SotObject ** ppObj = NULL ) const; + void * CreateInstance( SotObject ** ppObj = NULL ) const; bool Is( const SotFactory * pSuperClass ) const; const SotFactory * GetSuper( sal_uInt16 nPos ) const diff --git a/include/sot/object.hxx b/include/sot/object.hxx index 9c52bdbbf74d..19428d6183bd 100644 --- a/include/sot/object.hxx +++ b/include/sot/object.hxx @@ -116,7 +116,7 @@ public: virtual void * Cast( const SotFactory * ); // only for the macros in So3 not to get out of hand - virtual IUnknown * GetInterface( const SvGlobalName & ); + IUnknown * GetInterface( const SvGlobalName & ); bool Owner() const { return bOwner; } diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx index b7adb8e32b5d..10940c4bd7f5 100644 --- a/include/sot/storage.hxx +++ b/include/sot/storage.hxx @@ -75,8 +75,8 @@ public: virtual void SetSize( sal_uInt64 nNewSize ) SAL_OVERRIDE; sal_uInt32 GetSize() const; bool CopyTo( SotStorageStream * pDestStm ); - virtual bool Commit(); - virtual bool Revert(); + bool Commit(); + bool Revert(); bool SetProperty( const OUString& rName, const ::com::sun::star::uno::Any& rValue ); virtual sal_uInt64 remainingSize() SAL_OVERRIDE; }; @@ -137,9 +137,9 @@ public: static bool IsStorageFile( const OUString & rFileName ); static bool IsStorageFile( SvStream* pStream ); - virtual const OUString& GetName() const; + const OUString& GetName() const; - virtual bool Validate(); + bool Validate(); const OString& GetKey() const { return m_aKey;} @@ -159,29 +159,29 @@ public: if( m_nError == SVSTREAM_OK ) m_nError = nErrorCode; } - virtual void ResetError(); + void ResetError(); bool IsRoot() const { return m_bIsRoot; } void SignAsRoot( bool b = true ) { m_bIsRoot = b; } void SetDeleteStream( bool bDelete ) { m_bDelStm = bDelete; } // own data sector - virtual void SetClass( const SvGlobalName & rClass, + void SetClass( const SvGlobalName & rClass, sal_uLong bOriginalClipFormat, const OUString & rUserTypeName ); - virtual void SetConvertClass( const SvGlobalName & rConvertClass, + void SetConvertClass( const SvGlobalName & rConvertClass, sal_uLong bOriginalClipFormat, const OUString & rUserTypeName ); - virtual SvGlobalName GetClassName(); // type of data in the storage - virtual sal_uLong GetFormat(); - virtual OUString GetUserName(); - virtual bool ShouldConvert(); + SvGlobalName GetClassName(); // type of data in the storage + sal_uLong GetFormat(); + OUString GetUserName(); + bool ShouldConvert(); // list of all elements - virtual void FillInfoList( SvStorageInfoList * ) const; - virtual bool CopyTo( SotStorage * pDestStg ); - virtual bool Commit(); - virtual bool Revert(); + void FillInfoList( SvStorageInfoList * ) const; + bool CopyTo( SotStorage * pDestStg ); + bool Commit(); + bool Revert(); // create stream with connection to Storage, // more or less a Parent-Child relationship @@ -192,17 +192,17 @@ public: StreamMode = STREAM_STD_READWRITE, bool transacted = true ); // query whether Storage or Stream - virtual bool IsStream( const OUString & rEleName ) const; - virtual bool IsStorage( const OUString & rEleName ) const; - virtual bool IsContained( const OUString & rEleName ) const; + bool IsStream( const OUString & rEleName ) const; + bool IsStorage( const OUString & rEleName ) const; + bool IsContained( const OUString & rEleName ) const; // remove element - virtual bool Remove( const OUString & rEleName ); + bool Remove( const OUString & rEleName ); // change element's name - virtual bool Rename( const OUString & rEleName, + bool Rename( const OUString & rEleName, const OUString & rNewName ); - virtual bool CopyTo( const OUString & rEleName, SotStorage * pDest, + bool CopyTo( const OUString & rEleName, SotStorage * pDest, const OUString & rNewName ); - virtual bool MoveTo( const OUString & rEleName, SotStorage * pDest, + bool MoveTo( const OUString & rEleName, SotStorage * pDest, const OUString & rNewName ); bool IsOLEStorage() const; |