summaryrefslogtreecommitdiff
path: root/remotebridges
diff options
context:
space:
mode:
Diffstat (limited to 'remotebridges')
-rw-r--r--remotebridges/source/unourl_resolver/unourl_resolver.cxx43
-rw-r--r--remotebridges/source/unourl_resolver/uuresolver.component5
2 files changed, 10 insertions, 38 deletions
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index fee9e0dbdf78..9aa8293fa67b 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -26,9 +26,7 @@
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/connection/XConnector.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/unourl.hxx>
@@ -39,21 +37,9 @@ using namespace com::sun::star::connection;
using namespace com::sun::star::bridge;
using namespace com::sun::star::registry;
-#define IMPLNAME "com.sun.star.comp.bridge.UnoUrlResolver"
-
namespace unourl_resolver
{
-static Sequence< OUString > resolver_getSupportedServiceNames()
-{
- return { "com.sun.star.bridge.UnoUrlResolver" };
-}
-
-static OUString resolver_getImplementationName()
-{
- return IMPLNAME;
-}
-
namespace {
class ResolverImpl : public WeakImplHelper< XServiceInfo, XUnoUrlResolver >
@@ -83,7 +69,7 @@ ResolverImpl::ResolverImpl( const Reference< XComponentContext > & xCtx )
// XServiceInfo
OUString ResolverImpl::getImplementationName()
{
- return resolver_getImplementationName();
+ return "com.sun.star.comp.bridge.UnoUrlResolver";
}
sal_Bool ResolverImpl::supportsService( const OUString & rServiceName )
@@ -93,7 +79,7 @@ sal_Bool ResolverImpl::supportsService( const OUString & rServiceName )
Sequence< OUString > ResolverImpl::getSupportedServiceNames()
{
- return resolver_getSupportedServiceNames();
+ return { "com.sun.star.bridge.UnoUrlResolver" };
}
// XUnoUrlResolver
@@ -132,29 +118,14 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
return xRet;
}
-static Reference< XInterface > ResolverImpl_create( const Reference< XComponentContext > & xCtx )
-{
- return Reference< XInterface >( *new ResolverImpl( xCtx ) );
-}
-
-}
-
-using namespace unourl_resolver;
-const struct ImplementationEntry g_entries[] =
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+remotebridges_ResolverImpl_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- {
- ResolverImpl_create, resolver_getImplementationName,
- resolver_getSupportedServiceNames, createSingleComponentFactory,
- nullptr, 0
- },
- { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
-};
+ return cppu::acquire(new ResolverImpl(context));
+}
-extern "C" SAL_DLLPUBLIC_EXPORT void * uuresolver_component_getFactory(
- const char * pImplName, void * pServiceManager, void * pRegistryKey )
-{
- return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/remotebridges/source/unourl_resolver/uuresolver.component b/remotebridges/source/unourl_resolver/uuresolver.component
index 304ee2f4021b..4b830459ac54 100644
--- a/remotebridges/source/unourl_resolver/uuresolver.component
+++ b/remotebridges/source/unourl_resolver/uuresolver.component
@@ -18,8 +18,9 @@
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="uuresolver" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.bridge.UnoUrlResolver">
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.bridge.UnoUrlResolver"
+ constructor="remotebridges_ResolverImpl_get_implementation">
<service name="com.sun.star.bridge.UnoUrlResolver"/>
</implementation>
</component>