summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-20 07:30:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-20 09:40:37 +0100
commit5c374284b751131e695c04f0d77a0958f153a501 (patch)
tree673a3f908a5facac770707585228f3d153f646a7 /connectivity/source/drivers
parent1cb523eee4e61ab7eaff114aae45f38d4d234d10 (diff)
Extended loplugin:ostr: connectivity
Change-Id: I284c896777c4f62499eb6b7c0a9883d9abf8d1f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159721 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_connection.cxx7
-rw-r--r--connectivity/source/drivers/postgresql/pq_preparedstatement.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx2
3 files changed, 8 insertions, 9 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
index 8e0915f5fd05..269113383d8d 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
@@ -73,7 +73,7 @@ void OConnection::construct(const OUString& url, const Sequence<PropertyValue>&
mysql_library_init(0, nullptr, nullptr);
mysql_init(&m_mysql);
- OString charset_name{ "utf8mb4" };
+ OString charset_name{ "utf8mb4"_ostr };
mysql_options(&m_mysql, MYSQL_SET_CHARSET_NAME, charset_name.getStr());
sal_Int32 nIndex;
@@ -192,9 +192,8 @@ void OConnection::construct(const OUString& url, const Sequence<PropertyValue>&
*this, OUString(), 0, Any());
}
- lcl_executeUpdate(&m_mysql,
- OString{ "SET session sql_mode='ANSI_QUOTES,NO_AUTO_VALUE_ON_ZERO'" });
- lcl_executeUpdate(&m_mysql, OString{ "SET NAMES utf8mb4" });
+ lcl_executeUpdate(&m_mysql, "SET session sql_mode='ANSI_QUOTES,NO_AUTO_VALUE_ON_ZERO'"_ostr);
+ lcl_executeUpdate(&m_mysql, "SET NAMES utf8mb4"_ostr);
}
OUString OConnection::getImplementationName()
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index 4f3faaec419c..e616e9b22966 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -390,7 +390,7 @@ void PreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 )
MutexGuard guard( m_xMutex->GetMutex() );
checkClosed();
checkColumnIndex( parameterIndex );
- m_vars[parameterIndex-1] = OString( "NULL" );
+ m_vars[parameterIndex-1] = "NULL"_ostr;
}
void PreparedStatement::setObjectNull(
@@ -399,7 +399,7 @@ void PreparedStatement::setObjectNull(
MutexGuard guard( m_xMutex->GetMutex() );
checkClosed();
checkColumnIndex( parameterIndex );
- m_vars[parameterIndex-1] = OString( "NULL" );
+ m_vars[parameterIndex-1] = "NULL"_ostr;
}
@@ -409,9 +409,9 @@ void PreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x )
checkClosed();
checkColumnIndex( parameterIndex );
if( x )
- m_vars[parameterIndex-1] = OString( "'t'" );
+ m_vars[parameterIndex-1] = "'t'"_ostr;
else
- m_vars[parameterIndex-1] = OString( "'f'" );
+ m_vars[parameterIndex-1] = "'f'"_ostr;
}
void PreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x )
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 222f57f528d2..c7b94fee121f 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -530,7 +530,7 @@ void tokenizeSQL( const OString & sql, std::vector< OString > &vec )
{
if( i - start )
vec.push_back( OString( &sql.getStr()[start], i - start ) );
- vec.push_back( OString( "." ) );
+ vec.push_back( "."_ostr );
start = i + 1;
}
}