unoidl2

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

commit 1bb8fed61e4f776b195410b49c38a0353f24b7ba
parent 37526460d9d2a15419e1a64026a3dec983d54449
Author: Tomas Hlavaty <tom@logand.com>
Date:   Wed, 25 Jan 2012 01:31:37 +0100

2java attribute get can throw as well

Diffstat:
Munoidl2java.c | 27++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/unoidl2java.c b/unoidl2java.c @@ -528,19 +528,32 @@ static void pr_method(Any x) { pl(";"); } +static Any pr_attribute_get(void *env, Any e) { + if(GET == kind(car(e))) { + pr(" throws "); + pp_list(cadr(e), ", "); + } +} + +static Any pr_attribute_set(void *env, Any e) { + if(SET == kind(car(e))) { + pr(" throws "); + pp_list(cadr(e), ", "); + } +} + 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("();"); + Any b = cddddr(x); + // (attribute (string) HyperLinkTarget (bound) (set ((relative com sun star beans UnknownPropertyException))) (get ((relative com sun star beans UnknownPropertyException)))) + pr(" public abstract "); pp(t); pr(" get"); pp(n); pr("()"); + mapc(NULL, pr_attribute_get, b); + pl(";"); if(NIL == some(readonlyp, o)) { - Any b = caddddr(x); - // (attribute (short) WhiteSpaceTreatment NIL (set ((relative com sun star lang IllegalArgumentException)))) pr(" public abstract void set"); pp(n); pr("("); pp(t); pr(" x)"); - if(NIL != b && SET == kind(car(b))) { - pr(" throws "); - pp_list(cadr(b), ", "); - } + mapc(NULL, pr_attribute_set, b); pl(";"); } }