[Libreoffice-commits] core.git: qadevOOo/runner
Stephan Bergmann
sbergman at redhat.com
Wed Oct 21 00:02:15 PDT 2015
qadevOOo/runner/util/ValueChanger.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 7180887981f9f417d4b9e75e196ee2cf500c1aac
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 21 09:01:03 2015 +0200
Make ValueChanger work for UNO structs
...that always have a static UNOTYPEINFO field
Change-Id: Ie70632c47e03897e79c3ddf7087e51c1e67cf086
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java
index 4afac0a..fc747ad 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));
More information about the Libreoffice-commits
mailing list