configmgr/source/configurationprovider.cxx | 5 +++-- configmgr/source/configurationregistry.cxx | 3 ++- configmgr/source/readonlyaccess.cxx | 5 +++-- configmgr/source/readwriteaccess.cxx | 5 +++-- winaccessibility/source/service/msaaservice_impl.cxx | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-)
New commits: commit 36e5fa003383c792ea5da66c1b47287507138590 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Nov 21 18:08:28 2013 +0100 Some more adaptions to cppu::supportsService Change-Id: I0fa482b3303f339afabf5ed8f3e432b56c6590aa diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index a4aaa15..94f00a3 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -48,6 +48,7 @@ #include "cppuhelper/factory.hxx" #include "cppuhelper/implbase2.hxx" #include "cppuhelper/interfacecontainer.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "sal/types.h" @@ -109,7 +110,7 @@ private: virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) throw (css::uno::RuntimeException) - { return ServiceName == getSupportedServiceNames()[0]; } //TODO + { return cppu::supportsService(this, ServiceName); } virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) @@ -373,7 +374,7 @@ private: virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) throw (css::uno::RuntimeException) - { return ServiceName == getSupportedServiceNames()[0]; } //TODO + { return cppu::supportsService(this, ServiceName); } virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx index 36dd432..6bf87a4 100644 --- a/configmgr/source/configurationregistry.cxx +++ b/configmgr/source/configurationregistry.cxx @@ -51,6 +51,7 @@ #include "cppu/unotype.hxx" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase3.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "rtl/ustring.h" @@ -85,7 +86,7 @@ private: virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) throw (css::uno::RuntimeException) - { return ServiceName == getSupportedServiceNames()[0]; } //TODO + { return cppu::supportsService(this, ServiceName); } virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) diff --git a/configmgr/source/readonlyaccess.cxx b/configmgr/source/readonlyaccess.cxx index 974bede..3e297c0 100644 --- a/configmgr/source/readonlyaccess.cxx +++ b/configmgr/source/readonlyaccess.cxx @@ -24,6 +24,7 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" #include "cppuhelper/implbase3.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "rtl/ref.hxx" @@ -58,9 +59,9 @@ private: throw (css::uno::RuntimeException) { return read_only_access::getImplementationName(); } - virtual sal_Bool SAL_CALL supportsService(OUString const &) + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) throw (css::uno::RuntimeException) - { return false; } + { return cppu::supportsService(this, ServiceName); } virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) diff --git a/configmgr/source/readwriteaccess.cxx b/configmgr/source/readwriteaccess.cxx index d4974fd..d935289 100644 --- a/configmgr/source/readwriteaccess.cxx +++ b/configmgr/source/readwriteaccess.cxx @@ -26,6 +26,7 @@ #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/util/ChangesSet.hpp" #include "cppuhelper/implbase3.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "rtl/ref.hxx" @@ -60,9 +61,9 @@ private: throw (css::uno::RuntimeException) { return read_write_access::getImplementationName(); } - virtual sal_Bool SAL_CALL supportsService(OUString const &) + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) throw (css::uno::RuntimeException) - { return false; } + { return cppu::supportsService(this, ServiceName); } virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index e5e1231..950ef9b 100644 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -21,6 +21,7 @@ #include <cppuhelper/implbase2.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/implementationentry.hxx> +#include <cppuhelper/supportsservice.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/accessibility/XMSAAService.hpp> @@ -130,8 +131,7 @@ OUString MSAAServiceImpl::getImplementationName() throw (RuntimeException) */ sal_Bool MSAAServiceImpl::supportsService( OUString const & serviceName ) throw (RuntimeException) { - // this object only supports one service, so the test is simple - return serviceName == "com.sun.star.accessibility.MSAAService"; + return cppu::supportsService(this, serviceName); } /** _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits