You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/06/03 10:49:15 UTC

[Issue 126351] New: Basic : Incorrect Redim for an array of structure

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: issues@openoffice.apache.org
          Reporter: marcelly@club-internet.fr

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.

[Issue 126351] Basic : Incorrect Redim for an array of structure

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126351

--- Comment #2 from mroe <mr...@gmx.net> ---
(In reply to oooforum from comment #1)
> Maybe a dup of issue 124154

No, it isn't.

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

[Issue 126351] Basic : Incorrect Redim for an array of structure

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126351

oooforum <oo...@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oooforum@free.fr

--- Comment #1 from oooforum <oo...@free.fr> ---
Maybe a dup of issue 124154

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

[Issue 126351] Basic : Incorrect Redim for an array of structure

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126351

brinzing <ol...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oliver.brinzing@gmx.de

--- Comment #3 from brinzing <ol...@gmx.de> ---
.

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