summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-10-21 19:04:05 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-22 10:28:10 +0000
commitee5661ecd3bbeae38b04cd3f582a320a231d11bd (patch)
tree381d9afa0c831145551ade40b6d68f22919baaf6 /filter
parentc82a36f9c7d89fa434d3dff896c290964326f5bf (diff)
fdo#54938: Adapt supportsService implementations..
to cppu::supportsService Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14 Reviewed-on: https://gerrit.libreoffice.org/6370 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/config/cache/basecontainer.cxx17
-rw-r--r--filter/source/msfilter/msvbahelper.cxx6
2 files changed, 4 insertions, 19 deletions
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index fc93f4f39b2a..de888aaf0aab 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -25,10 +25,10 @@
#include <com/sun/star/document/FilterConfigRefresh.hpp>
#include <com/sun/star/uno/Type.h>
#include <comphelper/enumhelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
#include <rtl/instance.hxx>
-
#define LOAD_IMPLICIT
namespace filter{
@@ -166,22 +166,9 @@ OUString SAL_CALL BaseContainer::getImplementationName()
sal_Bool SAL_CALL BaseContainer::supportsService(const OUString& sServiceName)
throw (css::uno::RuntimeException)
{
- // SAFE ->
- ::osl::ResettableMutexGuard aLock(m_aLock);
-
- sal_Int32 c = m_lServiceNames.getLength();
- const OUString* pNames = m_lServiceNames.getConstArray();
- for (sal_Int32 i=0; i<c; ++i)
- {
- if (pNames[i].equals(sServiceName))
- return sal_True;
- }
- return sal_False;
- // <- SAFE
+ return cppu::supportsService(this, sServiceName);
}
-
-
css::uno::Sequence< OUString > SAL_CALL BaseContainer::getSupportedServiceNames()
throw (css::uno::RuntimeException)
{
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 4a5576f0bed7..e5c72e59e000 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/script/ModuleType.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <tools/urlobj.hxx>
#include <osl/file.hxx>
#include <unotools/pathoptions.hxx>
@@ -543,10 +544,7 @@ OUString SAL_CALL VBAMacroResolver::getImplementationName() throw (uno::RuntimeE
sal_Bool SAL_CALL VBAMacroResolver::supportsService( const OUString& rService ) throw (uno::RuntimeException)
{
- uno::Sequence< OUString > aServices = VBAMacroResolver_getSupportedServiceNames();
- const OUString* pArray = aServices.getConstArray();
- const OUString* pArrayEnd = pArray + aServices.getLength();
- return ::std::find( pArray, pArrayEnd, rService ) != pArrayEnd;
+ return cppu::supportsService(this, rService);
}
uno::Sequence< OUString > SAL_CALL VBAMacroResolver::getSupportedServiceNames() throw (uno::RuntimeException)