wizards/source/access2base/Control.xba |   29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

New commits:
commit 5d22b9a022f8c98b6b215860ce45b52aea41633e
Author:     Jean-Pierre Ledure <[email protected]>
AuthorDate: Tue Jul 2 11:12:14 2019 +0200
Commit:     Jean-Pierre Ledure <[email protected]>
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   &apos;  Requery
 
 REM 
-----------------------------------------------------------------------------------------------------------------------
-Public Function setFocus() As Boolean
+Public Function SetFocus() As Boolean
 &apos; Execute setFocus method
-       Utils._SetCalledSub(&quot;Control.setFocus&quot;)
+       Utils._SetCalledSub(&quot;Control.SetFocus&quot;)
        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(&quot;Control.setFocus&quot;)
+       Utils._ResetCalledSub(&quot;Control.SetFocus&quot;)
        Exit Function
 Error_Function:
-       TraceError(TRACEABORT, Err, &quot;Control.setFocus&quot;, Erl)
+       TraceError(TRACEABORT, Err, &quot;Control.SetFocus&quot;, Erl)
        Goto Exit_Function
 Error_Grid:
        TraceError(TRACEFATAL, ERRFOCUSINGRID, Utils._CalledSub(), 0, 1, 
Array(_Name, ocGrid._Name))
        Goto Exit_Function
-End Function   &apos;  setFocus        V0.9.0
+End Function   &apos;  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   &apos;  setProperty
 
 REM 
-----------------------------------------------------------------------------------------------------------------------
+Public Function SetSelected(ByVal Optional pvValue As Variant, ByVal Optional 
pvIndex As Variant) As Boolean
+&apos; Workaround for limitation of Basic: Property Let does not accept 
optional arguments
+
+       If IsMissing(pvValue) Then Call _TraceArguments()
+       If IsMissing(pvIndex) Then
+               SetSelected = _PropertySet(&quot;Selected&quot;, pvValue)
+       Else
+               SetSelected = _PropertySet(&quot;Selected&quot;, pvValue, 
pvIndex)
+       End If
+
+End Function           &apos;  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(&quot;TabIndex&quot;)
                        If Utils._hasUNOProperty(ControlModel, 
&quot;TabIndex&quot;) Then _PropertyGet = ControlModel.TabIndex
                Case UCase(&quot;TabStop&quot;)
-                       If Utils._hasUNOProperty(ControlModel, 
&quot;TabStop&quot;) Then _PropertyGet = ControlModel.TabStop
+                       If Utils._hasUNOProperty(ControlModel, 
&quot;Tabstop&quot;) Then _PropertyGet = ControlModel.Tabstop
                Case UCase(&quot;Tag&quot;)
                        If Utils._hasUNOProperty(ControlModel, &quot;Tag&quot;) 
Then _PropertyGet = ControlModel.Tag
                Case UCase(&quot;Text&quot;)
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to