unoidl2

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/unoidl2.git/
Log | Files | Refs

commit f51a31155e79d173a7adc4c58ec68a8ae8a8f1db
parent f8d200b395d8a00728b50d64242fc8f26f8df00a
Author: Tomas Hlavaty <tom@logand.com>
Date:   Mon, 16 Jan 2012 21:00:24 +0100

respect readonly flag

Diffstat:
Munoidl2java.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/unoidl2java.c b/unoidl2java.c @@ -289,7 +289,8 @@ static Any pr_TypeInfo1(void *env, Any x) { static Any pr_TypeInfo1_attribute(void *env, Any x) { if(ATTRIBUTE == kind(car(x))) { pr_TypeInfo1(env, x); - ++*((int *) env); + if(!some(NULL, readonlyp, cadddr(x))) + ++*((int *) env); } return NIL; } @@ -450,8 +451,11 @@ static void pr_method(Any x) { static void pr_attribute(Any x) { // (attribute (string) KeyName (readonly)) Any t = cadr(x); Any n = caddr(x); + Any o = cadddr(x); pr(" public abstract "); pp(t); pr(" get"); pp(n); pl("();"); - pr(" public abstract void set"); pp(n); pr("("); pp(t); pl(" x);"); + if(!some(NULL, readonlyp, o)) { + pr(" public abstract void set"); pp(n); pr("("); pp(t); pl(" x);"); + } } static void pr_arg(Any x) {