unoidl2

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

commit 16aa13df0ef2328cc56b5e787d254183230c02e7
parent 8d100ebbd8b75892d1fa991a1cd226e37a32859b
Author: Tomas Hlavaty <tom@logand.com>
Date:   Mon, 16 Jan 2012 19:49:35 +0100

readonly pr_property implemented

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

diff --git a/unoidl2java.c b/unoidl2java.c @@ -570,13 +570,17 @@ static void pr_absolute(Any x) { } } +static int propertyp(void *env, Any e) {return READONLY == kind(car(e));} + static void pr_property(Any x) { - Any name = cadr(x); - Any type = caddr(x); - Any options = cadddr(x); - pr(" protected "); pp(type); pr(" "); pp(name); pl(";"); - pr(" public "); pp(type); pr(" get"); pp(name); pl("();"); - pr(" public void set"); pp(name); pr("("); pp(type); pr(" "); pp(name); pl(");"); + Any n = cadr(x); + Any t = caddr(x); + Any o = cadddr(x); + pr(" protected "); pp(t); pr(" "); pp(n); pl(";"); + pr(" public "); pp(t); pr(" get"); pp(n); pl("();"); + if(!some(NULL, readonlyp, o)) { + pr(" public void set"); pp(n); pr("("); pp(t); pr(" "); pp(n); pl(");"); + } } static void pr_deftemplate(Any x) {