summaryrefslogtreecommitdiff
path: root/stoc/source/simpleregistry/simpleregistry.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/simpleregistry/simpleregistry.cxx')
-rw-r--r--stoc/source/simpleregistry/simpleregistry.cxx37
1 files changed, 21 insertions, 16 deletions
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index a3e517c6be94..80e30daeab0b 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -34,6 +34,7 @@
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/uno/Sequence.hxx"
+#include <cppuhelper/factory.hxx>
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase2.hxx"
#include "cppuhelper/weak.hxx"
@@ -49,10 +50,14 @@
#include "rtl/ustring.hxx"
#include "sal/types.h"
-#include "bootstrapservices.hxx"
-
namespace {
+static css::uno::Sequence< OUString > SimpleRegistry_getSupportedServiceNames() {
+ css::uno::Sequence< OUString > names(1);
+ names[0] = "com.sun.star.registry.SimpleRegistry";
+ return names;
+}
+
class SimpleRegistry:
public cppu::WeakImplHelper2<
css::registry::XSimpleRegistry, css::lang::XServiceInfo >
@@ -96,7 +101,7 @@ private:
virtual OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException)
- { return stoc_bootstrap::simreg_getImplementationName(); }
+ { return OUString("com.sun.star.comp.stoc.SimpleRegistry"); }
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException)
@@ -104,7 +109,7 @@ private:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException)
- { return stoc_bootstrap::simreg_getSupportedServiceNames(); }
+ { return SimpleRegistry_getSupportedServiceNames(); }
Registry registry_;
};
@@ -1120,24 +1125,24 @@ void SimpleRegistry::mergeKey(
}
-namespace stoc_bootstrap {
-
-css::uno::Reference< css::uno::XInterface > SimpleRegistry_CreateInstance(
+static css::uno::Reference< css::uno::XInterface > SimpleRegistry_CreateInstance(
SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext >
const &)
{
return static_cast< cppu::OWeakObject * >(new SimpleRegistry);
}
-css::uno::Sequence< OUString > simreg_getSupportedServiceNames() {
- css::uno::Sequence< OUString > names(1);
- names[0] = "com.sun.star.registry.SimpleRegistry";
- return names;
-}
-
-OUString simreg_getImplementationName() {
- return OUString("com.sun.star.comp.stoc.SimpleRegistry");
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL
+com_sun_star_comp_stoc_SimpleRegistry_component_getFactory(
+ const char * , void * , void * )
+{
+ css::uno::Reference< css::lang::XSingleComponentFactory > xFactory;
+ xFactory = cppu::createSingleComponentFactory(
+ SimpleRegistry_CreateInstance,
+ "com.sun.star.comp.stoc.SimpleRegistry",
+ SimpleRegistry_getSupportedServiceNames() );
+ xFactory->acquire();
+ return xFactory.get();
}
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */