summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2018-08-21 17:26:05 +0200
committerJean-Pierre Ledure <jp@ledure.be>2018-08-21 17:26:05 +0200
commitc4651bf0b75e3178efa2ac472ec4ed225176bbfd (patch)
treecd280fb99459ef50c5b1a2bd80818e614c937dc7 /wizards
parente02c7b1bb0e27a55f91945aa34c55f7821921d24 (diff)
Access2Base - Fix index out of array range when no forms
In AllForms the manes and persistent names lists must be stored in a fixed size array of strings When # of forms = 0 lists array was left empty. Change-Id: I9b98673688994730715bb7aeccce43a9ed4fa23d
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/access2base/Application.xba20
1 files changed, 9 insertions, 11 deletions
diff --git a/wizards/source/access2base/Application.xba b/wizards/source/access2base/Application.xba
index 8483470a4529..38491772887a 100644
--- a/wizards/source/access2base/Application.xba
+++ b/wizards/source/access2base/Application.xba
@@ -1540,14 +1540,12 @@ Private Function _CollectNames(ByRef poCollection As Object, ByVal psPrefix As S
&apos; Result = 2 items array: (0) list of hierarchical names
&apos; (1) list of persistent names
&apos;
-Dim oObject As Object, vNamesList() As Variant, vPersistentList As Variant, i As Integer, vCollect As Variant
+Dim oObject As Object, vNamesList() As Variant, vPersistentList As Variant, i As Integer, sCollect(0 To 1) As String
Dim sName As String, sType As String, sPrefix As String
Const cstFormType = &quot;application/vnd.oasis.opendocument.text&quot;
Const cstSeparator = &quot;\;&quot;
- _CollectNames = Array()
- vCollect = Array()
- ReDim vCollect(0 To 1)
+ _CollectNames = sCollect()
vPersistentList = Array()
With poCollection
@@ -1564,9 +1562,9 @@ Const cstSeparator = &quot;\;&quot;
vNamesList(i) = psPrefix &amp; vNamesList(i)
vPersistentList(i) = oObject.PersistentName
Case &quot;&quot; &apos; Folder
- vCollect = _CollectNames(oObject, psPrefix &amp; sName &amp; &quot;/&quot;)
- vNamesList(i) = vCollect(0)
- vPersistentList(i) = vCollect(1)
+ sCollect = _CollectNames(oObject, psPrefix &amp; sName &amp; &quot;/&quot;)
+ vNamesList(i) = sCollect(0)
+ vPersistentList(i) = sCollect(1)
Case Else
End Select
Next i
@@ -1574,9 +1572,9 @@ Const cstSeparator = &quot;\;&quot;
End With
Set oObject = Nothing
- vCollect(0) = Join(vNamesList, cstSeparator)
- vCollect(1) = Join(vPersistentList, cstSeparator)
- _CollectNames = vCollect
+ sCollect(0) = Join(vNamesList, cstSeparator)
+ sCollect(1) = Join(vPersistentList, cstSeparator)
+ _CollectNames = sCollect()
End Function &apos; _CollectNames V6.2.0
@@ -1749,4 +1747,4 @@ Public Sub _RootInit(Optional ByVal pbForce As Boolean)
End Sub &apos; _RootInit V1.1.0
-</script:module>
+</script:module> \ No newline at end of file