LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / basic / qa / basic_coverage / test_redim_objects.bas
blobb2699956d7f3237a1a6730d81ad807ef40e6413e
1 ' This file is part of the LibreOffice project.
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/.
8 Option Explicit
10 Type testType
11 iNr As Integer
12 sType As String
13 aValue As Variant
14 oColor As Object
15 End Type
17 Function doUnitTest as String
19 doUnitTest = "FAIL"
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
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
33 doUnitTest = "OK"
35 End Function