summaryrefslogtreecommitdiff
path: root/stoc/source/security/access_controller.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/security/access_controller.cxx')
-rw-r--r--stoc/source/security/access_controller.cxx40
1 files changed, 12 insertions, 28 deletions
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 6de5cceef057..07e3b58e719c 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -34,7 +34,6 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/compbase3.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -52,7 +51,6 @@
#define SERVICE_NAME "com.sun.star.security.AccessController"
-#define IMPL_NAME "com.sun.star.security.comp.stoc.AccessController"
#define USER_CREDS "access-control.user-credentials"
@@ -962,7 +960,7 @@ Reference< security::XAccessControlContext > AccessController::getContext()
OUString AccessController::getImplementationName()
throw (RuntimeException)
{
- return OUString(IMPL_NAME);
+ return OUString("com.sun.star.security.comp.stoc.AccessController");
}
//__________________________________________________________________________________________________
sal_Bool AccessController::supportsService( OUString const & serviceName )
@@ -971,39 +969,25 @@ sal_Bool AccessController::supportsService( OUString const & serviceName )
return cppu::supportsService(this, serviceName);
}
//__________________________________________________________________________________________________
-static Sequence< OUString > AccessController_getSupportedServiceNames()
-{
- Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[0] = OUString(SERVICE_NAME);
- return aSNS;
-}
-
Sequence< OUString > AccessController::getSupportedServiceNames()
throw (RuntimeException)
{
- return AccessController_getSupportedServiceNames();
+ Sequence< OUString > aSNS( 1 );
+ aSNS[0] = OUString(SERVICE_NAME);
+ return aSNS;
}
}
-static Reference< XInterface > SAL_CALL AccessController_create(
- Reference< XComponentContext > const & xComponentContext )
- SAL_THROW( (Exception) )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_security_comp_stoc_AccessController(
+ css::uno::XComponentContext * context, uno_Sequence * arguments)
{
- return (OWeakObject *)new AccessController( xComponentContext );
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL
-com_sun_star_security_comp_stoc_AccessController_component_getFactory(
- const char * , void * , void * )
-{
- Reference< css::lang::XSingleComponentFactory > xFactory;
- xFactory = createSingleComponentFactory(
- AccessController_create,
- IMPL_NAME,
- AccessController_getSupportedServiceNames() );
- xFactory->acquire();
- return xFactory.get();
+ assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
+ css::uno::Reference<css::uno::XInterface> x(
+ static_cast<cppu::OWeakObject *>(new AccessController(context)));
+ x->acquire();
+ return x.get();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */