From b44cbb26efe1d0b0950b1e1613e131b506dc3876 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 20 Jan 2015 12:38:10 +0200 Subject: 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 --- include/connectivity/formattedcolumnvalue.hxx | 16 ++++++++-------- include/connectivity/paramwrapper.hxx | 2 +- include/connectivity/sdbcx/VDescriptor.hxx | 2 +- include/connectivity/sdbcx/VView.hxx | 2 +- include/connectivity/sqlscan.hxx | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'include/connectivity') diff --git a/include/connectivity/formattedcolumnvalue.hxx b/include/connectivity/formattedcolumnvalue.hxx index 085233df21a4..6d193e7697e8 100644 --- a/include/connectivity/formattedcolumnvalue.hxx +++ b/include/connectivity/formattedcolumnvalue.hxx @@ -82,19 +82,19 @@ namespace dbtools virtual ~FormattedColumnValue(); - virtual void clear(); + void clear(); // access to the details of the formatting we determined - virtual sal_Int32 getFormatKey() const; - virtual sal_Int32 getFieldType() const; - virtual sal_Int16 getKeyType() const; - virtual const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& + sal_Int32 getFormatKey() const; + sal_Int32 getFieldType() const; + sal_Int16 getKeyType() const; + const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& getColumn() const; - virtual const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumnUpdate >& + const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumnUpdate >& getColumnUpdate() const; - virtual bool setFormattedValue( const OUString& _rFormattedStringValue ) const; - virtual OUString getFormattedValue() const; + bool setFormattedValue( const OUString& _rFormattedStringValue ) const; + OUString getFormattedValue() const; private: ::std::unique_ptr< FormattedColumnValue_Data > m_pData; diff --git a/include/connectivity/paramwrapper.hxx b/include/connectivity/paramwrapper.hxx index c38f5a615797..2096260afbb2 100644 --- a/include/connectivity/paramwrapper.hxx +++ b/include/connectivity/paramwrapper.hxx @@ -105,7 +105,7 @@ namespace param virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const SAL_OVERRIDE; // pseudo-XComponent - virtual void SAL_CALL dispose(); + void SAL_CALL dispose(); protected: virtual ~ParameterWrapper(); diff --git a/include/connectivity/sdbcx/VDescriptor.hxx b/include/connectivity/sdbcx/VDescriptor.hxx index 1975fae84a3d..fb7292d8a8b9 100644 --- a/include/connectivity/sdbcx/VDescriptor.hxx +++ b/include/connectivity/sdbcx/VDescriptor.hxx @@ -63,7 +63,7 @@ namespace connectivity bool isNew() const { return m_bNew; } bool getNew() const { return m_bNew; } - virtual void setNew(bool _bNew); + void setNew(bool _bNew); bool isCaseSensitive() const { return m_aCase.isCaseSensitive(); } diff --git a/include/connectivity/sdbcx/VView.hxx b/include/connectivity/sdbcx/VView.hxx index b97c273ae21b..d41bee600ae8 100644 --- a/include/connectivity/sdbcx/VView.hxx +++ b/include/connectivity/sdbcx/VView.hxx @@ -79,7 +79,7 @@ namespace connectivity virtual void construct() SAL_OVERRIDE; // ::cppu::OComponentHelper - virtual void SAL_CALL disposing(void); + void SAL_CALL disposing(void); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/include/connectivity/sqlscan.hxx b/include/connectivity/sqlscan.hxx index 301efddc6dca..d89949acae17 100644 --- a/include/connectivity/sqlscan.hxx +++ b/include/connectivity/sqlscan.hxx @@ -53,11 +53,11 @@ namespace connectivity inline static void SAL_CALL operator delete( void *,void* ) { } - virtual sal_Int32 SQLyygetc(void); - virtual void SQLyyerror(char const *fmt); - virtual void output(sal_Int32) { OSL_FAIL("Internal error in sdblex.l: output not possible"); } - virtual void ECHO(void) { OSL_FAIL("Internal error in sdblex.l: ECHO not possible"); } - virtual IParseContext::InternationalKeyCode getInternationalTokenID(const char* sToken) const; + sal_Int32 SQLyygetc(void); + void SQLyyerror(char const *fmt); + void output(sal_Int32) { OSL_FAIL("Internal error in sdblex.l: output not possible"); } + void ECHO(void) { OSL_FAIL("Internal error in sdblex.l: ECHO not possible"); } + IParseContext::InternationalKeyCode getInternationalTokenID(const char* sToken) const; // setting the new information before scanning void prepareScan(const OUString & rNewStatement, const IParseContext* pContext, bool bInternational); -- cgit