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 /dbaccess | |
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 'dbaccess')
-rw-r--r-- | dbaccess/source/inc/apitools.hxx | 7 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/connectiontools.hxx | 18 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/datasourcemetadata.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/objectnames.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/objectnames.hxx | 10 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/tablename.hxx | 22 |
6 files changed, 35 insertions, 40 deletions
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx index 7c52fec36d41..6d4b1fa69f31 100644 --- a/dbaccess/source/inc/apitools.hxx +++ b/dbaccess/source/inc/apitools.hxx @@ -28,6 +28,7 @@ #include <osl/diagnose.h> #include <cppuhelper/typeprovider.hxx> #include <comphelper/sequence.hxx> +#include <connectivity/CommonTools.hxx> // OSubComponent - a component which holds a hard ref to it's parent // and is been hold itself (by the parent) with a weak ref @@ -146,12 +147,6 @@ public: return static_cast< XServiceInfo* >(new classname(_rxORB)); \ } \ -// declare service info methods -#define DECLARE_SERVICE_INFO() \ - virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception); \ - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception); \ - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) \ - #define DECLARE_SERVICE_INFO_STATIC() \ DECLARE_SERVICE_INFO(); \ static OUString SAL_CALL getImplementationName_Static( ) throw (::com::sun::star::uno::RuntimeException); \ diff --git a/dbaccess/source/sdbtools/connection/connectiontools.hxx b/dbaccess/source/sdbtools/connection/connectiontools.hxx index be233469b500..dccda1be1ed8 100644 --- a/dbaccess/source/sdbtools/connection/connectiontools.hxx +++ b/dbaccess/source/sdbtools/connection/connectiontools.hxx @@ -56,16 +56,16 @@ namespace sdbtools ConnectionTools( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext ); // XConnectionTools - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XTableName > SAL_CALL createTableName() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XObjectNames > SAL_CALL getObjectNames() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XDataSourceMetaData > SAL_CALL getDataSourceMetaData() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getFieldsByCommandDescriptor( ::sal_Int32 commandType, const OUString& command, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& keepFieldsAlive ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > SAL_CALL getComposer( ::sal_Int32 commandType, const OUString& command ) throw (::com::sun::star::uno::RuntimeException, std::exception); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XTableName > SAL_CALL createTableName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XObjectNames > SAL_CALL getObjectNames() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XDataSourceMetaData > SAL_CALL getDataSourceMetaData() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getFieldsByCommandDescriptor( ::sal_Int32 commandType, const OUString& command, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& keepFieldsAlive ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > SAL_CALL getComposer( ::sal_Int32 commandType, const OUString& command ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual ::sal_Bool SAL_CALL supportsService(const OUString & ServiceName) throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException, std::exception); + virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::sal_Bool SAL_CALL supportsService(const OUString & ServiceName) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - static versions static OUString SAL_CALL getImplementationName_static(); @@ -74,7 +74,7 @@ namespace sdbtools Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&); // XInitialization - virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception, std::exception); + virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE; protected: ~ConnectionTools(); diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx index 550bfbc8694a..bca75376fed6 100644 --- a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx +++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx @@ -58,7 +58,7 @@ namespace sdbtools ); // XDataSourceMetaData - virtual ::sal_Bool SAL_CALL supportsQueriesInFrom( ) throw (::com::sun::star::uno::RuntimeException, std::exception); + virtual ::sal_Bool SAL_CALL supportsQueriesInFrom( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: virtual ~DataSourceMetaData(); diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 0f5425870248..dcb0def42029 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -88,12 +88,12 @@ namespace sdbtools } // INameValidation - virtual bool validateName( const OUString& _rName ) + virtual bool validateName( const OUString& _rName ) SAL_OVERRIDE { return !m_xContainer->hasByName( _rName ); } - virtual void validateName_throw( const OUString& _rName ) + virtual void validateName_throw( const OUString& _rName ) SAL_OVERRIDE { if ( validateName( _rName ) ) return; @@ -125,7 +125,7 @@ namespace sdbtools { } - virtual bool validateName( const OUString& _rName ) + virtual bool validateName( const OUString& _rName ) SAL_OVERRIDE { ::dbtools::DatabaseMetaData aMeta( m_xConnection ); if ( !aMeta.restrictIdentifiersToSQL92() ) @@ -145,7 +145,7 @@ namespace sdbtools return true; } - virtual void validateName_throw( const OUString& _rName ) + virtual void validateName_throw( const OUString& _rName ) SAL_OVERRIDE { if ( validateName( _rName ) ) return; @@ -185,14 +185,14 @@ namespace sdbtools return 0; } - virtual bool validateName( const OUString& _rName ) + virtual bool validateName( const OUString& _rName ) SAL_OVERRIDE { if ( validateName_getErrorCondition( _rName ) != 0 ) return false; return true; } - virtual void validateName_throw( const OUString& _rName ) + virtual void validateName_throw( const OUString& _rName ) SAL_OVERRIDE { ::connectivity::ErrorCondition nErrorCondition = validateName_getErrorCondition( _rName ); if ( nErrorCondition != 0 ) @@ -219,12 +219,12 @@ namespace sdbtools } // INameValidation - virtual bool validateName( const OUString& _rName ) + virtual bool validateName( const OUString& _rName ) SAL_OVERRIDE { return m_pPrimary->validateName( _rName ) && m_pSecondary->validateName( _rName ); } - virtual void validateName_throw( const OUString& _rName ) + virtual void validateName_throw( const OUString& _rName ) SAL_OVERRIDE { m_pPrimary->validateName_throw( _rName ); m_pSecondary->validateName_throw( _rName ); diff --git a/dbaccess/source/sdbtools/connection/objectnames.hxx b/dbaccess/source/sdbtools/connection/objectnames.hxx index 19a1037fcf66..49e4d45d8a2a 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.hxx +++ b/dbaccess/source/sdbtools/connection/objectnames.hxx @@ -60,11 +60,11 @@ namespace sdbtools ); // XObjectNames - virtual OUString SAL_CALL suggestName( ::sal_Int32 CommandType, const OUString& BaseName ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception); - virtual OUString SAL_CALL convertToSQLName( const OUString& Name ) throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual ::sal_Bool SAL_CALL isNameUsed( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception); - virtual ::sal_Bool SAL_CALL isNameValid( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception); - virtual void SAL_CALL checkNameForCreate( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception); + virtual OUString SAL_CALL suggestName( ::sal_Int32 CommandType, const OUString& BaseName ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL convertToSQLName( const OUString& Name ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::sal_Bool SAL_CALL isNameUsed( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::sal_Bool SAL_CALL isNameValid( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL checkNameForCreate( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: virtual ~ObjectNames(); diff --git a/dbaccess/source/sdbtools/connection/tablename.hxx b/dbaccess/source/sdbtools/connection/tablename.hxx index 1403e510b787..a5c382a8ebd0 100644 --- a/dbaccess/source/sdbtools/connection/tablename.hxx +++ b/dbaccess/source/sdbtools/connection/tablename.hxx @@ -60,17 +60,17 @@ namespace sdbtools ); // XTableName - virtual OUString SAL_CALL getCatalogName() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual void SAL_CALL setCatalogName( const OUString& _catalogname ) throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual OUString SAL_CALL getSchemaName() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual void SAL_CALL setSchemaName( const OUString& _schemaname ) throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual OUString SAL_CALL getTableName() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual void SAL_CALL setTableName( const OUString& _tablename ) throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual OUString SAL_CALL getNameForSelect() throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getTable() throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException, std::exception); - virtual void SAL_CALL setTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _table ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception); - virtual OUString SAL_CALL getComposedName( ::sal_Int32 Type, ::sal_Bool _Quote ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception); - virtual void SAL_CALL setComposedName( const OUString& ComposedName, ::sal_Int32 Type ) throw (::com::sun::star::uno::RuntimeException, std::exception); + virtual OUString SAL_CALL getCatalogName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setCatalogName( const OUString& _catalogname ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getSchemaName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setSchemaName( const OUString& _schemaname ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getTableName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setTableName( const OUString& _tablename ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getNameForSelect() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getTable() throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _table ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getComposedName( ::sal_Int32 Type, ::sal_Bool _Quote ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setComposedName( const OUString& ComposedName, ::sal_Int32 Type ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: virtual ~TableName(); |