diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 15:54:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-16 08:30:26 +0000 |
commit | a2b77b43685884fb4e9be04152a49294fa50db36 (patch) | |
tree | 00d599e81a653dc5c663f9dd179970b3e6aa11f2 /connectivity/source/drivers/postgresql/pq_preparedstatement.cxx | |
parent | 389939b02bde4ea72268960310bbd1f2984200bf (diff) |
loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the
connectivity::odbc::OConnection::m_bClosed field.
Probably closes some kind of connection leak there.
Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82
Reviewed-on: https://gerrit.libreoffice.org/28932
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_preparedstatement.cxx')
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_preparedstatement.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 860ffe4324da..d809da7e3eb1 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -218,7 +218,7 @@ void PreparedStatement::checkColumnIndex( sal_Int32 parameterIndex ) buf.append( ", got " ); buf.append( parameterIndex ); buf.append( ", statement '" ); - buf.append( OStringToOUString( m_stmt, m_pSettings->encoding ) ); + buf.append( OStringToOUString( m_stmt, ConnectionSettings::encoding ) ); buf.append( "')" ); throw SQLException( buf.makeStringAndClear(), *this, OUString(), 1, Any () ); } @@ -287,7 +287,7 @@ void PreparedStatement::raiseSQLException( const char * errorMsg ) OUStringBuffer buf(128); buf.append( "pq_driver: "); buf.append( - OUString( errorMsg, strlen(errorMsg) , m_pSettings->encoding ) ); + OUString( errorMsg, strlen(errorMsg) , ConnectionSettings::encoding ) ); buf.append( " (caused by statement '" ); buf.appendAscii( m_executedStatement.getStr() ); buf.append( "')" ); @@ -521,7 +521,7 @@ void PreparedStatement::setString( sal_Int32 parameterIndex, const OUString& x ) checkColumnIndex( parameterIndex ); OStringBuffer buf( 20 ); buf.append( "'" ); - OString y = OUStringToOString( x, m_pSettings->encoding ); + OString y = OUStringToOString( x, ConnectionSettings::encoding ); buf.ensureCapacity( y.getLength() * 2 + 2 ); int len = PQescapeString( const_cast<char*>(buf.getStr())+1, y.getStr() , y.getLength() ); buf.setLength( 1 + len ); |