From 8b6c90098f69870231a315df192b44e6507adcfc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 23 Jan 2018 17:29:35 +0100 Subject: Various loplugin in --enable-gtk3-kde5 code Change-Id: I5d5bb6b57a9e9ed2c66d304c18fe7ef233aae072 --- shell/source/backends/kde5be/kde5access.cxx | 6 +++--- shell/source/backends/kde5be/kde5backend.cxx | 15 +++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'shell/source/backends') diff --git a/shell/source/backends/kde5be/kde5access.cxx b/shell/source/backends/kde5be/kde5access.cxx index 5c4c0a0173f1..0f2218551d5f 100644 --- a/shell/source/backends/kde5be/kde5access.cxx +++ b/shell/source/backends/kde5be/kde5access.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "sal/config.h" +#include #include "kde5access.hxx" @@ -290,7 +290,7 @@ css::beans::Optional getValue(OUString const& id) } else if (id == "ooInetProxyType") { - int nProxyType; + sal_Int32 nProxyType; switch (KProtocolManager::proxyType()) { case KProtocolManager::ManualProxy: // Proxies are manually configured @@ -303,7 +303,7 @@ css::beans::Optional getValue(OUString const& id) default: // No proxy is used nProxyType = 0; } - return css::beans::Optional(true, uno::makeAny((sal_Int32)nProxyType)); + return css::beans::Optional(true, uno::makeAny(nProxyType)); } else { diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx index c89869579159..0c0472b0233a 100644 --- a/shell/source/backends/kde5be/kde5backend.cxx +++ b/shell/source/backends/kde5be/kde5backend.cxx @@ -56,12 +56,12 @@ namespace { -OUString SAL_CALL getServiceImplementationName() +OUString getServiceImplementationName() { return OUString("com.sun.star.comp.configuration.backend.KDE5Backend"); } -css::uno::Sequence SAL_CALL getServiceSupportedServiceNames() +css::uno::Sequence getServiceSupportedServiceNames() { OUString name("com.sun.star.configuration.backend.KDE5Backend"); return css::uno::Sequence(&name, 1); @@ -74,7 +74,7 @@ public: Service(); private: - virtual ~Service() {} + virtual ~Service() override {} virtual OUString SAL_CALL getImplementationName() override { @@ -204,7 +204,7 @@ Service::Service() void Service::setPropertyValue(OUString const&, css::uno::Any const&) { - throw css::lang::IllegalArgumentException(OUString("setPropertyValue not supported"), + throw css::lang::IllegalArgumentException("setPropertyValue not supported", static_cast(this), -1); } @@ -231,7 +231,7 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName) } css::uno::Reference - SAL_CALL createInstance(css::uno::Reference const&) +createInstance(css::uno::Reference const&) { return static_cast(new Service); } @@ -242,9 +242,8 @@ static cppu::ImplementationEntry const services[] { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } }; } -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL kde5be1_component_getFactory(char const* pImplName, - void* pServiceManager, - void* pRegistryKey) +extern "C" SAL_DLLPUBLIC_EXPORT void* +kde5be1_component_getFactory(char const* pImplName, void* pServiceManager, void* pRegistryKey) { return cppu::component_getFactoryHelper(pImplName, pServiceManager, pRegistryKey, services); } -- cgit