summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2015-07-26 13:24:57 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-08-05 08:08:02 +0000
commit7f0cc275076c886efa53e35537c19cdb9b389666 (patch)
tree582056936b8ba9a508c4a89d14cc7892cd50519b
parent5beb43b3fe989a25234b17dfa5d6ba0f785c5deb (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>
-rw-r--r--wizards/source/access2base/CommandBar.xba1
-rw-r--r--wizards/source/access2base/CommandBarControl.xba9
-rw-r--r--wizards/source/access2base/DoCmd.xba2
-rw-r--r--wizards/source/access2base/UtilProperty.xba2
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 &apos; 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 = &quot;CommandBarControl.Execute&quot;
Utils._SetCalledSub(cstThisSub)
Dim sExecute As String
- Execute = False
+
+ Execute = True
sExecute = _GetPropertyValue(_Element, &quot;CommandURL&quot;, &quot;&quot;)
Select Case True
- Case sExecute = &quot;&quot;
+ Case sExecute = &quot;&quot; : Execute = False
Case _IsLeft(sExecute, &quot;.uno:&quot;)
Execute = DoCmd.RunCommand(sExecute)
Case _IsLeft(sExecute, &quot;vnd.sun.star.script:&quot;)
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 &apos; 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 &apos; _DispatchCommand V1.3.0
REM -----------------------------------------------------------------------------------------------------------------------
Private Function _getTempDirectoryURL() As String
-&apos; Return the tempry directory defined in the OO Options (Paths)
+&apos; 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
- &apos; Redimension the array to have one feweer element.
+ &apos; Redimension the array to have one fewer element.
Redim Preserve pvPropertyValuesArray(iNumProperties - 2)
EndIf