[Libreoffice-commits] core.git: wizards/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 2 09:51:37 UTC 2018


 wizards/source/access2base/Root_.xba |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 8c65831e4c67a7978a297030d04dea8d6aa21712
Author:     Jean-Pierre Ledure <jp at ledure.be>
AuthorDate: Thu Aug 2 11:44:45 2018 +0200
Commit:     Jean-Pierre Ledure <jp at ledure.be>
CommitDate: Thu Aug 2 11:44:45 2018 +0200

    Access2Base - Fix undeclared variable
    
    CloseConnection: error handling is switched off
    Error was not user visible but left connection(s) unclosed.

diff --git a/wizards/source/access2base/Root_.xba b/wizards/source/access2base/Root_.xba
index 748e6c2e9fb0..3cfe3e5d5a67 100644
--- a/wizards/source/access2base/Root_.xba
+++ b/wizards/source/access2base/Root_.xba
@@ -43,7 +43,6 @@ REM ----------------------------------------------------------------------------
 REM --- CONSTRUCTORS / DESTRUCTORS						        														---
 REM -----------------------------------------------------------------------------------------------------------------------
 Private Sub Class_Initialize()
-Dim vCurrentDoc() As Variant
 	VersionNumber = Access2Base_Version
 	ErrorHandler = True
 	MinimalTraceLevel = 0
@@ -67,10 +66,9 @@ Dim vCurrentDoc() As Variant
 	Set StatusBar = Nothing
 	Set Dialogs = New Collection
 	Set TempVars = New Collection
-	vCurrentDoc() = Array()
-	ReDim vCurrentDoc(0 To 0)
-	Set vCurrentDoc(0) = Nothing
-	Set CurrentDoc() = vCurrentDoc()
+	CurrentDoc = Array()
+	ReDim CurrentDoc(0 To 0)
+	Set CurrentDoc(0) = Nothing
 End Sub		'	Constructor
 
 REM -----------------------------------------------------------------------------------------------------------------------
@@ -107,7 +105,7 @@ Dim vDbContainer As Variant, vDbContainers() As Variant, vDocContainer As Varian
 	iCurrentDoc = CurrentDocIndex( , False)			'	False prevents error raising if not found
 	If iCurrentDoc < 0 Then GoTo Exit_Sub			'	If not found ignore
 	
-	vDocContainer = CurrentDocument(iCurrentDoc)
+	vDocContainer = CurrentDoc(iCurrentDoc)
 	With vDocContainer
 		If Not .Active Then GoTo Exit_Sub		'	e.g. if successive calls to CloseConnection()
 		For i = 0 To UBound(.DbContainers)


More information about the Libreoffice-commits mailing list