summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-10-23 14:35:10 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-25 08:19:58 +0000
commit704f95e5255ff72bfb548d50d66d4da61dc483ef (patch)
tree3b0799aa8ce5185f4775966f733e1acb2df6285c /basctl
parenta95ecd8b65ea2275a66f6694f0c09e3faaef4407 (diff)
fdo#54938: More uses of cppu::supportsService
Change-Id: I90a7a07a43559b8d7e1d4b886b2624255200d46b Reviewed-on: https://gerrit.libreoffice.org/6406 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/accessibility/accessibledialogcontrolshape.cxx22
-rw-r--r--basctl/source/accessibility/accessibledialogwindow.cxx22
2 files changed, 4 insertions, 40 deletions
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
index 86738b6efbb6..c9dd46de11d6 100644
--- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx
+++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <toolkit/awt/vclxfont.hxx>
@@ -309,30 +310,17 @@ void AccessibleDialogControlShape::propertyChange( const beans::PropertyChangeEv
}
}
-// -----------------------------------------------------------------------------
// XServiceInfo
-// -----------------------------------------------------------------------------
-
OUString AccessibleDialogControlShape::getImplementationName() throw (RuntimeException)
{
return OUString( "com.sun.star.comp.basctl.AccessibleShape" );
}
-// -----------------------------------------------------------------------------
-
sal_Bool AccessibleDialogControlShape::supportsService( const OUString& rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aNames( getSupportedServiceNames() );
- const OUString* pNames = aNames.getConstArray();
- const OUString* pEnd = pNames + aNames.getLength();
- for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
- ;
-
- return pNames != pEnd;
+ return cppu::supportsService(this, rServiceName);
}
-// -----------------------------------------------------------------------------
-
Sequence< OUString > AccessibleDialogControlShape::getSupportedServiceNames() throw (RuntimeException)
{
Sequence< OUString > aNames(1);
@@ -340,10 +328,7 @@ Sequence< OUString > AccessibleDialogControlShape::getSupportedServiceNames() th
return aNames;
}
-// -----------------------------------------------------------------------------
// XAccessible
-// -----------------------------------------------------------------------------
-
Reference< XAccessibleContext > AccessibleDialogControlShape::getAccessibleContext( ) throw (RuntimeException)
{
OExternalLockGuard aGuard( this );
@@ -351,10 +336,7 @@ Reference< XAccessibleContext > AccessibleDialogControlShape::getAccessibleConte
return this;
}
-// -----------------------------------------------------------------------------
// XAccessibleContext
-// -----------------------------------------------------------------------------
-
sal_Int32 AccessibleDialogControlShape::getAccessibleChildCount() throw (RuntimeException)
{
OExternalLockGuard aGuard( this );
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index 21e995034467..ee170473898a 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <toolkit/awt/vclxfont.hxx>
@@ -605,30 +606,17 @@ void AccessibleDialogWindow::disposing()
}
}
-// -----------------------------------------------------------------------------
// XServiceInfo
-// -----------------------------------------------------------------------------
-
OUString AccessibleDialogWindow::getImplementationName() throw (RuntimeException)
{
return OUString( "com.sun.star.comp.basctl.AccessibleWindow" );
}
-// -----------------------------------------------------------------------------
-
sal_Bool AccessibleDialogWindow::supportsService( const OUString& rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aNames( getSupportedServiceNames() );
- const OUString* pNames = aNames.getConstArray();
- const OUString* pEnd = pNames + aNames.getLength();
- for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
- ;
-
- return pNames != pEnd;
+ return cppu::supportsService(this, rServiceName);
}
-// -----------------------------------------------------------------------------
-
Sequence< OUString > AccessibleDialogWindow::getSupportedServiceNames() throw (RuntimeException)
{
Sequence< OUString > aNames(1);
@@ -636,10 +624,7 @@ Sequence< OUString > AccessibleDialogWindow::getSupportedServiceNames() throw (R
return aNames;
}
-// -----------------------------------------------------------------------------
// XAccessible
-// -----------------------------------------------------------------------------
-
Reference< XAccessibleContext > AccessibleDialogWindow::getAccessibleContext( ) throw (RuntimeException)
{
OExternalLockGuard aGuard( this );
@@ -647,10 +632,7 @@ Reference< XAccessibleContext > AccessibleDialogWindow::getAccessibleContext( )
return this;
}
-// -----------------------------------------------------------------------------
// XAccessibleContext
-// -----------------------------------------------------------------------------
-
sal_Int32 AccessibleDialogWindow::getAccessibleChildCount() throw (RuntimeException)
{
OExternalLockGuard aGuard( this );