https://bz.apache.org/ooo/show_bug.cgi?id=126351
Issue ID: 126351
Issue Type: DEFECT
Summary: Basic : Incorrect Redim for an array of structure
Product: App Dev
Version: 4.1.1
Hardware: All
OS: All
Status: CONFIRMED
Severity: normal
Priority: P5
Component: scripting
Assignee: [email protected]
Reporter: [email protected]
Run the following code in the IDE
Set a breakpoint at or after the MsgBox and set a watch on variable props
Sub Test
Dim n As Long
Dim props(2) As New com.sun.star.beans.PropertyValue
n = 1
Redim props(n) As New com.sun.star.beans.PropertyValue
msgBox Ubound(props())
End Sub
MsgBox displays : 2 (should be 1)
Watch displays : props(0) is a Null Object (should be a PropertyValue)
Whatever the value of n, the array keeps the original dimension.
Same problem with any other API structure.
The bug seems very old.
Workaround : use Preserve
Redim preserve props(n) As New com.sun.star.beans.PropertyValue
--
You are receiving this mail because:
You are the assignee for the issue.