From 4250b25c6ae361359300ab6ccde27230f8e01039 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Jul 2017 14:49:15 +0200 Subject: teach unnecessaryparen loplugin about identifiers Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- framework/source/services/autorecovery.cxx | 10 ++-------- framework/source/services/desktop.cxx | 20 ++++---------------- framework/source/services/frame.cxx | 5 +---- 3 files changed, 7 insertions(+), 28 deletions(-) (limited to 'framework/source/services') diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 3a9fdfdb546a..78237387d428 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1154,10 +1154,7 @@ void CacheLockGuard::lock(bool bLockForAddRemoveVectorItems) // operation. On the other side a crash reasoned by an invalid stl iterator // will have the same effect .-) - if ( - (m_rCacheLock > 0 ) && - (bLockForAddRemoveVectorItems) - ) + if ( (m_rCacheLock > 0) && bLockForAddRemoveVectorItems ) { OSL_FAIL("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp."); throw css::uno::RuntimeException( @@ -1483,10 +1480,7 @@ void AutoRecovery::implts_dispatch(const DispatchParams& aParams) /* SAFE */ { osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); m_eJob = E_NO_JOB; - if ( - (bAllowAutoSaveReactivation) && - (bWasAutoSaveActive ) - ) + if ( bAllowAutoSaveReactivation && bWasAutoSaveActive ) { m_eJob |= AutoRecovery::E_AUTO_SAVE; diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index e96224815441..090c109318d6 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -271,10 +271,7 @@ sal_Bool SAL_CALL Desktop::terminate() bool bTerminate = false; try { - if( - ( bAskQuickStart ) && - ( xQuickLauncher.is() ) - ) + if( bAskQuickStart && xQuickLauncher.is() ) { xQuickLauncher->queryTermination( aEvent ); lCalledTerminationListener.push_back( xQuickLauncher ); @@ -334,10 +331,7 @@ sal_Bool SAL_CALL Desktop::terminate() Scheduler::ProcessEventsToIdle(); } - if( - ( bAskQuickStart ) && - ( xQuickLauncher.is() ) - ) + if( bAskQuickStart && xQuickLauncher.is() ) { xQuickLauncher->notifyTermination( aEvent ); } @@ -1724,10 +1718,7 @@ bool Desktop::impl_closeFrames(bool bAllowUI) // Use it in case it was allowed from outside only. bool bSuspended = false; css::uno::Reference< css::frame::XController > xController( xFrame->getController(), css::uno::UNO_QUERY ); - if ( - ( bAllowUI ) && - ( xController.is() ) - ) + if ( bAllowUI && xController.is() ) { bSuspended = xController->suspend( true ); if ( ! bSuspended ) @@ -1760,10 +1751,7 @@ bool Desktop::impl_closeFrames(bool bAllowUI) // It can happen that XController.suspend() returned true ... but a registered close listener // throwed these veto exception. Then the controller has to be reactivated. Otherwise // these document doesn't work any more. - if ( - (bSuspended ) && - (xController.is()) - ) + if ( bSuspended && xController.is()) xController->suspend(false); } diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index a4e21ae052b8..76dddcafd4f8 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1528,10 +1528,7 @@ sal_Bool SAL_CALL Frame::setComponent(const css::uno::Reference< css::awt::XWind // A new component window doesn't know anything about current active/focus states. // Set this information on it! - if ( - (bHadFocus ) && - (xComponentWindow.is()) - ) + if ( bHadFocus && xComponentWindow.is() ) { xComponentWindow->setFocus(); } -- cgit