diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 13:13:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 14:52:50 +0200 |
commit | 447a013299d148df12ff17306fff77bb7f85eba1 (patch) | |
tree | d577aabfb9b650bc46fdcf2289aae2b1561f1e4e /desktop | |
parent | 78098b8494be7123bc4a8b50faa13445e5afd8ce (diff) |
clang-tidy readability-simplify-boolean-expr in dbaccess..framework
Change-Id: I96e1bd4000f4ade6ccfac53c57653772b249df99
Reviewed-on: https://gerrit.libreoffice.org/36678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
6 files changed, 8 insertions, 26 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 2f03578c9968..676e94283661 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -371,10 +371,7 @@ OUString DialogHelper::getResourceString(sal_uInt16 id) bool DialogHelper::IsSharedPkgMgr( const uno::Reference< deployment::XPackage > &xPackage ) { - if ( xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER ) - return true; - else - return false; + return xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER; } @@ -390,10 +387,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment:: VclMessageType::Warning, VclButtonsType::OkCancel); bHadWarning = true; - if ( RET_OK == aInfoBox->Execute() ) - return true; - else - return false; + return RET_OK == aInfoBox->Execute(); } else return true; diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 2e8e8094932c..e661ecc2fc89 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -55,9 +55,7 @@ struct FindWeakRef bool FindWeakRef::operator () (uno::WeakReference< deployment::XPackage > const & ref) { const uno::Reference<deployment::XPackage> ext(ref); - if (ext == m_extension) - return true; - return false; + return ext == m_extension; } } // end namespace diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx index 12542e6f852a..8d97f786fd60 100644 --- a/desktop/source/deployment/gui/license_dialog.cxx +++ b/desktop/source/deployment/gui/license_dialog.cxx @@ -152,10 +152,7 @@ bool LicenseView::IsEndReached() const Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); Point aBottom( 0, aOutSize.Height() ); - if ( pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) - bEndReached = true; - else - bEndReached = false; + bEndReached = pView->GetDocPos( aBottom ).Y() >= nHeight - 1; return bEndReached; } diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 619412c31421..322210b5405e 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -78,9 +78,7 @@ struct CompIdentifiers bool operator() (std::vector<Reference<css::deployment::XPackage> > const & a, std::vector<Reference<css::deployment::XPackage> > const & b) { - if (getName(a).compareTo(getName(b)) < 0) - return true; - return false; + return getName(a).compareTo(getName(b)) < 0; } static OUString getName(std::vector<Reference<css::deployment::XPackage> > const & a); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 8f8387788279..2748d27ddbc9 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -665,10 +665,7 @@ bool BackendImpl::PackageImpl::checkLicense( throw css::deployment::DeploymentException( "Could not interact with user.", nullptr, Any()); - if (approve) - return true; - else - return false; + return approve; } return true; } catch (const css::ucb::CommandFailedException&) { diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index 7483a51cf9df..31a93cecea8a 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -63,10 +63,8 @@ struct ExtensionName explicit ExtensionName( OUString const & str ) : m_str( str ) {} bool operator () ( Reference<deployment::XPackage> const & e ) const { - if (m_str.equals(dp_misc::getIdentifier(e)) - || m_str.equals(e->getName())) - return true; - return false; + return m_str.equals(dp_misc::getIdentifier(e)) + || m_str.equals(e->getName()); } }; |