Is 'choice' and 'group' in UNO possible?

Regina Henschel rb.henschel at t-online.de
Thu Apr 6 15:52:37 UTC 2023


Hi Stephan,

Stephan Bergmann schrieb am 05.04.2023 um 22:19:
> On 4/5/23 18:47, Regina Henschel wrote:
>> In RELAX NG (used for ODF file format) the structure below is 
>> possible. Is something similar possible for to define an 
>> "enhanced-color" for API? I mean, to have two members, where the data 
>> type of the second depends on the value of the first.
> 
> UNO does not support sum types.  So you'd need to resort to something 
> more ugly, like a struct type with a discriminating member (e.g. an 
> enum) plus two further members (of which one or the other would be 
> ignored) or (probably more idiomatic) an ANY.
> 

Then there exist no direct solution. Armin and Tomaž should discuss and 
tell their ideas to integrate theme colors into multi-color gradients. I 
would prefer "enum plus two members", but will wait for answers from them.

Kind regards,
Regina




More information about the LibreOffice mailing list