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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.

Reply via email to