Debian Codegraph @

basic/qa/basic_coverage/test_redim_objects.bas

raw
1 ' This file is part of the LibreOffice project.
2 '
3 ' This Source Code Form is subject to the terms of the Mozilla Public
4 ' License, v. 2.0. If a copy of the MPL was not distributed with this
5 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 '
7
8 Option Explicit
9
10 Type testType
11 iNr As Integer
12 sType As String
13 aValue As Variant
14 oColor As Object
15 End Type
16
17 Function doUnitTest as String
18
19 doUnitTest = "FAIL"
20
21 ' tdf#136755 - ReDim did not work on an array of objects
22 Dim aPropertyValues(1) As New com.sun.star.beans.PropertyValue
23 If (UBound(aPropertyValues) <> 1) Then Exit Function
24 ReDim aPropertyValues(5) As com.sun.star.beans.PropertyValue
25 If (UBound(aPropertyValues) <> 5) Then Exit Function
26
27 ' tdf#124008 - ReDim did not work on an array of individual declared types
28 Dim aType(1) As testType
29 If (UBound(aType) <> 1) Then Exit Function
30 ReDim aType(5) As testType
31 If (UBound(aType) <> 5) Then Exit Function
32
33 doUnitTest = "OK"
34
35 End Function