diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-06 13:32:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-14 18:03:06 +0200 |
commit | e67657d5211f6e95ddf8bd621108608573b00d5d (patch) | |
tree | 66724101dbd95721714bd40fcb4861663432774c /framework | |
parent | 186def8f48e273c3a3b4d23b3ab2efd0d8664731 (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 'framework')
5 files changed, 10 insertions, 10 deletions
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index 9f85f8452d3f..4cb9c5bb0ce1 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -525,7 +525,7 @@ void Job::impl_startListening() } // listening for model closing - if (!(m_xModel.is() && !m_bListenOnModel)) + if (!m_xModel.is() || m_bListenOnModel) return; try diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 676965b3230c..db71cfdbcbdd 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -2501,8 +2501,8 @@ void SAL_CALL XFrameImpl::windowDeactivated( const css::lang::EventObject& ) // is a parent window of the last active Window! SolarMutexClearableGuard aSolarGuard; vcl::Window* pFocusWindow = Application::GetFocusWindow(); - if ( !(xContainerWindow.is() && xParent.is() && - !css::uno::Reference< css::frame::XDesktop >( xParent, css::uno::UNO_QUERY ).is()) + if ( !xContainerWindow.is() || !xParent.is() || + css::uno::Reference< css::frame::XDesktop >( xParent, css::uno::UNO_QUERY ).is() ) return; diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 8062a3b27d75..f2dfd653009f 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -1494,7 +1494,7 @@ void SAL_CALL ModuleUIConfigurationManager::reload() if ( m_bDisposed ) throw DisposedException(); - if ( !(m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly) ) + if ( !m_xUserConfigStorage.is() || !m_bModified || m_bReadOnly ) return; // Try to access our module sub folder @@ -1537,7 +1537,7 @@ void SAL_CALL ModuleUIConfigurationManager::store() if ( m_bDisposed ) throw DisposedException(); - if ( !(m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly) ) + if ( !m_xUserConfigStorage.is() || !m_bModified || m_bReadOnly ) return; // Try to access our module sub folder @@ -1569,7 +1569,7 @@ void SAL_CALL ModuleUIConfigurationManager::storeToStorage( const Reference< XSt if ( m_bDisposed ) throw DisposedException(); - if ( !(m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly) ) + if ( !m_xUserConfigStorage.is() || !m_bModified || m_bReadOnly ) return; // Try to access our module sub folder diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 84262be81c1a..8a3ba8304c70 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -1226,7 +1226,7 @@ void SAL_CALL UIConfigurationManager::reload() if ( m_bDisposed ) throw DisposedException(); - if ( !(m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly) ) + if ( !m_xDocConfigStorage.is() || !m_bModified || m_bReadOnly ) return; // Try to access our module sub folder @@ -1265,7 +1265,7 @@ void SAL_CALL UIConfigurationManager::store() if ( m_bDisposed ) throw DisposedException(); - if ( !(m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly) ) + if ( !m_xDocConfigStorage.is() || !m_bModified || m_bReadOnly ) return; // Try to access our module sub folder @@ -1297,7 +1297,7 @@ void SAL_CALL UIConfigurationManager::storeToStorage( const Reference< XStorage if ( m_bDisposed ) throw DisposedException(); - if ( !(m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly) ) + if ( !m_xDocConfigStorage.is() || !m_bModified || m_bReadOnly ) return; // Try to access our module sub folder diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index a33099ae5cb5..f53c2a5cb1fc 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -349,7 +349,7 @@ void ConfigurationAccess_UICommand::fillCache() void ConfigurationAccess_UICommand::addGenericInfoToCache() { - if ( !(m_xGenericUICommands.is() && !m_bGenericDataRetrieved) ) + if ( !m_xGenericUICommands.is() || m_bGenericDataRetrieved ) return; Sequence< OUString > aCommandNameSeq; |