diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-09-05 18:15:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-09-05 19:54:29 +0200 |
commit | 1daeea3a48fe08979139648289e188bb9fc211b3 (patch) | |
tree | a8be3f14199494b75c8beac3ad7a68dab5aa0e29 /connectivity | |
parent | 7fc98802ecd6d9e198ae37269f10522286db987e (diff) |
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@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx | 4 |
2 files changed, 6 insertions, 6 deletions
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()) |