summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools
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/source/commontools
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/source/commontools')
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx2
-rw-r--r--connectivity/source/commontools/TIndexes.cxx2
-rw-r--r--connectivity/source/commontools/TKeys.cxx2
3 files changed, 3 insertions, 3 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);