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? Can I disable this statement locally?