[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - wizards/source

Jean-Pierre Ledure jp at ledure.be
Wed Aug 5 01:08:23 PDT 2015


 wizards/source/access2base/CommandBar.xba        |    1 +
 wizards/source/access2base/CommandBarControl.xba |    9 +++++----
 wizards/source/access2base/DoCmd.xba             |    2 +-
 wizards/source/access2base/UtilProperty.xba      |    2 +-
 4 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 7f0cc275076c886efa53e35537c19cdb9b389666
Author: Jean-Pierre Ledure <jp at ledure.be>
Date:   Sun Jul 26 13:24:57 2015 +0200

    Access2Base - Errors in CommandBarControls collection
    
    - correct return value in Execute method: returned alays False, should return True when successful
    - Item property of collection did not work because incomplete object initialisation
    
    Change-Id: I9b2e682afb21747766e918bf905e35d9485b751d
    Reviewed-on: https://gerrit.libreoffice.org/17351
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/wizards/source/access2base/CommandBar.xba b/wizards/source/access2base/CommandBar.xba
index 93bc884..ed7955d 100644
--- a/wizards/source/access2base/CommandBar.xba
+++ b/wizards/source/access2base/CommandBar.xba
@@ -170,6 +170,7 @@ Dim oObject As Object
 				Set oObject = New Collect
 				oObject._CollType = COLLCOMMANDBARCONTROLS
 				oObject._ParentType = OBJCOMMANDBAR
+				oObject._ParentName = _Name
 				oObject._Count = iItemsCount
 			Case Else		'	pvIndex is numeric
 				Goto Trace_IndexError
diff --git a/wizards/source/access2base/CommandBarControl.xba b/wizards/source/access2base/CommandBarControl.xba
index a6bdcbc..286dc07 100644
--- a/wizards/source/access2base/CommandBarControl.xba
+++ b/wizards/source/access2base/CommandBarControl.xba
@@ -152,24 +152,25 @@ Const cstThisSub = "CommandBarControl.Execute"
 	Utils._SetCalledSub(cstThisSub)
 
 Dim sExecute As String
-	Execute = False
+
+	Execute = True
 	sExecute = _GetPropertyValue(_Element, "CommandURL", "")
 
 	Select Case True
-		Case sExecute = ""
+		Case sExecute = ""		:	Execute = False
 		Case _IsLeft(sExecute, ".uno:")
 			Execute = DoCmd.RunCommand(sExecute)
 		Case _IsLeft(sExecute, "vnd.sun.star.script:")
 			Execute = Utils._RunScript(sExecute, Array(Nothing))
 		Case Else
 	End Select
-
+	
 Exit_Function:
 	Utils._ResetCalledSub(cstThisSub)
 	Exit Function
 Error_Function:
 	TraceError(TRACEABORT, Err, cstThisSub, Erl)
-	Reset = False
+	Execute = False
 	GoTo Exit_Function
 End Function	'	Execute	V1.3.0
 
diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba
index 0cc2605..261aa26 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -2016,7 +2016,7 @@ End Sub				'	_DispatchCommand	V1.3.0
 
 REM -----------------------------------------------------------------------------------------------------------------------
 Private Function _getTempDirectoryURL()	As String
-'	Return the tempry directory defined in the OO Options (Paths)
+'	Return the temporary directory defined in the OO Options (Paths)
 Dim sDirectory As String, oSettings As Object, oPathSettings As Object	
 
 	If _ErrorHandler() Then On Local Error Goto Error_Function
diff --git a/wizards/source/access2base/UtilProperty.xba b/wizards/source/access2base/UtilProperty.xba
index b1530c1..b265550 100644
--- a/wizards/source/access2base/UtilProperty.xba
+++ b/wizards/source/access2base/UtilProperty.xba
@@ -156,7 +156,7 @@ Dim iNumProperties As Integer, i As Integer
 				pvPropertyValuesArray(i) = pvPropertyValuesArray(i + 1)
 			Next i
 		EndIf
-		' Redimension the array to have one feweer element.
+		' Redimension the array to have one fewer element.
 		Redim Preserve pvPropertyValuesArray(iNumProperties - 2)
 	EndIf
 


More information about the Libreoffice-commits mailing list