summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-14 12:21:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-10-14 12:25:50 +0200
commit8fb3808f555ad5b5c66cb894f9402647ca9ba341 (patch)
treee8fc4d138c32fa25ed25afcb7ad9bf073ff35202 /sc
parent3c496d8042614718042e46b66e32e860a39abac1 (diff)
These places apparently want to unbox a value boxed as an Any
...but what the original code would have done is try to unbox as an Any again, which would throw IllegalArgumentException. As the unboxed value would only be used for printing to System.out (and Any.toString result is just fine), just don't bother to unbox at all. (In the second place, the oldValue result would further be used in a util.ValueComparer.equalValue call, but that internally takes care of correctly unboxing its arguments, anyway.) Change-Id: I6802d1acd787f19346f66b418372be1701f69139
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/complex/sc/CalcRTL.java45
1 files changed, 9 insertions, 36 deletions
diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java
index 9f946a51235a..f30fed0d5a91 100644
--- a/sc/qa/complex/sc/CalcRTL.java
+++ b/sc/qa/complex/sc/CalcRTL.java
@@ -402,16 +402,9 @@ public class CalcRTL
System.out.println("Read only property '" + propName +
"' has changed");
- try {
- if (!util.utils.isVoid(oldValue) && oldValue instanceof Any) {
- oldValue = AnyConverter.toObject( new Type(oldValue.getClass()), oldValue);
- }
-
- System.out.println("old = " + toString(oldValue));
- System.out.println("new = " + toString(newValue));
- System.out.println("result = " + toString(resValue));
- } catch (com.sun.star.lang.IllegalArgumentException iae) {
- }
+ System.out.println("old = " + toString(oldValue));
+ System.out.println("new = " + toString(newValue));
+ System.out.println("result = " + toString(resValue));
return false;
} else {
@@ -431,19 +424,9 @@ public class CalcRTL
System.out.println("Value for '" + propName +
"' hasn't changed as expected");
- try {
- if (!util.utils.isVoid(oldValue) &&
- oldValue instanceof Any) {
- oldValue = AnyConverter.toObject(
- new Type(((Any) oldValue).getClass()),
- oldValue);
- }
-
- System.out.println("old = " + toString(oldValue));
- System.out.println("new = " + toString(newValue));
- System.out.println("result = " + toString(resValue));
- } catch (com.sun.star.lang.IllegalArgumentException iae) {
- }
+ System.out.println("old = " + toString(oldValue));
+ System.out.println("new = " + toString(newValue));
+ System.out.println("result = " + toString(resValue));
if (resValue != null) {
if ((!ValueComparer.equalValue(resValue, oldValue)) ||
@@ -460,19 +443,9 @@ public class CalcRTL
} else {
System.out.println("Property '" + propName + "' OK");
- try {
- if (!util.utils.isVoid(oldValue) &&
- oldValue instanceof Any) {
- oldValue = AnyConverter.toObject(
- new Type(((Any) oldValue).getClass()),
- oldValue);
- }
-
- System.out.println("old = " + toString(oldValue));
- System.out.println("new = " + toString(newValue));
- System.out.println("result = " + toString(resValue));
- } catch (com.sun.star.lang.IllegalArgumentException iae) {
- }
+ System.out.println("old = " + toString(oldValue));
+ System.out.println("new = " + toString(newValue));
+ System.out.println("result = " + toString(resValue));
return true;
}