diff options
34 files changed, 67 insertions, 106 deletions
diff --git a/connectivity/source/cpool/ZDriverWrapper.hxx b/connectivity/source/cpool/ZDriverWrapper.hxx index 23c5c8d753bf..854542c31c76 100644 --- a/connectivity/source/cpool/ZDriverWrapper.hxx +++ b/connectivity/source/cpool/ZDriverWrapper.hxx @@ -34,9 +34,8 @@ namespace connectivity typedef ::cppu::WeakImplHelper< css::sdbc::XDriver > ODriverWrapper_BASE; - class ODriverWrapper : public ODriverWrapper_BASE + class ODriverWrapper final : public ODriverWrapper_BASE { - protected: css::uno::Reference< css::uno::XAggregation > m_xDriverAggregate; css::uno::Reference< css::sdbc::XDriver > @@ -58,7 +57,7 @@ namespace connectivity // XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override; - protected: + private: /// dtor virtual ~ODriverWrapper() override; // XDriver diff --git a/connectivity/source/drivers/evoab2/NColumns.hxx b/connectivity/source/drivers/evoab2/NColumns.hxx index e7e2065a5ac5..2f04047fb78c 100644 --- a/connectivity/source/drivers/evoab2/NColumns.hxx +++ b/connectivity/source/drivers/evoab2/NColumns.hxx @@ -27,9 +27,8 @@ namespace connectivity { namespace evoab { - class OEvoabColumns : public sdbcx::OCollection + class OEvoabColumns final : public sdbcx::OCollection { - protected: OEvoabTable* m_pTable; virtual sdbcx::ObjectType createObject(const OUString& _rName) override; diff --git a/connectivity/source/drivers/evoab2/NDriver.hxx b/connectivity/source/drivers/evoab2/NDriver.hxx index 788eed1d4b05..df7cd46c6e3c 100644 --- a/connectivity/source/drivers/evoab2/NDriver.hxx +++ b/connectivity/source/drivers/evoab2/NDriver.hxx @@ -41,10 +41,8 @@ namespace connectivity css::lang::XServiceInfo > ODriver_BASE; - class OEvoabDriver : public ODriver_BASE + class OEvoabDriver final : public ODriver_BASE { - - protected: ::osl::Mutex m_aMutex; connectivity::OWeakRefArray m_xConnections; css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory; diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.hxx b/connectivity/source/drivers/evoab2/NPreparedStatement.hxx index e9b0b8ec7961..20d5790ca4a0 100644 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.hxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.hxx @@ -42,13 +42,9 @@ namespace connectivity css::sdbc::XMultipleResults, css::lang::XServiceInfo> OPreparedStatement_BASE; - class OEvoabPreparedStatement :public OCommonStatement + class OEvoabPreparedStatement final:public OCommonStatement ,public OPreparedStatement_BASE { - protected: - // Data attributes - - // our SQL statement OUString m_sSqlStatement; // the EBookQuery we're working with @@ -56,7 +52,6 @@ namespace connectivity // our meta data css::uno::Reference< css::sdbc::XResultSetMetaData > m_xMetaData; - protected: virtual ~OEvoabPreparedStatement() override; public: @@ -64,7 +59,7 @@ namespace connectivity void construct( const OUString& _sql ); - protected: + private: DECLARE_SERVICE_INFO(); //XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx index 692dd9f8a062..80e2968ab0b8 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.hxx +++ b/connectivity/source/drivers/evoab2/NResultSet.hxx @@ -76,7 +76,7 @@ namespace connectivity > OResultSet_BASE; - class OEvoabResultSet :public cppu::BaseMutex + class OEvoabResultSet final : public cppu::BaseMutex ,public OResultSet_BASE ,public ::comphelper::OPropertyContainer ,public ::comphelper::OPropertyArrayUsageHelper<OEvoabResultSet> @@ -84,8 +84,6 @@ namespace connectivity private: std::unique_ptr<OEvoabVersionHelper> m_pVersionHelper; - protected: - OCommonStatement* m_pStatement; OEvoabConnection* m_pConnection; rtl::Reference<OEvoabResultSetMetaData> m_xMetaData; diff --git a/connectivity/source/drivers/mork/MColumns.hxx b/connectivity/source/drivers/mork/MColumns.hxx index 4f828ead53f4..5610a7652401 100644 --- a/connectivity/source/drivers/mork/MColumns.hxx +++ b/connectivity/source/drivers/mork/MColumns.hxx @@ -29,9 +29,8 @@ namespace connectivity { namespace mork { - class OColumns : public sdbcx::OCollection + class OColumns final : public sdbcx::OCollection { - protected: OTable* m_pTable; virtual sdbcx::ObjectType createObject(const OUString& _rName) override; diff --git a/connectivity/source/drivers/mork/MConnection.hxx b/connectivity/source/drivers/mork/MConnection.hxx index 2d2b502a8bc2..f83f265f5780 100644 --- a/connectivity/source/drivers/mork/MConnection.hxx +++ b/connectivity/source/drivers/mork/MConnection.hxx @@ -28,13 +28,11 @@ namespace connectivity typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding - class OConnection : public OConnection_BASE, + class OConnection final : public OConnection_BASE, public connectivity::OSubComponent<OConnection, OConnection_BASE> { friend class connectivity::OSubComponent<OConnection, OConnection_BASE>; - protected: - // Data attributes rtl::Reference<MorkDriver> m_xDriver; // Pointer to the owning diff --git a/connectivity/source/drivers/mork/MPreparedStatement.hxx b/connectivity/source/drivers/mork/MPreparedStatement.hxx index c70592432bd6..c40ffc90950e 100644 --- a/connectivity/source/drivers/mork/MPreparedStatement.hxx +++ b/connectivity/source/drivers/mork/MPreparedStatement.hxx @@ -36,10 +36,9 @@ namespace connectivity css::sdbc::XMultipleResults, css::lang::XServiceInfo> OPreparedStatement_BASE; - class OPreparedStatement : public OCommonStatement, + class OPreparedStatement final : public OCommonStatement, public OPreparedStatement_BASE { - protected: // Data attributes OUString m_sSqlStatement; @@ -48,7 +47,6 @@ namespace connectivity ::rtl::Reference<connectivity::OSQLColumns> m_xParamColumns; // the parameter columns OValueRow m_aParameterRow; - protected: virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any& rValue) override; virtual ~OPreparedStatement() override; @@ -125,7 +123,7 @@ namespace connectivity using OCommonStatement::executeQuery; using OCommonStatement::executeUpdate; using OCommonStatement::execute; - protected: + private: using OPropertySetHelper::getFastPropertyValue; }; } diff --git a/connectivity/source/drivers/mork/MQueryHelper.hxx b/connectivity/source/drivers/mork/MQueryHelper.hxx index 9f18fdbb33e0..75db029ae4a7 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.hxx +++ b/connectivity/source/drivers/mork/MQueryHelper.hxx @@ -64,8 +64,7 @@ namespace connectivity bool isExpr( ) const { return m_eNodeType == node_type::Expr; } }; - class MQueryExpressionString : public MQueryExpressionBase { - protected: + class MQueryExpressionString final : public MQueryExpressionBase { OUString m_aName; // LHS MQueryOp::cond_type m_aBooleanCondition; OUString m_aValue; // RHS @@ -96,7 +95,7 @@ namespace connectivity const OUString& getValue() const { return m_aValue; } }; - class MQueryExpression : public MQueryExpressionBase + class MQueryExpression final : public MQueryExpressionBase { friend class MQueryHelper; @@ -134,11 +133,10 @@ namespace connectivity } } - protected: + private: ExprVector m_aExprVector; bool_cond m_aExprCondType; - private: MQueryExpression(const MQueryExpression&) = delete; MQueryExpression& operator=(const MQueryExpression&) = delete; }; diff --git a/connectivity/source/drivers/mork/MorkParser.hxx b/connectivity/source/drivers/mork/MorkParser.hxx index aafabb0ad865..8cc4a555ea68 100644 --- a/connectivity/source/drivers/mork/MorkParser.hxx +++ b/connectivity/source/drivers/mork/MorkParser.hxx @@ -65,7 +65,7 @@ enum MorkErrors /// Class MorkParser -class LO_DLLPUBLIC_MORK MorkParser +class LO_DLLPUBLIC_MORK MorkParser final { public: @@ -99,7 +99,7 @@ public: // All lists std::vector<OUString> lists_; -protected: // Members +private: // Members void initVars(); @@ -119,7 +119,7 @@ protected: // Members bool parseRow( int TableId, int TableScope ); bool parseGroup(); -protected: // Data +private: // Data // Columns in mork means value names MorkDict columns_; @@ -143,7 +143,6 @@ protected: // Data // Indicates entity is being parsed enum class NP { Columns, Values, Rows } nowParsing_; -private: MorkParser(const MorkParser &) = delete; MorkParser &operator=(const MorkParser &) = delete; diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx index 9da077ea6db7..feb3f53225d5 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx @@ -60,7 +60,7 @@ struct UpdateableField typedef std::vector< UpdateableField > UpdateableFieldVector; -class UpdateableResultSet : +class UpdateableResultSet final : public SequenceResultSet, public css::sdbc::XResultSetUpdate, public css::sdbc::XRowUpdate @@ -72,7 +72,7 @@ class UpdateableResultSet : UpdateableFieldVector m_updateableField; bool m_insertRow; -protected: +private: UpdateableResultSet( const ::rtl::Reference< comphelper::RefCountedMutex > & mutex, const css::uno::Reference< css::uno::XInterface > &owner, diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.hxx b/connectivity/source/drivers/postgresql/pq_xcolumns.hxx index 86bc585be296..fa9f4680ca4e 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.hxx @@ -56,7 +56,7 @@ void alterColumnByDescriptor( OUString columnMetaData2SDBCX( ReflectionBase *pBase, const css::uno::Reference< css::sdbc::XRow > &xRow ); -class Columns : public Container +class Columns final : public Container { OUString m_schemaName; OUString m_tableName; @@ -70,7 +70,7 @@ public: // instances Columns 'exception safe' const OUString &tableName, Columns **pColumns); -protected: +private: Columns( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx index f41c390f4ef1..353b75ddbf63 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx @@ -42,7 +42,7 @@ namespace pq_sdbc_driver { -class IndexColumns : public Container +class IndexColumns final : public Container { OUString m_schemaName; OUString m_tableName; @@ -59,7 +59,7 @@ public: // instances IndexColumns 'exception safe' const OUString &indexName, const css::uno::Sequence< OUString > &columns ); -protected: +private: IndexColumns( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, @@ -87,7 +87,7 @@ public: // XDataDescriptorFactory }; -class IndexColumnDescriptors : public Container +class IndexColumnDescriptors final : public Container { public: // instances IndexColumns 'exception safe' @@ -96,7 +96,7 @@ public: // instances IndexColumns 'exception safe' const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings ); -protected: +private: IndexColumnDescriptors( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.hxx b/connectivity/source/drivers/postgresql/pq_xindexes.hxx index 661c680d67ec..7991058f5799 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.hxx @@ -41,7 +41,7 @@ namespace pq_sdbc_driver { -class Indexes : public Container +class Indexes final : public Container { OUString m_schemaName; OUString m_tableName; @@ -54,7 +54,7 @@ public: // instances Columns 'exception safe' const OUString &schemaName, const OUString &tableName); -protected: +private: Indexes( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, @@ -79,7 +79,7 @@ public: // XDataDescriptorFactory }; -class IndexDescriptors : public Container +class IndexDescriptors final : public Container { public: // instances IndexDescriptors 'exception safe' static css::uno::Reference< css::container::XNameAccess > create( @@ -87,7 +87,7 @@ public: // instances IndexDescriptors 'exception safe' const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings ); -protected: +private: IndexDescriptors( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx index 508804dc4d91..0ada98aa4052 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx @@ -42,7 +42,7 @@ namespace pq_sdbc_driver { -class KeyColumns : public Container +class KeyColumns final : public Container { OUString m_schemaName; OUString m_tableName; @@ -59,7 +59,7 @@ public: // instances KeyColumns 'exception safe' const css::uno::Sequence< OUString > &keyColumns, const css::uno::Sequence< OUString > &foreignColumnNames ); -protected: +private: KeyColumns( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.hxx b/connectivity/source/drivers/postgresql/pq_xkeys.hxx index 22d56dad3f95..aedd46b578da 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.hxx @@ -41,7 +41,7 @@ namespace pq_sdbc_driver { -class Keys : public Container +class Keys final : public Container { OUString m_schemaName; OUString m_tableName; @@ -54,7 +54,7 @@ public: // instances Columns 'exception safe' const OUString &schemaName, const OUString &tableName); -protected: +private: Keys( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, @@ -79,7 +79,7 @@ public: // XDataDescriptorFactory }; -class KeyDescriptors : public Container +class KeyDescriptors final : public Container { public: // instances Columns 'exception safe' static css::uno::Reference< css::container::XIndexAccess > create( @@ -87,7 +87,7 @@ public: // instances Columns 'exception safe' const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings ); -protected: +private: KeyDescriptors( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xusers.hxx b/connectivity/source/drivers/postgresql/pq_xusers.hxx index ef30c963bf83..359b97dd11cf 100644 --- a/connectivity/source/drivers/postgresql/pq_xusers.hxx +++ b/connectivity/source/drivers/postgresql/pq_xusers.hxx @@ -42,7 +42,7 @@ namespace pq_sdbc_driver { -class Users : public Container +class Users final : public Container { public: // instances Tables 'exception safe' @@ -51,7 +51,7 @@ public: // instances Tables 'exception safe' const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings ); -protected: +private: Users( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, @@ -59,21 +59,22 @@ protected: virtual ~Users() override; -public: // XAppend +public: + // XAppend virtual void SAL_CALL appendByDescriptor( const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; -public: // XDrop + // XDrop virtual void SAL_CALL dropByName( const OUString& elementName ) override; virtual void SAL_CALL dropByIndex( sal_Int32 index ) override; -public: // XRefreshable + // XRefreshable virtual void SAL_CALL refresh( ) override; -public: // XDataDescriptorFactory + // XDataDescriptorFactory virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor( ) override; -protected: +private: virtual void SAL_CALL disposing() override; }; diff --git a/connectivity/source/inc/ParameterSubstitution.hxx b/connectivity/source/inc/ParameterSubstitution.hxx index 6319c73c991f..1dd52e94aa71 100644 --- a/connectivity/source/inc/ParameterSubstitution.hxx +++ b/connectivity/source/inc/ParameterSubstitution.hxx @@ -32,7 +32,7 @@ namespace connectivity typedef ::cppu::WeakImplHelper< css::util::XStringSubstitution ,css::lang::XServiceInfo ,css::lang::XInitialization > ParameterSubstitution_BASE; - class ParameterSubstitution : public ParameterSubstitution_BASE + class ParameterSubstitution final : public ParameterSubstitution_BASE { ::osl::Mutex m_aMutex; css::uno::Reference< css::uno::XComponentContext > m_xContext; @@ -46,7 +46,7 @@ namespace connectivity /// @throws css::uno::RuntimeException static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); static css::uno::Reference< css::uno::XInterface > create( const css::uno::Reference< css::uno::XComponentContext > & xContext); - protected: + private: ParameterSubstitution(const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); virtual ~ParameterSubstitution() override {} diff --git a/connectivity/source/inc/TKeyValue.hxx b/connectivity/source/inc/TKeyValue.hxx index 0a9d833c6f5e..bd77b0caa7d4 100644 --- a/connectivity/source/inc/TKeyValue.hxx +++ b/connectivity/source/inc/TKeyValue.hxx @@ -24,13 +24,11 @@ namespace connectivity { - class OOO_DLLPUBLIC_DBTOOLS OKeyValue + class OOO_DLLPUBLIC_DBTOOLS OKeyValue final { - private: std::vector<ORowSetValueDecoratorRef> m_aKeys; sal_Int32 m_nValue; - protected: OKeyValue(sal_Int32 nVal); public: diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index 90dfb70678ab..3706c1c07171 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -33,7 +33,7 @@ namespace connectivity class OSQLAnalyzer; typedef std::vector<OCode*> OCodeList; - class OPredicateCompiler : public ::salhelper::SimpleReferenceObject + class OPredicateCompiler final : public ::salhelper::SimpleReferenceObject { friend class OPredicateInterpreter; friend class OSQLAnalyzer; @@ -66,7 +66,7 @@ namespace connectivity bool hasCode() const {return !isClean();} void setOrigColumns(const css::uno::Reference< css::container::XNameAccess>& rCols) { m_orgColumns = rCols; } const css::uno::Reference< css::container::XNameAccess>& getOrigColumns() const { return m_orgColumns; } - protected: + private: /// @throws css::sdbc::SQLException /// @throws css::uno::RuntimeException void execute_COMPARE(connectivity::OSQLParseNode const * pPredicateNode); diff --git a/connectivity/source/inc/hsqldb/HDriver.hxx b/connectivity/source/inc/hsqldb/HDriver.hxx index 364a6dbb5e45..675d63993242 100644 --- a/connectivity/source/inc/hsqldb/HDriver.hxx +++ b/connectivity/source/inc/hsqldb/HDriver.hxx @@ -58,7 +58,7 @@ namespace connectivity /** delegates all calls to the original driver and extend the existing one with the SDBCX layer. */ - class ODriverDelegator : public ::cppu::BaseMutex + class ODriverDelegator final : public ::cppu::BaseMutex ,public ODriverDelegator_BASE { TWeakPairVector m_aConnections; // vector containing a list @@ -118,7 +118,7 @@ namespace connectivity void shutdownConnections(); void flushConnections(); - protected: + private: /// dtor virtual ~ODriverDelegator() override; // OComponentHelper diff --git a/connectivity/source/inc/hsqldb/HTables.hxx b/connectivity/source/inc/hsqldb/HTables.hxx index 29aa691a4d74..d6f65067c307 100644 --- a/connectivity/source/inc/hsqldb/HTables.hxx +++ b/connectivity/source/inc/hsqldb/HTables.hxx @@ -25,11 +25,10 @@ namespace connectivity { namespace hsqldb { - class OTables : public sdbcx::OCollection + class OTables final : public sdbcx::OCollection { css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData; - protected: virtual sdbcx::ObjectType createObject(const OUString& _rName) override; virtual void impl_refresh() override; virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override; diff --git a/connectivity/source/inc/hsqldb/HViews.hxx b/connectivity/source/inc/hsqldb/HViews.hxx index 3759b1530b83..40b9478a67f2 100644 --- a/connectivity/source/inc/hsqldb/HViews.hxx +++ b/connectivity/source/inc/hsqldb/HViews.hxx @@ -25,17 +25,16 @@ namespace connectivity { namespace hsqldb { - class HViews : public sdbcx::OCollection + class HViews final : public sdbcx::OCollection { css::uno::Reference< css::sdbc::XConnection > m_xConnection; css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData; bool m_bInDrop; - protected: virtual sdbcx::ObjectType createObject(const OUString& _rName) override; virtual void impl_refresh() override; virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override; - virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; + virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName) override; void createView( const css::uno::Reference< css::beans::XPropertySet >& descriptor ); diff --git a/connectivity/source/inc/java/LocalRef.hxx b/connectivity/source/inc/java/LocalRef.hxx index 95135dfa0bba..d197e25e11f8 100644 --- a/connectivity/source/inc/java/LocalRef.hxx +++ b/connectivity/source/inc/java/LocalRef.hxx @@ -33,7 +33,7 @@ namespace connectivity { namespace jdbc the object from an JNI method). */ template< typename T > - class LocalRef + class LocalRef final { public: explicit LocalRef( JNIEnv& environment ) @@ -79,7 +79,6 @@ namespace connectivity { namespace jdbc LocalRef(LocalRef &) = delete; void operator =(LocalRef &) = delete; - protected: JNIEnv& m_environment; T m_object; }; diff --git a/connectivity/source/inc/java/io/Reader.hxx b/connectivity/source/inc/java/io/Reader.hxx index f68fe1239c3a..592d476def14 100644 --- a/connectivity/source/inc/java/io/Reader.hxx +++ b/connectivity/source/inc/java/io/Reader.hxx @@ -30,10 +30,9 @@ namespace connectivity //************ Class: java.io.InputStream - class java_io_Reader : public java_lang_Object, + class java_io_Reader final : public java_lang_Object, public ::cppu::WeakImplHelper< css::io::XInputStream> { - protected: // static Data for the Class static jclass theClass; virtual ~java_io_Reader() override; diff --git a/connectivity/source/inc/java/sql/ResultSetMetaData.hxx b/connectivity/source/inc/java/sql/ResultSetMetaData.hxx index 2776926aa6d0..036ca4c4bdd7 100644 --- a/connectivity/source/inc/java/sql/ResultSetMetaData.hxx +++ b/connectivity/source/inc/java/sql/ResultSetMetaData.hxx @@ -30,10 +30,9 @@ namespace connectivity //************ Class: java.sql.ResultSetMetaData class java_sql_Connection; - class java_sql_ResultSetMetaData : public ::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData>, + class java_sql_ResultSetMetaData final : public ::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData>, public java_lang_Object { - protected: java_sql_Connection* m_pConnection; sal_Int32 m_nColumnCount; diff --git a/connectivity/source/inc/mysql/YTables.hxx b/connectivity/source/inc/mysql/YTables.hxx index 4295eddfa7d2..723a3511273e 100644 --- a/connectivity/source/inc/mysql/YTables.hxx +++ b/connectivity/source/inc/mysql/YTables.hxx @@ -26,12 +26,11 @@ namespace connectivity { namespace mysql { - class OTables : public sdbcx::OCollection, + class OTables final : public sdbcx::OCollection, public ::dbtools::ISQLStatementHelper { css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData; - protected: virtual sdbcx::ObjectType createObject(const OUString& _rName) override; virtual void impl_refresh() override; virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override; diff --git a/connectivity/source/inc/mysql/YViews.hxx b/connectivity/source/inc/mysql/YViews.hxx index 16ec6301687b..9fe8ca6d856a 100644 --- a/connectivity/source/inc/mysql/YViews.hxx +++ b/connectivity/source/inc/mysql/YViews.hxx @@ -25,12 +25,10 @@ namespace connectivity { namespace mysql { - class OViews : public sdbcx::OCollection + class OViews final : public sdbcx::OCollection { css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData; bool m_bInDrop; - // OCatalog* m_pParent; - protected: virtual sdbcx::ObjectType createObject(const OUString& _rName) override; virtual void impl_refresh() override; virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override; diff --git a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx index a0e21394cb82..c4ad2c07551c 100644 --- a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx +++ b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx @@ -32,7 +32,7 @@ namespace connectivity //************ Class: ODatabaseMetaData - class OOO_DLLPUBLIC_ODBCBASE ODatabaseMetaData : + class OOO_DLLPUBLIC_ODBCBASE ODatabaseMetaData final : public ODatabaseMetaDataBase { SQLHANDLE m_aConnectionHandle; @@ -53,7 +53,6 @@ namespace connectivity virtual sal_Int32 impl_getMaxStatements_throw( ) override; virtual sal_Int32 impl_getMaxTablesInSelect_throw( ) override; virtual bool impl_storesMixedCaseQuotedIdentifiers_throw( ) override; - protected: OUString getURLImpl(); virtual css::uno::Reference< css::sdbc::XResultSet > impl_getTypeInfo_throw() override; virtual ~ODatabaseMetaData() override; diff --git a/connectivity/source/inc/odbc/OPreparedStatement.hxx b/connectivity/source/inc/odbc/OPreparedStatement.hxx index b354ca853325..de03832c80e2 100644 --- a/connectivity/source/inc/odbc/OPreparedStatement.hxx +++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx @@ -41,11 +41,10 @@ namespace connectivity css::sdbc::XResultSetMetaDataSupplier, css::lang::XServiceInfo> OPreparedStatement_BASE; - class OOO_DLLPUBLIC_ODBCBASE OPreparedStatement : + class OOO_DLLPUBLIC_ODBCBASE OPreparedStatement final : public OStatement_BASE2, public OPreparedStatement_BASE { - protected: static const short invalid_scale = -1; // Data attributes @@ -87,7 +86,6 @@ namespace connectivity */ virtual OResultSet* createResulSet() override; - protected: virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any& rValue) override; public: diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx index 412407ad9db7..b1ffb20ce639 100644 --- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx +++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx @@ -36,10 +36,9 @@ namespace connectivity typedef ::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData> OResultSetMetaData_BASE; - class OOO_DLLPUBLIC_ODBCBASE OResultSetMetaData : + class OOO_DLLPUBLIC_ODBCBASE OResultSetMetaData final : public OResultSetMetaData_BASE { - protected: std::vector<sal_Int32> m_vMapping; // when not every column is needed std::map<sal_Int32,sal_Int32> m_aColumnTypes; diff --git a/connectivity/source/manager/mdrivermanager.hxx b/connectivity/source/manager/mdrivermanager.hxx index fe8fa84f019f..51316a8425d1 100644 --- a/connectivity/source/manager/mdrivermanager.hxx +++ b/connectivity/source/manager/mdrivermanager.hxx @@ -57,7 +57,7 @@ namespace drivermanager , css::uno::XNamingService > OSDBCDriverManager_Base; - class OSDBCDriverManager : public OSDBCDriverManager_Base + class OSDBCDriverManager final : public OSDBCDriverManager_Base { friend class ODriverEnumeration; @@ -76,7 +76,6 @@ namespace drivermanager ::connectivity::DriversConfig m_aDriverConfig; sal_Int32 m_nLoginTimeout; - private: explicit OSDBCDriverManager( const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); virtual ~OSDBCDriverManager() override; @@ -118,7 +117,7 @@ namespace drivermanager virtual void SAL_CALL registerObject( const OUString& Name, const css::uno::Reference< css::uno::XInterface >& Object ) override; virtual void SAL_CALL revokeObject( const OUString& Name ) override; - protected: + private: css::uno::Reference< css::sdbc::XDriver > implGetDriverForURL(const OUString& _rURL); /** retrieve the driver order preferences from the configuration and diff --git a/include/connectivity/dbexception.hxx b/include/connectivity/dbexception.hxx index 16c499954ad2..3dcdde0cfcee 100644 --- a/include/connectivity/dbexception.hxx +++ b/include/connectivity/dbexception.hxx @@ -58,7 +58,7 @@ enum OOoBaseErrorCode //= SQLExceptionInfo - encapsulating the type info of an SQLException-derived class -class OOO_DLLPUBLIC_DBTOOLS SQLExceptionInfo +class OOO_DLLPUBLIC_DBTOOLS SQLExceptionInfo final { public: enum class TYPE { SQLException, SQLWarning, SQLContext, Undefined }; @@ -138,7 +138,7 @@ public: m_eType = TYPE::Undefined; } -protected: +private: void implDetermineType(); }; @@ -146,9 +146,8 @@ protected: //= SQLExceptionIteratorHelper - iterating through an SQLException chain -class OOO_DLLPUBLIC_DBTOOLS SQLExceptionIteratorHelper +class OOO_DLLPUBLIC_DBTOOLS SQLExceptionIteratorHelper final { -protected: const css::sdbc::SQLException* m_pCurrent; SQLExceptionInfo::TYPE m_eCurrentType; diff --git a/include/connectivity/sqliterator.hxx b/include/connectivity/sqliterator.hxx index e70e19129037..e9a0fc119768 100644 --- a/include/connectivity/sqliterator.hxx +++ b/include/connectivity/sqliterator.hxx @@ -77,7 +77,7 @@ namespace connectivity struct OSQLParseTreeIteratorImpl; - class OOO_DLLPUBLIC_DBTOOLS OSQLParseTreeIterator + class OOO_DLLPUBLIC_DBTOOLS OSQLParseTreeIterator final { private: css::sdbc::SQLException m_aErrors; // conatins the error while iterating through the statement @@ -142,7 +142,6 @@ namespace connectivity css::uno::Reference< css::beans::XPropertySet > findSelectColumn( const OUString & rColumnName ); - protected: void setSelectColumnName(::rtl::Reference<OSQLColumns> const & _rColumns,const OUString & rColumnName,const OUString & rColumnAlias, const OUString & rTableRange, bool bFkt=false, sal_Int32 _nType = css::sdbc::DataType::VARCHAR, bool bAggFkt=false); void appendColumns(::rtl::Reference<OSQLColumns> const & _rColumns,const OUString& _rTableAlias,const OSQLTable& _rTable); // Other member variables that should be available in the "set" functions @@ -150,8 +149,6 @@ namespace connectivity // in its constructor and, after the "traverse" routines have been used, // they can be queried using other functions. - - private: OSQLParseTreeIterator(const OSQLParseTreeIterator & rIter) = delete; public: @@ -297,7 +294,6 @@ namespace connectivity bool traverseSelectionCriteria(const OSQLParseNode* pSelectNode); - private: /** constructs a new iterator, which inherits some of the settings from a parent iterator */ OSQLParseTreeIterator( @@ -329,7 +325,6 @@ namespace connectivity void setOrderByColumnName(const OUString & rColumnName, OUString & rTableRange, bool bAscending); void setGroupByColumnName(const OUString & rColumnName, OUString & rTableRange); - private: /** appends an SQLException corresponding to the given error code to our error collection @param _eError |