From 008f61c9f135be22cec7b6080735742322a5b4b4 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- .../com/sun/star/comp/JavaUNOHelperServices.java | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'javaunohelper/com') diff --git a/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java b/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java index ba928eb81c1f..5a5cb7b19b4e 100644 --- a/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java +++ b/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java @@ -28,7 +28,6 @@ package com.sun.star.comp; import com.sun.star.lib.uno.helper.Factory; import com.sun.star.lang.XSingleComponentFactory; -import com.sun.star.registry.XRegistryKey; import com.sun.star.comp.juhtest.SmoketestCommandEnvironment; @@ -62,20 +61,4 @@ public class JavaUNOHelperServices { return xFactory; } - - /** - * Writes the service information into the given registry key. - * This method is called by the JavaLoader - *

- * @return returns true if the operation succeeded - * @param regKey the registryKey - * @see com.sun.star.comp.loader.JavaLoader - */ - public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) { - return Factory.writeRegistryServiceInfo(SmoketestCommandEnvironment.class.getName(), - SmoketestCommandEnvironment.getServiceNames(), - regKey); - } } - - -- cgit From 823c4f2b4b1c118a8944992365a0bb7a7cc8f861 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 21 Oct 2010 11:35:24 +0200 Subject: sb131: #i114962# allow for explicit implementation name in css.lib.uno.helper.Factory --- .../com/sun/star/lib/uno/helper/Factory.java | 34 ++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'javaunohelper/com') diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java index 33d107279633..0780f26486f2 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java @@ -51,6 +51,30 @@ public class Factory com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo + @param impl_class + implementation class + @param impl_name + implementation name + @param supported_services + services implemented + @return + object factory + + @since UDK 3.2.13 + */ + public static XSingleComponentFactory createComponentFactory( + Class impl_class, String impl_name, String supported_services [] ) + throws com.sun.star.uno.RuntimeException + { + return new Factory( impl_class, impl_name, supported_services ); + } + + /** Creates an object factory supporting interfaces + com.sun.star.lang.XSingleComponentFactory and + com.sun.star.lang.XServiceInfo + + The implementation name is the name of the implementation class. + @param impl_class implementation class @param supported_services @@ -62,7 +86,8 @@ public class Factory Class impl_class, String supported_services [] ) throws com.sun.star.uno.RuntimeException { - return new Factory( impl_class, supported_services ); + return createComponentFactory( + impl_class, impl_class.getName(), supported_services ); } /** Writes component's implementation info to given registry key. @@ -106,11 +131,10 @@ public class Factory private java.lang.reflect.Method m_method; private java.lang.reflect.Constructor m_ctor; - // ctor - private Factory( Class impl_class, String supported_services [] ) - throws com.sun.star.uno.RuntimeException + private Factory( + Class impl_class, String impl_name, String supported_services [] ) { - m_impl_name = impl_class.getName(); + m_impl_name = impl_name; m_supported_services = supported_services; m_impl_class = impl_class; m_method = null; -- cgit