diff options
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/basecontainer.cxx | 17 | ||||
-rw-r--r-- | filter/source/msfilter/msvbahelper.cxx | 6 |
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) |