diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-21 09:01:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-21 09:01:03 +0200 |
commit | 7180887981f9f417d4b9e75e196ee2cf500c1aac (patch) | |
tree | b654743a9b0b8ddfdc0c9f2a128cb4fe415d6da1 /qadevOOo/runner | |
parent | 7276c346678c2cb51c14f6011659376890bbabea (diff) |
Make ValueChanger work for UNO structs
...that always have a static UNOTYPEINFO field
Change-Id: Ie70632c47e03897e79c3ddf7087e51c1e67cf086
Diffstat (limited to 'qadevOOo/runner')
-rw-r--r-- | qadevOOo/runner/util/ValueChanger.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java index 4afac0a665c0..fc747ad2d751 100644 --- a/qadevOOo/runner/util/ValueChanger.java +++ b/qadevOOo/runner/util/ValueChanger.java @@ -960,7 +960,7 @@ public class ValueChanger { newValue = clazz.newInstance(); Field[] fields = clazz.getFields(); for (int i = 0; i < fields.length; i++) { - if ((fields[i].getModifiers() & Modifier.PUBLIC) != 0) { + if ((fields[i].getModifiers() & Modifier.STATIC) == 0) { Class<?> fType = fields[i].getType(); Field field = fields[i]; if (!fType.isPrimitive()) { @@ -1036,6 +1036,11 @@ public class ValueChanger { Field[] fields = clazz.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { int mod = fields[i].getModifiers(); + if (mod == (Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL) + && fields[i].getName().equals("UNOTYPEINFO")) + { + continue; + } // If the field is PUBLIC it must not be STATIC or FINAL result &= ((mod & Modifier.PUBLIC) == 0) || (((mod & Modifier.STATIC) == 0) && ((mod & Modifier.FINAL) == 0)); |