[Libreoffice-commits] core.git: connectivity/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 5 17:55:12 UTC 2020
connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 8 ++++----
connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 1daeea3a48fe08979139648289e188bb9fc211b3
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Sep 5 18:15:24 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Sep 5 19:54:29 2020 +0200
Drop some seemingly redundant OUString(OUString::getStr()) constructions
...assuming they were not chosen deliberately to cut of the input string at a
potential embedded NUL (or for whatever other arcane reason).
(This change is a prerequisite for making the OUString ctor taking a raw pointer
explicit.)
Change-Id: I0f029ac8c7851e3722ec2e9e2e003c22d3453e6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102078
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index 62a22454fc60..16ecb9e1a520 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1075,7 +1075,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
OUString query = queryBuf.makeStringAndClear();
- uno::Reference< XResultSet > rs = statement->executeQuery(query.getStr());
+ uno::Reference< XResultSet > rs = statement->executeQuery(query);
uno::Reference< XRow > xRow( rs, UNO_QUERY_THROW );
ODatabaseMetaDataResultSet::ORows aResults;
@@ -1164,7 +1164,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
OUString query = queryBuf.makeStringAndClear();
uno::Reference< XStatement > statement = m_pConnection->createStatement();
- uno::Reference< XResultSet > rs = statement->executeQuery(query.getStr());
+ uno::Reference< XResultSet > rs = statement->executeQuery(query);
uno::Reference< XRow > xRow( rs, UNO_QUERY_THROW );
ODatabaseMetaDataResultSet::ORows aResults;
@@ -1366,7 +1366,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
OUString query = queryBuf.makeStringAndClear();
- uno::Reference< XResultSet > rs = statement->executeQuery(query.getStr());
+ uno::Reference< XResultSet > rs = statement->executeQuery(query);
uno::Reference< XRow > xRow( rs, UNO_QUERY_THROW );
ODatabaseMetaDataResultSet::ORows aResults;
@@ -1749,7 +1749,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
OUString query = queryBuf.makeStringAndClear();
- uno::Reference< XResultSet > rs = statement->executeQuery(query.getStr());
+ uno::Reference< XResultSet > rs = statement->executeQuery(query);
uno::Reference< XRow > xRow( rs, UNO_QUERY_THROW );
ODatabaseMetaDataResultSet::ORows aResults;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
index a30e5d61808a..77e20700b135 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
@@ -747,7 +747,7 @@ Reference<XResultSet> SAL_CALL ODatabaseMetaData::getColumns(const Any& /*catalo
OUString query = queryBuf.makeStringAndClear();
Reference<XStatement> statement = m_rConnection.createStatement();
- Reference<XResultSet> rs = statement->executeQuery(query.getStr());
+ Reference<XResultSet> rs = statement->executeQuery(query);
Reference<XRow> xRow(rs, UNO_QUERY_THROW);
Reference<XResultSet> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
@@ -946,7 +946,7 @@ Reference<XResultSet> SAL_CALL ODatabaseMetaData::getImportedKeys(const Any& /*c
std::vector<std::vector<Any>> aRows;
Reference<XStatement> statement = m_rConnection.createStatement();
- Reference<XResultSet> rs = statement->executeQuery(query.getStr());
+ Reference<XResultSet> rs = statement->executeQuery(query);
Reference<XRow> xRow(rs, UNO_QUERY_THROW);
while (rs->next())
More information about the Libreoffice-commits
mailing list