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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux