[Libreoffice-bugs] [Bug 129437] [PYUNO] "setPropertyValue" method does not accept particular Enum value
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Dec 17 09:39:25 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=129437
Stephan Bergmann <sbergman at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |NOTABUG
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Stephan Bergmann <sbergman at redhat.com> ---
(In reply to Julien Nabet from comment #1)
[why don't you give file names with their full paths in the core repo; that
would make it easier for others to follow what you write]
> There's PushButtonType.idl with "PushButtonType" enum
> + UnoControlButtonModel.idl with "PushButtonType" property
>
> PushButtonType is defined as a short property but wonder if it shouldn't be
> "PushButtonType". 2 problems here:
Yeah, looks odd to have enum css.awt.PushButtonType but specify property
css.awt.UnoControlButtonModel.PushButtonType to be of type short instead;...
> - in this case var type and var name would be the same
...and while the duplicated use of identifier shouldn't be a problem...
> - we would change an interface
...this certainly would be, as service css.awt.UnoControlButtonModel is
published.
(The reason why
> button_model.PushButtonType = OK
happens to work while
> button_model.setPropertyValue("PushButtonType", OK)
doesn't is because the former is handled by inspection code in PyUNO which
implicitly coerces the value on the right to the type expected on the left,
while the latter causes PyUNO to pass a UNO ANY containing a
css.awt.PushButtonType to native code but which expects a UNO ANY containing a
UNO SHORT.)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191217/af2c1d6f/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list