Converting Python Tuples / Lists into Any in PyUNO

Thomas Viehmann tv at beamnet.de
Wed May 15 13:27:58 UTC 2019


Hello,

currently, the PyUNO bridge converts tuples and lists by converting each 
element to Any and then constructing a list of []Any.
This is not what many functions expect and leads to a suboptimal 
experience, e.g. when using XPropertySet.setPropertyValue:

https://forum.openoffice.org/en/forum/viewtopic.php?t=56460

https://bugs.documentfoundation.org/show_bug.cgi?id=125307

A lazy grep through the sdk/idl gives
80 uses of []Any ( rgrep 'sequence< *any' sdk/idl | wc -l )
220 uses of []String ( rgrep 'sequence< *string' sdk/idl  | wc -l )

but that isn't really what this is about, it's about what sequence types 
are expected when an any is passed.

My intuition would be that the more specific type is better when 
applicable, but I would value your input whether such a change would be 
considered an improvement.

Best regards

Thomas


More information about the LibreOffice mailing list