commit 0a5921ee97aa2f421b6d69b98ca837c73c001fe0
parent 6972943520917cd553aaadc6b35ed12a0cde1813
Author: Tomas Hlavaty <tom@logand.com>
Date: Sun, 15 Jan 2012 13:27:25 +0100
typeinfo attributes before nonatributes
Diffstat:
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/unoidl2java.c b/unoidl2java.c
@@ -275,6 +275,21 @@ static Any pr_TypeInfo1(void *env, Any x) {
f |= _IN | _OUT | type_flags(caddr(x));
pr_TypeInfo2("Parameter", cadr(x), f, env, 0);
}
+ return NIL;
+}
+
+static Any pr_TypeInfo1_attribute(void *env, Any x) {
+ if(ATTRIBUTE == kind(car(x))) {
+ pr_TypeInfo1(env, x);
+ ++*((int *) env);
+ }
+ return NIL;
+}
+
+static Any pr_TypeInfo1_nonattribute(void *env, Any x) {
+ if(ATTRIBUTE != kind(car(x)))
+ pr_TypeInfo1(env, x);
+ return NIL;
}
static int pr_TypeInfo_p(void *env, Any x) {return INTERFACE != kind(car(x));}
@@ -283,7 +298,8 @@ static void pr_TypeInfo(Any body) {
if(some(NULL, pr_TypeInfo_p, body)) {
pr(" public static final com.sun.star.lib.uno.typeinfo.TypeInfo UNOTYPEINFO[] = {");
int i = -1;
- mapc(&i, pr_TypeInfo1, body);
+ mapc(&i, pr_TypeInfo1_attribute, body);
+ mapc(&i, pr_TypeInfo1_nonattribute, body);
pl("");
pl(" };");
}