diff options
author | Stephan Wunderlich <sw@openoffice.org> | 2003-01-31 09:16:19 +0000 |
---|---|---|
committer | Stephan Wunderlich <sw@openoffice.org> | 2003-01-31 09:16:19 +0000 |
commit | 3b9388e73821c2e0cc4e98b8b01c0e0dafeefa77 (patch) | |
tree | 393913016df3613de433d435d6ab4df06efc17e6 /qadevOOo/runner/util/ValueChanger.java | |
parent | 8cde093e2fa8fe90eed966e768fccb4daca24320 (diff) |
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/runner/util/ValueChanger.java')
-rw-r--r-- | qadevOOo/runner/util/ValueChanger.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java index f522da0aec4c..969dd1054ad9 100644 --- a/qadevOOo/runner/util/ValueChanger.java +++ b/qadevOOo/runner/util/ValueChanger.java @@ -2,9 +2,9 @@ * * $RCSfile: ValueChanger.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change:$Date: 2003-01-27 16:26:54 $ + * last change:$Date: 2003-01-31 10:16:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,6 +70,10 @@ import java.lang.reflect.Field ; import java.lang.reflect.Method ; import java.lang.reflect.Modifier ; import java.lang.reflect.Array ; +import com.sun.star.uno.Any; +import com.sun.star.uno.AnyConverter; + + public class ValueChanger { @@ -79,6 +83,13 @@ public class ValueChanger { Object newValue = null; + if (oldValue instanceof com.sun.star.uno.Any) { + try { + oldValue = AnyConverter.toObject(((Any) oldValue).getType(),oldValue); + } catch (com.sun.star.lang.IllegalArgumentException iae) { + } + } + if (oldValue == null) return null; |