summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-14 13:01:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 11:52:41 +0100
commite132e781d8b01684d8ef51f060e90d465a21c677 (patch)
treef18331549fdc95416a748c7792f804a39ab0a30f /desktop/source
parent58a2473d6672eb4ae4f55c3fe4c25ea23d932db5 (diff)
loplugin:simplifybool extend to !(a == b) where comparison an overloaded op
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx4
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx6
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx4
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx2
5 files changed, 9 insertions, 9 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index d19c127b1e30..b6f8887da08e 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -910,7 +910,7 @@ void ExtensionManager::enableExtension(
if (!extension.is())
return;
OUString repository = extension->getRepositoryName();
- if (!(repository == "user"))
+ if (repository != "user")
throw lang::IllegalArgumentException(
"No valid repository name provided.",
static_cast<cppu::OWeakObject*>(this), 0);
@@ -1012,7 +1012,7 @@ void ExtensionManager::disableExtension(
if (!extension.is())
return;
const OUString repository( extension->getRepositoryName());
- if (! (repository == "user"))
+ if (repository != "user")
throw lang::IllegalArgumentException(
"No valid repository name provided.",
static_cast<cppu::OWeakObject*>(this), 0);
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 25ca6cdcc2d1..f73eeb2268b2 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -188,7 +188,7 @@ void PackageManagerImpl::initActivationLayer(
// The data base can always be written because it is always in the user installation
m_activePackagesDB.reset( new ActivePackages( dbName ) );
- if (! m_readOnly && ! (m_context == "bundled"))
+ if (! m_readOnly && m_context != "bundled")
{
// clean up activation layer, scan for zombie temp dirs:
ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() );
@@ -957,7 +957,7 @@ OUString PackageManagerImpl::getDeployPath( ActivePackages::Data const & data )
//The bundled extensions are not contained in an additional folder
//with a unique name. data.temporaryName contains already the
//UTF8 encoded folder name. See PackageManagerImpl::synchronize
- if (!(m_context == "bundled"))
+ if (m_context != "bundled")
{
buf.append( "_/" );
buf.append( ::rtl::Uri::encode( data.fileName, rtl_UriCharClassPchar,
@@ -1028,7 +1028,7 @@ PackageManagerImpl::getDeployedPackages_(
ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() );
for (auto const& elem : id2temp)
{
- if (! (elem.second.failedPrerequisites == "0"))
+ if (elem.second.failedPrerequisites != "0")
continue;
try {
packages.push_back(
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 2179d377957b..ecd14d1b1755 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -217,7 +217,7 @@ ExtensionDescription::ExtensionDescription(
sDescriptionUri + " contains no root element.", nullptr);
}
- if ( ! (xRoot->getTagName() == "description"))
+ if ( xRoot->getTagName() != "description")
{
throw css::uno::Exception(
sDescriptionUri + " does not contain the root element <description>.", nullptr);
@@ -227,7 +227,7 @@ ExtensionDescription::ExtensionDescription(
OUString nsDescription = xRoot->getNamespaceURI();
//check if this namespace is supported
- if ( ! (nsDescription == "http://openoffice.org/extensions/description/2006"))
+ if ( nsDescription != "http://openoffice.org/extensions/description/2006")
{
throw css::uno::Exception(sDescriptionUri + " contains a root element with an unsupported namespace. ", nullptr);
}
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index e312369328dd..95ba4e96e222 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -239,7 +239,7 @@ void BackendImpl::ExecutablePackageImpl::processPackage_(
else if (getMyBackend()->m_context == "shared")
attributes |= (osl_File_Attribute_OwnExe | osl_File_Attribute_GrpExe
| osl_File_Attribute_OthExe);
- else if (!(getMyBackend()->m_context == "bundled"))
+ else if (getMyBackend()->m_context != "bundled")
//Bundled extensions are required to be in the properly
//installed. That is an executable must have the right flags
OSL_ASSERT(false);
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 05ca301dbd0a..f6e4d0c19b7c 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -393,7 +393,7 @@ extern "C" int unopkg_main()
//Do not synchronize when command is "reinstall". This could add types and services to UNO and
//prevent the deletion of the registry data folder
//syncing is done in XExtensionManager.reinstall
- if (!subcmd_gui && ! (subCommand == "reinstall")
+ if (!subcmd_gui && subCommand != "reinstall"
&& ! dp_misc::office_is_running())
dp_misc::syncRepositories(false, xCmdEnv);