summaryrefslogtreecommitdiff
path: root/javaunohelper/com
diff options
context:
space:
mode:
Diffstat (limited to 'javaunohelper/com')
-rw-r--r--javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java17
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/Factory.java34
2 files changed, 29 insertions, 22 deletions
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 <code>JavaLoader</code>
- * <p>
- * @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);
- }
}
-
-
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
@@ -53,6 +53,30 @@ public class Factory
@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
services implemented
@return
@@ -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;