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

            Bug ID: 147571
           Summary: DefObj in conflict with elements predefinded
                    structures
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Repeated after my post
https://ask.libreoffice.org/t/defobj-in-conflict-with-elements-predefinded-structures/74331

I am using the DefObj o statement. Unexpectedly, this declaration is applied
also to elements of predefined structures. The example below fails with an
error.

DefObj o
Sub Main
  oSheet = ThisComponent.Sheets(0)
'...
  Dim Constraints(1) as new com.sun.star.sheet.SolverConstraint
  With Constraints(0)
    .Left = oSheet.getCellRangeByName("G15").CellAddress
    .Operator = com.sun.star.sheet.SolverConstraintOperator.LESS_EQUAL
    .Right = 1.5
  End With
'...
End Sub

The error is that the .Operator element is interpreted as an object. After
removing the statement DefObj everything is OK.
Is this behavior consistent with the intention to use the DefObj statement?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to