summaryrefslogtreecommitdiff
path: root/javaunohelper/com
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-10-21 11:35:24 +0200
committersb <sb@openoffice.org>2010-10-21 11:35:24 +0200
commit823c4f2b4b1c118a8944992365a0bb7a7cc8f861 (patch)
tree752f81bcb1d2e511cd08ef7a9e97eba7bdd2379d /javaunohelper/com
parent1221920d8979270644cf55c02e9202c534adb20f (diff)
sb131: #i114962# allow for explicit implementation name in css.lib.uno.helper.Factory
Diffstat (limited to 'javaunohelper/com')
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/Factory.java34
1 files changed, 29 insertions, 5 deletions
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;