[Libreoffice-commits] core.git: wizards/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Aug 21 15:30:17 UTC 2018
wizards/source/access2base/Application.xba | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
New commits:
commit c4651bf0b75e3178efa2ac472ec4ed225176bbfd
Author: Jean-Pierre Ledure <jp at ledure.be>
AuthorDate: Tue Aug 21 17:26:05 2018 +0200
Commit: Jean-Pierre Ledure <jp at ledure.be>
CommitDate: Tue Aug 21 17:26:05 2018 +0200
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
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
' Result = 2 items array: (0) list of hierarchical names
' (1) list of persistent names
'
-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 = "application/vnd.oasis.opendocument.text"
Const cstSeparator = "\;"
- _CollectNames = Array()
- vCollect = Array()
- ReDim vCollect(0 To 1)
+ _CollectNames = sCollect()
vPersistentList = Array()
With poCollection
@@ -1564,9 +1562,9 @@ Const cstSeparator = "\;"
vNamesList(i) = psPrefix & vNamesList(i)
vPersistentList(i) = oObject.PersistentName
Case "" ' Folder
- vCollect = _CollectNames(oObject, psPrefix & sName & "/")
- vNamesList(i) = vCollect(0)
- vPersistentList(i) = vCollect(1)
+ sCollect = _CollectNames(oObject, psPrefix & sName & "/")
+ vNamesList(i) = sCollect(0)
+ vPersistentList(i) = sCollect(1)
Case Else
End Select
Next i
@@ -1574,9 +1572,9 @@ Const cstSeparator = "\;"
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 ' _CollectNames V6.2.0
@@ -1749,4 +1747,4 @@ Public Sub _RootInit(Optional ByVal pbForce As Boolean)
End Sub ' _RootInit V1.1.0
-</script:module>
+</script:module>
\ No newline at end of file
More information about the Libreoffice-commits
mailing list