summaryrefslogtreecommitdiff
path: root/stoc/source/implementationregistration/implreg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/implementationregistration/implreg.cxx')
-rw-r--r--stoc/source/implementationregistration/implreg.cxx42
1 files changed, 13 insertions, 29 deletions
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 4e8e6970fff5..3490320f9aa8 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -22,7 +22,6 @@
#include <list>
#include <cppuhelper/queryinterface.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implementationentry.hxx>
@@ -63,9 +62,6 @@ using namespace com::sun::star::registry;
using namespace cppu;
using namespace osl;
-#define IMPLNAME "com.sun.star.comp.stoc.ImplementationRegistration"
-#define SERVICENAME "com.sun.star.registry.ImplementationRegistration"
-
namespace {
struct StringPool
@@ -113,13 +109,6 @@ const StringPool &spool()
return *pPool;
}
-static Sequence< OUString > ImplementationRegistration_getSupportedServiceNames()
-{
- Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = SERVICENAME;
- return seqNames;
-}
-
//*************************************************************************
// static deleteAllLinkReferences()
//
@@ -1309,7 +1298,7 @@ ImplementationRegistration::~ImplementationRegistration() {}
// XServiceInfo
OUString ImplementationRegistration::getImplementationName() throw(RuntimeException)
{
- return OUString(IMPLNAME);
+ return OUString("com.sun.star.comp.stoc.ImplementationRegistration");
}
// XServiceInfo
@@ -1321,7 +1310,9 @@ sal_Bool ImplementationRegistration::supportsService(const OUString& ServiceName
// XServiceInfo
Sequence< OUString > ImplementationRegistration::getSupportedServiceNames(void) throw(RuntimeException)
{
- return ImplementationRegistration_getSupportedServiceNames();
+ Sequence< OUString > seqNames(1);
+ seqNames[0] = "com.sun.star.registry.ImplementationRegistration";
+ return seqNames;
}
Reference< XSimpleRegistry > ImplementationRegistration::getRegistryFromServiceManager()
@@ -1825,23 +1816,16 @@ Reference< XSimpleRegistry > ImplementationRegistration::createTemporarySimpleRe
}
-static Reference<XInterface> ImplementationRegistration_CreateInstance(
- const Reference<XComponentContext> & xCtx ) // throw(Exception)
-{
- return (XImplementationRegistration *)new ImplementationRegistration(xCtx);
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL
-com_sun_star_comp_stoc_ImplementationRegistration_component_getFactory(
- const char * , void * , void * )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_stoc_ImplementationRegistration(
+ css::uno::XComponentContext * context, uno_Sequence * arguments)
{
- Reference< css::lang::XSingleComponentFactory > xFactory;
- xFactory = createSingleComponentFactory(
- ImplementationRegistration_CreateInstance,
- IMPLNAME,
- ImplementationRegistration_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 ImplementationRegistration(context)));
+ x->acquire();
+ return x.get();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */