summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 15:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:18 +0200
commit4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (patch)
tree1fe9cc9db455779d33c24320fedc1e25888b3e5c /connectivity
parenta1f31211920bfae1a21ea375fa5280c9c6595e15 (diff)
new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeys.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xtables.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xuser.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xviews.cxx6
4 files changed, 8 insertions, 8 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
index 09aa41ea0f15..22e8f57891ac 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
@@ -175,7 +175,7 @@ void Keys::refresh()
if( css::sdbcx::KeyType::FOREIGN == keyType )
{
OUStringBuffer buf( 128 );
- buf.append( xRow->getString( 6 ) + "." + xRow->getString( 5 ) );
+ buf.append( xRow->getString( 6 ) ).append( "." ).append( xRow->getString( 5 ) );
pKey->setPropertyValue_NoBroadcast_public(
st.REFERENCED_TABLE, makeAny( buf.makeStringAndClear() ) );
diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx
index 907e777f273d..adb4fd7b4fd3 100644
--- a/connectivity/source/drivers/postgresql/pq_xtables.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx
@@ -135,7 +135,7 @@ void Tables::refresh()
{
m_values.push_back( makeAny( prop ) );
OUStringBuffer buf( name.getLength() + schema.getLength() + 1);
- buf.append( schema + "." + name );
+ buf.append( schema ).append( "." ).append( name );
map[ buf.makeStringAndClear() ] = tableIndex;
++tableIndex;
}
diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx
index 766b80d2587a..e3985edbd0a1 100644
--- a/connectivity/source/drivers/postgresql/pq_xuser.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx
@@ -128,9 +128,9 @@ sal_Int32 User::getPrivileges( const OUString& objName, sal_Int32 objType )
Statics & st = getStatics();
OUStringBuffer buf( 128 );
- buf.append( "User::getPrivileges[" + extractStringProperty( this, st.NAME ) +
- "] got called for " + objName + "(type=" +
- OUString::number(objType) + ")");
+ buf.append( "User::getPrivileges[" ).append( extractStringProperty( this, st.NAME ) )
+ .append( "] got called for " ).append( objName ).append( "(type=" )
+ .append( OUString::number(objType) ).append(")");
log(m_pSettings, LogLevel::Info, buf.makeStringAndClear());
}
// all privileges
diff --git a/connectivity/source/drivers/postgresql/pq_xviews.cxx b/connectivity/source/drivers/postgresql/pq_xviews.cxx
index 8f1d58d07f8e..e6503485a9c0 100644
--- a/connectivity/source/drivers/postgresql/pq_xviews.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xviews.cxx
@@ -117,7 +117,7 @@ void Views::refresh()
{
m_values.push_back( makeAny( prop ) );
OUStringBuffer buf( table.getLength() + schema.getLength() + 1);
- buf.append( schema + "." + table );
+ buf.append( schema ).append( "." ).append( table );
map[ buf.makeStringAndClear() ] = viewIndex;
++viewIndex;
}
@@ -151,7 +151,7 @@ void Views::appendByDescriptor(
buf.append( "CREATE VIEW ");
bufferQuoteQualifiedIdentifier( buf, schema, name, m_pSettings );
- buf.append(" AS " + command );
+ buf.append(" AS " ).append( command );
stmt->executeUpdate( buf.makeStringAndClear() );
@@ -193,7 +193,7 @@ void Views::dropByIndex( sal_Int32 index )
set->getPropertyValue( st.NAME ) >>= name;
OUStringBuffer update( 128 );
- update.append( "DROP VIEW \"" + schema + "\".\"" + name + "\"" );
+ update.append( "DROP VIEW \"" ).append( schema ).append( "\".\"" ).append( name ).append( "\"" );
Reference< XStatement > stmt = m_origin->createStatement( );