[Libreoffice-bugs] [Bug 144353] New: Assigning a missing optional variable to a property does not trigger "argument is not optional"
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 7 10:03:33 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=144353
Bug ID: 144353
Summary: Assigning a missing optional variable to a property
does not trigger "argument is not optional"
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: mikekaganski at hotmail.com
CC: andreas.heinisch at yahoo.de
Created attachment 174851
--> https://bugs.documentfoundation.org/attachment.cgi?id=174851&action=edit
A sample with a macro setting object's layer using missing argument value
Open attachment; run "Main" macro in it.
The macro code is:
Sub SetOptionalLayer(Optional i)
d = thisComponent
p = d.DrawPages(0)
s = p(0)
s.LayerID = i
End Sub
Sub Main
SetOptionalLayer
End Sub
The expected result is an error "argument is not optional" at line "s.LayerID =
i", while the actual result is "IllegalArgumentException", which shows that the
value is passed to UNO, and the wrong value is only caught there.
--
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/20210907/544ba6e5/attachment.htm>
More information about the Libreoffice-bugs
mailing list