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

Rafael Lima <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected]
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Rafael Lima <[email protected]> ---
I ran a few tests and there seems to be something wrong here indeed.

First of all, I made a few corrections to the first example so it would run in
Excel VBA as well. So I used the following code:

Option VBASupport 1

Type MyTyp
    a() As String
End Type

Sub Main()
    Dim typ As MyTyp
    ReDim typ.a(0)
    typ.a(0) = "Hello"
    MsgBox typ.a(0)
End Sub

The code above runs fine in Excel VBA (excluding the 'Option VBASupport 1'
line). It prints "Hello" as expected. However in LibreOffice it gives a syntax
error, meaning it doesn't compile. It seems LO can't recognize "typ.a" as a
symbol.

The following code runs fine in LO and MSO:

Sub Main2()
    Dim typ As MyTyp
    Dim aTemp() As String
    Redim aTemp(0) As String
    typ.a = aTemp
    typ.a(0) = "Hello"
    MsgBox typ.a(0)
End Sub

This indicates that there's some problem with syntax check for the ReDim
command which does not accept user-defined types as symbols.

I'm setting this to NEW.

@Mike, maybe you have an opinion about this issue?

System info:

Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3~rc2-0ubuntu0.21.10.1~lo1
Calc: threaded

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

Reply via email to