summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/source/accessibility.cxx11
-rw-r--r--starmath/source/unomodel.cxx6
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 )