[Libreoffice-commits] core.git: wizards/source
Jean-Pierre Ledure (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 2 09:15:46 UTC 2019
wizards/source/access2base/Control.xba | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
New commits:
commit 5d22b9a022f8c98b6b215860ce45b52aea41633e
Author: Jean-Pierre Ledure <jp at ledure.be>
AuthorDate: Tue Jul 2 11:12:14 2019 +0200
Commit: Jean-Pierre Ledure <jp at ledure.be>
CommitDate: Tue Jul 2 11:12:14 2019 +0200
Access2Base - Addition of SetSelected method in Control class
... to workaround the limitation of Basic on Property Let
+ SetFocus i.o. setFocus (typo)
+ Tabstop i.o. TabStop (typo)
diff --git a/wizards/source/access2base/Control.xba b/wizards/source/access2base/Control.xba
index 1c8a994d3d5c..9f6f36f1ba04 100644
--- a/wizards/source/access2base/Control.xba
+++ b/wizards/source/access2base/Control.xba
@@ -984,11 +984,11 @@ Error_Function:
End Function ' Requery
REM -----------------------------------------------------------------------------------------------------------------------
-Public Function setFocus() As Boolean
+Public Function SetFocus() As Boolean
' Execute setFocus method
- Utils._SetCalledSub("Control.setFocus")
+ Utils._SetCalledSub("Control.SetFocus")
If _ErrorHandler() Then On Local Error Goto Error_Function
- setFocus = False
+ SetFocus = False
Dim i As Integer, j As Integer, iColPosition As Integer
Dim ocControl As Object, ocGrid As Variant, oGridModel As Object
@@ -1017,18 +1017,18 @@ Dim ocControl As Object, ocGrid As Variant, oGridModel As Object
Else
ControlView.setFocus()
End If
- setFocus = True
+ SetFocus = True
Exit_Function:
- Utils._ResetCalledSub("Control.setFocus")
+ Utils._ResetCalledSub("Control.SetFocus")
Exit Function
Error_Function:
- TraceError(TRACEABORT, Err, "Control.setFocus", Erl)
+ TraceError(TRACEABORT, Err, "Control.SetFocus", Erl)
Goto Exit_Function
Error_Grid:
TraceError(TRACEFATAL, ERRFOCUSINGRID, Utils._CalledSub(), 0, 1, Array(_Name, ocGrid._Name))
Goto Exit_Function
-End Function ' setFocus V0.9.0
+End Function ' SetFocus V0.9.0
REM -----------------------------------------------------------------------------------------------------------------------
Public Function setProperty(ByVal Optional psProperty As String, ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean
@@ -1043,6 +1043,19 @@ Public Function setProperty(ByVal Optional psProperty As String, ByVal Optional
End Function ' setProperty
REM -----------------------------------------------------------------------------------------------------------------------
+Public Function SetSelected(ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean
+' Workaround for limitation of Basic: Property Let does not accept optional arguments
+
+ If IsMissing(pvValue) Then Call _TraceArguments()
+ If IsMissing(pvIndex) Then
+ SetSelected = _PropertySet("Selected", pvValue)
+ Else
+ SetSelected = _PropertySet("Selected", pvValue, pvIndex)
+ End If
+
+End Function ' SetSelected
+
+REM -----------------------------------------------------------------------------------------------------------------------
REM --- PRIVATE FUNCTIONS ---
REM -----------------------------------------------------------------------------------------------------------------------
Private Function _Formats(ByVal psControlType As String) As Variant
@@ -1720,7 +1733,7 @@ Dim oControlEvents As Object, sEventName As String
Case UCase("TabIndex")
If Utils._hasUNOProperty(ControlModel, "TabIndex") Then _PropertyGet = ControlModel.TabIndex
Case UCase("TabStop")
- If Utils._hasUNOProperty(ControlModel, "TabStop") Then _PropertyGet = ControlModel.TabStop
+ If Utils._hasUNOProperty(ControlModel, "Tabstop") Then _PropertyGet = ControlModel.Tabstop
Case UCase("Tag")
If Utils._hasUNOProperty(ControlModel, "Tag") Then _PropertyGet = ControlModel.Tag
Case UCase("Text")
More information about the Libreoffice-commits
mailing list