diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-12-05 12:51:11 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-09 18:02:32 +0100 |
commit | b4b623c10ca4dbb94cdd7fd8189b40e50fbf9b6e (patch) | |
tree | 8bd052fd27e5f985389cc1864a9fad5017f0eb81 /starmath | |
parent | ad0a87f71e1b1b59febfccd956fde5c365c28813 (diff) |
fdo#54938: Convert starmath to use cppu::supportsService
Change-Id: If5ba86d421ce876071df39ce8dec1bebe7ebae81
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/accessibility.cxx | 11 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 6 |
2 files changed, 5 insertions, 12 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index f80f1c62aef0..7b6a2c492d37 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -26,12 +26,12 @@ #include <com/sun/star/awt/XFocusListener.hpp> #include <unotools/accessiblerelationsethelper.hxx> - #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> #include <com/sun/star/i18n/WordType.hpp> #include <unotools/accessiblestatesethelper.hxx> #include <comphelper/accessibleeventnotifier.hxx> +#include <cppuhelper/supportsservice.hxx> #include <osl/diagnose.h> #include <vcl/svapp.hxx> #include <vcl/window.hxx> @@ -794,10 +794,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::supportsService( const OUString& rServiceName ) throw (RuntimeException) { - return rServiceName == "com::sun::star::accessibility::Accessible" || - rServiceName == "com::sun::star::accessibility::AccessibleComponent" || - rServiceName == "com::sun::star::accessibility::AccessibleContext" || - rServiceName == "com::sun::star::accessibility::AccessibleText"; + return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames() @@ -1945,9 +1942,7 @@ sal_Bool SAL_CALL SmEditAccessible::supportsService( const OUString& rServiceName ) throw (RuntimeException) { - return rServiceName == "com::sun::star::accessibility::Accessible" || - rServiceName == "com::sun::star::accessibility::AccessibleComponent" || - rServiceName == "com::sun::star::accessibility::AccessibleContext"; + return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL SmEditAccessible::getSupportedServiceNames() diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index c3b9a9debaf8..bd0676824605 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -37,6 +37,7 @@ #include <rtl/ustrbuf.hxx> #include <comphelper/propertysetinfo.hxx> #include <comphelper/servicehelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <unotools/moduleoptions.hxx> #include <unomodel.hxx> @@ -416,10 +417,7 @@ OUString SmModel::getImplementationName_Static() sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) { - return ( - rServiceName == "com.sun.star.document.OfficeDocument" || - rServiceName == "com.sun.star.formula.FormulaProperties" - ); + return cppu::supportsService(this, rServiceName); } uno::Sequence< OUString > SmModel::getSupportedServiceNames(void) throw( uno::RuntimeException ) |