summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-06-03 13:36:06 +0000
committerOliver Bolte <obo@openoffice.org>2004-06-03 13:36:06 +0000
commit7ed23d545b939cf654369a9652e2ea6ea6c95cfa (patch)
treeb1655e729abdf5c7e9eff2022f952676ccb7d814 /jurt
parent3d436e6c446f3f9c65e4e1094cc01788318d40dd (diff)
INTEGRATION: CWS sb18 (1.6.24); FILE MERGED
2004/05/12 08:51:10 sb 1.6.24.1: #i21150# Adapted to instantiated polymorphic struct types.
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/uno/AnyConverter.java23
1 files changed, 2 insertions, 21 deletions
diff --git a/jurt/com/sun/star/uno/AnyConverter.java b/jurt/com/sun/star/uno/AnyConverter.java
index bb5cf557b2db..76ad74ee84fd 100644
--- a/jurt/com/sun/star/uno/AnyConverter.java
+++ b/jurt/com/sun/star/uno/AnyConverter.java
@@ -1,6 +1,5 @@
package com.sun.star.uno;
import com.sun.star.lang.IllegalArgumentException;
-
/** This class provides static methods which aim at exploring the contents of an
* Any and extracting its value. All public methods take an Object argument that
* either is the immediate object, such as Boolean, Type, interface implementation,
@@ -525,26 +524,8 @@ public class AnyConverter
break;
case TypeClass.STRUCT_value:
case TypeClass.EXCEPTION_value:
- if (dest_tc == tc)
- {
- Class source_class = type.getZClass();
- if (null == source_class)
- source_class = object.getClass();
- Class dest_class = destType.getZClass();
- if (null == dest_class)
- {
- try
- {
- dest_class = Class.forName( destType.getTypeName() );
- }
- catch (ClassNotFoundException exc)
- {
- throw new com.sun.star.lang.IllegalArgumentException(
- "The destination type (STRUCT, EXCEPTION) cannot be resolved!" );
- }
- }
- if (dest_class.isAssignableFrom( source_class ))
- return object;
+ if (destType.isSupertypeOf(type)) {
+ return object;
}
break;
case TypeClass.SEQUENCE_value: