[Libreoffice-commits] core.git: connectivity/source sfx2/source vcl/source vcl/win

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 13 06:37:45 UTC 2021


 connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx |    2 
 connectivity/source/drivers/ado/AKeys.cxx                 |    2 
 connectivity/source/drivers/ado/AStatement.cxx            |    2 
 connectivity/source/drivers/ado/Awrapado.cxx              |   52 +++++++-------
 connectivity/source/inc/ado/AStatement.hxx                |    3 
 connectivity/source/inc/ado/Awrapado.hxx                  |   38 +++++-----
 connectivity/source/inc/ado/Awrapadox.hxx                 |   10 +-
 connectivity/source/inc/ado/WrapCatalog.hxx               |    6 +
 connectivity/source/inc/ado/WrapColumn.hxx                |    8 +-
 connectivity/source/inc/ado/WrapIndex.hxx                 |    6 +
 connectivity/source/inc/ado/WrapKey.hxx                   |    8 +-
 connectivity/source/inc/ado/WrapTable.hxx                 |    6 +
 sfx2/source/appl/appdde.cxx                               |   12 ++-
 vcl/source/opengl/win/WinDeviceInfo.cxx                   |    3 
 vcl/source/opengl/win/context.cxx                         |    5 -
 vcl/win/dtrans/ImplHelper.cxx                             |    4 -
 vcl/win/dtrans/ImplHelper.hxx                             |    8 +-
 17 files changed, 107 insertions(+), 68 deletions(-)

New commits:
commit 363a3be9bb17bd85fd52c1f22abdf649e7cd0d0b
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jan 12 15:45:50 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jan 13 07:36:57 2021 +0100

    loplugin:stringviewparam (clang-cl)
    
    Change-Id: Ie66996f905fcb68ee413171c8727cb42dcb28dbc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109178
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
index 3b39585c6f00..8972a4f2dee1 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
@@ -539,7 +539,7 @@ void WpADOTable::Create()
     }
 }
 
-OUString WpADOCatalog::GetObjectOwner(const OUString& _rName, ObjectTypeEnum _eNum)
+OUString WpADOCatalog::GetObjectOwner(std::u16string_view _rName, ObjectTypeEnum _eNum)
 {
     OLEVariant _rVar;
     _rVar.setNoArg();
diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx
index 19027e79ffb6..0d921c39842b 100644
--- a/connectivity/source/drivers/ado/AKeys.cxx
+++ b/connectivity/source/drivers/ado/AKeys.cxx
@@ -71,7 +71,7 @@ sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XProper
     WpADOKey aKey = pKey->getImpl();
     OUString sName = aKey.get_Name();
     if(!sName.getLength())
-        aKey.put_Name("PrimaryKey");
+        aKey.put_Name(u"PrimaryKey");
 
     ADOKeys* pKeys = m_aCollection;
     if ( FAILED(pKeys->Append(OLEVariant(static_cast<ADOKey*>(aKey)),
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index 6f2c14617e0e..599df13aba36 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -634,7 +634,7 @@ void OStatement_Base::setMaxFieldSize(sal_Int32 /*_par0*/)
     ::dbtools::throwFeatureNotImplementedSQLException( "Statement::MaxFieldSize", *this );
 }
 
-void OStatement_Base::setCursorName(const OUString &_par0)
+void OStatement_Base::setCursorName(std::u16string_view _par0)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OStatement_BASE::rBHelper.bDisposed);
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index 0393dc35c9a2..6f4dd5ce1c20 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -58,7 +58,7 @@ OUString WpADOConnection::GetConnectionString() const
     return aBSTR.asOUString();
 }
 
-bool WpADOConnection::PutConnectionString(const OUString &aCon) const
+bool WpADOConnection::PutConnectionString(std::u16string_view aCon) const
 {
     assert(pInterface);
     OLEString bstr(aCon);
@@ -101,7 +101,7 @@ bool WpADOConnection::Close()
     return (SUCCEEDED(pInterface->Close()));
 }
 
-bool WpADOConnection::Execute(const OUString& CommandText,OLEVariant& RecordsAffected,long Options, WpADORecordset** ppiRset)
+bool WpADOConnection::Execute(std::u16string_view CommandText,OLEVariant& RecordsAffected,long Options, WpADORecordset** ppiRset)
 {
     assert(pInterface);
     OLEString sStr1(CommandText);
@@ -128,7 +128,7 @@ bool WpADOConnection::RollbackTrans( )
     return SUCCEEDED(pInterface->RollbackTrans());
 }
 
-bool WpADOConnection::Open(const OUString& ConnectionString, const OUString& UserID,const OUString& Password,long Options)
+bool WpADOConnection::Open(std::u16string_view ConnectionString, std::u16string_view UserID,std::u16string_view Password,long Options)
 {
     assert(pInterface);
     OLEString sStr1(ConnectionString);
@@ -151,7 +151,7 @@ OUString WpADOConnection::GetDefaultDatabase() const
     return aBSTR.asOUString();
 }
 
-bool WpADOConnection::PutDefaultDatabase(const OUString& _bstr)
+bool WpADOConnection::PutDefaultDatabase(std::u16string_view _bstr)
 {
     assert(pInterface);
     OLEString bstr(_bstr);
@@ -223,7 +223,7 @@ OUString WpADOConnection::get_Provider() const
     return aBSTR.asOUString();
 }
 
-bool WpADOConnection::put_Provider(const OUString& _bstr)
+bool WpADOConnection::put_Provider(std::u16string_view _bstr)
 {
     assert(pInterface);
     OLEString bstr(_bstr);
@@ -313,7 +313,7 @@ OUString WpADOCommand::get_CommandText() const
     return aBSTR.asOUString();
 }
 
-bool WpADOCommand::put_CommandText(const OUString &aCon)
+bool WpADOCommand::put_CommandText(std::u16string_view aCon)
 {
     assert(pInterface);
     OLEString bstr(aCon);
@@ -356,7 +356,7 @@ bool WpADOCommand::Execute(OLEVariant& RecordsAffected,OLEVariant& Params,long O
     return SUCCEEDED(pInterface->Execute(&RecordsAffected,&Params,Options,ppiRset));
 }
 
-ADOParameter* WpADOCommand::CreateParameter(const OUString &_bstr,DataTypeEnum Type,ParameterDirectionEnum Direction,long nSize,const OLEVariant &Value)
+ADOParameter* WpADOCommand::CreateParameter(std::u16string_view _bstr,DataTypeEnum Type,ParameterDirectionEnum Direction,long nSize,const OLEVariant &Value)
 {
     assert(pInterface);
     ADOParameter* pPara = nullptr;
@@ -397,7 +397,7 @@ OUString WpADOCommand::GetName() const
     return aBSTR.asOUString();
 }
 
-bool WpADOCommand::put_Name(const OUString& Name)
+bool WpADOCommand::put_Name(std::u16string_view Name)
 {
     assert(pInterface);
     OLEString bstr(Name);
@@ -1034,13 +1034,13 @@ OUString WpADOColumn::get_RelatedColumn() const
     return aBSTR.asOUString();
 }
 
-void WpADOColumn::put_Name(const OUString& _rName)
+void WpADOColumn::put_Name(std::u16string_view _rName)
 {
     assert(pInterface);
     OLEString bstr(_rName);
     pInterface->put_Name(bstr.asBSTR());
 }
-void WpADOColumn::put_RelatedColumn(const OUString& _rName)
+void WpADOColumn::put_RelatedColumn(std::u16string_view _rName)
 {
     assert(pInterface);
     OLEString bstr(_rName);
@@ -1143,7 +1143,7 @@ OUString WpADOKey::get_Name() const
     return aBSTR.asOUString();
 }
 
-void WpADOKey::put_Name(const OUString& _rName)
+void WpADOKey::put_Name(std::u16string_view _rName)
 {
     assert(pInterface);
     OLEString bstr(_rName);
@@ -1172,7 +1172,7 @@ OUString WpADOKey::get_RelatedTable() const
     return aBSTR.asOUString();
 }
 
-void WpADOKey::put_RelatedTable(const OUString& _rName)
+void WpADOKey::put_RelatedTable(std::u16string_view _rName)
 {
     assert(pInterface);
     OLEString bstr(_rName);
@@ -1225,7 +1225,7 @@ OUString WpADOIndex::get_Name() const
     return aBSTR.asOUString();
 }
 
-void WpADOIndex::put_Name(const OUString& _rName)
+void WpADOIndex::put_Name(std::u16string_view _rName)
 {
     assert(pInterface);
     OLEString bstr(_rName);
@@ -1346,7 +1346,7 @@ OUString WpADOTable::get_Name() const
     return aBSTR.asOUString();
 }
 
-void WpADOTable::put_Name(const OUString& _rName)
+void WpADOTable::put_Name(std::u16string_view _rName)
 {
     assert(pInterface);
     OLEString bstr(_rName);
@@ -1438,7 +1438,7 @@ OUString WpADOGroup::get_Name() const
     return aBSTR.asOUString();
 }
 
-void WpADOGroup::put_Name(const OUString& _rName)
+void WpADOGroup::put_Name(std::u16string_view _rName)
 {
     OLEString bstr(_rName);
     pInterface->put_Name(bstr.asBSTR());
@@ -1482,13 +1482,13 @@ OUString WpADOUser::get_Name() const
     return aBSTR.asOUString();
 }
 
-void WpADOUser::put_Name(const OUString& _rName)
+void WpADOUser::put_Name(std::u16string_view _rName)
 {
     OLEString bstr(_rName);
     pInterface->put_Name(bstr.asBSTR());
 }
 
-bool WpADOUser::ChangePassword(const OUString& _rPwd,const OUString& _rNewPwd)
+bool WpADOUser::ChangePassword(std::u16string_view _rPwd,std::u16string_view _rNewPwd)
 {
     OLEString sStr1(_rPwd);
     OLEString sStr2(_rNewPwd);
@@ -1594,7 +1594,7 @@ WpBase::operator IDispatch*()
     return pIUnknown;
 }
 
-ADORecordset* WpADOConnection::getExportedKeys( const css::uno::Any& catalog, const OUString& schema, const OUString& table )
+ADORecordset* WpADOConnection::getExportedKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table )
 {
     // Create elements used in the array
     SAFEARRAYBOUND rgsabound[1];
@@ -1634,7 +1634,7 @@ ADORecordset* WpADOConnection::getExportedKeys( const css::uno::Any& catalog, co
     return pRecordset;
 }
 
-ADORecordset* WpADOConnection::getImportedKeys( const css::uno::Any& catalog, const OUString& schema, const OUString& table )
+ADORecordset* WpADOConnection::getImportedKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table )
 {
     // Create elements used in the array
     SAFEARRAYBOUND rgsabound[1];
@@ -1676,7 +1676,7 @@ ADORecordset* WpADOConnection::getImportedKeys( const css::uno::Any& catalog, co
 
 }
 
-ADORecordset* WpADOConnection::getPrimaryKeys( const css::uno::Any& catalog, const OUString& schema, const OUString& table )
+ADORecordset* WpADOConnection::getPrimaryKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table )
 {
     // Create elements used in the array
     SAFEARRAYBOUND rgsabound[1];
@@ -1715,7 +1715,7 @@ ADORecordset* WpADOConnection::getPrimaryKeys( const css::uno::Any& catalog, con
 }
 
 ADORecordset* WpADOConnection::getIndexInfo(
-    const css::uno::Any& catalog, const OUString& schema, const OUString& table,
+    const css::uno::Any& catalog, const OUString& schema, std::u16string_view table,
     bool /*unique*/, bool /*approximate*/ )
 {
     // Create elements used in the array
@@ -1801,10 +1801,10 @@ ADORecordset* WpADOConnection::getTablePrivileges( const css::uno::Any& catalog,
 
 ADORecordset* WpADOConnection::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)
 {
     // Create elements used in the array
     SAFEARRAYBOUND rgsabound[1];
@@ -2002,7 +2002,7 @@ ADORecordset* WpADOConnection::getTables( const css::uno::Any& catalog,
 ADORecordset* WpADOConnection::getColumns( const css::uno::Any& catalog,
                                                   const OUString& schemaPattern,
                                                   const OUString& tableNamePattern,
-                                                  const OUString& columnNamePattern )
+                                                  std::u16string_view columnNamePattern )
 {
     // Create elements used in the array
     SAFEARRAYBOUND rgsabound[1];
@@ -2045,8 +2045,8 @@ ADORecordset* WpADOConnection::getColumns( const css::uno::Any& catalog,
 
 ADORecordset* WpADOConnection::getColumnPrivileges( const css::uno::Any& catalog,
                                                   const OUString& schema,
-                                                  const OUString& table,
-                                                  const OUString& columnNamePattern )
+                                                  std::u16string_view table,
+                                                  std::u16string_view columnNamePattern )
 {
     // Create elements used in the array
     SAFEARRAYBOUND rgsabound[1];
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;
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 0746c19755d2..c31ef2bd5e25 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <string_view>
+
 #include <config_features.h>
 #include <rtl/character.hxx>
 #include <rtl/malformeduriexception.hxx>
@@ -223,10 +227,10 @@ namespace {
     rCmd = "Open(\"d:\doc\doc.sdw\")"
     rEvent = "Open"
 */
-bool SfxAppEvent_Impl( const OUString& rCmd, const OUString& rEvent,
+bool SfxAppEvent_Impl( const OUString& rCmd, std::u16string_view rEvent,
                            ApplicationEvent::Type eType )
 {
-    OUString sEvent(rEvent + "(");
+    OUString sEvent(OUString::Concat(rEvent) + "(");
     if (rCmd.startsWithIgnoreAsciiCase(sEvent))
     {
         sal_Int32 start = sEvent.getLength();
@@ -300,8 +304,8 @@ bool SfxAppEvent_Impl( const OUString& rCmd, const OUString& rEvent,
 bool SfxApplication::DdeExecute( const OUString&   rCmd )  // Expressed in our BASIC-Syntax
 {
     // Print or Open-Event?
-    if ( !( SfxAppEvent_Impl( rCmd, "Print", ApplicationEvent::Type::Print ) ||
-            SfxAppEvent_Impl( rCmd, "Open", ApplicationEvent::Type::Open ) ) )
+    if ( !( SfxAppEvent_Impl( rCmd, u"Print", ApplicationEvent::Type::Print ) ||
+            SfxAppEvent_Impl( rCmd, u"Open", ApplicationEvent::Type::Open ) ) )
     {
         // all others are BASIC
         StarBASIC* pBasic = GetBasic();
diff --git a/vcl/source/opengl/win/WinDeviceInfo.cxx b/vcl/source/opengl/win/WinDeviceInfo.cxx
index c936aee11fa6..2a44987789cf 100644
--- a/vcl/source/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/source/opengl/win/WinDeviceInfo.cxx
@@ -21,6 +21,7 @@
 #include <algorithm>
 #include <cstdint>
 #include <memory>
+#include <string_view>
 
 #include <osl/file.hxx>
 #include <rtl/bootstrap.hxx>
@@ -192,7 +193,7 @@ OUString getCacheFolder()
     return url;
 }
 
-void writeToLog(SvStream& rStrm, const char* pKey, const OUString & rVal)
+void writeToLog(SvStream& rStrm, const char* pKey, std::u16string_view rVal)
 {
     rStrm.WriteCharPtr(pKey);
     rStrm.WriteCharPtr(": ");
diff --git a/vcl/source/opengl/win/context.cxx b/vcl/source/opengl/win/context.cxx
index 4d30e9c13a9b..b9348b8520b3 100644
--- a/vcl/source/opengl/win/context.cxx
+++ b/vcl/source/opengl/win/context.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <memory>
+#include <string_view>
 #include <thread>
 #include <vcl/opengl/OpenGLContext.hxx>
 #include <vcl/opengl/OpenGLHelper.hxx>
@@ -403,7 +404,7 @@ static bool InitMultisample(const PIXELFORMATDESCRIPTOR& pfd, int& rPixelFormat,
 namespace
 {
 
-bool tryShaders(const OUString& rVertexShader, const OUString& rFragmentShader, const OUString& rGeometryShader = "", const OString& rPreamble = "")
+bool tryShaders(const OUString& rVertexShader, const OUString& rFragmentShader, const OUString& rGeometryShader = "", std::string_view rPreamble = "")
 {
     GLint nId;
 
@@ -417,7 +418,7 @@ bool tryShaders(const OUString& rVertexShader, const OUString& rFragmentShader,
     }
     else
     {
-        assert(rPreamble.isEmpty());
+        assert(rPreamble.empty());
         nId = OpenGLHelper::LoadShaders(rVertexShader, rFragmentShader, rGeometryShader);
     }
     if (!nId)
diff --git a/vcl/win/dtrans/ImplHelper.cxx b/vcl/win/dtrans/ImplHelper.cxx
index 0e38b9183d82..227876b19cb8 100644
--- a/vcl/win/dtrans/ImplHelper.cxx
+++ b/vcl/win/dtrans/ImplHelper.cxx
@@ -113,7 +113,7 @@ OUString getWinCPFromLocaleId( LCID lcid, LCTYPE lctype )
 // to the given codepage, optional a prefix can be
 // given, e.g. "windows-" or "cp"
 
-OUString getMimeCharsetFromWinCP( sal_uInt32 cp, const OUString& aPrefix )
+OUString getMimeCharsetFromWinCP( sal_uInt32 cp, std::u16string_view aPrefix )
 {
     return aPrefix + cptostr( cp );
 }
@@ -122,7 +122,7 @@ OUString getMimeCharsetFromWinCP( sal_uInt32 cp, const OUString& aPrefix )
 // to the given locale id and locale type, optional a
 // prefix can be given, e.g. "windows-" or "cp"
 
-OUString getMimeCharsetFromLocaleId( LCID lcid, LCTYPE lctype, const OUString& aPrefix  )
+OUString getMimeCharsetFromLocaleId( LCID lcid, LCTYPE lctype, std::u16string_view aPrefix  )
 {
     OUString charset = getWinCPFromLocaleId( lcid, lctype );
     return aPrefix + charset;
diff --git a/vcl/win/dtrans/ImplHelper.hxx b/vcl/win/dtrans/ImplHelper.hxx
index ffc160602e7a..df6731ec7a30 100644
--- a/vcl/win/dtrans/ImplHelper.hxx
+++ b/vcl/win/dtrans/ImplHelper.hxx
@@ -19,6 +19,10 @@
 
 #pragma once
 
+#include <sal/config.h>
+
+#include <string_view>
+
 #include <sal/types.h>
 #include <rtl/ustring.hxx>
 
@@ -51,13 +55,13 @@ OUString getWinCPFromLocaleId(LCID lcid, LCTYPE lctype);
 // to the given codepage, optional a prefix can be
 // given, e.g. "windows-" or "cp"
 
-OUString getMimeCharsetFromWinCP(sal_uInt32 cp, const OUString& aPrefix);
+OUString getMimeCharsetFromWinCP(sal_uInt32 cp, std::u16string_view aPrefix);
 
 // returns a mime charset parameter value appropriate
 // to the given locale id and locale type, optional a
 // prefix can be given, e.g. "windows-" or "cp"
 
-OUString getMimeCharsetFromLocaleId(LCID lcid, LCTYPE lctype, const OUString& aPrefix);
+OUString getMimeCharsetFromLocaleId(LCID lcid, LCTYPE lctype, std::u16string_view aPrefix);
 
 // returns true, if a given codepage is an oem codepage
 


More information about the Libreoffice-commits mailing list