diff options
Diffstat (limited to 'connectivity/source/inc')
52 files changed, 190 insertions, 253 deletions
diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx index c469f06716a7..f0a3fef76d00 100644 --- a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx +++ b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx @@ -32,16 +32,15 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/sdbc/XWarningsSupplier.hpp> -#include <cppuhelper/compbase.hxx> -#include <cppuhelper/basemutex.hxx> #include <comphelper/proparrhlp.hxx> -#include <comphelper/propertycontainer.hxx> +#include <comphelper/propertycontainer2.hxx> #include <connectivity/FValue.hxx> #include <connectivity/dbtoolsdllapi.hxx> +#include <comphelper/compbase.hxx> namespace connectivity { - typedef ::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, + typedef ::comphelper::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::util::XCancellable, @@ -54,11 +53,10 @@ namespace connectivity // typedef ORefVector<ORowSetValue> ORow; // typedef ORefVector<ORow> ORows; - class OOO_DLLPUBLIC_DBTOOLS ODatabaseMetaDataResultSet : - public cppu::BaseMutex, - public ODatabaseMetaDataResultSet_BASE, - public ::comphelper::OPropertyContainer, - public ::comphelper::OPropertyArrayUsageHelper<ODatabaseMetaDataResultSet> + class SAL_DLLPUBLIC_RTTI ODatabaseMetaDataResultSet : + public ODatabaseMetaDataResultSet_BASE, + public ::comphelper::OPropertyContainer2, + public ::comphelper::OPropertyArrayUsageHelper<ODatabaseMetaDataResultSet> { public: @@ -118,8 +116,9 @@ namespace connectivity void construct(); /// @throws css::sdbc::SQLException - void checkIndex(sal_Int32 columnIndex ); + void checkIndex(std::unique_lock<std::mutex>& rGuard, sal_Int32 columnIndex ); void setType(MetaDataResultSetType _eType); + css::uno::Reference< css::sdbc::XResultSetMetaData > getMetaData( std::unique_lock<std::mutex>& ); protected: ORows m_aRows; @@ -130,22 +129,26 @@ namespace connectivity virtual const ORowSetValue& getValue(sal_Int32 columnIndex); // OPropertyArrayUsageHelper - virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override; + OOO_DLLPUBLIC_DBTOOLS virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override; // OPropertySetHelper - virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override; + OOO_DLLPUBLIC_DBTOOLS virtual ::cppu::IPropertyArrayHelper & getInfoHelper() override; + + bool next(std::unique_lock<std::mutex>& ); + bool isBeforeFirst(std::unique_lock<std::mutex>& ); + bool isAfterLast(std::unique_lock<std::mutex>& ); virtual ~ODatabaseMetaDataResultSet() override; public: - virtual void SAL_CALL acquire() noexcept override; - virtual void SAL_CALL release() noexcept override; + OOO_DLLPUBLIC_DBTOOLS virtual void SAL_CALL acquire() noexcept override; + OOO_DLLPUBLIC_DBTOOLS virtual void SAL_CALL release() noexcept override; /// default construction ODatabaseMetaDataResultSet(); /// construction of a pre-defined result set type - ODatabaseMetaDataResultSet( MetaDataResultSetType _eType ); + OOO_DLLPUBLIC_DBTOOLS ODatabaseMetaDataResultSet( MetaDataResultSetType _eType ); - void setRows(ORows&& _rRows); + OOO_DLLPUBLIC_DBTOOLS void setRows(ORows&& _rRows); // XServiceInfo @@ -153,14 +156,14 @@ namespace connectivity virtual OUString SAL_CALL getImplementationName( ) override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - // ::cppu::OComponentHelper - virtual void SAL_CALL disposing() override; + // ::comphelper::WeakComponentImplHelper + virtual void disposing(std::unique_lock<std::mutex>&) override; // XInterface - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; + OOO_DLLPUBLIC_DBTOOLS virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; //XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; // XPropertySet - virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; + OOO_DLLPUBLIC_DBTOOLS virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; // XResultSet virtual sal_Bool SAL_CALL next( ) override; virtual sal_Bool SAL_CALL isBeforeFirst( ) override; @@ -238,31 +241,31 @@ namespace connectivity // some methods to get already defined ORowSetValues // this increase the reuse of ORowSetValues /// return an empty ORowSetValueDecorator - static ORowSetValueDecoratorRef const & getEmptyValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getEmptyValue(); /// return an ORowSetValueDecorator with 0 as value - static ORowSetValueDecoratorRef const & get0Value(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & get0Value(); /// return an ORowSetValueDecorator with 1 as value - static ORowSetValueDecoratorRef const & get1Value(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & get1Value(); /// return an ORowSetValueDecorator with ColumnSearch::BASIC as value - static ORowSetValueDecoratorRef const & getBasicValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getBasicValue(); /// return an ORowSetValueDecorator with string SELECT as value - static ORowSetValueDecoratorRef const & getSelectValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getSelectValue(); /// return an ORowSetValueDecorator with string INSERT as value - static ORowSetValueDecoratorRef const & getInsertValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getInsertValue(); /// return an ORowSetValueDecorator with string DELETE as value - static ORowSetValueDecoratorRef const & getDeleteValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getDeleteValue(); /// return an ORowSetValueDecorator with string UPDATE as value - static ORowSetValueDecoratorRef const & getUpdateValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getUpdateValue(); /// return an ORowSetValueDecorator with string CREATE as value - static ORowSetValueDecoratorRef const & getCreateValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getCreateValue(); /// return an ORowSetValueDecorator with string READ as value - static ORowSetValueDecoratorRef const & getReadValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getReadValue(); /// return an ORowSetValueDecorator with string ALTER as value - static ORowSetValueDecoratorRef const & getAlterValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getAlterValue(); /// return an ORowSetValueDecorator with string DROP as value - static ORowSetValueDecoratorRef const & getDropValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getDropValue(); /// return an ORowSetValueDecorator with string ' as value - static ORowSetValueDecoratorRef const & getQuoteValue(); + OOO_DLLPUBLIC_DBTOOLS static ORowSetValueDecoratorRef const & getQuoteValue(); }; } diff --git a/connectivity/source/inc/OColumn.hxx b/connectivity/source/inc/OColumn.hxx index 57addead1235..2131b3e15254 100644 --- a/connectivity/source/inc/OColumn.hxx +++ b/connectivity/source/inc/OColumn.hxx @@ -22,6 +22,7 @@ #include <rtl/ustring.hxx> #include <sal/types.h> #include <connectivity/dbtoolsdllapi.hxx> +#include <utility> namespace connectivity { @@ -64,14 +65,14 @@ namespace connectivity , m_DefinitelyWritable(false) {} - OColumn(const OUString &_aTableName, + OColumn(OUString _aTableName, const OUString &_aColumnName, sal_Int32 _aNullable, sal_Int32 _aColumnDisplaySize, sal_Int32 _aPrecision, sal_Int32 _aScale, sal_Int32 _aColumnType) - : m_TableName(_aTableName), + : m_TableName(std::move(_aTableName)), m_ColumnName(_aColumnName), m_ColumnLabel(), diff --git a/connectivity/source/inc/ParameterSubstitution.hxx b/connectivity/source/inc/ParameterSubstitution.hxx index 11ac90982ca9..a76bd09398fa 100644 --- a/connectivity/source/inc/ParameterSubstitution.hxx +++ b/connectivity/source/inc/ParameterSubstitution.hxx @@ -41,7 +41,7 @@ namespace connectivity ParameterSubstitution( const ParameterSubstitution& ) = delete; ParameterSubstitution& operator=( const ParameterSubstitution& ) = delete; public: - ParameterSubstitution(const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); + ParameterSubstitution(css::uno::Reference< css::uno::XComponentContext > _rContext ); private: // XServiceInfo diff --git a/connectivity/source/inc/TConnection.hxx b/connectivity/source/inc/TConnection.hxx index 246e968b8a32..2dbe2ef6a756 100644 --- a/connectivity/source/inc/TConnection.hxx +++ b/connectivity/source/inc/TConnection.hxx @@ -73,7 +73,7 @@ namespace connectivity //XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); + static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); }; } diff --git a/connectivity/source/inc/TPrivilegesResultSet.hxx b/connectivity/source/inc/TPrivilegesResultSet.hxx index b7206b7de476..8c4070fce97a 100644 --- a/connectivity/source/inc/TPrivilegesResultSet.hxx +++ b/connectivity/source/inc/TPrivilegesResultSet.hxx @@ -36,8 +36,8 @@ namespace connectivity OResultSetPrivileges(const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _rxMeta ,const css::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern); - // ::cppu::OComponentHelper - virtual void SAL_CALL disposing() override; + // ::comphelper::WeakComponentImplHelper + virtual void disposing(std::unique_lock<std::mutex>&) override; // XResultSet virtual sal_Bool SAL_CALL next( ) override; }; diff --git a/connectivity/source/inc/ado/AColumn.hxx b/connectivity/source/inc/ado/AColumn.hxx index fdb0afc74d24..f297964820dc 100644 --- a/connectivity/source/inc/ado/AColumn.hxx +++ b/connectivity/source/inc/ado/AColumn.hxx @@ -44,9 +44,6 @@ namespace connectivity::ado OAdoColumn(bool _bCase,OConnection* _pConnection); // ODescriptor virtual void construct() override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); WpADOColumn getColumnImpl() const; }; diff --git a/connectivity/source/inc/ado/AConnection.hxx b/connectivity/source/inc/ado/AConnection.hxx index 3e7581ec6d03..c2c82100363d 100644 --- a/connectivity/source/inc/ado/AConnection.hxx +++ b/connectivity/source/inc/ado/AConnection.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <map> +#include <string_view> #include <connectivity/CommonTools.hxx> #include <OTypeInfo.hxx> #include <TConnection.hxx> @@ -71,7 +72,7 @@ namespace connectivity::ado OConnection(ODriver* _pDriver); // OConnection(const SQLHANDLE _pConnectionHandle); ~OConnection() override; - void construct(const OUString& url,const css::uno::Sequence< css::beans::PropertyValue >& info); + void construct(std::u16string_view url,const css::uno::Sequence< css::beans::PropertyValue >& info); //XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; diff --git a/connectivity/source/inc/ado/AGroup.hxx b/connectivity/source/inc/ado/AGroup.hxx index f46577d0fd55..00207a5fa23a 100644 --- a/connectivity/source/inc/ado/AGroup.hxx +++ b/connectivity/source/inc/ado/AGroup.hxx @@ -45,10 +45,6 @@ namespace connectivity::ado OAdoGroup(OCatalog* _pParent,bool _bCase, ADOGroup* _pGroup=nullptr); OAdoGroup(OCatalog* _pParent,bool _bCase, const OUString& Name); - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - // XAuthorizable virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) override; virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) override; diff --git a/connectivity/source/inc/ado/AIndex.hxx b/connectivity/source/inc/ado/AIndex.hxx index 7bc54f788aec..98c3a77d1ceb 100644 --- a/connectivity/source/inc/ado/AIndex.hxx +++ b/connectivity/source/inc/ado/AIndex.hxx @@ -38,9 +38,6 @@ namespace connectivity::ado public: OAdoIndex(bool _bCase, OConnection* _pConnection,ADOIndex* _pIndex); OAdoIndex(bool _bCase, OConnection* _pConnection); - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); WpADOIndex getImpl() const { return m_aIndex;} }; diff --git a/connectivity/source/inc/ado/AKey.hxx b/connectivity/source/inc/ado/AKey.hxx index 67e05b86d5f9..5ec3fa972b12 100644 --- a/connectivity/source/inc/ado/AKey.hxx +++ b/connectivity/source/inc/ado/AKey.hxx @@ -41,10 +41,6 @@ namespace connectivity::ado OAdoKey(bool _bCase,OConnection* _pConnection,ADOKey* _pKey); OAdoKey(bool _bCase,OConnection* _pConnection); - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - WpADOKey getImpl() const { return m_aKey;} // map the update/delete rules static RuleEnum Map2Rule(sal_Int32 _eNum); diff --git a/connectivity/source/inc/ado/ATable.hxx b/connectivity/source/inc/ado/ATable.hxx index 07a16ae6ae4f..827485a6b480 100644 --- a/connectivity/source/inc/ado/ATable.hxx +++ b/connectivity/source/inc/ado/ATable.hxx @@ -53,9 +53,6 @@ namespace connectivity::ado virtual OUString SAL_CALL getName() override; OUString getSchema() const { return m_SchemaName; } virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() const override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); // XRename virtual void SAL_CALL rename( const OUString& newName ) override; diff --git a/connectivity/source/inc/ado/AUser.hxx b/connectivity/source/inc/ado/AUser.hxx index 849c3a98a5eb..8d0c0f7321b6 100644 --- a/connectivity/source/inc/ado/AUser.hxx +++ b/connectivity/source/inc/ado/AUser.hxx @@ -48,9 +48,6 @@ namespace connectivity::ado OAdoUser(OCatalog* _pParent,bool _bCase, ADOUser* _pUser=nullptr); OAdoUser(OCatalog* _pParent,bool _bCase, const OUString& Name); - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); // XUser virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override; // XAuthorizable diff --git a/connectivity/source/inc/ado/AView.hxx b/connectivity/source/inc/ado/AView.hxx index 6f8d7a337494..db81c4e70bb5 100644 --- a/connectivity/source/inc/ado/AView.hxx +++ b/connectivity/source/inc/ado/AView.hxx @@ -40,10 +40,6 @@ namespace connectivity::ado public: OAdoView(bool _bCase, ADOView* _pView=nullptr); - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - WpADOView getImpl() const { return m_aView;} }; } diff --git a/connectivity/source/inc/ado/Aolevariant.hxx b/connectivity/source/inc/ado/Aolevariant.hxx index 256be7dd6c0d..ba0653156a94 100644 --- a/connectivity/source/inc/ado/Aolevariant.hxx +++ b/connectivity/source/inc/ado/Aolevariant.hxx @@ -33,27 +33,6 @@ namespace com::sun::star::util namespace connectivity::ado { - class OLEString - { - BSTR m_sStr; - public: - OLEString(); - OLEString(const BSTR& _sBStr); - OLEString(std::u16string_view _sBStr); - OLEString(const OLEString& _rRh) - { - OLEString::operator=(_rRh); - } - ~OLEString(); - OLEString& operator=(std::u16string_view _rSrc); - OLEString& operator=(const BSTR& _rSrc); - OLEString& operator=(const OLEString& _rSrc); - OUString asOUString() const; - BSTR asBSTR() const; - BSTR* getAddress(); - sal_Int32 length() const; - }; - class OLEVariant : public ::tagVARIANT { public: diff --git a/connectivity/source/inc/ado/Awrapado.hxx b/connectivity/source/inc/ado/Awrapado.hxx index 8bc8cffb2ecd..507b85522674 100644 --- a/connectivity/source/inc/ado/Awrapado.hxx +++ b/connectivity/source/inc/ado/Awrapado.hxx @@ -106,7 +106,7 @@ namespace connectivity::ado ADORecordset* getIndexInfo( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table, bool unique, bool approximate ); ADORecordset* getTablePrivileges( const css::uno::Any& catalog, const OUString& schemaPattern, - const OUString& tableNamePattern ); + std::u16string_view tableNamePattern ); ADORecordset* getCrossReference( const css::uno::Any& primaryCatalog, const OUString& primarySchema, std::u16string_view primaryTable, @@ -115,18 +115,18 @@ namespace connectivity::ado std::u16string_view foreignTable); ADORecordset* getProcedures( const css::uno::Any& catalog, const OUString& schemaPattern, - const OUString& procedureNamePattern ); + std::u16string_view procedureNamePattern ); ADORecordset* getProcedureColumns( const css::uno::Any& catalog, const OUString& schemaPattern, - const OUString& procedureNamePattern, - const OUString& columnNamePattern ); + std::u16string_view procedureNamePattern, + std::u16string_view columnNamePattern ); ADORecordset* getTables( const css::uno::Any& catalog, const OUString& schemaPattern, - const OUString& tableNamePattern, + std::u16string_view tableNamePattern, const css::uno::Sequence< OUString >& types ); ADORecordset* getColumns( const css::uno::Any& catalog, const OUString& schemaPattern, - const OUString& tableNamePattern, + std::u16string_view tableNamePattern, std::u16string_view columnNamePattern ); ADORecordset* getColumnPrivileges( const css::uno::Any& catalog, const OUString& schemaPattern, diff --git a/connectivity/source/inc/ado/adoimp.hxx b/connectivity/source/inc/ado/adoimp.hxx index 58e268d9c68a..60c6fd313d77 100644 --- a/connectivity/source/inc/ado/adoimp.hxx +++ b/connectivity/source/inc/ado/adoimp.hxx @@ -24,16 +24,17 @@ struct ADOConnection; +namespace sal::systools { class BStr; }; + namespace connectivity::ado { class WpADOField; - class OLEString; class ADOS { public: // Also here: Free BSTR with SysFreeString()! - static OLEString& GetKeyStr(); + static sal::systools::BStr& GetKeyStr(); static const CLSID CLSID_ADOCATALOG_25; static const IID IID_ADOCATALOG_25; diff --git a/connectivity/source/inc/calc/CTable.hxx b/connectivity/source/inc/calc/CTable.hxx index a8f49b661bc4..b4751fd876d7 100644 --- a/connectivity/source/inc/calc/CTable.hxx +++ b/connectivity/source/inc/calc/CTable.hxx @@ -64,10 +64,6 @@ namespace connectivity::calc virtual void SAL_CALL disposing() override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - void construct() override; }; diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx index a75ce918ff6c..3cc7da9ad1d3 100644 --- a/connectivity/source/inc/dbase/DIndex.hxx +++ b/connectivity/source/inc/dbase/DIndex.hxx @@ -23,7 +23,7 @@ #include <dbase/DTable.hxx> #include <dbase/dindexnode.hxx> -inline constexpr OStringLiteral dBASE_III_GROUP = "dBase III"; +inline constexpr OString dBASE_III_GROUP = "dBase III"_ostr; namespace connectivity::dbase { @@ -91,10 +91,6 @@ namespace connectivity::dbase void openIndexFile(); virtual void refreshColumns() override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - const ODbaseTable* getTable() const { return m_pTable; } const NDXHeader& getHeader() const { return m_aHeader; } std::unique_ptr<OIndexIterator> createIterator(); diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx index 6e7b2e184c32..bb0b6baa5fa2 100644 --- a/connectivity/source/inc/dbase/DTable.hxx +++ b/connectivity/source/inc/dbase/DTable.hxx @@ -161,9 +161,6 @@ namespace connectivity::dbase virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; virtual void SAL_CALL disposing() override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); // XAlterTable virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void SAL_CALL alterColumnByIndex( sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; @@ -182,7 +179,7 @@ namespace connectivity::dbase virtual void dropColumn(sal_Int32 _nPos) override; static OUString getEntry(file::OConnection const * _pConnection, std::u16string_view _sURL ); - static bool Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, sdbcx::OCollection* _pIndexes ); + static bool Drop_Static(std::u16string_view _sUrl, bool _bHasMemoFields, sdbcx::OCollection* _pIndexes ); virtual void refreshHeader() override; diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 6000c36224cf..c1db23f76b60 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -44,7 +44,7 @@ namespace connectivity::dbase public: ONDXKey(); - ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec); + ONDXKey(ORowSetValue aVal, sal_Int32 eType, sal_uInt32 nRec); ONDXKey(const OUString& aStr, sal_uInt32 nRec); ONDXKey(double aVal, sal_uInt32 nRec); @@ -163,8 +163,8 @@ namespace connectivity::dbase const ODbaseIndex& GetIndex() const {return rIndex;} // Setting the child, via reference to retain the PagePos - void SetChild(ONDXPagePtr aCh); - void SetParent(ONDXPagePtr aPa); + void SetChild(const ONDXPagePtr& rCh); + void SetParent(const ONDXPagePtr& rPa); sal_uInt16 Search(const ONDXKey& rSearch); sal_uInt16 Search(const ONDXPage* pPage); @@ -209,14 +209,14 @@ namespace connectivity::dbase inline bool ONDXPage::HasParent() const {return aParent.Is();} inline const ONDXPagePtr& ONDXPage::GetParent() const {return aParent;} - inline void ONDXPage::SetParent(ONDXPagePtr aPa = ONDXPagePtr()) + inline void ONDXPage::SetParent(const ONDXPagePtr& rPa = ONDXPagePtr()) { - aParent = aPa; + aParent = rPa; } - inline void ONDXPage::SetChild(ONDXPagePtr aCh = ONDXPagePtr()) + inline void ONDXPage::SetChild(const ONDXPagePtr& rCh = ONDXPagePtr()) { - aChild = aCh; + aChild = rCh; if (aChild.Is()) aChild->SetParent(this); } @@ -246,7 +246,7 @@ namespace connectivity::dbase ONDXKey& GetKey() { return aKey;} // Setting the child, via reference to retain the PagePos - void SetChild(ONDXPagePtr aCh = ONDXPagePtr(), ONDXPage* = nullptr); + void SetChild(const ONDXPagePtr& rCh = ONDXPagePtr(), ONDXPage* = nullptr); void Write(SvStream &rStream, const ONDXPage& rPage) const; void Read(SvStream &rStream, ODbaseIndex const &); @@ -293,9 +293,9 @@ namespace connectivity::dbase return !operator > (rKey); } - inline void ONDXNode::SetChild(ONDXPagePtr aCh, ONDXPage* pParent) + inline void ONDXNode::SetChild(const ONDXPagePtr& rCh, ONDXPage* pParent) { - aChild = aCh; + aChild = rCh; if (aChild.Is()) aChild->SetParent(pParent); } diff --git a/connectivity/source/inc/file/FColumns.hxx b/connectivity/source/inc/file/FColumns.hxx index f5fce16b6f6a..056934f88c65 100644 --- a/connectivity/source/inc/file/FColumns.hxx +++ b/connectivity/source/inc/file/FColumns.hxx @@ -26,7 +26,7 @@ namespace connectivity::file { - class OOO_DLLPUBLIC_FILE OColumns : public sdbcx::OCollection + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OColumns : public sdbcx::OCollection { protected: OFileTable* m_pTable; diff --git a/connectivity/source/inc/file/FConnection.hxx b/connectivity/source/inc/file/FConnection.hxx index 36b095e70427..e6412992ab77 100644 --- a/connectivity/source/inc/file/FConnection.hxx +++ b/connectivity/source/inc/file/FConnection.hxx @@ -98,7 +98,7 @@ namespace connectivity::file virtual void SAL_CALL clearWarnings( ) override; //XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); + static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); // no interface methods css::uno::Reference< css::ucb::XDynamicResultSet > getDir() const; diff --git a/connectivity/source/inc/file/FDriver.hxx b/connectivity/source/inc/file/FDriver.hxx index 9d289d618a3d..0351c59ca27a 100644 --- a/connectivity/source/inc/file/FDriver.hxx +++ b/connectivity/source/inc/file/FDriver.hxx @@ -42,7 +42,7 @@ namespace connectivity::file // for this Driver css::uno::Reference< css::uno::XComponentContext > m_xContext; public: - OFileDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext); + OFileDriver(css::uno::Reference< css::uno::XComponentContext > _xContext); // OComponentHelper virtual void SAL_CALL disposing() override; diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx index 71d222d82030..0870593e6388 100644 --- a/connectivity/source/inc/file/FResultSet.hxx +++ b/connectivity/source/inc/file/FResultSet.hxx @@ -40,6 +40,7 @@ #include <TSortIndex.hxx> #include <TSkipDeletedSet.hxx> #include <com/sun/star/lang/XEventListener.hpp> +#include <o3tl/safeint.hxx> namespace connectivity::file { @@ -53,10 +54,9 @@ namespace connectivity::file css::sdbc::XCloseable, css::sdbc::XColumnLocate, css::lang::XServiceInfo, - css::lang::XEventListener, - css::lang::XUnoTunnel> OResultSet_BASE; + css::lang::XEventListener> OResultSet_BASE; - class OOO_DLLPUBLIC_FILE OResultSet : + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OResultSet : public cppu::BaseMutex, public ::connectivity::IResultSetHelper, public OResultSet_BASE, @@ -245,9 +245,6 @@ namespace connectivity::file virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale ) override; // XColumnLocate virtual sal_Int32 SAL_CALL findColumn( const OUString& columnName ) override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); //XEventlistener virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override; @@ -292,7 +289,7 @@ namespace connectivity::file OSL_ENSURE(column > 0, "file::OResultSet::mapColumn: invalid column index!"); // the first column (index 0) is for convenience only. The first real select column is number 1. - if ((column > 0) && (column < static_cast<sal_Int32>(m_aColMapping.size()))) + if ((column > 0) && (o3tl::make_unsigned(column) < m_aColMapping.size())) map = m_aColMapping[column]; return map; diff --git a/connectivity/source/inc/file/FResultSetMetaData.hxx b/connectivity/source/inc/file/FResultSetMetaData.hxx index 65fc0bb3c83e..dee656a915f4 100644 --- a/connectivity/source/inc/file/FResultSetMetaData.hxx +++ b/connectivity/source/inc/file/FResultSetMetaData.hxx @@ -46,7 +46,7 @@ namespace connectivity::file virtual ~OResultSetMetaData() override; public: // a Constructor, that is needed for when Returning the Object is needed: - OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const OUString& _aTableName,OFileTable* _pTable); + OResultSetMetaData(::rtl::Reference<connectivity::OSQLColumns> _xColumns, OUString _aTableName, OFileTable* _pTable); virtual sal_Int32 SAL_CALL getColumnCount( ) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) override; diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx index 80c662ba4d38..d8bbd92d6c85 100644 --- a/connectivity/source/inc/file/FTable.hxx +++ b/connectivity/source/inc/file/FTable.hxx @@ -83,10 +83,6 @@ namespace connectivity::file const OUString& getSchema() const { return m_SchemaName; } bool isReadOnly() const { return !m_bWriteable; } // m_pFileStream && !m_pFileStream->IsWritable(); } - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - sal_Int32 getFilePos() const { return m_nFilePos; } diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index c78461743c27..541377c7dd5f 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -19,12 +19,14 @@ #pragma once +#include <config_options.h> #include <connectivity/sqliterator.hxx> #include <com/sun/star/sdbc/DataType.hpp> #include <connectivity/FValue.hxx> #include <file/filedllapi.hxx> #include <stack> +#include <utility> namespace connectivity { @@ -35,7 +37,7 @@ namespace connectivity class OOperand; typedef std::stack<OOperand*> OCodeStack; - class OOO_DLLPUBLIC_FILE OCode + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OCode { public: //virtual dtor to allow this to be the root of the class hierarchy @@ -107,9 +109,9 @@ namespace connectivity protected: OOperandValue(){} - OOperandValue(const ORowSetValue& _rVar, sal_Int32 eDbType) + OOperandValue(ORowSetValue _aVar, sal_Int32 eDbType) : OOperand(eDbType) - , m_aValue(_rVar) + , m_aValue(std::move(_aVar)) {} OOperandValue(sal_Int32 eDbType) :OOperand(eDbType){} @@ -243,7 +245,7 @@ namespace connectivity virtual bool operate(const OOperand*, const OOperand*) const override; }; - class OOO_DLLPUBLIC_FILE OOp_COMPARE : public OBoolOperator + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OOp_COMPARE : public OBoolOperator { sal_Int32 aPredicateType; diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index ebdb0679e452..72afcdb0a84e 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -19,6 +19,7 @@ #pragma once #include <file/fcode.hxx> +#include <utility> namespace connectivity { @@ -86,7 +87,7 @@ namespace connectivity ::rtl::Reference<OPredicateCompiler> m_rCompiler; public: - OPredicateInterpreter(const ::rtl::Reference<OPredicateCompiler>& rComp) : m_rCompiler(rComp){} + OPredicateInterpreter(::rtl::Reference<OPredicateCompiler> xComp) : m_rCompiler(std::move(xComp)){} virtual ~OPredicateInterpreter() override; bool evaluate(OCodeList& rCodeList); diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx index 2e15040d74d1..99359edfddaa 100644 --- a/connectivity/source/inc/flat/ETable.hxx +++ b/connectivity/source/inc/flat/ETable.hxx @@ -92,10 +92,6 @@ namespace connectivity::flat virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; virtual void SAL_CALL disposing() override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - OUString getEntry() const; }; diff --git a/connectivity/source/inc/hsqldb/HStorageMap.hxx b/connectivity/source/inc/hsqldb/HStorageMap.hxx index ee4590864016..1186c680ac07 100644 --- a/connectivity/source/inc/hsqldb/HStorageMap.hxx +++ b/connectivity/source/inc/hsqldb/HStorageMap.hxx @@ -86,7 +86,7 @@ namespace connectivity::hsqldb static TStreamMap::mapped_type getRegisteredStream( JNIEnv * env, jstring name, jstring key); static OUString jstring2ustring(JNIEnv * env, jstring jstr); - static OUString removeURLPrefix(const OUString& _sURL,const OUString& _sFileURL); + static OUString removeURLPrefix(std::u16string_view _sURL, std::u16string_view _sFileURL); static OUString removeOldURLPrefix(const OUString& _sURL); static void throwJavaException(const css::uno::Exception& _aException,JNIEnv * env); }; diff --git a/connectivity/source/inc/hsqldb/HTable.hxx b/connectivity/source/inc/hsqldb/HTable.hxx index bc345d775c28..d6ac5ced7646 100644 --- a/connectivity/source/inc/hsqldb/HTable.hxx +++ b/connectivity/source/inc/hsqldb/HTable.hxx @@ -85,9 +85,6 @@ namespace connectivity::hsqldb // ODescriptor virtual void construct() override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; //XTypeProvider diff --git a/connectivity/source/inc/hsqldb/HTables.hxx b/connectivity/source/inc/hsqldb/HTables.hxx index a421be35e1b4..bff5e0e6421a 100644 --- a/connectivity/source/inc/hsqldb/HTables.hxx +++ b/connectivity/source/inc/hsqldb/HTables.hxx @@ -20,6 +20,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <utility> namespace connectivity::hsqldb { class OTables final : public sdbcx::OCollection @@ -35,9 +36,9 @@ namespace connectivity::hsqldb void createTable( const css::uno::Reference< css::beans::XPropertySet >& descriptor ); virtual OUString getNameForObject(const sdbcx::ObjectType& _xObject) override; public: - OTables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, + OTables(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - ,m_xMetaData(_rMetaData) + ,m_xMetaData(std::move(_xMetaData)) {} // only the name is identical to ::cppu::OComponentHelper diff --git a/connectivity/source/inc/hsqldb/HUser.hxx b/connectivity/source/inc/hsqldb/HUser.hxx index dc69c636eb00..67c44e185bd2 100644 --- a/connectivity/source/inc/hsqldb/HUser.hxx +++ b/connectivity/source/inc/hsqldb/HUser.hxx @@ -38,8 +38,8 @@ namespace connectivity::hsqldb public: virtual void refreshGroups() override; public: - OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection); - OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection,const OUString& Name); + OHSQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection); + OHSQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection, const OUString& Name); // XUser virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override; diff --git a/connectivity/source/inc/hsqldb/HUsers.hxx b/connectivity/source/inc/hsqldb/HUsers.hxx index 5f72bceb7b9b..a5a099e9927e 100644 --- a/connectivity/source/inc/hsqldb/HUsers.hxx +++ b/connectivity/source/inc/hsqldb/HUsers.hxx @@ -43,7 +43,7 @@ namespace connectivity OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector, - const css::uno::Reference< css::sdbc::XConnection >& _xConnection, + css::uno::Reference< css::sdbc::XConnection > _xConnection, connectivity::sdbcx::IRefreshableUsers* _pParent); }; } diff --git a/connectivity/source/inc/mysql/YDriver.hxx b/connectivity/source/inc/mysql/YDriver.hxx index 7bdb499718fd..84fad1af1c99 100644 --- a/connectivity/source/inc/mysql/YDriver.hxx +++ b/connectivity/source/inc/mysql/YDriver.hxx @@ -72,7 +72,7 @@ namespace connectivity @return The driver which was currently selected. */ - css::uno::Reference< css::sdbc::XDriver > loadDriver( const OUString& url, const css::uno::Sequence< css::beans::PropertyValue >& info ); + css::uno::Reference< css::sdbc::XDriver > loadDriver( std::u16string_view url, const css::uno::Sequence< css::beans::PropertyValue >& info ); public: /** creates a new delegator for a mysql driver diff --git a/connectivity/source/inc/mysql/YTable.hxx b/connectivity/source/inc/mysql/YTable.hxx index 534c2319accb..c891b7d7d95e 100644 --- a/connectivity/source/inc/mysql/YTable.hxx +++ b/connectivity/source/inc/mysql/YTable.hxx @@ -92,9 +92,6 @@ namespace connectivity::mysql // ODescriptor virtual void construct() override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); // XAlterTable virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; diff --git a/connectivity/source/inc/mysql/YTables.hxx b/connectivity/source/inc/mysql/YTables.hxx index 11d76812399c..3e3283ca96da 100644 --- a/connectivity/source/inc/mysql/YTables.hxx +++ b/connectivity/source/inc/mysql/YTables.hxx @@ -21,6 +21,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <SQLStatementHelper.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <utility> namespace connectivity::mysql { class OTables final : public sdbcx::OCollection, @@ -37,9 +38,9 @@ namespace connectivity::mysql void createTable( const css::uno::Reference< css::beans::XPropertySet >& descriptor ); virtual OUString getNameForObject(const sdbcx::ObjectType& _xObject) override; public: - OTables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, + OTables(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - ,m_xMetaData(_rMetaData) + ,m_xMetaData(std::move(_xMetaData)) {} // only the name is identical to ::cppu::OComponentHelper diff --git a/connectivity/source/inc/mysql/YUser.hxx b/connectivity/source/inc/mysql/YUser.hxx index ecb93fa21118..1713f63bfb64 100644 --- a/connectivity/source/inc/mysql/YUser.hxx +++ b/connectivity/source/inc/mysql/YUser.hxx @@ -38,8 +38,8 @@ namespace connectivity::mysql public: virtual void refreshGroups() override; public: - OMySQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection); - OMySQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection,const OUString& Name); + OMySQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection); + OMySQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection, const OUString& Name); // XUser virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override; diff --git a/connectivity/source/inc/mysql/YUsers.hxx b/connectivity/source/inc/mysql/YUsers.hxx index d27244775c07..e4b35c12e718 100644 --- a/connectivity/source/inc/mysql/YUsers.hxx +++ b/connectivity/source/inc/mysql/YUsers.hxx @@ -43,7 +43,7 @@ namespace connectivity OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector, - const css::uno::Reference< css::sdbc::XConnection >& _xConnection, + css::uno::Reference< css::sdbc::XConnection > _xConnection, connectivity::sdbcx::IRefreshableUsers* _pParent); }; } diff --git a/connectivity/source/inc/mysql/YViews.hxx b/connectivity/source/inc/mysql/YViews.hxx index 22a1f605b657..2e9a1b25162a 100644 --- a/connectivity/source/inc/mysql/YViews.hxx +++ b/connectivity/source/inc/mysql/YViews.hxx @@ -20,6 +20,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <utility> namespace connectivity::mysql { class OViews final : public sdbcx::OCollection @@ -34,9 +35,9 @@ namespace connectivity::mysql void createView( const css::uno::Reference< css::beans::XPropertySet >& descriptor ); public: - OViews(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, + OViews(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - ,m_xMetaData(_rMetaData) + ,m_xMetaData(std::move(_xMetaData)) ,m_bInDrop(false) {} diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx index b08544b859bd..93875c66193c 100644 --- a/connectivity/source/inc/odbc/OConnection.hxx +++ b/connectivity/source/inc/odbc/OConnection.hxx @@ -41,7 +41,7 @@ namespace connectivity::odbc typedef connectivity::OMetaConnection OConnection_BASE; typedef std::vector< ::connectivity::OTypeInfo> TTypeInfoVector; - class OOO_DLLPUBLIC_ODBCBASE OConnection final : + class OConnection final : public OConnection_BASE, public OAutoRetrievingBase { diff --git a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx index b0b4a6552a37..457d1e684206 100644 --- a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx +++ b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx @@ -29,7 +29,7 @@ namespace connectivity::odbc //************ Class: ODatabaseMetaData - class OOO_DLLPUBLIC_ODBCBASE ODatabaseMetaData final : + class ODatabaseMetaData final : public ODatabaseMetaDataBase { SQLHANDLE m_aConnectionHandle; diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx index 5d6982807d48..dc011f37802c 100644 --- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx +++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx @@ -53,7 +53,7 @@ namespace connectivity::odbc css::sdbc::XCloseable, css::sdbc::XColumnLocate> ODatabaseMetaDataResultSet_BASE; - class OOO_DLLPUBLIC_ODBCBASE ODatabaseMetaDataResultSet : + class ODatabaseMetaDataResultSet : public cppu::BaseMutex, public ODatabaseMetaDataResultSet_BASE, public ::cppu::OPropertySetHelper, diff --git a/connectivity/source/inc/odbc/ODriver.hxx b/connectivity/source/inc/odbc/ODriver.hxx index 0152346b2473..6cba90648d6e 100644 --- a/connectivity/source/inc/odbc/ODriver.hxx +++ b/connectivity/source/inc/odbc/ODriver.hxx @@ -49,7 +49,7 @@ namespace connectivity::odbc public: - ODBCDriver(const css::uno::Reference< css::uno::XComponentContext >& rxContext); + ODBCDriver(css::uno::Reference< css::uno::XComponentContext > xContext); // only possibility to get the odbc functions virtual oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const = 0; diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx index da3545c9ad79..a44fe5a15031 100644 --- a/connectivity/source/inc/odbc/OFunctions.hxx +++ b/connectivity/source/inc/odbc/OFunctions.hxx @@ -523,7 +523,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath); #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLFunctionId::GetCursorName)))(a,b,c,d) - typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHSTMT ConnectionHandle, + typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHDBC ConnectionHandle, SQLCHAR * InStatementText, SQLINTEGER TextLength1, SQLCHAR * OutStatementText, diff --git a/connectivity/source/inc/odbc/OPreparedStatement.hxx b/connectivity/source/inc/odbc/OPreparedStatement.hxx index 37e29db9c5a2..aa5e895bfc79 100644 --- a/connectivity/source/inc/odbc/OPreparedStatement.hxx +++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx @@ -38,7 +38,7 @@ namespace connectivity::odbc css::sdbc::XResultSetMetaDataSupplier, css::lang::XServiceInfo> OPreparedStatement_BASE; - class OOO_DLLPUBLIC_ODBCBASE OPreparedStatement final : + class OPreparedStatement final : public OStatement_BASE2, public OPreparedStatement_BASE { diff --git a/connectivity/source/inc/odbc/OResultSet.hxx b/connectivity/source/inc/odbc/OResultSet.hxx index 6de7adc28174..719c6be14da8 100644 --- a/connectivity/source/inc/odbc/OResultSet.hxx +++ b/connectivity/source/inc/odbc/OResultSet.hxx @@ -102,12 +102,12 @@ namespace connectivity::odbc typedef std::map< css::uno::Sequence<sal_Int8>, sal_Int32,TBookmarkPosMapCompare > TBookmarkPosMap; - class OOO_DLLPUBLIC_ODBCBASE OResultSet : - public cppu::BaseMutex, - public ::connectivity::IResultSetHelper, - public OResultSet_BASE, - public ::cppu::OPropertySetHelper, - public ::comphelper::OPropertyArrayUsageHelper<OResultSet> + class OResultSet : + public cppu::BaseMutex, + public ::connectivity::IResultSetHelper, + public OResultSet_BASE, + public ::cppu::OPropertySetHelper, + public ::comphelper::OPropertyArrayUsageHelper<OResultSet> { protected: TBookmarkPosMap m_aPosToBookmarks; diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx index 6c1acc13bfb9..76abe6eecd06 100644 --- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx +++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx @@ -33,7 +33,7 @@ namespace connectivity::odbc typedef ::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData> OResultSetMetaData_BASE; - class OOO_DLLPUBLIC_ODBCBASE OResultSetMetaData final : + class OResultSetMetaData final : public OResultSetMetaData_BASE { std::vector<sal_Int32> m_vMapping; // when not every column is needed @@ -62,7 +62,7 @@ namespace connectivity::odbc :m_vMapping(std::move(_vMapping)) ,m_aStatementHandle( _pStmt ) ,m_pConnection(_pConnection) - ,m_nColCount(_vMapping.size()-1) + ,m_nColCount(m_vMapping.size()-1) ,m_bUseODBC2Types(false) {} virtual ~OResultSetMetaData() override; diff --git a/connectivity/source/inc/odbc/OStatement.hxx b/connectivity/source/inc/odbc/OStatement.hxx index 1e483108732d..2f0d0d814fea 100644 --- a/connectivity/source/inc/odbc/OStatement.hxx +++ b/connectivity/source/inc/odbc/OStatement.hxx @@ -52,11 +52,11 @@ namespace connectivity::odbc //************ Class: java.sql.Statement - class OOO_DLLPUBLIC_ODBCBASE OStatement_Base : - public cppu::BaseMutex, - public OStatement_BASE, - public ::cppu::OPropertySetHelper, - public ::comphelper::OPropertyArrayUsageHelper<OStatement_Base> + class OStatement_Base : + public cppu::BaseMutex, + public OStatement_BASE, + public ::cppu::OPropertySetHelper, + public ::comphelper::OPropertyArrayUsageHelper<OStatement_Base> { css::sdbc::SQLWarning m_aLastWarning; @@ -218,10 +218,10 @@ namespace connectivity::odbc virtual void SAL_CALL disposing() override; }; - class OOO_DLLPUBLIC_ODBCBASE OStatement : - public OStatement_BASE2, - public css::sdbc::XBatchExecution, - public css::lang::XServiceInfo + class OStatement : + public OStatement_BASE2, + public css::sdbc::XBatchExecution, + public css::lang::XServiceInfo { protected: virtual ~OStatement() override {} diff --git a/connectivity/source/inc/propertyids.hxx b/connectivity/source/inc/propertyids.hxx index 1a9e3720f963..b10b4f008e64 100644 --- a/connectivity/source/inc/propertyids.hxx +++ b/connectivity/source/inc/propertyids.hxx @@ -36,74 +36,76 @@ namespace dbtools }; } -#define PROPERTY_ID_QUERYTIMEOUT 1 -#define PROPERTY_ID_MAXFIELDSIZE 2 -#define PROPERTY_ID_MAXROWS 3 -#define PROPERTY_ID_CURSORNAME 4 -#define PROPERTY_ID_RESULTSETCONCURRENCY 5 -#define PROPERTY_ID_RESULTSETTYPE 6 -#define PROPERTY_ID_FETCHDIRECTION 7 -#define PROPERTY_ID_FETCHSIZE 8 -#define PROPERTY_ID_ESCAPEPROCESSING 9 -#define PROPERTY_ID_USEBOOKMARKS 10 -// Column -#define PROPERTY_ID_NAME 11 -#define PROPERTY_ID_TYPE 12 -#define PROPERTY_ID_TYPENAME 13 -#define PROPERTY_ID_PRECISION 14 -#define PROPERTY_ID_SCALE 15 -#define PROPERTY_ID_ISNULLABLE 16 -#define PROPERTY_ID_ISAUTOINCREMENT 17 -#define PROPERTY_ID_ISROWVERSION 18 -#define PROPERTY_ID_DESCRIPTION 19 -#define PROPERTY_ID_DEFAULTVALUE 20 +enum PropertyId +{ + PROPERTY_ID_QUERYTIMEOUT = 1, + PROPERTY_ID_MAXFIELDSIZE = 2, + PROPERTY_ID_MAXROWS = 3, + PROPERTY_ID_CURSORNAME = 4, + PROPERTY_ID_RESULTSETCONCURRENCY = 5, + PROPERTY_ID_RESULTSETTYPE = 6, + PROPERTY_ID_FETCHDIRECTION = 7, + PROPERTY_ID_FETCHSIZE = 8, + PROPERTY_ID_ESCAPEPROCESSING = 9, + PROPERTY_ID_USEBOOKMARKS = 10, + + // Column + PROPERTY_ID_NAME = 11, + PROPERTY_ID_TYPE = 12, + PROPERTY_ID_TYPENAME = 13, + PROPERTY_ID_PRECISION = 14, + PROPERTY_ID_SCALE = 15, + PROPERTY_ID_ISNULLABLE = 16, + PROPERTY_ID_ISAUTOINCREMENT = 17, + PROPERTY_ID_ISROWVERSION = 18, + PROPERTY_ID_DESCRIPTION = 19, + PROPERTY_ID_DEFAULTVALUE = 20, -#define PROPERTY_ID_REFERENCEDTABLE 21 -#define PROPERTY_ID_UPDATERULE 22 -#define PROPERTY_ID_DELETERULE 23 -#define PROPERTY_ID_CATALOG 24 -#define PROPERTY_ID_ISUNIQUE 25 -#define PROPERTY_ID_ISPRIMARYKEYINDEX 26 -#define PROPERTY_ID_ISCLUSTERED 27 -#define PROPERTY_ID_ISASCENDING 28 -#define PROPERTY_ID_SCHEMANAME 29 -#define PROPERTY_ID_CATALOGNAME 30 + PROPERTY_ID_REFERENCEDTABLE = 21, + PROPERTY_ID_UPDATERULE = 22, + PROPERTY_ID_DELETERULE = 23, + PROPERTY_ID_CATALOG = 24, + PROPERTY_ID_ISUNIQUE = 25, + PROPERTY_ID_ISPRIMARYKEYINDEX = 26, + PROPERTY_ID_ISCLUSTERED = 27, + PROPERTY_ID_ISASCENDING = 28, + PROPERTY_ID_SCHEMANAME = 29, + PROPERTY_ID_CATALOGNAME = 30, -#define PROPERTY_ID_COMMAND 31 -#define PROPERTY_ID_CHECKOPTION 32 -#define PROPERTY_ID_PASSWORD 33 -#define PROPERTY_ID_RELATEDCOLUMN 34 + PROPERTY_ID_COMMAND = 31, + PROPERTY_ID_CHECKOPTION = 32, + PROPERTY_ID_PASSWORD = 33, + PROPERTY_ID_RELATEDCOLUMN = 34, -#define PROPERTY_ID_FUNCTION 35 -#define PROPERTY_ID_TABLENAME 36 -#define PROPERTY_ID_REALNAME 37 -#define PROPERTY_ID_DBASEPRECISIONCHANGED 38 -#define PROPERTY_ID_ISCURRENCY 39 -#define PROPERTY_ID_ISBOOKMARKABLE 40 + PROPERTY_ID_FUNCTION = 35, + PROPERTY_ID_TABLENAME = 36, + PROPERTY_ID_REALNAME = 37, + PROPERTY_ID_DBASEPRECISIONCHANGED = 38, + PROPERTY_ID_ISCURRENCY = 39, + PROPERTY_ID_ISBOOKMARKABLE = 40, -#define PROPERTY_ID_INVALID_INDEX 41 -#define PROPERTY_ID_HY010 43 -#define PROPERTY_ID_LABEL 44 -#define PROPERTY_ID_DELIMITER 45 -#define PROPERTY_ID_FORMATKEY 46 -#define PROPERTY_ID_LOCALE 47 -#define PROPERTY_ID_IM001 48 + PROPERTY_ID_HY010 = 41, + PROPERTY_ID_LABEL = 42, + PROPERTY_ID_DELIMITER = 43, + PROPERTY_ID_FORMATKEY = 44, + PROPERTY_ID_LOCALE = 45, -#define PROPERTY_ID_AUTOINCREMENTCREATION 49 + PROPERTY_ID_AUTOINCREMENTCREATION = 46, -#define PROPERTY_ID_PRIVILEGES 50 -#define PROPERTY_ID_HAVINGCLAUSE 51 + PROPERTY_ID_PRIVILEGES = 47, + PROPERTY_ID_HAVINGCLAUSE = 48, -#define PROPERTY_ID_ISSIGNED 52 -#define PROPERTY_ID_AGGREGATEFUNCTION 53 -#define PROPERTY_ID_ISSEARCHABLE 54 + PROPERTY_ID_ISSIGNED = 49, + PROPERTY_ID_AGGREGATEFUNCTION = 50, + PROPERTY_ID_ISSEARCHABLE = 51, -#define PROPERTY_ID_APPLYFILTER 55 -#define PROPERTY_ID_FILTER 56 -#define PROPERTY_ID_MASTERFIELDS 57 -#define PROPERTY_ID_DETAILFIELDS 58 -#define PROPERTY_ID_FIELDTYPE 59 -#define PROPERTY_ID_VALUE 60 -#define PROPERTY_ID_ACTIVE_CONNECTION 61 + PROPERTY_ID_APPLYFILTER = 52, + PROPERTY_ID_FILTER = 53, + PROPERTY_ID_MASTERFIELDS = 54, + PROPERTY_ID_DETAILFIELDS = 55, + PROPERTY_ID_FIELDTYPE = 56, + PROPERTY_ID_VALUE = 57, + PROPERTY_ID_ACTIVE_CONNECTION = 58 +}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/writer/WConnection.hxx b/connectivity/source/inc/writer/WConnection.hxx index 768518a97c93..5ae8b2818e0f 100644 --- a/connectivity/source/inc/writer/WConnection.hxx +++ b/connectivity/source/inc/writer/WConnection.hxx @@ -40,11 +40,11 @@ namespace connectivity::writer class ODriver; class OWriterConnection : public file::OConnection { - // the spreadsheet document: + // the text document: css::uno::Reference<css::text::XTextDocument> m_xDoc; OUString m_sPassword; OUString m_aFileName; - oslInterlockedCount m_nDocCount; + oslInterlockedCount m_nDocCount = 0; class CloseVetoButTerminateListener : public cppu::WeakComponentImplHelper<css::frame::XTerminateListener> diff --git a/connectivity/source/inc/writer/WTable.hxx b/connectivity/source/inc/writer/WTable.hxx index e19872df531d..46ee5412e0a6 100644 --- a/connectivity/source/inc/writer/WTable.hxx +++ b/connectivity/source/inc/writer/WTable.hxx @@ -40,9 +40,9 @@ class OWriterTable : public OWriterTable_BASE private: css::uno::Reference<css::text::XTextTable> m_xTable; OWriterConnection* m_pWriterConnection; - sal_Int32 m_nStartCol; - sal_Int32 m_nDataCols; - bool m_bHasHeaders; + sal_Int32 m_nStartCol = 0; + sal_Int32 m_nDataCols = 0; + bool m_bHasHeaders = false; void fillColumns(); @@ -54,10 +54,6 @@ public: void SAL_CALL disposing() override; - // css::lang::XUnoTunnel - sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override; - static css::uno::Sequence<sal_Int8> getUnoTunnelId(); - void construct() override; }; |