diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2015-07-26 13:24:57 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:57:09 +0200 |
commit | 890d86e1758856ae6182a4a428179844a0b4c480 (patch) | |
tree | c16501f48cd2212d0b9c5448c305b74c07b0ed69 /wizards | |
parent | 774a2911fa22a244b6c1f91a9f553b5c40bda0e8 (diff) |
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@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/access2base/CommandBar.xba | 1 | ||||
-rw-r--r-- | wizards/source/access2base/CommandBarControl.xba | 9 | ||||
-rw-r--r-- | wizards/source/access2base/DoCmd.xba | 2 | ||||
-rw-r--r-- | wizards/source/access2base/UtilProperty.xba | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/wizards/source/access2base/CommandBar.xba b/wizards/source/access2base/CommandBar.xba index 93bc884383e1..ed7955d3cef1 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 a6bdcbc577e6..286dc07daa6d 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 0cc2605b14b5..261aa26b5ce8 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 b1530c1dec91..b26555054aa2 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 |