[Libreoffice-commits] core.git: basic/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 7 08:01:43 UTC 2021


 basic/qa/basic_coverage/da-DK/cdbl-2.bas                                        |   10 ++++++++++
 basic/qa/basic_coverage/da-DK/cdbl.bas                                          |   10 ++++++++++
 basic/qa/basic_coverage/dateadd.bas                                             |    2 ++
 basic/qa/basic_coverage/string_left_01.bas                                      |    1 +
 basic/qa/basic_coverage/string_right_01.bas                                     |    2 ++
 basic/qa/basic_coverage/test_Date.bas                                           |    2 ++
 basic/qa/basic_coverage/test_Property.GetLet.bas                                |    1 +
 basic/qa/basic_coverage/test_Property.GetSet.bas                                |    1 +
 basic/qa/basic_coverage/test_abs_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_array_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_asc_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_atn_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_beep_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_cbool_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_cbyte_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_ccur_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_cdate_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_cdatetofromiso_methods.bas                         |    2 ++
 basic/qa/basic_coverage/test_cdatetounodatecdatefromunodate_methods.bas         |    2 ++
 basic/qa/basic_coverage/test_cdatetounodatetimecdatefromunodatetime_methods.bas |    2 ++
 basic/qa/basic_coverage/test_cdatetounotimecdatefromunotime_methods.bas         |    2 ++
 basic/qa/basic_coverage/test_cdbl_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_chdircurdir_methods.bas                            |    2 ++
 basic/qa/basic_coverage/test_choose_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_chr_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_cint_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_compatibilitymode_method.bas                       |    2 ++
 basic/qa/basic_coverage/test_converttofromurl_methods.bas                       |    2 ++
 basic/qa/basic_coverage/test_cossin_methods.bas                                 |    2 ++
 basic/qa/basic_coverage/test_createobject_method.bas                            |    1 +
 basic/qa/basic_coverage/test_createunolistener_method.bas                       |    2 ++
 basic/qa/basic_coverage/test_createunoservice_method.bas                        |    2 ++
 basic/qa/basic_coverage/test_createunostruct_method.bas                         |    2 ++
 basic/qa/basic_coverage/test_createunovalue_method.bas                          |    2 ++
 basic/qa/basic_coverage/test_csng_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_cstr_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_cvar_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_cverr_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_date_literal.bas                                   |    1 +
 basic/qa/basic_coverage/test_datedateadddatediff_methods.bas                    |    2 ++
 basic/qa/basic_coverage/test_datedatepartday_methods.bas                        |    2 ++
 basic/qa/basic_coverage/test_dimarray_method.bas                                |    2 ++
 basic/qa/basic_coverage/test_environ_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_err_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_falsetrue_method.bas                               |    2 ++
 basic/qa/basic_coverage/test_filedatetime_nonexistent.bas                       |    3 +++
 basic/qa/basic_coverage/test_filedatetime_nonexistent2.bas                      |    3 +++
 basic/qa/basic_coverage/test_fix_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_frac_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_freefile_method.bas                                |    2 ++
 basic/qa/basic_coverage/test_freelibrary_method.bas                             |    2 ++
 basic/qa/basic_coverage/test_getdefaultcontext_method.bas                       |    2 ++
 basic/qa/basic_coverage/test_getdialogzoomfactorx_method.bas                    |    2 ++
 basic/qa/basic_coverage/test_getdialogzoomfactory_method.bas                    |    2 ++
 basic/qa/basic_coverage/test_getguitype_method.bas                              |    2 ++
 basic/qa/basic_coverage/test_getguiversion_method.bas                           |    2 ++
 basic/qa/basic_coverage/test_getpathseparator_method.bas                        |    2 ++
 basic/qa/basic_coverage/test_getprocessservicemanager_method.bas                |    2 ++
 basic/qa/basic_coverage/test_getsolarversion_method.bas                         |    2 ++
 basic/qa/basic_coverage/test_getsystemtype_method.bas                           |    2 ++
 basic/qa/basic_coverage/test_hasunointerfaces_method.bas                        |    2 ++
 basic/qa/basic_coverage/test_hex_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_hour_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_iif_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_instr_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_int_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_isarray_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_isdate_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_isempty_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_iserror_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_ismissing_basic.bas                                |    2 ++
 basic/qa/basic_coverage/test_ismissing_cascade.bas                              |    2 ++
 basic/qa/basic_coverage/test_ismissing_compatible.bas                           |    2 +-
 basic/qa/basic_coverage/test_isnull_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_isnumeric_method.bas                               |    2 ++
 basic/qa/basic_coverage/test_isobject_method.bas                                |    2 ++
 basic/qa/basic_coverage/test_isunostruct_method.bas                             |    2 ++
 basic/qa/basic_coverage/test_join_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_lbound_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_lcase_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_len_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_lenb_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_logexp_methods.bas                                 |    2 ++
 basic/qa/basic_coverage/test_ltrim_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_method_name_variable.bas                           |    2 ++
 basic/qa/basic_coverage/test_mid_CountNegative_3args.bas                        |    2 ++
 basic/qa/basic_coverage/test_mid_EndOutOfBounds_3args.bas                       |    2 ++
 basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.bas                     |    2 ++
 basic/qa/basic_coverage/test_mid_StartOutOfBounds_3args.bas                     |    2 ++
 basic/qa/basic_coverage/test_mid_firstletter_3args.bas                          |    2 ++
 basic/qa/basic_coverage/test_mid_sub2letters_2args.bas                          |    2 ++
 basic/qa/basic_coverage/test_minute_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_mod_operator.bas                                   |    2 ++
 basic/qa/basic_coverage/test_month_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_nowtimevalue_methods.bas                           |    2 ++
 basic/qa/basic_coverage/test_numeric_constant_parameter.bas                     |    3 +++
 basic/qa/basic_coverage/test_oct_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_option_base.bas                                    |    1 +
 basic/qa/basic_coverage/test_option_base_compatible.bas                         |    1 +
 basic/qa/basic_coverage/test_optional_paramter_type.bas                         |    1 +
 basic/qa/basic_coverage/test_optional_paramters_basic.bas                       |    2 ++
 basic/qa/basic_coverage/test_optional_paramters_compatible.bas                  |    1 +
 basic/qa/basic_coverage/test_qbcolor_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_random_methods.bas                                 |    2 ++
 basic/qa/basic_coverage/test_redim_objects.bas                                  |    2 ++
 basic/qa/basic_coverage/test_resolvepath_method.bas                             |    2 ++
 basic/qa/basic_coverage/test_rgb_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_rtrim_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_second_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_sgn_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_space_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_spc_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_split_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_sqr_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_strcomp_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_string_literal_comparison.bas                      |    2 ++
 basic/qa/basic_coverage/test_string_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_string_replace.bas                                 |    2 ++
 basic/qa/basic_coverage/test_strtrim_methods.bas                                |    2 ++
 basic/qa/basic_coverage/test_switch_method.bas                                  |    2 ++
 basic/qa/basic_coverage/test_tab_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_tan_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_tdf134692.bas                                      |    8 +++++---
 basic/qa/basic_coverage/test_timer_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_timeserialtimevalue_methods.bas                    |    2 ++
 basic/qa/basic_coverage/test_twipsperpixelx_method.bas                          |    2 ++
 basic/qa/basic_coverage/test_twipsperpixely_method.bas                          |    2 ++
 basic/qa/basic_coverage/test_typelen_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_typename_method.bas                                |    5 ++++-
 basic/qa/basic_coverage/test_ucase_method.bas                                   |    2 ++
 basic/qa/basic_coverage/test_val_method.bas                                     |    2 ++
 basic/qa/basic_coverage/test_vartype_method.bas                                 |    5 ++++-
 basic/qa/basic_coverage/test_wait_method.bas                                    |    2 ++
 basic/qa/basic_coverage/test_weekday_method.bas                                 |    2 ++
 basic/qa/basic_coverage/test_year_method.bas                                    |    2 ++
 basic/qa/basic_coverage/uno_struct_assign.bas                                   |    3 ++-
 136 files changed, 288 insertions(+), 7 deletions(-)

New commits:
commit 0ad1810a9181c5a01015cfc5206fb5870f8d6138
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Jul 6 16:00:14 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Jul 7 10:01:10 2021 +0200

    basic_coverage: use Option Explicit where possible
    
    Add missing license headers to a couple of files
    
    Change-Id: I7610f922e9ac914ae8fda0d0b6a7ca389401caca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118489
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/basic/qa/basic_coverage/da-DK/cdbl-2.bas b/basic/qa/basic_coverage/da-DK/cdbl-2.bas
index 46468ac63f31..a3fb352ea15f 100644
--- a/basic/qa/basic_coverage/da-DK/cdbl-2.bas
+++ b/basic/qa/basic_coverage/da-DK/cdbl-2.bas
@@ -1,3 +1,13 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Option Explicit
+
 Function doUnitTest() as String
     Dim A As String
     Dim B As Double
diff --git a/basic/qa/basic_coverage/da-DK/cdbl.bas b/basic/qa/basic_coverage/da-DK/cdbl.bas
index 9b849d094724..452f168fe21b 100644
--- a/basic/qa/basic_coverage/da-DK/cdbl.bas
+++ b/basic/qa/basic_coverage/da-DK/cdbl.bas
@@ -1,3 +1,13 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Option Explicit
+
 Function doUnitTest() as String
     Dim A As String
     Dim B As Double
diff --git a/basic/qa/basic_coverage/dateadd.bas b/basic/qa/basic_coverage/dateadd.bas
index 1fc65e205715..84b796db3cba 100644
--- a/basic/qa/basic_coverage/dateadd.bas
+++ b/basic/qa/basic_coverage/dateadd.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest() As String
     TestUtil.TestInit
     verify_testDateAdd
diff --git a/basic/qa/basic_coverage/string_left_01.bas b/basic/qa/basic_coverage/string_left_01.bas
index a17522979d36..d2ae7ae45ff8 100644
--- a/basic/qa/basic_coverage/string_left_01.bas
+++ b/basic/qa/basic_coverage/string_left_01.bas
@@ -6,6 +6,7 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
 
 Function doUnitTest as String
 
diff --git a/basic/qa/basic_coverage/string_right_01.bas b/basic/qa/basic_coverage/string_right_01.bas
index 9189b8846776..a291d0704bf3 100644
--- a/basic/qa/basic_coverage/string_right_01.bas
+++ b/basic/qa/basic_coverage/string_right_01.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
 
 Dim s1 As String
diff --git a/basic/qa/basic_coverage/test_Date.bas b/basic/qa/basic_coverage/test_Date.bas
index 3056040a41f0..8154da185994 100644
--- a/basic/qa/basic_coverage/test_Date.bas
+++ b/basic/qa/basic_coverage/test_Date.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
   ''' Return 'text' OR 'date' variable '''
 
diff --git a/basic/qa/basic_coverage/test_Property.GetLet.bas b/basic/qa/basic_coverage/test_Property.GetLet.bas
index 97e377cc3448..f8fa6dd14b32 100644
--- a/basic/qa/basic_coverage/test_Property.GetLet.bas
+++ b/basic/qa/basic_coverage/test_Property.GetLet.bas
@@ -6,6 +6,7 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
 Option Compatible
 
 Function doUnitTest as String
diff --git a/basic/qa/basic_coverage/test_Property.GetSet.bas b/basic/qa/basic_coverage/test_Property.GetSet.bas
index 339ffe214227..701bcc7f49e0 100644
--- a/basic/qa/basic_coverage/test_Property.GetSet.bas
+++ b/basic/qa/basic_coverage/test_Property.GetSet.bas
@@ -6,6 +6,7 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
 Option Compatible
 
 Function doUnitTest as String
diff --git a/basic/qa/basic_coverage/test_abs_method.bas b/basic/qa/basic_coverage/test_abs_method.bas
index fb1ed22af42a..e9d4b95258a5 100644
--- a/basic/qa/basic_coverage/test_abs_method.bas
+++ b/basic/qa/basic_coverage/test_abs_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' ABS
     If (Abs(-3.5) <> 3.5) Then
diff --git a/basic/qa/basic_coverage/test_array_method.bas b/basic/qa/basic_coverage/test_array_method.bas
index 7d9c65522803..145682619802 100644
--- a/basic/qa/basic_coverage/test_array_method.bas
+++ b/basic/qa/basic_coverage/test_array_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVector as Variant
     ' ARRAY
diff --git a/basic/qa/basic_coverage/test_asc_method.bas b/basic/qa/basic_coverage/test_asc_method.bas
index 982df81d1dc1..131c7cbe1d57 100644
--- a/basic/qa/basic_coverage/test_asc_method.bas
+++ b/basic/qa/basic_coverage/test_asc_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' ASC
     If (Asc("€a") <> 8364) Then
diff --git a/basic/qa/basic_coverage/test_atn_method.bas b/basic/qa/basic_coverage/test_atn_method.bas
index 08318eae007f..9e2f382c1397 100644
--- a/basic/qa/basic_coverage/test_atn_method.bas
+++ b/basic/qa/basic_coverage/test_atn_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' ATN (arc tan)
     If (Atn(1) <> PI/4) Then
diff --git a/basic/qa/basic_coverage/test_beep_method.bas b/basic/qa/basic_coverage/test_beep_method.bas
index 2952436df111..8270341b4be0 100644
--- a/basic/qa/basic_coverage/test_beep_method.bas
+++ b/basic/qa/basic_coverage/test_beep_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' BEEP
     Beep
diff --git a/basic/qa/basic_coverage/test_cbool_method.bas b/basic/qa/basic_coverage/test_cbool_method.bas
index 11b88193896a..70d3459abc96 100644
--- a/basic/qa/basic_coverage/test_cbool_method.bas
+++ b/basic/qa/basic_coverage/test_cbool_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CBOOL
     If (CBool(3) <> True) Then
diff --git a/basic/qa/basic_coverage/test_cbyte_method.bas b/basic/qa/basic_coverage/test_cbyte_method.bas
index bdcfd1f798cd..d8dbe6569376 100644
--- a/basic/qa/basic_coverage/test_cbyte_method.bas
+++ b/basic/qa/basic_coverage/test_cbyte_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CBYTE
     If (CByte("3") <> 3) Then
diff --git a/basic/qa/basic_coverage/test_ccur_method.bas b/basic/qa/basic_coverage/test_ccur_method.bas
index da6688500a2e..cd700cad3c8e 100644
--- a/basic/qa/basic_coverage/test_ccur_method.bas
+++ b/basic/qa/basic_coverage/test_ccur_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
 
     doUnitTest = "FAIL"
diff --git a/basic/qa/basic_coverage/test_cdate_method.bas b/basic/qa/basic_coverage/test_cdate_method.bas
index 9f2e357b8f39..2e4bbd1e9981 100644
--- a/basic/qa/basic_coverage/test_cdate_method.bas
+++ b/basic/qa/basic_coverage/test_cdate_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CDATE
     If (CDate(100) <> 100) Then
diff --git a/basic/qa/basic_coverage/test_cdatetofromiso_methods.bas b/basic/qa/basic_coverage/test_cdatetofromiso_methods.bas
index 9d53cca3a3d5..8cb65b74d3fc 100644
--- a/basic/qa/basic_coverage/test_cdatetofromiso_methods.bas
+++ b/basic/qa/basic_coverage/test_cdatetofromiso_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CDateFromIso CDateToIso
     If ( CDateToIso( CDateFromIso("20161016") ) <> "20161016" ) Then
diff --git a/basic/qa/basic_coverage/test_cdatetounodatecdatefromunodate_methods.bas b/basic/qa/basic_coverage/test_cdatetounodatecdatefromunodate_methods.bas
index e5da681c837b..cf713981570d 100644
--- a/basic/qa/basic_coverage/test_cdatetounodatecdatefromunodate_methods.bas
+++ b/basic/qa/basic_coverage/test_cdatetounodatecdatefromunodate_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Date()
diff --git a/basic/qa/basic_coverage/test_cdatetounodatetimecdatefromunodatetime_methods.bas b/basic/qa/basic_coverage/test_cdatetounodatetimecdatefromunodatetime_methods.bas
index 82bbb49ddcff..ef8d2968311c 100644
--- a/basic/qa/basic_coverage/test_cdatetounodatetimecdatefromunodatetime_methods.bas
+++ b/basic/qa/basic_coverage/test_cdatetounodatetimecdatefromunodatetime_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Now()
diff --git a/basic/qa/basic_coverage/test_cdatetounotimecdatefromunotime_methods.bas b/basic/qa/basic_coverage/test_cdatetounotimecdatefromunotime_methods.bas
index b84ee48f2263..ac266475579b 100644
--- a/basic/qa/basic_coverage/test_cdatetounotimecdatefromunotime_methods.bas
+++ b/basic/qa/basic_coverage/test_cdatetounotimecdatefromunotime_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Time()
diff --git a/basic/qa/basic_coverage/test_cdbl_method.bas b/basic/qa/basic_coverage/test_cdbl_method.bas
index bed575c07fbd..1c7837fcaa4b 100644
--- a/basic/qa/basic_coverage/test_cdbl_method.bas
+++ b/basic/qa/basic_coverage/test_cdbl_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CDBL
     If (CDbl("100") <> 100) Then
diff --git a/basic/qa/basic_coverage/test_chdircurdir_methods.bas b/basic/qa/basic_coverage/test_chdircurdir_methods.bas
index 414ab60dd565..58e0bab02ee3 100644
--- a/basic/qa/basic_coverage/test_chdircurdir_methods.bas
+++ b/basic/qa/basic_coverage/test_chdircurdir_methods.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CHDIR CURDIR
     ChDir( CurDir )
diff --git a/basic/qa/basic_coverage/test_choose_method.bas b/basic/qa/basic_coverage/test_choose_method.bas
index 4f072f608f4e..163a387ba4be 100644
--- a/basic/qa/basic_coverage/test_choose_method.bas
+++ b/basic/qa/basic_coverage/test_choose_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CHOOSE
     If (Choose(2, 1, 100, 3) <> 100) Then
diff --git a/basic/qa/basic_coverage/test_chr_method.bas b/basic/qa/basic_coverage/test_chr_method.bas
index a927873f5322..9c1df6659c10 100644
--- a/basic/qa/basic_coverage/test_chr_method.bas
+++ b/basic/qa/basic_coverage/test_chr_method.bas
@@ -4,6 +4,8 @@
 ' License, v. 2.0. If a copy of the MPL was not distributed with this
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+Option Explicit
+
 Function overflow1 as Integer
     On Error GoTo handler
     Chr(-32769)
diff --git a/basic/qa/basic_coverage/test_cint_method.bas b/basic/qa/basic_coverage/test_cint_method.bas
index 4f4692ca5752..e3bd740947cf 100644
--- a/basic/qa/basic_coverage/test_cint_method.bas
+++ b/basic/qa/basic_coverage/test_cint_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CINT
     If (CInt("100") <> 100) Then
diff --git a/basic/qa/basic_coverage/test_compatibilitymode_method.bas b/basic/qa/basic_coverage/test_compatibilitymode_method.bas
index 0a6adaae1284..4d8256c1d27a 100644
--- a/basic/qa/basic_coverage/test_compatibilitymode_method.bas
+++ b/basic/qa/basic_coverage/test_compatibilitymode_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CompatibilityMode
     If (CompatibilityMode(True) <> True) Then
diff --git a/basic/qa/basic_coverage/test_converttofromurl_methods.bas b/basic/qa/basic_coverage/test_converttofromurl_methods.bas
index 0bcaf4cac48f..d1dbcfc5ff73 100644
--- a/basic/qa/basic_coverage/test_converttofromurl_methods.bas
+++ b/basic/qa/basic_coverage/test_converttofromurl_methods.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' ConvertFromUrl ConvertToUrl
     If ( ConvertToUrl( ConvertFromUrl("") ) <> "") Then
diff --git a/basic/qa/basic_coverage/test_cossin_methods.bas b/basic/qa/basic_coverage/test_cossin_methods.bas
index 3bbdd95f0fd4..733a6afa34f8 100644
--- a/basic/qa/basic_coverage/test_cossin_methods.bas
+++ b/basic/qa/basic_coverage/test_cossin_methods.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' COS SIN
     If ( Abs(Cos(PI/3) - Sin(PI/6)) > 1E-6 ) Then
diff --git a/basic/qa/basic_coverage/test_createobject_method.bas b/basic/qa/basic_coverage/test_createobject_method.bas
index 50fa536f9ad2..e8281c7d2feb 100644
--- a/basic/qa/basic_coverage/test_createobject_method.bas
+++ b/basic/qa/basic_coverage/test_createobject_method.bas
@@ -6,6 +6,7 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
 Type address
     Name1 As String
     City As String
diff --git a/basic/qa/basic_coverage/test_createunolistener_method.bas b/basic/qa/basic_coverage/test_createunolistener_method.bas
index dca9c9a1fc30..cd89716cde85 100644
--- a/basic/qa/basic_coverage/test_createunolistener_method.bas
+++ b/basic/qa/basic_coverage/test_createunolistener_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CreateUnoListener
     Dim oListener
diff --git a/basic/qa/basic_coverage/test_createunoservice_method.bas b/basic/qa/basic_coverage/test_createunoservice_method.bas
index 90cc3affd993..33bb875f17c8 100644
--- a/basic/qa/basic_coverage/test_createunoservice_method.bas
+++ b/basic/qa/basic_coverage/test_createunoservice_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CreateUnoService
     Dim filepicker
diff --git a/basic/qa/basic_coverage/test_createunostruct_method.bas b/basic/qa/basic_coverage/test_createunostruct_method.bas
index e8eb72061b9c..26b676aaeb06 100644
--- a/basic/qa/basic_coverage/test_createunostruct_method.bas
+++ b/basic/qa/basic_coverage/test_createunostruct_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CreateUnoStruct
     Dim oStruct
diff --git a/basic/qa/basic_coverage/test_createunovalue_method.bas b/basic/qa/basic_coverage/test_createunovalue_method.bas
index 40268ef90639..3ea82acdd703 100644
--- a/basic/qa/basic_coverage/test_createunovalue_method.bas
+++ b/basic/qa/basic_coverage/test_createunovalue_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CreateUnoValue
     Dim oUnoValue as Variant
diff --git a/basic/qa/basic_coverage/test_csng_method.bas b/basic/qa/basic_coverage/test_csng_method.bas
index 64ad3ce80196..83b4d24e4c2b 100644
--- a/basic/qa/basic_coverage/test_csng_method.bas
+++ b/basic/qa/basic_coverage/test_csng_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CSNG
     If (CSng("100") <> 100) Then
diff --git a/basic/qa/basic_coverage/test_cstr_method.bas b/basic/qa/basic_coverage/test_cstr_method.bas
index d7f25a3887b4..ba326770198e 100644
--- a/basic/qa/basic_coverage/test_cstr_method.bas
+++ b/basic/qa/basic_coverage/test_cstr_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CSTR
     If (CStr(100) <> "100") Then
diff --git a/basic/qa/basic_coverage/test_cvar_method.bas b/basic/qa/basic_coverage/test_cvar_method.bas
index 65dd8292574b..94ebc714fe82 100644
--- a/basic/qa/basic_coverage/test_cvar_method.bas
+++ b/basic/qa/basic_coverage/test_cvar_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' CVAR
     If (CVar(100) <> 100) Then
diff --git a/basic/qa/basic_coverage/test_cverr_method.bas b/basic/qa/basic_coverage/test_cverr_method.bas
index cc7ee4fe0825..2142fd335fd9 100644
--- a/basic/qa/basic_coverage/test_cverr_method.bas
+++ b/basic/qa/basic_coverage/test_cverr_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
 
     doUnitTest = "FAIL"
diff --git a/basic/qa/basic_coverage/test_date_literal.bas b/basic/qa/basic_coverage/test_date_literal.bas
index 4042809ca22e..3eb4510a3bbf 100644
--- a/basic/qa/basic_coverage/test_date_literal.bas
+++ b/basic/qa/basic_coverage/test_date_literal.bas
@@ -6,6 +6,7 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
 
 Function doUnitTest as String
   If #07/28/1977# = 28334 And #1977-07-28# = 28334 Then
diff --git a/basic/qa/basic_coverage/test_datedateadddatediff_methods.bas b/basic/qa/basic_coverage/test_datedateadddatediff_methods.bas
index edf000647535..6de53c011763 100644
--- a/basic/qa/basic_coverage/test_datedateadddatediff_methods.bas
+++ b/basic/qa/basic_coverage/test_datedateadddatediff_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Date()
diff --git a/basic/qa/basic_coverage/test_datedatepartday_methods.bas b/basic/qa/basic_coverage/test_datedatepartday_methods.bas
index babdffbf1c8b..b81e96422087 100644
--- a/basic/qa/basic_coverage/test_datedatepartday_methods.bas
+++ b/basic/qa/basic_coverage/test_datedatepartday_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Date()
diff --git a/basic/qa/basic_coverage/test_dimarray_method.bas b/basic/qa/basic_coverage/test_dimarray_method.bas
index fde2a5b57191..c5f268b12c07 100644
--- a/basic/qa/basic_coverage/test_dimarray_method.bas
+++ b/basic/qa/basic_coverage/test_dimarray_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     Dim aValue as variant
     aValue = DimArray( 1, 2, 4 )
diff --git a/basic/qa/basic_coverage/test_environ_method.bas b/basic/qa/basic_coverage/test_environ_method.bas
index 091b0edfea5d..4504a3feb90c 100644
--- a/basic/qa/basic_coverage/test_environ_method.bas
+++ b/basic/qa/basic_coverage/test_environ_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' ENVIRON
     Environ ("TMP")
diff --git a/basic/qa/basic_coverage/test_err_method.bas b/basic/qa/basic_coverage/test_err_method.bas
index 36d49ee843ce..9732a25e6faf 100644
--- a/basic/qa/basic_coverage/test_err_method.bas
+++ b/basic/qa/basic_coverage/test_err_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' ERR
     On Error GoTo ErrorHandler ' Set up error handler
diff --git a/basic/qa/basic_coverage/test_falsetrue_method.bas b/basic/qa/basic_coverage/test_falsetrue_method.bas
index ae8e5ff5fd35..10ef7d5fbe8b 100644
--- a/basic/qa/basic_coverage/test_falsetrue_method.bas
+++ b/basic/qa/basic_coverage/test_falsetrue_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' FALSE TRUE
     If (False = True) Then
diff --git a/basic/qa/basic_coverage/test_filedatetime_nonexistent.bas b/basic/qa/basic_coverage/test_filedatetime_nonexistent.bas
index 2aac2fe0338e..4478ba416b9d 100644
--- a/basic/qa/basic_coverage/test_filedatetime_nonexistent.bas
+++ b/basic/qa/basic_coverage/test_filedatetime_nonexistent.bas
@@ -5,6 +5,9 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 'Bug 121337 - FileDateTime("\\nonexistent\smb\path") returns bogus result rather than throwing error
+
+Option Explicit
+
 Function doUnitTest as String
     On Error GoTo ErrorHandler ' Set up error handler
     Dim result
diff --git a/basic/qa/basic_coverage/test_filedatetime_nonexistent2.bas b/basic/qa/basic_coverage/test_filedatetime_nonexistent2.bas
index ffce5b1f2732..e95fde34e7ba 100644
--- a/basic/qa/basic_coverage/test_filedatetime_nonexistent2.bas
+++ b/basic/qa/basic_coverage/test_filedatetime_nonexistent2.bas
@@ -5,6 +5,9 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 'Bug 121337 - FileDateTime("\\nonexistent\smb\path") returns bogus result rather than throwing error
+
+Option Explicit
+
 Function doUnitTest as String
     On Error GoTo ErrorHandler ' Set up error handler
     Dim result
diff --git a/basic/qa/basic_coverage/test_fix_method.bas b/basic/qa/basic_coverage/test_fix_method.bas
index e91a464b14bc..7ec5c4ac6230 100644
--- a/basic/qa/basic_coverage/test_fix_method.bas
+++ b/basic/qa/basic_coverage/test_fix_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' FIX
     If (Fix(PI) <> 3) Then
diff --git a/basic/qa/basic_coverage/test_frac_method.bas b/basic/qa/basic_coverage/test_frac_method.bas
index 1e86afc43534..73763f4eea24 100644
--- a/basic/qa/basic_coverage/test_frac_method.bas
+++ b/basic/qa/basic_coverage/test_frac_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' FRAC
     If ( 3+Frac(PI) <> PI) Then
diff --git a/basic/qa/basic_coverage/test_freefile_method.bas b/basic/qa/basic_coverage/test_freefile_method.bas
index 78ee24ab4ff5..03180b7df14b 100644
--- a/basic/qa/basic_coverage/test_freefile_method.bas
+++ b/basic/qa/basic_coverage/test_freefile_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' FREEFILE
     If ( FreeFile < 0 ) Then
diff --git a/basic/qa/basic_coverage/test_freelibrary_method.bas b/basic/qa/basic_coverage/test_freelibrary_method.bas
index e30f2e64f009..6dc399de3521 100644
--- a/basic/qa/basic_coverage/test_freelibrary_method.bas
+++ b/basic/qa/basic_coverage/test_freelibrary_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' FREELIBRARY
     FreeLibrary("")
diff --git a/basic/qa/basic_coverage/test_getdefaultcontext_method.bas b/basic/qa/basic_coverage/test_getdefaultcontext_method.bas
index 9d6efd4fcd8b..7eb12dde4b29 100644
--- a/basic/qa/basic_coverage/test_getdefaultcontext_method.bas
+++ b/basic/qa/basic_coverage/test_getdefaultcontext_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GetDefaultContext
     GetDefaultContext()
diff --git a/basic/qa/basic_coverage/test_getdialogzoomfactorx_method.bas b/basic/qa/basic_coverage/test_getdialogzoomfactorx_method.bas
index d2d032c54a82..989f7ba7afa6 100644
--- a/basic/qa/basic_coverage/test_getdialogzoomfactorx_method.bas
+++ b/basic/qa/basic_coverage/test_getdialogzoomfactorx_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GETDIALOGFACTORX
     If ( GetDialogZoomFactorX(100) < 0 ) Then
diff --git a/basic/qa/basic_coverage/test_getdialogzoomfactory_method.bas b/basic/qa/basic_coverage/test_getdialogzoomfactory_method.bas
index fdc8ce43d09a..207447aef679 100644
--- a/basic/qa/basic_coverage/test_getdialogzoomfactory_method.bas
+++ b/basic/qa/basic_coverage/test_getdialogzoomfactory_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GETDIALOGFACTORY
     If ( GetDialogZoomFactorY(100) < 0 ) Then
diff --git a/basic/qa/basic_coverage/test_getguitype_method.bas b/basic/qa/basic_coverage/test_getguitype_method.bas
index 5a3d345b71b9..76c136c58444 100644
--- a/basic/qa/basic_coverage/test_getguitype_method.bas
+++ b/basic/qa/basic_coverage/test_getguitype_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GETGUITYPE
     If ( GetGuiType = 0 ) Then
diff --git a/basic/qa/basic_coverage/test_getguiversion_method.bas b/basic/qa/basic_coverage/test_getguiversion_method.bas
index 37cd852bcd44..deccf9527be6 100644
--- a/basic/qa/basic_coverage/test_getguiversion_method.bas
+++ b/basic/qa/basic_coverage/test_getguiversion_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GETGUIVERSION
     If ( GetGuiVersion = 0 ) Then
diff --git a/basic/qa/basic_coverage/test_getpathseparator_method.bas b/basic/qa/basic_coverage/test_getpathseparator_method.bas
index f3e2915e99ea..3d9b74441866 100644
--- a/basic/qa/basic_coverage/test_getpathseparator_method.bas
+++ b/basic/qa/basic_coverage/test_getpathseparator_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GETPATHSEPARATOR
     If ( GetPathSeparator = "" ) Then
diff --git a/basic/qa/basic_coverage/test_getprocessservicemanager_method.bas b/basic/qa/basic_coverage/test_getprocessservicemanager_method.bas
index 68a112b910d7..5e202bd72308 100644
--- a/basic/qa/basic_coverage/test_getprocessservicemanager_method.bas
+++ b/basic/qa/basic_coverage/test_getprocessservicemanager_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GetProcessServiceManager
     GetProcessServiceManager()
diff --git a/basic/qa/basic_coverage/test_getsolarversion_method.bas b/basic/qa/basic_coverage/test_getsolarversion_method.bas
index 12a4eb1b855d..f48a5703e6d8 100644
--- a/basic/qa/basic_coverage/test_getsolarversion_method.bas
+++ b/basic/qa/basic_coverage/test_getsolarversion_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GetSolarVersion
     If ( GetSolarVersion() < 50000) Then
diff --git a/basic/qa/basic_coverage/test_getsystemtype_method.bas b/basic/qa/basic_coverage/test_getsystemtype_method.bas
index b5289dd2569f..93a9a9ceb140 100644
--- a/basic/qa/basic_coverage/test_getsystemtype_method.bas
+++ b/basic/qa/basic_coverage/test_getsystemtype_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' GETSYSTEMTYPE
     If ( GetSystemType <> -1 ) Then
diff --git a/basic/qa/basic_coverage/test_hasunointerfaces_method.bas b/basic/qa/basic_coverage/test_hasunointerfaces_method.bas
index d3313c2b2272..5f0f63832baa 100644
--- a/basic/qa/basic_coverage/test_hasunointerfaces_method.bas
+++ b/basic/qa/basic_coverage/test_hasunointerfaces_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' HASUNOINTERFACES
     dim aObject as Object
diff --git a/basic/qa/basic_coverage/test_hex_method.bas b/basic/qa/basic_coverage/test_hex_method.bas
index 56fa257c5a3c..8bfcb1c36258 100644
--- a/basic/qa/basic_coverage/test_hex_method.bas
+++ b/basic/qa/basic_coverage/test_hex_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' HEX
     If ( Hex(100) <> "64") Then
diff --git a/basic/qa/basic_coverage/test_hour_method.bas b/basic/qa/basic_coverage/test_hour_method.bas
index 7b40e09ca704..16f1bdc9d35f 100644
--- a/basic/qa/basic_coverage/test_hour_method.bas
+++ b/basic/qa/basic_coverage/test_hour_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' HOUR
     If ( Hour(TimeSerial(12,30,41)) <> 12 ) Then
diff --git a/basic/qa/basic_coverage/test_iif_method.bas b/basic/qa/basic_coverage/test_iif_method.bas
index fce0620ad584..b6003d052077 100644
--- a/basic/qa/basic_coverage/test_iif_method.bas
+++ b/basic/qa/basic_coverage/test_iif_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' IIF
     If ( IIF(True, 10, 12) <> 10 ) Then
diff --git a/basic/qa/basic_coverage/test_instr_method.bas b/basic/qa/basic_coverage/test_instr_method.bas
index 435e48a31c96..ff763cb4226c 100644
--- a/basic/qa/basic_coverage/test_instr_method.bas
+++ b/basic/qa/basic_coverage/test_instr_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
 
     doUnitTest = "FAIL"
diff --git a/basic/qa/basic_coverage/test_int_method.bas b/basic/qa/basic_coverage/test_int_method.bas
index 7108e4bbb709..563fd5898bf4 100644
--- a/basic/qa/basic_coverage/test_int_method.bas
+++ b/basic/qa/basic_coverage/test_int_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' INT
     If ( Int(PI) <> 3 ) Then
diff --git a/basic/qa/basic_coverage/test_isarray_method.bas b/basic/qa/basic_coverage/test_isarray_method.bas
index ec8c1c520560..f3080d5fc007 100644
--- a/basic/qa/basic_coverage/test_isarray_method.bas
+++ b/basic/qa/basic_coverage/test_isarray_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVector as Variant
     aVector = Array( 123, "Hello", -3.14)
diff --git a/basic/qa/basic_coverage/test_isdate_method.bas b/basic/qa/basic_coverage/test_isdate_method.bas
index c2a4c342cfcf..f4f0dfa6f667 100644
--- a/basic/qa/basic_coverage/test_isdate_method.bas
+++ b/basic/qa/basic_coverage/test_isdate_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Date( )
diff --git a/basic/qa/basic_coverage/test_isempty_method.bas b/basic/qa/basic_coverage/test_isempty_method.bas
index 3a8a508b00dc..3ea6a4a140f1 100644
--- a/basic/qa/basic_coverage/test_isempty_method.bas
+++ b/basic/qa/basic_coverage/test_isempty_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVariant as Variant
     aVariant = Date( )
diff --git a/basic/qa/basic_coverage/test_iserror_method.bas b/basic/qa/basic_coverage/test_iserror_method.bas
index ab33f2b9a130..83d3f60432a6 100644
--- a/basic/qa/basic_coverage/test_iserror_method.bas
+++ b/basic/qa/basic_coverage/test_iserror_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Type MyType
     tName as String
 End Type
diff --git a/basic/qa/basic_coverage/test_ismissing_basic.bas b/basic/qa/basic_coverage/test_ismissing_basic.bas
index 85efb401274b..ed43a3ad19ee 100644
--- a/basic/qa/basic_coverage/test_ismissing_basic.bas
+++ b/basic/qa/basic_coverage/test_ismissing_basic.bas
@@ -3,6 +3,8 @@ Const IsMissingA = 0
 Const IsMissingB = 1
 Const IsMissingAB = 2
 
+Option Explicit
+
 Function doUnitTest() As String
     TestUtil.TestInit
     verify_testIsMissingBasic
diff --git a/basic/qa/basic_coverage/test_ismissing_cascade.bas b/basic/qa/basic_coverage/test_ismissing_cascade.bas
index eadce0b2b00c..f2f3a8b20564 100644
--- a/basic/qa/basic_coverage/test_ismissing_cascade.bas
+++ b/basic/qa/basic_coverage/test_ismissing_cascade.bas
@@ -1,3 +1,5 @@
+Option Explicit
+
 Function doUnitTest() As String
     TestUtil.TestInit
     verify_testIsMissingCascade
diff --git a/basic/qa/basic_coverage/test_ismissing_compatible.bas b/basic/qa/basic_coverage/test_ismissing_compatible.bas
index 5acc0712eb0a..fb7e6981d74c 100644
--- a/basic/qa/basic_coverage/test_ismissing_compatible.bas
+++ b/basic/qa/basic_coverage/test_ismissing_compatible.bas
@@ -1,5 +1,5 @@
 Option Compatible
-
+Option Explicit
 Const IsMissingNone = -1
 Const IsMissingA = 0
 Const IsMissingB = 1
diff --git a/basic/qa/basic_coverage/test_isnull_method.bas b/basic/qa/basic_coverage/test_isnull_method.bas
index 8378f9691ac1..28000e9fb5f4 100644
--- a/basic/qa/basic_coverage/test_isnull_method.bas
+++ b/basic/qa/basic_coverage/test_isnull_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVariant as Variant
     aVariant = Null
diff --git a/basic/qa/basic_coverage/test_isnumeric_method.bas b/basic/qa/basic_coverage/test_isnumeric_method.bas
index db947dbe7044..1b454aa8d5ec 100644
--- a/basic/qa/basic_coverage/test_isnumeric_method.bas
+++ b/basic/qa/basic_coverage/test_isnumeric_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVariant as Variant
     aVariant = 3
diff --git a/basic/qa/basic_coverage/test_isobject_method.bas b/basic/qa/basic_coverage/test_isobject_method.bas
index f9690722cb6d..1299b3a8808e 100644
--- a/basic/qa/basic_coverage/test_isobject_method.bas
+++ b/basic/qa/basic_coverage/test_isobject_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVariant as Object
     ' ISOBJECT
diff --git a/basic/qa/basic_coverage/test_isunostruct_method.bas b/basic/qa/basic_coverage/test_isunostruct_method.bas
index 44d5a5079834..85b6ab27ddd8 100644
--- a/basic/qa/basic_coverage/test_isunostruct_method.bas
+++ b/basic/qa/basic_coverage/test_isunostruct_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVariant as Object
     ' ISUNOSTRUCT
diff --git a/basic/qa/basic_coverage/test_join_method.bas b/basic/qa/basic_coverage/test_join_method.bas
index 9554d12e8cf0..9076a0f8d83e 100644
--- a/basic/qa/basic_coverage/test_join_method.bas
+++ b/basic/qa/basic_coverage/test_join_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' Join
     Dim aStrings(2) as String
diff --git a/basic/qa/basic_coverage/test_lbound_method.bas b/basic/qa/basic_coverage/test_lbound_method.bas
index 954fa94e4f60..b79b604103ab 100644
--- a/basic/qa/basic_coverage/test_lbound_method.bas
+++ b/basic/qa/basic_coverage/test_lbound_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVector as Variant
     ' ARRAY
diff --git a/basic/qa/basic_coverage/test_lcase_method.bas b/basic/qa/basic_coverage/test_lcase_method.bas
index ec0ab07d2956..9e2a2af66180 100644
--- a/basic/qa/basic_coverage/test_lcase_method.bas
+++ b/basic/qa/basic_coverage/test_lcase_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aString as Variant
     aString = "Hello"
diff --git a/basic/qa/basic_coverage/test_len_method.bas b/basic/qa/basic_coverage/test_len_method.bas
index 988510add0c2..58211fc9334e 100644
--- a/basic/qa/basic_coverage/test_len_method.bas
+++ b/basic/qa/basic_coverage/test_len_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aString as Variant
     aString = "Hello"
diff --git a/basic/qa/basic_coverage/test_lenb_method.bas b/basic/qa/basic_coverage/test_lenb_method.bas
index a3096c819f7b..2a907e209b6d 100644
--- a/basic/qa/basic_coverage/test_lenb_method.bas
+++ b/basic/qa/basic_coverage/test_lenb_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aString as Variant
     aString = "Hello"
diff --git a/basic/qa/basic_coverage/test_logexp_methods.bas b/basic/qa/basic_coverage/test_logexp_methods.bas
index 45ddeb16855b..c120f7218694 100644
--- a/basic/qa/basic_coverage/test_logexp_methods.bas
+++ b/basic/qa/basic_coverage/test_logexp_methods.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' EXP LOG
     If ( Log( Exp(1) ) <> 1 ) Then
diff --git a/basic/qa/basic_coverage/test_ltrim_method.bas b/basic/qa/basic_coverage/test_ltrim_method.bas
index f3be267dbeb1..3395f5f2439a 100644
--- a/basic/qa/basic_coverage/test_ltrim_method.bas
+++ b/basic/qa/basic_coverage/test_ltrim_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aString as Variant
     aString = "Hello"
diff --git a/basic/qa/basic_coverage/test_method_name_variable.bas b/basic/qa/basic_coverage/test_method_name_variable.bas
index 5f3689ad8752..da9e83bca26e 100644
--- a/basic/qa/basic_coverage/test_method_name_variable.bas
+++ b/basic/qa/basic_coverage/test_method_name_variable.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function assignVarToMethod() As Integer
 
     ' method name used as dimension specifier
diff --git a/basic/qa/basic_coverage/test_mid_CountNegative_3args.bas b/basic/qa/basic_coverage/test_mid_CountNegative_3args.bas
index 01d1cd998217..3df3ae74121c 100644
--- a/basic/qa/basic_coverage/test_mid_CountNegative_3args.bas
+++ b/basic/qa/basic_coverage/test_mid_CountNegative_3args.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     If (Mid("abc", 5, -3) = "") Then
         doUnitTest = "OK"
diff --git a/basic/qa/basic_coverage/test_mid_EndOutOfBounds_3args.bas b/basic/qa/basic_coverage/test_mid_EndOutOfBounds_3args.bas
index 04bf521a9f68..525a9cd2a6cf 100644
--- a/basic/qa/basic_coverage/test_mid_EndOutOfBounds_3args.bas
+++ b/basic/qa/basic_coverage/test_mid_EndOutOfBounds_3args.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     If (Mid("abc", 1, 4) = "abc") Then
         doUnitTest = "OK"
diff --git a/basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.bas b/basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.bas
index 29f489981e45..89c6cd309ab5 100644
--- a/basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.bas
+++ b/basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     If (Mid("abc", 5) = "") Then
         doUnitTest = "OK"
diff --git a/basic/qa/basic_coverage/test_mid_StartOutOfBounds_3args.bas b/basic/qa/basic_coverage/test_mid_StartOutOfBounds_3args.bas
index a38c73153574..1f538788b500 100644
--- a/basic/qa/basic_coverage/test_mid_StartOutOfBounds_3args.bas
+++ b/basic/qa/basic_coverage/test_mid_StartOutOfBounds_3args.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     If (Mid("abc", 5, 1) = "") Then
         doUnitTest = "OK"
diff --git a/basic/qa/basic_coverage/test_mid_firstletter_3args.bas b/basic/qa/basic_coverage/test_mid_firstletter_3args.bas
index bdc3ea687961..e9bcb1378f38 100644
--- a/basic/qa/basic_coverage/test_mid_firstletter_3args.bas
+++ b/basic/qa/basic_coverage/test_mid_firstletter_3args.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     If (Mid("abc", 1, 1) = "a") Then
         doUnitTest = "OK"
diff --git a/basic/qa/basic_coverage/test_mid_sub2letters_2args.bas b/basic/qa/basic_coverage/test_mid_sub2letters_2args.bas
index 88ec1a8f2b3e..2cbb21ecf91c 100644
--- a/basic/qa/basic_coverage/test_mid_sub2letters_2args.bas
+++ b/basic/qa/basic_coverage/test_mid_sub2letters_2args.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     If (Mid("abc", 2) = "bc") Then
         doUnitTest = "OK"
diff --git a/basic/qa/basic_coverage/test_minute_method.bas b/basic/qa/basic_coverage/test_minute_method.bas
index 5c4f7d5ceba1..4f120cc3f4b2 100644
--- a/basic/qa/basic_coverage/test_minute_method.bas
+++ b/basic/qa/basic_coverage/test_minute_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' MINUTE
     If ( Minute(TimeSerial(12,30,41)) <> 30 ) Then
diff --git a/basic/qa/basic_coverage/test_mod_operator.bas b/basic/qa/basic_coverage/test_mod_operator.bas
index 5692e7bb50fc..79ad49fda113 100644
--- a/basic/qa/basic_coverage/test_mod_operator.bas
+++ b/basic/qa/basic_coverage/test_mod_operator.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
 
     doUnitTest = "FAIL"
diff --git a/basic/qa/basic_coverage/test_month_method.bas b/basic/qa/basic_coverage/test_month_method.bas
index 876015598e6e..cbef221c9497 100644
--- a/basic/qa/basic_coverage/test_month_method.bas
+++ b/basic/qa/basic_coverage/test_month_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Date()
diff --git a/basic/qa/basic_coverage/test_nowtimevalue_methods.bas b/basic/qa/basic_coverage/test_nowtimevalue_methods.bas
index e01c697165a6..b99b9a383083 100644
--- a/basic/qa/basic_coverage/test_nowtimevalue_methods.bas
+++ b/basic/qa/basic_coverage/test_nowtimevalue_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     dim aTime as Date
diff --git a/basic/qa/basic_coverage/test_numeric_constant_parameter.bas b/basic/qa/basic_coverage/test_numeric_constant_parameter.bas
index f183936de09d..4f93f3f45c9c 100644
--- a/basic/qa/basic_coverage/test_numeric_constant_parameter.bas
+++ b/basic/qa/basic_coverage/test_numeric_constant_parameter.bas
@@ -6,6 +6,9 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+
+Option Explicit
+
 ' assigns a numeric constant (integer) to a parameter of type variant
 Function assignInteger( numericConstant ) As String
     numericConstant = 1
diff --git a/basic/qa/basic_coverage/test_oct_method.bas b/basic/qa/basic_coverage/test_oct_method.bas
index d6d69d7edc5d..31028195be90 100644
--- a/basic/qa/basic_coverage/test_oct_method.bas
+++ b/basic/qa/basic_coverage/test_oct_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' OCT
     If ( Oct(100) <> "144" ) Then
diff --git a/basic/qa/basic_coverage/test_option_base.bas b/basic/qa/basic_coverage/test_option_base.bas
index 3195908ca18a..11afea50d75b 100644
--- a/basic/qa/basic_coverage/test_option_base.bas
+++ b/basic/qa/basic_coverage/test_option_base.bas
@@ -1,4 +1,5 @@
 Option Base 1
+Option Explicit
 
 Function doUnitTest() As String
     TestUtil.TestInit
diff --git a/basic/qa/basic_coverage/test_option_base_compatible.bas b/basic/qa/basic_coverage/test_option_base_compatible.bas
index 8105dd100265..8001106a7bfc 100644
--- a/basic/qa/basic_coverage/test_option_base_compatible.bas
+++ b/basic/qa/basic_coverage/test_option_base_compatible.bas
@@ -1,5 +1,6 @@
 Option Base 1
 Option Compatible
+Option Explicit
 
 Function doUnitTest() As String
     TestUtil.TestInit
diff --git a/basic/qa/basic_coverage/test_optional_paramter_type.bas b/basic/qa/basic_coverage/test_optional_paramter_type.bas
index a5d0b7b2b863..2a616c24044d 100644
--- a/basic/qa/basic_coverage/test_optional_paramter_type.bas
+++ b/basic/qa/basic_coverage/test_optional_paramter_type.bas
@@ -1,5 +1,6 @@
 REM  *****  BASIC  *****
 Option Compatible
+Option Explicit
 
 Function doUnitTest() As String
     doUnitTest = "FAIL"
diff --git a/basic/qa/basic_coverage/test_optional_paramters_basic.bas b/basic/qa/basic_coverage/test_optional_paramters_basic.bas
index 6657ef753d5a..24da0ab20a3b 100644
--- a/basic/qa/basic_coverage/test_optional_paramters_basic.bas
+++ b/basic/qa/basic_coverage/test_optional_paramters_basic.bas
@@ -1,3 +1,5 @@
+Option Explicit
+
 Function doUnitTest() As String
     TestUtil.TestInit
     verify_testOptionalsBasic
diff --git a/basic/qa/basic_coverage/test_optional_paramters_compatible.bas b/basic/qa/basic_coverage/test_optional_paramters_compatible.bas
index 5e88b5d7e05a..d5ea9046d4fc 100644
--- a/basic/qa/basic_coverage/test_optional_paramters_compatible.bas
+++ b/basic/qa/basic_coverage/test_optional_paramters_compatible.bas
@@ -1,4 +1,5 @@
 Option Compatible
+Option Explicit
 
 Function doUnitTest() As String
     TestUtil.TestInit
diff --git a/basic/qa/basic_coverage/test_qbcolor_method.bas b/basic/qa/basic_coverage/test_qbcolor_method.bas
index 2fe4b01cff2d..8c2b6ed7afd9 100644
--- a/basic/qa/basic_coverage/test_qbcolor_method.bas
+++ b/basic/qa/basic_coverage/test_qbcolor_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' QBCOLOR
     If ( QBColor(7) <> 12632256 ) Then
diff --git a/basic/qa/basic_coverage/test_random_methods.bas b/basic/qa/basic_coverage/test_random_methods.bas
index 138050bdd769..5df5e93134d3 100644
--- a/basic/qa/basic_coverage/test_random_methods.bas
+++ b/basic/qa/basic_coverage/test_random_methods.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     Randomize 42
     ' RND
diff --git a/basic/qa/basic_coverage/test_redim_objects.bas b/basic/qa/basic_coverage/test_redim_objects.bas
index 29f7b2caa82b..b2699956d7f3 100644
--- a/basic/qa/basic_coverage/test_redim_objects.bas
+++ b/basic/qa/basic_coverage/test_redim_objects.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Type testType
     iNr    As Integer
     sType  As String
diff --git a/basic/qa/basic_coverage/test_resolvepath_method.bas b/basic/qa/basic_coverage/test_resolvepath_method.bas
index 88c7ef0c3445..249900c3b7b9 100644
--- a/basic/qa/basic_coverage/test_resolvepath_method.bas
+++ b/basic/qa/basic_coverage/test_resolvepath_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' RESOLVEPATH
     If ( ResolvePath( "" ) <> "" ) Then
diff --git a/basic/qa/basic_coverage/test_rgb_method.bas b/basic/qa/basic_coverage/test_rgb_method.bas
index d15fac6c27d4..3665af50cfb8 100644
--- a/basic/qa/basic_coverage/test_rgb_method.bas
+++ b/basic/qa/basic_coverage/test_rgb_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' RGB
     If ( RGB( 128, 50, 200 ) <> 8401608 ) Then
diff --git a/basic/qa/basic_coverage/test_rtrim_method.bas b/basic/qa/basic_coverage/test_rtrim_method.bas
index ee0aefefd37b..f74c04a661f1 100644
--- a/basic/qa/basic_coverage/test_rtrim_method.bas
+++ b/basic/qa/basic_coverage/test_rtrim_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aString as Variant
     aString = "Hello"
diff --git a/basic/qa/basic_coverage/test_second_method.bas b/basic/qa/basic_coverage/test_second_method.bas
index 66ed058bc0ab..d06ee20769d7 100644
--- a/basic/qa/basic_coverage/test_second_method.bas
+++ b/basic/qa/basic_coverage/test_second_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' SECOND
     If ( Second(TimeSerial(12,30,41)) <> 41 ) Then
diff --git a/basic/qa/basic_coverage/test_sgn_method.bas b/basic/qa/basic_coverage/test_sgn_method.bas
index 5473cc583581..7e4dd5d4bdf0 100644
--- a/basic/qa/basic_coverage/test_sgn_method.bas
+++ b/basic/qa/basic_coverage/test_sgn_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' SGN
     If ( Sgn(-3.14) <> -1 ) Then
diff --git a/basic/qa/basic_coverage/test_space_method.bas b/basic/qa/basic_coverage/test_space_method.bas
index 9a9e3363182a..6c44482de128 100644
--- a/basic/qa/basic_coverage/test_space_method.bas
+++ b/basic/qa/basic_coverage/test_space_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' SPACE
     If ( Space(3) <> "   " ) Then
diff --git a/basic/qa/basic_coverage/test_spc_method.bas b/basic/qa/basic_coverage/test_spc_method.bas
index 6041fb19616b..81f43d40bbe3 100644
--- a/basic/qa/basic_coverage/test_spc_method.bas
+++ b/basic/qa/basic_coverage/test_spc_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' SPC
     If ( Spc(3) <> "   " ) Then
diff --git a/basic/qa/basic_coverage/test_split_method.bas b/basic/qa/basic_coverage/test_split_method.bas
index b5cfe398ed30..2742fcf52301 100644
--- a/basic/qa/basic_coverage/test_split_method.bas
+++ b/basic/qa/basic_coverage/test_split_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
 
     doUnitTest = "FAIL"
diff --git a/basic/qa/basic_coverage/test_sqr_method.bas b/basic/qa/basic_coverage/test_sqr_method.bas
index 9e9777247a79..064a870d199d 100644
--- a/basic/qa/basic_coverage/test_sqr_method.bas
+++ b/basic/qa/basic_coverage/test_sqr_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' SQR
     If ( Sqr( 4 ) <> 2 ) Then
diff --git a/basic/qa/basic_coverage/test_strcomp_method.bas b/basic/qa/basic_coverage/test_strcomp_method.bas
index 52c8b71071b3..73ee3002fdab 100644
--- a/basic/qa/basic_coverage/test_strcomp_method.bas
+++ b/basic/qa/basic_coverage/test_strcomp_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aString as Variant
     aString = "Hello"
diff --git a/basic/qa/basic_coverage/test_string_literal_comparison.bas b/basic/qa/basic_coverage/test_string_literal_comparison.bas
index c3a8413fcdc2..81446328448e 100644
--- a/basic/qa/basic_coverage/test_string_literal_comparison.bas
+++ b/basic/qa/basic_coverage/test_string_literal_comparison.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' tdf#142180 - Invalid text comparison result in Basic
 
diff --git a/basic/qa/basic_coverage/test_string_method.bas b/basic/qa/basic_coverage/test_string_method.bas
index 638051c763d8..b06726e6045f 100644
--- a/basic/qa/basic_coverage/test_string_method.bas
+++ b/basic/qa/basic_coverage/test_string_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' STRING
     If ( String( 3, "H" ) <> "HHH" ) Then
diff --git a/basic/qa/basic_coverage/test_string_replace.bas b/basic/qa/basic_coverage/test_string_replace.bas
index ec51740e17a2..4dfac668109d 100644
--- a/basic/qa/basic_coverage/test_string_replace.bas
+++ b/basic/qa/basic_coverage/test_string_replace.bas
@@ -1,4 +1,5 @@
 Option VBASupport 0
+Option Explicit
 
 Function doUnitTest() As String
     TestUtil.TestInit
@@ -9,6 +10,7 @@ End Function
 Sub verify_stringReplace()
     On Error GoTo errorHandler
     ' tdf#132389 - case-insensitive operation for non-ASCII characters
+    Dim retStr
     retStr = Replace("ABCabc", "b", "*")
     TestUtil.AssertEqual(retStr, "A*Ca*c", "case-insensitive ASCII: " & retStr)
     retStr = Replace("АБВабв", "б", "*")
diff --git a/basic/qa/basic_coverage/test_strtrim_methods.bas b/basic/qa/basic_coverage/test_strtrim_methods.bas
index 8ace76dc369c..97875933aded 100644
--- a/basic/qa/basic_coverage/test_strtrim_methods.bas
+++ b/basic/qa/basic_coverage/test_strtrim_methods.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' STR TRIM
     If ( Trim( Str( 4 ) ) <> "4" ) Then
diff --git a/basic/qa/basic_coverage/test_switch_method.bas b/basic/qa/basic_coverage/test_switch_method.bas
index 2af52923aadb..ec4c8a14c9d5 100644
--- a/basic/qa/basic_coverage/test_switch_method.bas
+++ b/basic/qa/basic_coverage/test_switch_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aVariant as Object
     ' SWITCH
diff --git a/basic/qa/basic_coverage/test_tab_method.bas b/basic/qa/basic_coverage/test_tab_method.bas
index beb8f554167f..997d9fb105df 100644
--- a/basic/qa/basic_coverage/test_tab_method.bas
+++ b/basic/qa/basic_coverage/test_tab_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' TAB
     If ( "Hello" & Tab(0) & "World" <> "HelloWorld" ) Then
diff --git a/basic/qa/basic_coverage/test_tan_method.bas b/basic/qa/basic_coverage/test_tan_method.bas
index 3666647efe6f..f780f978e14b 100644
--- a/basic/qa/basic_coverage/test_tan_method.bas
+++ b/basic/qa/basic_coverage/test_tan_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' TAN
     If ( Abs( Tan(PI/4) - 1 ) > 1E-6 ) Then
diff --git a/basic/qa/basic_coverage/test_tdf134692.bas b/basic/qa/basic_coverage/test_tdf134692.bas
index ddb25758e6e5..c310280fecdb 100644
--- a/basic/qa/basic_coverage/test_tdf134692.bas
+++ b/basic/qa/basic_coverage/test_tdf134692.bas
@@ -1,4 +1,5 @@
 Option VBASupport 0
+Option Explicit
 
 Function doUnitTest() As String
     TestUtil.TestInit
@@ -10,18 +11,19 @@ Sub verify_tdf134692()
     On Error GoTo errorHandler
 
     dim a(2 to 5)
+    dim b, i, s
     b = a
     redim preserve b(4 to 6)
     for i = lbound(b) to ubound(b)
       b(i) = i
     next i
     for i = lbound(a) to ubound(a)
-      s$ = s$ & " a(" & i & ")=" & a(i)
+      s = s & " a(" & i & ")=" & a(i)
     next i
     for i = lbound(b) to ubound(b)
-      s$ = s$ & " b(" & i & ")=" & b(i)
+      s = s & " b(" & i & ")=" & b(i)
     next i
-    TestUtil.AssertEqual(s$, " a(2)= a(3)= a(4)= a(5)= b(4)=4 b(5)=5 b(6)=6", "tdf#134692")
+    TestUtil.AssertEqual(s, " a(2)= a(3)= a(4)= a(5)= b(4)=4 b(5)=5 b(6)=6", "tdf#134692")
 
     Exit Sub
 errorHandler:
diff --git a/basic/qa/basic_coverage/test_timer_method.bas b/basic/qa/basic_coverage/test_timer_method.bas
index 769568d8e6be..8e28425825ea 100644
--- a/basic/qa/basic_coverage/test_timer_method.bas
+++ b/basic/qa/basic_coverage/test_timer_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' TIMER             max value = 24*3600
     If ( Timer() > 86400 ) Then
diff --git a/basic/qa/basic_coverage/test_timeserialtimevalue_methods.bas b/basic/qa/basic_coverage/test_timeserialtimevalue_methods.bas
index 494a8e50407e..ce3ea1cf04af 100644
--- a/basic/qa/basic_coverage/test_timeserialtimevalue_methods.bas
+++ b/basic/qa/basic_coverage/test_timeserialtimevalue_methods.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' TIMESERIAL TIMEVALUE
     If ( TimeSerial(13,54,48) <> TimeValue("13:54:48") ) Then
diff --git a/basic/qa/basic_coverage/test_twipsperpixelx_method.bas b/basic/qa/basic_coverage/test_twipsperpixelx_method.bas
index fb4cca698b03..ababb7aa79af 100644
--- a/basic/qa/basic_coverage/test_twipsperpixelx_method.bas
+++ b/basic/qa/basic_coverage/test_twipsperpixelx_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' TWIPSPERPIXELX
     If ( TwipsPerPixelX < 0 ) Then
diff --git a/basic/qa/basic_coverage/test_twipsperpixely_method.bas b/basic/qa/basic_coverage/test_twipsperpixely_method.bas
index 4001495f2abf..a29affb88ed4 100644
--- a/basic/qa/basic_coverage/test_twipsperpixely_method.bas
+++ b/basic/qa/basic_coverage/test_twipsperpixely_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' TWIPSPERPIXELY
     If ( TwipsPerPixelY < 0 ) Then
diff --git a/basic/qa/basic_coverage/test_typelen_method.bas b/basic/qa/basic_coverage/test_typelen_method.bas
index dc8935237fcc..cb86d15690f5 100644
--- a/basic/qa/basic_coverage/test_typelen_method.bas
+++ b/basic/qa/basic_coverage/test_typelen_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Dim int16 As Integer,   int32 As Long,    flt32 As Single, flt64 As Double, _
     curr  As Currency,  dat   As Date,    str   As String,                  _
     myErr As Variant,   var   As Variant, byt3  As Byte,   bool  As Boolean
diff --git a/basic/qa/basic_coverage/test_typename_method.bas b/basic/qa/basic_coverage/test_typename_method.bas
index c246b652e246..80a9658d25a7 100644
--- a/basic/qa/basic_coverage/test_typename_method.bas
+++ b/basic/qa/basic_coverage/test_typename_method.bas
@@ -5,6 +5,9 @@
 ' License, v. 2.0. If a copy of the MPL was not distributed with this
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
+
+Option Explicit
+
 Type UDF ' User defined type
     l As Object
     s as String
@@ -72,4 +75,4 @@ Sub assert(expression As Boolean, errMessage As String)
        messages = messages + Chr(10) + ErrMessage
        failedAssertion = True
     EndIf
-End Sub
\ No newline at end of file
+End Sub
diff --git a/basic/qa/basic_coverage/test_ucase_method.bas b/basic/qa/basic_coverage/test_ucase_method.bas
index 3b281f7f2ff9..21779e148e3e 100644
--- a/basic/qa/basic_coverage/test_ucase_method.bas
+++ b/basic/qa/basic_coverage/test_ucase_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aString as Variant
     aString = "Hello"
diff --git a/basic/qa/basic_coverage/test_val_method.bas b/basic/qa/basic_coverage/test_val_method.bas
index bbce97697c71..306d15b4f3fa 100644
--- a/basic/qa/basic_coverage/test_val_method.bas
+++ b/basic/qa/basic_coverage/test_val_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' VAL
     If ( Val("4") <> 4 ) Then
diff --git a/basic/qa/basic_coverage/test_vartype_method.bas b/basic/qa/basic_coverage/test_vartype_method.bas
index 9fc60acbc377..3ab6f1f44358 100644
--- a/basic/qa/basic_coverage/test_vartype_method.bas
+++ b/basic/qa/basic_coverage/test_vartype_method.bas
@@ -5,6 +5,9 @@
 ' License, v. 2.0. If a copy of the MPL was not distributed with this
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
+
+Option Explicit
+
 Type UDF ' User defined type
     l As Object
     s as String
@@ -14,7 +17,7 @@ Dim myUDF As UDF
 Dim int16 As Integer,   int32 As Long,    flt32 As Single, flt64 As Double, _
     curr  As Currency,  dat   As Date,    str   As String, obj   As Object, _
     myErr As Variant,   var   As Variant, byt3  As Byte,   bool  As Boolean
-    
+
 Dim int_%, long_&, single_!, double_#, currency_@, string_$, array_
 
 Dim intArray()  As Integer,  lngArray(5) As Long, sngArray!() As Single, dblArray#(8) As Double, _
diff --git a/basic/qa/basic_coverage/test_wait_method.bas b/basic/qa/basic_coverage/test_wait_method.bas
index 8df9ab4b9263..b9bd0e5f0040 100644
--- a/basic/qa/basic_coverage/test_wait_method.bas
+++ b/basic/qa/basic_coverage/test_wait_method.bas
@@ -5,6 +5,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     ' WAIT
     Wait(0)
diff --git a/basic/qa/basic_coverage/test_weekday_method.bas b/basic/qa/basic_coverage/test_weekday_method.bas
index c37d3a8b6fad..3c66c0dfadce 100644
--- a/basic/qa/basic_coverage/test_weekday_method.bas
+++ b/basic/qa/basic_coverage/test_weekday_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Date()
diff --git a/basic/qa/basic_coverage/test_year_method.bas b/basic/qa/basic_coverage/test_year_method.bas
index 1aebe07028b8..6852f3986fed 100644
--- a/basic/qa/basic_coverage/test_year_method.bas
+++ b/basic/qa/basic_coverage/test_year_method.bas
@@ -6,6 +6,8 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
+
 Function doUnitTest as String
     dim aDate as Date
     aDate = Date()
diff --git a/basic/qa/basic_coverage/uno_struct_assign.bas b/basic/qa/basic_coverage/uno_struct_assign.bas
index 15e94e0ac257..f004762c550d 100644
--- a/basic/qa/basic_coverage/uno_struct_assign.bas
+++ b/basic/qa/basic_coverage/uno_struct_assign.bas
@@ -6,9 +6,10 @@
 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
 '
 
+Option Explicit
 
 Function doUnitTest as String
-  Dim oNamedValue as new com.sun.star.beans.NamedValue 
+  Dim oNamedValue as new com.sun.star.beans.NamedValue
   Dim oCellAddress as new com.sun.star.table.CellAddress
   oNamedValue.Value = oCellAddress ' fdo#60065 - this would throw an error
   doUnitTest = "OK"


More information about the Libreoffice-commits mailing list