summaryrefslogtreecommitdiff
path: root/stoc/source/security
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 /stoc/source/security
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 'stoc/source/security')
-rw-r--r--stoc/source/security/access_controller.cxx12
-rw-r--r--stoc/source/security/file_policy.cxx12
2 files changed, 4 insertions, 20 deletions
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 49fea7f2a026..ce78ed875b90 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -35,6 +35,7 @@
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/uno/XCurrentContext.hpp>
#include <com/sun/star/uno/DeploymentException.hpp>
@@ -968,16 +969,7 @@ OUString AccessController::getImplementationName()
sal_Bool AccessController::supportsService( OUString const & serviceName )
throw (RuntimeException)
{
- Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pNames = aSNL.getConstArray();
- for ( sal_Int32 nPos = aSNL.getLength(); --nPos; )
- {
- if (serviceName.equals( pNames[ nPos ] ))
- {
- return sal_True;
- }
- }
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
//__________________________________________________________________________________________________
Sequence< OUString > AccessController::getSupportedServiceNames()
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index 70cc32551b44..46ba89f2b205 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -29,6 +29,7 @@
#include <cppuhelper/access_control.hxx>
#include <cppuhelper/compbase2.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/security/XAccessController.hpp>
@@ -531,16 +532,7 @@ OUString FilePolicy::getImplementationName()
sal_Bool FilePolicy::supportsService( OUString const & serviceName )
throw (RuntimeException)
{
- Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pNames = aSNL.getConstArray();
- for ( sal_Int32 nPos = aSNL.getLength(); --nPos; )
- {
- if (serviceName.equals( pNames[ nPos ] ))
- {
- return sal_True;
- }
- }
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
//__________________________________________________________________________________________________
Sequence< OUString > FilePolicy::getSupportedServiceNames()