diff options
author | Steffen Grund <sg@openoffice.org> | 2003-02-04 10:29:25 +0000 |
---|---|---|
committer | Steffen Grund <sg@openoffice.org> | 2003-02-04 10:29:25 +0000 |
commit | caa197b295ec238715aa47aa5a1ea5be273e43a3 (patch) | |
tree | 2218ac96103cb10120da9e461eae352510ec663d /qadevOOo/tests/java/ifc/script | |
parent | b96a237b5e5f076b4cccdb24a5355d45fe972e3d (diff) |
CHG: adapted to new returned value of type Any
Diffstat (limited to 'qadevOOo/tests/java/ifc/script')
-rw-r--r-- | qadevOOo/tests/java/ifc/script/_XTypeConverter.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/ifc/script/_XTypeConverter.java b/qadevOOo/tests/java/ifc/script/_XTypeConverter.java index 845d7382a15d..5e4943681172 100644 --- a/qadevOOo/tests/java/ifc/script/_XTypeConverter.java +++ b/qadevOOo/tests/java/ifc/script/_XTypeConverter.java @@ -2,9 +2,9 @@ * * $RCSfile: _XTypeConverter.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change:$Date: 2003-01-27 18:11:25 $ + * last change:$Date: 2003-02-04 11:29:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,6 +64,8 @@ package ifc.script; import com.sun.star.container.XSet; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.script.XTypeConverter; +import com.sun.star.uno.Any; +import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Type; import com.sun.star.uno.TypeClass; import lib.MultiMethodTest; @@ -108,9 +110,17 @@ public class _XTypeConverter extends MultiMethodTest { try { Type destType = new Type(XSet.class) ; - Object res = oObj.convertTo(value, destType) ; + Object o = oObj.convertTo(value, destType); - tRes.tested("convertTo()", res instanceof XSet) ; + boolean result; + if (o instanceof Any) { + result = ((Any)o).getType().equals(destType); + } + else { + result = (o instanceof XSet); + } + + tRes.tested("convertTo()", result) ; } catch (com.sun.star.script.CannotConvertException e) { log.println("Exception while converting value.") ; e.printStackTrace(log) ; |