diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-14 14:27:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-15 14:33:57 +0200 |
commit | f13c6ad5f020a196a0e3aa6f28bda3dc185d465b (patch) | |
tree | f9aaab122974d36c134fb1723ec3c1c8df51eeef /connectivity/source/drivers/postgresql | |
parent | 9270f74466d0eb841babaa24997f608631c70341 (diff) |
new loplugin:bufferadd
look for OUStringBuffer append sequences that can be turned
into creating an OUString with + operations
Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6
Reviewed-on: https://gerrit.libreoffice.org/80809
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/postgresql')
4 files changed, 18 insertions, 22 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index b5fcd1d0261a..95332e360522 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -280,12 +280,11 @@ void Columns::refresh() { if (isLog(m_pSettings, LogLevel::Info)) { - OStringBuffer buf; - buf.append( "sdbcx.Columns get refreshed for table " ); - buf.append( OUStringToOString( m_schemaName, ConnectionSettings::encoding ) ); - buf.append( "." ); - buf.append( OUStringToOString( m_tableName, ConnectionSettings::encoding ) ); - log( m_pSettings, LogLevel::Info, buf.makeStringAndClear().getStr() ); + OString buf = "sdbcx.Columns get refreshed for table " + + OUStringToOString( m_schemaName, ConnectionSettings::encoding ) + + "." + + OUStringToOString( m_tableName, ConnectionSettings::encoding ); + log( m_pSettings, LogLevel::Info, buf.getStr() ); } osl::MutexGuard guard( m_xMutex->GetMutex() ); diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index 5717c03dcd17..a80c3952b255 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -104,10 +104,9 @@ void IndexColumns::refresh() { if (isLog(m_pSettings, LogLevel::Info)) { - OStringBuffer buf; - buf.append( "sdbcx.IndexColumns get refreshed for index " ); - buf.append( OUStringToOString( m_indexName, ConnectionSettings::encoding ) ); - log( m_pSettings, LogLevel::Info, buf.makeStringAndClear().getStr() ); + OString buf = "sdbcx.IndexColumns get refreshed for index " + + OUStringToOString( m_indexName, ConnectionSettings::encoding ); + log( m_pSettings, LogLevel::Info, buf.getStr() ); } osl::MutexGuard guard( m_xMutex->GetMutex() ); diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx index 705ffefa818e..aa8d3036b9a9 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx @@ -96,12 +96,11 @@ void Indexes::refresh() { if (isLog(m_pSettings, LogLevel::Info)) { - OStringBuffer buf; - buf.append( "sdbcx.Indexes get refreshed for table " ); - buf.append( OUStringToOString( m_schemaName, ConnectionSettings::encoding ) ); - buf.append( "." ); - buf.append( OUStringToOString( m_tableName, ConnectionSettings::encoding ) ); - log( m_pSettings, LogLevel::Info, buf.makeStringAndClear().getStr() ); + OString buf = "sdbcx.Indexes get refreshed for table " + + OUStringToOString( m_schemaName, ConnectionSettings::encoding ) + + "." + + OUStringToOString( m_tableName, ConnectionSettings::encoding ); + log( m_pSettings, LogLevel::Info, buf.getStr() ); } osl::MutexGuard guard( m_xMutex->GetMutex() ); diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx index fdc74afd6e45..39a2c292da33 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx @@ -92,12 +92,11 @@ void KeyColumns::refresh() { if (isLog(m_pSettings, LogLevel::Info)) { - OStringBuffer buf; - buf.append( "sdbcx.KeyColumns get refreshed for table " ); - buf.append( OUStringToOString( m_schemaName, ConnectionSettings::encoding ) ); - buf.append( "." ); - buf.append( OUStringToOString( m_tableName, ConnectionSettings::encoding ) ); - log( m_pSettings, LogLevel::Info, buf.makeStringAndClear().getStr() ); + OString buf = "sdbcx.KeyColumns get refreshed for table " + + OUStringToOString( m_schemaName, ConnectionSettings::encoding ) + + "." + + OUStringToOString( m_tableName, ConnectionSettings::encoding ); + log( m_pSettings, LogLevel::Info, buf.getStr() ); } osl::MutexGuard guard( m_xMutex->GetMutex() ); |