diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-01-12 15:45:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-01-13 07:36:57 +0100 |
commit | 363a3be9bb17bd85fd52c1f22abdf649e7cd0d0b (patch) | |
tree | 3223ec3147f3d5f4034b5bc2cc2702302526558c /connectivity/source/inc | |
parent | 3fff050a343e7fb45c3c562772b22fb5e824352f (diff) |
loplugin:stringviewparam (clang-cl)
Change-Id: Ie66996f905fcb68ee413171c8727cb42dcb28dbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109178
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/inc')
-rw-r--r-- | connectivity/source/inc/ado/AStatement.hxx | 3 | ||||
-rw-r--r-- | connectivity/source/inc/ado/Awrapado.hxx | 38 | ||||
-rw-r--r-- | connectivity/source/inc/ado/Awrapadox.hxx | 10 | ||||
-rw-r--r-- | connectivity/source/inc/ado/WrapCatalog.hxx | 6 | ||||
-rw-r--r-- | connectivity/source/inc/ado/WrapColumn.hxx | 8 | ||||
-rw-r--r-- | connectivity/source/inc/ado/WrapIndex.hxx | 6 | ||||
-rw-r--r-- | connectivity/source/inc/ado/WrapKey.hxx | 8 | ||||
-rw-r--r-- | connectivity/source/inc/ado/WrapTable.hxx | 6 |
8 files changed, 57 insertions, 28 deletions
diff --git a/connectivity/source/inc/ado/AStatement.hxx b/connectivity/source/inc/ado/AStatement.hxx index 2ec7e2f51d74..a85992d01f03 100644 --- a/connectivity/source/inc/ado/AStatement.hxx +++ b/connectivity/source/inc/ado/AStatement.hxx @@ -31,6 +31,7 @@ #include <cppuhelper/basemutex.hxx> #include <comphelper/proparrhlp.hxx> #include <ado/AConnection.hxx> +#include <string_view> #include <vector> #include <ado/Awrapado.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -125,7 +126,7 @@ namespace connectivity::ado void setFetchSize(sal_Int32 _par0); /// @throws css::sdbc::SQLException /// @throws css::uno::RuntimeException - void setCursorName(const OUString &_par0); + void setCursorName(std::u16string_view _par0); protected: diff --git a/connectivity/source/inc/ado/Awrapado.hxx b/connectivity/source/inc/ado/Awrapado.hxx index 8536bdee6a9f..4e52d13847cb 100644 --- a/connectivity/source/inc/ado/Awrapado.hxx +++ b/connectivity/source/inc/ado/Awrapado.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_AWRAPADO_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_AWRAPADO_HXX +#include <sal/config.h> + +#include <string_view> + #include <com/sun/star/beans/PropertyAttribute.hpp> // Includes for ADO @@ -59,22 +63,22 @@ namespace connectivity::ado WpADOProperties get_Properties() const; OUString GetConnectionString() const; - bool PutConnectionString(const OUString &aCon) const; + bool PutConnectionString(std::u16string_view aCon) const; sal_Int32 GetCommandTimeout() const; void PutCommandTimeout(sal_Int32 nRet); sal_Int32 GetConnectionTimeout() const ; void PutConnectionTimeout(sal_Int32 nRet); bool Close( ) ; - bool Execute(const OUString& CommandText,OLEVariant& RecordsAffected,long Options, WpADORecordset** ppiRset); + bool Execute(std::u16string_view CommandText,OLEVariant& RecordsAffected,long Options, WpADORecordset** ppiRset); bool BeginTrans(); bool CommitTrans( ) ; bool RollbackTrans( ); - bool Open(const OUString& ConnectionString, const OUString& UserID,const OUString& Password,long Options); + bool Open(std::u16string_view ConnectionString, std::u16string_view UserID,std::u16string_view Password,long Options); bool GetErrors(ADOErrors** pErrors); OUString GetDefaultDatabase() const; - bool PutDefaultDatabase(const OUString& _bstr); + bool PutDefaultDatabase(std::u16string_view _bstr); IsolationLevelEnum get_IsolationLevel() const ; bool put_IsolationLevel(const IsolationLevelEnum& eNum) ; @@ -89,7 +93,7 @@ namespace connectivity::ado bool put_Mode(const ConnectModeEnum &eNum) ; OUString get_Provider() const; - bool put_Provider(const OUString& _bstr); + bool put_Provider(std::u16string_view _bstr); sal_Int32 get_State() const; @@ -98,19 +102,19 @@ namespace connectivity::ado OUString get_Version() const; // special methods - ADORecordset* getExportedKeys( const css::uno::Any& catalog, const OUString& schema, const OUString& table ); - ADORecordset* getImportedKeys( const css::uno::Any& catalog, const OUString& schema, const OUString& table ); - ADORecordset* getPrimaryKeys( const css::uno::Any& catalog, const OUString& schema, const OUString& table ); - ADORecordset* getIndexInfo( const css::uno::Any& catalog, const OUString& schema, const OUString& table, bool unique, bool approximate ); + ADORecordset* getExportedKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table ); + ADORecordset* getImportedKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table ); + ADORecordset* getPrimaryKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table ); + 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 ); ADORecordset* getCrossReference( const css::uno::Any& primaryCatalog, const OUString& primarySchema, - const OUString& primaryTable, + std::u16string_view primaryTable, const css::uno::Any& foreignCatalog, const OUString& foreignSchema, - const OUString& foreignTable); + std::u16string_view foreignTable); ADORecordset* getProcedures( const css::uno::Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ); @@ -125,11 +129,11 @@ namespace connectivity::ado ADORecordset* getColumns( const css::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, - const OUString& columnNamePattern ); + std::u16string_view columnNamePattern ); ADORecordset* getColumnPrivileges( const css::uno::Any& catalog, const OUString& schemaPattern, - const OUString& table, - const OUString& columnNamePattern ); + std::u16string_view table, + std::u16string_view columnNamePattern ); ADORecordset* getTypeInfo(DataTypeEnum _eType = adEmpty ); }; @@ -155,20 +159,20 @@ namespace connectivity::ado void Create(); sal_Int32 get_State() const; OUString get_CommandText() const; - bool put_CommandText(const OUString &aCon) ; + bool put_CommandText(std::u16string_view aCon) ; sal_Int32 get_CommandTimeout() const; void put_CommandTimeout(sal_Int32 nRet); bool get_Prepared() const; bool put_Prepared(VARIANT_BOOL bPrepared) const; bool Execute(OLEVariant& RecordsAffected,OLEVariant& Parameters,long Options, ADORecordset** ppiRset); - ADOParameter* CreateParameter(const OUString &_bstr,DataTypeEnum Type,ParameterDirectionEnum Direction,long nSize,const OLEVariant &Value); + ADOParameter* CreateParameter(std::u16string_view _bstr,DataTypeEnum Type,ParameterDirectionEnum Direction,long nSize,const OLEVariant &Value); ADOParameters* get_Parameters() const; bool put_CommandType( /* [in] */ CommandTypeEnum lCmdType); CommandTypeEnum get_CommandType( ) const ; // Returns the field's name OUString GetName() const ; - bool put_Name(const OUString& Name); + bool put_Name(std::u16string_view Name); bool Cancel(); }; diff --git a/connectivity/source/inc/ado/Awrapadox.hxx b/connectivity/source/inc/ado/Awrapadox.hxx index 469afd41727e..6bda5b4878d8 100644 --- a/connectivity/source/inc/ado/Awrapadox.hxx +++ b/connectivity/source/inc/ado/Awrapadox.hxx @@ -19,6 +19,10 @@ #pragma once +#include <sal/config.h> + +#include <string_view> + #include <com/sun/star/beans/PropertyAttribute.hpp> #ifndef __User_FWD_DEFINED__ @@ -94,7 +98,7 @@ namespace connectivity::ado void Create(); OUString get_Name() const; - void put_Name(const OUString& _rName); + void put_Name(std::u16string_view _rName); RightsEnum GetPermissions( /* [in] */ const OLEVariant& Name, /* [in] */ ObjectTypeEnum ObjectType); @@ -118,8 +122,8 @@ namespace connectivity::ado void Create(); OUString get_Name() const; - void put_Name(const OUString& _rName); - bool ChangePassword(const OUString& _rPwd,const OUString& _rNewPwd); + void put_Name(std::u16string_view _rName); + bool ChangePassword(std::u16string_view _rPwd,std::u16string_view _rNewPwd); WpADOGroups get_Groups(); RightsEnum GetPermissions( /* [in] */ const OLEVariant& Name, diff --git a/connectivity/source/inc/ado/WrapCatalog.hxx b/connectivity/source/inc/ado/WrapCatalog.hxx index d91f598eb7e3..34834236b7dc 100644 --- a/connectivity/source/inc/ado/WrapCatalog.hxx +++ b/connectivity/source/inc/ado/WrapCatalog.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPCATALOG_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPCATALOG_HXX +#include <sal/config.h> + +#include <string_view> + #include <ado/WrapTypeDefs.hxx> namespace connectivity::ado @@ -32,7 +36,7 @@ namespace connectivity::ado WpADOCatalog& operator=(const WpADOCatalog& rhs) {WpOLEBase<_ADOCatalog>::operator=(rhs); return *this;} - OUString GetObjectOwner(const OUString& _rName, ObjectTypeEnum _eNum); + OUString GetObjectOwner(std::u16string_view _rName, ObjectTypeEnum _eNum); void putref_ActiveConnection(IDispatch* pCon); WpADOTables get_Tables(); diff --git a/connectivity/source/inc/ado/WrapColumn.hxx b/connectivity/source/inc/ado/WrapColumn.hxx index 1c34956a2622..096dcd326154 100644 --- a/connectivity/source/inc/ado/WrapColumn.hxx +++ b/connectivity/source/inc/ado/WrapColumn.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPCOLUMN_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPCOLUMN_HXX +#include <sal/config.h> + +#include <string_view> + #include <ado/Aolewrap.hxx> #include <adoint.h> @@ -38,8 +42,8 @@ namespace connectivity::ado OUString get_Name() const; OUString get_RelatedColumn() const; - void put_Name(const OUString& _rName); - void put_RelatedColumn(const OUString& _rName); + void put_Name(std::u16string_view _rName); + void put_RelatedColumn(std::u16string_view _rName); DataTypeEnum get_Type() const; void put_Type(const DataTypeEnum& _eNum) ; sal_Int32 get_Precision() const; diff --git a/connectivity/source/inc/ado/WrapIndex.hxx b/connectivity/source/inc/ado/WrapIndex.hxx index 8fb836c949ff..f4318c45873f 100644 --- a/connectivity/source/inc/ado/WrapIndex.hxx +++ b/connectivity/source/inc/ado/WrapIndex.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPINDEX_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPINDEX_HXX +#include <sal/config.h> + +#include <string_view> + #include <ado/WrapTypeDefs.hxx> namespace connectivity::ado @@ -35,7 +39,7 @@ namespace connectivity::ado void Create(); OUString get_Name() const; - void put_Name(const OUString& _rName); + void put_Name(std::u16string_view _rName); bool get_Clustered() const; void put_Clustered(bool _b); bool get_Unique() const; diff --git a/connectivity/source/inc/ado/WrapKey.hxx b/connectivity/source/inc/ado/WrapKey.hxx index 52a3963f305c..49969c41bb61 100644 --- a/connectivity/source/inc/ado/WrapKey.hxx +++ b/connectivity/source/inc/ado/WrapKey.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPKEY_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPKEY_HXX +#include <sal/config.h> + +#include <string_view> + #include <ado/WrapTypeDefs.hxx> namespace connectivity::ado @@ -35,11 +39,11 @@ namespace connectivity::ado void Create(); OUString get_Name() const; - void put_Name(const OUString& _rName); + void put_Name(std::u16string_view _rName); KeyTypeEnum get_Type() const; void put_Type(const KeyTypeEnum& _eNum) ; OUString get_RelatedTable() const; - void put_RelatedTable(const OUString& _rName); + void put_RelatedTable(std::u16string_view _rName); RuleEnum get_DeleteRule() const; void put_DeleteRule(const RuleEnum& _eNum) ; RuleEnum get_UpdateRule() const; diff --git a/connectivity/source/inc/ado/WrapTable.hxx b/connectivity/source/inc/ado/WrapTable.hxx index a0ae8e5b87f7..4119bfb58e3b 100644 --- a/connectivity/source/inc/ado/WrapTable.hxx +++ b/connectivity/source/inc/ado/WrapTable.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPTABLE_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_WRAPTABLE_HXX +#include <sal/config.h> + +#include <string_view> + #include <ado/WrapTypeDefs.hxx> namespace connectivity::ado @@ -37,7 +41,7 @@ namespace connectivity::ado void Create(); OUString get_Name() const; - void put_Name(const OUString& _rName); + void put_Name(std::u16string_view _rName); OUString get_Type() const; WpADOColumns get_Columns() const; WpADOIndexes get_Indexes() const; |