summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-06 13:32:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-14 18:03:06 +0200
commite67657d5211f6e95ddf8bd621108608573b00d5d (patch)
tree66724101dbd95721714bd40fcb4861663432774c /connectivity
parent186def8f48e273c3a3b4d23b3ab2efd0d8664731 (diff)
loplugin:simplifybool more
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx2
-rw-r--r--connectivity/source/commontools/TIndexes.cxx2
-rw-r--r--connectivity/source/commontools/TKeys.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/CallableStatement.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/JStatement.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/PreparedStatement.cxx2
6 files changed, 6 insertions, 6 deletions
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index a97faeeb8b4e..f06393778953 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -186,7 +186,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const OUString& _rForName, const
void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/, const OUString& _sElementName)
{
OSL_ENSURE(m_pTable,"OColumnsHelper::dropByName: Table is null!");
- if ( !(m_pTable && !m_pTable->isNew()) )
+ if ( !m_pTable || m_pTable->isNew() )
return;
Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData();
diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx
index f5cff00ec835..5a8c7c29a0f4 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -213,7 +213,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const
void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
Reference< XConnection> xConnection = m_pTable->getConnection();
- if( !(xConnection.is() && !m_pTable->isNew()))
+ if( !xConnection.is() || m_pTable->isNew() )
return;
if ( m_pTable->getIndexService().is() )
diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx
index 742a1832049a..4c223624dc3d 100644
--- a/connectivity/source/commontools/TKeys.cxx
+++ b/connectivity/source/commontools/TKeys.cxx
@@ -264,7 +264,7 @@ OUString OKeysHelper::getDropForeignKey() const
void OKeysHelper::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
Reference< XConnection> xConnection = m_pTable->getConnection();
- if ( !(xConnection.is() && !m_pTable->isNew()) )
+ if ( !xConnection.is() || m_pTable->isNew() )
return;
Reference<XPropertySet> xKey(getObject(_nPos),UNO_QUERY);
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index 0994c827e29a..574fd666b75b 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -318,7 +318,7 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/)
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
- if( !(t.pEnv && !object) )
+ if( !t.pEnv || object )
return;
// initialize temporary variable
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index 9bfe11838b7f..147e09c0f362 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -761,7 +761,7 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv)
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
- if( !(_pEnv && !object) )
+ if( !_pEnv || object )
return;
// initialize temporary variable
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 34c28f084677..083f1917e72a 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -655,7 +655,7 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv)
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
- if( !(!object && _pEnv) )
+ if( object || !_pEnv )
return;
// initialize temporary variable