summaryrefslogtreecommitdiff
path: root/dbaccess
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 /dbaccess
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 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlHierarchyCollection.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx2
5 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 4eac4796982b..77b5ef45fca0 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -855,7 +855,7 @@ void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XControl
if ( bNotifyViewClosed )
m_aEventNotifier.notifyDocumentEvent( "OnViewClosed", Reference< XController2 >( _xController, UNO_QUERY ) );
- if ( !(bLastControllerGone && !bIsClosing) )
+ if ( !bLastControllerGone || bIsClosing )
return;
// if this was the last view, close the document as a whole
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index d542a1ad7807..182463181e56 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -59,7 +59,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
- if ( !(!sName.isEmpty() && _xParentContainer.is()) )
+ if ( sName.isEmpty() || !_xParentContainer.is() )
return;
try
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 8a0bb0cb6edc..3366ed97df15 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2407,7 +2407,7 @@ void SbaXDataBrowserController::LoadFinished(bool /*bWasSynch*/)
{
m_nRowSetPrivileges = 0;
- if (!(isValid() && !loadingCancelled()))
+ if (!isValid() || loadingCancelled())
return;
// obtain cached values
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 3af305f5ead5..13b6ceac29cd 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -568,7 +568,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM
// prepend some new items
bool bColAttrs = (nColId != sal_uInt16(-1)) && (nColId != 0);
- if ( !(bColAttrs && !bDBIsReadOnly))
+ if ( !bColAttrs || bDBIsReadOnly)
return;
sal_uInt16 nPos = 0;
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index e9b87f28eca1..1e38bb2f7e03 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -77,7 +77,7 @@ void ORelationTableConnectionData::DropRelation()
::osl::MutexGuard aGuard( m_aMutex );
// delete relation
Reference< XIndexAccess> xKeys = getReferencingTable()->getKeys();
- if( !(!m_aConnName.isEmpty() && xKeys.is()) )
+ if( m_aConnName.isEmpty() || !xKeys.is() )
return;
const sal_Int32 nCount = xKeys->getCount();