Kaydet (Commit) 36e5fa00 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more adaptions to cppu::supportsService

Change-Id: I0fa482b3303f339afabf5ed8f3e432b56c6590aa
üst 91efe26d
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "cppuhelper/factory.hxx" #include "cppuhelper/factory.hxx"
#include "cppuhelper/implbase2.hxx" #include "cppuhelper/implbase2.hxx"
#include "cppuhelper/interfacecontainer.hxx" #include "cppuhelper/interfacecontainer.hxx"
#include "cppuhelper/supportsservice.hxx"
#include "cppuhelper/weak.hxx" #include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx" #include "osl/mutex.hxx"
#include "sal/types.h" #include "sal/types.h"
...@@ -109,7 +110,7 @@ private: ...@@ -109,7 +110,7 @@ private:
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ return ServiceName == getSupportedServiceNames()[0]; } //TODO { return cppu::supportsService(this, ServiceName); }
virtual css::uno::Sequence< OUString > SAL_CALL virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException) getSupportedServiceNames() throw (css::uno::RuntimeException)
...@@ -373,7 +374,7 @@ private: ...@@ -373,7 +374,7 @@ private:
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ return ServiceName == getSupportedServiceNames()[0]; } //TODO { return cppu::supportsService(this, ServiceName); }
virtual css::uno::Sequence< OUString > SAL_CALL virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException) getSupportedServiceNames() throw (css::uno::RuntimeException)
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "cppu/unotype.hxx" #include "cppu/unotype.hxx"
#include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase3.hxx" #include "cppuhelper/implbase3.hxx"
#include "cppuhelper/supportsservice.hxx"
#include "cppuhelper/weak.hxx" #include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx" #include "osl/mutex.hxx"
#include "rtl/ustring.h" #include "rtl/ustring.h"
...@@ -85,7 +86,7 @@ private: ...@@ -85,7 +86,7 @@ private:
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ return ServiceName == getSupportedServiceNames()[0]; } //TODO { return cppu::supportsService(this, ServiceName); }
virtual css::uno::Sequence< OUString > SAL_CALL virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException) getSupportedServiceNames() throw (css::uno::RuntimeException)
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/uno/XInterface.hpp"
#include "cppuhelper/implbase3.hxx" #include "cppuhelper/implbase3.hxx"
#include "cppuhelper/supportsservice.hxx"
#include "cppuhelper/weak.hxx" #include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx" #include "osl/mutex.hxx"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
...@@ -58,9 +59,9 @@ private: ...@@ -58,9 +59,9 @@ private:
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ return read_only_access::getImplementationName(); } { 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) throw (css::uno::RuntimeException)
{ return false; } { return cppu::supportsService(this, ServiceName); }
virtual css::uno::Sequence< OUString > SAL_CALL virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException) getSupportedServiceNames() throw (css::uno::RuntimeException)
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/util/ChangesSet.hpp" #include "com/sun/star/util/ChangesSet.hpp"
#include "cppuhelper/implbase3.hxx" #include "cppuhelper/implbase3.hxx"
#include "cppuhelper/supportsservice.hxx"
#include "cppuhelper/weak.hxx" #include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx" #include "osl/mutex.hxx"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
...@@ -60,9 +61,9 @@ private: ...@@ -60,9 +61,9 @@ private:
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ return read_write_access::getImplementationName(); } { 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) throw (css::uno::RuntimeException)
{ return false; } { return cppu::supportsService(this, ServiceName); }
virtual css::uno::Sequence< OUString > SAL_CALL virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException) getSupportedServiceNames() throw (css::uno::RuntimeException)
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
#include <cppuhelper/factory.hxx> #include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx> #include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/accessibility/XMSAAService.hpp> #include <com/sun/star/accessibility/XMSAAService.hpp>
...@@ -130,8 +131,7 @@ OUString MSAAServiceImpl::getImplementationName() throw (RuntimeException) ...@@ -130,8 +131,7 @@ OUString MSAAServiceImpl::getImplementationName() throw (RuntimeException)
*/ */
sal_Bool MSAAServiceImpl::supportsService( OUString const & serviceName ) throw (RuntimeException) sal_Bool MSAAServiceImpl::supportsService( OUString const & serviceName ) throw (RuntimeException)
{ {
// this object only supports one service, so the test is simple return cppu::supportsService(this, serviceName);
return serviceName == "com.sun.star.accessibility.MSAAService";
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment