summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2016-12-27 14:40:08 +0100
committerJean-Pierre Ledure <jp@ledure.be>2017-01-12 11:40:49 +0100
commite2a1e22288a4fbe0681a8e33d25816f80799e687 (patch)
treec006763f829ecccdf5b5a1de43a58963d6d237de /wizards
parentde5222082f6652a0ff8715ad9e908b45e893db64 (diff)
Access2Base - Use Empty() builtin function
... i.o. uninitialized variable Change-Id: I732705df11ea25c2b106d542f9e97f3f32cc9867
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/access2base/Application.xba4
-rw-r--r--wizards/source/access2base/Control.xba14
-rw-r--r--wizards/source/access2base/DataDef.xba8
-rw-r--r--wizards/source/access2base/Database.xba8
-rw-r--r--wizards/source/access2base/Dialog.xba9
-rw-r--r--wizards/source/access2base/Event.xba8
-rw-r--r--wizards/source/access2base/Field.xba12
-rw-r--r--wizards/source/access2base/Form.xba10
-rw-r--r--wizards/source/access2base/OptionGroup.xba10
-rw-r--r--wizards/source/access2base/Recordset.xba7
-rw-r--r--wizards/source/access2base/SubForm.xba10
-rw-r--r--wizards/source/access2base/Utils.xba4
12 files changed, 51 insertions, 53 deletions
diff --git a/wizards/source/access2base/Application.xba b/wizards/source/access2base/Application.xba
index 037d54b5091e..46cb24afac2d 100644
--- a/wizards/source/access2base/Application.xba
+++ b/wizards/source/access2base/Application.xba
@@ -734,13 +734,13 @@ Public Function Controls(ByVal Optional pvObject As Variant, Optional ByVal pvIn
&apos; If no pvIndex argument, return a Collection type
If _ErrorHandler() Then On Local Error Goto Error_Function
-Dim vObject As Object, vEMPTY As variant
+Dim vObject As Object
Const cstThisSub = &quot;Controls&quot;
Utils._SetCalledSub(cstThisSub)
If IsMissing(pvObject) Then Call _TraceArguments()
If IsNull(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments()
- Controls = vEMPTY
+ Controls = EMPTY
If VarType(pvObject) = vbString Then
Set vObject = Forms(pvObject)
diff --git a/wizards/source/access2base/Control.xba b/wizards/source/access2base/Control.xba
index 9319895a50af..859e44601328 100644
--- a/wizards/source/access2base/Control.xba
+++ b/wizards/source/access2base/Control.xba
@@ -1381,10 +1381,10 @@ REM ----------------------------------------------------------------------------
Private Function _PropertyGet(ByVal psProperty As String, ByVal Optional pvIndex As Variant) As Variant
&apos; Return property value of the psProperty property name
-Dim vEMPTY As Variant, iArg As Integer
+Dim iArg As Integer
If _ErrorHandler() Then On Local Error Goto Error_Function
Utils._SetCalledSub(&quot;Control.get&quot; &amp; psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
&apos;Check Index argument
Dim iArgNr As Integer
@@ -1759,7 +1759,7 @@ Dim vSelection As Variant, sSelectedText As String
If Not Utils._hasUNOProperty(ControlModel, &quot;StringItemList&quot;) Then Goto Trace_Error
If Not Utils._hasUNOProperty(ControlModel, &quot;SelectedItems&quot;) Then Goto Trace_Error
If UBound(ControlModel.SelectedItems) &gt; 0 Then &apos; Several items selected
- vGet = vEMPTY &apos; Listbox has no value, only an array of Selected flags to identify values
+ vGet = EMPTY &apos; Listbox has no value, only an array of Selected flags to identify values
Else &apos; Mono selection
Select Case _ParentType
Case CTLPARENTISDIALOG
@@ -1768,7 +1768,7 @@ Dim vSelection As Variant, sSelectedText As String
If lListIndex &gt; -1 And lListIndex &lt;= UBound(ControlModel.StringItemList) Then
vGet = ControlModel.StringItemList(lListIndex)
Else
- vGet = vEMPTY
+ vGet = EMPTY
End If
End If
Case Else
@@ -1838,15 +1838,15 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, , psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Trace_Error_Index:
TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(), 0, 1, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, &quot;Control._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet V0.9.1
diff --git a/wizards/source/access2base/DataDef.xba b/wizards/source/access2base/DataDef.xba
index df416c09d9f9..0b8705555d43 100644
--- a/wizards/source/access2base/DataDef.xba
+++ b/wizards/source/access2base/DataDef.xba
@@ -477,8 +477,8 @@ Private Function _PropertyGet(ByVal psProperty As String) As Variant
Dim cstThisSub As String
cstThisSub = Utils._PCase(_Type)
Utils._SetCalledSub(cstThisSub &amp; &quot;.get&quot; &amp; psProperty)
-Dim vEMPTY As Variant, sSql As String, sVerb As String, iType As Integer
- _PropertyGet = vEMPTY
+Dim sSql As String, sVerb As String, iType As Integer
+ _PropertyGet = EMPTY
If Not hasProperty(psProperty) Then Goto Trace_Error
Select Case UCase(psProperty)
@@ -517,11 +517,11 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, , psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, cstThisSub &amp; &quot;._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba
index 01c56a70e480..4d7513e8ad93 100644
--- a/wizards/source/access2base/Database.xba
+++ b/wizards/source/access2base/Database.xba
@@ -1657,8 +1657,8 @@ Private Function _PropertyGet(ByVal psProperty As String) As Variant
If _ErrorHandler() Then On Local Error Goto Error_Function
Utils._SetCalledSub(&quot;Database.get&quot; &amp; psProperty)
-Dim vEMPTY As Variant
- _PropertyGet = vEMPTY
+
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;Connect&quot;)
@@ -1679,11 +1679,11 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(), 0, , psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, &quot;Database._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet
diff --git a/wizards/source/access2base/Dialog.xba b/wizards/source/access2base/Dialog.xba
index 0fafbd9daaa9..a0b23eab60de 100644
--- a/wizards/source/access2base/Dialog.xba
+++ b/wizards/source/access2base/Dialog.xba
@@ -565,8 +565,7 @@ Private Function _PropertyGet(ByVal psProperty As String) As Variant
Utils._SetCalledSub(&quot;Dialog.get&quot; &amp; psProperty)
&apos;Execute
-Dim vEMPTY As Variant
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;Name&quot;), UCase(&quot;IsLoaded&quot;)
@@ -599,15 +598,15 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Trace_Error_Dialog:
TraceError(TRACEFATAL, ERRDIALOGNOTSTARTED, Utils._CalledSub(), 0, 1, _Name)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, &quot;Dialog._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet
diff --git a/wizards/source/access2base/Event.xba b/wizards/source/access2base/Event.xba
index de6aa2a6e4c6..32ec17cc3937 100644
--- a/wizards/source/access2base/Event.xba
+++ b/wizards/source/access2base/Event.xba
@@ -420,8 +420,8 @@ Private Function _PropertyGet(ByVal psProperty As String) As Variant
If _ErrorHandler() Then On Local Error Goto Error_Function
Utils._SetCalledSub(&quot;Event.get&quot; &amp; psProperty)
-Dim vEMPTY As Variant
- _PropertyGet = vEMPTY
+
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;ButtonLeft&quot;)
@@ -486,11 +486,11 @@ Exit_Function:
Trace_Error:
&apos; Errors are not displayed to avoid display infinite cycling
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, False, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, &quot;Event._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet V1.1.0
</script:module> \ No newline at end of file
diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba
index d08bcfbd37d6..35d5bc6bddb8 100644
--- a/wizards/source/access2base/Field.xba
+++ b/wizards/source/access2base/Field.xba
@@ -398,12 +398,12 @@ Dim cstThisSub As String
If Not hasProperty(psProperty) Then Goto Trace_Error
-Dim vEMPTY As Variant, bCond1 As Boolean, bCond2 As Boolean, vValue As Variant, oValue As Object, sValue As String
+Dim bCond1 As Boolean, bCond2 As Boolean, vValue As Variant, oValue As Object, sValue As String
Dim oSize As Object, lSize As Long, bNullable As Boolean, bNull As Boolean
Const cstMaxTextLength = 65535
Const cstMaxBinlength = 2 * 65535
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;DataType&quot;)
@@ -490,7 +490,7 @@ Const cstMaxBinlength = 2 * 65535
End If
oSize.closeInput()
Else
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
End If
Case UCase(&quot;Name&quot;)
_PropertyGet = _Name
@@ -594,15 +594,15 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, , psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Trace_Length:
TraceError(TRACEFATAL, ERROVERFLOW, Utils._CalledSub(), 0, , Array(lSize, &quot;GetChunk&quot;))
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, cstThisSub, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet V1.1.0
diff --git a/wizards/source/access2base/Form.xba b/wizards/source/access2base/Form.xba
index f890214929e0..66962d1c3de5 100644
--- a/wizards/source/access2base/Form.xba
+++ b/wizards/source/access2base/Form.xba
@@ -845,10 +845,10 @@ Private Function _PropertyGet(ByVal psProperty As String) As Variant
Utils._SetCalledSub(&quot;Form.get&quot; &amp; psProperty)
&apos;Execute
-Dim oDatabase As Object, vBookmark As Variant, vEMPTY As Variant
+Dim oDatabase As Object, vBookmark As Variant
Dim i As Integer, oObject As Object
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;Name&quot;), UCase(&quot;IsLoaded&quot;)
@@ -937,15 +937,15 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Trace_Error_Form:
TraceError(TRACEFATAL, ERRFORMNOTOPEN, Utils._CalledSub(), 0, 1, _Name)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, &quot;Form._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet
diff --git a/wizards/source/access2base/OptionGroup.xba b/wizards/source/access2base/OptionGroup.xba
index a1177aec4399..180591ae5b76 100644
--- a/wizards/source/access2base/OptionGroup.xba
+++ b/wizards/source/access2base/OptionGroup.xba
@@ -216,9 +216,9 @@ Private Function _PropertyGet(ByVal psProperty As String) As Variant
Utils._SetCalledSub(&quot;OptionGroup.get&quot; &amp; psProperty)
&apos;Execute
-Dim oDatabase As Object, vBookmark As Variant, vEMPTY As Variant
+Dim oDatabase As Object, vBookmark As Variant
Dim iValue As Integer, i As Integer
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;Count&quot;)
_PropertyGet = _Count
@@ -244,15 +244,15 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Trace_Error_Index:
TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(), 0, 1, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, &quot;OptionGroup._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet
diff --git a/wizards/source/access2base/Recordset.xba b/wizards/source/access2base/Recordset.xba
index 81061bdad875..d04f2e6bf382 100644
--- a/wizards/source/access2base/Recordset.xba
+++ b/wizards/source/access2base/Recordset.xba
@@ -1135,8 +1135,7 @@ Dim cstThisSub As String
cstThisSub = &quot;Recordset.get&quot;
Utils._SetCalledSub(cstThisSub &amp; psProperty)
-Dim vEMPTY As Variant
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;AbsolutePosition&quot;)
@@ -1203,7 +1202,7 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(), 0, , psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Trace_Forward:
TraceError(TRACEFATAL, ERRRECORDSETFORWARD, Utils._CalledSub(), 0)
@@ -1213,7 +1212,7 @@ Trace_Closed:
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, cstThisSub &amp; &quot;._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet
diff --git a/wizards/source/access2base/SubForm.xba b/wizards/source/access2base/SubForm.xba
index 832e8c12fc7e..caa4a2c43ae4 100644
--- a/wizards/source/access2base/SubForm.xba
+++ b/wizards/source/access2base/SubForm.xba
@@ -570,8 +570,8 @@ Dim iArgNr As Integer
End If
&apos;Execute
-Dim oDatabase As Object, vBookmark As Variant, vEMPTY As Variant
- _PropertyGet = vEMPTY
+Dim oDatabase As Object, vBookmark As Variant
+ _PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;AllowAdditions&quot;)
@@ -652,15 +652,15 @@ Exit_Function:
Exit Function
Trace_Error:
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Trace_Error_Index:
TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(), 0, 1, psProperty)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
Goto Exit_Function
Error_Function:
TraceError(TRACEABORT, Err, &quot;SubForm._PropertyGet&quot;, Erl)
- _PropertyGet = vEMPTY
+ _PropertyGet = EMPTY
GoTo Exit_Function
End Function &apos; _PropertyGet
diff --git a/wizards/source/access2base/Utils.xba b/wizards/source/access2base/Utils.xba
index 668507867369..7367e4e63e59 100644
--- a/wizards/source/access2base/Utils.xba
+++ b/wizards/source/access2base/Utils.xba
@@ -211,7 +211,7 @@ Public Function _CVar(ByRef psArg As String, ByVal Optional pbStrDate As Boolean
&apos; Return values may of types Array, Long, Double, Date, Boolean, String, Null or Empty
&apos; pbStrDate = True keeps dates as strings
-Dim cstEscape1 As String, cstEscape2 As String, vEMPTY As Variant
+Dim cstEscape1 As String, cstEscape2 As String
cstEscape1 = Chr(14) &apos; Form feed used as temporary escape character for \\
cstEscape2 = Chr(27) &apos; ESC used as temporary escape character for \;
@@ -242,7 +242,7 @@ Dim sArg As String, vArgs() As Variant, vVars() As Variant, i As Integer
&apos; Usual case
Select Case True
- Case sArg = &quot;[EMPTY]&quot; : _CVar = vEMPTY
+ Case sArg = &quot;[EMPTY]&quot; : _CVar = EMPTY
Case sArg = &quot;[NULL]&quot; Or sArg = &quot;[VARIANT]&quot; : _CVar = Null
Case sArg = &quot;[OBJECT]&quot; : _CVar = Nothing
Case sArg = &quot;[TRUE]&quot; : _CVar = True