summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-14 19:27:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-14 19:32:30 +0200
commit2171077c0c3c43a61546ab2c0ae68ba63c5112f7 (patch)
tree09461b7faec131f25b223b4bcbb2bf5b2a701763 /accessibility
parent3ed834ae87eca0f6c486666699112a95edb74abb (diff)
Introduce cppu::supportsService helper, adapt some call-sites
...more to follow (easy hack?) Change-Id: Icb02626495701a3905c124c7368b98c3258e91b2
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxBase.cxx13
-rw-r--r--accessibility/source/extended/AccessibleGridControlBase.cxx14
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx9
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx9
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx9
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx9
-rw-r--r--accessibility/source/extended/accessibletabbar.cxx9
-rw-r--r--accessibility/source/extended/accessibletabbarpage.cxx9
-rw-r--r--accessibility/source/extended/accessibletabbarpagelist.cxx9
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessiblelistitem.cxx9
-rw-r--r--accessibility/source/standard/vclxaccessiblestatusbaritem.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessibletabpage.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx9
14 files changed, 29 insertions, 109 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
index b60dc0bd3bd7..3e8848ff86ca 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
@@ -29,6 +29,7 @@
#include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
#include <svtools/accessibletableprovider.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -351,17 +352,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxBase::supportsService(
const OUString& rServiceName )
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( getOslMutex() );
-
- Sequence< OUString > aSupportedServices( getSupportedServiceNames() );
- const OUString* pArrBegin = aSupportedServices.getConstArray();
- const OUString* pArrEnd = pArrBegin + aSupportedServices.getLength();
- const OUString* pString = pArrBegin;
-
- for( ; ( pString != pArrEnd ) && ( rServiceName != *pString ); ++pString )
- ;
-
- return pString != pArrEnd;
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL AccessibleBrowseBoxBase::getSupportedServiceNames()
diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx
index ecccf07c0041..a5f78a440002 100644
--- a/accessibility/source/extended/AccessibleGridControlBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlBase.cxx
@@ -29,7 +29,8 @@
#include "accessibility/extended/AccessibleGridControlBase.hxx"
#include <svtools/accessibletable.hxx>
#include <comphelper/servicehelper.hxx>
-//
+#include <cppuhelper/supportsservice.hxx>
+
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <unotools/accessiblerelationsethelper.hxx>
@@ -300,16 +301,7 @@ sal_Bool SAL_CALL AccessibleGridControlBase::supportsService(
const OUString& rServiceName )
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( getOslMutex() );
-
- Sequence< OUString > aSupportedServices( getSupportedServiceNames() );
- const OUString* pArrBegin = aSupportedServices.getConstArray();
- const OUString* pArrEnd = pArrBegin + aSupportedServices.getLength();
- const OUString* pString = pArrBegin;
-
- for( ; ( pString != pArrEnd ) && ( rServiceName != *pString ); ++pString )
- ;
- return pString != pArrEnd;
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL AccessibleGridControlBase::getSupportedServiceNames()
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index fd00e40e6c1c..e617f42af818 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <unotools/accessiblestatesethelper.hxx>
#include <vcl/svapp.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
//........................................................................
@@ -122,13 +123,7 @@ namespace accessibility
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL AccessibleIconChoiceCtrl::supportsService( const OUString& _rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aSupported( getSupportedServiceNames() );
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for ( ; pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported )
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -----------------------------------------------------------------------------
// XServiceInfo - static methods
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 9f847f47baef..f791ba2e827f 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -40,6 +40,7 @@
#include <toolkit/helper/convert.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
#include <svtools/stringtransfer.hxx>
@@ -259,13 +260,7 @@ throw(RuntimeException)
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL AccessibleIconChoiceCtrlEntry::supportsService( const OUString& _rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aSupported( getSupportedServiceNames() );
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for ( ; pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported )
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -----------------------------------------------------------------------------
// XServiceInfo - static methods
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index e9a719cd6690..e1a410a7de01 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -26,6 +26,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 <vcl/svapp.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/convert.hxx>
@@ -188,13 +189,7 @@ namespace accessibility
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL AccessibleListBox::supportsService( const OUString& _rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aSupported( getSupportedServiceNames() );
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for ( ; pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported )
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -----------------------------------------------------------------------------
// XServiceInfo - static methods
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 2d5081293a3e..36fc170b63ca 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -42,6 +42,7 @@
#include <toolkit/helper/convert.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
@@ -268,13 +269,7 @@ namespace accessibility
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL AccessibleListBoxEntry::supportsService( const OUString& _rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aSupported( getSupportedServiceNames() );
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for ( ; pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported )
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -----------------------------------------------------------------------------
// XServiceInfo - static methods
diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index 0f01b164426c..05259f1b4735 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -32,6 +32,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 <vcl/svapp.hxx>
@@ -208,13 +209,7 @@ namespace accessibility
sal_Bool AccessibleTabBar::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);
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/extended/accessibletabbarpage.cxx b/accessibility/source/extended/accessibletabbarpage.cxx
index b1fa81938022..0751ae8cd79b 100644
--- a/accessibility/source/extended/accessibletabbarpage.cxx
+++ b/accessibility/source/extended/accessibletabbarpage.cxx
@@ -31,6 +31,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 <vcl/svapp.hxx>
@@ -265,13 +266,7 @@ namespace accessibility
sal_Bool AccessibleTabBarPage::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);
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx
index b85c8a8d9963..f54616e7a7be 100644
--- a/accessibility/source/extended/accessibletabbarpagelist.cxx
+++ b/accessibility/source/extended/accessibletabbarpagelist.cxx
@@ -32,6 +32,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 <vcl/svapp.hxx>
@@ -428,13 +429,7 @@ namespace accessibility
sal_Bool AccessibleTabBarPageList::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);
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index ceda5edb56a4..48118edfc48e 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -27,7 +27,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 <vcl/svapp.hxx>
#include <vcl/window.hxx>
@@ -724,13 +724,7 @@ void OAccessibleMenuBaseComponent::disposing()
sal_Bool OAccessibleMenuBaseComponent::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);
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index cf7c8a5f0f96..af2a57c94d0c 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <vcl/controllayout.hxx>
#include <vcl/unohelp2.hxx>
@@ -227,13 +228,7 @@ OUString VCLXAccessibleListItem::getImplementationName() throw (RuntimeException
// -----------------------------------------------------------------------------
sal_Bool VCLXAccessibleListItem::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 > VCLXAccessibleListItem::getSupportedServiceNames() throw (RuntimeException)
diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
index 1d2184b035d7..889e25b96dbe 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
-
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <vcl/svapp.hxx>
@@ -249,13 +249,7 @@ OUString VCLXAccessibleStatusBarItem::getImplementationName() throw (RuntimeExce
sal_Bool VCLXAccessibleStatusBarItem::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);
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx
index 738dabffefb0..7a1f1545ad25 100644
--- a/accessibility/source/standard/vclxaccessibletabpage.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpage.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
-
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <vcl/svapp.hxx>
@@ -281,13 +281,7 @@ OUString VCLXAccessibleTabPage::getImplementationName() throw (RuntimeException)
sal_Bool VCLXAccessibleTabPage::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);
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index b5f6e9aa5208..347fcf1548d7 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/unohelp2.hxx>
@@ -283,13 +284,7 @@ OUString VCLXAccessibleToolBoxItem::getImplementationName() throw (RuntimeExcept
// -----------------------------------------------------------------------------
sal_Bool VCLXAccessibleToolBoxItem::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 > VCLXAccessibleToolBoxItem::getSupportedServiceNames() throw (RuntimeException)