summaryrefslogtreecommitdiff
path: root/testautomation
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation')
-rwxr-xr-xtestautomation/dbaccess/tools/dbcreatetools.inc5
-rwxr-xr-xtestautomation/framework/optional/f_CJK_GridLayout.bas2
-rwxr-xr-xtestautomation/framework/optional/f_CJK_RubyDialogueProposal.bas2
-rwxr-xr-xtestautomation/framework/optional/f_basic_dialog_i18n.bas1
-rwxr-xr-xtestautomation/framework/optional/f_basic_documents.bas2
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/f_basic_gridcontrol.bas0
-rwxr-xr-xtestautomation/framework/optional/f_basic_issues.bas1
-rwxr-xr-xtestautomation/framework/optional/f_basic_library_export_import.bas2
-rwxr-xr-xtestautomation/framework/optional/f_basic_package_export_import.bas2
-rwxr-xr-xtestautomation/framework/optional/f_basic_shared_modules.bas2
-rwxr-xr-xtestautomation/framework/optional/f_basic_templatedocuments.bas3
-rwxr-xr-xtestautomation/framework/optional/f_extras_samplefileopen.bas1
-rwxr-xr-xtestautomation/framework/optional/f_extras_sampleopen.bas1
-rwxr-xr-xtestautomation/framework/optional/f_extras_templatefileopen.bas1
-rwxr-xr-xtestautomation/framework/optional/f_extras_templateopen.bas1
-rwxr-xr-xtestautomation/framework/optional/f_options_ooo.bas1
-rwxr-xr-xtestautomation/framework/optional/f_scripting_basics.bas2
-rwxr-xr-xtestautomation/framework/optional/f_security_certified_docs.bas2
-rwxr-xr-xtestautomation/framework/optional/f_security_incorrect_password.bas2
-rwxr-xr-xtestautomation/framework/optional/f_toolbar_items.bas2
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/NewSortingAlgorithmForJapanese_1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_delete_modules.inc10
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_dialog_i18n_copy_control.inc249
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_dialog_i18n_defaults.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_documents.inc33
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_eventbinding.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_formcontrols.inc216
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_gridcontrol.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_ide.inc430
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_issues.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_library_export.inc6
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_library_import.inc32
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_macros.inc565
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_modulehide.inc53
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_modulenames.inc177
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_modules.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_package_export.inc30
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_package_import.inc34
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_protected_libraries.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_spectemplate.inc58
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_usertemplate.inc67
-rwxr-xr-xtestautomation/framework/optional/includes/basic_vba-compat_import_disabled.inc4
-rwxr-xr-xtestautomation/framework/optional/includes/basic_vba-compat_import_enabled.inc8
-rwxr-xr-xtestautomation/framework/optional/includes/basic_vba-compat_import_nothing.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/basic_vba_compat_tools.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/extras_file_open.inc6
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/extras_labels.inc6
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/extras_modify_objects.inc6
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/extras_preview.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/extras_table_autoformat.inc9
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/f_usage_tracking.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_allowed_names.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_autocomplete.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_cjk_files.inc3
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_cjk_folders.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_document_properties.inc66
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_filternames.inc12
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_folders1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_folders2.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_folders3.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_folders4.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_folders5.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_folders6.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_folders7.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_forbidden_names_windows.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_multiselection.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_passwords.inc9
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_rename.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_reserved_names_windows.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_tools.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/filedlg_triggers.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/fontworkgallery.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/help_bookmarks.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/help_compare_applications.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/help_compare_content.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/help_compare_topics.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/help_search.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/help_view_topics.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/loadsave_files.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/loadsave_new.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/menuentries.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/ole_1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/ole_2.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/ole_3.inc39
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/ole_tools.inc47
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_asia.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_data.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_int1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_lan1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_loadsave_general.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_loadsave_html.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_loadsave_msoffice.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_loadsave_vba.inc0
-rw-r--r--testautomation/framework/optional/includes/options_ls_2.inc307
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_accessibility.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_appearance.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_colors.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_fontreplacement.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_general.inc575
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_java.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_memory.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_paths.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_print.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_security.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_userdata.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/options_ooo_view.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/scripting_basics.inc2
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/scripting_organizers.inc13
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_broken_signature.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_certification_dialogs.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_certified_docs.inc14
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_evilmacro1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_evilmacro2.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_evilmacro3.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_incorrect_password.inc21
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_macrosecurity.inc81
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_recommend_password.inc8
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_trusted_path.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/standardbar2.inc5
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/toolbar_behavior.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/w_grid_layout1.inc166
-rwxr-xr-xtestautomation/framework/required/f_standard_toolbar.bas2
-rwxr-xr-xtestautomation/framework/required/f_window_functions.bas2
-rwxr-xr-xtestautomation/framework/required/f_wizards.bas2
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/basic_dialog_export.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/basic_dialog_i18n.inc54
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/basic_dialog_i18n_import.inc38
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/basic_macroassignment.inc167
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/basic_organizer.inc14
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/first.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/graphics_import.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/help_browser.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/printer_administration.inc0
-rwxr-xr-xtestautomation/framework/required/includes/script_organizers.inc16
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/security_dialogs.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/smoketest.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/standard_toolbar_1.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/standard_toolbar_3.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/standard_toolbar_4.inc2
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/standard_toolbar_5.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/standard_toolbar_6.inc6
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/tools_customize.inc368
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/tools_options.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/topten.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_agenda.inc22
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_documentconverter.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_euroconverter.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_fax.inc16
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_letter.inc18
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_mailmerge.inc18
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_presentation.inc10
-rwxr-xr-x[-rw-r--r--]testautomation/framework/required/includes/wizard_webpage.inc0
-rwxr-xr-xtestautomation/framework/tools/includes/all_interfaces.txt125
-rw-r--r--testautomation/framework/tools/includes/apicalls.inc116
-rw-r--r--testautomation/framework/tools/includes/arrayfuncs.inc163
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/customize_tools.inc233
-rw-r--r--testautomation/framework/tools/includes/filedlg_tools.inc117
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/fileoperations.inc226
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/formcontrols.inc219
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/help_tools.inc288
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/i18n_tools.inc84
-rw-r--r--testautomation/framework/tools/includes/init_tools.inc205
-rw-r--r--testautomation/framework/tools/includes/javatools.inc151
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/options_tools.inc78
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/pbrowser_tools.inc341
-rw-r--r--testautomation/framework/tools/includes/performance.inc69
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/private_environment.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/scriptorganizer_tools.inc198
-rw-r--r--testautomation/framework/tools/includes/signature_tools.inc90
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/spadmin_tools.inc94
-rw-r--r--testautomation/framework/tools/includes/tabpages.inc95
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/template_tools.inc80
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/toolbar_tools.inc120
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/webtools.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/window_tools.inc0
-rwxr-xr-x[-rw-r--r--]testautomation/framework/tools/includes/wizards.inc48
-rwxr-xr-xtestautomation/global/input/accelerators.txt49
-rwxr-xr-xtestautomation/global/input/macros.txt4
-rwxr-xr-xtestautomation/global/input/officeinfo.txt6
-rw-r--r--testautomation/global/required/includes/g_001.inc134
-rw-r--r--testautomation/global/required/includes/g_009.inc50
-rwxr-xr-xtestautomation/global/system/includes/gvariabl.inc3
-rwxr-xr-xtestautomation/global/system/includes/iniinfo.inc776
-rw-r--r--testautomation/global/system/includes/inivalue.inc361
-rwxr-xr-xtestautomation/global/system/includes/master.inc29
-rwxr-xr-xtestautomation/global/tools/compressstatus.bas2
-rw-r--r--testautomation/global/tools/includes/optional/t_basic_ide_tools.inc497
-rw-r--r--testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc261
-rw-r--r--testautomation/global/tools/includes/optional/t_ctrl_1.inc955
-rw-r--r--testautomation/global/tools/includes/optional/t_ctrl_2.inc355
-rwxr-xr-x[-rw-r--r--]testautomation/global/tools/includes/optional/t_docfuncs.inc158
-rw-r--r--testautomation/global/tools/includes/optional/t_extension_manager_tools.inc16
-rw-r--r--testautomation/global/tools/includes/optional/t_filetools.inc12
-rwxr-xr-x[-rw-r--r--]testautomation/global/tools/includes/optional/t_listfuncs.inc363
-rwxr-xr-x[-rw-r--r--]testautomation/global/tools/includes/optional/t_macro_tools.inc92
-rwxr-xr-x[-rw-r--r--]testautomation/global/tools/includes/optional/t_ole.inc55
-rw-r--r--testautomation/global/tools/includes/optional/t_proxy_info.inc138
-rwxr-xr-xtestautomation/global/tools/includes/optional/t_security_tools.inc261
-rw-r--r--testautomation/global/tools/includes/optional/t_server_info.inc148
-rwxr-xr-x[-rw-r--r--]testautomation/global/tools/includes/optional/t_stringtools.inc140
-rw-r--r--testautomation/global/tools/includes/optional/t_toolbar_calc.inc300
-rw-r--r--testautomation/global/tools/includes/optional/t_toolbar_impress.inc290
-rw-r--r--testautomation/global/tools/includes/optional/t_treelist_tools.inc108
-rw-r--r--testautomation/global/tools/includes/optional/t_ui_filters.inc11
-rw-r--r--testautomation/global/tools/includes/required/t_dir.inc88
-rw-r--r--testautomation/global/tools/includes/required/t_dirloc.inc288
-rwxr-xr-xtestautomation/global/tools/includes/required/t_doc2.inc102
-rw-r--r--testautomation/global/tools/includes/required/t_files.inc165
-rw-r--r--testautomation/global/tools/includes/required/t_lists.inc26
-rwxr-xr-xtestautomation/global/tools/includes/required/t_menu.inc191
-rw-r--r--testautomation/global/tools/includes/required/t_option2.inc22
-rw-r--r--testautomation/global/tools/includes/required/t_tools1.inc181
-rw-r--r--testautomation/global/tools/includes/required/t_tools2.inc311
-rwxr-xr-x[-rw-r--r--]testautomation/global/tools/includes/required/t_tools3.inc262
-rwxr-xr-xtestautomation/global/tools/record_macro.bas54
-rwxr-xr-xtestautomation/global/win/bars.win2
-rwxr-xr-xtestautomation/graphics/optional/includes/global/export_graphic_2.inc88
-rwxr-xr-xtestautomation/graphics/optional/includes/global/g_autocorrection.inc2
-rw-r--r--testautomation/graphics/optional/includes/global/id_006.inc2
-rw-r--r--testautomation/graphics/required/includes/global/id_006.inc2
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/includes/impress/im_003_.inc77
-rw-r--r--testautomation/math/optional/includes/m_101_.inc20
-rw-r--r--testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc27
-rw-r--r--testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc4
-rw-r--r--testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc2
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields2.inc2
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields4.inc30
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields5.inc8
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields7.inc4
-rw-r--r--testautomation/writer/optional/includes/loadsave/w_loadsave.inc2
-rw-r--r--testautomation/writer/optional/includes/section/w_section_4.inc8
-rw-r--r--testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc10
-rwxr-xr-xtestautomation/writer/required/includes/w_002_.inc800
-rw-r--r--testautomation/writer/required/includes/w_007_.inc8
-rwxr-xr-xtestautomation/writer/required/includes/w_011_.inc6
-rw-r--r--testautomation/writer/tools/includes/w_tool4.inc2
-rw-r--r--testautomation/xml/optional/includes/docbook_001.inc2
-rw-r--r--testautomation/xml/tools/includes/xmltool1.inc2
240 files changed, 4423 insertions, 11276 deletions
diff --git a/testautomation/dbaccess/tools/dbcreatetools.inc b/testautomation/dbaccess/tools/dbcreatetools.inc
index 159f27cc249f..964c2be5e64d 100755
--- a/testautomation/dbaccess/tools/dbcreatetools.inc
+++ b/testautomation/dbaccess/tools/dbcreatetools.inc
@@ -1462,6 +1462,7 @@ function fSetJDBCDriverFiles(sClassPath) as boolean
call hCloseDocument
end function
+
'-------------------------------------------------------------------------
function hGetInstalledDatabaseDrivers( dbDriverList() as string ) as integer
@@ -1510,7 +1511,7 @@ function hGetInstalledDatabaseDrivers( dbDriverList() as string ) as integer
endif
- if ( VERBOSE ) then
+ if ( GVERBOSE ) then
printlog( CFN & "Returning " & iDriverCount & " drivers" )
endif
@@ -1588,7 +1589,7 @@ function hGetDatabaseDisplayName( dbDriverURL as string ) as string
endif
- if ( VERBOSE ) then
+ if ( GVERBOSE ) then
printlog( CFN & "Database display string: " & sDatabaseName )
endif
hGetDataBaseDisplayName() = sDatabaseName
diff --git a/testautomation/framework/optional/f_CJK_GridLayout.bas b/testautomation/framework/optional/f_CJK_GridLayout.bas
index 030fa64e6dfd..1569816cd3a5 100755
--- a/testautomation/framework/optional/f_CJK_GridLayout.bas
+++ b/testautomation/framework/optional/f_CJK_GridLayout.bas
@@ -72,8 +72,6 @@ end sub
sub LoadIncludeFiles
use "global\system\includes\master.inc"
use "global\system\includes\gvariabl.inc"
- use "global\tools\includes\required\t_doc1.inc"
- use "global\tools\includes\required\t_tools1.inc"
use "global\tools\includes\optional\t_docfuncs.inc"
use "framework\tools\includes\CJK_tools.inc"
diff --git a/testautomation/framework/optional/f_CJK_RubyDialogueProposal.bas b/testautomation/framework/optional/f_CJK_RubyDialogueProposal.bas
index 2e7d9e80ecef..2bf56608181b 100755
--- a/testautomation/framework/optional/f_CJK_RubyDialogueProposal.bas
+++ b/testautomation/framework/optional/f_CJK_RubyDialogueProposal.bas
@@ -63,8 +63,6 @@ end sub
sub LoadIncludeFiles
use "global\system\includes\master.inc"
use "global\system\includes\gvariabl.inc"
- use "global\tools\includes\required\t_doc1.inc"
- use "global\tools\includes\required\t_tools1.inc"
use "framework\tools\includes\CJK_tools.inc"
diff --git a/testautomation/framework/optional/f_basic_dialog_i18n.bas b/testautomation/framework/optional/f_basic_dialog_i18n.bas
index e3b50ffd188a..291894eb6296 100755
--- a/testautomation/framework/optional/f_basic_dialog_i18n.bas
+++ b/testautomation/framework/optional/f_basic_dialog_i18n.bas
@@ -56,6 +56,7 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_docfuncs.inc"
use "global\tools\includes\optional\t_control_objects.inc"
use "global\tools\includes\optional\t_stringtools.inc"
+ use "global\tools\includes\optional\t_treelist_tools.inc"
use "framework\tools\includes\formcontrols.inc"
use "framework\tools\includes\pbrowser_tools.inc"
diff --git a/testautomation/framework/optional/f_basic_documents.bas b/testautomation/framework/optional/f_basic_documents.bas
index 87f022d4e74e..9572aac6e2dd 100755
--- a/testautomation/framework/optional/f_basic_documents.bas
+++ b/testautomation/framework/optional/f_basic_documents.bas
@@ -56,8 +56,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_accels.inc"
use "global\tools\includes\optional\t_security_tools.inc"
use "global\tools\includes\optional\t_listfuncs.inc"
-
- use "framework\tools\includes\init_tools.inc"
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/optional/f_basic_gridcontrol.bas b/testautomation/framework/optional/f_basic_gridcontrol.bas
index 697618e7fc65..697618e7fc65 100644..100755
--- a/testautomation/framework/optional/f_basic_gridcontrol.bas
+++ b/testautomation/framework/optional/f_basic_gridcontrol.bas
diff --git a/testautomation/framework/optional/f_basic_issues.bas b/testautomation/framework/optional/f_basic_issues.bas
index b6be47be72c4..54f64bafe7db 100755
--- a/testautomation/framework/optional/f_basic_issues.bas
+++ b/testautomation/framework/optional/f_basic_issues.bas
@@ -49,6 +49,7 @@ sub LoadIncludeFiles
use "global\system\includes\master.inc"
use "global\tools\includes\optional\t_basic_ide_tools.inc"
+ use "global\tools\includes\optional\t_treelist_tools.inc"
use "global\tools\includes\optional\t_macro_tools.inc"
gApplication = "WRITER"
diff --git a/testautomation/framework/optional/f_basic_library_export_import.bas b/testautomation/framework/optional/f_basic_library_export_import.bas
index e09742c2e3dc..a03e4bfe4804 100755
--- a/testautomation/framework/optional/f_basic_library_export_import.bas
+++ b/testautomation/framework/optional/f_basic_library_export_import.bas
@@ -68,8 +68,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_listfuncs.inc"
use "global\tools\includes\optional\t_stringtools.inc"
use "global\tools\includes\optional\t_macro_tools.inc"
-
- use "framework\tools\includes\init_tools.inc"
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/optional/f_basic_package_export_import.bas b/testautomation/framework/optional/f_basic_package_export_import.bas
index b8c392dd38b8..db1b43c9f76d 100755
--- a/testautomation/framework/optional/f_basic_package_export_import.bas
+++ b/testautomation/framework/optional/f_basic_package_export_import.bas
@@ -65,8 +65,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_listfuncs.inc"
use "global\tools\includes\optional\t_macro_tools.inc"
- use "framework\tools\includes\init_tools.inc"
-
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/optional/f_basic_shared_modules.bas b/testautomation/framework/optional/f_basic_shared_modules.bas
index 1bdb59eb2218..aef11a739c8a 100755
--- a/testautomation/framework/optional/f_basic_shared_modules.bas
+++ b/testautomation/framework/optional/f_basic_shared_modules.bas
@@ -52,8 +52,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_treelist_tools.inc"
use "global\tools\includes\optional\t_docfuncs.inc"
- use "framework\tools\includes\init_tools.inc"
-
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/optional/f_basic_templatedocuments.bas b/testautomation/framework/optional/f_basic_templatedocuments.bas
index 576de3006b2e..064502e96e33 100755
--- a/testautomation/framework/optional/f_basic_templatedocuments.bas
+++ b/testautomation/framework/optional/f_basic_templatedocuments.bas
@@ -38,8 +38,10 @@ sub main
call hStatusIn( "framework" , "f_basic_templatedocuments.bas" )
+ hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_MEDIUM )
call tMacroUserTemplate()
call tBasicSpecTemplate()
+ hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
call hStatusOut()
@@ -64,7 +66,6 @@ sub LoadIncludeFiles
use "framework\tools\includes\private_environment.inc"
use "framework\tools\includes\webtools.inc"
use "framework\tools\includes\template_tools.inc"
- use "framework\tools\includes\init_tools.inc"
use "framework\tools\includes\scriptorganizer_tools.inc"
gApplication = "WRITER"
diff --git a/testautomation/framework/optional/f_extras_samplefileopen.bas b/testautomation/framework/optional/f_extras_samplefileopen.bas
index 8f57fe7e2242..a07609135c62 100755
--- a/testautomation/framework/optional/f_extras_samplefileopen.bas
+++ b/testautomation/framework/optional/f_extras_samplefileopen.bas
@@ -57,7 +57,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_filetools.inc"
use "global\tools\includes\optional\t_listfuncs.inc"
- use "framework\tools\includes\apicalls.inc"
use "framework\tools\includes\template_tools.inc"
gApplication = "WRITER"
diff --git a/testautomation/framework/optional/f_extras_sampleopen.bas b/testautomation/framework/optional/f_extras_sampleopen.bas
index e1dfee91afed..ac11a9f330d1 100755
--- a/testautomation/framework/optional/f_extras_sampleopen.bas
+++ b/testautomation/framework/optional/f_extras_sampleopen.bas
@@ -59,7 +59,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_filetools.inc"
use "global\tools\includes\optional\t_key_tools.inc"
- use "framework\tools\includes\apicalls.inc"
use "framework\tools\includes\template_tools.inc"
gApplication = "WRITER"
diff --git a/testautomation/framework/optional/f_extras_templatefileopen.bas b/testautomation/framework/optional/f_extras_templatefileopen.bas
index e4121b8df960..037dcaa6c166 100755
--- a/testautomation/framework/optional/f_extras_templatefileopen.bas
+++ b/testautomation/framework/optional/f_extras_templatefileopen.bas
@@ -57,7 +57,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_security_tools.inc"
use "global\tools\includes\optional\t_listfuncs.inc"
- use "framework\tools\includes\apicalls.inc"
use "framework\tools\includes\template_tools.inc"
gApplication = "WRITER"
diff --git a/testautomation/framework/optional/f_extras_templateopen.bas b/testautomation/framework/optional/f_extras_templateopen.bas
index f78e023b5e33..e4fc9a1abe96 100755
--- a/testautomation/framework/optional/f_extras_templateopen.bas
+++ b/testautomation/framework/optional/f_extras_templateopen.bas
@@ -59,7 +59,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_filetools.inc"
use "global\tools\includes\optional\t_security_tools.inc"
- use "framework\tools\includes\apicalls.inc"
use "framework\tools\includes\template_tools.inc"
gApplication = "WRITER"
diff --git a/testautomation/framework/optional/f_options_ooo.bas b/testautomation/framework/optional/f_options_ooo.bas
index b280a4427b05..6f18669466f1 100755
--- a/testautomation/framework/optional/f_options_ooo.bas
+++ b/testautomation/framework/optional/f_options_ooo.bas
@@ -79,7 +79,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_control_objects.inc"
use "global\tools\includes\optional\t_key_tools.inc"
- use "framework\tools\includes\init_tools.inc"
use "framework\tools\includes\options_tools.inc"
Call GetUseFiles
diff --git a/testautomation/framework/optional/f_scripting_basics.bas b/testautomation/framework/optional/f_scripting_basics.bas
index 494dc1e21ad5..444544251aa0 100755
--- a/testautomation/framework/optional/f_scripting_basics.bas
+++ b/testautomation/framework/optional/f_scripting_basics.bas
@@ -48,8 +48,6 @@ sub LoadIncludeFiles
use "global\system\includes\master.inc"
use "global\system\includes\gvariabl.inc"
- use "framework\tools\includes\init_tools.inc"
-
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/optional/f_security_certified_docs.bas b/testautomation/framework/optional/f_security_certified_docs.bas
index 52a5693a9920..26d76b74ee7d 100755
--- a/testautomation/framework/optional/f_security_certified_docs.bas
+++ b/testautomation/framework/optional/f_security_certified_docs.bas
@@ -69,8 +69,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_docfuncs.inc"
use "global\tools\includes\optional\t_treelist_tools.inc"
use "global\tools\includes\optional\t_listfuncs.inc"
-
- use "framework\tools\includes\signature_tools.inc"
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/optional/f_security_incorrect_password.bas b/testautomation/framework/optional/f_security_incorrect_password.bas
index 10f0cf2d76dc..1ce5abe7e3f4 100755
--- a/testautomation/framework/optional/f_security_incorrect_password.bas
+++ b/testautomation/framework/optional/f_security_incorrect_password.bas
@@ -61,8 +61,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_security_tools.inc"
use "global\tools\includes\optional\t_filetools.inc"
use "global\tools\includes\optional\t_docfuncs.inc"
-
- use "framework\tools\includes\init_tools.inc"
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/optional/f_toolbar_items.bas b/testautomation/framework/optional/f_toolbar_items.bas
index b9e0550f6296..4277ce17d7aa 100755
--- a/testautomation/framework/optional/f_toolbar_items.bas
+++ b/testautomation/framework/optional/f_toolbar_items.bas
@@ -53,8 +53,6 @@ sub LoadIncludeFiles
use "framework\tools\includes\toolbar_tools.inc"
use "framework\tools\includes\customize_tools.inc"
- use "framework\tools\includes\performance.inc"
- use "framework\tools\includes\init_tools.inc"
gApplication = "WRITER"
call GetUseFiles
diff --git a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
index d144b7cdb88a..d144b7cdb88a 100644..100755
--- a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
+++ b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
diff --git a/testautomation/framework/optional/includes/NewSortingAlgorithmForJapanese_1.inc b/testautomation/framework/optional/includes/NewSortingAlgorithmForJapanese_1.inc
index e20124b78b93..e20124b78b93 100644..100755
--- a/testautomation/framework/optional/includes/NewSortingAlgorithmForJapanese_1.inc
+++ b/testautomation/framework/optional/includes/NewSortingAlgorithmForJapanese_1.inc
diff --git a/testautomation/framework/optional/includes/basic_delete_modules.inc b/testautomation/framework/optional/includes/basic_delete_modules.inc
index 3fe642ea8ec6..3a639f01e728 100644..100755
--- a/testautomation/framework/optional/includes/basic_delete_modules.inc
+++ b/testautomation/framework/optional/includes/basic_delete_modules.inc
@@ -35,6 +35,8 @@ testcase tDeleteModulesAtRunningBasic
printlog( "Delete BASIC module while BASIC is running" )
+ const RAISE_MESSAGEBOX = 1
+
dim brc as boolean
const MAX_WAIT = 3000
dim iMenuItemCount as integer
@@ -44,11 +46,7 @@ testcase tDeleteModulesAtRunningBasic
Call hNewDocument()
printlog( "Open the BASIC Organizer" )
- brc = hOpenBasicOrganizerFromDoc()
- if ( not brc ) then
- warnlog( "Unable to open BASIC organizer for the document" )
- goto endsub
- endif
+ ToolsMacro_uno
printlog( "Create a new module for the current document" )
brc = hCreateModuleForDoc()
@@ -58,7 +56,7 @@ testcase tDeleteModulesAtRunningBasic
endif
printlog( "Insert a short script (1. page)" )
- brc = hInsertMacro( 1 )
+ brc = hInsertMacro( RAISE_MESSAGEBOX )
if ( not brc ) then
warnlog( "Unable to create a basic module for the document" )
goto endsub
diff --git a/testautomation/framework/optional/includes/basic_dialog_i18n_copy_control.inc b/testautomation/framework/optional/includes/basic_dialog_i18n_copy_control.inc
index 1a47c8296588..8f7db31fed08 100644..100755
--- a/testautomation/framework/optional/includes/basic_dialog_i18n_copy_control.inc
+++ b/testautomation/framework/optional/includes/basic_dialog_i18n_copy_control.inc
@@ -38,6 +38,7 @@ testcase tBasicDialogI18nCopyControl
const DIALOG_NAME = "DialogExport" ' Name of the first module
const LANGUAGES_TO_COPY = 5 ' Only copy n languages
const TARGET_DIALOG = "Target" ' The name of the dialog the control is pasted to
+ const DEFAULT_TIMEOUT = 2
dim cLanguageList( LANGUAGES_TO_COPY ) as string ' Note: Index 0 is used
dim iCurrentLanguage as integer
@@ -56,146 +57,140 @@ testcase tBasicDialogI18nCopyControl
' These are the IDE internal coordinates of the control, used to restore
' identical coordinates in the source and target dialogs
dim iOriginalCoordinates( 4 ) as integer
-
- ' Some multi purpose returncode
- dim brc as boolean
hCreateDocument()
printlog( "Test init: Setting up environment" )
- brc = hInitFormControls( DIALOG_NAME )
- if ( not brc ) then
- warnlog( "Failed to initialize BASIC IDE/Dialog editor, aborting" )
- goto endsub
- endif
-
- hDrawControlOnDialog( COMMAND_BUTTON )
-
- hOpenPropertyBrowser()
- kontext "TabGeneralControl"
- printlog( "Get internal coordinates for the control" )
- iOriginalCoordinates( 1 ) = height.getText()
- iOriginalCoordinates( 2 ) = width.getText()
- iOriginalCoordinates( 3 ) = PosX.getText()
- iOriginalCoordinates( 4 ) = PosY.getText()
- printlog( "Height: " & iOriginalCoordinates( 1 ) )
- printlog( "Width.: " & iOriginalCoordinates( 2 ) )
- printlog( "Pos X.: " & iOriginalCoordinates( 3 ) )
- printlog( "Pos Y.: " & iOriginalCoordinates( 4 ) )
- hClosePropertyBrowser()
+ if ( hInitFormControls( DIALOG_NAME ) ) then
- qaerrorlog( "#i80456# properties button not enabled when a formcontrol is inserted via keyboard" )
-
- kontext "ToolsCollectionBar"
- ManageLanguage.click()
-
- kontext "ManageUILanguages"
- if ( ManageUILanguages.exists( 2 ) ) then
-
- add.click()
-
- kontext "SetDefaultLanguage"
- if ( SetDefaultLanguage.exists( 1 ) ) then
- SetDefaultLanguage.ok()
+ hDrawControlOnDialog( COMMAND_BUTTON )
+
+ hOpenPropertyBrowser()
+ kontext "TabGeneralControl"
+ printlog( "Get internal coordinates for the control" )
+ iOriginalCoordinates( 1 ) = height.getText()
+ iOriginalCoordinates( 2 ) = width.getText()
+ iOriginalCoordinates( 3 ) = PosX.getText()
+ iOriginalCoordinates( 4 ) = PosY.getText()
+ printlog( "Height: " & iOriginalCoordinates( 1 ) )
+ printlog( "Width.: " & iOriginalCoordinates( 2 ) )
+ printlog( "Pos X.: " & iOriginalCoordinates( 3 ) )
+ printlog( "Pos Y.: " & iOriginalCoordinates( 4 ) )
+ hClosePropertyBrowser()
+
+ qaerrorlog( "#i80456# properties button not enabled when a formcontrol is inserted via keyboard" )
+
+ kontext "ToolsCollectionBar"
+ ManageLanguage.click()
+
+ kontext "ManageUILanguages"
+ if ( ManageUILanguages.exists( DEFAULT_TIMEOUT ) ) then
+
+ hClickButton( Add )
+
+ kontext "SetDefaultLanguage"
+ if ( SetDefaultLanguage.exists( DEFAULT_TIMEOUT ) ) then
+ hCloseDialog( SetDefaultLanguage, "ok" )
+ else
+ warnlog( "Set Default Language dialog is missing" )
+ endif
else
- warnlog( "Set Default Language dialog is missing" )
+ warnlog( "Unable to open Manage UI Languages dialog" )
endif
- else
- warnlog( "Unable to open Manage UI Languages dialog" )
- endif
-
- kontext "ManageUILanguages"
- if ( ManageUILanguages.exists( 1 ) ) then
-
- add.click()
-
- kontext "AddUserInterface"
- if ( AddUserInterface.exists( 1 ) ) then
- for iCurrentLanguage = 1 to LANGUAGES_TO_COPY
- AddNewControl.select( iCurrentLanguage )
- AddNewControl.check()
- next iCurrentLanguage
- AddUserInterface.ok()
+
+ kontext "ManageUILanguages"
+ if ( ManageUILanguages.exists( DEFAULT_TIMEOUT ) ) then
+
+ hClickButton( Add )
+
+ kontext "AddUserInterface"
+ if ( AddUserInterface.exists( DEFAULT_TIMEOUT ) ) then
+ for iCurrentLanguage = 1 to LANGUAGES_TO_COPY
+ AddNewControl.select( iCurrentLanguage )
+ AddNewControl.check()
+ next iCurrentLanguage
+ hCloseDialog( AddUserInterface, "ok" )
+ else
+ warnlog( "Add User Interface Language dialog is missing" )
+ endif
else
- warnlog( "Add User Interface Language dialog is missing" )
+ warnlog( "Unable to open Manage UI Languages dialog" )
endif
- else
- warnlog( "Unable to open Manage UI Languages dialog" )
- endif
-
- kontext "ManageUILanguages"
- for iCurrentLanguage = 0 to LANGUAGES_TO_COPY
- PresentLanguages.select( iCurrentLanguage + 1 )
- cLanguageList( iCurrentLanguage ) = PresentLanguages.getSelText()
- printlog( iCurrentLanguage & ": " & cLanguageList( iCurrentLanguage ) )
- next iCurrentLanguage
-
- kontext "ManageUILanguages"
- ManageUILanguages.close()
-
- printlog( "Localizing control" )
- for iCurrentLanguage = 0 to LANGUAGES_TO_COPY
- kontext "TranslationBar"
- CurrentLanguage.select( iCurrentLanguage + 1 )
- kontext "BasicIde"
- hSelectControl( COMMAND_BUTTON )
+
+ kontext "ManageUILanguages"
+ for iCurrentLanguage = 0 to LANGUAGES_TO_COPY
+ PresentLanguages.select( iCurrentLanguage + 1 )
+ cLanguageList( iCurrentLanguage ) = PresentLanguages.getSelText()
+ printlog( iCurrentLanguage & ": " & cLanguageList( iCurrentLanguage ) )
+ next iCurrentLanguage
+
+ kontext "ManageUILanguages"
+ hCloseDialog( ManageUILanguages, "close" )
+
+ printlog( "Localizing control" )
+ for iCurrentLanguage = 0 to LANGUAGES_TO_COPY
+ kontext "TranslationBar"
+ CurrentLanguage.select( iCurrentLanguage + 1 )
+ kontext "BasicIde"
+ hSelectControl( COMMAND_BUTTON )
+ hOpenPropertyBrowser()
+ printlog( "Setting string: " & cIDStrings( iCurrentLanguage ) )
+ kontext "TabGeneralControl"
+ NameText.typeKeys( cIDStrings( iCurrentLanguage ) & "<RETURN>" )
+ hClosePropertyBrowser()
+ next iCurrentLanguage
+
+ printlog( "Copy control" )
+ hUseAsyncSlot( "EditCopy" )
+
+ printlog( "New dialog" )
+ hNewDialog()
+
+ printlog( "Paste control" )
+ hUseAsyncSlot( "EditPaste" )
+
hOpenPropertyBrowser()
- printlog( "Setting string: " & cIDStrings( iCurrentLanguage ) )
kontext "TabGeneralControl"
- NameText.typeKeys( cIDStrings( iCurrentLanguage ) & "<RETURN>" )
+ printlog( "Set coordinates to be identical with those from the source control" )
+ PosX.typeKeys ( )
+ PosX.typeKeys ( "<HOME><SHIFT END>" & iOriginalCoordinates( 3 ) & "<RETURN>" )
+ PosY.typeKeys ( "<HOME><SHIFT END>" & iOriginalCoordinates( 4 ) & "<RETURN>" )
+ Height.typeKeys( "<HOME><SHIFT END>" & iOriginalCoordinates( 1 ) & "<RETURN>" )
+ Width.typeKeys ( "<HOME><SHIFT END>" & iOriginalCoordinates( 2 ) & "<RETURN>" )
+ hClosePropertyBrowser
+
+
+ hOpenPropertyBrowser()
+ kontext "TabGeneralControl"
+ printlog( "Get internal coordinates for the control" )
+ iOriginalCoordinates( 1 ) = height.getText()
+ iOriginalCoordinates( 2 ) = width.getText()
+ iOriginalCoordinates( 3 ) = PosX.getText()
+ iOriginalCoordinates( 4 ) = PosY.getText()
+ printlog( "Height: " & iOriginalCoordinates( 1 ) )
+ printlog( "Width.: " & iOriginalCoordinates( 2 ) )
+ printlog( "Pos X.: " & iOriginalCoordinates( 3 ) )
+ printlog( "Pos Y.: " & iOriginalCoordinates( 4 ) )
hClosePropertyBrowser()
- next iCurrentLanguage
-
- printlog( "Copy control" )
- EditCopy
-
- printlog( "New dialog" )
- Call hNewDialog()
-
- printlog( "Paste control" )
- EditPaste
-
- hOpenPropertyBrowser()
- kontext "TabGeneralControl"
- printlog( "Set coordinates to be identical with those from the source control" )
- PosX.typeKeys ( )
- PosX.typeKeys ( "<HOME><SHIFT END>" & iOriginalCoordinates( 3 ) & "<RETURN>" )
- PosY.typeKeys ( "<HOME><SHIFT END>" & iOriginalCoordinates( 4 ) & "<RETURN>" )
- Height.typeKeys( "<HOME><SHIFT END>" & iOriginalCoordinates( 1 ) & "<RETURN>" )
- Width.typeKeys ( "<HOME><SHIFT END>" & iOriginalCoordinates( 2 ) & "<RETURN>" )
- hClosePropertyBrowser
-
-
- hOpenPropertyBrowser()
- kontext "TabGeneralControl"
- printlog( "Get internal coordinates for the control" )
- iOriginalCoordinates( 1 ) = height.getText()
- iOriginalCoordinates( 2 ) = width.getText()
- iOriginalCoordinates( 3 ) = PosX.getText()
- iOriginalCoordinates( 4 ) = PosY.getText()
- printlog( "Height: " & iOriginalCoordinates( 1 ) )
- printlog( "Width.: " & iOriginalCoordinates( 2 ) )
- printlog( "Pos X.: " & iOriginalCoordinates( 3 ) )
- printlog( "Pos Y.: " & iOriginalCoordinates( 4 ) )
- hClosePropertyBrowser()
-
- kontext "TranslationBar"
- for iCurrentLanguage = 0 to LANGUAGES_TO_COPY
- CurrentLanguage.select( iCurrentLanguage + 1 )
- cTempString = CurrentLanguage.getSelText()
- if ( cTempString = cLanguageList( iCurrentLanguage ) ) then
- printlog( "Language <" & cTempString & "> was successfully copied" )
- else
- warnlog( "Either a language was lost or the sort order changed" )
- printlog( "Expected: " & cLanguageList( iCurrentLanguage ) )
- printlog( "Found...: " & cTempString )
- endif
- next iCurrentLanguage
-
-
- kontext "BasicIde"
- hDestroyDocument()
+
+ kontext "TranslationBar"
+ for iCurrentLanguage = 0 to LANGUAGES_TO_COPY
+ CurrentLanguage.select( iCurrentLanguage + 1 )
+ cTempString = CurrentLanguage.getSelText()
+ if ( cTempString = cLanguageList( iCurrentLanguage ) ) then
+ printlog( "Language <" & cTempString & "> was successfully copied" )
+ else
+ warnlog( "Either a language was lost or the sort order changed" )
+ printlog( "Expected: " & cLanguageList( iCurrentLanguage ) )
+ printlog( "Found...: " & cTempString )
+ endif
+ next iCurrentLanguage
+
+ hCloseBasicIDE()
+ else
+ warnlog( "Failed to initialize dialog" )
+ endif
hDestroyDocument()
endcase
diff --git a/testautomation/framework/optional/includes/basic_dialog_i18n_defaults.inc b/testautomation/framework/optional/includes/basic_dialog_i18n_defaults.inc
index 79b4e039fa14..79b4e039fa14 100644..100755
--- a/testautomation/framework/optional/includes/basic_dialog_i18n_defaults.inc
+++ b/testautomation/framework/optional/includes/basic_dialog_i18n_defaults.inc
diff --git a/testautomation/framework/optional/includes/basic_documents.inc b/testautomation/framework/optional/includes/basic_documents.inc
index d5d12b1aa12f..f83e961cac57 100644..100755
--- a/testautomation/framework/optional/includes/basic_documents.inc
+++ b/testautomation/framework/optional/includes/basic_documents.inc
@@ -37,7 +37,6 @@ testcase tBasicDocuments
const CFN = "tBasicDocuments::"
- dim brc as boolean
dim sFileWriter as string
dim sFileCalc as string
dim iDocumentCount as integer
@@ -62,32 +61,32 @@ testcase tBasicDocuments
gApplication = "WRITER"
printlog( "Create a Writer workfilename (build path and filename)" )
- brc = hCreateBasicWorkFiles()
+ hCreateBasicWorkFiles()
sFileWriter = hGetBasicWorkFile( "current" )
gApplication = "CALC"
printlog( "Create a Calc workfilename (build path and filename)" )
- brc = hCreateBasicWorkFiles()
+ hCreateBasicWorkFiles()
sFileCalc = hGetBasicWorkFile( "current" )
printlog( "Open the writer file" )
- brc = hFileOpen( sFileWriter )
- brc = hAllowMacroExecution()
- if ( not brc ) then
+ hFileOpen( sFileWriter )
+ if ( not hAllowMacroExecution() ) then
warnlog( "Missing Macro execution dialog. Please check the file/security settings" )
endif
printlog( "Open the Calc file" )
- brc = hFileOpen( sFileCalc )
- brc = hAllowMacroExecution()
- if ( not brc ) then
+ hFileOpen( sFileCalc )
+ if ( not hAllowMacroExecution() ) then
warnlog( "Missing Macro execution dialog. Please check the file/security settings" )
endif
printlog( "Open the BASIC organizer" )
- brc = hOpenBasicOrganizerFromDoc()
+ ToolsMacro_uno
+ WaitSlot()
printlog( "Retreive the names of all nodes from the treelist" )
+ kontext "Makro"
hGetVisibleNodeNames( MakroAus , cNodeListA() )
printlog( "Verify that both documents are listed - one Writer, one Calc with identical names" )
@@ -97,10 +96,10 @@ testcase tBasicDocuments
endif
printlog( "Click Manage..." )
- verwalten.click()
+ hClickButton( verwalten )
printlog( "Get the nodes list from the object organizer tabs - first tab" )
- brc = hSelectBasicObjectOrganizerTab( 1 )
+ hSelectBasicObjectOrganizerTab( 1 )
ListAllDelete( cNodeListB() )
hGetVisibleNodeNames( ModulListe , cNodeListB() )
@@ -111,7 +110,7 @@ testcase tBasicDocuments
endif
printlog( "Switch to second tab" )
- brc = hSelectBasicObjectOrganizerTab( 2 )
+ hSelectBasicObjectOrganizerTab( 2 )
ListAllDelete( cNodeListB() )
hGetVisibleNodeNames( ModuleList , cNodeListB() )
if ( listcount( cNodeListB() ) <> 5 ) then
@@ -126,15 +125,15 @@ testcase tBasicDocuments
endif
printlog( "Third tab (should not list the document" )
- brc = hSelectBasicObjectOrganizerTab( 3 )
- brc = hTestLibraryListBox( cNodeListA() )
+ hSelectBasicObjectOrganizerTab( 3 )
+ hTestLibraryListBox( cNodeListA() )
printlog( CFN & "Closing dialogs..." )
- TabBibliotheken.cancel()
+ hCloseDialog( TabBibliotheken, "cancel" )
printlog( "Cleanup: Close macro organizer" )
Kontext "Makro"
- Makro.cancel()
+ hCloseDialog( Makro, "cancel" )
printlog( "Cleanup: Close all files" )
hFileCloseAll()
diff --git a/testautomation/framework/optional/includes/basic_eventbinding.inc b/testautomation/framework/optional/includes/basic_eventbinding.inc
index 85601c312667..85601c312667 100644..100755
--- a/testautomation/framework/optional/includes/basic_eventbinding.inc
+++ b/testautomation/framework/optional/includes/basic_eventbinding.inc
diff --git a/testautomation/framework/optional/includes/basic_formcontrols.inc b/testautomation/framework/optional/includes/basic_formcontrols.inc
index 01af07357d52..f755d645b888 100644..100755
--- a/testautomation/framework/optional/includes/basic_formcontrols.inc
+++ b/testautomation/framework/optional/includes/basic_formcontrols.inc
@@ -31,18 +31,18 @@
'*
'\******************************************************************************
+private const ICONTROLCOUNT = 22
+
testcase tAllControlsOnDialog( cMajor as string )
printlog( "Insert all available controls into a BASIC dialog and verify that changed settings persist a save/load cycle" )
- qaerrorlog( "#i105685# - Test disabled" )
- goto endsub
+ 'qaerrorlog( "#i105685# - Test disabled" )
+ 'goto endsub
dim iApplication as Integer ' numeric expression for gApplication
dim cApplication as string ' Name of the current application
- dim lsControlNames( 30 ) as string ' list containing the names of the controls
-
' number of controls and the name of the current control
dim iCurrentControl as integer
dim sCurrentControl as string
@@ -50,44 +50,30 @@ testcase tAllControlsOnDialog( cMajor as string )
' the workfile and the filter (Tested for 569, 645, 680)
dim sFile as string
- ' errorstatus: if false, something went wrong and the test cancels
- ' trying to recover somehow
- dim bOpen as boolean
- dim brc as boolean
- dim irc as integer
-
const CMODULE = "tacod" ' abbreviation for tAllControlsOnDialog
+ const BUTTON_TIMEOUT = -1
+ const UPPER_BOUNDARY = 1 ' 1 = only writer, increase to add Calc, Impress, Draw...
- printlog( "Perform the test for one application only: WRITER" )
- for iApplication = 1 to 1
+ ' Currently set to test writer only. Increase upper boundary to add applications
+ ' Up to 4 should be useful
+ for iApplication = 1 to UPPER_BOUNDARY
- printlog( "Set document type" )
cApplication = hNumericDoctype( iApplication )
+ printlog( "Document type: " & cApplication )
- printlog( "Build the filename" )
- sFile = hGetWorkPath() & "basic" & hGetSuffix( cMajor )
- sFile = ConvertPath( sFile )
+ sFile = convertpath( hGetWorkPath() & "basic" & hGetSuffix( cMajor ) )
printlog( "Using file: " & sFile )
printlog( "Delete the file, if it exists" )
hDeleteFile( sFile )
printlog( "Open a second document" )
- printlog( "" )
- printlog( cApplication )
- brc = hCreateDocument()
- if ( not brc ) then
- warnlog( "Failed to create a new document, aborting" )
- goto endsub
- endif
+ hCreateDocument()
- printlog( "Create a new module for the new document" )
- printlog( "Create a new dialog in BasicIDE" )
- printlog( "Open the macro controls float" )
- bOpen = hInitFormControls( CMODULE )
- if ( not bOpen ) then
+ printlog( "Create a new module for the new document, new dialog, open macro controls" )
+ if ( not hInitFormControls( CMODULE ) ) then
printlog( "Aborting due to previous errors" )
- call hCloseDocument()
+ hDestroyDocument()
goto endsub
endif
@@ -95,192 +81,150 @@ testcase tAllControlsOnDialog( cMajor as string )
for iCurrentControl = 1 to ICONTROLCOUNT
sCurrentControl = hDrawControlOnDialog( iCurrentControl )
- listappend( lsControlNames() , sCurrentControl )
- hOpenPropertyBrowser()
- hPBSetControlName( sCurrentControl )
- hClosePropertyBrowser()
+ hUseAsyncSlot( "ContextProperties" )
+ kontext "ControlPropertiesTabControl"
+ if ( ControlPropertiesTabControl.exists( 1 ) ) then
+ hPBSetControlName( sCurrentControl )
+ hUseAsyncSlot( "ContextProperties" )
+ else
+ warnlog( "Property browser not open" )
+ endif
next iCurrentControl
-
Kontext "BASICIDE"
printlog( "close the BASIC-IDE" )
hCloseBasicIde()
-
printlog( "" )
printlog( "Test case 1: Verify that settings survive a close and reopen of the BASIC IDE" )
ToolsMacro_uno
kontext "Makro"
- irc = hSelectNodeByName( MakroAus , CMODULE )
- if ( irc = 0 ) then
+ if ( hSelectNodeByName( MakroAus , CMODULE ) ) then
+ printlog( "The node was found. Good." )
+ else
qaerrorlog( "Searching node by name failed. Using fallback" )
hSelectTheLastnode( MakroAus )
- else
- printlog( "The node was found. Good." )
endif
- brc = hIsMacroEditButtonEnabled()
- if ( not brc ) then
+ printlog( "Edit the module" )
+ if ( hClickButton( Bearbeiten ) = BUTTON_TIMEOUT ) then
warnlog( "Edit-Button is not enabled, the test cannot continue" )
kontext "Makro"
- Makro.cancel()
- brc = hDestroyDocument()
+ hCloseDialog( Makro, "cancel" )
+ hDestroyDocument()
goto endsub
endif
-
- printlog( "Click 'Edit' to edit the module" )
- printlog( "Edit the module" )
- Bearbeiten.Click()
- if ( WaitSlot <> WSFinished ) then
- warnlog( "Slot not finished after 1 second" )
- endif
kontext "BasicIDE"
printlog( "Find the dialog we created before" )
- ' try to find our dialog again by stepping through the tabbar
- bOpen = hFindFirstDialog()
- if ( not bOpen ) then
- warnlog( "Could access dialog, aborting test" )
+ if ( hFindFirstDialog() ) then
+ printlog( "First dialog found. Good." )
+ else
+ warnlog( "Could not access dialog, aborting test" )
hCloseBasicIde()
- brc = hDestroyDocument()
+ hDestroyDocument()
goto endsub
endif
- printlog( "Open the macro controls float" )
- ' if the dialog is open, open the macro controls toolbar as well,
- ' we need access to the "properties" button
- bOpen = hShowMacroControls()
- if ( not bOpen ) then
- warnlog( "Could not open macro controls, aborting" )
- hCloseBasicIde()
- brc = hDestroyDocument()
- goto endsub
- endif
-
printlog( "Select every control, open its properties and verify its name, close properties" )
for iCurrentControl = 1 to ICONTROLCOUNT
- if ( instr( gtSysName, "Solaris" ) > 0 ) then
- qaerrorlog( "Skipping frame control on Solaris" )
+ sCurrentControl = hGetControlName( iCurrentControl )
+ if ( hSelectControl( iCurrentControl ) ) then
+ kontext "ControlPropertiesTabControl"
+ if ( ControlPropertiesTabControl.exists( 5 ) ) then
+ wait( 300 )
+ hPBGetControlName( sCurrentControl )
+ hUseAsyncSlot( "ContextProperties" )
+ kontext "ControlPropertiesTabControl" : ControlPropertiesTabControl.notExists( 3 )
+ else
+ warnlog( "Property browser not open for " & sCurrentControl )
+ endif
else
- hSelectControl( iCurrentControl )
- hOpenPropertyBrowser()
- sCurrentControl = lsControlNames( iCurrentControl )
- hPBGetControlName( sCurrentControl )
- hClosePropertyBrowser()
+ warnlog( "Failed to select control: " & sCurrentControl )
endif
next iCurrentControl
-
- ' we need to delete the list-content otherwise we run into index-problems
- ListAllDelete( lsControlNames() )
- printlog( "Cleanup: Close the BASIC-IDE" )
- printlog( "Close the BASIC IDE" )
+ printlog( "Close the BASIC-IDE" )
hCloseBasicIde()
- if ( getDocumentCount <> 1 ) then
- warnlog( "Number of open documents is incorrect, expected one only" )
- endif
+ if ( getDocumentCount <> 1 ) then warnlog( "Number of open documents is incorrect, expected one only" )
- printlog "Save the document"
- printlog( "save the document" )
+ printlog( "Save the document" )
Call hFileSaveAsKill( sFile )
- printlog "Close it"
- printlog( "close the document" )
- brc = hDestroyDocument()
+ printlog( "Close the document" )
+ hDestroyDocument()
printlog( "" )
printlog( "Test case 2: Verify that all items keep their names after close and reload of the document" )
printlog( "Open the file again" )
- printlog( "Open the document" )
hFileOpen( sFile )
- printlog "Open tools/macro and select the last module for the current document"
- printlog( "open the basic-IDE of this document, open controls, activate 'Select-mode' and open the properties" )
+ printlog( "Open the basic-IDE from this document, open controls, activate 'Select-mode' and open the properties" )
ToolsMacro_uno
+
kontext "Makro"
- irc = hSelectNodeByName( MakroAus , CMODULE )
- if ( irc = 0 ) then
+ if ( hSelectNodeByName( MakroAus , CMODULE ) ) then
+ printlog( "The node was found. Good." )
+ else
qaerrorlog( "Searching node by name failed. Using fallback" )
hSelectTheLastnode( MakroAus )
- else
- printlog( "The node was found. Good." )
endif
- brc = hIsMacroEditButtonEnabled()
- if ( not brc ) then
+ printlog( "Edit the module" )
+ if ( hClickButton( Bearbeiten ) = BUTTON_TIMEOUT ) then
warnlog( "Edit-Button is not enabled, the test cannot continue" )
kontext "Makro"
- Makro.cancel()
- brc = hDestroyDocument()
+ hCloseDialog( Makro, "cancel" )
+ hDestroyDocument()
goto endsub
endif
-
- printlog( "Click 'Edit' to edit the module" )
- printlog( "Edit the module" )
- Bearbeiten.Click()
- if ( WaitSlot <> WSFinished ) then
- warnlog( "Slot not finished after 1 second" )
- endif
kontext "BasicIDE"
printlog( "Find the dialog we created before" )
- ' try to find our dialog again by stepping through the tabbar
- bOpen = hFindFirstDialog()
- if ( not bOpen ) then
- warnlog( "Could access dialog, aborting test" )
+ if ( hFindFirstDialog() ) then
+ printlog( "First dialog found. Good." )
+ else
+ warnlog( "Could not access dialog, aborting test" )
hCloseBasicIde()
- brc = hDestroyDocument()
+ hDestroyDocument()
goto endsub
endif
- printlog( "Open the macro controls float" )
- ' if the dialog is open, open the macro controls toolbar as well,
- ' we need access to the "properties" button
- bOpen = hShowMacroControls()
- if ( not bOpen ) then
- warnlog( "Could not open macro controls, aborting" )
- hCloseBasicIde()
- brc = hDestroyDocument()
- goto endsub
- endif
-
printlog( "Select every control, open its properties and verify its name, close properties" )
for iCurrentControl = 1 to ICONTROLCOUNT
- if ( instr( gtSysName, "Solaris" ) > 0 ) then
- qaerrorlog( "Skipping frame control on Solaris" )
+ sCurrentControl = hGetControlName( iCurrentControl )
+ if ( hSelectControl( iCurrentControl ) ) then
+ kontext "ControlPropertiesTabControl"
+ if ( ControlPropertiesTabControl.exists( 5 ) ) then
+ wait( 300 )
+ hPBGetControlName( sCurrentControl )
+ hUseAsyncSlot( "ContextProperties" )
+ kontext "ControlPropertiesTabControl" : ControlPropertiesTabControl.notExists( 3 )
+ else
+ warnlog( "Property browser not open for " & sCurrentControl )
+ endif
else
- hSelectControl( iCurrentControl )
- hOpenPropertyBrowser()
- sCurrentControl = lsControlNames( iCurrentControl )
- hPBGetControlName( sCurrentControl )
- hClosePropertyBrowser()
+ warnlog( "Failed to select control: " & sCurrentControl )
endif
next iCurrentControl
-
- ' we need to delete the list-content otherwise we run into index-problems
- ListAllDelete( lsControlNames() )
-
+
printlog( "Cleanup: Close the BASIC-IDE" )
- printlog( "Close the BASIC IDE" )
hCloseBasicIde()
printlog( "Cleanup: Close the document" )
- printlog( "Close the document" )
- brc = hDestroyDocument()
+ hDestroyDocument()
printlog( "Cleanup: Delete the file we created" )
hDeleteFile( sFile )
- printlog( "Repeat this for every application" )
-
next iApplication
endcase
diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc
index dc96ef30e16c..dc96ef30e16c 100644..100755
--- a/testautomation/framework/optional/includes/basic_gridcontrol.inc
+++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc
diff --git a/testautomation/framework/optional/includes/basic_ide.inc b/testautomation/framework/optional/includes/basic_ide.inc
index 799260201257..c8db670e8cc3 100644..100755
--- a/testautomation/framework/optional/includes/basic_ide.inc
+++ b/testautomation/framework/optional/includes/basic_ide.inc
@@ -33,116 +33,129 @@
testcase tBasic_IDE_Toolbar_Module
- qaerrorlog( "Replace this test asap, the approach is unusable" )
+ printlog( "BASIC toolbars for modules" )
+
+ const DIALOG_DELAY = 2
+ const RC_FAILURE = -1
+
+ dim cTargetFile as string
+ cTargetFile = convertpath( gOfficepath & "user\work\global_test.bas" )
- dim brc as boolean
dim cSourceFile as string
cSourceFile = gTesttoolpath & "framework\optional\input\resetregistration.txt"
cSourceFile = convertpath( cSourceFile )
-
-
-
printlog "open a new writer-doc"
gApplication = "WRITER"
hCreateDocument()
- brc = hOpenBasicOrganizerFromDoc()
- brc = hCreateModuleForDoc()
-
+ if ( hInitBasicIDE( "tBasic_IDE_Toolbar_Module" ) ) then
- kontext "macrobar"
- printlog "- compile"
- hClickToolbarButton( Compile )
-
- printlog "- Run Basic"
- hClickToolbarButton( BasicRun )
-
- printlog "- Step Procedure"
- hClickToolbarButton( ProcedureStep )
-
- printlog "- Stop Basic"
- hClickToolbarButton( BasicStop )
+ kontext "macrobar"
+ printlog "- compile"
+ hClickButton( Compile )
- printlog "- Single Step"
- hClickToolbarButton( SingleStep )
+ printlog "- Run Basic"
+ hClickButton( BasicRun )
- printlog "- Step Back"
- hClickToolbarButton( StepBack )
+ printlog "- Step Procedure"
+ hClickButton( ProcedureStep )
- printlog "- Breakpoint => activate"
- hClickToolbarButton( Breakpoint )
+ printlog "- Stop Basic"
+ hClickButton( BasicStop )
+ printlog "- Single Step"
+ hClickButton( SingleStep )
- printlog "- Breakpoint => deactivate"
- hClickToolbarButton( Breakpoint )
+ printlog "- Step Back"
+ hClickButton( StepBack )
- printlog "- Add Watch => deactivate"
- hClickToolbarButton( AddWatch )
+ printlog "- Breakpoint => activate"
+ hClickButton( Breakpoint )
- printlog "- Find Paranthese"
- kontext "macrobar"
- hClickToolbarButton( FindParanthese )
+ printlog "- Breakpoint => deactivate"
+ hClickButton( Breakpoint )
- try
- Controls.TearOff()
- warnlog "Controls are active in a module window => bug!"
- catch
- printlog( "Controls are not active->OK" )
- endcatch
- if ( WaitSlot <> WSFinished ) then
- warnlog( "Slot not finished within 1 second" )
- endif
+ printlog "- Add Watch => deactivate"
+ hClickButton( AddWatch )
- printlog( "- Insert Source Text (" & cSourceFile & ")" )
+ printlog "- Find Paranthese"
+ kontext "macrobar"
+ hClickButton( FindParanthese )
- InsertSourceText.Click()
- kontext "oeffnendlg"
- if ( OeffnenDlg.exists( 1 ) ) then
- Dateiname.SetText( cSourceFile )
- Oeffnen.click()
- else
- warnlog( "File Open dialog did not open" )
- endif
-
- ' possible 'could not read from file' error-message -> this is a bug
- kontext "Active"
- if ( Active.exists( 1 ) ) then
- warnlog( "Unexpected active: " & active.gettext() )
- active.ok()
- endif
+ try
+ Controls.TearOff()
+ warnlog "Controls are active in a module window => bug!"
+ catch
+ printlog( "Controls are not active->OK" )
+ endcatch
+ if ( WaitSlot <> WSFinished ) then
+ warnlog( "Slot not finished within 1 second" )
+ endif
- kontext "macrobar"
- printlog "- Save Source Test "
+ kontext "MacroBar"
+ printlog( "- Insert Source Text (" & cSourceFile & ")" )
+ if ( hClickButton( InsertSourceText ) <> RC_FAILURE ) then
+
+ kontext "oeffnendlg"
+ if ( OeffnenDlg.exists( DIALOG_DELAY ) ) then
+ Dateiname.SetText( cSourceFile )
+ Oeffnen.click()
+ WaitSlot( 5000 )
+ else
+ warnlog( "File Open dialog did not open" )
+ endif
+
+ ' possible 'could not read from file' error-message -> this is a bug
+ kontext "Active"
+ if ( Active.exists( DIALOG_DELAY ) ) then
+ warnlog( "Unexpected active: " & active.gettext() )
+ active.ok()
+ endif
+ else
+ warnlog( "<File Open> dialog is not open, <Insert Source Text> button failed" )
+ endif
- hClickToolbarButton( SaveSourceTest )
+ kontext "macrobar"
+ printlog "- Save Source Text "
+ if ( hClickButton( SaveSourceText ) <> RC_FAILURE ) then
+
+ kontext "speicherndlg"
+ if ( SpeichernDlg.exists( DIALOG_DELAY ) ) then
+ Dateiname.SetText( cTargetFile )
+ Speichern.click()
+ else
+ warnlog( "File Save dialog is missing" )
+ endif
+
+ kontext "active"
+ if ( Active.Exists( DIALOG_DELAY ) ) then
+ printlog( "Closing Messagebox with <Yes>")
+ Active.Yes()
+ endif
+ else
+ warnlog( "<File Save> dialog did not open, slot <SaveSourceText> did not work" )
+ endif
- kontext "speicherndlg"
- if ( SpeichernDlg.exists( 1 ) ) then
- Dateiname.SetText ConvertPath (gOfficepath + "user\work\global_test.bas")
- Speichern.click()
+ hFileCloseAll()
else
- warnlog( "File Save dialog is missing" )
- endif
-
- kontext "active"
- if ( Active.Exists( 1 ) ) then
- printlog( "Closing Messagebox with <Yes>")
- Active.Yes()
+ warnlog( "Unable to init BASIC IDE" )
endif
- hDestroyDocument() ' for Basic-IDE
- hDestroyDocument() ' the new writer-doc
-
endcase
'*******************************************************************************
testcase tBasic_IDE_Toolbar_Dialogs
- qaerrorlog( "Replace this test asap, the approach is unusable" )
+ printlog( "BASIC toolbar for Dialogs" )
+
+ const DIALOG_DELAY = 2
+
+ const TABBAR_MENU_NEW = 1
+ const TABBAR_MENU_NEW_DIALOG = 2
dim bIsOpen as boolean
dim brc as boolean
@@ -159,177 +172,140 @@ testcase tBasic_IDE_Toolbar_Dialogs
gApplication = "WRITER"
hCreateDocument()
- printlog "create a new module "
- brc = hOpenBasicOrganizerFromDoc()
- brc = hCreateModuleForDoc()
+ if ( hInitBasicIDE( "tBasic_IDE_Toolbar_Dialogs" ) ) then
- kontext "basicide"
- Tabbar.OpenContextMenu
- hMenuSelectNr ( 1 )
- hMenuSelectNr ( 2 )
- if ( DialogWindow.Exists ( 2 ) ) then
- printlog( "Dialog Editor window is open. Good." )
- else
- warnlog "No dialog window is shown!"
- end if
-
- try
- kontext "MacroBar"
- Compile.Click()
- warnlog( """Compile"" is enabled" )
- catch
- printlog( """Compile"" is disabled" )
- endcatch
-
- try
- kontext "MacroBar"
- BasicRun.Click()
- warnlog( """Run Basic"" is enabled" )
- catch
- printlog( """Run Basic"" is disabled" )
- endcatch
-
- printlog "- Step Procedure (disabled)"
- try
- kontext "MacroBar"
- ProcedureStep.Click()
- warnlog( """Step Procedure"" is enabled" )
- catch
- printlog( """Step Procedure"" is disabled" )
- endcatch
+ kontext "basicide"
+ Tabbar.OpenContextMenu
+ hMenuSelectNr ( TABBAR_MENU_NEW )
+ hMenuSelectNr ( TABBAR_MENU_NEW_DIALOG )
- try
- kontext "MacroBar"
- BasicStop.Click()
- warnlog( """Stop Basic"" is enabled" )
- catch
- printlog( """Stop Basic"" is disabled" )
- endcatch
-
- try
- kontext "MacroBar"
- SingleStep.Click()
- warnlog( """Single Step"" is enabled" )
- catch
- printlog( """Single Step"" is enabled" )
- endcatch
-
- try
- kontext "MacroBar"
- StepBack.Click()
- warnlog( """Single Step Back"" is enabled" )
- catch
- printlog( """Single Step Back"" is enabled" )
- endcatch
-
- try
- kontext "MacroBar"
- Breakpoint.Click()
- warnlog( """Breakpoint"" is enabled" )
- catch
- printlog( """Breakpoint"" is disabled" )
- endcatch
-
-
- try
- kontext "MacroBar"
- AddWatch.Click()
- warnlog( """Add Watch"" is enabled" )
- catch
- printlog( """Add Watch"" is disabled" )
- endcatch
+ if ( DialogWindow.Exists ( DIALOG_DELAY ) ) then
+ printlog( "Dialog Editor window is open. Good." )
+ else
+ warnlog "No dialog window is shown!"
+ end if
+ try
+ kontext "MacroBar"
+ Compile.Click()
+ warnlog( """Compile"" is enabled" )
+ catch
+ printlog( """Compile"" is disabled" )
+ endcatch
- try
- kontext "MacroBar"
- FindParanthese.Click()
- warnlog( """Find Paranthese"" is enabled" )
- catch
- printlog( """Find Paranthese"" is disabled" )
- endcatch
+ try
+ kontext "MacroBar"
+ BasicRun.Click()
+ warnlog( """Run Basic"" is enabled" )
+ catch
+ printlog( """Run Basic"" is disabled" )
+ endcatch
+ printlog "- Step Procedure (disabled)"
+ try
+ kontext "MacroBar"
+ ProcedureStep.Click()
+ warnlog( """Step Procedure"" is enabled" )
+ catch
+ printlog( """Step Procedure"" is disabled" )
+ endcatch
- try
- kontext "macrobar"
- InsertSourceText.Click()
- warnlog( """Insert Source Text"" is enabled" )
+ try
+ kontext "MacroBar"
+ BasicStop.Click()
+ warnlog( """Stop Basic"" is enabled" )
+ catch
+ printlog( """Stop Basic"" is disabled" )
+ endcatch
- kontext "oeffnendlg"
- if ( OeffnenDlg.exists( 2 ) ) then
- Dateiname.SetText( sBasFile1 )
- Oeffnen.Click()
- else
- warnlog( "File Open dialog missing" )
- endif
- catch
- printlog( """Insert Source Text"" is disabled" )
- endcatch
+ try
+ kontext "MacroBar"
+ SingleStep.Click()
+ warnlog( """Single Step"" is enabled" )
+ catch
+ printlog( """Single Step"" is enabled" )
+ endcatch
-
- printlog "- Save Source Test (disabled)"
+ try
+ kontext "MacroBar"
+ StepBack.Click()
+ warnlog( """Single Step Back"" is enabled" )
+ catch
+ printlog( """Single Step Back"" is enabled" )
+ endcatch
- try
- kontext "macrobar"
- SaveSourceTest.Click()
- warnlog( """Save Source Text"" is enabled" )
+ try
+ kontext "MacroBar"
+ Breakpoint.Click()
+ warnlog( """Breakpoint"" is enabled" )
+ catch
+ printlog( """Breakpoint"" is disabled" )
+ endcatch
- kontext "speicherndlg"
- if ( SpeichernDlg.exists( 2 ) ) then
- Dateiname.SetText( sBasFile2 )
- Speichern.Click()
- else
- warnlog( "File Save dialog is missing" )
- endif
- kontext "active"
- if ( Active.Exists( 1 ) ) then
- Active.Yes()
- endif
- catch
- printlog( """Save Source Text"" is disabled" )
- endcatch
+ try
+ kontext "MacroBar"
+ AddWatch.Click()
+ warnlog( """Add Watch"" is enabled" )
+ catch
+ printlog( """Add Watch"" is disabled" )
+ endcatch
-
- bIsOpen = hShowMacroControls()
- if ( bIsOpen ) then
- ToolsCollectionBar.Close()
- end if
- Call hDestroyDocument() ' for Basic-IDE
- Call hDestroyDocument() ' the new writer-doc
+ try
+ kontext "MacroBar"
+ FindParanthese.Click()
+ warnlog( """Find Paranthese"" is enabled" )
+ catch
+ printlog( """Find Paranthese"" is disabled" )
+ endcatch
-endcase
-'******************************************************************************'
+ try
+ kontext "macrobar"
+ InsertSourceText.Click()
+ warnlog( """Insert Source Text"" is enabled" )
+
+ kontext "oeffnendlg"
+ if ( OeffnenDlg.exists( DIALOG_DELAY ) ) then
+ Dateiname.SetText( sBasFile1 )
+ Oeffnen.Click()
+ else
+ warnlog( "File Open dialog missing" )
+ endif
+ catch
+ printlog( """Insert Source Text"" is disabled" )
+ endcatch
-function hClickToolbarButton( oButton as object ) as boolean
- const CFN = "hClickToolbarButton(): "
+ printlog "- Save Source Test (disabled)"
- dim iTry as integer
- dim brc as boolean : brc = false
-
- printlog( CFN & "Clicking button on toolbar: " & oButton.name() )
- for iTry = 1 to 5
-
try
- oButton.click()
- brc = true
- exit for
+ kontext "macrobar"
+ SaveSourceText.Click()
+ warnlog( """Save Source Text"" is enabled" )
+
+ kontext "speicherndlg"
+ if ( SpeichernDlg.exists( DIALOG_DELAY ) ) then
+ Dateiname.SetText( sBasFile2 )
+ Speichern.Click()
+ else
+ warnlog( "File Save dialog is missing" )
+ endif
+
+ kontext "active"
+ if ( Active.Exists( DIALOG_DELAY ) ) then
+ Active.Yes()
+ endif
catch
- printlog( CFN & "Retrying..." )
+ printlog( """Save Source Text"" is disabled" )
endcatch
-
- if ( iTry = 5 ) then
- exit for
- endif
-
- wait( 500 )
-
- next iTry
-
- if ( WaitSlot( 2000 ) <> WSFinished ) then
- warnlog( CFN & "Slot not finished within 1 second" )
+
+ hCloseBasicIDE()
+ hDestroyDocument()
+ else
+ warnlog( "Unable to open BASIC IDE" )
endif
-end function
+endcase
+
diff --git a/testautomation/framework/optional/includes/basic_issues.inc b/testautomation/framework/optional/includes/basic_issues.inc
index 0c38e743fb93..0c38e743fb93 100644..100755
--- a/testautomation/framework/optional/includes/basic_issues.inc
+++ b/testautomation/framework/optional/includes/basic_issues.inc
diff --git a/testautomation/framework/optional/includes/basic_library_export.inc b/testautomation/framework/optional/includes/basic_library_export.inc
index 18bb4af4441c..6f5acacbdb24 100644..100755
--- a/testautomation/framework/optional/includes/basic_library_export.inc
+++ b/testautomation/framework/optional/includes/basic_library_export.inc
@@ -38,7 +38,9 @@ testcase tBasicLibraryExport
' Assumption: All actions take place in the user/work directory
' macro taken from framework/tools/input/macros.txt::tBasicLibraryExport
- ' For constants (UPPERCASE) see .BAS-file
+ ' For test specific global constants (UPPERCASE) see .BAS-file
+
+ const LIBRARIES_TAB = 3
dim cDocumentName as string
dim cLibraryName as string
@@ -124,7 +126,7 @@ testcase tBasicLibraryExport
Verwalten.click()
printlog( "Go to the libraries-tab" )
- hSelectBasicObjectOrganizerTab( 3 )
+ hSelectBasicObjectOrganizerTab( LIBRARIES_TAB )
kontext "TabBibliotheken"
printlog( "Select the document at pos. " & DOCUMENT_POSITION )
diff --git a/testautomation/framework/optional/includes/basic_library_import.inc b/testautomation/framework/optional/includes/basic_library_import.inc
index ec4cc8fa3b53..9d5dae88ff40 100644..100755
--- a/testautomation/framework/optional/includes/basic_library_import.inc
+++ b/testautomation/framework/optional/includes/basic_library_import.inc
@@ -35,21 +35,29 @@ testcase tBasicLibraryImport
printlog( "Import a BASIC library" )
+ const MY_MACROS = 1
+ const LIBRARIES_TAB = 3
+ const STANDARD_LIBRARY = 1
+
+ const XLB_DIALOG_FILE = "dialog.xlb"
+
dim cMsg as string
dim iCurrentLib as integer
+ dim cPath as string : cPath = hGetWorkPath() & LIBRARY_NAME
+
ToolsMacro_uno
kontext "Makro"
- MakroAus.Select( 1 )
+ MakroAus.Select( MY_MACROS )
Verwalten.click()
- hSelectBasicObjectOrganizerTab( 3 )
+ hSelectBasicObjectOrganizerTab( LIBRARIES_TAB )
printlog( "Select My macros" )
kontext "TabBibliotheken"
- Bibliothek.select( 1 )
+ Bibliothek.select( STANDARD_LIBRARY )
printlog( "Click to add a library" )
Hinzufuegen.click()
@@ -62,20 +70,18 @@ testcase tBasicLibraryImport
OeffnenDlg.typeKeys( "<RETURN>" )
printlog( "Enter &quot;dialog.xlb&quot;" )
- DateiName.setText( "dialog.xlb" )
+ DateiName.setText( XLB_DIALOG_FILE )
- printlog( "Open dialog.xlb" )
+ printlog( "Open " & XLB_DIALOG_FILE )
Oeffnen.click()
kontext "active"
if ( active.exists( 1 ) ) then
if ( active.getRT() <> 373 ) then
- cMSG = Active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- warnlog( "Autocompletion failed: " & cMsg )
+ warnlog( "Autocompletion failed: " & Active.getText() )
Active.ok()
Kontext "OeffnenDlg"
- DateiName.setText( "dialog.xlb" )
+ DateiName.setText( XLB_DIALOG_FILE )
Oeffnen.click()
endif
endif
@@ -114,10 +120,10 @@ testcase tBasicLibraryImport
hDestroyDocument()
- hDeleteFile( hGetWorkPath() & LIBRARY_NAME & gPathSigne & "dialog.xlb" )
- hDeleteFile( hGetWorkPath() & LIBRARY_NAME & gPathSigne & "Module1.xba" )
- hDeleteFile( hGetWorkPath() & LIBRARY_NAME & gPathSigne & "script.xlb" )
- rmdir( hGetWorkPath() & LIBRARY_NAME ) : printlog( "Remove directory" )
+ hDeleteFile( cPath & GetPathSeparator & XLB_DIALOG_FILE )
+ hDeleteFile( cPath & GetPathSeparator & "Module1.xba" )
+ hDeleteFile( cPath & GetPathSeparator & "script.xlb" )
+ rmdir( cPath ) : printlog( "Remove directory" )
endcase
diff --git a/testautomation/framework/optional/includes/basic_macros.inc b/testautomation/framework/optional/includes/basic_macros.inc
index 0d5e2a451d60..4717b66a9ad0 100644..100755
--- a/testautomation/framework/optional/includes/basic_macros.inc
+++ b/testautomation/framework/optional/includes/basic_macros.inc
@@ -34,51 +34,42 @@
testcase tMakro_In_All_Apps
-
- dim brc as boolean
- dim cApp as string
+ printlog( "Attach a macro to all application types" )
+
dim iApp as Integer
- dim bBug as Boolean
- dim cMsg as string
- bBug = FALSE
const CMACRO = "AppMakro"
-
+ const DIALOG_TIMEOUT = 2
for iApp = 1 to 7
- cApp = hNumericDoctype( iApp )
- printlog( cApp )
+ printlog( hNumericDoctype( iApp ) )
printlog( "Open a new document" )
- brc = hCreateDocument()
+ hCreateDocument()
- brc = hInitBasicIde( CMACRO )
- if ( not brc ) then
+ if ( hInitBasicIde( CMACRO ) ) then
+ printlog "Close the BASIC-IDE"
+ hCloseBasicIde()
+
+ printlog( "Close the navigator (Master-doc)" )
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
+
+ printlog( "Close the document" )
+ hUseAsyncSlot( "FileClose" )
+
+ printlog( "Close the messagebox (document changed)" )
+ kontext "messagebox"
+ if ( MessageBox.Exists( DIALOG_TIMEOUT ) ) then
+ printlog( "MessageBox: " & MessageBox.getText() )
+ hCloseDialog( Messagebox, "no" )
+ else
+ warnlog( "No warning for changed document" )
+ end if
+ else
warnlog( "Could not open the BASIC Macro Organizer, aborting" )
- call hDestroyDocument()
- goto endsub
endif
-
- printlog "Close the BASIC-IDE"
- brc = hCloseBasicIde()
-
- printlog( "Close the navigator (Master-doc)" )
- brc = hCloseNavigator()
-
- printlog( "Close the document" )
- FileClose
-
- printlog( "Close the messagebox (document changed)" )
- kontext "messagebox"
- if ( MessageBox.Exists( 1 ) ) then
- cMsg = MessageBox.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- printlog( "MessageBox: " & cMsg )
- MessageBox.No()
- else
- warnlog( "No warning for changed document" )
- end if
next iApp
@@ -88,32 +79,30 @@ endcase
testcase tMakro_Dialog
- if ( gBuild < 9305 ) then
- warnlog( "#i87457# - Application macros assigned to userlayer" )
- goto endsub
- endif
+ printlog( "Update test for the BASIC organizer - libraries, modules and dialogs" )
+
+ const CFN = "tMakro_Dialog::"
+ const CMACRO = "MacroDlg"
+ const RC_TIMEOUT = -1
+ const DIALOG_TIMEOUT = 2
+ const TAB_MODULES = 1
+ const TAB_DIALOGS = 2
+ const TAB_LIBRARIES = 3
+ const REFERENCE_LIBRARY = "AppLibrary1"
-
- dim brc as boolean
- dim cMsg as string
-
- dim iPos as integer
dim iLibraryItemCount as integer
-
dim iCurrentLibrary as Integer
dim XLBFILE as String
XLBFILE = gTesttoolPath & "framework\optional\input\AppLibrary1\script.xlb"
- const CFN = "tMakro_Dialog::"
- const CMACRO = "MacroDlg"
-
+ XLBFILE = convertpath( XLBFILE )
gApplication = "WRITER"
+
printlog( "Open a new document" )
- brc = hCreateDocument()
+ hCreateDocument()
printlog( "Create a new library, a new module, open Basic-Ide" )
- brc = hInitBasicIde( CMACRO )
- if ( not brc ) then
+ if ( not hInitBasicIde( CMACRO ) ) then
warnlog( CFN & "Could not open BASIC-IDE, aborting" )
goto endsub
endif
@@ -123,284 +112,270 @@ testcase tMakro_Dialog
hCloseBasicIde()
printlog( "Open the Basic Macro Organizer" )
- brc = hOpenBasicOrganizerFromDoc()
+ ToolsMacro_uno
- printlog( "Select the last Module for the current document" )
- iPos = hSelectTheLastNode( MakroAus )
-
- printlog( "Click Organize..." )
- Verwalten.Click()
-
- printlog( "Select Modules-tab" )
- brc = hSelectBasicObjectOrganizerTab( 1 )
+ kontext "Makro"
+ if ( Makro.exists( DIALOG_TIMEOUT ) ) then
-
- printlog( "Press 'new module'" )
- kontext "tabmodule"
- NeuesModul.Click()
+ printlog( "Select the last Module for the current document" )
+ hSelectTheLastNode( MakroAus )
- kontext "neuesmodul"
- printlog( "Cancel the dialog" )
- NeuesModul.Cancel()
+ printlog( "Click Organize..." )
+ Verwalten.Click()
- brc = hSelectBasicObjectOrganizerTab( 2 )
+ printlog( "Select Modules-tab" )
+ hSelectBasicObjectOrganizerTab( TAB_MODULES )
- kontext "tabdialogs"
- printlog( "Press 'new dialog'" )
- NewDialog.Click()
-
- printlog( "Cancel the dialog" )
- kontext "neuerdialog"
- NeuerDialog.Cancel()
+ printlog( "Press 'new module'" )
+ kontext "tabmodule"
+ NeuesModul.Click()
- kontext
- printlog( "Select the libraries Tab" )
- brc = hSelectBasicObjectOrganizerTab( 3 )
+ kontext "neuesmodul"
+ printlog( "Cancel the dialog" )
+ NeuesModul.Cancel()
-
- printlog( "Press 'New' on the libraries tab" )
- kontext "tabbibliotheken"
- Neu.Click()
-
- kontext "neuebibliothek"
- printlog( "Close the dialog with 'OK'" )
- Call DialogTest( NeueBibliothek )
- NeueBibliothek.OK()
-
- printlog( "Delete 'Library1'" )
- kontext "tabbibliotheken"
- Loeschen.Click()
-
- printlog( "Close the warning" )
- kontext "active"
- if ( Active.Exists() ) then
- cMsg = active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- printlog( "MessageBox: " & cMsg )
- Active.Yes()
- else
- warnlog( "Deletion warning is missing" )
- endif
-
- printlog( "Check the number of libraries in list" )
- kontext "tabbibliotheken"
- iLibraryItemCount = Bibliotheksliste.getItemCount()
- if ( iLibraryItemCount <> 1 ) then
- if ( iLibraryItemCount = 11 ) then
- warnlog( "#i87457# Macros moved from 'OpenOffice.org Macros' to 'My Macros'" )
- else
- warnlog( "Incorrect item count. Should be 1, is: " & iLibraryItemCount )
+ hSelectBasicObjectOrganizerTab( TAB_DIALOGS )
+
+ kontext "tabdialogs"
+ printlog( "Press 'new dialog'" )
+ NewDialog.Click()
+
+ printlog( "Cancel the dialog" )
+ kontext "neuerdialog"
+ NeuerDialog.Cancel()
+
+ kontext
+ printlog( "Select the libraries Tab" )
+ hSelectBasicObjectOrganizerTab( TAB_LIBRARIES )
+
+
+ printlog( "Press 'New' on the libraries tab" )
+ kontext "tabbibliotheken"
+ Neu.Click()
+
+ kontext "neuebibliothek"
+ if ( NeueBibliothek.exists( DIALOG_TIMEOUT ) ) then
+ printlog( "Close the dialog with 'OK'" )
+ Call DialogTest( NeueBibliothek )
+ hCloseDialog( NeueBibliothek, "ok" )
endif
- endif
- printlog( "Append a xlb-file" )
- kontext "tabbibliotheken"
- Hinzufuegen.Click()
+ printlog( "Delete 'Library1'" )
+ kontext "tabbibliotheken"
+ Loeschen.Click()
- printlog( "Select 'AppLibrary1/script.xlb' from the files list"
- kontext "oeffnendlg"
- Dateiname.SetText( ConvertPath ( XLBFILE ) )
- Oeffnen.Click()
-
- ' If the .xlb file cannot be found the test cannot continue. Warn and cleanup.
- kontext "Active"
- if ( Active.exists( 1 ) ) then
-
- try
- Active.getButtonCount()
-
- warnlog( "Script does not exist warning displayed. Aborting test" )
- printlog( Active.getText() )
- active.ok()
-
- kontext "OeffnenDlg"
- if ( OeffnenDlg.exists( 1 ) ) then
- printlog( "Closing File Open dialog" )
- OeffnenDlg.cancel()
- endif
-
- kontext "tabbibliotheken"
- if ( TabBibliotheken.exists( 1 ) ) then
- printlog( "Closing Libaries tab" )
- TabBibliotheken.close()
+ printlog( "Close the warning" )
+ kontext "active"
+ if ( Active.Exists( DIALOG_TIMEOUT ) ) then
+ printlog( "MessageBox: " & active.getText() )
+ Active.Yes()
+ else
+ warnlog( "Deletion warning is missing" )
+ endif
+
+ printlog( "Check the number of libraries in list" )
+ kontext "tabbibliotheken"
+ iLibraryItemCount = Bibliotheksliste.getItemCount()
+ if ( iLibraryItemCount <> 1 ) then
+ if ( iLibraryItemCount = 11 ) then
+ warnlog( "#i87457# Macros moved from 'OpenOffice.org Macros' to 'My Macros'" )
+ else
+ warnlog( "Incorrect item count. Should be 1, is: " & iLibraryItemCount )
endif
-
- kontext "Makro"
- if ( Makro.exists( 1 ) ) then
- printlog( "Closing Macro organizer" )
- Makro.close()
+ endif
+
+ printlog( "Append a xlb-file" )
+ kontext "tabbibliotheken"
+ Hinzufuegen.Click()
+
+ printlog( "Select 'AppLibrary1/script.xlb' from the files list"
+ kontext "oeffnendlg"
+ Dateiname.SetText( XLBFILE )
+ Oeffnen.Click()
+
+ kontext "AppendLibraries"
+ if ( AppendLibraries.exists( DIALOG_TIMEOUT ) ) then
+ printlog( "<Append libraries> dialog is open, good" )
+ else
+
+ ' If the .xlb file cannot be found the test cannot continue. Warn and cleanup.
+ kontext "Active"
+ if ( Active.exists() ) then
+
+ warnlog( "Unexpected messagebox, the script appears to be missing" )
+ printlog( Active.getText() )
+
+ kontext "Active"
+ hCloseDialog( Active, "ok" )
+
+ kontext "OeffnenDlg"
+ hCloseDialog( OeffnenDlg, "cancel,optional" )
+
+ kontext "TabBibliotheken"
+ hCloseDialog( TabBibliotheken, "close,optional" )
+
+ kontext "Makro"
+ hCloseDialog( Makro, "close,optional" )
+
+ printlog( "Exiting test" )
+ goto endsub
+
endif
-
- printlog( "Exiting test" )
- goto endsub
- catch
- printlog( "Script found and loaded. Good." )
- endcatch
-
- endif
+ endif
- printlog( "Ensure 'Insert as Reference' is unchecked" )
- kontext "appendlibraries"
- InsertAsReference.UnCheck()
-
- printlog( "Check 'Replace existing library'" )
- ReplaceExistingLibraries.Check()
-
- printlog( "Press 'OK' to append the library" )
- kontext "appendlibraries"
- try
- AppendLibraries.OK()
- catch
- warnlog( "#i85254# Appending libraries leads to crash" )
- endcatch
-
- printlog( "Check the number of libraries in list (should be two)" )
- kontext "tabbibliotheken"
- iLibraryItemCount = Bibliotheksliste.getItemCount()
- if ( iLibraryItemCount <> 2 ) then
- qaerrorlog( "#i87457# Two entries in list expected, found " & iLibraryItemCount )
- endif
+ printlog( "Ensure 'Insert as Reference' is unchecked" )
+ kontext "appendlibraries"
+ InsertAsReference.UnCheck()
+
+ printlog( "Check 'Replace existing library'" )
+ ReplaceExistingLibraries.Check()
- printlog( "Select the first item" )
- Bibliotheksliste.TypeKeys( "<HOME>" )
- for iCurrentLibrary = 1 to iLibraryItemCount
- if ( Bibliotheksliste.getSelText() = "AppLibrary1" ) then
- printlog( "Found AppLibrary1" )
- exit for
+ printlog( "Press 'OK' to append the library" )
+ kontext "appendlibraries"
+ if ( hClickButton( AppendLibraries ) = RC_TIMEOUT ) then
+ warnlog( "#i85254# Appending libraries failed" )
endif
- printlog( "This was not AppLibrary1, trying again" )
- Bibliotheksliste.Typekeys( "<DOWN>" )
- next iCurrentLibrary
-
- printlog( "Set a password for AppLibrary1" )
- kontext "tabbibliotheken"
- if ( Passwort.IsEnabled() ) then
- Passwort.Click()
- kontext "passwddlg"
- PasswdDLG.Cancel()
- else
- warnlog( "Password is disabled for 'AppLibrary1'" )
- endif
- printlog( "Delete 'AppLibrary1'" )
- kontext "tabbibliotheken"
- Loeschen.Click()
-
- printlog( "Close the warning with YES" )
- kontext "active"
- if ( Active.Exists() ) then
- cMsg = active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- printlog( "MessageBox: " & cMsg )
- Active.Yes()
- else
- warnlog( "Expected confirmation dialog for delete" )
- endif
-
- kontext "tabbibliotheken"
- printlog( "Press 'edit' on 'Libraries'-tab" )
- Bearbeiten.Click()
+ printlog( "Check the number of libraries in list (should be two)" )
+ kontext "tabbibliotheken"
+ iLibraryItemCount = Bibliotheksliste.getItemCount()
+ if ( iLibraryItemCount <> 2 ) then
+ qaerrorlog( "#i87457# Two entries in list expected, found " & iLibraryItemCount )
+ endif
- kontext "BasicIDE"
- if ( BasicIDE.Exists( 5 ) ) then
-
- hInsertMacro( 3 )
-
- printlog( "Close the basic-document" )
- brc = hCloseBasicIde()
+ printlog( "Select the first item" )
+ Bibliotheksliste.TypeKeys( "<HOME>" )
+ for iCurrentLibrary = 1 to iLibraryItemCount
+ if ( Bibliotheksliste.getSelText() = REFERENCE_LIBRARY ) then
+ printlog( "Found " & REFERENCE_LIBRARY )
+ exit for
+ endif
+ printlog( "This was not " & REFERENCE_LIBRARY & ", trying again" )
+ Bibliotheksliste.Typekeys( "<DOWN>" )
+ next iCurrentLibrary
+
+ printlog( "Set a password for " & REFERENCE_LIBRARY )
+ kontext "tabbibliotheken"
+ if ( Passwort.IsEnabled() ) then
+ Passwort.Click()
+ kontext "passwddlg"
+ PasswdDLG.Cancel()
+ else
+ warnlog( "Password is disabled for " & REFERENCE_LIBRARY )
+ endif
+ printlog( "Delete " & REFERENCE_LIBRARY )
+ kontext "tabbibliotheken"
+ Loeschen.Click()
+
+ printlog( "Close the warning with YES" )
kontext "active"
- if ( Active.Exists ( 2 ) ) then
- cMsg = active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- warnlog( "Unexpected MessageBox: " & cMsg )
- Active.NO()
+ if ( Active.Exists() ) then
+ printlog( "MessageBox: " & active.getText() )
+ Active.Yes()
+ else
+ warnlog( "Expected confirmation dialog for delete" )
endif
- else
- warnlog("#i38978# The Macro-Document is not open, aborting test")
- call hDestroyDocument()
- goto endsub
- endif
+ kontext "tabbibliotheken"
+ printlog( "Press 'edit' on 'Libraries'-tab" )
+ Bearbeiten.Click()
- printlog( "Open the BASIC Macro Organizer" )
- brc = hOpenBasicOrganizerFromDoc()
-
- printlog( "Select the last macro from the list" )
- kontext "makro"
- iPos = hSelectTheLastNode( MakroAus )
-
- try
- printlog( "Assign the macro, Tools/customize dialog should open" )
- Zuordnen.Click ()
- catch
- warnlog( "#i106853# Assign-Button is disabled or macro is missing" )
- endcatch
-
- printlog( "Activate all tapages and cancel the Tools/Customize dialog" )
-
- brc = hToolsCustomizeSelectTab( "menu" )
- brc = hToolsCustomizeSelectTab( "keyboard"
- if ( not brc ) then
- qaerrorlog( "#i61765# Keyboard tab missing when called via Tools/Macros->Assign" )
- endif
- brc = hToolsCustomizeSelectTab( "events" )
- brc = hToolsCustomizeSelectTab( "toolbars" )
+ kontext "BasicIDE"
+ if ( BasicIDE.Exists( DIALOG_TIMEOUT ) ) then
- printlog( "Cancel Tools/Customize dialog -> Macro Organizer should be open" )
- brc = hToolsCustomizeClose( 2 )
-
-
- printlog "Click to run macro"
- kontext "makro"
- try
- Ausfuehren.Click()
- catch
- warnlog( "Unable to run macro" )
+ hInsertMacro( 3 )
+
+ printlog( "Close the basic-document" )
+ hCloseBasicIde()
+
+ kontext "active"
+ if ( Active.Exists ( DIALOG_TIMEOUT ) ) then
+ warnlog( "Unexpected MessageBox: " & active.getText() )
+ Active.NO()
+ endif
+
+ else
+ warnlog("#i38978# The Macro-Document is not open, aborting test")
+ call hDestroyDocument()
+ goto endsub
+ endif
+
+ printlog( "Open the BASIC Macro Organizer" )
+ ToolsMacro_uno
+
+ printlog( "Select the last macro from the list" )
+ kontext "makro"
+ if ( Makro.exists( DIALOG_TIMEOUT ) ) then
+ hSelectTheLastNode( MakroAus )
+
+ printlog( "Assign the macro, Tools/customize dialog should open" )
+ if ( hClickButton( Zuordnen ) = RC_TIMEOUT ) then
+ warnlog( "#i106853# Assign-Button is disabled or macro is missing" )
+ endif
+
+ printlog( "Activate all tapages and cancel the Tools/Customize dialog" )
+ if ( not hToolsCustomizeSelectTab( "keyboard" ) ) then
+ qaerrorlog( "#i61765# Keyboard tab missing when called via Tools/Macros->Assign" )
+ endif
+ hToolsCustomizeSelectTab( "events" )
+ hToolsCustomizeSelectTab( "toolbars" )
+
+ printlog( "Cancel Tools/Customize dialog -> Macro Organizer should be open" )
+ kontext "TabCustomizeToolbars"
+ hCloseDialog( TabCustomizeToolbars, "cancel" )
+
+
+ printlog "Click to run macro"
+ kontext "makro"
+ if ( hClickButton( Ausfuehren ) = RC_TIMEOUT ) then
+ warnlog( "Unable to run macro, button is not enabled" )
+ kontext "Makro"
+ hCloseDialog( Makro, "close" )
+ endif
+
+ kontext "active"
+ if ( active.exists() ) then
+ if ( active.getText() = "TTMacro3" ) then
+ printlog( "The correct macro has been executed" )
+ else
+ warnlog( "Unknown Messagebox: " & active.getText() )
+ endif
+ Active.OK()
+ endif
+ else
+ warnlog( "Macro Organizer did not open" )
+ endif
+
+ printlog( "Open macro organizer from the current document" )
+ ToolsMacro_uno : WaitSlot()
+
+ printlog( "Select the last item in the treelist" )
kontext "Makro"
- Makro.close()
- endcatch
-
- kontext "active"
- if ( active.exists() ) then
- cMsg = active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- if ( cMsg = "TTMacro3" ) then
- printlog( "The correct macro has been executed" )
+ hSelectTheLastNode( MakroAus )
+
+ printlog( "Delete the new module" )
+ Loeschen.Click()
+
+ printlog( "Close the deletion warning" )
+ kontext "active"
+ if ( active.exists() ) then
+ printlog( "MessageBox: " & active.getText() )
+ Active.Yes()
else
- warnlog( "Unknown Messagebox: " & cMsg )
+ warnlog( "No confirmation dialog for delete" )
endif
- Active.OK()
- endif
-
- printlog( "Open macro organizer from the current document" )
- brc = hOpenBasicOrganizerFromDoc()
-
- printlog( "Select the last item in the treelist" )
- brc = hSelectTheLastNode( MakroAus )
- printlog( "Delete the new module" )
- Loeschen.Click()
-
- printlog( "Close the deletion warning" )
- kontext "active"
- if ( active.exists() ) then
- cMsg = active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- printlog( "MessageBox: " & cMsg )
- Active.Yes()
+ printlog( "Close the macro organizer" )
+ kontext "makro"
+ Makro.Close()
else
- warnlog( "No confirmation dialog for delete" )
+ warnlog( "Makro Organizer did not open" )
endif
- printlog( "Close the macro organizer" )
- kontext "makro"
- Makro.Close()
-
printlog( "Close the document" )
Call hDestroyDocument()
-
endcase
diff --git a/testautomation/framework/optional/includes/basic_modulehide.inc b/testautomation/framework/optional/includes/basic_modulehide.inc
index 130915ffec46..2a86f71d4163 100644..100755
--- a/testautomation/framework/optional/includes/basic_modulehide.inc
+++ b/testautomation/framework/optional/includes/basic_modulehide.inc
@@ -35,6 +35,12 @@ testcase tBasicIdeModuleHide
const CFN = "tBasicIdeModuleHide::"
+ const RAISE_MESSAGEBOX = 1
+
+ const RC_SUCCESS = 0
+ const RC_TIMEOUT = -1
+
+ const TAB_MODULES = 1
dim rc as integer
dim brc as boolean
@@ -43,60 +49,47 @@ testcase tBasicIdeModuleHide
gApplication = "WRITER"
call hNewDocument()
- brc = hOpenBasicOrganizerFromDoc()
- brc = hCreateModuleForDoc()
+ ToolsMacro_uno
+ hCreateModuleForDoc()
- brc = hInsertMacro( 1 )
- if ( brc ) then
+ if ( hInsertMacro( RAISE_MESSAGEBOX ) ) then
printlog( CFN & "Macro has been written successfully" )
else
warnlog( CFN & "Failed to insert macro" )
endif
- rc = hHideModule()
- if ( rc > 0 ) then
+
+ if ( hHideModule() <> RC_SUCCESS ) then
warnlog( "Some unexpected error occurred while trying to hide the module" )
endif
- try
- ' hTestMacro is expected to fail, so we jump to the catch statement
- rc = hTestMacro( 1 )
- if ( rc = 0 ) then
- warnlog( "For some reason the original module is still visible" )
- else
- warnlog( "There should not be any editingwindow visible" )
- endif
- catch
- printlog( " * unable to locate editwindow -> no module visible." )
- endcatch
+ ' hTestMacro is expected to fail, so we jump to the catch statement
+ if ( hTestMacro( RAISE_MESSAGEBOX ) = RC_SUCCESS ) then
+ warnlog( "For some reason the original module is still visible" )
+ else
+ warnlog( "There should not be any editingwindow visible" )
+ endif
- if ( hOpenBasicObjectOrganizer( 1 ) ) then
+ if ( hOpenBasicObjectOrganizer( TAB_MODULES ) ) then
modulliste.typekeys( "<END><RIGHT><DOWN><RIGHT><DOWN>" )
- try
- bearbeiten.click()
- catch
+ if ( hClickButton( Bearbeiten ) = RC_TIMEOUT ) then
warnlog( "#i35097# Crash when editing last module" )
- endcatch
+ goto endsub
+ endif
-
- rc = hTestMacro( 1 )
- if ( rc = 1 ) then
+ if ( hTestMacro( RAISE_MESSAGEBOX ) = RAISE_MESSAGEBOX ) then
printlog( " * the correct macro-module is open. Good." )
else
warnlog( "The open macro-module is not the one that was expected" )
endif
hCloseBasicIDE()
-
- call hCloseDocument()
+ hCloseDocument()
else
-
warnlog( "restarting the office to recover from errors" )
call exitRestartTheOffice()
-
endif
-
endcase
diff --git a/testautomation/framework/optional/includes/basic_modulenames.inc b/testautomation/framework/optional/includes/basic_modulenames.inc
index 28c260642482..5d41641735bd 100644..100755
--- a/testautomation/framework/optional/includes/basic_modulenames.inc
+++ b/testautomation/framework/optional/includes/basic_modulenames.inc
@@ -33,7 +33,6 @@
testcase tBasicIdeModuleNames
-
dim rc as integer
dim brc as boolean
dim i as integer
@@ -102,169 +101,89 @@ endcase
testcase tInvalidModuleNames
+ printlog( "Try to give BASIC modules invalid names (which should fail)" )
- dim brc as boolean
- dim cMsg as string
dim iCurrentName as Integer
-
dim sSeparator as String
dim cModuleName as string
- hBasicModuleCreateNew()
-
-
Randomize
iCurrentName = Int( 24 * RND ) + 1 ' Range from 1 to 24
-
cModuleName = hCreateInvalidModuleName( iCurrentName )
- printlog( "" )
printlog( "Trying module name: " & cModuleName )
- brc = hNameBasicModule( cModuleName )
-
- if ( brc ) then
+ if ( hCreateModuleForDoc( cModuleName ) ) then
warnlog( "Basic-Ide should not open for invalid module names" )
' try to recover and continue for other names
- brc = hCloseBasicIde()
- brc = hDestroyDocument
- brc = hBasicModuleCreateNew()
-
- ' if we cannot recover, exit the test
- if ( not brc ) then
- goto endsub
+ hCloseBasicIde()
+ hDestroyDocument
+ else
+ kontext "Active"
+ if ( Active.exists( 2 ) ) then
+ if( Active.getButtonCount() = 1 ) then
+ printlog( "Invalid module name warning displayed, good." )
+ printlog( Active.getText() )
+ hCloseDialog( Active, "ok" )
+
+ kontext "NeuesModul"
+ if ( NeuesModul.exists( 2 ) ) then
+ hCloseDialog( NeuesModul, "cancel" )
+ else
+ warnlog( "<NeuesModul> dialog should show after failed naming attempt" )
+ endif
+ else
+ warnlog( "Unexpected messagebox" )
+ printlog( Active.getText() )
+ hCloseDialog( Active, "close" )
+ endif
+ else
+ warnlog( "<Invalid name> Messagebox missing" )
endif
endif
+ kontext "Makro"
+ hCloseDialog( Makro, "close" )
+ hDestroyDocument()
- printlog( "Close the naming dialog (cancel)" )
- kontext "neuesmodul"
- if ( NeuesModul.Exists() ) then
- NeuesModul.Cancel()
- endif
-
- printlog( "Clsoe macro dialog (if it exists)" )
- kontext "makro"
- if ( Makro.Exists() ) then
- Makro.Close()
- endif
-
- printlog( "Close the document" )
- brc = hDestroyDocument()
-
endcase
'*******************************************************************************
testcase tValidModuleNames
+ printlog( "Try using BASIC reserved names (and others) as module names (which should work)" )
- dim brc as boolean
- dim cMsg as string
dim iCurrentName as Integer
-
- dim sKeyword as String
-
- hBasicModuleCreateNew()
+ dim sModuleName as String
Randomize
iCurrentName = Int( 8 * RND ) + 1 ' Range from 1 to 8
select case iCurrentName
- case 1 : sKeyword = "option"
- case 2 : sKeyword = "sub"
- case 3 : sKeyword = "function"
- case 4 : sKeyword = "end"
- case 5 : sKeyword = "exit"
- case 6 : sKeyword = "_underscore1"
- case 7 : sKeyword = "underscore_2"
- case 8 : sKeyWord = "ThisIsQuiteALongNameForAModuleDontYouThink"
+ case 1 : sModuleName = "option"
+ case 2 : sModuleName = "sub"
+ case 3 : sModuleName = "function"
+ case 4 : sModuleName = "end"
+ case 5 : sModuleName = "exit"
+ case 6 : sModuleName = "_underscore1"
+ case 7 : sModuleName = "underscore_2"
+ case 8 : sModuleName = "ThisIsQuiteALongNameForAModuleDontYouThink"
end select
- printlog( "" )
- printlog( "Trying module name: " & sKeyword )
-
- brc = hNameBasicModule( sKeyword )
-
- if ( brc ) then
-
- ' try to recover and continue for other names
- brc = hCloseBasicIde()
- brc = hDestroyDocument
- brc = hBasicModuleCreateNew()
-
- ' if we cannot recover, exit the test
- if ( not brc ) then
- goto endsub
- endif
- endif
-
- printlog( "Close the naming dialog (cancel)" )
- kontext "neuesmodul"
- if ( NeuesModul.Exists() ) then
- NeuesModul.Cancel()
- endif
-
- printlog( "Clsoe macro dialog (if it exists)" )
- kontext "makro"
- if ( Makro.Exists() ) then
- Makro.Close()
+ if ( hCreateModuleForDoc( sModuleName ) ) then
+ printlog( "The module name was accepted: " & sModuleName )
+ hCloseBasicIDE()
+ hDestroyDocument()
+ else
+ warnlog( "The module name was not accepted: " & sModuleName )
+ goto endsub
endif
- printlog( "Close the document" )
- brc = hDestroyDocument()
-
endcase
'*******************************************************************************
-function hBasicModuleCreateNew() as boolean
-
-
- dim brc as boolean
- brc = false
-
- dim iPos as integer
-
- const CFN = "hBasicModuleCreateNew::"
-
- gApplication = "WRITER"
- brc = hCreateDocument()
-
- brc = hOpenBasicOrganizerFromDoc()
- if ( not brc ) then
- warnlog( CFN & "Could not open the BASIC Macro Organizer, aborting" )
- hDestroyDocument()
- endif
-
- if ( brc ) then
- iPos = hSelectTheLastNode( MakroAus )
- if ( not Neu.isEnabled() ) then
- warnlog( CFN & "New button is disabled for the current module, aborting" )
- kontext "Makro"
- Makro.cancel()
- brc = hDestroyDocument()
- endif
- endif
-
- if ( brc ) then
-
- printlog( "Click 'New'" )
- Neu.Click()
-
- kontext "NeuesModul"
- if ( Neuesmodul.exists() ) then
- brc = true
- printlog( CFN & "Naming dialog is open"
- endif
- endif
-
- hBasicModuleCreateNew() = brc
-
-end function
-
-'*******************************************************************************
-
function hHandleInvalidNameWarning( cTabName as string ) as boolean
@@ -284,13 +203,13 @@ function hHandleInvalidNameWarning( cTabName as string ) as boolean
printlog( CFN & "Message: " & active.getText() )
- active.ok()
+ active.ok()
brc = true
else
- if ( not brc ) then
- warnlog( CFN & "Invalid name warning missing" )
+ if ( not brc ) then
+ warnlog( CFN & "Invalid name warning missing" )
endif
endif
diff --git a/testautomation/framework/optional/includes/basic_modules.inc b/testautomation/framework/optional/includes/basic_modules.inc
index 203ebf7bc219..203ebf7bc219 100644..100755
--- a/testautomation/framework/optional/includes/basic_modules.inc
+++ b/testautomation/framework/optional/includes/basic_modules.inc
diff --git a/testautomation/framework/optional/includes/basic_package_export.inc b/testautomation/framework/optional/includes/basic_package_export.inc
index a8a2ae00459d..28e214102dbb 100644..100755
--- a/testautomation/framework/optional/includes/basic_package_export.inc
+++ b/testautomation/framework/optional/includes/basic_package_export.inc
@@ -40,6 +40,10 @@ testcase tBasicPackageExport
const LIBRARY_NAME = "tBasicExport"
const DOCUMENT_POSITION = 4
const PACKAGE_SIZE = 1325
+
+ const LIBRARIES_TAB = 3
+ const LONG_WAIT = 3
+ const SHORT_WAIT = 1
dim cDocumentName as string
dim cLibraryName as string
@@ -69,7 +73,7 @@ testcase tBasicPackageExport
printlog( "Select the second document" )
kontext "Makro"
- if ( Makro.exists( 1 ) ) then
+ if ( Makro.exists( SHORT_WAIT ) ) then
iNodeCount = hGetNodeCount( MakroAus )
cDocumentName = hSelectNode( MakroAus, iNodeCount )
@@ -77,7 +81,7 @@ testcase tBasicPackageExport
Verwalten.click()
printlog( "Go to the libraries tabpage" )
- hSelectBasicObjectOrganizerTab( 3 )
+ hSelectBasicObjectOrganizerTab( LIBRARIES_TAB )
kontext "TabBibliotheken"
printlog( "Select the document at pos. " & DOCUMENT_POSITION )
@@ -93,7 +97,7 @@ testcase tBasicPackageExport
Neu.click()
kontext "NeueBibliothek"
- if ( NeueBibliothek.exists( 1 ) ) then
+ if ( NeueBibliothek.exists( SHORT_WAIT ) ) then
printlog( "Name the new library: " & LIBRARY_NAME )
BibliotheksName.setText( LIBRARY_NAME )
NeueBibliothek.ok()
@@ -128,7 +132,7 @@ testcase tBasicPackageExport
printlog( "Select the work document" )
kontext "Makro"
- if ( Makro.exists( 1 ) ) then
+ if ( Makro.exists( SHORT_WAIT ) ) then
iNodeCount = hGetNodeCount( MakroAus )
hSelectNode( MakroAus, iNodeCount )
@@ -136,10 +140,10 @@ testcase tBasicPackageExport
Verwalten.click()
printlog( "Libraries tab" )
- hSelectBasicObjectOrganizerTab( 3 )
+ hSelectBasicObjectOrganizerTab( LIBRARIES_TAB )
kontext "TabBibliotheken"
- if ( TabBibliotheken.exists( 1 ) and TabBibliotheken.isVisible() ) then
+ if ( TabBibliotheken.exists( SHORT_WAIT ) and TabBibliotheken.isVisible() ) then
Bibliothek.select( DOCUMENT_POSITION )
printlog( "Select the new library" )
@@ -156,17 +160,17 @@ testcase tBasicPackageExport
Export.click()
kontext "ExportBasicLibraryDlg"
- if ( ExportBasicLibraryDlg.exists( 3 ) ) then
+ if ( ExportBasicLibraryDlg.exists( LONG_WAIT ) ) then
printlog( "Select to export as extension" )
ExportAsPackage.check()
- ExportBasicLibraryDlg.ok()
+ hCloseDialog( ExportBasicLibraryDlg, "ok" )
kontext "SpeichernDlg"
- if ( SpeichernDlg.exists( 3 ) ) then
+ if ( SpeichernDlg.exists( LONG_WAIT ) ) then
printlog( "Save the file, suffix will be added automatically." )
DateiName.setText( hGetWorkPath() & LIBRARY_NAME )
Speichern.click()
- Speichern.notExists( 1 )
+ Speichern.notExists( SHORT_WAIT )
else
warnlog( "Dialog <File Save> did not open" )
endif
@@ -176,16 +180,14 @@ testcase tBasicPackageExport
kontext "TabBibliotheken"
printlog( "Close libraires tabpage" )
- TabBibliotheken.cancel()
- TabBibliotheken.notExists( 1 )
+ hCloseDialog( TabBibliotheken, "cancel" )
else
warnlog( "Dialog <TabBibliotheken> is not available" )
endif
kontext "Makro"
printlog( "Close BASIC organizer" )
- Makro.cancel()
- Makro.notExists( 1 )
+ hCloseDialog( Makro, "cancel" )
else
warnlog( "Dialog <Makro> did not open" )
endif
diff --git a/testautomation/framework/optional/includes/basic_package_import.inc b/testautomation/framework/optional/includes/basic_package_import.inc
index 4ef74de4f112..a16b9e4e50e2 100644..100755
--- a/testautomation/framework/optional/includes/basic_package_import.inc
+++ b/testautomation/framework/optional/includes/basic_package_import.inc
@@ -41,6 +41,9 @@ testcase tBasicPackageImport
dim package_name as string : package_name = "tBasicExport.oxt"
const LIBRARY_NAME = "tBasicExport"
+ const MY_MACROS = 1
+ const LIBRARIES_TAB = 3
+ const SHORT_WAIT = 1
dim cDocumentName as string
dim cLibraryName as string
@@ -49,9 +52,9 @@ testcase tBasicPackageImport
dim iCurrentLib as integer
dim iStatus as integer
- dim cFile as string
- cFile = hGetWorkPath() & package_name
-
+ dim cFile as string : cFile = hGetWorkPath() & package_name
+
+ printlog( "Probe for test extension created by basic_packege_export" )
if ( Not FileExists( cFile ) or ( FileLen( cFile ) = 0 ) ) then
warnlog( "#i105719# - Test extension is missing or has zero size. This is most likely" & _
" a follow-up error from the prior test case. Test stopped." )
@@ -80,14 +83,14 @@ testcase tBasicPackageImport
ToolsMacro_uno
kontext "Makro"
- MakroAus.select( 1 )
+ MakroAus.select( MY_MACROS )
Verwalten.click()
- hSelectBasicObjectOrganizerTab( 3 )
+ hSelectBasicObjectOrganizerTab( LIBRARIES_TAB )
kontext "TabBibliotheken"
- Bibliothek.select( 1 )
+ Bibliothek.select( SHORT_WAIT )
printlog( "Select the new library" )
kontext "TabBibliotheken"
@@ -98,15 +101,13 @@ testcase tBasicPackageImport
endif
next iCurrentLib
cLibraryName = BibliotheksListe.getSelText()
-
- try
- Hinzufuegen.click()
- catch
+
+ if ( not hClickButton( Hinzufuegen ) ) then
warnlog( "#i64007 - Office crashes on clicking import button" )
- endcatch
+ endif
kontext "OeffnenDlg"
- OeffnenDlg.cancel()
+ hCloseDialog( OeffnenDlg, "cancel" )
printlog( "Cleanup: Delete Library, close dialogs and remove package" )
@@ -119,19 +120,18 @@ testcase tBasicPackageImport
Loeschen.click()
kontext "active"
- if ( active.exists( 1 ) ) then
+ if ( active.exists( SHORT_WAIT ) ) then
active.yes()
else
warnlog( "No warning for library deletion" )
endif
- endif
-
+ endif
kontext "TabBibliotheken"
- TabBibliotheken.cancel()
+ hCloseDialog( TabBibliotheken, "cancel" )
kontext "Makro"
- Makro.cancel()
+ hCloseDialog( Makro, "cancel" )
hExtensionRemoveGUI( package_name )
diff --git a/testautomation/framework/optional/includes/basic_protected_libraries.inc b/testautomation/framework/optional/includes/basic_protected_libraries.inc
index 132549c16d8d..03a9aea72834 100644..100755
--- a/testautomation/framework/optional/includes/basic_protected_libraries.inc
+++ b/testautomation/framework/optional/includes/basic_protected_libraries.inc
@@ -47,7 +47,7 @@ testcase tProtectedLibraries
dim iCurrentLib as integer
dim cMsg as string
- hOpenBasicOrganizerFromDoc()
+ ToolsMacro_uno
printlog( "Select My Macros" )
kontext "Makro"
@@ -97,7 +97,7 @@ testcase tProtectedLibraries
printlog( "Restart the application" )
call ExitRestartTheOffice()
- hOpenBasicOrganizerFromDoc()
+ ToolsMacro_uno
printlog( "Select the protected library" )
Kontext "Makro"
diff --git a/testautomation/framework/optional/includes/basic_spectemplate.inc b/testautomation/framework/optional/includes/basic_spectemplate.inc
index 92a792cd5797..35e541a642a2 100644..100755
--- a/testautomation/framework/optional/includes/basic_spectemplate.inc
+++ b/testautomation/framework/optional/includes/basic_spectemplate.inc
@@ -33,30 +33,9 @@
testcase tBasicSpecTemplate
- qaerrorlog( "#i89554# Macro dialog not displayed / document not loaded" )
- goto endsub
-
-
const cFile = "http://specs.openoffice.org/collaterals/template/2.0/OpenOffice-org-Specification-Template.ott"
- dim brc as boolean
- dim cProxy as string
- dim cPort as string
-
- dim cWorkFile as string
-
- cWorkFile = hGetWorkPath() & "SpecTemplate" & hGetSuffix( "current" )
-
-
- hGetPrivateHttpServer( cProxy, cPort )
+ dim cWorkFile as string : cWorkFile = hGetWorkPath() & "SpecTemplate" & hGetSuffix( "current" )
- printlog( "Init: Set proxy (requires private environment to be set)" )
- hSetProxies( cProxy, cPort, "", "", "" )
- if ( WaitSlot() <> WSFinished ) then
- warnlog( "Slot not finished after 1000 msec." )
- else
- printlog( "Slot free in less than 1000 msec." )
- endif
-
printlog( "FileOpen" )
hFileOpen( cFile )
@@ -68,26 +47,26 @@ testcase tBasicSpecTemplate
kontext "OeffnenDlg"
if ( OeffnenDlg.exists( 1 ) ) then
printlog( "Recovering - closing File Open dialog" )
- OeffnenDlg.cancel()
+ hCloseDialog( OeffnenDlg, "cancel" )
endif
goto endsub
endif
printlog( "Accept to execute macros" )
- brc = hAllowMacroExecution()
- if ( not brc ) then
- warnlog( "Missing Macro execution dialog. Please check the file/security settings" )
+ if ( not hAllowMacroExecution() ) then
+ warnlog( "Missing Macro execution dialog. Aborting test" )
+ goto endsub
endif
-
+
kontext "Active"
- if ( Active.exists( 5 ) ) then
+ if ( Active.exists( 10 ) ) then
warnlog( "Fatal: Unexpected active: " & Active.getText() )
active.ok
kontext "OeffnenDlg"
if ( OeffnenDlg.exists( 2 ) ) then
- OeffnenDlg.close()
+ hCloseDialog( OeffnenDlg, "close" )
goto endsub
endif
endif
@@ -101,22 +80,23 @@ testcase tBasicSpecTemplate
hUseMenu()
hMenuSelectNr( 10 )
hMenuSelectNr( 2 )
-
-
+
+ ' This one is required as the document is rendering for a while and we cannot
+ ' tell when it is finished (WaitSlot does not work here)
+ wait( 5000 )
+
+ printlog( "Save the file, overwriting" )
hFileSaveAsKill( cWorkFile )
-
+
+ printlog( "Close the document" )
hDestroyDocument()
-
+
+ printlog( "Load the file again" )
hFileOpen( cWorkFile )
-
hAllowMacroExecution()
- printlog( "Cleanup: Close the document" )
+ printlog( "Cleanup: Close the document and delete the file" )
hDestroyDocument()
-
- printlog( "Cleanup: Delete proxy settings" )
- hSetProxies( "", "", "", "", "" )
-
hDeleteFile( cWorkFile )
endcase
diff --git a/testautomation/framework/optional/includes/basic_usertemplate.inc b/testautomation/framework/optional/includes/basic_usertemplate.inc
index de3b605ed510..9f8400c45f8b 100644..100755
--- a/testautomation/framework/optional/includes/basic_usertemplate.inc
+++ b/testautomation/framework/optional/includes/basic_usertemplate.inc
@@ -43,7 +43,6 @@ testcase tMacroUsertemplate
' When creating a document based on a user-created template the macro
' will not execute, instead a com.sun.star... errormessage is displayed
- dim brc as boolean ' returncode
dim irc as integer ' returncode
dim cMacroName as string ' Temp variable to store the name of current macro
@@ -63,62 +62,73 @@ testcase tMacroUsertemplate
kontext "DocumentWriter"
DocumentWriter.typeKeys( DOC_IDENTIFIER )
- brc = hCreateDocument()
-
- brc = hOpenBasicOrganizerFromDoc()
+ printlog( "Create a new document" )
+ hCreateDocument()
+
+ printlog( "Open the macro organizer" )
+ ToolsMacro_uno
+ printlog( "Search for the module" )
iCurrentNode = hSelectNodeByName( MakroAus, "Module1" )
if ( iCurrentNode = 0 ) then
warnlog( "#i73521# - The expected node could not be found. Aborting test" )
kontext "Makro"
- Makro.close()
+ hCloseDialog( Makro, "close" )
hDestroyDocument()
goto endsub
endif
- ' verify that we replace the correct macro. if not: Abort
+ printlog( "Find the macro we are going to replace" )
if ( MakroListe.getItemCount() > 0 ) then
cMacroName = MakroListe.getSelText()
if ( lcase( cMacroName ) <> "main" ) then
warnlog( "Test abort: Incorrect macro is selected: " & cMacroName )
printlog( "This should have been the <Main> Macro" )
kontext "Makro"
- Makro.cancel()
+ hCloseDialog( Makro, "cancel" )
hDestroyDocument()
goto endsub
endif
else
warnlog( "There is no macro listed for the current module, the test cannot continue" )
kontext "Makro"
- Makro.close()
+ hCloseDialog( Makro, "close" )
hDestroyDocument()
goto endsub
endif
-
+
+ printlog( "Edit" )
Bearbeiten.click()
+ printlog( "Insert test macro" )
hInsertMacro( 3 )
+ printog( "Close BASIC IDE" )
hCloseBasicIde()
+ printlog( "Close Document" )
hDestroyDocument()
+ printlog( "Open new document" )
hCreateDocument
+ printlog( "Open Macro Organizer" )
ToolsMacrosRunMacro
-
+
+ printlog( "Find the Macro again" )
cMacroName = hExecScript_tMacroUserTemplate() ' local function, see below
if ( lcase( cMacroName ) <> "main" ) then
warnlog( "Test abort: Incorrect macro is selected: " & cMacroName )
printlog( "This should have been the <Main> Macro" )
ScriptSelector.cancel()
- brc = hDestroyDocument()
+ hDestroyDocument()
goto endsub
endif
- ' run
+ printlog( "Run the macro" )
ScriptSelector.ok()
+ printlog( "Check for macro" )
kontext "Active"
if ( active.exists( 3 ) ) then
printlog( "Messagebox: " & active.getText() )
@@ -126,29 +136,33 @@ testcase tMacroUsertemplate
else
warnlog( "The Macro has not been executed" )
endif
-
- brc = hDestroyDocument()
- brc = hCreateDocument()
+ printlog( "Close the document" )
+ hDestroyDocument()
+
+ printlog( "Open a new document" )
+ hCreateDocument()
printlog( "" )
printlog( "Save as template" )
hFileSaveAsWithFilterKill( sPathOut & FILEOUT, FILTER )
-
+
+ printlog( "Close the document" )
hDestroyDocument()
printlog( "" )
printlog( "File New from Template" )
FileNewFromTemplate
-
+
+ printlog( "Find the template" )
irc = hFindTemplate( FILEOUT )
-
hSelectDocumentObject( irc, 1 )
printlog( "" )
- printlog( "Run Macro..." )
+ printlog( "Open the <Run Macro> dialog" )
ToolsMacrosRunMacro
-
+
+ printlog( "Try to find the macro" )
cMacroName = hExecScript_tMacroUserTemplate() ' local function, see below
if ( lcase( cMacroName ) <> "main" ) then
warnlog( "Test abort: Incorrect macro is selected: " & cMacroName )
@@ -158,10 +172,10 @@ testcase tMacroUsertemplate
goto endsub
endif
- ' run
printlog( "Run" )
ScriptSelector.ok()
-
+
+ printlog( "Verify macro execution" )
kontext "Active"
if ( active.exists( 3 ) ) then
@@ -179,10 +193,11 @@ testcase tMacroUsertemplate
else
warnlog( "Macro not executed / no warning" )
endif
-
- hDestroyDocument()
- hDestroyDocument()
-
+
+ printlog( "Close all open documents" )
+ hFileCloseAll()
+
+ printlog( "Delete test template" )
hDeleteFile( sPathOut & FILEOUT & ".ott" )
diff --git a/testautomation/framework/optional/includes/basic_vba-compat_import_disabled.inc b/testautomation/framework/optional/includes/basic_vba-compat_import_disabled.inc
index f5576308a6a9..5a82a6d87b2b 100755
--- a/testautomation/framework/optional/includes/basic_vba-compat_import_disabled.inc
+++ b/testautomation/framework/optional/includes/basic_vba-compat_import_disabled.inc
@@ -78,7 +78,7 @@ testcase tBasicVBACompatImportDisabled()
hFileOpen( cTestFile )
printlog( "Open the Basic organizer" )
- hOpenBasicOrganizerFromDoc()
+ ToolsMacro_uno
printlog( "Expand all nodes" )
cNodeCount = hExpandAllNodes( MakroAus )
@@ -93,7 +93,7 @@ testcase tBasicVBACompatImportDisabled()
printlog( "Verify position of the document node" )
MakroAus.select( cNodeCount + DOCUMENT_POSITION_OFFSET )
if ( MakroAus.getSelText() <> "vba-test.xls" ) then
- qaerrorlog( "The document node is not at the expected position" )
+ printlog( "The document node is not at the expected position, searching..." )
endif
for iCurrentModule = 2 to 7
diff --git a/testautomation/framework/optional/includes/basic_vba-compat_import_enabled.inc b/testautomation/framework/optional/includes/basic_vba-compat_import_enabled.inc
index 3e6450e4c2e7..bf1e24af9eda 100755
--- a/testautomation/framework/optional/includes/basic_vba-compat_import_enabled.inc
+++ b/testautomation/framework/optional/includes/basic_vba-compat_import_enabled.inc
@@ -82,7 +82,7 @@ testcase tBasicVBACompatImportEnabled()
hFileOpen( cTestFile )
printlog( "Open the Basic organizer" )
- hOpenBasicOrganizerFromDoc()
+ ToolsMacro_uno
printlog( "Expand all nodes" )
cNodeCount = hExpandAllNodes( MakroAus )
@@ -98,7 +98,7 @@ testcase tBasicVBACompatImportEnabled()
MakroAus.select( cNodeCount + DOCUMENT_POSITION_OFFSET )
cTempString = MakroAus.getSelText()
if ( cTempString <> cFile ) then
- qaerrorlog( "The filename does not match. File may be read-only." )
+ printlog( "The filename does not match. File may be read-only." )
if ( instr( cTempString, cFile ) > 1 ) then
printlog( "Filename is contained in the UI string." )
select case ( getAttr( cTestFile ) )
@@ -110,8 +110,8 @@ testcase tBasicVBACompatImportEnabled()
printlog( "RC from getAttr() is: " & getAttr( cTestFile ) )
end select
else
- qaerrorlog( "The document node is not at the expected position." )
- qaerrorlog( "Object at this position is: " & MakroAus.getSelText() )
+ printlog( "The document node is not at the expected position." )
+ printlog( "Object at this position is: " & MakroAus.getSelText() )
endif
endif
diff --git a/testautomation/framework/optional/includes/basic_vba-compat_import_nothing.inc b/testautomation/framework/optional/includes/basic_vba-compat_import_nothing.inc
index bab6bf1a4b1b..f02644814ad0 100755
--- a/testautomation/framework/optional/includes/basic_vba-compat_import_nothing.inc
+++ b/testautomation/framework/optional/includes/basic_vba-compat_import_nothing.inc
@@ -64,7 +64,7 @@ testcase tBasicVBACompatImportNothing()
hFileOpen( cTestFile )
printlog( "Open the Basic organizer" )
- hOpenBasicOrganizerFromDoc()
+ ToolsMacro_uno
printlog( "Expand all nodes" )
cNodeCount = hExpandAllNodes( MakroAus )
@@ -79,7 +79,7 @@ testcase tBasicVBACompatImportNothing()
printlog( "Verify position of the document node" )
MakroAus.select( cNodeCount + DOCUMENT_POSITION_OFFSET )
if ( MakroAus.getSelText() <> "vba-test.xls" ) then
- qaerrorlog( "The document node is not at the expected position" )
+ printlog( "The document node is not at the expected position, searching" )
endif
printlog( "Select the last node, this should be the standard Library for the document" )
diff --git a/testautomation/framework/optional/includes/basic_vba_compat_tools.inc b/testautomation/framework/optional/includes/basic_vba_compat_tools.inc
index 77437770891a..77437770891a 100644..100755
--- a/testautomation/framework/optional/includes/basic_vba_compat_tools.inc
+++ b/testautomation/framework/optional/includes/basic_vba_compat_tools.inc
diff --git a/testautomation/framework/optional/includes/extras_file_open.inc b/testautomation/framework/optional/includes/extras_file_open.inc
index 680afdd77197..874012f6bad1 100644..100755
--- a/testautomation/framework/optional/includes/extras_file_open.inc
+++ b/testautomation/framework/optional/includes/extras_file_open.inc
@@ -173,7 +173,8 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
else
printlog( "Close navigator, if open" )
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
sFileOut = cCategory & "_" & iCurrentTemplate
sFileOut = convertpath( sPathOut & sFileOut )
@@ -196,7 +197,8 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
hHandleActivesOnLoad( 0 , 2 )
printlog( "Close navigator, if open" )
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
printlog( "Close document" )
hDestroyDocument()
diff --git a/testautomation/framework/optional/includes/extras_labels.inc b/testautomation/framework/optional/includes/extras_labels.inc
index 11badbd0ba07..b6a05e6e6a1d 100644..100755
--- a/testautomation/framework/optional/includes/extras_labels.inc
+++ b/testautomation/framework/optional/includes/extras_labels.inc
@@ -98,10 +98,6 @@ testcase tLabelTypes()
TabEtiketten.Cancel()
irc = hManageComparisionList( sFileIn, sFileOut, al_UI_Labels() )
- if ( irc <> 0 ) then
- warnlog( "The list of labels (Brand/Types) has changed, please review." )
- else
- printlog( "The lists of labels are unchanged. Good." )
- endif
+ hListResultEvaluation( irc , 0 )
endcase
diff --git a/testautomation/framework/optional/includes/extras_modify_objects.inc b/testautomation/framework/optional/includes/extras_modify_objects.inc
index b8cf23170942..70695d6341a0 100644..100755
--- a/testautomation/framework/optional/includes/extras_modify_objects.inc
+++ b/testautomation/framework/optional/includes/extras_modify_objects.inc
@@ -143,12 +143,14 @@ testcase tModifyObjects( iMode as integer, cCategory as string, sVer as string )
else
printlog( "Build filename; save, reload and delete" )
sFile = sPath & cCategory & iObjectFolder & "_" & iObject
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
hFileSaveAsKill( sFile )
hDestroyDocument()
hFileOpen( sFile )
hHandleActivesOnLoad( 1 , 2 )
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
hDestroyDocument()
hDeleteFile( sFile )
printlog( "Test cycle done, going for next object." )
diff --git a/testautomation/framework/optional/includes/extras_preview.inc b/testautomation/framework/optional/includes/extras_preview.inc
index 8e1129bd5bf4..8e1129bd5bf4 100644..100755
--- a/testautomation/framework/optional/includes/extras_preview.inc
+++ b/testautomation/framework/optional/includes/extras_preview.inc
diff --git a/testautomation/framework/optional/includes/extras_table_autoformat.inc b/testautomation/framework/optional/includes/extras_table_autoformat.inc
index 2de2c491c528..892b33ca27fb 100644..100755
--- a/testautomation/framework/optional/includes/extras_table_autoformat.inc
+++ b/testautomation/framework/optional/includes/extras_table_autoformat.inc
@@ -39,8 +39,7 @@ testcase tAutoformatTable( iApp as integer )
endif
- dim al_UI_formats( 1000 ) as string
- al_UI_formats( 0 ) = "0"
+ dim al_UI_formats( 1000 ) as string : al_UI_formats( 0 ) = "0"
dim iFormatCount as integer
dim iCurrentFormat as integer
@@ -113,11 +112,7 @@ testcase tAutoformatTable( iApp as integer )
hDestroyDocument()
irc = hManageComparisionList( sFileIn, sFileOut, al_UI_formats() )
- if ( irc <> 0 ) then
- warnlog( "The list of table autoformats has changed, please review." )
- else
- printlog( "The list of table autoformats is unchanged. Good." )
- endif
+ hListResultEvaluation( irc , 0 )
endcase
diff --git a/testautomation/framework/optional/includes/f_usage_tracking.inc b/testautomation/framework/optional/includes/f_usage_tracking.inc
index 7ea54855eb5d..7ea54855eb5d 100644..100755
--- a/testautomation/framework/optional/includes/f_usage_tracking.inc
+++ b/testautomation/framework/optional/includes/f_usage_tracking.inc
diff --git a/testautomation/framework/optional/includes/filedlg_allowed_names.inc b/testautomation/framework/optional/includes/filedlg_allowed_names.inc
index ce386758c255..ce386758c255 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_allowed_names.inc
+++ b/testautomation/framework/optional/includes/filedlg_allowed_names.inc
diff --git a/testautomation/framework/optional/includes/filedlg_autocomplete.inc b/testautomation/framework/optional/includes/filedlg_autocomplete.inc
index a289e0c6116e..a289e0c6116e 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_autocomplete.inc
+++ b/testautomation/framework/optional/includes/filedlg_autocomplete.inc
diff --git a/testautomation/framework/optional/includes/filedlg_cjk_files.inc b/testautomation/framework/optional/includes/filedlg_cjk_files.inc
index 19f508193a8d..a2bcc2230ec0 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_cjk_files.inc
+++ b/testautomation/framework/optional/includes/filedlg_cjk_files.inc
@@ -71,7 +71,8 @@ testcase tSaveLoadDelFilesCJK()
hDeleteFile( hGetWorkPath() & cStrangeName )
printlog( "Close navigator, if it exists" )
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
next iCounter
diff --git a/testautomation/framework/optional/includes/filedlg_cjk_folders.inc b/testautomation/framework/optional/includes/filedlg_cjk_folders.inc
index cc6555b715a1..cc6555b715a1 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_cjk_folders.inc
+++ b/testautomation/framework/optional/includes/filedlg_cjk_folders.inc
diff --git a/testautomation/framework/optional/includes/filedlg_document_properties.inc b/testautomation/framework/optional/includes/filedlg_document_properties.inc
index 089a1d131338..0fd8a0a79f55 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_document_properties.inc
+++ b/testautomation/framework/optional/includes/filedlg_document_properties.inc
@@ -104,3 +104,69 @@ testcase tFiledlgDocumentProperties()
endcase
+'*******************************************************************************
+
+function hDocumentInfoSelectTab( cTabPage as string ) as boolean
+
+
+ '///<h3>Switch between the tabpages in the document info dialog</h3>
+ '///<i>The declaration of the document info dialog is not complete which
+ '///+ enforces special treatment</i><br><br>
+
+ '///<u>Parameter(s):</u><br>
+ '///<ol>
+
+ '///+<li>The name of the tabpage to be activated (String)</li>
+ '///<ul>
+ '///+<li>&quot;General&quot;</li>
+ '///+<li>&quot;Description&quot;</li>
+ '///+<li>&quot;User&quot;</li>
+ '///+<li>&quot;Internet&quot;</li>
+ '///+<li>&quot;Statistics&quot;</li>
+ '///+<li>The string is case insensitive</li>
+
+ '///</ul>
+
+ '///</ol>
+
+
+ '///<u>Returns:</u><br>
+ '///<ol>
+ '///+<li>Errorcondition (Boolean)</li>
+ '///<ul>
+ '///+<li>TRUE if tabpage is known and switching worked</li>
+ '///+<li>FALSE on icorrect input parameter</li>
+ '///+<li>FALSE on any other error</li>
+ '///</ul>
+ '///</ol>
+
+ const CFN = "hDocumentInfoSelectTab::"
+ printlog( CFN & "Enter with option (tabpage): " & cTabPage )
+ dim brc as boolean 'a multi purpose boolean returnvalue
+ brc = true
+
+ '///<u>Description:</u>
+ '///<ul>
+ '///+<li>Kontext to the dialog</li>
+ Kontext
+
+ '///+<li>Select the page to switch to, context to the new page</li>
+ select case ( ucase( cTabPage ) )
+ case "GENERAL" : active.setPage TabDokument : kontext "TabDokument"
+ case "DESCRIPTION" : active.setPage TabBeschreibung : kontext "TabBeschreibung"
+ case "USER" : warnlog( "#i95523# - Cannot access controls on Custom page" )
+ brc = false
+ 'active.setPage TabBenutzer : kontext "TabBenutzer"
+ case "INTERNET" : active.setPage TabInternet : kontext "TabInternet"
+ case "STATISTICS" : active.setPage TabStatistik : kontext "TabStatistik"
+ case default : brc = false
+ end select
+
+ '///</ul>
+
+ printlog( CFN & "Exit with result: " & brc )
+ hDocumentInfoSelectTab() = brc
+
+end function
+
+
diff --git a/testautomation/framework/optional/includes/filedlg_filternames.inc b/testautomation/framework/optional/includes/filedlg_filternames.inc
index 6c41ef444b61..6dd8c68e74ad 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_filternames.inc
+++ b/testautomation/framework/optional/includes/filedlg_filternames.inc
@@ -46,7 +46,7 @@ testcase tVerifyFilterNames
dim iCurrentItem as integer
dim cFile as string
- dim iErr as integer
+ dim irc as integer
' For Windows and Solaris Sparc there exists additional commercial filters
@@ -105,7 +105,8 @@ testcase tVerifyFilterNames
OeffnenDlg.cancel()
- iErr = hManageComparisionList( cFileIn, cFileOut, asFilterNames() )
+ irc = hManageComparisionList( cFileIn, cFileOut, asFilterNames() )
+ hListResultEvaluation( irc , 0 )
else
warnlog( "File Open dialog not present." )
@@ -113,11 +114,6 @@ testcase tVerifyFilterNames
printlog( "Close the document" )
hDestroyDocument()
-
- if ( iErr <> 0 ) then
- warnlog( "Filterlist differs from reference, please review" )
- endif
-
-
+
endcase
diff --git a/testautomation/framework/optional/includes/filedlg_folders1.inc b/testautomation/framework/optional/includes/filedlg_folders1.inc
index 52d905876df3..52d905876df3 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_folders1.inc
+++ b/testautomation/framework/optional/includes/filedlg_folders1.inc
diff --git a/testautomation/framework/optional/includes/filedlg_folders2.inc b/testautomation/framework/optional/includes/filedlg_folders2.inc
index 4e1a8684ba03..4e1a8684ba03 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_folders2.inc
+++ b/testautomation/framework/optional/includes/filedlg_folders2.inc
diff --git a/testautomation/framework/optional/includes/filedlg_folders3.inc b/testautomation/framework/optional/includes/filedlg_folders3.inc
index 9219c3a76be6..9219c3a76be6 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_folders3.inc
+++ b/testautomation/framework/optional/includes/filedlg_folders3.inc
diff --git a/testautomation/framework/optional/includes/filedlg_folders4.inc b/testautomation/framework/optional/includes/filedlg_folders4.inc
index 0e90c3b70d9d..0e90c3b70d9d 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_folders4.inc
+++ b/testautomation/framework/optional/includes/filedlg_folders4.inc
diff --git a/testautomation/framework/optional/includes/filedlg_folders5.inc b/testautomation/framework/optional/includes/filedlg_folders5.inc
index 03ea63a34a35..03ea63a34a35 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_folders5.inc
+++ b/testautomation/framework/optional/includes/filedlg_folders5.inc
diff --git a/testautomation/framework/optional/includes/filedlg_folders6.inc b/testautomation/framework/optional/includes/filedlg_folders6.inc
index dae5106793f9..dae5106793f9 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_folders6.inc
+++ b/testautomation/framework/optional/includes/filedlg_folders6.inc
diff --git a/testautomation/framework/optional/includes/filedlg_folders7.inc b/testautomation/framework/optional/includes/filedlg_folders7.inc
index 1a971d1bdada..1a971d1bdada 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_folders7.inc
+++ b/testautomation/framework/optional/includes/filedlg_folders7.inc
diff --git a/testautomation/framework/optional/includes/filedlg_forbidden_names_windows.inc b/testautomation/framework/optional/includes/filedlg_forbidden_names_windows.inc
index 96cff87d3d04..96cff87d3d04 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_forbidden_names_windows.inc
+++ b/testautomation/framework/optional/includes/filedlg_forbidden_names_windows.inc
diff --git a/testautomation/framework/optional/includes/filedlg_multiselection.inc b/testautomation/framework/optional/includes/filedlg_multiselection.inc
index ed6fc3670db8..ed6fc3670db8 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_multiselection.inc
+++ b/testautomation/framework/optional/includes/filedlg_multiselection.inc
diff --git a/testautomation/framework/optional/includes/filedlg_passwords.inc b/testautomation/framework/optional/includes/filedlg_passwords.inc
index c8dd68effe83..b921b1a831e0 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_passwords.inc
+++ b/testautomation/framework/optional/includes/filedlg_passwords.inc
@@ -58,7 +58,8 @@ testcase tFiledlgPasswords()
hCreateDocument()
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
call hChangeDoc()
@@ -164,13 +165,15 @@ testcase tFiledlgPasswords()
warnlog( "File Open dislog did not come up" )
endif
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
hDestroyDocument()
hDeleteFile( workpath & workfile )
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
next iCurrentFileFormat
diff --git a/testautomation/framework/optional/includes/filedlg_rename.inc b/testautomation/framework/optional/includes/filedlg_rename.inc
index 513a652b8f36..513a652b8f36 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_rename.inc
+++ b/testautomation/framework/optional/includes/filedlg_rename.inc
diff --git a/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc b/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc
index 885dc6a92f2d..885dc6a92f2d 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc
+++ b/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc
diff --git a/testautomation/framework/optional/includes/filedlg_reserved_names_windows.inc b/testautomation/framework/optional/includes/filedlg_reserved_names_windows.inc
index 4fba22fb9c8f..4fba22fb9c8f 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_reserved_names_windows.inc
+++ b/testautomation/framework/optional/includes/filedlg_reserved_names_windows.inc
diff --git a/testautomation/framework/optional/includes/filedlg_tools.inc b/testautomation/framework/optional/includes/filedlg_tools.inc
index b4781813c89e..b4781813c89e 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_tools.inc
+++ b/testautomation/framework/optional/includes/filedlg_tools.inc
diff --git a/testautomation/framework/optional/includes/filedlg_triggers.inc b/testautomation/framework/optional/includes/filedlg_triggers.inc
index 47913a327091..47913a327091 100644..100755
--- a/testautomation/framework/optional/includes/filedlg_triggers.inc
+++ b/testautomation/framework/optional/includes/filedlg_triggers.inc
diff --git a/testautomation/framework/optional/includes/fontworkgallery.inc b/testautomation/framework/optional/includes/fontworkgallery.inc
index 08fea775ba4e..08fea775ba4e 100644..100755
--- a/testautomation/framework/optional/includes/fontworkgallery.inc
+++ b/testautomation/framework/optional/includes/fontworkgallery.inc
diff --git a/testautomation/framework/optional/includes/help_bookmarks.inc b/testautomation/framework/optional/includes/help_bookmarks.inc
index c4aebad1af9d..c4aebad1af9d 100644..100755
--- a/testautomation/framework/optional/includes/help_bookmarks.inc
+++ b/testautomation/framework/optional/includes/help_bookmarks.inc
diff --git a/testautomation/framework/optional/includes/help_compare_applications.inc b/testautomation/framework/optional/includes/help_compare_applications.inc
index 240535bed85b..5fa8bc46bbe3 100644..100755
--- a/testautomation/framework/optional/includes/help_compare_applications.inc
+++ b/testautomation/framework/optional/includes/help_compare_applications.inc
@@ -90,9 +90,7 @@ testcase tCompareHelpApps()
printlog( "Beginning comparision" )
irc = hManageComparisionList( sFileIn, sFileOut, aTopicsFromUI() )
- if ( irc <> 0 ) then
- warnlog( "Something went wrong, please review the log" )
- endif
+ hListResultEvaluation( irc , 0 )
endcase
diff --git a/testautomation/framework/optional/includes/help_compare_content.inc b/testautomation/framework/optional/includes/help_compare_content.inc
index 15874b0bd758..2331a6a5969c 100644..100755
--- a/testautomation/framework/optional/includes/help_compare_content.inc
+++ b/testautomation/framework/optional/includes/help_compare_content.inc
@@ -85,9 +85,7 @@ testcase tCompareHelpContent()
printlog( "" )
printlog( "Beginning comparision" )
irc = hManageComparisionList( sFileIn, sFileOut, aTopicsFromUI() )
- if ( irc <> 0 ) then
- warnlog( "Something went wrong, please review the log." )
- endif
+ hListResultEvaluation( irc , 0 )
endcase
diff --git a/testautomation/framework/optional/includes/help_compare_topics.inc b/testautomation/framework/optional/includes/help_compare_topics.inc
index 75dd76625b88..c49c96e5ccd2 100644..100755
--- a/testautomation/framework/optional/includes/help_compare_topics.inc
+++ b/testautomation/framework/optional/includes/help_compare_topics.inc
@@ -120,9 +120,7 @@ testcase tCompareHelpTopics()
printlog( "Beginning comparision. This will take a while ..." )
irc = hManageComparisionList( sFileIn, sFileOut, aTopicsFromUI() )
- if ( irc <> 0 ) then
- warnlog( "The list has changed, please review" )
- endif
+ hListResultEvaluation( irc , 0 )
endcase
diff --git a/testautomation/framework/optional/includes/help_search.inc b/testautomation/framework/optional/includes/help_search.inc
index 2e37fe58562e..c050e67ad4b3 100644..100755
--- a/testautomation/framework/optional/includes/help_search.inc
+++ b/testautomation/framework/optional/includes/help_search.inc
@@ -81,9 +81,7 @@ testcase tHelpSearch
sFileIn = convertpath( cBasePath & cDataFile )
irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
- if ( irc <> 0 ) then
- warnlog( "Lists are not identical, please review the log" )
- endif
+ hListResultEvaluation( irc , 0 )
' ------------ Search whole words only -------------------------------------
printlog( "" )
diff --git a/testautomation/framework/optional/includes/help_view_topics.inc b/testautomation/framework/optional/includes/help_view_topics.inc
index 6a729fe27679..6a729fe27679 100644..100755
--- a/testautomation/framework/optional/includes/help_view_topics.inc
+++ b/testautomation/framework/optional/includes/help_view_topics.inc
diff --git a/testautomation/framework/optional/includes/loadsave_files.inc b/testautomation/framework/optional/includes/loadsave_files.inc
index c7fd948b5df3..c7fd948b5df3 100644..100755
--- a/testautomation/framework/optional/includes/loadsave_files.inc
+++ b/testautomation/framework/optional/includes/loadsave_files.inc
diff --git a/testautomation/framework/optional/includes/loadsave_new.inc b/testautomation/framework/optional/includes/loadsave_new.inc
index 924646423031..924646423031 100644..100755
--- a/testautomation/framework/optional/includes/loadsave_new.inc
+++ b/testautomation/framework/optional/includes/loadsave_new.inc
diff --git a/testautomation/framework/optional/includes/menuentries.inc b/testautomation/framework/optional/includes/menuentries.inc
index 5c00a7cf34f1..5c00a7cf34f1 100644..100755
--- a/testautomation/framework/optional/includes/menuentries.inc
+++ b/testautomation/framework/optional/includes/menuentries.inc
diff --git a/testautomation/framework/optional/includes/ole_1.inc b/testautomation/framework/optional/includes/ole_1.inc
index a90d517620a1..a90d517620a1 100644..100755
--- a/testautomation/framework/optional/includes/ole_1.inc
+++ b/testautomation/framework/optional/includes/ole_1.inc
diff --git a/testautomation/framework/optional/includes/ole_2.inc b/testautomation/framework/optional/includes/ole_2.inc
index f2c679e84b6d..f2c679e84b6d 100644..100755
--- a/testautomation/framework/optional/includes/ole_2.inc
+++ b/testautomation/framework/optional/includes/ole_2.inc
diff --git a/testautomation/framework/optional/includes/ole_3.inc b/testautomation/framework/optional/includes/ole_3.inc
index 22cab57056f6..9f1d0ac28d6b 100644..100755
--- a/testautomation/framework/optional/includes/ole_3.inc
+++ b/testautomation/framework/optional/includes/ole_3.inc
@@ -81,15 +81,11 @@ endcase
'*******************************************************************************
-sub hInsertOLEObject( bRemoveFocus as boolean, cOLEObject as string, cOleType as string )
+function hInsertOLEObject( bRemoveFocus as boolean, cOLEObject as string, cOleType as string ) as beoolean
dim sFile as String
dim bOleAvailable as boolean
-
-
-
-
printlog( "" )
printlog( "Beginning testcase with options: " )
printlog( "* Remove focus...: " & bRemoveFocus )
@@ -102,12 +98,14 @@ sub hInsertOLEObject( bRemoveFocus as boolean, cOLEObject as string, cOleType as
' So writer/writer, calc/calc, masterdoc/writer is skipped ...
if ( gApplication = cOleType ) then
printlog( "Skipping " & cOleType & " as OLE object" )
- goto testend
+ hInsertOLEObject() = false
+ exit function
endif
if ( gApplication = "MASTERDOCUMENT" and cOleType = "WRITER" ) then
printlog( "Skipping " & cOleType & " as OLE object" )
- goto testend
+ hInsertOLEObject() = false
+ exit function
endif
hCreateDocument()
@@ -125,12 +123,12 @@ sub hInsertOLEObject( bRemoveFocus as boolean, cOLEObject as string, cOleType as
ObjektTyp.Select( cOLEObject )
printlog( "Click OK" )
- OLEObjektEinfuegen.OK()
- WaitSlot( 3000 )
+ hCloseDialog( OLEObjektEinfuegen, "ok" )
else
warnlog( "Insert OLE object dialog is missing, test ends" )
hDestroyDocument()
- goto testend
+ hInsertOLEObject() = false
+ exit function
endif
if ( bRemoveFocus ) then
@@ -149,14 +147,8 @@ sub hInsertOLEObject( bRemoveFocus as boolean, cOLEObject as string, cOleType as
sFile = ConvertPath ( gOfficePath + "user\work\ole_" & cOleType )
printlog( "Save the file; File to be written (w/o extension): " & sFile )
- if fileexists(sFile) then
- kill(sFile)
- qaerrorlog("killed file from former test run")
- endif
-
- hFileSaveAsKill( sFile )
-
- printlog( "Close the document" )
+ hDeleteFile( sFile )
+ hFileSaveAs( sFile )
hDestroyDocument()
printlog( "Reopen the file: " & sFile )
@@ -165,7 +157,8 @@ sub hInsertOLEObject( bRemoveFocus as boolean, cOLEObject as string, cOleType as
bOleAvailable = isOleAvailable()
if ( bOleAvailable ) then
- call DisableNavigator()
+ kontext "Navigator"
+ if ( Navigator.exists() ) then hCloseDialog( Navigator, "close,optional" )
call OLESetFocus()
@@ -174,14 +167,10 @@ sub hInsertOLEObject( bRemoveFocus as boolean, cOLEObject as string, cOleType as
qaErrorLog( "#i44725# OLE Object not saved in Master Document" )
endif
- printlog( "Cleanup: Close the document" )
+ printlog( "Cleanup: Close the document, delete workfile" )
hDestroyDocument()
-
- printlog( "Cleanup: Delete the workfile" )
hDeleteFile( sFile )
-
- ' We end up here when the test has been skipped or aborted
- testend:
+ hInsertOLEObject() = true
end sub
diff --git a/testautomation/framework/optional/includes/ole_tools.inc b/testautomation/framework/optional/includes/ole_tools.inc
index 0428f758cb3d..03b921fc95d3 100644..100755
--- a/testautomation/framework/optional/includes/ole_tools.inc
+++ b/testautomation/framework/optional/includes/ole_tools.inc
@@ -74,22 +74,38 @@ end sub
'*******************************************************************************
-sub hSetToStandardView ( DieApp$ )
- select case DieApp$
+function hSetToStandardView ( cApplication as string ) as boolean
+
+ const MAX_WAIT_FOR_DIALOG = 2
+
+ select case ( cApplication )
case "WRITER"
- gApplication = "WRITER"
+ gApplication = cApplication
Call hNewDocument
Kontext "DocumentWriter"
case "MASTERDOCUMENT"
- gApplication = "MASTERDOCUMENT"
+ gApplication = cApplication
Call hNewDocument
Kontext "DocumentMasterDoc"
+ case else
+ printlog( "Application not supported by this function: " & cApplication )
+ hSetToStandardView() = false
+ exit function
end select
- ViewZoom
+
+ hUseAsyncSlot( "ViewZoom" )
+
Kontext "Massstab"
- Optimal.Check
- Massstab.ok()
+ if ( Massstab.exists( MAX_WAIT_FOR_DIALOG ) ) then
+ Optimal.Check()
+ hCloseDialog( Massstab, "ok" )
+ else
+ warnlog( "Zoom-Dialog did not open" )
+ endif
+
Call hCloseDocument
+ hSetToStandardView() = true
+
end sub
'*******************************************************************************
@@ -140,23 +156,6 @@ end sub
'*******************************************************************************
-sub DisableNavigator()
- printlog( " - disable the navigator in globaldoc/writer" )
- select case gApplication
- case "MASTERDOCUMENT" : Kontext "NavigatorGlobalDoc"
- if NavigatorGlobalDoc.Exists() then
- ViewNavigator
- endif
- case "WRITER" : Kontext "NavigatorWriter"
- if NavigatorWriter.Exists() then
- ViewNavigator
- endif
- end select
- sleep( 1)
-end sub
-
-'*******************************************************************************
-
sub UncheckAutoFileExtension()
Kontext "SpeichernDlg"
if SpeichernDlg.exists(5) then
diff --git a/testautomation/framework/optional/includes/options_asia.inc b/testautomation/framework/optional/includes/options_asia.inc
index 730d5a0e666f..730d5a0e666f 100644..100755
--- a/testautomation/framework/optional/includes/options_asia.inc
+++ b/testautomation/framework/optional/includes/options_asia.inc
diff --git a/testautomation/framework/optional/includes/options_data.inc b/testautomation/framework/optional/includes/options_data.inc
index ac4c3240c3f4..ac4c3240c3f4 100644..100755
--- a/testautomation/framework/optional/includes/options_data.inc
+++ b/testautomation/framework/optional/includes/options_data.inc
diff --git a/testautomation/framework/optional/includes/options_int1.inc b/testautomation/framework/optional/includes/options_int1.inc
index 76b989679c15..76b989679c15 100644..100755
--- a/testautomation/framework/optional/includes/options_int1.inc
+++ b/testautomation/framework/optional/includes/options_int1.inc
diff --git a/testautomation/framework/optional/includes/options_lan1.inc b/testautomation/framework/optional/includes/options_lan1.inc
index c3659cb68f14..c3659cb68f14 100644..100755
--- a/testautomation/framework/optional/includes/options_lan1.inc
+++ b/testautomation/framework/optional/includes/options_lan1.inc
diff --git a/testautomation/framework/optional/includes/options_loadsave_general.inc b/testautomation/framework/optional/includes/options_loadsave_general.inc
index 39885ffc2e3c..39885ffc2e3c 100644..100755
--- a/testautomation/framework/optional/includes/options_loadsave_general.inc
+++ b/testautomation/framework/optional/includes/options_loadsave_general.inc
diff --git a/testautomation/framework/optional/includes/options_loadsave_html.inc b/testautomation/framework/optional/includes/options_loadsave_html.inc
index 072f4f4dea24..072f4f4dea24 100644..100755
--- a/testautomation/framework/optional/includes/options_loadsave_html.inc
+++ b/testautomation/framework/optional/includes/options_loadsave_html.inc
diff --git a/testautomation/framework/optional/includes/options_loadsave_msoffice.inc b/testautomation/framework/optional/includes/options_loadsave_msoffice.inc
index b02f4778fd02..b02f4778fd02 100644..100755
--- a/testautomation/framework/optional/includes/options_loadsave_msoffice.inc
+++ b/testautomation/framework/optional/includes/options_loadsave_msoffice.inc
diff --git a/testautomation/framework/optional/includes/options_loadsave_vba.inc b/testautomation/framework/optional/includes/options_loadsave_vba.inc
index 3238f4de37d6..3238f4de37d6 100644..100755
--- a/testautomation/framework/optional/includes/options_loadsave_vba.inc
+++ b/testautomation/framework/optional/includes/options_loadsave_vba.inc
diff --git a/testautomation/framework/optional/includes/options_ls_2.inc b/testautomation/framework/optional/includes/options_ls_2.inc
deleted file mode 100644
index f3e9cee13250..000000000000
--- a/testautomation/framework/optional/includes/options_ls_2.inc
+++ /dev/null
@@ -1,307 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : thorsten.bosbach@sun.com
-'*
-'* short description : (functionality test for load/save group)
-'*
-'\******************************************************************************
-
-testcase func_LoadSaveGeneral_1
-
- warnlog( "#i95523# - cannot access custom tabpage on document info dialog" )
- goto endsub
-
- Dim bSave as boolean, bPromptSave as boolean
- Dim sSaveTime as String
- Dim sFilename, sFilebak as String
- Dim i as Integer
-
- gApplication = "WRITER"
-
-
- sFilename = ConvertPath ( gOfficePath + "user\work\o_save.sxw" )
- sFilebak = ConvertPath ( gOfficePath + "user\backup\o_save.bak" )
-
- if app.Dir ( sFilename ) <> "" then app.kill ( sFilename )
- if app.Dir ( sFilebak ) <> "" then app.kill ( sFilebak )
-
- printlog " - save"
- printlog " - document properties before saving"
- printlog " open a new document"
- hNewDocument
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "tools/options/load-save/general: save-> edit document properties before saving<Return>"
- printlog " open tools / options / load & save / general"
- ToolsOptions
- hToolsOptions ( "LoadSave", "General" )
-
- printlog " check 'document properties before saving'"
- bSave = DokumenteigenschaftenBearbeiten.IsChecked
- DokumenteigenschaftenBearbeiten.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " save the document"
-
- FileSaveAs
- Kontext "SpeichernDlg"
- Dateiname.SetText sFilename
- Sleep (1)
- Speichern.Click
- Sleep (1)
- kontext
- 'overwrite warning on rerun
- if active.exists(3) then
- active.yes
- endif
-
- printlog " activate all tabpages on properties dialog and cancel it"
- try
- Kontext
- active.SetPage( TabDokument)
- active.SetPage TabDokumentinfo
- active.SetPage TabBenutzer
- active.SetPage TabInternet
- active.SetPage TabStatistik
- Kontext "TabStatistik"
- TabStatistik.Cancel
- catch
- Warnlog "Perhaps the document properties aren't active after saving => the dialog come not up after file save!"
- endcatch
-
- printlog " - always create backup copy"
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "tools/options/load-save/general: save-> always create backup copy<Return>"
- printlog " open tools / options / load & save / general"
- ToolsOptions
- hToolsOptions ( "LoadSave", "General" )
-
- if bSave = TRUE then DokumenteigenschaftenBearbeiten.Check else DokumenteigenschaftenBearbeiten.UnCheck
- bSave = Sicherungskopie.IsChecked
- Sicherungskopie.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (3)
-
- if app.Dir ( sFilebak ) <> "" then Warnlog "Before saving the document the backup-file exists!"
- hFileSave
- if app.Dir ( sFilebak ) = "" then Warnlog "After saving the document the backup-file doesn't exists => BUG!"
-
- printlog " - autosave : after 1 min, with prompt"
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "tools/options/load-save/general: save-> autosave after 1 min with prompt<Return>"
- ToolsOptions
- hToolsOptions ( "LoadSave", "General" )
-
- if bSave = TRUE then Sicherungskopie.Check else Sicherungskopie.UnCheck
- bSave = AutomatischSpeichern.IsChecked
- AutomatischSpeichern.Check
- sSaveTime = 15 'debug
-
- Minuten.SetText "2"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (130)
-
- for i=1 to 2
- Kontext "Active"
- if Active.Exists (3) then
- Active.Yes
- Kontext "SpeichernDlg"
- if SpeichernDlg.Exists then SpeichernDlg.Cancel
- Sleep (2)
- printlog "Active came up :-) " + i
- else
- printlog "Active didn't come up :-( " + i
- end if
- next i
-
- printlog " - close the document and check the saved data"
- hCloseDocument ' closes the document with 'discard'
- hFileOpen ( sFilename )
-kontext
-if active.exists(5) then
-warnlog active.gettext
-goto endsub
-endif
- ' This part compares the content of the file after reload with text entered
- ' during the entire test. It should contain three lines of text.
- printlog( " - Compare the content of the file with the text entered during the test." )
- printlog( " First line..." )
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up>", 5
- DocumentWriter.TypeKeys "<Home>"
- DocumentWriter.TypeKeys "<Shift End>"
- EditCopy
- WaitSlot()
- if lcase ( GetClipboardText ) <> "tools/options/load-save/general: save-> edit document properties before saving" then Warnlog "The first sentence is wrong!"
-
- printlog( " Second line..." )
- DocumentWriter.TypeKeys "<Down>"
- DocumentWriter.TypeKeys "<Home>"
- DocumentWriter.TypeKeys "<Shift End>"
- EditCopy
- WaitSlot()
- if lcase ( GetClipboardText ) <> "tools/options/load-save/general: save-> always create backup copy" then Warnlog "The second sentence is wrong!"
-
- printlog( " Third line..." )
- DocumentWriter.TypeKeys "<Down>"
- DocumentWriter.TypeKeys "<Home>"
- DocumentWriter.TypeKeys "<Shift End>"
- EditCopy
- WaitSlot()
- if lcase ( GetClipboardText ) <> "tools/options/load-save/general: save-> autosave after 1 min with prompt" then Warnlog "The third sentence is wrong!"
-
- hCloseDocument
-
- printlog " - load the backup-file"
- hOpenFile ( sFilebak )
-
- Kontext "Filterauswahl"
- if Filterauswahl.Exists(2) then
- warnlog "Is bugId 107399 present? => Detection of our own fileformar fails when the extension is not the standard extension!"
- Filterauswahl.Close
- else
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up>", 5
- DocumentWriter.TypeKeys "<Home>"
- DocumentWriter.TypeKeys "<Shift End>"
- EditCopy
-
- WaitSlot()
-
- if GetClipboardText <> "" then
- call hCloseDocument
- else
- warnlog "Perhaps the bak-file was not loaded. => Verify BugID 86607!"
- end if
- end if
-
- printlog " - reset options"
- ToolsOptions
- hToolsOptions ( "LoadSave", "General" )
- AutomatischSpeichern.Check
- Minuten.SetText sSaveTime
- if bSave = TRUE then AutomatischSpeichern.Check else AutomatischSpeichern.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_LoadSaveGeneral_2
- Dim bSave as Boolean
- Dim sFilename, sFilename2, sCharSet as String
-
- const ICWAIT as integer = 1
-
-
- sFilename = ConvertPath ( gOfficePath + "user\work\o_save_1.html" )
- sFilename2 = ConvertPath ( gOfficePath + "user\work\o_save_2.html" )
-
- if app.dir ( sFilename ) <> "" then app.kill ( sFilename )
- if app.dir ( sFilename2 ) <> "" then app.kill ( sFilename2 )
-
- printlog " - save"
- printlog " - save URL relative to"
-
- if bAsianLan = TRUE then
- sCharSet = GetHTMLCharSet
- if SetHTMLCharSetToUTF8 = FALSE then
- Warnlog "The test cannot find the UTF8 Character Set for HTML-Export. The test can have many errors at saving HTML-Files!"
- else
- printlog "The Character Set for HTML-Export is now Unicode UTF8!"
- end if
- end if
-
- gApplication = "HTML"
- hNewDocument
-
- if gNetzInst = TRUE then
- hGrafikEinfuegen ( ConvertPath ( gNetzOfficePath + "share\gallery\photos\desert1.jpg" ) )
- else
- hGrafikEinfuegen ( ConvertPath ( gOfficePath + "share\gallery\photos\desert1.jpg" ) )
- end if
-
- printlog " - relative to filesystem"
- ToolsOptions
- hToolsOptions ( "LoadSave", "General" )
-
- bSave = URLimDateisystem.IsChecked
- URLimDateisystem.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog " save the HTML file"
- hFileSaveAs ( sFilename )
-
- printlog " check the relativ path in source code of HTML file"
- Call URLGraphicCheck ( TRUE, sFilename )
-
- printlog " - relative to filesystem ( unchecked )"
- ToolsOptions
- hToolsOptions ( "LoadSave", "General" )
-
- URLimDateisystem.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog " save the HTML file"
- hFileSaveAs ( sFilename2 )
-
- printlog " check the hard coded path in source code of HTML file"
- Call URLGraphicCheck ( FALSE, sFilename2 )
-
- hCloseDocument
-
- printlog " - reset the options"
- ToolsOptions
- hToolsOptions ( "LoadSave", "General" )
-
- if bSave = TRUE then URLimDateisystem.Check else URLimDateisystem.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "No test for 'relative to internet'"
-
- if bAsianLan = TRUE then
- printlog Chr(13 ) + "Reset the Character Set back to default : " + sCharSet
- SetHTMLCharSet ( sCharSet )
- end if
-
- gApplication = "WRITER"
-endcase
-
-
diff --git a/testautomation/framework/optional/includes/options_ooo_accessibility.inc b/testautomation/framework/optional/includes/options_ooo_accessibility.inc
index 93e389a67d69..93e389a67d69 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_accessibility.inc
+++ b/testautomation/framework/optional/includes/options_ooo_accessibility.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_appearance.inc b/testautomation/framework/optional/includes/options_ooo_appearance.inc
index afe8efa26be7..afe8efa26be7 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_appearance.inc
+++ b/testautomation/framework/optional/includes/options_ooo_appearance.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_colors.inc b/testautomation/framework/optional/includes/options_ooo_colors.inc
index ccf4b4642173..ccf4b4642173 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_colors.inc
+++ b/testautomation/framework/optional/includes/options_ooo_colors.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_fontreplacement.inc b/testautomation/framework/optional/includes/options_ooo_fontreplacement.inc
index d83be235b765..d83be235b765 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_fontreplacement.inc
+++ b/testautomation/framework/optional/includes/options_ooo_fontreplacement.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_general.inc b/testautomation/framework/optional/includes/options_ooo_general.inc
index 8197a4fe54d9..998820e5f683 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_general.inc
+++ b/testautomation/framework/optional/includes/options_ooo_general.inc
@@ -1,5 +1,5 @@
'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
+'*******************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,41 +23,21 @@
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
-'/************************************************************************
+'/******************************************************************************
'*
-'* owner : thorsten.bosbach@sun.com
+'* owner : joerg.skottke@sun.com
'*
-'* short description : Grid Layout for CJK test in Writer
+'* short description : 1. test for general group userdata
'*
-'\***********************************************************************
+'\******************************************************************************
-private const SOURCE_PATH = "framework\optional\input\CJK\"
+testcase tOOoGeneral
-testcase tTextGridDialog_1
+ dim lsSave (4) as String
+ dim lbSave (3) as Boolean
- '/// Check if tabpage 'Text Grid' disappears when "Asian Language support" is NOT checked
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- hNewDocument()
- FormatPageWriter
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- warnlog "Shouldn't get Tabpage: Grid Text"
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- endcatch
- endif
+ hNewDocument
- '/// Check if tabpage 'Text Grid' appears when "Asian Language support" is checked
- Call CheckAsianLanguageSupport("On")
-
- hNewDocument
ToolsOptions
hToolsOptions ( "StarOffice", "General" )
@@ -81,503 +61,70 @@ testcase tTextGridDialog_1
StyleSheet.Select 3
Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- if ( ExtrasOptionenDlg.notExists( 3 ) ) then
- printlog( "Options closed" )
- endif
- hCloseDocument()
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tTextGridDialog_2
- '/// No grid is active, no changes to existing version
- Dim testFile , sCorrectResult as String
-
- testFile = "gridtest.sxw"
- sCorrectResult = "1"
-
- Call hNewDocument
-
- '/// open a test file , and check No Grid checkbox
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
-
- FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
- endif
- Kontext "TabGrid"
- NoGrid.Check
- Sleep 1
- TabGrid.OK
- Sleep 1
-
- '/// Active navigator dialogue , set page to '2' and wait for a while
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
-
- Seitennummer.SetText "2"
- Sleep 5
- hCloseNavigator
-
- '/// In No Grid mode, there should be only 1 page, the focus is before the first line
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<Shift Left>"
- hUseAsyncSlot( "EditCopy" )
-
- if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing NoGrid option!"
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tTextGridDialog_3
- '/// Grid (lines only): The page is set up with a defined number of lines
- Dim testFile , sCorrectResult , sLinesPerPage as String
-
- testFile = "gridtest.sxw"
- sCorrectResult = "G"
- sLinesPerPage = "10"
-
- Call hNewDocument
-
- '/// open a test file and check Grid(lines onle) checkbox ,
- '/// + set 10 line/page
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
- FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
- endif
- Kontext "TabGrid"
- LinesGrid.Check
- LinesPerPage.SetText sLinesPerPage
- Sleep 1
- TabGrid.OK
- Sleep 1
-
- '/// Active navigator dialogue , set page to '2' and wait for a while
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
-
- Seitennummer.SetText "2"
- Sleep 5
- hCloseNavigator
-
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<Shift Left>"
- hUseAsyncSlot( "EditCopy" )
-
- if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines only) option!"
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tTextGridDialog_4
- '/// Grid (lines and characters): The page is set up with a defined number of lines and a defined number of characters in each line
- Dim testFile , sCorrectResult as String
- Dim sLinesPerPage , sCharsPerLine as String
-
- testFile = "gridtest.sxw"
- sCorrectResult = "E"
- sLinesPerPage = "10"
- sCharsPerLine = "9"
-
- Call hNewDocument
-
- '/// open a test file and check Grid(lines and characters) checkbox
- '/// + set 10 line/page and 9 characters/line
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
- FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
- endif
- Kontext "TabGrid"
- CharsGrid.Check
- LinesPerPage.SetText sLinesPerPage
- CharsPerLine.SetText sCharsPerLine
- Sleep 1
- TabGrid.OK
- Sleep 1
-
- '/// Active navigator dialogue , set page to '2' and wait for a while
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
-
- Seitennummer.SetText "2"
- Sleep 5
- hCloseNavigator
-
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<Shift Left>"
- hUseAsyncSlot( "EditCopy" )
-
- if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines and characters) option!"
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGridDisplay_1
- '/// Print grid: The grid lines will be printed. Inactive if "Display grid" is inactive.
- Call hNewDocument
-
- '/// format / page / tabpage Text grid
- '/// + check "display grid" and check "print grid"
- FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
- endif
- Kontext "TabGrid"
- CharsGrid.Check
- Display.Check
- Sleep 1
- PrintGrid.Check
- Sleep 1
- TabGrid.OK
- Sleep 1
-
- '/// Print to printer
- FilePrint
- Kontext "Active"
- if ( Active.Exists( 5 ) ) then
- if Active.GetRT() = 304 then
- Active.Ok()
- QAErrorLog "No Default-Printer!"
- Kontext "Printing"
- if ( Printing.exists( 1 )) then
- Printing.Cancel
- endif
- endif
- else
- Kontext "Printing"
- if ( Printing.exists( 2 )) then
- Printing.OK()
- Printing.notExists( 5 )
- endif
-
- kontext "Active"
- if active.exists(5) then
- qaErrorLog active.getText()
- active.ok()
- endif
- endif
-
- '/// format / page / tabpage Text grid
- '/// + check "display grid" and uncheck "print grid"
- FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
- endif
- Kontext "TabGrid"
- CharsGrid.Check
- Display.Check
- Sleep 1
- PrintGrid.UnCheck
- Sleep 1
- TabGrid.OK
- Sleep 1
-
- '/// Print to printer
- FilePrint
- Kontext "Active"
- if ( Active.Exists( 5 ) )then
- if Active.GetRT() = 304 then
- Active.Ok()
- QAErrorLog "No Default-Printer!"
- Kontext "Printing"
- if ( Printing.exists( 1 )) then
- Printing.Cancel()
- endif
- endif
- else
- Kontext "Printing"
- if( Printing.exists( 1 )) then
- Printing.OK
- Printing.notExists( 5 )
- endif
- kontext
- if ( active.exists( 2 ) ) then
- qaErrorLog active.getText
- active.ok
- endif
- endif
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tUserDefineLayout_1
- '/// Decrease characters per line will cause lines per page decrease accordingly
- Dim sLinesPerPage , sCharsPerLine as String
- Dim sExpectLinesPerPage , sExpectLinesPerPage1 as String
-
- sLinesPerPage = "20"
- sCharsPerLine = "2"
- sExpectLinesPerPage = "2"
- sExpectLinesPerPage1 = "3"
-
- Call hNewDocument
-
- '/// Format/page , set lines per page to 20, and set charsets per line to 2
- '/// + wait for a moment , then check the the number of lines per page.
- FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
- endif
- Kontext "TabGrid"
- CharsGrid.Check
-
- LinesPerPage.SetText sLinesPerPage
- Sleep 2
- CharsPerLine.SetText sCharsPerLine
- Sleep 2
-
- 'This step is no use, just let the LinesPerPage change the number
- CharsGrid.Check
-
- if LinesPerPage.GetText <> sExpectLinesPerPage AND LinesPerPage.GetText <> sExpectLinesPerPage1 then
- Warnlog "The lines per page should be" + sExpectLinesPerPage + " OR " + sExpectLinesPerPage1 +" but get " +LinesPerPage.GetText
- endif
-
- TabGrid.Cancel
+ hCloseDialog( ExtrasOptionenDlg, "ok" )
+ hCloseDocument
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tFontSizeChanges_1
- '/// Change the font size to bigger enough will change the layout
- Dim testFile , sCorrectResult as String
- Dim sLinesPerPage , sCharsPerLine as String
- dim sTemp as string
-
- testFile = "FontSizeChanges_1.sxw"
- sCorrectResult = "1"
- sLinesPerPage = "2"
- sCharsPerLine = "9"
-
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Shift Right>"
-
- Kontext "FormatObjectbar"
- Schriftgroesse.Select "60"
- Schriftgroesse.TypeKeys "<Return>"
- Sleep 1
-
- Kontext "DocumentWriter"
- FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
- endif
- Kontext "TabGrid"
- if TabGrid.exists(5) then
- sTemp = LinesPerPage.GetText
- if sTemp <> sLinesPerPage then
- Warnlog "The lines per page should be: '" + sLinesPerPage + "'; but get: '" + sTemp + "'"
- endif
- sTemp = CharsPerLine.GetText
- if sTemp <> sCharsPerLine then
- Warnlog "The chars per line should be: '" + sCharsPerLine + "'; but get: '" +sTemp + "'"
- endif
- TabGrid.Cancel
- else
- warnlog "TabGrid is not available."
- endif
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- if NavigatorWriter.exists(5) then
- Seitennummer.SetText "2"
- Sleep 5
- else
- warnlog "Navigator not available"
- endif
- hCloseNavigator
-
- Kontext "DocumentWriter"
- sleep 3
- Call DocumentWriter.TypeKeys "<Shift Right>"
-
- hUseAsyncSlot( "EditCopy" )
- sTemp = GetClipboardText
- if sTemp <> sCorrectResult then
- Warnlog "Don't get the expected result , hope to be: '" + sCorrectResult + "'; but get: '" + sTemp + "'"
- endif
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tRubyText_1
- '/// If Ruby Text is applied and longer than its Base Text it will stretch over more grid cells than the base text itself.
- Dim testFile , sRubyText as String
-
- testFile = "rubytest.sxw"
- sRubyText = "Ruby Test Text ....................."
-
- Call hNewDocument
-
- '/// open a test file , and insert long ruby test text
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Shift Right>"
- Sleep 1
-
- FormatRuby
- Kontext "RubyDialog"
- Sleep 3
- RubyText1.setText sRubyText
- Sleep 2
- RubyDialog.OK
- Sleep 2
- DialogClose.Click
- Sleep 1
-
- Kontext "DocumentWriter"
- FormatAutoformatApply
- Sleep 2
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 2
- Call DocumentWriter.TypeKeys "<Shift Left>"
- hUseAsyncSlot( "EditCopy" )
-
- if NOT(GetClipboardText = "5" OR GetClipboardText = "6") then
- Warnlog "Don't get the correct result after inserting ruby text! Get " + GetClipboardText
- endif
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tIndentsTest_1
- '/// Indents should work and always indenting as close as possible to their measurements by snapping to the appropriate grid cell. Tabs therefore will be ignored.
- Dim testFile , sCorrectPage1 , sCorrectPage2 as String
-
- testFile = "IndentsTest.sxw"
- sCorrectPage1 = "1"
- sCorrectPage2 = "2"
-
- Call hNewDocument
-
- '/// open a test file , and press TAB in second line
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Down>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<Tab>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 1
+ printlog " - exit/restart StarOffice"
+ ExitRestartTheOffice
- '/// Active navigator dialogue , check if the page number is 1
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
- hCloseNavigator
-
- '/// press TAB in second line again
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Home>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<Tab>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 1
-
- '/// Active navigator dialogue , check if the page number is 2
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
- hCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tObjectsTest_1
- '/// If objects are anchored to text they will "wander" with its surrounding text.
- '/// If they are anchored as character they will snap to the appropriate grid cell (since they are a character).
- Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+ printlog " - check data"
+ ToolsOptions
+ hToolsOptions ( "StarOffice", "General" )
- testFile = "objectsTest.sxw"
- sCorrectPage1 = "1"
- sCorrectPage2 = "2"
+ if Zweistellig.GetText <> "1950" then Warnlog "Year ( 2 digits ) => changes not saved: '" + Zweistellig.GetText +"' #i29810"
+ if Aktivieren.IsChecked <> TRUE then Warnlog "Enable HelpAgent => changes not saved"
+ Zuruecksetzen.Click
+ if gPlatgroup = "w95" then
+ if StarOfficeDialogeBenutzen.IsChecked = lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
+ end if
+ If DruckenStatus.IsChecked = lbSave ( 3 ) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
- Call hNewDocument
+ printlog " - 2. change data"
+ Zweistellig.SetText "1800"
+ DruckenStatus.UnCheck
- '/// open a test file , and press TAB in second line
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ Kontext "ExtrasOptionenDlg"
+ hCloseDialog( ExtrasOptionenDlg, "ok" )
- '/// If object is anchored as Character , check if it will snap to the appropriate grid cell
- fStartupNavigator( "OLEObject" , 1 )
- Sleep 1
- Auswahlliste.TypeKeys "<Return>"
- Sleep 1
- hCloseNavigator
+ printlog " - check data"
+ ToolsOptions
+ hToolsOptions ( "StarOffice", "General" )
- Kontext
- FormatAnchorAsCharacter
- WaitSlot()
+ if Zweistellig.GetText <> "1800" then Warnlog "Year ( 2 digits ) => changes not saved : '" + Zweistellig.GetText +"'"
+ If DruckenStatus.IsChecked <> FALSE then Warnlog "Printing sets 'Document modified' status => changes not saved!"
+ if StyleSheet.GetSelIndex <> 3 then Warnlog "Style sheet for StarOffice Help => changes not saved!"
+ printlog " - reset to saved data"
+ Zweistellig.SetText lsSave ( 1 )
+ Aktivieren.Check
+ Zuruecksetzen.Click
+ if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
+ if gPlatgroup = "w95" then
+ if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
+ end if
+ If lbSave(3)= TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
+ StyleSheet.Select lsSave(3)
- ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText sCorrectPage2
- Sleep 5
- if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Something wrong when object is anchored as Character!"
- hCloseNavigator
+ Kontext "ExtrasOptionenDlg"
+ hCloseDialog( ExtrasOptionenDlg, "ok" )
- '/// If object is anchored to Character , check if it will NOT snap to the appropriate grid cell
- fStartupNavigator( "OLEObject" , 1 )
- Auswahlliste.TypeKeys "<Return>"
- hCloseNavigator
+ ToolsOptions
+ hToolsOptions ( "StarOffice", "General" )
- Kontext
- FormatAnchorToCharacter
+ printlog " - check the reset data"
+ if Zweistellig.GetText <> lsSave ( 1 ) then Warnlog "Year ( 2 digits ) => changes not saved"
+ if Aktivieren.IsChecked <> lbSave (1) then Warnlog "Enable HelpAgent => changes not saved"
+ Aktivieren.Check
+ Zuruecksetzen.Click
+ if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
+ if gPlatgroup = "w95" then
+ if StarOfficeDialogeBenutzen.IsChecked <> lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
+ end if
+ If DruckenStatus.IsChecked <> lbSave(3) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
+ if StyleSheet.GetSelText <> lsSave (3) then Warnlog "Style sheet for StarOffice Help => changes not saved!"
- ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText sCorrectPage2
- Sleep 5
- if Seitennummer.GetText <> sCorrectPage1 then Warnlog "Something wrong when object is anchored to Character!"
- hCloseNavigator
- Kontext
+ Kontext "ExtrasOptionenDlg"
+ hCloseDialog( ExtrasOptionenDlg, "ok" )
- Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/options_ooo_java.inc b/testautomation/framework/optional/includes/options_ooo_java.inc
index 4e8d39e124d9..4e8d39e124d9 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_java.inc
+++ b/testautomation/framework/optional/includes/options_ooo_java.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_memory.inc b/testautomation/framework/optional/includes/options_ooo_memory.inc
index 3f50fb90076d..3f50fb90076d 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_memory.inc
+++ b/testautomation/framework/optional/includes/options_ooo_memory.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_paths.inc b/testautomation/framework/optional/includes/options_ooo_paths.inc
index 692f538d6507..692f538d6507 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_paths.inc
+++ b/testautomation/framework/optional/includes/options_ooo_paths.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_print.inc b/testautomation/framework/optional/includes/options_ooo_print.inc
index 23cced8c737d..23cced8c737d 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_print.inc
+++ b/testautomation/framework/optional/includes/options_ooo_print.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_security.inc b/testautomation/framework/optional/includes/options_ooo_security.inc
index c3dece4de849..c3dece4de849 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_security.inc
+++ b/testautomation/framework/optional/includes/options_ooo_security.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_userdata.inc b/testautomation/framework/optional/includes/options_ooo_userdata.inc
index 9d5da5da6194..9d5da5da6194 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_userdata.inc
+++ b/testautomation/framework/optional/includes/options_ooo_userdata.inc
diff --git a/testautomation/framework/optional/includes/options_ooo_view.inc b/testautomation/framework/optional/includes/options_ooo_view.inc
index ff3ee7936751..ff3ee7936751 100644..100755
--- a/testautomation/framework/optional/includes/options_ooo_view.inc
+++ b/testautomation/framework/optional/includes/options_ooo_view.inc
diff --git a/testautomation/framework/optional/includes/scripting_basics.inc b/testautomation/framework/optional/includes/scripting_basics.inc
index 36f5ce44feec..879597852d98 100644..100755
--- a/testautomation/framework/optional/includes/scripting_basics.inc
+++ b/testautomation/framework/optional/includes/scripting_basics.inc
@@ -36,7 +36,7 @@ testcase tScripting
const ORGANIZER_ITEMS = 2
- hInitBackingMode()
+ hFileCloseAll()
ToolsMacrosOrganizeMacrosBeanShell
diff --git a/testautomation/framework/optional/includes/scripting_organizers.inc b/testautomation/framework/optional/includes/scripting_organizers.inc
index b9b7dcebde7a..d5159cd383ee 100644..100755
--- a/testautomation/framework/optional/includes/scripting_organizers.inc
+++ b/testautomation/framework/optional/includes/scripting_organizers.inc
@@ -178,7 +178,7 @@ testcase tScriptingOrganizers( iDialog as integer )
endif
kontext "ScriptOrganizer"
- brc = hCloseScriptOrganizer()
+ hCloseDialog( ScriptOrganizer, "close" )
printlog( "" )
printlog( "Test 3: Script storage in documents (save/load)" )
@@ -225,7 +225,7 @@ testcase tScriptingOrganizers( iDialog as integer )
endif
kontext "ScriptOrganizer"
- brc = hCloseScriptOrganizer()
+ hCloseDialog( ScriptOrganizer, "close" )
try
hFileSave
@@ -250,7 +250,8 @@ testcase tScriptingOrganizers( iDialog as integer )
iItemCount = hGetNodeCount( ScriptTreeList )
if ( iItemCount <> IDOCPOS ) then
warnlog( "Treelist not populated, the test cannot continue" )
- brc = hCloseScriptOrganizer()
+ kontext "ScriptOrganizer"
+ hCloseDialog( ScriptOrganizer, "close" )
brc = hDestroyDocument()
goto endsub
endif
@@ -260,9 +261,11 @@ testcase tScriptingOrganizers( iDialog as integer )
warnlog( "Not all libraries/scripts have been deleted" )
endif
- brc = hCloseScriptOrganizer()
+ kontext "ScriptOrganizer"
+ hCloseDialog( ScriptOrganizer, "close" )
- brc = hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
brc = hDestroyDocument()
diff --git a/testautomation/framework/optional/includes/security_broken_signature.inc b/testautomation/framework/optional/includes/security_broken_signature.inc
index 3d7d822a9693..3d7d822a9693 100644..100755
--- a/testautomation/framework/optional/includes/security_broken_signature.inc
+++ b/testautomation/framework/optional/includes/security_broken_signature.inc
diff --git a/testautomation/framework/optional/includes/security_certification_dialogs.inc b/testautomation/framework/optional/includes/security_certification_dialogs.inc
index 2b645712cc02..2b645712cc02 100644..100755
--- a/testautomation/framework/optional/includes/security_certification_dialogs.inc
+++ b/testautomation/framework/optional/includes/security_certification_dialogs.inc
diff --git a/testautomation/framework/optional/includes/security_certified_docs.inc b/testautomation/framework/optional/includes/security_certified_docs.inc
index 59f74e809c6f..b00e5460e3fb 100644..100755
--- a/testautomation/framework/optional/includes/security_certified_docs.inc
+++ b/testautomation/framework/optional/includes/security_certified_docs.inc
@@ -52,14 +52,14 @@ testcase tLoadCertifiedFile( cBuildID as string )
sFileOut = hGetWorkPath() & "certificate_data.txt"
' Variable to store boolean returncodes from functions
- dim brc as boolean
- brc = true
+ dim brc as boolean : brc = true
+ dim irc as boolean : irc = 0
' the number of certificates attached to the current document
dim iCertCount as integer
printlog( "Load the file" )
- brc = hFileOpen( cFile )
+ hFileOpen( cFile )
brc = hHandleActivesOnLoad( 0 , 2 )
' in case the file did not get loaded, handle the problem by aborting the test
@@ -122,12 +122,8 @@ testcase tLoadCertifiedFile( cBuildID as string )
kontext "TabXMLSecDetails"
hGetListItems( XMLSecDetailsListBox, sCertData() )
- brc = hManageComparisionList( sFileIn, sFileOut, sCertData() )
- if ( not brc ) then
- warnlog( "The data of the certificate appears to be incorrect" )
- else
- printlog( "Verification of the certificate succeeded" )
- endif
+ irc = hManageComparisionList( sFileIn, sFileOut, sCertData() )
+ hListResultEvaluation( irc , 0 )
SkipEditBrowseBox:
diff --git a/testautomation/framework/optional/includes/security_evilmacro1.inc b/testautomation/framework/optional/includes/security_evilmacro1.inc
index 7fb6ad1de02a..7fb6ad1de02a 100644..100755
--- a/testautomation/framework/optional/includes/security_evilmacro1.inc
+++ b/testautomation/framework/optional/includes/security_evilmacro1.inc
diff --git a/testautomation/framework/optional/includes/security_evilmacro2.inc b/testautomation/framework/optional/includes/security_evilmacro2.inc
index 00ae5ee0a938..00ae5ee0a938 100644..100755
--- a/testautomation/framework/optional/includes/security_evilmacro2.inc
+++ b/testautomation/framework/optional/includes/security_evilmacro2.inc
diff --git a/testautomation/framework/optional/includes/security_evilmacro3.inc b/testautomation/framework/optional/includes/security_evilmacro3.inc
index 1fb86e329088..1fb86e329088 100644..100755
--- a/testautomation/framework/optional/includes/security_evilmacro3.inc
+++ b/testautomation/framework/optional/includes/security_evilmacro3.inc
diff --git a/testautomation/framework/optional/includes/security_incorrect_password.inc b/testautomation/framework/optional/includes/security_incorrect_password.inc
index eedbc8c67896..bc218edcc7bb 100644..100755
--- a/testautomation/framework/optional/includes/security_incorrect_password.inc
+++ b/testautomation/framework/optional/includes/security_incorrect_password.inc
@@ -32,37 +32,32 @@
'\******************************************************************************
testcase tIncorrectPassword( filetypeID as string )
-
- const WORKFILE = "password"
- dim suffix as string
- dim workpath as string
-
dim rc as integer
dim brc as boolean
dim iCurrentFilter as integer
dim cCurrentFilter as string
+ dim filepath as string
const PASSWORD_VALID = "MyPasswd09#+1"
const PASSWORD_FALSE = "MyPasswd00#+1"
const DOC_ID = "f_sec_incorrect_password.bas testdocument"
-
- workpath = hGetWorkPath()
-
- suffix = hGetSuffix( filetypeID )
+
+ printlog( "Build a valid filename with full path and suffix" )
+ filepath = hGetWorkPath() & "password" & hGetSuffix( filetypeID )
+ printlog( "The workfile is: " & filepath )
printlog( "Delete the workfile - if it was left over by a former testrun" )
- hDeleteFile( workpath & WORKFILE & suffix )
+ hDeleteFile( filepath )
printlog( "Make sure we have exactly one single document open" )
- hFileCloseAll()
- hCreateDocument()
+ hInitSingleDoc()
printlog( "Change the document" )
hChangeDoc()
printlog( "Click on FileSave" )
- FileSave
+ hUseAsyncSlot( "FileSave" )
Kontext "SpeichernDlg"
if ( SpeichernDlg.exists( 1 ) ) then
diff --git a/testautomation/framework/optional/includes/security_macrosecurity.inc b/testautomation/framework/optional/includes/security_macrosecurity.inc
index b996ff4a2cf8..1c9d360da9e6 100644..100755
--- a/testautomation/framework/optional/includes/security_macrosecurity.inc
+++ b/testautomation/framework/optional/includes/security_macrosecurity.inc
@@ -59,7 +59,10 @@ testcase tMacroSecurityLevels( cFileFormat )
cWorkFile = convertToURL( cWorkFile )
dim iSecLevel as integer
- dim brc as boolean
+
+ const EXPECTED_MESSAGECOUNT = 1
+ const ALLOW_ONE_EXTRA_MESSAGEBOX = 1
+ const ALLOW_NO_EXTRA_MESSAGEBOXES = 0
' We have quite a bunch of possible combinations here. Some trigger a security warning
' others do not. Depending on the security level we either get no warning at all, the
@@ -76,7 +79,7 @@ testcase tMacroSecurityLevels( cFileFormat )
' *) Covered by test "f_sec_trusted_path.bas"
printlog( "Load a document with macro for each of the four security levels" )
- for iSecLevel = 0 to 3
+ for iSecLevel = GC_MACRO_SECURITY_LEVEL_LOW to GC_MACRO_SECURITY_LEVEL_VERYHIGH
printlog( "Set macro security level to " & iSecLevel )
hSetMacroSecurityAPI( iSecLevel )
@@ -86,46 +89,46 @@ testcase tMacroSecurityLevels( cFileFormat )
printlog( "Check security level dependent behavior" )
select case iSecLevel
- case 0 : brc = hIdentifyExecutedMacro()
- if ( not brc ) then
- if ( gApplication = "MATH" ) then
- qaerrorlog( "#i68291# Math document forgets eventbinding" )
- else
- warnlog( "#i53711# Macro was not found/executed" )
- endif
- endif
-
- case 1 : brc = hAllowMacroExecution()
- if ( not brc ) then
- warnlog( "Macro execution warning missing, chek the file/security settings" )
- endif
- brc = hIdentifyExecutedMacro()
- if ( not brc ) then
- if ( gApplication = "MATH" ) then
- qaerrorlog( "#i68291# Math document forgets eventbinding" )
- else
- warnlog( "#i53711# Macro was not found/executed" )
- endif
- endif
-
- case 2 : brc = hHandleActivesOnLoad( 1 , 1 )
- if ( not brc ) then
- qaerrorlog( "#i53710# unexpected second messagebox" )
- endif
- brc = hIdentifyExecutedMacro()
- if ( brc ) then
- warnlog( "Macro was executed" )
- endif
-
- case 3 : brc = hHandleActivesOnLoad( 1 , 0 )
- brc = hIdentifyExecutedMacro()
- if ( brc ) then
- warnlog( "Macro was executed" )
- endif
+ case GC_MACRO_SECURITY_LEVEL_LOW :
+
+ if ( not hIdentifyExecutedMacro() ) then
+ warnlog( "#i110184# - Macro was not executed" )
+ endif
+
+ case GC_MACRO_SECURITY_LEVEL_MEDIUM :
+
+ if ( not hAllowMacroExecution() ) then
+ warnlog( "#i110184# - Macro execution warning missing, check the file/security settings" )
+ endif
+
+ if ( not hIdentifyExecutedMacro() ) then
+ warnlog( "#i110184# - Macro was not executed" )
+ endif
+
+ case GC_MACRO_SECURITY_LEVEL_HIGH :
+
+ if ( not hHandleActivesOnLoad( EXPECTED_MESSAGECOUNT , ALLOW_ONE_EXTRA_MESSAGEBOX ) ) then
+ warnlog( "#i53710# unexpected second messagebox" )
+ endif
+
+ if ( hIdentifyExecutedMacro() ) then
+ warnlog( "Macro was executed" )
+ endif
+
+ case GC_MACRO_SECURITY_LEVEL_VERYHIGH :
+
+ if ( not hHandleActivesOnLoad( EXPECTED_MESSAGECOUNT , ALLOW_NO_EXTRA_MESSAGEBOXES ) ) then
+ warnlog( "#i53710# unexpected second messagebox" )
+ endif
+
+ if ( hIdentifyExecutedMacro() ) then
+ warnlog( "Macro was executed" )
+ endif
+
end select
printlog( "Close document" )
- brc = hDestroyDocument()
+ hDestroyDocument()
next iSecLevel
diff --git a/testautomation/framework/optional/includes/security_recommend_password.inc b/testautomation/framework/optional/includes/security_recommend_password.inc
index eaceab3691b9..628fdecd7ae5 100644..100755
--- a/testautomation/framework/optional/includes/security_recommend_password.inc
+++ b/testautomation/framework/optional/includes/security_recommend_password.inc
@@ -80,11 +80,8 @@ testcase tRecommendPassword( filetypeID as string )
if ( rc = 0 ) then
- if AutomatischeDateinamenserweiterung.Exists then
- AutomatischeDateinamenserweiterung.Uncheck
- endif
-
-
+ AutomatischeDateinamenserweiterung.Uncheck
+
printlog( "Name the file" )
Dateiname.settext( workpath & workfile )
@@ -117,6 +114,5 @@ testcase tRecommendPassword( filetypeID as string )
printlog( "Close the current document" )
call hCloseDocument()
-
endcase
diff --git a/testautomation/framework/optional/includes/security_trusted_path.inc b/testautomation/framework/optional/includes/security_trusted_path.inc
index 679abdcc9be4..679abdcc9be4 100644..100755
--- a/testautomation/framework/optional/includes/security_trusted_path.inc
+++ b/testautomation/framework/optional/includes/security_trusted_path.inc
diff --git a/testautomation/framework/optional/includes/standardbar2.inc b/testautomation/framework/optional/includes/standardbar2.inc
index a4252179b198..3d2b87f33b7b 100644..100755
--- a/testautomation/framework/optional/includes/standardbar2.inc
+++ b/testautomation/framework/optional/includes/standardbar2.inc
@@ -90,9 +90,10 @@ testcase tStandardBar_2
sleep( 1 )
hMenuselectNr ( iNewButtonItem )
- sleep( 3 )
+ hFileWait() ' was sleep( 3 )
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
select case iNewButtonItem
case 1 : Kontext "DocumentWriter"
diff --git a/testautomation/framework/optional/includes/toolbar_behavior.inc b/testautomation/framework/optional/includes/toolbar_behavior.inc
index 5f7357df7e31..5f7357df7e31 100644..100755
--- a/testautomation/framework/optional/includes/toolbar_behavior.inc
+++ b/testautomation/framework/optional/includes/toolbar_behavior.inc
diff --git a/testautomation/framework/optional/includes/w_grid_layout1.inc b/testautomation/framework/optional/includes/w_grid_layout1.inc
index 737cf850ad65..da339422ee8f 100644..100755
--- a/testautomation/framework/optional/includes/w_grid_layout1.inc
+++ b/testautomation/framework/optional/includes/w_grid_layout1.inc
@@ -39,7 +39,7 @@ testcase tTextGridDialog_1
if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
Call CheckAsianLanguageSupport("Off")
hNewDocument()
- FormatPageWriter
+ hUseAsyncSlot( "FormatPageWriter" )
try
Kontext
Active.SetPage TabGrid
@@ -57,25 +57,32 @@ testcase tTextGridDialog_1
'/// Check if tabpage 'Text Grid' appears when "Asian Language support" is checked
Call CheckAsianLanguageSupport("On")
- sleep 5
- FormatPageWriter
- Kontext
- if Active.exists (10) then
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- warnlog "Couldn't get Tabpage: Grid Text"
- endcatch
- else
- warnlog "FormatPageWriter didn't bring up ndialog"
- endif
+ hNewDocument
+ ToolsOptions
+ hToolsOptions ( "StarOffice", "General" )
+
+ printlog " - save old data"
+ lsSave ( 1 ) = Zweistellig.GetText
+ lbSave ( 1 ) = Aktivieren.IsChecked
+ Aktivieren.Check
+ if gPlatgroup = "w95" then
+ lbSave (2) = StarOfficeDialogeBenutzen.IsChecked
+ end if
+ lbSave ( 3 ) = DruckenStatus.IsChecked
+ lsSave ( 3 ) = StyleSheet.GetSelText
+
+ printlog " - invert/change data"
+ Zweistellig.SetText "1950"
+ Zuruecksetzen.Click
+ if gPlatgroup = "w95" then
+ if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Uncheck else StarOfficeDialogeBenutzen.Check
+ end if
+ If lbSave ( 3 ) = TRUE then DruckenStatus.Uncheck else DruckenStatus.Check
+ StyleSheet.Select 3
+
+ Kontext "ExtrasOptionenDlg"
+ hCloseDialog( ExtrasOptionenDlg, "ok" )
+
hCloseDocument()
endcase
@@ -94,25 +101,22 @@ testcase tTextGridDialog_2
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
sMakeReadOnlyDocumentEditable
- FormatPageWriter
+ hUseAsyncSlot( "FormatPageWriter" )
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
Kontext "TabGrid"
NoGrid.Check
- Sleep 1
- TabGrid.OK
- Sleep 1
+ hCloseDialog( TabGrid, "ok" )
+
'/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
Kontext "NavigatorWriter"
-
Seitennummer.SetText "2"
- Sleep 5
- hCloseNavigator
+ hCloseDialog( Navigator, "close" )
'/// In No Grid mode, there should be only 1 page, the focus is before the first line
Kontext "DocumentWriter"
@@ -142,7 +146,7 @@ testcase tTextGridDialog_3
'/// + set 10 line/page
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
sMakeReadOnlyDocumentEditable
- FormatPageWriter
+ hUseAsyncSlot( "FormatPageWriter" )
Kontext
if active.exists(5) then
Active.SetPage TabGrid
@@ -150,18 +154,14 @@ testcase tTextGridDialog_3
Kontext "TabGrid"
LinesGrid.Check
LinesPerPage.SetText sLinesPerPage
- Sleep 1
- TabGrid.OK
- Sleep 1
+ hCloseDialog( TabGrid, "ok" )
'/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
Kontext "NavigatorWriter"
-
Seitennummer.SetText "2"
- Sleep 5
- hCloseNavigator
+ hCloseDialog( Navigator, "close" )
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
@@ -192,7 +192,7 @@ testcase tTextGridDialog_4
'/// + set 10 line/page and 9 characters/line
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
sMakeReadOnlyDocumentEditable
- FormatPageWriter
+ hUseAsyncSlot( "FormatPageWriter" )
Kontext
if active.exists(5) then
Active.SetPage TabGrid
@@ -201,18 +201,14 @@ testcase tTextGridDialog_4
CharsGrid.Check
LinesPerPage.SetText sLinesPerPage
CharsPerLine.SetText sCharsPerLine
- Sleep 1
- TabGrid.OK
- Sleep 1
+ hCloseDialog( TabGrid, "ok" )
'/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
Kontext "NavigatorWriter"
-
Seitennummer.SetText "2"
- Sleep 5
- hCloseNavigator
+ hCloseDialog( Navigator, "close" )
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
@@ -233,7 +229,7 @@ testcase tGridDisplay_1
'/// format / page / tabpage Text grid
'/// + check "display grid" and check "print grid"
- FormatPageWriter
+ hUseAsyncSlot( "FormatPageWriter" )
Kontext
if active.exists(5) then
Active.SetPage TabGrid
@@ -241,14 +237,12 @@ testcase tGridDisplay_1
Kontext "TabGrid"
CharsGrid.Check
Display.Check
- Sleep 1
PrintGrid.Check
- Sleep 1
- TabGrid.OK
- Sleep 1
+ hCloseDialog( TabGrid, "ok" )
+
'/// Print to printer
- FilePrint
+ hUseAsyncSlot( "FilePrint" )
Kontext "Active"
if ( Active.Exists( 5 ) ) then
if Active.GetRT() = 304 then
@@ -262,7 +256,7 @@ testcase tGridDisplay_1
else
Kontext "Printing"
if ( Printing.exists( 2 )) then
- printing.cancel()
+ Printing.OK()
Printing.notExists( 5 )
endif
@@ -283,11 +277,8 @@ testcase tGridDisplay_1
Kontext "TabGrid"
CharsGrid.Check
Display.Check
- Sleep 1
PrintGrid.UnCheck
- Sleep 1
- TabGrid.OK
- Sleep 1
+ hCloseDialog( TabGrid, "ok" )
'/// Print to printer
FilePrint
@@ -304,7 +295,7 @@ testcase tGridDisplay_1
else
Kontext "Printing"
if( Printing.exists( 1 )) then
- printing.cancel()
+ Printing.OK
Printing.notExists( 5 )
endif
kontext
@@ -333,7 +324,7 @@ testcase tUserDefineLayout_1
'/// Format/page , set lines per page to 20, and set charsets per line to 2
'/// + wait for a moment , then check the the number of lines per page.
- FormatPageWriter
+ hUseAsyncSlot( "FormatPageWriter" )
Kontext
if active.exists(5) then
Active.SetPage TabGrid
@@ -342,16 +333,13 @@ testcase tUserDefineLayout_1
CharsGrid.Check
LinesPerPage.SetText sLinesPerPage
- Sleep 2
CharsPerLine.SetText sCharsPerLine
- Sleep 2
'This step is no use, just let the LinesPerPage change the number
CharsGrid.Check
if LinesPerPage.GetText <> sExpectLinesPerPage AND LinesPerPage.GetText <> sExpectLinesPerPage1 then
- Warnlog( "#i106381# - LInes per page changed" )
- printlog( "The lines per page should be" + sExpectLinesPerPage & " OR " & sExpectLinesPerPage1 & " but get " &LinesPerPage.GetText )
+ Warnlog "The lines per page should be" + sExpectLinesPerPage + " OR " + sExpectLinesPerPage1 +" but get " +LinesPerPage.GetText
endif
TabGrid.Cancel
@@ -362,7 +350,6 @@ endcase
'-------------------------------------------------------------------------
testcase tFontSizeChanges_1
-
'/// Change the font size to bigger enough will change the layout
Dim testFile , sCorrectResult as String
Dim sLinesPerPage , sCharsPerLine as String
@@ -381,10 +368,9 @@ testcase tFontSizeChanges_1
Kontext "FormatObjectbar"
Schriftgroesse.Select "60"
Schriftgroesse.TypeKeys "<Return>"
- Sleep 1
Kontext "DocumentWriter"
- FormatPageWriter
+ hUseAsyncSlot( "FormatPageWriter" )
Kontext
if active.exists(5) then
Active.SetPage TabGrid
@@ -393,11 +379,11 @@ testcase tFontSizeChanges_1
if TabGrid.exists(5) then
sTemp = LinesPerPage.GetText
if sTemp <> sLinesPerPage then
- Warnlog "The lines per page should be: '" & sLinesPerPage & "'; but get: '" & sTemp & "'"
+ Warnlog "The lines per page should be: '" + sLinesPerPage + "'; but get: '" + sTemp + "'"
endif
sTemp = CharsPerLine.GetText
if sTemp <> sCharsPerLine then
- Warnlog "The chars per line should be: '" & sCharsPerLine & "'; but get: '" &sTemp & "'"
+ Warnlog "The chars per line should be: '" + sCharsPerLine + "'; but get: '" +sTemp + "'"
endif
TabGrid.Cancel
else
@@ -409,11 +395,11 @@ testcase tFontSizeChanges_1
Kontext "NavigatorWriter"
if NavigatorWriter.exists(5) then
Seitennummer.SetText "2"
- Sleep 5
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close" )
else
- warnlog "Navigator not available"
+ warnlog( "Navigator not open" )
endif
- hCloseNavigator
Kontext "DocumentWriter"
sleep 3
@@ -422,7 +408,7 @@ testcase tFontSizeChanges_1
hUseAsyncSlot( "EditCopy" )
sTemp = GetClipboardText
if sTemp <> sCorrectResult then
- Warnlog "Don't get the expected result , hope to be: '" & sCorrectResult & "'; but get: '" & sTemp & "'"
+ Warnlog "Don't get the expected result , hope to be: '" + sCorrectResult + "'; but get: '" + sTemp + "'"
endif
Call hCloseDocument
@@ -444,28 +430,27 @@ testcase tRubyText_1
sMakeReadOnlyDocumentEditable
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<Shift Right>"
- Sleep 1
- FormatRuby
+ hUseAsyncSlot( "FormatRuby" )
Kontext "RubyDialog"
- Sleep 3
- RubyText1.setText sRubyText
- Sleep 2
- RubyDialog.OK
- Sleep 2
- DialogClose.Click
- Sleep 1
+ if ( RubyDialog.exists( 3 ) ) then
+ RubyText1.setText sRubyText
+ RubyDialog.OK
+ DialogClose.Click
+ else
+ warnlog( "Ruby dialog not open" )
+ endif
Kontext "DocumentWriter"
- FormatAutoformatApply
- Sleep 2
+ hUseAsyncSlot( "FormatAutoformatApply" )
+ WaitSlot( 3000 )
Call DocumentWriter.TypeKeys "<End>"
Sleep 2
Call DocumentWriter.TypeKeys "<Shift Left>"
hUseAsyncSlot( "EditCopy" )
if NOT(GetClipboardText = "5" OR GetClipboardText = "6") then
- Warnlog "Don't get the correct result after inserting ruby text! Get " & GetClipboardText
+ Warnlog "Don't get the correct result after inserting ruby text! Get " + GetClipboardText
endif
Call hCloseDocument
@@ -499,7 +484,8 @@ testcase tIndentsTest_1
ViewNavigator
Kontext "NavigatorWriter"
if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
- hCloseNavigator
+ kontext "Navigator"
+ hCloseDialog( Navigator, "cancel" )
'/// press TAB in second line again
Kontext "DocumentWriter"
@@ -515,7 +501,8 @@ testcase tIndentsTest_1
ViewNavigator
Kontext "NavigatorWriter"
if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
- hCloseNavigator
+ kontext "Navigator"
+ hCloseDialog( Navigator, "cancel" )
Call hCloseDocument
endcase
@@ -541,7 +528,8 @@ testcase tObjectsTest_1
Sleep 1
Auswahlliste.TypeKeys "<Return>"
Sleep 1
- hCloseNavigator
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close" )
Kontext
FormatAnchorAsCharacter
@@ -551,14 +539,16 @@ testcase tObjectsTest_1
ViewNavigator
Kontext "NavigatorWriter"
Seitennummer.SetText sCorrectPage2
- Sleep 5
+ WaitSlot( 5000 ) ' Sleep 5
if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Something wrong when object is anchored as Character!"
- hCloseNavigator
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close" )
'/// If object is anchored to Character , check if it will NOT snap to the appropriate grid cell
fStartupNavigator( "OLEObject" , 1 )
Auswahlliste.TypeKeys "<Return>"
- hCloseNavigator
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close" )
Kontext
FormatAnchorToCharacter
@@ -566,10 +556,10 @@ testcase tObjectsTest_1
ViewNavigator
Kontext "NavigatorWriter"
Seitennummer.SetText sCorrectPage2
- Sleep 5
+ WaitSlot( 5000 ) ' Sleep 5
if Seitennummer.GetText <> sCorrectPage1 then Warnlog "Something wrong when object is anchored to Character!"
- hCloseNavigator
- Kontext
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close" )
Call hCloseDocument
endcase
diff --git a/testautomation/framework/required/f_standard_toolbar.bas b/testautomation/framework/required/f_standard_toolbar.bas
index cbecb16bd0a5..3fdcc8fde55f 100755
--- a/testautomation/framework/required/f_standard_toolbar.bas
+++ b/testautomation/framework/required/f_standard_toolbar.bas
@@ -62,8 +62,6 @@ sub LoadIncludeFiles
use "framework\tools\includes\toolbar_tools.inc"
use "framework\tools\includes\customize_tools.inc"
- use "framework\tools\includes\performance.inc"
- use "framework\tools\includes\init_tools.inc"
gApplication = "WRITER"
call GetUseFiles
diff --git a/testautomation/framework/required/f_window_functions.bas b/testautomation/framework/required/f_window_functions.bas
index dadfeb2eb71c..2b6bd8e5a5ad 100755
--- a/testautomation/framework/required/f_window_functions.bas
+++ b/testautomation/framework/required/f_window_functions.bas
@@ -52,8 +52,6 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_docfuncs.inc"
use "global\tools\includes\optional\t_filetools.inc"
- use "framework\tools\includes\init_tools.inc"
-
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/required/f_wizards.bas b/testautomation/framework/required/f_wizards.bas
index dd26c4885568..d1f7c3e4797b 100755
--- a/testautomation/framework/required/f_wizards.bas
+++ b/testautomation/framework/required/f_wizards.bas
@@ -75,9 +75,7 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_accels.inc"
use "framework\tools\includes\wizards.inc"
- use "framework\tools\includes\init_tools.inc"
use "framework\tools\includes\template_tools.inc"
- use "framework\tools\includes\performance.inc"
gApplication = "WRITER"
call GetUseFiles()
diff --git a/testautomation/framework/required/includes/basic_dialog_export.inc b/testautomation/framework/required/includes/basic_dialog_export.inc
index 489a727545fe..489a727545fe 100644..100755
--- a/testautomation/framework/required/includes/basic_dialog_export.inc
+++ b/testautomation/framework/required/includes/basic_dialog_export.inc
diff --git a/testautomation/framework/required/includes/basic_dialog_i18n.inc b/testautomation/framework/required/includes/basic_dialog_i18n.inc
index bb1f0cf496ce..590c45a5f58a 100644..100755
--- a/testautomation/framework/required/includes/basic_dialog_i18n.inc
+++ b/testautomation/framework/required/includes/basic_dialog_i18n.inc
@@ -34,54 +34,53 @@
testcase tUpdtBasicDialogI18n
printlog( "BASIC IDE Dialog i18n." )
+ const MODULE_NAME = "tUpdtBasicDialogI18n"
+ const DIALOG_DEFAULT_TIMEOUT = 2
- dim brc as boolean
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
+ hCreateDocument()
- hCloseNavigator()
- hCreateDocument()'
-
- brc = hInitFormControls( "tDialogI18n" )
- if ( not brc ) then
+ if ( not hInitFormControls( MODULE_NAME ) ) then
warnlog( "Failed to open Basic IDE / Dialogs / ToolsCollectionBar" )
goto endsub
endif
printlog( "Click Manage Languages on ToolsCollectionBar")
kontext "ToolsCollectionBar"
- sleep(1)
- if ( ToolsCollectionBar.exists() ) then
- ManageLanguage.click()
+ if ( ToolsCollectionBar.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
+ hClickButton( ManageLanguage )
else
warnlog( "<ToolsCollectionBar> is not open, is the test environment dirty?" )
endif
kontext "ManageUILanguages"
- if ( ManageUILanguages.exists( 2 ) ) then
+ if ( ManageUILanguages.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
call dialogtest( ManageUILanguages )
printlog( "Add default language, choose preselection")
kontext "ManageUILanguages"
- Add.click()
+ hClickButton( Add )
kontext "SetDefaultLanguage"
- if ( SetDefaultLanguage.exists( 2 ) ) then
+ if ( SetDefaultLanguage.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
call dialogtest( SetDefaultLanguage )
kontext "SetDefaultLanguage"
DefaultLanguageListbox.select( 3 )
kontext "SetDefaultLanguage"
- SetDefaultLanguage.ok()
+ hCloseDialog( SetDefaultLanguage, "ok" )
else
warnlog( "Dialog <SetDefaultLanguage> did not open" )
- endif
+ endif
printlog( "Back on Manage UI Languages Dialog we click <Add>")
kontext "ManageUILanguages"
- Add.click()
+ hClickButton( Add )
kontext "AddUserInterface"
- if ( AddUserInterface.exists( 2 ) ) then
+ if ( AddUserInterface.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
call dialogtest( AddUserInterface )
printlog( "Add just another language at random")
@@ -90,7 +89,7 @@ testcase tUpdtBasicDialogI18n
AddNewControl.typeKeys( "<SPACE>" ) ' check it
kontext "AddUserInterface"
- AddUserInterface.ok()
+ hCloseDialog( AddUserInterface, "ok" )
else
warnlog( "Dialog <AddUserInterface> did not open" )
endif
@@ -100,39 +99,32 @@ testcase tUpdtBasicDialogI18n
printlog( "Back on Manage UI Languages Dialog, delete selected language")
kontext "ManageUILanguages"
- Delete.click()
- sleep(1)
+ hClickButton( Delete )
+
printlog( "Confirm delete")
kontext "active"
- if ( Active.exists( 1 ) ) then
+ if ( Active.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
call dialogtest( active )
kontext "active"
- active.ok()
+ hCloseDialog( active, "ok" )
else
warnlog( "Confirm delete messagebox is missing" )
endif
printlog( "Leave Manage UI Languages Dialog")
kontext "ManageUILanguages"
- ManageUILanguages.ok()
+ hCloseDialog( ManageUILanguages, "ok" )
else
warnlog( "Manage UI languages did not open" )
endif
printlog( "Verify that the translationbar is visible")
kontext "TranslationBar"
- if ( not TranslationBar.exists() ) then
- warnlog( "The IDE Translation Toolbar is not visible" )
- endif
+ if ( not TranslationBar.exists() ) then warnlog( "The IDE Translation Toolbar is not visible" )
kontext "ToolsCollectionBar"
- if ( not ToolsCollectionBar.exists() ) then
- warnlog( "The ToolsCollectionBar is not visible" )
- endif
-
- printlog( "Cleanup" )
- ToolsCollectionBar.Close
+ hCloseDialog( ToolsCollectionBar, "close" )
hClosebasicIDE()
hDestroyDocument()
diff --git a/testautomation/framework/required/includes/basic_dialog_i18n_import.inc b/testautomation/framework/required/includes/basic_dialog_i18n_import.inc
index d4069484a0ab..db72863173b8 100644..100755
--- a/testautomation/framework/required/includes/basic_dialog_i18n_import.inc
+++ b/testautomation/framework/required/includes/basic_dialog_i18n_import.inc
@@ -43,15 +43,19 @@ testcase tBasicDialogI18nImport
dim iTry as integer
const LANGUAGE_COUNT = 5
+ const MAX_RETRIES = 5
+ const WAIT_TIME = 100
+ const MODULE_NAME = "tDialogI18nImport"
+ const DIALOG_WAIT_TIMEOUT = 2
+ const MSG_LOCALE_CLASH_WARNING_BUTTONCOUNT = 4
+ const MSG_DIALOG_REPLACE_WARNING_BUTTONCOUNT = 3
printlog( "Open BASIC-IDE" )
hCreateDocument()
- hInitFormControls( "tDialogI18nImport" )
+ hInitFormControls( MODULE_NAME )
kontext "ToolsCollectionBar"
- if ( ToolsCollectionBar.exists() ) then
- ToolsCollectionBar.close()
- endif
+ if ( ToolsCollectionBar.exists() ) then ToolsCollectionBar.close()
Kontext "DialogBar"
if ( DialogBar.exists() ) then
@@ -60,7 +64,7 @@ testcase tBasicDialogI18nImport
Import.click()
kontext "OeffnenDlg"
- if ( OeffnenDlg.exists( 2 ) ) then
+ if ( OeffnenDlg.exists( DIALOG_WAIT_TIMEOUT ) ) then
printlog( "Enter path to test dialog" )
DateiName.setText( cDialogPath )
@@ -68,27 +72,25 @@ testcase tBasicDialogI18nImport
printlog( "Test messagebox" )
kontext "active"
- if ( Active.exists( 2 ) ) then
+ if ( Active.exists( DIALOG_WAIT_TIMEOUT ) ) then
printlog( "Messagebox: " & Active.getText() )
- if ( Active.getButtonCount() <> 4 ) then
+ if ( Active.getButtonCount() <> MSG_LOCALE_CLASH_WARNING_BUTTONCOUNT ) then
warnlog( "Incorrect messagebox, expected locale clash warning" )
endif
call DialogTest( Active )
printlog( "Accept with yes" )
- Active.Yes()
- sleep(1)
+ hCloseDialog( Active, "yes" )
+
Kontext "TranslationBar"
if ( TranslationBar.exists() ) then
- for iTry = 1 to 5
+ for iTry = 1 to MAX_RETRIES
iNumberOfLanguages = CurrentLanguage.getItemCount()
- if ( iNumberOfLanguages = LANGUAGE_COUNT ) then
- exit for
- endif
- wait( 100 )
+ if ( iNumberOfLanguages = LANGUAGE_COUNT ) then exit for
+ wait( WAIT_TIME )
next iTry
printlog( "Check number of imported languages" )
@@ -105,7 +107,7 @@ testcase tBasicDialogI18nImport
Import.click()
kontext "OeffnenDlg"
- if ( OeffnenDlg.exists( 2 ) ) then
+ if ( OeffnenDlg.exists( DIALOG_WAIT_TIMEOUT ) ) then
printlog( "Enter path to test dialog" )
DateiName.setText( cDialogPath )
@@ -113,17 +115,17 @@ testcase tBasicDialogI18nImport
printlog( "Test messagebox" )
kontext "Active"
- if ( Active.exists( 2 ) ) then
+ if ( Active.exists( DIALOG_WAIT_TIMEOUT ) ) then
printlog( "Messagebox: " & Active.getText() )
- if ( Active.getButtonCount() <> 3 ) then
+ if ( Active.getButtonCount() <> MSG_DIALOG_REPLACE_WARNING_BUTTONCOUNT ) then
warnlog( "Incorrect messagebox, expected dialog replace warning" )
endif
call DialogTest( Active )
Printlog( "Rename the new dialog" )
- Active.Yes()
+ hCloseDialog( Active, "yes" )
else
warnlog( "Overwrite warning missing" )
endif
diff --git a/testautomation/framework/required/includes/basic_macroassignment.inc b/testautomation/framework/required/includes/basic_macroassignment.inc
index 2db0c680967c..05967fcfd008 100644..100755
--- a/testautomation/framework/required/includes/basic_macroassignment.inc
+++ b/testautomation/framework/required/includes/basic_macroassignment.inc
@@ -33,109 +33,94 @@
testcase tUpdtMacroAssignment
- printlog( "Update-Test for some dialogs in Basic-IDE" )
-
- dim brc as boolean
+ printlog( "Update test all dialogs from plain document via assign macro dialog to scriptselector" )
+ const TABPAGE_EVENTS = 2
+ const BASIC_MODULE = "tUpdtMacroAssignment"
+ const DEFAULT_DIALOG_TIMEOUT = 1
+ const RC_TIMEOUT = -1
+
+ printlog( "New document" )
hCreateDocument()
printlog( "Create a new BASIC-module for this document" )
-
- brc = hOpenBasicOrganizerFromDoc()
-
- brc = hCreateModuleForDoc( "tUpdtBasicIde" )
- if ( not brc ) then
- warnlog( "Failed to create a new BASIC module for this document" )
- brc = hDestroyDocument()
- goto endsub
- endif
+ hInitBasicIDE( BASIC_MODULE )
printlog( "Create a new BASIC-dialog" )
- brc = hNewDialog()
- if ( not brc ) then
- warnlog( "Failed to create a new BASIC-dialog" )
- hCloseBasicIde()
- brc = hDestroyDocument()
- goto endsub
- endif
-
- printlog( "Select the Dialog-Pane from the DialogWindow" )
- brc = hSelectDialogPane()
- if ( not brc ) then
- warnlog( "Selecting failed: ToolsCollectionBar is in the way." )
- hCloseBasicIde()
- else
-
- printlog( "Show ToolsCollectionBar" )
- brc = hShowMacroControls()
- if ( not brc ) then
- warnlog( "ToolsCollectionBar is not open" )
- endif
-
- printlog( "Open the Property-Browser: TabGeneralControl" )
- brc = hOpenPropertyBrowser()
- if ( brc ) then
- call dialogtest( TabGeneralControl )
- else
- warnlog( "Property-Browser is not open, skipping further testing" )
- endif
-
- if ( brc ) then
- brc = hSetPBTabPage( 2 )
- endif
-
- if ( brc ) then
-
- printlog( "Current Dialog: Property-Browser / Events-Page" )
- call dialogtest( TabEventsControl )
-
- Kontext "TabEventsControl"
- printlog( "Click the button for the FocusGained-Event" )
- try
- PBFocusGained.click()
- catch
- warnlog( "#i64196# - Events missing on properties tab-page" )
- goto skipevents
- endcatch
-
- Kontext "AssignMacro"
- printlog( "Current Dialog: Assign Macro" )
- if ( AssignMacro.exists( 1 ) ) then
- call dialogtest( AssignMacro )
- printlog( "Click the Assign-Button on the Macro-Assignment-Dialog" )
- AssignButton.click()
-
- Kontext "ScriptSelector"
- printlog( "Current Dialog: ScriptSelector" )
- if ( ScriptSelector.exists( 1 ) ) then
- call dialogtest( ScriptSelector )
- printlog( "Cancel the scriptselector" )
- ScriptSelector.cancel()
+ if ( hNewDialog() ) then
+
+ printlog( "Select the Dialog-Pane from the DialogWindow" )
+ if ( hSelectDialogPane() ) then
+
+ printlog( "Show ToolsCollectionBar" )
+ if ( hShowMacroControls() ) then
+
+ printlog( "Open the Property-Browser" )
+ if ( hOpenPropertyBrowser() ) then
+
+ kontext "TabGeneralControl"
+ call dialogtest( TabGeneralControl )
+
+ printlog( "Switch to events-tab" )
+ if ( hSetPBTabPage( TABPAGE_EVENTS ) ) then
+
+ printlog( "Current Dialog: Property-Browser / Events-Page" )
+ call dialogtest( TabEventsControl )
+
+ Kontext "TabEventsControl"
+ printlog( "Click the button for the FocusGained-Event" )
+ if ( hClickButton( PBFocusGained ) <> RC_TIMEOUT ) then
+
+ Kontext "AssignMacro"
+ printlog( "Current Dialog: Assign Macro" )
+ if ( AssignMacro.exists( DEFAULT_DIALOG_TIMEOUT ) ) then
+
+ call dialogtest( AssignMacro )
+
+ printlog( "Click the Assign-Button on the Macro-Assignment-Dialog to open Script Selector" )
+ if ( hClickButton( AssignButton ) <> RC_TIMEOUT ) then
+
+ Kontext "ScriptSelector"
+ if ( ScriptSelector.exists( DEFAULT_DIALOG_TIMEOUT ) ) then
+
+ call dialogtest( ScriptSelector )
+
+ printlog( "Close Script Selector" )
+ hCloseDialog( ScriptSelector, "cancel" )
+
+ printlog( "Close all remaining dialogs and documents" )
+ Kontext "AssignMacro"
+ hCloseDialog( AssignMacro, "cancel" )
+ hClosePropertyBrowser()
+ hCloseBasicIDE()
+ hDestroyDocument()
+ else
+ warnlog( "Failed to open/access <ScriptSelector>" )
+ endif
+ else
+ warnlog( "Assign-button is not enabled" )
+ endif
+ else
+ warnlog( "Failed to open/access <AssignMacro> dialog" )
+ endif
+ else
+ warnlog( "#i64196# - Events missing on properties tab-page" )
+ endif
+ else
+ warnlog( "Failed to switch tabpage to Tab-Events" )
+ endif
else
- warnlog( "Failed to open/access <ScriptSelector>" )
+ warnlog( "Property-Browser is not open, skipping further testing" )
endif
-
- Kontext "AssignMacro"
- printlog( "Current Dialog: Assign Macro" )
- printlog( "Cancel the Script-Assignement-Dialog" )
- AssignMacro.cancel()
else
- warnlog( "Failed to open/access <AssignMacro> dialog" )
+ warnlog( "ToolsCollectionBar is not open" )
endif
-
+ else
+ warnlog( "Selecting failed: ToolsCollectionBar is in the way." )
endif
-
- skipevents:
-
- printlog( "Current Dialog: Property-Browser" )
- printlog( "Close the Property-Browser, return to the document" )
- brc = hClosePropertyBrowser()
-
- brc = hCloseBasicIde()
-
+ else
+ warnlog( "Failed to create a new BASIC-dialog" )
endif
-
- brc = hDestroyDocument()
endcase
diff --git a/testautomation/framework/required/includes/basic_organizer.inc b/testautomation/framework/required/includes/basic_organizer.inc
index eb33d3a554e3..789d870cb9a6 100644..100755
--- a/testautomation/framework/required/includes/basic_organizer.inc
+++ b/testautomation/framework/required/includes/basic_organizer.inc
@@ -35,7 +35,6 @@ testcase tUpdtBasicOrganizer
printlog( "Update test for the Basic Organizer dialog" )
- dim brc as boolean
dim cTempString as string
const TESTLIB = "zzzz"
@@ -48,7 +47,7 @@ testcase tUpdtBasicOrganizer
kontext "Makro"
if ( not makro.exists() ) then
warnlog( "Macro Organizer is not open, aborting test" )
- brc = hDestroyDocument()
+ hDestroyDocument()
goto endsub
else
printlog( "Successfully opened the MacroOrganizer" )
@@ -68,7 +67,7 @@ testcase tUpdtBasicOrganizer
printlog( "TabModule is not open, the test cannot continue" )
kontext "Makro"
Makro.cancel()
- brc = hDestroyDocument()
+ hDestroyDocument()
goto endsub
endif
@@ -125,7 +124,7 @@ testcase tUpdtBasicOrganizer
Neu.click()
kontext "NeueBibliothek"
call DialogTest( NeueBibliothek )
- Bibliotheksname.setText( "zzzz" )
+ Bibliotheksname.setText( TESTLIB )
NeueBibliothek.ok()
else
warnlog( "There is a problem accessing the New Libraries dialog" )
@@ -138,7 +137,7 @@ testcase tUpdtBasicOrganizer
Neu.click()
kontext "NeueBibliothek"
call DialogTest( NeueBibliothek )
- Bibliotheksname.setText( "zzzz" )
+ Bibliotheksname.setText( TESTLIB )
NeueBibliothek.ok()
else
warnlog( "There is a problem accessing the New Libraries dialog" )
@@ -192,7 +191,7 @@ testcase tUpdtBasicOrganizer
printlog( "Try to delete the library" )
cTempString = BibliotheksListe.getSelText()
- if ( cTempString = "zzzz" ) then
+ if ( cTempString = TESTLIB ) then
printlog( "Delete" )
Loeschen.click()
Kontext "Active"
@@ -223,8 +222,7 @@ testcase tUpdtBasicOrganizer
Makro.cancel()
printlog( "Close the document" )
- brc = hDestroyDocument()
-
+ hDestroyDocument()
endcase
diff --git a/testautomation/framework/required/includes/first.inc b/testautomation/framework/required/includes/first.inc
index 0c0b737ffe5d..0c0b737ffe5d 100644..100755
--- a/testautomation/framework/required/includes/first.inc
+++ b/testautomation/framework/required/includes/first.inc
diff --git a/testautomation/framework/required/includes/graphics_import.inc b/testautomation/framework/required/includes/graphics_import.inc
index a2a92f961274..f9567037ddde 100644..100755
--- a/testautomation/framework/required/includes/graphics_import.inc
+++ b/testautomation/framework/required/includes/graphics_import.inc
@@ -262,9 +262,7 @@ testcase tInFilterCountCompare()
next iCurrentFilter
irc = hManageComparisionList( cReferencePath, cUIFiltersPath, caUIFilters() )
- if ( irc <> 0 ) then
- warnlog( "The list of graphic format filters has changed" )
- endif
+ hListResultEvaluation( irc , 0 )
printlog( "" )
printlog( "Verify <All formats>-string" )
diff --git a/testautomation/framework/required/includes/help_browser.inc b/testautomation/framework/required/includes/help_browser.inc
index 0b8b80bcbdaf..0b8b80bcbdaf 100644..100755
--- a/testautomation/framework/required/includes/help_browser.inc
+++ b/testautomation/framework/required/includes/help_browser.inc
diff --git a/testautomation/framework/required/includes/printer_administration.inc b/testautomation/framework/required/includes/printer_administration.inc
index bc9838f6063d..bc9838f6063d 100644..100755
--- a/testautomation/framework/required/includes/printer_administration.inc
+++ b/testautomation/framework/required/includes/printer_administration.inc
diff --git a/testautomation/framework/required/includes/script_organizers.inc b/testautomation/framework/required/includes/script_organizers.inc
index feb72680c9c3..a84750dd1922 100755
--- a/testautomation/framework/required/includes/script_organizers.inc
+++ b/testautomation/framework/required/includes/script_organizers.inc
@@ -51,7 +51,7 @@ testcase tUpdtScriptCount
dim iCurrentDialog as integer
dim iCurrentScriptCount as integer
- hInitSingleDoc()
+ hInitSingleDoc()
for iCurrentDialog = 1 to SCRIPTING_DIALOGS
@@ -103,13 +103,13 @@ endcase
function hGetScriptCount( oTree as object, oList as object ) as integer
- dim iTreeItem as integer
- dim iScript as integer : iScript = 0
+ dim iCurrentTreeItem as integer
+ dim iScriptCount as integer : iScriptCount = 0
- for iTreeItem = 1 to oTree.getItemCount()
- oTree.select( iTreeItem )
- iScript = iScript + oList.getItemCount()
- next iTreeItem
- hGetScriptCount() = iScript
+ for iCurrentTreeItem = 1 to oTree.getItemCount()
+ oTree.select( iCurrentTreeItem )
+ iScriptCount = iScriptCount + oList.getItemCount()
+ next iCurrentTreeItem
+ hGetScriptCount() = iScriptCount
end function
diff --git a/testautomation/framework/required/includes/security_dialogs.inc b/testautomation/framework/required/includes/security_dialogs.inc
index fec9900a28b8..fec9900a28b8 100644..100755
--- a/testautomation/framework/required/includes/security_dialogs.inc
+++ b/testautomation/framework/required/includes/security_dialogs.inc
diff --git a/testautomation/framework/required/includes/smoketest.inc b/testautomation/framework/required/includes/smoketest.inc
index dcff255d6c6c..dcff255d6c6c 100644..100755
--- a/testautomation/framework/required/includes/smoketest.inc
+++ b/testautomation/framework/required/includes/smoketest.inc
diff --git a/testautomation/framework/required/includes/standard_toolbar_1.inc b/testautomation/framework/required/includes/standard_toolbar_1.inc
index 4494d6a26cad..4494d6a26cad 100644..100755
--- a/testautomation/framework/required/includes/standard_toolbar_1.inc
+++ b/testautomation/framework/required/includes/standard_toolbar_1.inc
diff --git a/testautomation/framework/required/includes/standard_toolbar_3.inc b/testautomation/framework/required/includes/standard_toolbar_3.inc
index cbc08096b8a6..cbc08096b8a6 100644..100755
--- a/testautomation/framework/required/includes/standard_toolbar_3.inc
+++ b/testautomation/framework/required/includes/standard_toolbar_3.inc
diff --git a/testautomation/framework/required/includes/standard_toolbar_4.inc b/testautomation/framework/required/includes/standard_toolbar_4.inc
index d853e98d0b03..b1a820769ceb 100644..100755
--- a/testautomation/framework/required/includes/standard_toolbar_4.inc
+++ b/testautomation/framework/required/includes/standard_toolbar_4.inc
@@ -49,7 +49,7 @@ testcase tStandardBar_4
hStandardbarSaveAs()
- brc = hInitBackingMode()
+ hFileCloseAll()
endcase
diff --git a/testautomation/framework/required/includes/standard_toolbar_5.inc b/testautomation/framework/required/includes/standard_toolbar_5.inc
index 76fa20d5dffa..76fa20d5dffa 100644..100755
--- a/testautomation/framework/required/includes/standard_toolbar_5.inc
+++ b/testautomation/framework/required/includes/standard_toolbar_5.inc
diff --git a/testautomation/framework/required/includes/standard_toolbar_6.inc b/testautomation/framework/required/includes/standard_toolbar_6.inc
index a72d8df3a36f..c3ff6be6e849 100644..100755
--- a/testautomation/framework/required/includes/standard_toolbar_6.inc
+++ b/testautomation/framework/required/includes/standard_toolbar_6.inc
@@ -116,10 +116,12 @@ testcase tStandardBar_6
kontext "documentwriter"
DocumentWriter.TypeKeys( "Hallo" )
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
hDestroyDocument()
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
hDestroyDocument()
printlog " - Math"
diff --git a/testautomation/framework/required/includes/tools_customize.inc b/testautomation/framework/required/includes/tools_customize.inc
index 0db4af9fc487..6bf31e391f99 100644..100755
--- a/testautomation/framework/required/includes/tools_customize.inc
+++ b/testautomation/framework/required/includes/tools_customize.inc
@@ -34,7 +34,6 @@
testcase tUpdtCustomize( cApp as string )
printlog( "Tools/Customize dialog" )
- const CLOSE_METHOD = 1 ' 1 = Cancel button
if ( hCreateDocument() ) then
if ( hToolsCustomizeOpen() ) then
@@ -42,7 +41,7 @@ testcase tUpdtCustomize( cApp as string )
hUpdtToolsCustomizeMenu()
hUpdtToolsCustomizeToolbars()
hUpdtToolsCustomizeEvents()
- hToolsCustomizeClose( CLOSE_METHOD )
+ hCloseDialog( TabCustomizeEvents, "cancel" )
else
warnlog( "Tools/Customize dialog did not open" )
endif
@@ -57,10 +56,19 @@ endcase
function hUpdtToolsCustomizeMenu()
-
-
const CFN = "hUpdtToolsCustomizeMenu::"
+
+ const MENUITEM_MOVE = 1
+ const MENUITEM_ADDSUBMENU = 1
+ const MENUITEM_RENAME = 2
+ const MENUITEM_DELETE = 3
+ const MENUITEM_MODIFY = 2
+ const MENUITEM_MODIFY_LARGE_MENU = 4
+
+ const APPLICATION_ONLY = 1
+ const APPLICATION_AND_DOCUMENT = 2
const ITEMNAME = "tUpdtCustomize"
+
dim brc as boolean
dim iItems as integer
@@ -71,7 +79,7 @@ function hUpdtToolsCustomizeMenu()
printlog( "" )
printlog( "Menu" )
- brc = hToolsCustomizeSelectTab( "Menu" )
+ hToolsCustomizeSelectTab( "Menu" )
call DialogTest( TabCustomizeMenu )
printlog( CFN & "Click New..." )
@@ -79,48 +87,56 @@ function hUpdtToolsCustomizeMenu()
BtnNew.click()
Kontext "MenuOrganiser"
- printlog( CFN & "MenuOrganiser" )
- call DialogTest( MenuOrganiser )
-
- printlog( CFN & "Down..." )
- ButtonDown.click()
-
- printlog( CFN & "Up..." )
- ButtonUp.click()
-
- printlog( CFN & "Name the new menu" )
- MenuName.setText( "tUpdtCustomize" )
-
- 'qaerrorlog( "#i60609# Undeclared listbox in menu organiser" )
- printlog( "TODO: Access the listbox in menuorganizer" )
-
- printlog( CFN & "Close the menu with ok" )
- MenuOrganiser.ok()
+ if ( MenuOrganiser.exists( 2 ) ) then
+ printlog( CFN & "MenuOrganiser" )
+ call DialogTest( MenuOrganiser )
+
+ printlog( CFN & "Down..." )
+ ButtonDown.click()
+
+ printlog( CFN & "Up..." )
+ ButtonUp.click()
+
+ printlog( CFN & "Name the new menu" )
+ MenuName.setText( "tUpdtCustomize" )
+
+ 'qaerrorlog( "#i60609# Undeclared listbox in menu organiser" )
+ printlog( "TODO: Access the listbox in menuorganizer" )
+
+ printlog( CFN & "Close the menu with ok" )
+ hCloseDialog( MenuOrganiser, "ok" )
+ else
+ warnlog( "Dialog <MenuOrganiser> did not open" )
+ endif
printlog( CFN & "Click the menu listbutton" )
kontext "TabCustomizeMenu"
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
printlog( CFN & "Select Move..." )
- hMenuSelectNr( 1 )
+ hMenuSelectNr( MENUITEM_MOVE )
kontext "MenuOrganiser"
- printlog( CFN & "Click UP" )
- ButtonUp.click()
-
- kontext "MenuOrganiser"
- printlog( CFN & "Click DOWN" )
- ButtonDown.click()
+ if ( MenuOrganiser.exists( 2 ) ) then
+ printlog( CFN & "Click UP" )
+ ButtonUp.click()
- printlog( CFN & "Cancel the dialog" )
- MenuOrganiser.cancel()
+ kontext "MenuOrganiser"
+ printlog( CFN & "Click DOWN" )
+ ButtonDown.click()
+
+ printlog( CFN & "Cancel the dialog" )
+ hCloseDialog( MenuOrganiser, "cancel" )
+ else
+ warnlog( "Dialog <MenuOrganizer> did not open" )
+ endif
printlog( CFN & "Click the menu listbutton" )
kontext "TabCustomizeMenu"
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
printlog( CFN & "Select Rename..." )
- hMenuSelectNr( 2 )
+ hMenuSelectNr( MENUITEM_RENAME )
printlog( CFN & "Cancel the renaming-dialog" )
kontext "RenameMenu"
@@ -131,7 +147,7 @@ function hUpdtToolsCustomizeMenu()
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
printlog( CFN & "Select Delete" )
- hMenuSelectNr( 3 )
+ hMenuSelectNr( MENUITEM_DELETE )
kontext "TabCustomizeMenu"
hUpdtToolsCustomizeScriptSelector( 3 )
@@ -139,12 +155,10 @@ function hUpdtToolsCustomizeMenu()
printlog( CFN & "Check itemcount in SaveIn List" )
kontext "TabCustomizeMenu"
select case gApplication
- case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( 1 )
- case else : brc = hToolsCustomizeTestSaveIn( 2 )
+ case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( APPLICATION_ONLY )
+ case else : brc = hToolsCustomizeTestSaveIn( APPLICATION_AND_DOCUMENT )
end select
- if ( not brc ) then
- warnlog( "Incorrect itemcount in listbox, see above" )
- endif
+ if ( not brc ) then warnlog( "Incorrect itemcount in listbox, see above" )
printlog( CFN & "Down..." )
BtnDown.click()
@@ -154,8 +168,8 @@ function hUpdtToolsCustomizeMenu()
printlog( CFN & "Click the Modify-Button and select item 1 (Add submenu)" )
kontext "TabCustomizeMenu"
- brc = hClickCommandButton( 1 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( MENUITEM_ADDSUBMENU ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -182,8 +196,8 @@ function hUpdtToolsCustomizeMenu()
printlog( CFN & "Click the Modify-Button and select to rename the item" )
kontext "TabCustomizeMenu"
- brc = hClickCommandButton( 3 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( 3 ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -202,16 +216,16 @@ function hUpdtToolsCustomizeMenu()
printlog( CFN & "Click the Modify-Button and delete the current item" )
kontext "TabCustomizeMenu"
- brc = hClickCommandButton( 4 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( MENUITEM_MODIFY_LARGE_MENU ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
printlog( CFN & "Click the Modify-Button and create a new group" )
kontext "TabCustomizeMenu"
- brc = hClickCommandButton( 2 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( MENUITEM_MODIFY ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -219,8 +233,8 @@ function hUpdtToolsCustomizeMenu()
' Note: The current index for the delete-function is at pos 2.
printlog( CFN & "Click the Modify-Button and delete the new group" )
kontext "TabCustomizeMenu"
- brc = hClickCommandButton( 2 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( MENUITEM_MODIFY ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -231,13 +245,18 @@ end function
function hUpdtToolsCustomizeToolbars()
+ const CFN = "hUpdtToolsCustomizeToolbars::"
+ const DOCUMENT_ONLY = 1
+ const APPLICATION_AND_DOCUMENT = 2
+ const MENUITEM_RENAME = 1
+ const MENUITEM_DELETE = 2
+ const MENUITEM_MODIFY = 4
+ const DIALOG_DELAY = 3
- const CFN = "hUpdtToolsCustomizeToolbars::"
dim brc as boolean
-
dim iCurrentItem as integer
printlog( "" )
@@ -251,23 +270,22 @@ function hUpdtToolsCustomizeToolbars()
BtnNew.click()
kontext "NewToolbar"
- if ( NewToolbar.exists( 2 ) ) then
+ if ( NewToolbar.exists( DIALOG_DELAY ) ) then
printlog( CFN & "NewToolbar" )
call DialogTest( NewToolbar )
select case gApplication
- case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( 1 )
- case else : brc = hToolsCustomizeTestSaveIn( 2 )
+ case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( DOCUMENT_ONLY )
+ case else : brc = hToolsCustomizeTestSaveIn( APPLICATION_AND_DOCUMENT )
end select
- if ( not brc ) then
- warnlog( "Incorrect itemcount in listbox, see above" )
- endif
+
+ if ( not brc ) then warnlog( "Incorrect itemcount in listbox, see above" )
printlog( CFN & "Name the new toolbar for further usage" )
ToolbarName.setText( "tUpdtCustomize" )
printlog( CFN & "Close NewToolbar dialog with OK" )
- NewToolbar.ok()
+ hCloseDialog( NewToolbar, "ok" )
else
warnlog( CFN & "Could not access New Toolbar dialog" )
endif
@@ -277,13 +295,13 @@ function hUpdtToolsCustomizeToolbars()
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
printlog( "Select rename" )
- hMenuSelectNr( 1 )
+ hMenuSelectNr( MENUITEM_RENAME )
printlog( CFN & "Cancel the dialog" )
kontext "RenameToolbar"
- if ( RenameToolbar.exists( 2 ) ) then
+ if ( RenameToolbar.exists( DIALOG_DELAY ) ) then
call dialogtest( RenameToolbar )
- RenameToolbar.Cancel()
+ hCloseDialog( RenameToolbar, "Cancel" )
else
warnlog( CFN & "Could not access Toolbar renaming dialog" )
endif
@@ -293,19 +311,18 @@ function hUpdtToolsCustomizeToolbars()
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
printlog( "Select delete" )
- hMenuSelectNr( 2 )
+ hMenuSelectNr( MENUITEM_DELETE )
kontext "TabCustomizeToolbars"
hUpdtToolsCustomizeScriptSelector( 2 )
kontext "TabCustomizeToolbars"
select case gApplication
- case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( 1 )
- case else : brc = hToolsCustomizeTestSaveIn( 2 )
+ case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( DOCUMENT_ONLY )
+ case else : brc = hToolsCustomizeTestSaveIn( APPLICATION_AND_DOCUMENT )
end select
- if ( not brc ) then
- warnlog( "Incorrect itemcount in listbox, see above" )
- endif
+
+ if ( not brc ) then warnlog( "Incorrect itemcount in listbox, see above" )
printlog( CFN & "Down..." )
if ( BtnDown.isEnabled() ) then
@@ -326,7 +343,7 @@ function hUpdtToolsCustomizeToolbars()
AddCommands.click()
kontext "ScriptSelector"
- if ( ScriptSelector.exists( 5 ) ) then
+ if ( ScriptSelector.exists( DIALOG_DELAY ) ) then
call dialogtest( ScriptSelector )
@@ -339,14 +356,11 @@ function hUpdtToolsCustomizeToolbars()
printlog( CFN & "Add the default item" )
try
kontext "ScriptSelector"
- ScriptSelector.ok()
+ hCloseDialog( ScriptSelector, "ok" )
catch
qaerrorlog( "#i79207# Could not access ok button on ScriptSelector" )
kontext "ScriptSelector"
- if ( ScriptSelector.exists( 2 ) ) then
- printlog( "Scriptselector is open" )
- endif
-
+ if ( ScriptSelector.exists( DIALOG_DELAY ) ) then printlog( "Scriptselector is open" )
endcatch
else
@@ -354,47 +368,41 @@ function hUpdtToolsCustomizeToolbars()
for iCurrentItem = 1 to 5
printlog( CFN & "LibraryTreeList: Moving down..." )
LibraryTreeList.typeKeys( "<DOWN>" )
- if ( ScriptSelector.isEnabled() ) then
- exit for
- endif
+ if ( ScriptSelector.isEnabled() ) then exit for
next iCurrentItem
endif
' Note: The Customize dialog in the background is updated immediately. This
' means that the cancel-button is active but blocked for a moment
- WaitSlot( 2000 )
+ 'WaitSlot( 2000 )
printlog( CFN & "Close the Script Selector, back to ToolsCustomize dialog" )
- ScriptSelector.cancel()
-
- ' make sure the dialog is really closed. At times it just refuses to do so??
- if ( ScriptSelector.exists( 1 ) ) then
- ScriptSelector.close()
- endif
+ hCloseDialog( ScriptSelector, "cancel" )
kontext "TabCustomizeToolbars"
printlog( CFN & "Click the Modify-button" )
- brc = hClickCommandButton( 1 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( 1 ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
printlog( CFN & "Rename the item" )
+ UseBindings
kontext "CustomizeToolbarsRename"
- if ( CustomizeToolbarsRename.exists( 2 ) ) then
+ if ( CustomizeToolbarsRename.exists( DIALOG_DELAY ) ) then
call dialogtest( CustomizeToolbarsRename )
EingabeFeld.setText( "Renamed item" )
printlog( CFN & "Close the dialog" )
- CustomizeToolbarsRename.ok()
+ hCloseDialog( CustomizeToolbarsRename, "ok" )
else
warnlog( CFN & "CustomizeToolbarsRename could not be accessed" )
endif
kontext "TabCustomizeToolbars"
- brc = hClickCommandButton( 2 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( 2 ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -405,8 +413,8 @@ function hUpdtToolsCustomizeToolbars()
printlog( "******************** 1 ********************" )
hDeselectSeparator()
printlog( "******************** 2 ********************" )
- brc = hClickCommandButton( 3 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( 3 ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -414,8 +422,8 @@ function hUpdtToolsCustomizeToolbars()
kontext "TabCustomizeToolbars"
waitslot
printlog( CFN & "Click the Modify-button" )
- brc = hClickCommandButton( 4 )
- if ( not brc ) then
+
+if ( not hClickCommandButton( MENUITEM_MODIFY ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -423,8 +431,8 @@ function hUpdtToolsCustomizeToolbars()
kontext "TabCustomizeToolbars"
WaitSlot
printlog( CFN & "Click the Modify-button" )
- brc = hClickCommandButton( 1 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( 1 ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -435,26 +443,26 @@ function hUpdtToolsCustomizeToolbars()
printlog( "******************** 3 ********************" )
hDeselectSeparator()
printlog( "******************** 4 ********************" )
- brc = hClickCommandButton( 5 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( 5 ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
printlog( CFN & "On the Change Icon dialog: Click to import an icon" )
kontext "ChangeIcon"
- if ( ChangeIcon.exists( 2 ) ) then
+ if ( ChangeIcon.exists( DIALOG_DELAY ) ) then
call dialogtest( ChangeIcon )
import.click()
printlog( CFN & "Cancel the FileOpen-dialog" )
kontext "OeffnenDlg"
call dialogtest( OeffnenDlg )
- OeffnenDlg.cancel()
+ hCloseDialog( OeffnenDlg, "cancel" )
- printlog( CFN & "Cancel the Change Icon dialog" )
+ printlog( CFN & "Close the Change Icon dialog with <ok>" )
kontext "ChangeIcon"
- ChangeIcon.ok()
+ hCloseDialog( ChangeIcon, "ok" )
else
warnlog( CFN & "Could not access Change Icon dialog" )
endif
@@ -462,8 +470,8 @@ function hUpdtToolsCustomizeToolbars()
kontext "TabCustomizeToolbars"
waitslot
printlog( CFN & "Click the Modify-button" )
- brc = hClickCommandButton( 3 )
- if ( not brc ) then
+
+ if ( not hClickCommandButton( 3 ) ) then
warnlog( CFN & "Something went wrong when accessing the command button" )
exit function
endif
@@ -475,59 +483,68 @@ end function
function hUpdtToolsCustomizeEvents()
-
-
-
-
const CFN = "hUpdtToolsCustomizeEvents::"
+ const APPLICATION_ONLY = 1
+ const APPLICATION_AND_DOCUMENT = 2
+ const TAB_EVENTS = 1
+
dim brc as boolean
printlog( "" )
printlog( "Events" )
- brc = hToolsCustomizeSelectTab( "events" )
- call DialogTest( TabCustomizeEvents )
-
- hUpdtToolsCustomizeScriptSelector( 1 )
-
- kontext "TabCustomizeEvents"
- select case gApplication
- case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( 1 )
- case else : brc = hToolsCustomizeTestSaveIn( 2 )
- end select
- if ( not brc ) then
- warnlog( "Incorrect itemcount in listbox, see above" )
- endif
+ hToolsCustomizeSelectTab( "events" )
+ if ( TabCustomizeEvents.exists() ) then
+ if ( TabCustomizeEvents.isVisible() ) then
+ call DialogTest( TabCustomizeEvents )
-end function
+ hUpdtToolsCustomizeScriptSelector( TAB_EVENTS )
-'*******************************************************************************
+ kontext "TabCustomizeEvents"
+ select case gApplication
+ case "BACKGROUND" : brc = hToolsCustomizeTestSaveIn( APPLICATION_ONLY )
+ case else : brc = hToolsCustomizeTestSaveIn( APPLICATION_AND_DOCUMENT )
+ end select
-function hUpdtToolsCustomizeKeyboard() as boolean
+ if ( not brc ) then warnlog( "Incorrect itemcount in listbox, see above" )
+ else
+ warnlog( "<TabCustomizeEvents> is not visible" )
+ endif
+ else
+ warnlog( "<TabCustomizeEvents> did not open" )
+ endif
+end function
+'*******************************************************************************
+function hUpdtToolsCustomizeKeyboard() as boolean
const CFN = "hUpdtToolsCustomizeKeyboard::"
- dim brc as boolean
+ const FIRST_CHANGEABLE_ITEM = 2
printlog( "" )
printlog( "Keyboard" )
-
- brc = hToolsCustomizeSelectTab( "keyboard" )
- if ( not brc and gApplication = "BACKGROUND" ) then
- qaerrorlog( "#i61765# TabTastatur is missing when called from Backing Window" )
- exit function
+
+ if ( gApplication = "BACKGROUND" ) then
+ if ( not hToolsCustomizeSelectTab( "keyboard" ) ) then
+ qaerrorlog( "#i61765# TabTastatur is missing when called from Backing Window" )
+ hUpdtToolsCustomizeKeyboard() = false
+ exit function
+ endif
endif
-
+
+ hToolsCustomizeSelectTab( "keyboard" )
+
+ kontext "TabTastatur"
call DialogTest( TabTastatur )
' no verification of functionality, this is an update test!
+ kontext "TabTastatur"
StarOffice.check()
- hSelectNode( Tastatur , 2 )
+ hSelectNode( Tastatur , FIRST_CHANGEABLE_ITEM )
hSelectTopNode( bereich )
- waitslot
' Workaround: It might still happen that the currently selected accelerator
' is "fixed" so we need to find another one that can be modified.
@@ -537,12 +554,8 @@ function hUpdtToolsCustomizeKeyboard() as boolean
loop
Aendern.click()
-
-
Zuruecksetzen.click()
-
- hSelectNode( Tastatur , 2 )
- waitslot
+ hSelectNode( Tastatur , FIRST_CHANGEABLE_ITEM )
' Workaround: It might still happen that the currently selected accelerator
' is "fixed" so we need to find another one that can be modified.
@@ -552,64 +565,65 @@ function hUpdtToolsCustomizeKeyboard() as boolean
loop
Aendern.click()
-
Loeschen.click()
-
Speichern.click()
kontext "SpeichernDlg"
- SpeichernDlg.cancel()
+ hCloseDialog( SpeichernDlg, "cancel" )
kontext "TabTastatur"
Laden.click()
kontext "OeffnenDlg"
- OeffnenDlg.cancel()
-
+ hCloseDialog( OeffnenDlg, "cancel" )
end function
'*******************************************************************************
-function hUpdtToolsCustomizeScriptSelector( iBtn as integer ) as boolean
-
-
-
-
+function hUpdtToolsCustomizeScriptSelector( iPageButton as integer ) as boolean
const CFN = "hUpdtToolsCustomizeScriptSelector::"
- dim brc as boolean
- brc = true
-
- select case iBtn
- case 1 : kontext "TabCustomizeEvents"
- printlog( CFN & "Assign Macro... (1)" )
- AssignMacro.click()
- case 2 : kontext "TabCustomizeToolbars"
- printlog( CFN & "Add... (2)" )
- AddCommands.click()
- case 3 : kontext "TabCustomizeMenu"
- printlog( CFN & "Add... (3)" )
- AddCommands.click()
+ dim brc as boolean : brc = true
+ const TAB_EVENTS = 1
+ const TAB_TOOLBARS = 2
+ const TAB_MENU = 3
+ const DIALOG_DELAY = 2
+
+ select case iPageButton
+ case TAB_EVENTS
+ kontext "TabCustomizeEvents"
+ printlog( CFN & "Assign Macro... (1)" )
+ AssignMacro.click()
+ case TAB_TOOLBARS
+ kontext "TabCustomizeToolbars"
+ printlog( CFN & "Add... (2)" )
+ AddCommands.click()
+ case TAB_MENU
+ kontext "TabCustomizeMenu"
+ printlog( CFN & "Add... (3)" )
+ AddCommands.click()
case else
- warnlog( CFN & "Invalid function parameter" )
- brc = false
+ warnlog( CFN & "Invalid function parameter" )
+ hUpdtToolsCustomizeScriptSelector() = false
+ exit function
end select
- if ( brc ) then
- kontext "ScriptSelector"
+ kontext "ScriptSelector"
+ if ( ScriptSelector.exists( DIALOG_DELAY ) ) then
call DialogTest( ScriptSelector )
-
+
kontext "ScriptSelector"
- ScriptSelector.cancel()
-
+ hCloseDialog( ScriptSelector, "cancel" )
+ else
+ warnlog( CFN & "Dialog <ScriptSelector> did not open" )
endif
- select case iBtn
- case 1 : kontext "TabCustomizeEvents"
- case 2 : kontext "TabCustomizeToolbars"
- case 3 : kontext "TabCustomizeMenu"
+ select case iPageButton
+ case TAB_EVENTS : kontext "TabCustomizeEvents"
+ case TAB_TOOLBARS : kontext "TabCustomizeToolbars"
+ case TAB_MENU : kontext "TabCustomizeMenu"
end select
hUpdtToolsCustomizeScriptSelector() = brc
@@ -619,9 +633,6 @@ end function
'*******************************************************************************
function hToolsCustomizeTestSaveIn( iItems as integer ) as boolean
-
-
-
const CFN = "hToolsCustomizeTestSaveIn::"
dim iPresentItems as integer
@@ -661,15 +672,18 @@ function hOpenMenuButton( oControl as object ) as integer
dim bUseSlowMethod as boolean : bUseSlowMethod = false
const CFN = "hOpenMenuButton: "
+ const RC_FAILURE = -1
+ const MAX_RETRIES = 3
+ const DEFAULT_DELAY = 1000
- hOpenMenuButton() = -1 ' this is the general failure returnvalue
+ hOpenMenuButton() = RC_FAILURE
- for iClick = 1 to 3
+ for iClick = 1 to MAX_RETRIES
if ( bUseSlowMethod ) then
- wait( 1000 )
+ wait( DEFAULT_DELAY )
oControl.OpenMenu()
- wait( 3000 )
+ wait( DEFAULT_DELAY * 3 )
else
oControl.click()
endif
diff --git a/testautomation/framework/required/includes/tools_options.inc b/testautomation/framework/required/includes/tools_options.inc
index 0b226db7e7b0..0b226db7e7b0 100644..100755
--- a/testautomation/framework/required/includes/tools_options.inc
+++ b/testautomation/framework/required/includes/tools_options.inc
diff --git a/testautomation/framework/required/includes/topten.inc b/testautomation/framework/required/includes/topten.inc
index 9aea2b0ab8b6..9aea2b0ab8b6 100644..100755
--- a/testautomation/framework/required/includes/topten.inc
+++ b/testautomation/framework/required/includes/topten.inc
diff --git a/testautomation/framework/required/includes/wizard_agenda.inc b/testautomation/framework/required/includes/wizard_agenda.inc
index b1b099e07c88..d320234fd40b 100644..100755
--- a/testautomation/framework/required/includes/wizard_agenda.inc
+++ b/testautomation/framework/required/includes/wizard_agenda.inc
@@ -56,23 +56,23 @@ testcase tUpdtWizardAgenda
Kontext "AutopilotAgenda"
call DialogTest( AutopilotAgenda, 1 )
PageDesignList.select( 3 )
- hClickNextButton()
+ hClickButton( NextButton )
Kontext "AutopilotAgenda"
call DialogTest( AutopilotAgenda, 2 )
- hClickNextButton()
+ hClickButton( NextButton )
Kontext "AutopilotAgenda"
call DialogTest( AutopilotAgenda, 3 )
- hClickNextButton()
+ hClickButton( NextButton )
Kontext "AutopilotAgenda"
call DialogTest( AutopilotAgenda, 4 )
- hClickNextButton()
+ hClickButton( NextButton )
Kontext "AutopilotAgenda"
call DialogTest( AutopilotAgenda, 5 )
- hClickNextButton()
+ hClickButton( NextButton )
Kontext "AutopilotAgenda"
call DialogTest( AutopilotAgenda, 6 )
@@ -91,15 +91,9 @@ testcase tUpdtWizardAgenda
endif
brc = hDestroyDocument()
- if ( not brc ) then
- qaerrorlog( "#i59233# The wizard does not display the new template" )
- endif
-
- do while( getDocumentCount() > 0 )
- call hCloseDocument()
- loop
-
-
+ if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
+
+ hFileCloseAll()
hDeleteFile( cTemplatePath )
else
warnlog ( "The Agenda wizard did not open/timelimit exceeded" )
diff --git a/testautomation/framework/required/includes/wizard_documentconverter.inc b/testautomation/framework/required/includes/wizard_documentconverter.inc
index 7ba81116728b..7ba81116728b 100644..100755
--- a/testautomation/framework/required/includes/wizard_documentconverter.inc
+++ b/testautomation/framework/required/includes/wizard_documentconverter.inc
diff --git a/testautomation/framework/required/includes/wizard_euroconverter.inc b/testautomation/framework/required/includes/wizard_euroconverter.inc
index dd439ea4a3bd..dd439ea4a3bd 100644..100755
--- a/testautomation/framework/required/includes/wizard_euroconverter.inc
+++ b/testautomation/framework/required/includes/wizard_euroconverter.inc
diff --git a/testautomation/framework/required/includes/wizard_fax.inc b/testautomation/framework/required/includes/wizard_fax.inc
index 433a9bb7a593..b970d8754c5d 100644..100755
--- a/testautomation/framework/required/includes/wizard_fax.inc
+++ b/testautomation/framework/required/includes/wizard_fax.inc
@@ -53,19 +53,19 @@ testcase tUpdtWizardFax
kontext "AutopilotFax"
call DialogTest( AutopilotFax, 1 )
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotFax"
call DialogTest( AutopilotFax, 2 )
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotFax"
call DialogTest( AutopilotFax, 3 )
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotFax"
call DialogTest( AutopilotFax, 4 )
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotFax"
call DialogTest( AutopilotFax, 5 )
@@ -81,9 +81,7 @@ testcase tUpdtWizardFax
hWaitForObject( Speichern, 5000 )
brc = hDestroyDocument()
- if ( not brc ) then
- qaerrorlog( "#i59233# The wizard does not display the new template" )
- endif
+ if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
printlog( "Delete the user-template: " & cTemplatePath )
hDeleteFile( cTemplatePath )
@@ -92,9 +90,7 @@ testcase tUpdtWizardFax
warnlog( "Fax wizard did not open/exceeded timeout" )
endif
- while( getDocumentCount() > 0 )
- hDestroyDocument()
- wend
+ hFileCloseAll()
endcase
diff --git a/testautomation/framework/required/includes/wizard_letter.inc b/testautomation/framework/required/includes/wizard_letter.inc
index 19afe2a96f90..267efcefd18a 100644..100755
--- a/testautomation/framework/required/includes/wizard_letter.inc
+++ b/testautomation/framework/required/includes/wizard_letter.inc
@@ -89,7 +89,7 @@ testcase tUpdtWizardLetter
kontext "AutopilotLetter"
LetterHead.Check()
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotLetter"
call DialogTest( AutopilotLetter, 2 )
@@ -123,7 +123,7 @@ testcase tUpdtWizardLetter
warnlog( "FooterHeight should not be enabled in this configuration" )
endif
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotLetter"
call DialogTest( AutopilotLetter, 3 )
@@ -136,11 +136,11 @@ testcase tUpdtWizardLetter
printlog( " * change Complimentary Close to second entry" )
ListGreetings.select( 2 )
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotLetter"
call DialogTest( AutopilotLetter, 4 )
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotLetter"
call DialogTest( AutopilotLetter, 5 )
@@ -150,7 +150,7 @@ testcase tUpdtWizardLetter
printlog( " * check Include only on second ..." )
IncludeFromPage2.check()
- hClickNextButton()
+ hClickButton( NextButton )
kontext "AutopilotLetter"
call DialogTest( AutopilotLetter, 6 )
@@ -178,9 +178,7 @@ testcase tUpdtWizardLetter
endif
brc = hDestroyDocument()
- if ( not brc ) then
- qaerrorlog( "#i59233# The wizard does not display the new template" )
- endif
+ if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
else
warnlog( "Autopilot Letter not open/exceeded timeout" )
endif
@@ -192,9 +190,7 @@ testcase tUpdtWizardLetter
printlog( "Unexpectedly deleted user template(s), please check")
endif
- do while( getDocumentCount() > 0 )
- call hCloseDocument()
- loop
+ hFileCloseAll()
endcase
diff --git a/testautomation/framework/required/includes/wizard_mailmerge.inc b/testautomation/framework/required/includes/wizard_mailmerge.inc
index d6dbe9ae826c..45b8947eec38 100644..100755
--- a/testautomation/framework/required/includes/wizard_mailmerge.inc
+++ b/testautomation/framework/required/includes/wizard_mailmerge.inc
@@ -60,36 +60,36 @@ testcase tUpdtWizardMailMerge
endif
Kontext "MailMergeWizard"
- brc = hClickNextButton()
+ hClickButton( NextButton )
hUpdtMMWPage2()
Kontext "MailMergeWizard"
- brc = hClickNextButton()
- hUpdtMMWpage3()
+ hClickButton( NextButton )
+ hUpdtMMWpage3()
Kontext "MailMergeWizard"
- brc = hClickNextButton()
+ hClickButton( NextButton )
hUpdtMMWPage4()
Kontext "MailMergeWizard"
- brc = hClickNextButton()
+ hClickButton( NextButton )
hUpdtMMWPage5()
Kontext "MailMergeWizard"
- brc = hClickNextButton()
+ hClickButton( NextButton )
hUpdtMMWPage6()
Kontext "MailMergeWizard"
- brc = hClickNextButton()
+ hClickButton( NextButton )
hUpdtMMWPage7()
Kontext "MailMergeWizard"
- brc = hClickNextButton()
+ hClickNextButton()
hUpdtMMWPage8()
printlog( "close the wizard" )
Kontext "MailMergeWizard"
- MailMergeWizard.cancel()
+ hCloseDialog( MailMergeWizard, "cancel" )
hRemoveDatabaseConnections()
hCloseDocument()
diff --git a/testautomation/framework/required/includes/wizard_presentation.inc b/testautomation/framework/required/includes/wizard_presentation.inc
index 2c06a00e1971..59544e0fb48e 100644..100755
--- a/testautomation/framework/required/includes/wizard_presentation.inc
+++ b/testautomation/framework/required/includes/wizard_presentation.inc
@@ -47,14 +47,12 @@ testcase tUpdtWizardPresentation
printlog( "Page 1" )
call Dialogtest( AutopilotPraesentation1 )
-
- hClickNextButton()
+ hClickButton( NextButton )
printlog( "Page 2" )
kontext "AutopilotPraesentation2"
call DialogTest( AutopilotPraesentation2 )
-
- hClickNextButton()
+ hClickButton( NextButton )
printlog( "Page 3" )
kontext "AutopilotPraesentation3"
@@ -65,9 +63,7 @@ testcase tUpdtWizardPresentation
warnlog( "Presentation wizard not open/exceeded timeout" )
endif
- do while( getDocumentCount() > 0 )
- call hCloseDocument()
- loop
+ hFileCloseAll()
gApplication = "WRITER"
diff --git a/testautomation/framework/required/includes/wizard_webpage.inc b/testautomation/framework/required/includes/wizard_webpage.inc
index 6200079c8025..6200079c8025 100644..100755
--- a/testautomation/framework/required/includes/wizard_webpage.inc
+++ b/testautomation/framework/required/includes/wizard_webpage.inc
diff --git a/testautomation/framework/tools/includes/all_interfaces.txt b/testautomation/framework/tools/includes/all_interfaces.txt
deleted file mode 100755
index e81f5b7834fa..000000000000
--- a/testautomation/framework/tools/includes/all_interfaces.txt
+++ /dev/null
@@ -1,125 +0,0 @@
-function hGetFileLocationAPI() as string
-function hGetDocTypeAPI() as string
-function listdebug( lsList() as string , cComment as string ) as integer
-function initlistdebug( cComment as string ) as integer
-function listmoveitem( source() as string, target() as string, itemid as integer ) as integer
-function listconvertpath( lsList() as string ) as integer
-function listInsertSection( lsList() as string, cSection as string ) as integer
-function CheckAsianLanguageSupport( sSupport as String ) as String
-function fStartupNavigator(navigatorItem as String , subItemNum as Integer)
-function fCloseNavigator
-function fGetCountryName( CountryID as Integer ) as String
-function hToolsCustomizeOpen() as boolean
-function hToolsCustomizeSelectTab( cTab as string ) as boolean
-function hToolsCustomizeClose( iMode as integer ) as boolean
-function hToolsCustomizeAddNewMenu( cName as string, bMode as boolean ) as boolean
-function hDeselectSeparator() as integer
-function hClickCommandButton( iItemToClick as integer ) as boolean
-function hFileOpenMultiSelect( iArray() as integer ) as integer
-function hSaveLoadDelSuccess( cFile as string ) as integer
-function hLoadFileExpectSuccess( fpath as string ) as boolean
-function hLoadFileExpectFailure( fpath as string ) as boolean
-function hSaveFileExpectSuccess( fpath as string , bReplace as boolean ) as boolean
-function hSaveFileExpectFailure( fpath as string , errortype as integer ) as boolean
-function hCreateDirectoryExpectSuccess( dirname as string ) as boolean
-function hDeleteFileViaFileOpen( cFile as String ) as boolean
-function hGetFileCountViaFileOpen() as integer
-function hNameGen_append( iDecChar as long ) as string
-function hNameGen_lead( iDecChar as long ) as string
-function hGetRelPath( cStartDir, cFileName as String ) as string
-function hFindFileObjectViaFileOpen( cName as string ) as integer
-function hGetControlParams( cParam as string ) as integer
-function hGetControlName( iControl as integer ) as string
-function hInsertControl( iControl as integer ) as string
-function hDrawControlOnDialog( iControl as integer ) as string
-function hDrawControl( xPos as integer, yPos as integer, xEnd as integer, yEnd as integer ) as boolean
-function hGetControlPosXO( iControl as integer ) as integer
-function hGetControlPosYO( iControl as integer ) as integer
-function hGetControlPosXE( iControl as integer ) as integer
-function hGetControlPosYE( iControl as integer ) as integer
-function hGetControlPosXM( iControl as integer ) as integer
-function hGetControlPosYM( iControl as integer ) as integer
-function hSelectControl( iControl as integer ) as boolean
-function hOpenHelp() as boolean
-function hCloseHelp() as boolean
-function hSelectHelpTab( cTab as string ) as boolean
-function hUseBookmarksContextMenu( cAction as string ) as boolean
-function hHelpGetAboutItemCount() as integer
-function hHelpGetSearchIndexItemCount() as integer
-function hGetHelpContentHeader( iLength as integer ) as string
-function hGetI18nData( cSection as string, cLanguage as string ) as string
-function hGetTwoDigitLangCode( iLanguage as integer ) as string
-function hTestLocale() as boolean
-function hInitSingleDoc() as boolean
-function hInitBackingMode() as boolean
-function hInitWriteDocIdentifier( cString as string ) as boolean
-function hBatchLoadJavaFiles( aFileList() , cIdent as string )
-function hFindCopyRemoveJavaLogs( cSourcePath as string ) as boolean
-sub GetPathList ( ls1 () as String, ls2 () as String, ls3 () as String )
-sub CreatePathList
-function URLGraphicCheck ( bRelativ as Boolean, sFile as String )
-sub DialogTestForViewOptions
-sub DialogTextForViewOptions_move
-sub MouseTestForViewOptions
-sub Make3D
-sub hResetAutosave()
-sub DeleteColor( cColorName as String )
-sub modifyColorRGB_PGUP( iColor as Integer )
-sub createNewColor( aColor() as String )
-sub getColorRGB( aColor() as String )
-sub compareTwoColorsRGB( aColor() as String )
-sub ModifyColorRGB( aColor() as String )
-function hOpenPropertyBrowser() as boolean
-function hClosePropertyBrowser() as boolean
-function hPBSetControlName( cControl as string ) as boolean
-function hPBGetControlName( cControl as string ) as boolean
-function hCheckPropertyPresence ( cSetting as string , iPos as integer ) as boolean
-function hSetPBTabPage( iPage as integer ) as boolean
-function hSetLabelName( sLabelName as string ) as boolean
-function hWaitForObject( oControl as object, iTime as integer ) as integer
-function hGetPrivateHttpServer( _proxy as string, _port as string ) as boolean
-function hGetPrivateFtpServer( _proxy as string, _port as string ) as boolean
-function hGetPrivateSocksServer( _proxy as string, _port as string ) as boolean
-function hGetPrivateInputPath( bVerbose as boolean ) as string
-function hGetPrivateInputFile( bVerbose as boolean ) as string
-function hCreateScriptingObject( cName as string ) as boolean
-function hRenameScriptingObject( cName as string ) as boolean
-function hDeleteScript( cName as string , bSuccess as boolean ) as boolean
-function hOpenScriptOrganizer( iDialog as integer ) as boolean
-function hCloseScriptOrganizer() as boolean
-function hOpenRunMacroDialog() as boolean
-function hSelectXMLSecTab( cTab as string ) as boolean
-function hGetPrinterPosition( cName as string, bWarn as boolean ) as integer
-function hDelPrinter( cPrinterName as string ) as integer
-function hGetSpadminPath() as string
-function hShutdownOffice() as integer
-function hOpenSpadmin() as boolean
-function hWaitForSpAdmin() as boolean
-function hCreateFaxDevice( cName as string ) as boolean
-function hDocumentInfoSelectTab( cTabPage as string ) as boolean
-function hFindTemplate( sTemplateName as string ) as integer
-function hGetRefFilePath( cCategory as string, location as string) as string
-function hSelectCategory( cCategory as string ) as boolean
-function hSelectFileFolder( iFolder as integer , bVerbose as boolean ) as integer
-function hGetFileFolderName( iFolder as integer ) as string
-function hSelectDocumentObject( iTitle as integer , iMode as integer ) as string
-function hIsTemplateDialogClosed() as boolean
-function hIsObjectAFolder( iObjects as integer ) as boolean
-function hDeleteUserTemplates() as integer
-function hAccessStandardBar() as boolean
-function hResetStandardBar() as boolean
-function hStandardbarItemGetCount() as integer
-function hToggleToolbarItem( iMenuPos as integer )
-function hStandardbarLoadUrl() as boolean
-function hStandardbarNewDialog()
-function hStandardbarSaveAs()
-function hSetProxies( HTTP_Server as string, HTTP_Port as string, FTP_Server as string, FTP_Port as string, NoProxyFor as string ) as integer
-function hMaximizeDocument() as boolean
-function hOpenWizardWithMenu( cType as string ) as integer
-function hFinishWizard( iMode as integer ) as boolean
-function hGetWizardParams( cType as string, cParam as string ) as integer
-function hWaitForWizard() as integer
-function hSetTemplateSavePath( cFile as string ) as integer
-function hHandleSaveError() as integer
-function hClickNextButton() as boolean
-
diff --git a/testautomation/framework/tools/includes/apicalls.inc b/testautomation/framework/tools/includes/apicalls.inc
deleted file mode 100644
index fca300c5eda7..000000000000
--- a/testautomation/framework/tools/includes/apicalls.inc
+++ /dev/null
@@ -1,116 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Various calls to the API
-'*
-'\******************************************************************************
-
-function hGetFileLocationAPI() as string
-
- '///<h3>Get the location of the current file from API - experimental, do not use</h3>
-
- dim oUnoConnect as object
- dim oUnoService as object
- dim oDocument as object
- dim cDocument as string
-
- const CFN = "hGetFileLocationAPI::"
-
- oUnoConnect = GetUNOApp
- if ( isNull( oUnoConnect ) ) then
- warnlog( CFN & "No UNO connection established" )
- else
- oUnoService = oUnoConnect.createInstance( "com.sun.star.frame.Desktop" )
- if ( isNull( oUnoService ) ) then
- warnlog( CFN & "No UNO Service available" )
- else
- oDocument = oUnoService.getCurrentComponent()
- if ( isNull( oDocument ) ) then
- warnlog( CFN & "No current component available" )
- else
- if ( oDocument.hasLocation() ) then
- cDocument = oDocument.getLocation()
- hGetFileLocationAPI() = cDocument
- printlog( CFN & cDocument )
- else
- warnlog( "Document has no storage location" )
- hGetFileLocationAPI() = ""
- endif
- endif
- endif
- endif
-
-end function
-
-'*******************************************************************************
-
-function hGetDocTypeAPI() as string
-
- '///<h3>Get the current document via API - experimental, do not use</h3>
-
- dim oUnoConnect as object
- dim oUnoService as object
- dim oDocument as object
- dim cDocument as string
-
- const CFN = "hGetDocTypeAPI::"
-
- oUnoConnect = GetUNOApp
- if ( isNull( oUnoConnect ) ) then
- warnlog( CFN & "No UNO connection established" )
- else
- oUnoService = oUnoConnect.createInstance( "com.sun.star.frame.Desktop" )
- if ( isNull( oUnoService ) ) then
- warnlog( CFN & "No UNO Service available" )
- else
- oDocument = oUnoService.getCurrentComponent()
- if ( isNull( oDocument ) ) then
- warnlog( CFN & "No current component available" )
- else
- if ( oDocument.SupportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )then
- hGetDoctypeAPI() = "CALC"
- elseif( oDocument.SupportsService( "com.sun.star.text.TextDocument" ) ) then
- hGetDocTypeAPI() = "WRITER"
- elseif( oDocument.SupportsService( "com.sun.star.drawing.DrawingDocument" ) ) then
- hGetDocTypeAPI() = "DRAW"
- elseif( oDocument.SupportsService( "com.sun.star.formula.FormulaProperties" ) ) then
- hGetDocTypeAPI() = "MATH"
- elseif( oDocument.SupportsService("com.sun.star.presentation.PresentationDocument") ) then
- hGetDocTypeAPI() = "IMPRESS"
- else
- warnlog( "Unknown document type" )
- hGetDocTypeAPI() = ""
- endif
- endif
- endif
- endif
-
-
-end function
-
diff --git a/testautomation/framework/tools/includes/arrayfuncs.inc b/testautomation/framework/tools/includes/arrayfuncs.inc
deleted file mode 100644
index df33885da4cd..000000000000
--- a/testautomation/framework/tools/includes/arrayfuncs.inc
+++ /dev/null
@@ -1,163 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : misc functions for simpler listhandling. uses t_lists.inc
-'*
-'\******************************************************************************
-
-function listdebug( lsList() as string , cComment as string ) as integer
-
- '///<h3>Write the content of a list plus a comment out to a file.</h3>
- '///<i>It is required that following global variables are defined</i>
- '///<ul>
- '///+<li>LDN = ListDebugName (char) = the basename of the debugfiles</li>
- '///+<li>LDC = ListDebugCounter (int) = a number added to the filename</li>
- '///</ul>
-
- dim cFile as string
-
- LDC = LDC + 1
- cFile = LDN & LDC & ".log"
-
- dim sList( 5 ) as string
- sList( 0 ) = "5"
- sList( 1 ) = ""
- sList( 2 ) = "---------------------------------------------------------------"
- sList( 3 ) = cComment & " - Listsize: " & listcount( lsList() )
- sList( 4 ) = "---------------------------------------------------------------"
- sList( 5 ) = ""
-
- ListWrite( sList() , cFile , "utf8" )
- ListWriteAppend( lsList() , cFile , "utf8" )
-
-end function
-
-'*******************************************************************************
-
-function initlistdebug( cComment as string ) as integer
-
- '///<h3>Print leading text to a file and an index of the current debug session</h3>
- '///<i>It is required that following global variables are defined</i>
- '///<ul>
- '///+<li>LDN = ListDebugName (char) = the basename of the debugfiles</li>
- '///+<li>LDC = ListDebugCounter (int) = a number added to the filename</li>
- '///</ul>
- dim cFile as string
- cFile = LDN & ".log"
-
- dim sList( 5 ) as string
- sList( 0 ) = "5"
- sList( 1 ) = ""
- sList( 2 ) = "==============================================================="
- sList( 3 ) = cComment & " ---- Debug-Offset is at: " & LDC
- sList( 4 ) = "==============================================================="
- sList( 5 ) = ""
-
- ListWrite( sList() , cFile , "utf8" )
-
- printlog( "" )
- printlog( " *** Debug is enabled ***" )
- printlog( "" )
-
-end function
-
-'*******************************************************************************
-
-function listmoveitem( source() as string, _
- target() as string, _
- itemid as integer ) as integer
-
- '///<h3>Move one item from one list to another by index</h3>
- '///<ul>
-
- '///+<li>copy the list-item from list A to the end of list B, update listcount</li>
- listappend( target() , source( itemid ) )
-
- '///+<li>Delete the entry from the old list, reindex and update listcount</li>
- listdelete( source() , itemid )
-
- '///+<li>Return then updated listcount of the <i>source</i> list</li>
- listmoveitem() = listcount( source() )
-
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function listconvertpath( lsList() as string ) as integer
-
- '///<h3>Execute <i>convertpath</i> on a list containing filepaths</h3>
- '///<ul>
-
- dim iCurrentPath as integer
-
- '///+<li>Convert all listitems with <i>convertpath</i></li>
- for iCurrentPath = 1 to listcount( lsList() )
- lsList( iCurrentPath ) = convertpath( lsList( iCurrentPath ) )
- next iCurrentPath
-
- '///+<li>Return the number of processed paths (listcount)</li>
- listconvertpath() = listcount( lsList() )
-
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function listInsertSection( lsList() as string, _
- cSection as string ) as integer
-
- '///<h3>Appends a section (as ordinary list element) to a list</h3>
- '///<ul>
-
- dim iPos as integer
- dim sSectionString as string
-
- '///+<li>Get the current number of entries from the list</li>
- iPos = listcount( lsList() )
-
- '///+<li>Insert a blank list-entry if we are not at the beginning of the list</li>
- if ( iPos > 2 ) then
- listappend( lsList() , "" )
- end if
-
- '///+<li>Build the section string of type [section-name]</li>
- sSectionString = "[" & cSection & "]"
-
- '///+<li>Append the new section to the list</li>
- listappend( lsList() , sSectionString )
-
- '///+<li>Return the new number of entries in the list (listcount)</li>
- listInsertSection() = listcount( lsList() )
-
- '///</ul>
-
-end function
diff --git a/testautomation/framework/tools/includes/customize_tools.inc b/testautomation/framework/tools/includes/customize_tools.inc
index 2d6d17443913..386c5423ee3a 100644..100755
--- a/testautomation/framework/tools/includes/customize_tools.inc
+++ b/testautomation/framework/tools/includes/customize_tools.inc
@@ -33,43 +33,10 @@
function hToolsCustomizeOpen() as boolean
- '///<h3>Open Tools/Customize</h3>
- '///<i>Starting point: Any plain document</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorstatus (boolean)</li>
- '///<ul>
- '///+<li>TRUE if the Keyboard-Tab is open</li>
- '///+<li>FALSE on any other case</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hToolsCustomizeOpen::"
-
- '///+<li>Open Tools/Customize using the ToolsCustomize slot</li>
+ printlog( "Open Tools/Customize dialog" )
ToolsCustomize
-
- '///+<li>Switch to the Events Tab</li>
- hToolsCustomizeSelectTab( "Events" )
+ hToolsCustomizeOpen() = hToolsCustomizeSelectTab( "Events" )
- '///+<li>Verify that the requested tabpage is open</li>
- Kontext TabCustomizeEvents
- if ( TabCustomizeEvents.exists() ) then
- hToolsCustomizeOpen() = true
- printlog( CFN & "Successfully opened ToolsCustomize" )
- else
- hToolsCustomizeOpen() = false
- printlog( CFN & "Failed to open ToolsCustomize" )
- endif
- '///+<li>Return TRUE on success</li>
- '///</ul>
-
end function
'*******************************************************************************
@@ -100,189 +67,65 @@ function hToolsCustomizeSelectTab( cTab as string ) as boolean
'///<ul>
const CFN = "hToolsCustomizeSelectTab::"
- dim brc as boolean
- brc = false
-
+ hToolsCustomizeSelectTab() = true
ctab = lcase( ctab )
'///+<li>Switch to one of the four available tabpages</li>
'///<ol>
+
+ printlog( "Open Tools/Customize: <" & ctab & ">" )
kontext
try
-
select case ctab
'///+<li>Keyboard</li>
- case "keyboard" : active.setPage TabTastatur
- kontext "TabTastatur"
- if ( Aendern.isVisible() ) then
- brc = true
- endif
+ case "keyboard" :
+ active.setPage TabTastatur
+ WaitSlot
+ kontext "TabTastatur"
+ if ( not Aendern.isVisible() ) then
+ printlog( CFN & "Keyboard tabpage is not available" )
+ hToolsCustomizeSelectTab() = false
+ endif
'///+<li>Menu</li>
- case "menu" : active.setPage TabCustomizeMenu
- kontext "TabCustomizeMenu"
- if ( Entries.isVisible() ) then
- brc = true
- endif
+ case "menu" :
+ active.setPage TabCustomizeMenu
+ WaitSlot
+ kontext "TabCustomizeMenu"
+ if ( not Entries.isVisible() ) then
+ printlog( CFN & "Menu tabpage is not available" )
+ hToolsCustomizeSelectTab() = false
+ endif
'///+<li>Toolbars</li>
- case "toolbars" : active.setPage TabCustomizeToolbars
- kontext "TabCustomizeToolbars"
- if ( ToolbarContents.isVisible() ) then
- brc = true
- endif
+ case "toolbars" :
+ active.setPage TabCustomizeToolbars
+ WaitSlot
+ kontext "TabCustomizeToolbars"
+ if ( not ToolbarContents.isVisible() ) then
+ printlog( CFN & "Toolbar tabpage is not available" )
+ hToolsCustomizeSelectTab() = false
+ endif
'///+<li>Events</li>
- case "events" : active.setPage TabCustomizeEvents
- kontext "TabCustomizeEvents"
- if ( AssignMacro.isVisible() ) then
- brc = true
- endif
+ case "events" :
+ active.setPage TabCustomizeEvents
+ WaitSlot
+ kontext "TabCustomizeEvents"
+ if ( not AssignMacro.isVisible() ) then
+ printlog( CFN & "Assign Macro tabpage is not available" )
+ hToolsCustomizeSelectTab() = false
+ endif
end select
'///</ol>
-
catch
-
printlog( CFN & "Could not access requested tabpage" )
- brc = false
-
+ hToolsCustomizeSelectTab() = false
endcatch
-
- if ( brc ) then
- printlog( CFN & "Opened Tab: " & cTab )
- else
- printlog( CFN & "Failed to open Tab: " & cTab )
- endif
-
- '///+<li>Return TRUE on success</li>
'///</ul>
- hToolsCustomizeSelectTab() = brc
end function
'*******************************************************************************
-function hToolsCustomizeClose( iMode as integer ) as boolean
-
- '///<h3>Close the ToolsCustomize-Dialog</h3>
- '///<i>Starting point: Tools/Customize dialog</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Closing mode (integer)</li>
- '///<ul>
- '///+<li>1: Use OK-button</li>
- '///+<li>2: Use Cancel-button</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorstatus (boolean)</li>
- '///<ul>
- '///+<li>TRUE if executing close action succeeded</li>
- '///+<li>FALSE on any other condition</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hToolsCustomizeClose::"
- dim brc as boolean : brc = true
-
- kontext
-
- '///+<li>Switch to the Events page by default</li>
- active.setPage( TabCustomizeEvents )
-
- '///+<li>Close dialog by OK or CANCEL</li>
- '///<ol>
- select case iMode
- '///+<li>OK</li>
- case 1 : TabCustomizeEvents.OK()
- '///+<li>Cancel</li>
- case 2 : TabCustomizeEvents.Cancel()
- case else
- brc = false
- end select
- '///</ol>
-
-
-
- '///+<li>Verify that the dialog has indeed been closed</li>
- kontext "TabCustomizeEvents"
- TabCustomizeEvents.notExists( 3 )
- if ( TabCustomizeEvents.exists() ) then
- brc = false
- endif
-
- if ( brc ) then
- printlog( CFN & "Closed Tools/Customize" )
- else
- printlog( CFN & "Failed to close Tools/Customize" )
- endif
-
- '///</ul>
- hToolsCustomizeClose() = brc
-end function
-
-'*******************************************************************************
-
-function hToolsCustomizeAddNewMenu( cName as string, bMode as boolean ) as boolean
-
- '///<h3>Add a new menu via Tools/Customize/Menu</h3>
- '///<i>Starting point: Tools/Customize with Menu-Tab open</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Name of the new menu (string)</li>
- '///+<li>Mode (boolean). Options:</li>
- '///<ul>
- '///+<li>TRUE = The entry will be created (OK)</li>
- '///+<li>FALSE = The entry will not be created (Cancel)</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorstatus (boolean)</li>
- '///<ul>
- '///+<li>TRUE on success</li>
- '///+<li>FALSE on failure</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hToolsCustomizeAddNewMenu::"
- dim brc as boolean
- brc = false
-
- '///+<li>Click the &quot;New...&quot; button</li>
- kontext "TabCustomizeMenu"
- BtnNew.click()
-
- '///+<li>Verify that the menu organizer exists</li>
- Kontext "MenuOrganiser"
- if ( not MenuName.exists() ) then
- printlog( CFN & "MenuOrganiser is not open" )
- exit function
- endif
-
- '///+<li>Name the new menu if we intend to create the new entry</li>
- if ( bMode ) then
- printlog( CFN & "Naming menu: " & cName )
- MenuName.setText( cName )
- MenuOrganiser.OK()
- brc = true
- else
- call DialogTest( MenuOrganiser )
- printlog( CFN & "Opened and closed MenuOrganiser" )
- MenuOrganiser.cancel()
- brc = true
- endif
-
- hToolsCustomizeAddNewMenu() = brc
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hDeselectSeparator() as integer
'///<h3>Make sure that we do not work on a separator item (Toolbars)</h3>
diff --git a/testautomation/framework/tools/includes/filedlg_tools.inc b/testautomation/framework/tools/includes/filedlg_tools.inc
deleted file mode 100644
index 68d46216ed4d..000000000000
--- a/testautomation/framework/tools/includes/filedlg_tools.inc
+++ /dev/null
@@ -1,117 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Special tasks on filedialogs
-'*
-'\******************************************************************************
-
-function hFileOpenMultiSelect( iArray() as integer ) as integer
-
-
- '///<h3>Multiselect files with the fileopen dialog</h3>
- '///<i>This function uses keyboard navigation to select a number of files
- '///+ (multiselection).</i><br>
- '///<u>Starting point</u>: FileOpen dialog has context, workdirectory is
- '///+ open<br><br>
-
- '///<u>Input value(s):</u><br>
- '///<ol>
- '///+<li>Array (integer)</li>
- '///<ul>
- '///+<li>if ( array( n ) = 1 ) select the file at pos n, starting at n = 1</li>
- '///+<li>Any other value: Do not select, preferably preset with 0!</li>
- '///+<li>The size of the array must less or equal the number of files in the filepicker<br>
- '///+ Array( 0 ) is ignored</li>
- '///</ul>
- '///</ol>
-
- '///<u>Return Value:</u><br>
- '///<ol>
- '///+<li>Number of selected files (integer)</li>
- '///<ul>
- '///+<li>= 0: any error</li>
- '///+<li>&gt; 0: Number of selected files (Sum of Array( n ) = 1)</li>
- '///</ul>
- '///</ol>
-
- const CFN = "hFileOpenMultiSelect::"
- dim brc as boolean 'a multi purpose boolean returnvalue
-
- dim iArraySize as integer
- dim iCurrentFile as integer
- dim cCurrentFile as string
- dim iSelectedFilesCount as integer
- iSelectedFilesCount = 0
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Get the size of the array</li>
- iArraySize = ubound( iArray() )
-
- '///+<li>Get the number of items from the filepicker</li>
- kontext "OeffnenDlg"
- iFileCount = Dateiauswahl.getItemCount()
-
- '///+<li>Verify that the array size is equal or less the number of files<br>
- '///+ Exit with rc = 0 on error</li>
- ' Note: This can be done because it is quite simply expected that we know the
- ' number of files within the workdirectory. Take one input-dir.
- if ( iFileCount < iArraySize ) then
- qaerrorlog( CFN & "Array too large. Array must be <= file count" )
- printlog( CFN & "Files present in dialog: " & iFileCount )
- printlog( CFN & "Arraysize..............: " & iArraySize )
- hFileOpenMultiSelect() = 0
- exit function
- endif
-
- '///+<li>Select the first object in the filelist</li>
- kontext "OeffnenDlg"
- DateiAuswahl.typeKeys( "<HOME>" )
-
- '///+<li>Run through the filelist and select all items that are marked in the array</li>
- '///<ul>
- for iCurrentFile = 1 to iArraySize
-
- '///+<li>Select a file with CTRL+SPACE</li>
- if ( iArray( iCurrentFile ) = 1 ) then
- DateiAuswahl.typeKeys( "<MOD1 SPACE>" )
- cCurrentFile = DateiAuswahl.getSelText() ' does this work?
- printlog( CFN & "Select: " & cCurrentFile & " at pos: " & iCurrentFile )
- iSelectedFilesCount = iSelectedFilesCount + 1
- endif
-
- '///+<li>Move one down with CTRL key pressed</li>
- DateiAuswahl.typekeys( "<MOD1 DOWN>" )
-
- next iCurrentFile
- '///</ul>
- '///</ul>
- hFileOpenMultiSelect() = 0
-
-end function
diff --git a/testautomation/framework/tools/includes/fileoperations.inc b/testautomation/framework/tools/includes/fileoperations.inc
index b8040eb5fbfb..dd91cc08f498 100644..100755
--- a/testautomation/framework/tools/includes/fileoperations.inc
+++ b/testautomation/framework/tools/includes/fileoperations.inc
@@ -64,7 +64,8 @@ function hSaveLoadDelSuccess( cFile as string ) as integer
printlog( CFN & "Enter with option: " & cFile & "/" & cFileExt )
'///+<li>Close the navigator if it exists</li>
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
'///+<li>Save the current file, overwriting existing</li>
brc = hSaveFileExpectSuccess( cFile , TRUE ) ' save and overwrite
@@ -203,90 +204,6 @@ end function
'*******************************************************************************
-function hLoadFileExpectFailure( fpath as string ) as boolean
-
- '///<h3>Load a file where failure is expected</h3>
- '///<i>Uses</i>: framework\tools\t_stringtools.inc<br><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Filename incl. extension (string)</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcondition (boolean)</li>
- '///<ul>
- '///+<li>TRUE = There was an error loading the file (as expected)</li>
- '///+<li>FALSE = The file was loaded without problems/any other error</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hLoadFileExpectFailure::"
-
- dim brc as boolean : brc = true
-
- printlog( CFN & "Enter with option: " & fpath )
-
- '///+<li>Click FileOpen</li>
- hUseAsyncSlot( "FileOpen" )
- Kontext "OeffnenDLG"
-
- '///+<li>Enter filepath</li>
- DateiName.setText( convertpath( fpath ) )
-
- '///+<li>Click &quot;Open&quot;</li>
- oeffnen.click()
-
- '///+<li>Close the expected warning dialog, return to FileOpen</li>
- Kontext "Active"
- if ( Active.Exists( 1 ) ) then
- printlog( CFN & "Expected active: " & active.getText() )
- active.ok()
-
- Kontext "OeffnenDLG"
- if ( OeffnenDlg.exists( 1 ) ) then
- OeffnenDLG.cancel()
- brc = true
- else
- warnlog( CFN & "File Open dialog is not open" )
- brc = false
- endif
- endif
-
- '///+<li>Verify that we are on FileOpen dialog, set errorcondition true</li>
- if ( brc ) then
- Kontext "OeffnenDLG"
- if ( Oeffnen.exists( 1 ) ) then
- printlog( CFN & "File is not loaded, still in File/Open. Good, cancelling" )
- OeffnenDLG.cancel()
- brc = true
- else
- brc = false
- endif
- endif
-
- '///+<li>If the document is loaded, set errorcondition to false</li>
- if ( not brc ) then
- hFileWait( FALSE )
- warnlog( CFN & "The file appears to have loaded correctly. Not good" )
-
- '///+<li>Click away possible messagebox to recover</li>
- Kontext "Active"
- if ( active.exists( 1 ) ) then
- printlog( CFN & "Unexpected active: " & active.getText() )
- Active.OK()
- endif
- endif
-
- '///+<li>Return errorcondition</li>
- hLoadFileExpectFailure() = brc
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hSaveFileExpectSuccess( fpath as string , bReplace as boolean ) as boolean
'///<h3>Save a file with optional replace where success is expected</h3>
@@ -514,80 +431,6 @@ end function
'*******************************************************************************
-function hCreateDirectoryExpectSuccess( dirname as string ) as boolean
-
- '///<h3>Create a directory where success is expected</h3>
- '///<i>Uses</i>: framework\tools\t_stringtools.inc<br><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Name of the directory (string)</li>
- '///<ul>
- '///+<li>Relative or absolute, absolute is recommended</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcondition (boolean)</li>
- '///<ul>
- '///+<li>TRUE = The directory wass created</li>
- '///+<li>FALSE = On any error (Unable to create or file already exists)</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- dim brc as boolean : brc = true
-
- const CFN = "hCreateDirectoryExpectSuccess::"
- printlog( CFN & "Enter with option: " & dirname )
-
- '///+<li>Click &quot;File Open&quot;</li>
- hUseAsyncSlot( "FileOpen" )
-
- '///+<li>Click on &quot;New folder&quot;</li>
- Kontext "OeffnenDlg"
- if ( OeffnenDlg.exists( 2 ) ) then
-
- NeuerOrdner.click()
-
- '///+<li>Enter a name for the folder into the dialog</li>
- Kontext "NeuerOrdner"
- if ( NeuerOrdner.exists( 1 ) ) then
- OrdnerName.setText( dirname )
-
- '///+<li>Click &quot;OK&quot;</li>
- NeuerOrdner.OK()
- else
- warnlog( CFN & "New folder dialog did not open." )
- brc = false
- endif
-
- '///+<li>Handle possible messagebox (unexpected)</li>
- Kontext "Active"
- if Active.Exists( 1 ) then
- printlog( CFN & "Unexpected active: " & active.getText() )
- brc = false
- try
- Active.YES()
- catch
- Active.OK()
- endcatch
- endif
- else
- warnlog( CFN & "File Open dialog is not open." )
- brc = false
- endif
-
- '///+<li>Return errorcondition</li>
- printlog( CFN & "Exit with result: " & brc )
- hCreateDirectoryExpectSuccess() = brc
-
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hDeleteFileViaFileOpen( cFile as String ) as boolean
'///<h3>Delete a file using the File Open dialog</h3>
@@ -693,38 +536,6 @@ function hDeleteFileViaFileOpen( cFile as String ) as boolean
end function
-'******************************************************************************
-
-function hGetFileCountViaFileOpen() as integer
-
- '///<h3>Get the number of items listed in the FilePicker (File Open)</h3>
- '///<i>Note</i>: This function works on the current workdirectory<br><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Number of items listed in filepicker</li>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- '///+<li>Click &quot;File open&quot;</li>
- hUseAsyncSlot( "FileOpen" )
-
- '///+<li>Retrieve the number of items in the filepicker window</li>
- Kontext "OeffnenDLG"
- if ( OeffnenDlg.exists( 2 ) ) then
- hGetFileCountViaFileOpen() = DateiAuswahl.getItemCount()
- OeffnenDLG.cancel()
- else
- hGetFileCountViaFileOpen() = -1
- endif
- '///</ul>
-
-end function
-
'*******************************************************************************
function hNameGen_append( iDecChar as long ) as string
@@ -801,39 +612,6 @@ end function
'*******************************************************************************
-function hGetRelPath( cStartDir, cFileName as String ) as string
-
- '///<h3>Remove the absolute component from a path specification</h3>
- '///<i>Usually you do not need this function, avoid using it</i><br><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Absolute part of a filespec (startdirectory) (string)</li>
- '///<ul>
- '///+<li>e.g. &quot;/home/oscar/mydir&quot;</li>
- '///</ul>
- '///+<li>Fully qualified path to the file/directory (string)</li>
- '///<ul>
- '///+<li>e.g. &quot;/home/oscar/mydir/somedir/myfile.txt&quot;</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Remaining part of the fully qualified path minus startdirectory (string)</li>
- '///<ul>
- '///+<li>e.g. &quot;/somedir/myfile.txt&quot;</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- '///+<li>Find the end of startdir within the FQ filename</li>
- hGetRelPath() = mid( cFileName , len( cStartDir + 1 ) )
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hFindFileObjectViaFileOpen( cName as string ) as integer
'///<h3>Get the position of a filesystem object in filelist of fileopen dialog</h3>
diff --git a/testautomation/framework/tools/includes/formcontrols.inc b/testautomation/framework/tools/includes/formcontrols.inc
index 49c8dbaff943..1085e03869d3 100644..100755
--- a/testautomation/framework/tools/includes/formcontrols.inc
+++ b/testautomation/framework/tools/includes/formcontrols.inc
@@ -31,7 +31,9 @@
' **
'\******************************************************************************
-public const ICONTROLCOUNT = 22
+private const ICONTROLCOUNT = 22
+
+'*******************************************************************************
function hGetControlParams( cParam as string ) as integer
@@ -72,7 +74,7 @@ function hGetControlParams( cParam as string ) as integer
'///+<li>Currently following values are defined:</li>
'///<ul>
- select case cParam
+ select case ( cParam )
'///+<li>XOREGO = 31</li>
case "XOREGO" : hGetControlParams() = 31
'///+<li>XDIST = 8</li>
@@ -123,62 +125,57 @@ function hGetControlName( iControl as integer ) as string
'///<u>Description</u>:
'///<ul>
-
- dim sControl as string
-
'///+<li>Currently following control are defined:</li>
'///<ol>
select case iControl
'///+<li>Push Button</li>
- case 1 : sControl = "Push Button"
+ case 1 : hGetControlName() = "Push Button"
'///+<li>Image Control</li>
- case 2 : sControl = "Image Control"
+ case 2 : hGetControlName() = "Image Control"
'///+<li>Check Box</li>
- case 3 : sControl = "Check Box"
+ case 3 : hGetControlName() = "Check Box"
'///+<li>Radio Button</li>
- case 4 : sControl = "Radio Button"
+ case 4 : hGetControlName() = "Radio Button"
'///+<li>Fixed Text</li>
- case 5 : sControl = "Fixed Text"
+ case 5 : hGetControlName() = "Fixed Text"
'///+<li>Edit Field</li>
- case 6 : sControl = "Edit Field"
+ case 6 : hGetControlName() = "Edit Field"
'///+<li>List Box</li>
- case 7 : sControl = "List Box"
+ case 7 : hGetControlName() = "List Box"
'///+<li>Combo Box</li>
- case 8 : sControl = "Combo Box"
+ case 8 : hGetControlName() = "Combo Box"
'///+<li>Vertical ScrollBar</li>
- case 9 : sControl = "Vertical ScrollBar"
+ case 9 : hGetControlName() = "Vertical ScrollBar"
'///+<li>Horizontal ScrollBar</li>
- case 10 : sControl = "Horizontal ScrollBar"
+ case 10 : hGetControlName() = "Horizontal ScrollBar"
'///+<li>Frame</li>
- case 11 : sControl = "Frame"
+ case 11 : hGetControlName() = "Frame"
'///+<li>Progress Bar</li>
- case 12 : sControl = "Progress Bar"
+ case 12 : hGetControlName() = "Progress Bar"
'///+<li>Vertical Fixed Line</li>
- case 13 : sControl = "Vertical Fixed Line"
+ case 13 : hGetControlName() = "Vertical Fixed Line"
'///+<li>Horizontal Fixed Line</li>
- case 14 : sControl = "Horizontal Fixed Line"
+ case 14 : hGetControlName() = "Horizontal Fixed Line"
'///+<li>Date Field</li>
- case 15 : sControl = "Date Field"
+ case 15 : hGetControlName() = "Date Field"
'///+<li>Time Field</li>
- case 16 : sControl = "Time Field"
+ case 16 : hGetControlName() = "Time Field"
'///+<li>Numeric Field</li>
- case 17 : sControl = "Numeric Field"
+ case 17 : hGetControlName() = "Numeric Field"
'///+<li>Currency Field</li>
- case 18 : sControl = "Currency Field"
+ case 18 : hGetControlName() = "Currency Field"
'///+<li>Form Field</li>
- case 19 : sControl = "Form Field"
+ case 19 : hGetControlName() = "Form Field"
'///+<li>Pattern Field</li>
- case 20 : sControl = "Pattern Field"
+ case 20 : hGetControlName() = "Pattern Field"
'///+<li>File Control</li>
- case 21 : sControl = "File Control"
+ case 21 : hGetControlName() = "File Control"
'///+<li>Tree Control</li>
- case 22 : sControl = "Tree Control"
+ case 22 : hGetControlName() = "Tree Control"
'///</ol>
'///+<li>&quot;&quot; for function parameter &lt; 1 or &gt; 22 </li>
case else : sControl = ""
end select
-
- hGetControlName() = sControl
'///</ul>
end function
@@ -305,14 +302,6 @@ function hDrawControlOnDialog( iControl as integer ) as string
const CFN = "hDrawControlOnDialog::"
- '///+<li>Verify function parameter (this is a top level function)</li>
- if ( ( iControl < 1 ) or ( iControl > ICONTROLCOUNT ) ) then
- warnlog( CFN & "Invalid control-number (iControl) passed: " & iControl )
- hDrawControlOnDialog() = false
- exit function
- endif
-
-
dim sControl as string ' The name of the current control
dim brc as boolean ' some returnvalue
@@ -330,7 +319,8 @@ function hDrawControlOnDialog( iControl as integer ) as string
'///+<li>click the desired control</li>
sControl = hInsertControl( iControl )
- printlog( CFN & " at XO=" & iXO & _
+ printlog( CFN & " Index=" & iControl & _
+ " at XO=" & iXO & _
" XE=" & iXE & _
" YO=" & iYO & _
" YE=" & iYE & _
@@ -406,12 +396,13 @@ function hDrawControl( xPos as integer, _
'///</ol>
'///</ul>
- DialogWindow.MouseUp( 20 , 20 )
+ DialogWindow.MouseUp( 20 , 20 ) : wait 100
try
- DialogWindow.MouseDown ( xPos, yPos )
- DialogWindow.MouseMove ( xEnd, yEnd )
- DialogWindow.MouseUp ( xEnd, yEnd )
+ DialogWindow.MouseMove ( xPos, yPos ) : wait 100
+ DialogWindow.MouseDown ( xPos, yPos ) : wait 100
+ DialogWindow.MouseMove ( xEnd, yEnd ) : wait 100
+ DialogWindow.MouseUp ( xEnd, yEnd ) : wait 100
hDrawControl() = true
catch
warnlog( "#i39852# " & CFN & "Unable to complete mouseactions on dialog" )
@@ -459,18 +450,15 @@ function hGetControlPosXO( iControl as integer ) as integer
'///+<li>13 ... 18 : Column three</li>
'///+<li>&gt; 18 : Column four</li>
'///</ul>
- '///</ul>
-
- if ( iControl <= 6 ) then
- hGetControlPosXO() = xOffset
- elseif( ( iControl >= 7 ) and ( iControl <= 12 ) ) then
- hGetControlPosXO() = xOffset + 1 * xDistance
- elseif( ( iControl >= 13 ) and ( iControl <= 18 ) ) then
- hGetControlPosXO() = xOffset + 2 * xDistance
- else
- hGetControlPosXO() = xOffset + 3 * xDistance
- endif
-
+ '///</ul>
+
+ select case ( iControl )
+ case 1, 2, 3, 4, 5, 6 : hGetControlPosXO() = xOffset
+ case 7, 8, 9, 10, 11, 12 : hGetControlPosXO() = xOffset + 1 * xDistance
+ case 13, 14, 15, 16, 17, 18 : hGetControlPosXO() = xOffset + 2 * xDistance
+ case 19, 20, 21, 22, 23, 24 : hGetControlPosXO() = xOffset + 3 * xDistance
+ end select
+
end function
'*******************************************************************************
@@ -514,13 +502,13 @@ function hGetControlPosYO( iControl as integer ) as integer
'///</ul>
'///</ul>
- select case iControl
- case 1 , 7 , 13 , 19 : hGetControlPosYO() = yOffset
- case 2 , 8 , 14 , 20 : hGetControlPosYO() = yOffset + 1 * yDistance
- case 3 , 9 , 15 , 21 : hGetControlPosYO() = yOffset + 2 * yDistance
- case 4 , 10 , 16 , 22 : hGetControlPosYO() = yOffset + 3 * yDistance
- case 5 , 11 , 17 : hGetControlPosYO() = yOffset + 4 * yDistance
- case 6 , 12 , 18 : hGetControlPosYO() = yOffset + 5 * yDistance
+ select case ( iControl )
+ case 1, 7, 13, 19 : hGetControlPosYO() = yOffset
+ case 2, 8, 14, 20 : hGetControlPosYO() = yOffset + 1 * yDistance
+ case 3, 9, 15, 21 : hGetControlPosYO() = yOffset + 2 * yDistance
+ case 4, 10, 16, 22 : hGetControlPosYO() = yOffset + 3 * yDistance
+ case 5, 11, 17, 23 : hGetControlPosYO() = yOffset + 4 * yDistance
+ case 6, 12, 18, 24 : hGetControlPosYO() = yOffset + 5 * yDistance
end select
end function
@@ -679,8 +667,7 @@ function hSelectControl( iControl as integer ) as boolean
'///+ dialog pane. To prevent the controls from overlapping each other
'///+ they are arranged in rows and columns. Each control is identified
'///+ by a unique number (see description for hInsertControl(...)). The
- '///+ dimensions are defined in hGetControlParams(...). The coordinates
- '///+ returned by this function can be used to draw and to select a control.</i><br>
+ '///+ dimensions are defined in hGetControlParams(...).</i><br>
'///<u>Input</u>:
'///<ol>
'///+<li>Number of the control (integer)</li>
@@ -701,16 +688,18 @@ function hSelectControl( iControl as integer ) as boolean
dim xPos as integer
dim yPos as integer
- dim iTry as integer ' we try five times to grab the control
- dim iTab as integer
+ dim iCurrentSelectionMethod as integer
- hSelectControl() = false
+ const SELECT_MIDDLE = 1 ' click into the middle of the control
+ const SELECT_UPPER_LEFT = 2 ' click the upper left corner of the control
+ const SELECT_LOWER_RIGHT = 3 ' click the lower right corner of the control
+ const SELECT_FRAME_AROUND = 4 ' select by drawing a frame around the control
- '///+<li>Check function parameter, this is a top level function</li>
- if ( ( iControl < 1 ) or ( iControl > ICONTROLCOUNT ) ) then
- warnlog( "Incorrect index passed to function" )
- exit function
- endif
+ const EXTRA_FRAME_SIZE = 1 ' one percent in-/outside the border of the control
+ const SELECTION_METHODS = 4 ' this function sports four ways of seleting a control
+ const REPEAT_COUNT = 5 ' number of times to send a keystroke to the dialog window
+
+ hSelectControl() = false
'///+<li>Verify that the ToolsCollectionBar is visible. if not: Abort</li>
kontext "ToolsCollectionBar"
@@ -737,10 +726,6 @@ function hSelectControl( iControl as integer ) as boolean
' Method 4 is dangerous because it might accidentially select the
' background window which is the reason why this is not the default.
- ' New: Method 5 is troublesome as well because #i79126 does not enable the
- ' OpenProperties-button on the Macro Controls Float. Currently it is just used
- ' to see what happens if we hack alog using keystrokes. Experimental.
-
'///+<li>Try four different ways of selecting the control before giving up</li>
'///<ol>
'///+<li>Mouse-Click in the middle</li>
@@ -749,66 +734,62 @@ function hSelectControl( iControl as integer ) as boolean
'///+<li>Rubberband around the control (Mouse movement)</li>
'///+<li>Deselct everything and use <TAB> to activate the control</li>
'///</ol>
- for iTry = 1 to 5
-
+
+ for iCurrentSelectionMethod = 1 to SELECTION_METHODS
+
Kontext "BasicIDE"
-
- select case iTry
- case 1
+ DialogWindow.typeKeys( "<UP><LEFT>" , REPEAT_COUNT )
+ select case ( iCurrentSelectionMethod )
+ case SELECT_MIDDLE
+
xPos = hGetControlPosXM( iControl )
yPos = hGetControlPosYM( iControl )
DialogWindow.MouseMove( xPos, yPos )
DialogWindow.MouseDown( xPos, yPos )
- DialogWindow.MouseUp ( xPos, yPos )
- case 2
- xPos = hGetControlPosXO( iControl )
- yPos = hGetControlPosYO( iControl )
+ DialogWindow.MouseUp ( xPos, yPos )
+
+ case SELECT_UPPER_LEFT
+
+ xPos = hGetControlPosXO( iControl ) + EXTRA_FRAME_SIZE
+ yPos = hGetControlPosYO( iControl ) + EXTRA_FRAME_SIZE
DialogWindow.MouseMove( xPos, yPos )
DialogWindow.MouseDown( xPos, yPos )
- DialogWindow.MouseUp ( xPos, yPos )
- case 3
- xPos = hGetControlPosXE( iControl )
- yPos = hGetControlPosYE( iControl )
+ DialogWindow.MouseUp ( xPos, yPos )
+
+ case SELECT_LOWER_RIGHT
+
+ xPos = hGetControlPosXE( iControl ) - EXTRA_FRAME_SIZE
+ yPos = hGetControlPosYE( iControl ) - EXTRA_FRAME_SIZE
DialogWindow.MouseMove( xPos, yPos )
DialogWindow.MouseDown( xPos, yPos )
- DialogWindow.MouseUp ( xPos, yPos )
- case 4
- xPos = hGetControlPosXO( iControl ) - 2
- yPos = hGetControlPosYO( iControl ) - 2
+ DialogWindow.MouseUp ( xPos, yPos )
+
+ case SELECT_FRAME_AROUND
+
+ xPos = hGetControlPosXO( iControl ) - EXTRA_FRAME_SIZE
+ yPos = hGetControlPosYO( iControl ) - EXTRA_FRAME_SIZE
DialogWindow.MouseMove( xPos, yPos )
DialogWindow.MouseDown( xPos, yPos )
- DialogWindow.MouseUp ( xPos, yPos )
- xPos = hGetControlPosXE( iControl ) + 2
- yPos = hGetControlPosYE( iControl ) + 2
+ xPos = hGetControlPosXE( iControl ) + EXTRA_FRAME_SIZE
+ yPos = hGetControlPosYE( iControl ) + EXTRA_FRAME_SIZE
DialogWindow.MouseMove( xPos, yPos )
- DialogWindow.MouseUp ( xPos, yPos )
- case 5
- qaerrorlog( "#i79126# - OpenProperties disabled when selecting control via tab" )
- 'xPos = 80
- 'yPos = 20
- 'DialogWindow.MouseDown( xPos, yPos )
- 'DialogWindow.MouseUp ( xPos, yPos )
- 'for iTab = 1 to iControl + 1
- ' DialogWindow.typeKeys( "<TAB>" )
- 'next iTab
+ DialogWindow.MouseUp ( xPos, yPos )
+
end select
-
-
-
- '///+<li>Check that the ToolsCollectionBar is open</li>
- kontext "ToolsCollectionBar"
- if ( ToolsCollectionBar.exists() ) then
- wait( 300 )
- if ( OpenProperties.isEnabled() ) then
- hSelectControl() = true
- exit for
- else
- wait( 500 )
+
+ try
+ if ( iControl = 11 ) then
+ wait( 100 )
+ printlog( "tried method: " & iCurrentSelectionMethod )
endif
- endif
+ ContextProperties
+ hSelectControl() = true
+ exit for
+ catch
+ endcatch
- next iTry
+ next iCurrentSelectionMethod
'///</ul>
end function
diff --git a/testautomation/framework/tools/includes/help_tools.inc b/testautomation/framework/tools/includes/help_tools.inc
index ed55c319fd40..8552954f4f34 100644..100755
--- a/testautomation/framework/tools/includes/help_tools.inc
+++ b/testautomation/framework/tools/includes/help_tools.inc
@@ -33,81 +33,35 @@
function hOpenHelp() as boolean
- '///<h3>Function to open the Help Browser</h3>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcondition (boolean)</li>
- '///<ul>
- '///+<li>TRUE if the help is open</li>
- '///+<li>FALSE if the help did not open</li>
- '///</ul>
- '///</ol>
-
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hOpenHelp::"
+ printlog( "Open Help Browser" )
HelpContents
-
- if ( WaitSlot( 3000 ) <> WSFinished ) then
- printlog( CFN & "Failed to open help" )
- hOpenHelp() = FALSE
+
+ kontext "StarOfficeHelp"
+ if ( StarOfficeHelp.exists( 5 ) ) then
+ hOpenHelp() = TRUE
else
- kontext "StarOfficeHelp"
- if ( StarOfficeHelp.exists() ) then
- printlog( CFN & "Help was opened" )
- hOpenHelp() = TRUE
- else
- printlog( CFN & "Help was not opened" )
- hOpenHelp() = FALSE
- endif
+ warnlog( "Unable to open help browser" )
+ hOpenHelp() = FALSE
endif
-
+
+
end function
'*******************************************************************************
function hCloseHelp() as boolean
- '///<h3>Function to close the Help Browser</h3>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcondition (boolean)</li>
- '///<ul>
- '///+<li>TRUE if the help is closed</li>
- '///+<li>FALSE if the help did not close</li>
- '///</ul>
- '///</ol>
-
- const CFN = "hCloseHelp::"
+ printlog( "Close Help Browser" )
kontext "StarOfficeHelp"
- if ( StarOfficeHelp.exists() ) then
-
- hUseAsyncSlot( "FileClose")
- StarOfficeHelp.notExists( 3 )
-
- if ( StarOfficeHelp.Exists() ) then
- printlog( CFN & "Help was not closed")
- hCloseHelp() = FALSE
- else
- printlog( CFN & "Help was closed")
- hCloseHelp() = TRUE
- endif
- else
- printlog( CFN & "Help is not open, no action taken")
+ StarOfficeHelp.typeKeys( "<MOD1 F4>" )
+
+ if ( StarOfficeHelp.notExists( 3 ) ) then
hCloseHelp() = TRUE
+ else
+ warnlog( "Help browser could not be closed" )
+ hCloseHelp() = FALSE
endif
end function
@@ -125,9 +79,9 @@ function hSelectHelpTab( cTab as string ) as boolean
'///+<li>&quot;index&quot; for the index tab</li>
'///+<li>&quot;find&quot; for the find tab</li>
'///+<li>&quot;bookmarks&quot; for the bookmarks tab</li>
- '///</ul>
+ '///</ul>
'///</ol>
-
+
'///<u>Returns</u>:
'///<ol>
'///+<li>Errorcondition (boolean)</li>
@@ -136,19 +90,16 @@ function hSelectHelpTab( cTab as string ) as boolean
'///+<li>FALSE if the requested tabpage did not open</li>
'///</ul>
'///</ol>
-
- '///<u>Description</u>:
+
+ '///<u>Description</u>:
'///<ul>
const CFN = "hSelectHelpTab::"
- dim brc as boolean
- brc = false
-
- dim cTabName as string
- cTabName = lcase( cTab )
+ dim brc as boolean : brc = false
+ dim cTabName as string : cTabName = lcase( cTab )
kontext "StarOfficeHelp"
-
+
printlog( CFN & "Enter" )
'///+<li>Select the requested Tabpage, verify that it is open</li>
@@ -173,7 +124,7 @@ function hSelectHelpTab( cTab as string ) as boolean
call DialogTest( BookmarksPage )
brc = true
endif
- case else
+ case else
printlog( CFN & "Invalid parameter passed to function: " & cTab )
printlog( CFN & "Valid are: content, index, find, bookmarks" )
brc = false
@@ -183,9 +134,9 @@ function hSelectHelpTab( cTab as string ) as boolean
if ( brc ) then
printlog( CFN & "Exit: Selected Tabpage: " & cTab )
endif
-
+
'///+<li>Return TRUE or FALSE</li>
- hSelectHelpTab() = brc
+ hSelectHelpTab() = brc
'///</ul>
end function
@@ -202,9 +153,9 @@ function hUseBookmarksContextMenu( cAction as string ) as boolean
'///+<li>&quot;show&quot;</li>
'///+<li>&quot;rename&quot;</li>
'///+<li>&quot;delete&quot;</li>
- '///</ul>
+ '///</ul>
'///</ol>
-
+
'///<u>Returns</u>:
'///<ol>
'///+<li>Errorcondition (boolean)</li>
@@ -213,13 +164,13 @@ function hUseBookmarksContextMenu( cAction as string ) as boolean
'///+<li>FALSE on any other error</li>
'///</ul>
'///</ol>
-
- '///<u>Description</u>:
+
+ '///<u>Description</u>:
'///<ul>
const CFN = "hUseBookmarksContextMenu::"
dim cSelection as string
dim iActionPos as integer
-
+
printlog( CFN & "Enter" )
'///+<li>Verify that we are on the Bookmarks Page</li>
@@ -245,7 +196,7 @@ function hUseBookmarksContextMenu( cAction as string ) as boolean
hUseBookmarksContextMenu() = false
exit function
endif
-
+
'///+<li>Open the context menu and select the requested index</li>
kontext "Bookmarks"
Bookmarks.openContextMenu()
@@ -254,178 +205,35 @@ function hUseBookmarksContextMenu( cAction as string ) as boolean
'///+<li>Return TRUE if all went well so far</li>
hUseBookmarksContextMenu() = true
-
- '///</ul>
-
-end function
-'*******************************************************************************
-
-function hHelpGetAboutItemCount() as integer
-
- '///<h3>Get the number of applications listed in the Help ListBox</h3>
-
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Number of applications listed (integer)</li>
- '///<ul>
- '///+<li>The default is 7</li>
'///</ul>
- '///</ol
-
- '///<u>Description</u>:
- '///<ul>
-
- const I_ABOUT_ITEMS = 8
- const CFN = "hHelpGetAboutItemCount::"
-
- dim iItem as integer
- dim cItemName as string
- dim iAboutItems as integer
- dim brc as boolean
-
- printlog( CFN & "Enter" )
-
- '///+<li>Open Help</li>
- brc = hOpenHelp()
- if ( not brc ) then
- qaerrorlog( CFN & "Help not open, aborting" )
- hHelpGetAboutItemCount() = 0
- exit function
- endif
-
- hSelectHelpTab( "index" )
- Kontext "IndexPage"
-
- '///+<li>get the number of applications from the drop down box</li>
- iAboutItems = HelpAbout.getItemCount()
- if ( iAboutItems <> I_ABOUT_ITEMS ) then
- warnlog( "The list of topics is incomplete:" )
- endif
-
- '///+<li>Print the list of items to the log</li>
- printlog( CFN & "Items listed in Application Listbox (HelpAbout)" )
- for iItem = 1 to iAboutItems
- cItemName = HelpAbout.getItemText( iItem )
- printlog( " " & cItemName )
- next iItem
-
- '///+<li>close help</li>
- hCloseHelp()
- '///</ul>
-
- printlog( CFN & "Exit with item count = " & iAboutItems )
- hHelpGetAboutItemCount() = iAboutItems
-
-end function
-
-'*******************************************************************************
-
-function hHelpGetSearchIndexItemCount() as integer
- '///<h3>Get the number of items in the Help Search Index</h3>
- '///<i>Starting point: Help / Index page</i><br>
- '///<i>Note: Workaround for incorrect value returned by .getItemCount()</i><br>
-
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Number of items in the list (integer)</li>
- '///</ol>
-
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hHelpGetSearchIndexItemCount:"
-
- dim iItem as integer
- printlog( CFN & "Enter" )
-
- '///+<li>Run through the list and count the items, break on error</li>
- for iItem = 1 to 10000
-
- try
- SearchIndex.select( iItem )
- catch
- iItem = iItem - 1
- exit for
- endcatch
-
- next iItem
-
- printlog( CFN & "Exit with item count = " & iItem )
- hHelpGetSearchIndexItemCount() = iItem
- '///</ul>
-
end function
'*******************************************************************************
-function hGetHelpContentHeader( iLength as integer ) as string
-
-
- '///<h3>Get the header of the content in the help browser</h3>
- '///<i>This is the first line of the content page, truncated (if desired)</i><br><br>
+function hHelpGetAboutItemCount() as integer
- '///<u>Parameter(s):</u><br>
- '///<ol>
- '///+<li>Length of the requested string (Integer)</li>
- '///<ul>
- '///+<li>The max length of the string to be returned</li>
- '///+<li>&le; 0 = do not truncate</li>
- '///</ul>
- '///</ol>
+ printlog( "Get the number of applications listed in the help listbox (should be 8)" )
+ const ABOUT_ITEMS = 8
+ dim itemcount as integer
- '///<u>Returns:</u><br>
- '///<ol>
- '///+<li>Header (String)</li>
- '///<ul>
- '///+<li>A string containing the content header</li>
- '///+<li>The header is the first line of the content page</li>
- '///</ul>
- '///</ol>
+ hOpenHelp()
+ hSelectHelpTab( "index" )
- const CFN = "hGetHelpContentHeader::"
- printlog( CFN & "Enter with option (iLength): " & iLength )
- dim cHeaderString as string
+ Kontext "IndexPage"
+ itemcount = HelpAbout.getItemCount()
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Maximize the help viewer (required to avoid cut off strings)</li>
- kontext "HelpContent"
- 'StarOfficeHelp.maximize()
-
- '///+<li>Go to the top left position in the help browser</li>
- HelpContent.typeKeys( "<MOD1 HOME>" )
-
- '///+<li>Mark the entire line - note that this ends at the linebreak</li>
- HelpContent.typeKeys( "<SHIFT END>" )
-
- '///+<li>Copy the string to the clipboard</li>
- EditCopy
-
- '///+<li>Assign the string to a variable</li>
- cHeaderString = getClipboardText
-
- '///+<li>Truncate string</li>
- if ( iLength > 0 ) then
- if ( len( cHeaderString ) > iLength ) then
- cHeaderString = left( cHeaderString, iLength )
- endif
+ if ( itemcount <> ABOUT_ITEMS ) then
+ warnlog( "Number of applications is incorrect" )
+ printlog( "Found...: " & itemcount )
+ printlog( "Expected: " & ABOUT_ITEMS
endif
- '///</ul>
- printlog( CFN & "Exit: " & cHeaderString )
- hGetHelpContentHeader() = cHeaderString
+ hCloseHelp()
+
+ hHelpGetAboutItemCount() = itemcount
end function
+
diff --git a/testautomation/framework/tools/includes/i18n_tools.inc b/testautomation/framework/tools/includes/i18n_tools.inc
index a2b65e12b736..131f162c8436 100644..100755
--- a/testautomation/framework/tools/includes/i18n_tools.inc
+++ b/testautomation/framework/tools/includes/i18n_tools.inc
@@ -31,90 +31,6 @@
'*
'\******************************************************************************
-function hGetI18nData( cSection as string, cLanguage as string ) as string
-
- '///<h3>Retrieve various information about i18n</h3>
- '///<i>Uses datafile: framework/tools/input/i18ndata.txt</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Section from which to retrieve the data (string)</li>
- '///<ul>
- '///+<li>Any name of a section existing in the datafile</li>
- '///</ul>
- '///+<li>Language code as string</li>
- '///<ul>
- '///+<li>Use hGetTwoDigitLangCode(...) to ensure proper string formatting</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Language identifier (string)</li>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- '///+<li>Create the path to the datafile</li>
- dim cPath as string
- cPath = gTesttoolPath & "framework\tools\input\i18ndata.txt"
- cPath = convertpath( cPath )
-
- '///+<li>Find out the required size of the array to hold the entire file</li>
- dim iFileSize as integer
- iFileSize = hListFileGetSize( cPath )
-
- '///+<li>Define an array to hold the datafile</li>
- dim aFileContent( iFileSize ) as string
-
- '///+<li>Retrieve the requested section from the datafile</li>
- hGetDatafileSection( cPath, aFileContent(), cSection, "", "" )
-
- '///+<li>Isolate the requested language item</li>
- hGetI18nData() = hGetValueForKeyAsString( aFileContent(), cLanguage )
-
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hGetTwoDigitLangCode( iLanguage as integer ) as string
-
- '///<h3>Retrieve a two digit language code from integer</h3>
- '///<i>Replaces and enhances deprecated sub &quot;siSpracheSetzen&quot;</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Language Code (integer)</li>
- '///<ul>
- '///+<li>Any number between (and including) 1 and 99</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Language Code (string)</li>
- '///<ul>
- '///+<li>1 - 9 -&gt; &quot;01&quot; - &quot;09&quot;</li>
- '///+<li>10 - 99 -&gt; &quot;10&quot; - &quot;99&quot;</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
- dim cLanguage as string
-
- '///+<li>Convert single digit language code to two digit language string</li>
- if ( ( iLanguage > 0 ) and ( iLanguage < 10 ) ) then
- cLanguage = "0" & iLanguage
- else
- cLanguage = iLanguage
- endif
-
- hGetTwoDigitLangCode() = cLanguage
- '///</ul>
-
-end function
-
-
-'*******************************************************************************
-
function hTestLocale() as boolean
diff --git a/testautomation/framework/tools/includes/init_tools.inc b/testautomation/framework/tools/includes/init_tools.inc
deleted file mode 100644
index e7b90fa75523..000000000000
--- a/testautomation/framework/tools/includes/init_tools.inc
+++ /dev/null
@@ -1,205 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Tools to put the office into a defined state
-'*
-'\******************************************************************************
-
-function hInitSingleDoc() as boolean
-
- '///<h3>Make sure exactly one single writer document is open</h3>
- '///<i>The wizards cannot be triggered correctly from the backing window.
- '///+ As a workaround this function checks the amount of open documents and
- '///+ creates exactly one unchanged Writer document</i><br><br>
-
- '///<u>Parameter(s):</u><br>
- '///<ol>
- '///+<li>No input parameters</li>
- '///</ol>
-
-
- '///<u>Returns:</u><br>
- '///<ol>
- '///+<li>Errorcondition (Boolean)</li>
- '///<ul>
- '///+<li>TRUE: Exactly one Writer document is open</li>
- '///+<li>FALSE: Any error</li>
- '///</ul>
- '///</ol>
-
- const CFN = "hInitSingleDoc::"
- dim cOldApplication as string
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Close all documents until we are on the backing window</li>
- do while ( getDocumentCount > 0 )
- call hCloseDocument()
- loop
-
- '///+<li>Save the previous gApplication</li>
- cOldApplication = gApplication
-
- '///+<li>Set gApplication to WRITER</li>
- gApplication = "WRITER"
-
- '///+<li>Open one new Writer document</li>
- call hNewDocument()
-
- '///+<li>Verify that exactly one document is open</li>
- if ( getDocumentCount = 1 ) then
- printlog( CFN & "A single unchanged writer document is open" )
- hInitSingleDoc() = true
- else
- printlog( CFN & "Failed to open just one single writer document" )
- hInitSingleDoc() = false
- endif
-
- '///+<li>Restore gApplication</li>
- gApplication = cOldApplication
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hInitBackingMode() as boolean
-
- use "global\tools\includes\optional\t_docfuncs.inc"
-
- '///<h3>Make that we are on the backing window (no open documents)</h3>
- '///<i>Close all open documents</i><br><br>
-
- '///<u>Parameter(s):</u><br>
- '///<ol>
- '///+<li>No input parameters</li>
- '///</ol>
-
-
- '///<u>Returns:</u><br>
- '///<ol>
- '///+<li>Errorcondition (Boolean)</li>
- '///<ul>
- '///+<li>TRUE: No open documents are present</li>
- '///+<li>FALSE: Any error</li>
- '///</ul>
- '///</ol>
-
- const CFN = "hInitBackingMode::"
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Close all documents until we are on the backing window</li>
- do while ( getDocumentCount > 0 )
- hCloseDocument()
- loop
-
- '///+<li>verify that we do not have any open documents left (redundant check)</li>
- if ( getDocumentCount = 0 ) then
- printlog( CFN & "Office is in backing mode." )
- hInitBackingMode() = true
- else
- printlog( CFN & "Office is in undefined state." )
- hInitBackingMode() = false
- endif
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hInitWriteDocIdentifier( cString as string ) as boolean
-
-
- '///<h3>Write a specific string to an open writer document</h3>
- '///<i>This function verifies that exactly one document is open, that this is a
- '///+ Writer document and writes the string to the document</i><br><br>
-
- '///<u>Parameter(s):</u><br>
- '///<ol>
-
- '///+<li>A free form string (String) which serves as identifier for the document</li>
- '///<ul>
- '///+<li>The first character should be uppercase</li>
- '///</ul>
-
- '///</ol>
-
-
- '///<u>Returns:</u><br>
- '///<ol>
- '///+<li>Errorcondition (Boolean)</li>
- '///<ul>
- '///+<li>TRUE: The string was written correctly</li>
- '///+<li>FALSE: Too many open documents</li>
- '///+<li>FALSE: Not a Writer document</li>
- '///+<li>FALSE: Any other error</li>
- '///</ul>
- '///</ol>
-
- const CFN = "hInitWriteDocIdentifier::"
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Verify number of open documents</li>
- if ( getDocumentCount <> 1 ) then
- printlog( CFN & "Incorrect document count" )
- hInitWriteDocIdentifier() = false
- exit function
- endif
-
- '///+<li>Verify that it is a writer document</li>
- kontext "DocumentWriter"
- if ( not DocumentWriter.exists() ) then
- printlog( CFN & "Open document is not a text document" )
- hInitWriteDocIdentifier() = false
- exit function
- endif
-
- '///+<li>Write the string</li>
- kontext "DocumentWriter"
- DocumentWriter.typeKeys( "<MOD1 END>" )
- DocumentWriter.typeKeys( "<MOD1 SHIFT HOME>" )
- DocumentWriter.typeKeys( "<DELETE>" )
- DocumentWriter.typekeys( cString )
-
- '///+<li>Verify the string</li>
- DocumentWriter.typeKeys( "<MOD1 END>" )
- DocumentWriter.typeKeys( "<MOD1 SHIFT HOME>" )
- EditCopy
- if ( getClipboardText = cString ) then
- printlog( CFN & "Document has been successfully modified." )
- hInitWriteDocIdentifier() = true
- else
- printlog( CFN & "Could not verify document identification string" )
- hInitWriteDocIdentifier() = false
- endif
- '///</ul>
-
-end function
diff --git a/testautomation/framework/tools/includes/javatools.inc b/testautomation/framework/tools/includes/javatools.inc
deleted file mode 100644
index d5ac6fd36148..000000000000
--- a/testautomation/framework/tools/includes/javatools.inc
+++ /dev/null
@@ -1,151 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.Skottke@Sun.Com
-'*
-'* short description : Tools to ease working with files including Java
-'*
-'\******************************************************************************
-
-function hBatchLoadJavaFiles( aFileList() , cIdent as string )
-
- '///<h3>Load and close a list of files with recovery on error</h3>
- '///<u>Input</u>: A list containing files to load<br>
- '///<u>Returns</u>: No returnvalue
- '///<ul>
-
- const CFN = "hBatchLoadJavaFiles::"
-
- dim iSourceFiles as integer
- iSourceFiles = listcount( aFileList() )
-
- dim iCurrentFile as integer
- dim cCurrentFile as string
- dim brc as boolean
-
- '///+<li>Loop through the list, starting at index 2</li>
- for iCurrentFile = 2 to iSourceFiles
-
- cCurrentFile = aFileList( iCurrentFile )
-
- printlog( "" )
- printlog( "Processing file: " & cCurrentFile )
-
- '///+<li>Load a file, verify</li>
- brc = hFileOpen( aFileList( iCurrentFile ) )
- if ( not brc ) then
- warnlog( "Error while loading: " & cCurrentFile )
- endif
-
- '///+<li>close the file, verify</li>
- brc = hDestroyDocument()
- if ( not brc ) then
- warnlog( "Error while closing: " & cCurrentFile )
- endif
-
- '///+<li>There should be one document left: The first doc</li>
- if ( getDocumentCount() = 1 ) then
- brc = hIdentifyWriterDoc( cIdent , false )
- if ( not brc ) then
- warnlog( "Document <" & cIdent & "> is missing, restarting" )
- call ExitRestartTheOffice()
- endif
-
- elseif ( getDocumentCount() <> 1 ) then
- warnlog( "The number of open documents is incorrect, restarting" )
- call ExitRestartTheOffice()
-
- endif
-
- '///+<li>Check for hs_err_pidXXXX.log files (Java Exceptions)</li>
- brc = hFindCopyRemoveJavaLogs( aFileList( 1 ) )
- if ( not brc ) then
- warnlog( "Java Exceptions were created." )
- printlog( "Find the files in your local OOo-work directory." )
- endif
-
- next iCurrentFile
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hFindCopyRemoveJavaLogs( cSourcePath as string ) as boolean
-
- '///<h3>Search/move hs_err_pidXXXX.log files within a directory recursively</h3>
- '///<u>Input</u>: Start directory<br>
- '///<u>Returns</u>: TRUE if no errors were found
- '///<ul>
-
- ' Reason 1: The files are createn in the CVS tree and must be removed
- ' Reason 2: The files have to be analyzed so the bugs can be fixed
- ' Reason 3: The files must be moved away after each error so they can be
- ' assigned to the correct documents
-
- const CFN = "hFindCopyRemoveJavaLogs::"
-
- dim aSourceFiles( 1000 ) as string
- dim iSourceFiles as integer
- dim aTargetPath as string
- aTargetPath = hGetWorkPath()
-
- dim iCurrentFile as integer
- dim brc as boolean
- brc = true
-
- dim iSPLen as integer ' length of the source-path string + "/" + next letter
- iSPLen = len( cSourcePath ) + 2
-
- '///+<li>Look for leftover hs_err_pidXXXX.log files</li>
- iSourceFiles = GetAllFileList( cSourcePath, "hs_err*.log", aSourceFiles() )
- if ( iSourceFiles > 1 ) then
-
- '///+<li>Print the list to the log</li>
- hListPrint( aSourceFiles(), "New hs_err_pidXXXX.log files exist" )
- brc = false
-
- '///+<li>Copy the hs_err...log files to the local work directory</li>
- for iCurrentFile = 2 to listcount( aSourceFiles() )
-
- ' Create the name of the file we want to copy the hs_err...log to
- aTargetPath = aTargetPath & mid( aSourceFiles( iCurrentFile ) , iSPLen )
- FileCopy( aSourceFiles( iCurrentFile ) , aTargetPath )
-
- '///+<li>Delete the original log file(s)</li>
- hDeleteFile( aSourceFiles( iCurrentFile ) )
-
- next iCurrentFile
-
- else
- Printlog( CFN & "No hs_err_pidXXXX.log file(s) found. Good."
- endif
- '///</ul>
-
- hFindCopyRemoveJavaLogs() = brc
-
-end function
diff --git a/testautomation/framework/tools/includes/options_tools.inc b/testautomation/framework/tools/includes/options_tools.inc
index baffbc968406..27969686dea6 100644..100755
--- a/testautomation/framework/tools/includes/options_tools.inc
+++ b/testautomation/framework/tools/includes/options_tools.inc
@@ -145,84 +145,6 @@ end sub
'*******************************************************************************
-function URLGraphicCheck ( bRelativ as Boolean, sFile as String )
-
- Dim sGraphicPath, sTestString, sDummy as String
- Dim lsFile ( 200 ) as String
- Dim i as Integer
- '///check if the pathname of a linked file is relative or not ( only for func_LoadSaveGeneral_2 )
- sGraphicPath = ( "/share/gallery/photos/desert1.jpg" )
- ListRead ( lsFile(), sFile )
-
- for i=1 to ListCount ( lsFile() )
-
- if Instr( lsFile(i), "IMG SRC" ) <> 0 then
- sTestString = lsFile(i)
- i=1000
- end if
-
- next i
-
- if bRelativ = TRUE then
-
- if Instr( sTestString, "../.." ) = 0 then
- Warnlog "Bug => The path is not relativ!"
- endif
-
- if Instr( sTestString, "file:///" ) <> 0 then
- Warnlog "Bug => The relativ path contains 'file:///'"
- endif
-
- else
- if Instr( sTestString, "file:///" ) = 0 then
- Warnlog "Bug => The path is relativ!"
- endif
-
- if Instr( sTestString, "../.." ) <> 0 then
- Warnlog "Bug => The nonrelativ path ( file:/// ) is not correct. It contains '../..'!"
- endif
-
- end if
-
- if Instr( sTestString, sGraphicPath ) = 0 then
- Warnlog "Wrong path to file, the graphic-part in filename is not correct!"
- endif
-
-end function
-
-'*******************************************************************************
-
-sub DialogTestForViewOptions
-
- FormatParagraph
-
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- Active.SetPage TabAusrichtungAbsatz
- active.SetPage TabTextfluss
-
- try
- active.SetPage TabAsianTypography
- catch
- endcatch
-
- active.SetPage TabNumerierungAbsatz
- active.SetPage TabTabulator
- active.SetPage TabInitialen
- active.SetPage TabUmrandung
- active.SetPage TabHintergrund
-
- kontext "TabHintergrund"
- TabHintergrund.Close
- EditSearchAndReplace
-
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
-end sub
-
-'*******************************************************************************
-
sub Make3D
'///test with 3D-objects when 3D-options are changed ( view page )
diff --git a/testautomation/framework/tools/includes/pbrowser_tools.inc b/testautomation/framework/tools/includes/pbrowser_tools.inc
index fefc739e48ea..912b3f85aec2 100644..100755
--- a/testautomation/framework/tools/includes/pbrowser_tools.inc
+++ b/testautomation/framework/tools/includes/pbrowser_tools.inc
@@ -31,173 +31,109 @@
'*
'\******************************************************************************
-private const DEBUG_ENABLE = false
-
function hOpenPropertyBrowser() as boolean
-
- '///<h3>Function to open the properties of a selected control</h3>
- '///<i>The function verifies that the property browser is really open and
- '///+ ensures that we are on the General tabpage</i><br><br>
-
- '///<u>Input</u>:
- '///<ol>
-
- '///+<li>Nothing</li>
-
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
-
- '///+<li>Errorcondition (boolean)</li>
- '///<ul>
- '///+<li>TRUE on successful open of the property browser</li>
- '///+<li>FALSE on any error</li>
- '///</ul>
-
- '///</ol>
-
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hOpenPropertyBrowser::"
- dim irc as integer
-
- '///+<li>Open the property browser (call slot)</li>
- irc = hUseAsyncSlot( "ContextProperties" )
-
- ' Check that the slot did indeed get executed. If not: Warn and exit
- if ( irc = -1 ) then
- warnlog( CFN & "hUseAsyncSlot timed out for <ContextProperties>" )
- hOpenPropertyBrowser() = false
- exit function
- endif
-
- '///+<li>Verify that the property browser is open</li>
+
+ '///<h3>Open the BASIC property browser</h3>
+
+ const CFN = "framework::tools::includes::pbrowser_tools.inc::hOpenPropertyBrowser(): "
+
kontext "ControlPropertiesTabControl"
- if ( ControlPropertiesTabControl.exists( 2 ) ) then
-
- '///+<li>Activate General-tabpage</li>
- ControlPropertiesTabControl.setPage( TabGeneralControl )
-
- '///+<li>Verify that the General-tabpage is visible</li>
- kontext "TabGeneralControl"
- if ( TabGeneralControl.isVisible() ) then
- printlog( CFN & "ok" )
- hOpenPropertyBrowser() = true
+ if ( ControlPropertiesTabControl.exists() ) then
+ printlog( "Property Browser is already open, no action taken" )
+ hOpenPropertyBrowser() = true
+ else
+ if ( hUseAsyncSlot( "ContextProperties" ) <> -1 ) then
+ kontext "ControlPropertiesTabControl"
+ if ( ControlPropertiesTabControl.exists( 2 ) ) then
+ ControlPropertiesTabControl.setPage( TabGeneralControl )
+ hOpenPropertyBrowser() = true
+ else
+ warnlog( CFN & "Dialog <ControlPropertiesTabControl> is not available" )
+ hOpenPropertyBrowser() = false
+ endif
else
- printlog( CFN & "General-tab is not visible." )
+ warnlog( CFN & "Could not execute <ContextProperties> slot" )
hOpenPropertyBrowser() = false
- endif
- else
- printlog( CFN & "Could not open property browser" )
- hOpenPropertyBrowser() = false
+ endif
endif
- '///</ul>
-
+
end function
'*******************************************************************************
function hClosePropertyBrowser() as boolean
-
- '///<h3>A function that closes the Property-Browser</h3>
- '///<i>The property browser is closed by executing the slot (the slot
- '///+ toggles the dialog).</i><br><br>
-
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
-
- '///+<li>Errorcondition (boolean)</li>
- '///<ul>
- '///+<li>TRUE if the Property Browser has been closed</li>
- '///+<li>FALSE if the property browser is not open</li>
- '///+<li>FALSE if the property browser could not be closed</li>
- '///</ul>
-
- '///</ol>
-
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hClosePropertyBrowser::"
- '///+<li>Verify that the property browser is open</li>
+ const CFN = "framework::tools::includes::pbrowser_tools.inc::hClosePropertyBrowser(): "
+ printlog( "Closing Property-Browser (if open)" )
+
kontext "ControlPropertiesTabControl"
- if ( ControlPropertiesTabControl.exists( 1 ) ) then
-
- '///+<li>Execute the ContextProperties slot</li>
- ContextProperties
-
- '///+<li>Verify that the property browser is closed</li>
- if ( ControlPropertiesTabControl.exists() ) then
- printlog( CFN & "Property browser could not be closed" )
- hClosePropertyBrowser() = false
- else
- printlog( CFN & "ok" )
+ if ( ControlPropertiesTabControl.exists() ) then
+
+ hUseAsyncSlot( "ContextProperties" )
+
+ if ( ControlPropertiesTabControl.notExists( 2 ) ) then
hClosePropertyBrowser() = true
+ else
+ warnlog( CFN & "Failed to close dialog" )
+ hClosePropertyBrowser() = false
endif
else
- printlog( CFN & "Property browser is not open" )
- hClosePropertyBrowser() = false
+ printlog( "Property browser is not open, no action taken." )
+ hClosePropertyBrowser() = true
endif
- '///</ul>
-
+
end function
'*******************************************************************************
function hPBSetControlName( cControl as string ) as boolean
-
+
'///<h3>Name a control, with limited errorhandling</h3>
-
+
'///<i>This function was introduced due to a problem with the property-
'///browser not being open fast enough or just refusing to accept input</i><br><br>
-
+
'///<u>Input</u>:
'///<ol>
'///+<li>Text to be inserted in the control &quot;NameText&quot; (string)</li>
'///</ol>
-
+
'///<u>Returns</u>:
'///<ol>
-
+
'///+<li>Errorcondition</li>
'///<ul>
'///+<li>TRUE: The control name was successfully updated</li>
'///+<li>FALSE: Control is not visible within current context</li>
'///</ul>
-
+
'///</ol>
-
+
const CFN = "hPBSetControlName::"
-
+
'///<u>Description</u>:
'///<ul>
'///+<li>Test that the control &quot;NameText&quot; exists</li>
+
+ ' Note: A number of fallbacks are used here because the entryfield "NameText"
+ ' is less than reliable. My hope is that one of the methods succeeds.
kontext "TabGeneralControl"
if ( NameText.exists() ) then
'///+<li>Set the new name</li>
- WaitSlot()
-
+ hDeleteEntryFieldContent( NameText )
+
' Name the control and append some Spaces which should be truncated.
printlog( CFN & "Naming control: " & cControl )
NameText.setText( cControl )
- TabGeneralControl.typeKeys( " <RETURN>" )
+ TabGeneralControl.typeKeys( "<RETURN>" )
WaitSlot()
-
- printlog( CFN & "Verifying rename..." )
+
if ( NameText.getText() = cControl ) then
printlog( CFN & "Name is set ok: " & cControl )
hPBSetControlName() = true
exit function
endif
-
+
' If the name cannot be set this is in 99% of the cases a timing problem.
' Here is a (costly) workaround.
qaerrorlog( CFN & "Name not set correctly, retrying" )
@@ -212,55 +148,55 @@ function hPBSetControlName( cControl as string ) as boolean
hPBSetControlName() = true
exit function
endif
-
+
warnlog( CFN & "Unable to set control name: " & cControl )
hPBSetControlName() = false
-
+
else
warnlog( "Unable to name the control." )
hPBSetControlName() = false
endif
'///</ul>
-
+
end function
'*******************************************************************************
function hPBGetControlName( cControl as string ) as boolean
-
+
'///<h3>Verify that the expected control is open</h3>
'///<i>Use hPBSetControlName( string ) to set the name and when you reopen it
'///+ verify that you got the right control wit this function</i><br><br>
-
+
'///<u>Input</u>:
'///<ol>
'///+<li>Name of the control (string)</li>
'///</ol>
-
+
'///<u>Returns</u>:
'///<ol>
-
+
'///+<li>Errorcondition (boolean)</li>
'///<ul>
'///+<li>TRUE: The control has the correct name</li>
'///+<li>FALSE: Any other condition</li>
'///</ul>
-
+
'///</ol>
-
+
'///<u>Description</u>:
'///<ul>
-
+
dim cControlName as string
const CFN = "hPBGetControlName::"
-
+
'///+<li>If &quot;NameText&quot; exists, retrieve its text</li>
kontext "TabGeneralControl"
if ( TabGeneralControl.exists( 1 ) ) then
if ( TabGeneralControl.isVisible() ) then
-
+ wait( 300 )
cControlName = NameText.getText()
-
+
'///+<li>Verify that the name is correct</li>
if ( cControlName = cControl ) then
printlog( CFN & "The name of the control is correct: " & cControl )
@@ -280,100 +216,42 @@ function hPBGetControlName( cControl as string ) as boolean
hPBGetControlName() = false
endif
'///</ul>
-
-end function
-'*******************************************************************************
-
-function hCheckPropertyPresence ( cSetting as string , iPos as integer ) as boolean
-
- '///<h3>Function to determine whether a property is available for a control or not</h3>
- '///<i>This function takes a string (provided by controlcfg.dat) and looks for an 'x' at.
- '///+ a given position. If it is found it returns TRUE, FALSE if it is a '-'<br>
- '///+Note that this function is a terrible workaround for a missing feature: In the current
- '///+ version of the Testtool we cannot ask which controls are present on a dialog. So this
- '///+ has to be kept in a list of some sort. This is especially bad for a property browser
- '///+ test as we need to maintain such a list for 21 controls and a total of 76 (IIRC)
- '///+ possible properties whereof only a small number (eight, i think) are common for all
- '///+ controls. The test is barely maintainable, issues have been written but there is
- '///+ no solution so far.</i><br><br>
-
- '///<u>Input</u>:
- '///<ol>
-
- '///+<li>Configuration string (string)</li>
- '///<ul>
- '///+<li>The string must be taken from file &quot;controlcfg.dat&quot;</li>
- '///</ul>
-
- '///+<li>Position of the control (integer)</li>
- '///<ul>
- '///+<li>&gt; 0 and &lt; 74 (all possible control config items)</li>
- '///</ul>
-
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Status (boolean)</li>
- '///<ul>
- '///+<li>TRUE: The property should exist for the current control</li>
- '///+<li>FALSE: The property is not expected to exist for this control</li>
- '///</ul>
-
- '///</ol>
-
- '///<u>Description</u>:
- '///<ul>
-
- ' this function looks at a given position in the string cSetting for either
- ' a "x" or a "-".
- ' if "x" is found, the function returns true, else false.
-
-
- '///+<li>Find the requested position in the string, set TRUE if it is an &quot;x&quot;</li>
- if ( mid( cSetting , iPos , 1 ) = "x" ) then
- hCheckPropertyPresence() = true
- else
- hCheckPropertyPresence() = false
- endif
- '///</ul>
-
end function
'*******************************************************************************
function hSetPBTabPage( iPage as integer ) as boolean
-
+
'///<h3>A small helper to switch between tabpages in the property-browser</h3>
'///<u>Input</u>:
'///<ol>
-
+
'///+<li>Page-ID (integer)</li>
'///<ul>
'///+<li>1 = General page</li>
'///+<li>2 = Events page</li>
'///</ul>
-
+
'///</ol>
-
+
'///<u>Returns</u>:
'///<ol>
-
+
'///+<li>Errorcondition (boolean)</li>
'///<ul>
'///+<li>TRUE on success</li>
'///+<li>FALSE on any error</li>
'///</ul>
-
+
'///</ol>
-
+
'///<u>Description</u>:
'///<ul>
-
+
const CFN = "hSetPBTabPage::"
printlog( CFN & "Enter with option: " & iPage )
-
+
'///+<li>Switch to the requested page</li>
kontext "ControlPropertiesTabControl"
if ( not ControlPropertiesTabControl.exists( 3 ) ) then
@@ -381,18 +259,18 @@ function hSetPBTabPage( iPage as integer ) as boolean
hSetPBTabPage() = false
exit function
else
- if ( DEBUG_ENABLE ) then
+ if ( GVERBOSE ) then
printlog( CFN & "Control Properties Dialog is open" )
endif
endif
-
+
select case iPage
- case 1
-
+ case 1
+
printlog( CFN & "Switching to control properties tabpage" )
kontext "ControlPropertiesTabControl"
ControlPropertiesTabControl.setPage TabGeneralControl
-
+
kontext "TabGeneralControl"
if ( nametext.exists( 5 ) ) then
printlog( CFN & "Exit: Control properties are open (true)" )
@@ -403,13 +281,13 @@ function hSetPBTabPage( iPage as integer ) as boolean
hSetPBTabPage() = false
exit function
endif
-
+
case 2
-
+
printlog( CFN & "Switching to event assignment tabpage" )
kontext "ControlPropertiesTabControl"
ControlPropertiesTabControl.setPage TabEventsControl
-
+
kontext "TabEventsControl"
if ( PBFocusGained.exists( 5 ) ) then
printlog( CFN & "Exit: Events page is open (true)" )
@@ -420,57 +298,32 @@ function hSetPBTabPage( iPage as integer ) as boolean
hSetPBTabPage() = false
exit function
endif
-
+
case else
-
+
printlog( CFN & "Invalid parameter passed to function: " & iPage )
hSerPBTabPage() = false
exit function
-
+
end select
'///</ul>
-
+
end function
'*******************************************************************************
-function hSetLabelName( sLabelName as string ) as boolean
-
- '///<h3>Name a control, with limited errorhandling</h3>
-
- '///<i>This function was introduced due to a problem with the property-
- '///browser not being open fast enough or just refusing to accept input</i><br><br>
-
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Text to be inserted in the control &quot;NameText&quot; (string)</li>
- '///</ol>
-
- '///<u>Returns</u>:
- '///<ol>
-
- '///+<li>Errorcondition</li>
- '///<ul>
- '///+<li>TRUE: The control name was successfully updated</li>
- '///+<li>FALSE: Control is not visible within current context</li>
- '///</ul>
-
- '///</ol>
-
- '///<u>Description</u>:
- '///<ul>
- '///+<li>Test that the control &quot;NameText&quot; exists</li>
- kontext "TabGeneralControl"
- if ( Label.exists() ) then
- '///+<li>Set the new name</li>
- Label.setText( sLabelName )
- TabGeneralControl.TypeKeys ("<RETURN>" , true)
- hSetLabelName() = true
+function hDeleteEntryFieldContent( oControl as object ) as boolean
+
+ printlog( "Original name is: " & oControl.getText() )
+
+ oControl.typeKeys( "<HOME>" )
+ oControl.typeKeys( "<SHIFT END>" )
+ oControl.typeKeys( "<DELETE>" )
+
+ if ( oControl.getText() = "" ) then
+ hDeleteEntryFieldContent() = true
else
- warnlog( "Unable to name the control." )
- hSetLabelName() = false
+ hDeleteEntryFieldContent() = false
endif
- '///</ul>
-
-end function
+end function
diff --git a/testautomation/framework/tools/includes/performance.inc b/testautomation/framework/tools/includes/performance.inc
deleted file mode 100644
index 01d46d7df415..000000000000
--- a/testautomation/framework/tools/includes/performance.inc
+++ /dev/null
@@ -1,69 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Tools to speed up test case performance
-'*
-'\******************************************************************************
-
-private const VERBOSE = true
-
-function hWaitForObject( oControl as object, iTime as integer ) as integer
-
- const CFN = "hWaitForObject()::"
- dim iWait as integer
-
- if ( VERBOSE ) then printlog( CFN & "Entering function for control: " & oControl.name() )
-
- WaitSlot( 2000 )
-
- for iWait = 0 to iTime
- try
- if ( oControl.isEnabled() ) then
- printlog( CFN & "Control is enabled: " & oControl.name() )
- hWaitForObject() = 0
- exit function
- else
- if ( VERBOSE ) then printlog( "Waiting..." )
- endif
- catch
- wait( 1 )
- endcatch
- next iWait
-
- printlog( CFN & "Control not found or not enabled, timeout reached" )
- hWaitForObject() = -1
-
-end function
-
-
-
-
-
-
-
diff --git a/testautomation/framework/tools/includes/private_environment.inc b/testautomation/framework/tools/includes/private_environment.inc
index 87cfab146f15..87cfab146f15 100644..100755
--- a/testautomation/framework/tools/includes/private_environment.inc
+++ b/testautomation/framework/tools/includes/private_environment.inc
diff --git a/testautomation/framework/tools/includes/scriptorganizer_tools.inc b/testautomation/framework/tools/includes/scriptorganizer_tools.inc
index e141448b5b79..0b09ed6270ac 100644..100755
--- a/testautomation/framework/tools/includes/scriptorganizer_tools.inc
+++ b/testautomation/framework/tools/includes/scriptorganizer_tools.inc
@@ -55,28 +55,12 @@ function hCreateScriptingObject( cName as string ) as boolean
const CFN = "hNewScriptingObject::"
- dim brc as boolean
- '///+<li>Verify the function parameter</li>
- if ( cName = "" ) then
- warnlog( CFN & "Empty Name for scripting object passed to function" )
- hCreateScriptingObject() = false
- exit function
- endif
-
- '///+<li>Verify that the &quot;Create...&quot; button exists</li>
- Kontext "ScriptOrganizer"
- if ( not PBCreate.exists( 2 ) ) then
- warnlog( CFN & "Create-button does not exist" )
- hCreateScriptingObject() = false
- exit function
- endif
-
'///+<li>Verify that the &quot;Create...&quot; button is enabled</li>
if ( PBCreate.isEnabled() ) then
'///+<li>Click &quot;Create...&quot; to open the naming dialog</li>
- PBCreate.click()
+ hClickButton( PBCreate )
'///+<li>Name the new script</li>
Kontext "ScriptNameDlg"
@@ -84,23 +68,22 @@ function hCreateScriptingObject( cName as string ) as boolean
EFObjectName.setText( cName )
ScriptNameDlg.OK()
- brc = true
+ hCreateScriptingObject() = true
endif
else
printlog( CFN & "Button is disabled" )
- brc = false
+ hCreateScriptingObject() = false
endif
'///+<li>Verify that we are back on the script organizer</li>
kontext "ScriptOrganizer"
if ( not ScriptOrganizer.exists( 2 ) ) then
warnlog( CFN & "Could not return to ScriptOrganizer" )
- brc = false
+ hCreateScriptingObject() = false
endif
- hCreateScriptingObject() = brc
'///</ul>
end function
@@ -129,63 +112,35 @@ function hRenameScriptingObject( cName as string ) as boolean
'///<u>Description</u>:
'///<ul>
- use "global\tools\includes\optional\t_stringtools.inc"
-
const CFN = "hRenameScriptingObject::"
- dim cMessage as string
- dim brc as boolean
-
- brc = true
-
- '///+<li>Verify the function parameter</li>
- if ( cName = "" ) then
- warnlog( CFN & "Empty Name for scripting object passed to function" )
- hRenameScriptingObject() = false
- exit function
- endif
-
- '///+<li>Verify that the &quot;Rename...&quot; button exists</li>
- Kontext "ScriptOrganizer"
- if ( not PBRename.exists( 2 ) ) then
- warnlog( CFN & "Rename button does not exist, aborting" )
- hRenameScriptingObject() = false
- exit function
- endif
-
- '///+<li>Verify that the &quot;Rename...&quot; button is enabled</li>
- if ( PBRename.isEnabled() ) then
+ hRenameScriptingObject() = true
- '///+<li>Click &quot;Rename...&quot; to open the renaming dialog</li>
- PBRename.click()
-
- '///+<li>Name the new script</li>
- Kontext "ScriptNameDlg"
- if ( ScriptNameDlg.exists( 2 ) ) then
-
- EFObjectName.setText( cName )
- ScriptNameDlg.OK()
-
- '///+<li>Test for any messagebox, try to close it with OK</li>
- kontext "active"
- if ( active.exists( 1 ) ) then
- cMessage = hRemoveLineBreaks( active.getText )
- printlog( CFN & cMessage )
- brc = false
- active.OK()
- endif
-
+ '///+<li>Click &quot;Rename...&quot; to open the renaming dialog</li>
+ hClickButton( PBRename )
+
+ '///+<li>Name the new script</li>
+ Kontext "ScriptNameDlg"
+ if ( ScriptNameDlg.exists( 2 ) ) then
+
+ EFObjectName.setText( cName )
+ hCloseDialog( ScriptNameDlg, "ok" )
+
+ '///+<li>Test for any messagebox, try to close it with OK</li>
+ kontext "active"
+ if ( active.exists( 1 ) ) then
+ printlog( CFN & active.getText() )
+ hRenameScriptingObject() = false
+ active.OK()
endif
-
+
endif
'///+<li>Verify that we are back on the script organizer</li>
kontext "ScriptOrganizer"
if ( not ScriptOrganizer.exists( 2 ) ) then
warnlog( CFN & "Could not return to ScriptOrganizer" )
- brc = false
+ hRenameScriptingObject() = false
endif
-
- hRenameScriptingObject() = brc
'///</ul>
end function
@@ -220,11 +175,7 @@ function hDeleteScript( cName as string , bSuccess as boolean ) as boolean
'///<u>Description</u>:
'///<ul>
- use "global\tools\includes\optional\t_stringtools.inc"
-
const CFN = "hDeleteScript::"
- dim iPos as integer
- dim cMessage as string
'///+<li>Test for the possible conditions:</li>
'///<ol>
@@ -232,19 +183,17 @@ function hDeleteScript( cName as string , bSuccess as boolean ) as boolean
kontext "ScriptOrganizer"
if ( PBDelete.isEnabled() and bSuccess ) then
- PBDelete.click()
+ hClickButton( PBDelete )
kontext "active"
- cMessage = active.getText()
- cMessage = hRemoveLineBreaks( cMessage )
- printlog( CFN & cMessage )
- active.yes()
+ if ( Active.exists( 1 ) ) then
+ printlog( CFN & active.getText() )
+ active.yes()
+ endif
kontext "active"
if ( active.exists( 1 ) ) then
- cMessage = active.getText()
- cMessage = hRemoveLineBreaks( cMessage )
qaerrorlog( CFN & "Message: Failed to delete object: " & cName )
- printlog( CFN & cMessage )
+ printlog( CFN & active.getText() )
active.ok()
endif
hDeleteScript() = true
@@ -257,24 +206,20 @@ function hDeleteScript( cName as string , bSuccess as boolean ) as boolean
'///+<li>Delete is enabled but should not be (failure)</li>
elseif ( PBDelete.isEnabled() and ( not bSuccess ) ) then
-
- PBDelete.click()
+
+ hClickButton( PBDelete )
kontext "active"
if ( active.exists( 1 ) ) then
- cMessage = active.getText()
- cMessage = hRemoveLineBreaks( cMessage )
printlog( CFN & "Delete-Button enabled for non deletable object" )
- printlog( CFN & cMessage )
+ printlog( CFN & active.getText() )
active.yes()
endif
kontext "active"
if ( active.exists( 2 ) ) then
- cMessage = active.getText()
- cMessage = hRemoveLineBreaks( cMessage )
printlog( CFN & "Message: Failed to delete object" )
- printlog( CFN & cMessage )
+ printlog( CFN & active.getText() )
active.ok()
endif
hDeleteScript() = false
@@ -335,85 +280,12 @@ function hOpenScriptOrganizer( iDialog as integer ) as boolean
kontext "ScriptOrganizer"
if ( ScriptOrganizer.exists( 5 ) ) then
hOpenScriptOrganizer() = true
- printlog( CFN & "Dialog is open" )
+ printlog( "Script Organizer is open" )
else
- hopenScriptOrganizer() = false
+ hOpenScriptOrganizer() = false
warnlog( CFN & "Slot failed, dialog not open" )
endif
'///</ul>
end function
-
-'*******************************************************************************
-
-function hCloseScriptOrganizer() as boolean
-
- '///<h3>Close a Script Organizer (Cancel)</h3>
- '///<i>Starting point: Any open Script Organizer</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcondition (boolean)</li>
- '///<ul>
- '///+<li>TRUE if the Script Organizer was closed</li>
- '///+<li>FALSE if the Script Organizer is still open</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
-
- const CFN = "hCloseScriptOrganizer::"
-
- hCloseScriptOrganizer() = false
-
- '///+<li>Try to close the script </li>
- kontext "ScriptOrganizer"
- if ( ScriptOrganizer.exists( 5 ) ) then
- ScriptOrganizer.cancel()
- hCloseScriptOrganizer() = true
- endif
-
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hOpenRunMacroDialog() as boolean
-
- '///<h3>Open the &quot;Run Macro&quot; dialog</h3>
- '///<i>Starting point: Any document</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcondition</li>
- '///<ul>
- '///+<li>TRUE if dialog is open</li>
- '///+<li>FALSE if the Script Selector does not exist</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
-
- '///+<li>Execute the ToolsMacrosRunMacro slot</li>
- ToolsMacrosRunMacro
-
- '///+<li>Verify that the dialog is present</li>
- kontext "ScriptSelector"
- if ( ScriptSelector.exists( 2 ) ) then
- hOpenRunMacroDialog() = true
- else
- hOpenRunMacroDialog() = false
- endif
- '///</ul>
-
-end function
diff --git a/testautomation/framework/tools/includes/signature_tools.inc b/testautomation/framework/tools/includes/signature_tools.inc
deleted file mode 100644
index de9c56389eb0..000000000000
--- a/testautomation/framework/tools/includes/signature_tools.inc
+++ /dev/null
@@ -1,90 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Tools to ease working with digital signatures
-'*
-'\******************************************************************************
-
-function hSelectXMLSecTab( cTab as string ) as boolean
-
-
- '///<h3>Switch between tabpages on the Ceritficates/XML-Security Tabpage</h3>
-
- '///<u>Input value(s):</u><br>
- '///<ol>
- '///+<li>Identifier for the requested tabpage (string). Valid options are:</li>
- '///<ul>
- '///+<li>&quot;GENERAL&quot; for the general (first page)</li>
- '///+<li>&quot;DETAILS&quot; for the details (second page)</li>
- '///+<li>&quot;PATH&quot; for the certification path (third page)</li>
- '///</ul>
- '///</ol>
-
-
- '///<u>Return Value:</u><br>
- '///<ol>
- '///+<li>Nothing</li>
- '///</ol>
-
-
- '///<u>Description:</u>
- '///<ul>
-
- dim brc as boolean
- brc = false
- const CFN = "hSelectXMLSecTab::"
-
- '///+<li>Switch page</li>
- kontext
-
- select case ( ucase( cTab ) )
- case "GENERAL" : active.setpage TabXMLSecGeneral
- if ( TabXMLSecGeneral.exists() ) then
- brc = true
- printlog( CFN & "Switched to General page" )
- endif
-
- case "DETAILS" : active.setpage TabXMLSecDetails
- if ( TabXMLSecDetails.exists() ) then
- brc = true
- printlog( CFN & "Switched to Details page" )
- endif
-
- case "PATH" : active.setpage TabXMLSecCertPath
- if ( TabXMLSecCertPath.exists() ) then
- brc = true
- printlog( CFN & "Switched to Certification Path page" )
- endif
- end select
-
- '///+<li>Set returnvalue</li>
- hSelectXMLSecTab() = brc
- '///</ul>
-
-end function
diff --git a/testautomation/framework/tools/includes/spadmin_tools.inc b/testautomation/framework/tools/includes/spadmin_tools.inc
index f444b4821a5f..b31e5dbe5a58 100644..100755
--- a/testautomation/framework/tools/includes/spadmin_tools.inc
+++ b/testautomation/framework/tools/includes/spadmin_tools.inc
@@ -109,8 +109,6 @@ function hDelPrinter( cPrinterName as string ) as integer
endif
dim iPrinterPos as integer
- dim iErr as integer
- iErr = 1
Kontext "SpAdmin"
iPrinterPos = hGetPrinterPosition( cPrinterName , true )
@@ -125,25 +123,24 @@ function hDelPrinter( cPrinterName as string ) as integer
if ( active.exists( 2 ) ) then
Active.Yes()
printlog( CFN & "Printer Queue deleted" )
- iErr = 0
+ hDelPrinter() = 0
else
warnlog( CFN & "Confirm Delete Dialog is missing" )
- iErr = 1
+ hDelPrinter() = 1
endif
catch
warnlog( CFN & "Unable to confirm printer deletion" )
- iErr = 2
+ hDelPrinter() = 2
endcatch
else
printlog( CFN & "The printer queue does not exist" )
- iErr = 3
+ hDelPrinter() = 3
endif
Kontext "SpAdmin"
- hDelPrinter() = iErr
end function
@@ -151,55 +148,17 @@ end function
function hGetSpadminPath() as string
- '///<h3>Retrieve the path to the SpAdmin script/binary</h3>
- const CFN = "hGetSpadminPath::"
- const C_REL_PATH = "program\spadmin"
-
- dim sPath as string
-
- sPath = gNetzOfficePath & C_REL_PATH
- sPath = convertpath( sPath )
-
- printlog( CFN & "Using SPAdmin from: " & sPath
-
- hGetSpadminPath() = sPath
+ hGetSpadminPath() = convertpath( gNetzOfficePath & "program\spadmin" )
end function
'*******************************************************************************
-function hShutdownOffice() as integer
+function hShutdownOffice()
- '///<h3>Shutdown the office by closing all docs and the backing window</h3>
- const CFN = "hShutdownOffice::"
-
- dim iOpenDocs as integer
- iOpenDocs = getDocumentCount()
- dim iThisDoc as integer
-
- ' close all open documents (One open document to remain)
- for iThisDoc = 1 to iOpenDocs
- call hCloseDocument()
- next iThisDoc
-
- ' see how many documents are still open - should be exactly one
- iOpenDocs = getDocumentCount()
- if ( iOpenDocs <> 0 ) then
- warnlog( CFN & "No open documents expected but found: " & iOpenDocs )
- endif
-
- ' shutdown the backing window, do not test with getDocumentCount() because
- ' this would inevitably restart the office
- ' we need some additional parameter for FileExit, this is a bug
+ hFileCloseAll()
FileExit( "SynchronMode", TRUE )
-
- ' wait long enough to ensure all office threads are removed from memory
- sleep( 5 )
-
- ' Print a somehow fuzzy message, we do not know for sure whether the office
- ' has been shutdown or not
- printlog( CFN & "The office should have been closed by now." )
- hShutdownOffice() = iOpenDocs
+ Wait( 5000 )
end function
@@ -207,27 +166,16 @@ end function
function hOpenSpadmin() as boolean
- '///<h3>Execute the SpAdmin binary/Script and verify that it is open</h3>
- ' Return TRUE if hWaitForSpadmin() completes successfully
-
- const CFN = "hOpenSpadmin::"
-
- dim cSpadminPath as string
- cSpadminPath = hGetSpadminPath()
+ dim cSpadminPath as string : cSpadminPath = hGetSpadminPath()
- dim brc as boolean
-
- ' start SPAdmin in automation mode.
try
start( cSpadminPath , "-enableautomation" )
- printlog( CFN & "SpAdmin command executed successfully" )
- brc = true
+ printlog( "Printer administration start-command was dispatched correctly" )
+ hOpenSpAdmin() = true
catch
- warnlog( CFN & "Failure: SpAdmin command did not succeed" )
- brc = false
+ warnlog( "hOpenSpAdmin(): Failed to open printer administration tool" )
+ hOpenSpAdmin() = false
endcatch
-
- hOpenSpAdmin() = brc
end function
@@ -235,23 +183,15 @@ end function
function hWaitForSpAdmin() as boolean
- '///<h3>Wait for SpAdmin to be loaded and displayed</h3>
- const CFN = "hWaitForSpAdmin::"
-
- dim bOpen as boolean
-
- ' Wait for SpAdmin to open
kontext "SpAdmin"
if ( SpAdmin.exists( 10 ) ) then
- printlog( CFN & "SpAdmin is open. Good." )
+ printlog( "Printer administration tool is open" )
+ hWaitForSpadmin() = true
sleep( 10 )
- bOpen = true
else
- warnlog( CFN & "SpAdmin is not open, the test cannot continue" )
- bOpen = false
+ warnlog( "hWaitForSpAdmin(): The dialog did not open within 10 seconds, aborting" )
+ hWaitForSpadmin() = false
endif
-
- hWaitForSpadmin() = bOpen
end function
diff --git a/testautomation/framework/tools/includes/tabpages.inc b/testautomation/framework/tools/includes/tabpages.inc
deleted file mode 100644
index f22b8bd5a206..000000000000
--- a/testautomation/framework/tools/includes/tabpages.inc
+++ /dev/null
@@ -1,95 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Tools to access special tabpages
-'*
-'\******************************************************************************
-
-function hDocumentInfoSelectTab( cTabPage as string ) as boolean
-
-
- '///<h3>Switch between the tabpages in the document info dialog</h3>
- '///<i>The declaration of the document info dialog is not complete which
- '///+ enforces special treatment</i><br><br>
-
- '///<u>Parameter(s):</u><br>
- '///<ol>
-
- '///+<li>The name of the tabpage to be activated (String)</li>
- '///<ul>
- '///+<li>&quot;General&quot;</li>
- '///+<li>&quot;Description&quot;</li>
- '///+<li>&quot;User&quot;</li>
- '///+<li>&quot;Internet&quot;</li>
- '///+<li>&quot;Statistics&quot;</li>
- '///+<li>The string is case insensitive</li>
-
- '///</ul>
-
- '///</ol>
-
-
- '///<u>Returns:</u><br>
- '///<ol>
- '///+<li>Errorcondition (Boolean)</li>
- '///<ul>
- '///+<li>TRUE if tabpage is known and switching worked</li>
- '///+<li>FALSE on icorrect input parameter</li>
- '///+<li>FALSE on any other error</li>
- '///</ul>
- '///</ol>
-
- const CFN = "hDocumentInfoSelectTab::"
- printlog( CFN & "Enter with option (tabpage): " & cTabPage )
- dim brc as boolean 'a multi purpose boolean returnvalue
- brc = true
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Kontext to the dialog</li>
- Kontext
-
- '///+<li>Select the page to switch to, context to the new page</li>
- select case ( ucase( cTabPage ) )
- case "GENERAL" : active.setPage TabDokument : kontext "TabDokument"
- case "DESCRIPTION" : active.setPage TabBeschreibung : kontext "TabBeschreibung"
- case "USER" : warnlog( "#i95523# - Cannot access controls on Custom page" )
- brc = false
- 'active.setPage TabBenutzer : kontext "TabBenutzer"
- case "INTERNET" : active.setPage TabInternet : kontext "TabInternet"
- case "STATISTICS" : active.setPage TabStatistik : kontext "TabStatistik"
- case default : brc = false
- end select
-
- '///</ul>
-
- printlog( CFN & "Exit with result: " & brc )
- hDocumentInfoSelectTab() = brc
-
-end function
diff --git a/testautomation/framework/tools/includes/template_tools.inc b/testautomation/framework/tools/includes/template_tools.inc
index 6363bae7aaf9..5a1370b77262 100644..100755
--- a/testautomation/framework/tools/includes/template_tools.inc
+++ b/testautomation/framework/tools/includes/template_tools.inc
@@ -127,86 +127,6 @@ end function
'*******************************************************************************
-function hGetRefFilePath( cCategory as string, location as string) as string
-
- '///<h3>Retrieve the location of the reference files for filename comparision</h3>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Category (string)</li>
- '///<ul>
- '///+<li>&quot;NEWDOCUMENTS&quot; for New Documents</li>
- '///+<li>&quot;TEMPLATES&quot; for Templates</li>
- '///+<li>&quot;SAMPLES&quot; for Samples</li>
- '///</ul>
- '///+<li>Location (string)</li>
- '///<ul>
- '///+<li>&quot;TESTTOOL&quot; to use files below gTesttoolPath</li>
- '///+<li>&quot;LOCAL&quot; to use files below gOfficePath/user/work</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Fully qualified path to workfile (string)</li>
- '///</ol>
-
- '///<u>Description</u>:
- '///<ul>
-
- dim cFile as string
-
- cCategory = ucase( cCategory )
-
- '///+<li>Retrieve the location</li>
- '///<ul>
- '///+<li>For TESTTOOL</li>
- '///<ul>
- if ( ucase( location ) = "TESTTOOL" ) then
-
- '///+<li>Prepend path within testtool-environment</li>
- cFile = "framework\update\input\templdoc\" & gProductName
-
- '///+<li>Build a name containing langcode and .txt suffix</li>
- if ( cCategory = "NEWDOCUMENTS" ) then
- cFile = cFile & "\new_" & iSprache & ".txt"
- elseif ( cCategory = "TEMPLATES" ) then
- cFile = cFile & "\tem_" & iSprache & ".txt"
- elseif ( cCategory = "SAMPLES" ) then
- cFile = cFile & "\sam_" & iSprache & ".txt"
- else
- warnlog( "Invalid category passed to hGetRefFilePath" )
- endif
-
- '///+<li>Set returnvalue</li>
- hGetRefFilePath() = convertpath( gTesttoolPath & cFile )
-
- '///</ul>
- '///+<li>For LOCAL</li>
- '///<ul>
- elseif ( ucase( location ) = "LOCAL" ) then
-
- '///+<li>Build a name containing langcode and .txt suffix</li>
- if ( cCategory = "NEWDOCUMENTS" ) then
- cFile = "new_" & iSprache & ".txt"
- elseif ( cCategory = "TEMPLATES" ) then
- cFile = "tem_" & iSprache & ".txt"
- elseif ( cCategory = "SAMPLES" ) then
- cFile = "sam_" & iSprache & ".txt"
- else
- warnlog( "Invalid category passed to hGetRefFilePath" )
- endif
-
- '///+<li>Set returnvalue</li>
- hGetRefFilePath() = convertpath( hGetWorkPath() & cFile )
-
- end if
- '///</ul>
- '///</ul>
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hSelectCategory( cCategory as string ) as boolean
'///<h3>Select a category from the left pane of the templates dialog</h3>
diff --git a/testautomation/framework/tools/includes/toolbar_tools.inc b/testautomation/framework/tools/includes/toolbar_tools.inc
index e0952bfd9a2e..8d0b198b0441 100644..100755
--- a/testautomation/framework/tools/includes/toolbar_tools.inc
+++ b/testautomation/framework/tools/includes/toolbar_tools.inc
@@ -73,7 +73,8 @@ function hAccessStandardBar() as boolean
endif
'///+<li>Close the navigator</li>
- hCloseNavigator()
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
'///+<li>Close the document</li>
hDestroyDocument()
@@ -103,6 +104,13 @@ function hResetStandardBar() as boolean
'///<ul>
const CFN = "hResetStandardBar::"
+ const MIN_STATIC_DELAY = 1
+ const DEFAULT_DELAY = 2
+ const MENUITEM_RESTORE = 1
+ const MENUITEM_CLOSEMENU = 0
+ const TOOLBAR_MENUITEM_CUSTOMIZE = 2
+ const EXPECTED_RESOURCE_ID = 304
+
printlog( CFN & "Enter" )
@@ -115,36 +123,36 @@ function hResetStandardBar() as boolean
'///+<li>Open the context menu on Standardbar</li>
Standardbar.OpenContextmenu
- sleep( 1 )
+ sleep( MIN_STATIC_DELAY )
'///+<li>Click on 2. entry (Cutomize Toolbar)</li>
- hMenuselectNr (2)
- sleep( 1 )
+ hMenuselectNr ( TOOLBAR_MENUITEM_CUSTOMIZE )
+ sleep( MIN_STATIC_DELAY )
kontext
Active.SetPage TabCustomizeToolbars
- sleep( 1 )
+ sleep( MIN_STATIC_DELAY )
'///+<li>Toggle to 'Toolbars' tab page.</li>
kontext "TabCustomizeToolbars"
- if TabCustomizeToolbars.Exists( 2 ) then
- sleep( 1 )
+ if TabCustomizeToolbars.Exists( DEFAULT_DELAY ) then
+ sleep( MIN_STATIC_DELAY )
'///+<li>Press in first section '... Toolbars' the 'toolbar'-button</li>
MenuBtn.Click
- sleep( 1 )
+ sleep( MIN_STATIC_DELAY )
'///+<li>A drop down menu will be opened.</li>
'///+<li>Select the first enabled menu entry which should be 'Restore...'</li>
- hMenuSelectNr(1)
- sleep( 1 )
+ hMenuSelectNr( MENUITEM_RESTORE )
+ sleep( MIN_STATIC_DELAY )
kontext
- if ( active.exists( 2 ) ) then
- if Active.GetRT = 304 then
+ if ( active.exists( DEFAULT_DELAY ) ) then
+ if ( Active.GetRT = EXPECTED_RESOURCE_ID ) then
'///+<li>Press Yes button on verification dialog.</li>
- Active.Yes
+ Active.Yes()
end if
else
warnlog( "No verification comes up if the RESET button has been pressed!" )
@@ -152,11 +160,11 @@ function hResetStandardBar() as boolean
'///+<li>Close 'Toolbars' tab page and the dialog with OK.</li>
kontext "tabcustomizetoolbars"
- TabCustomizeToolbars.OK
+ hCloseDialog( TabCustomizeToolbars, "ok" )
else
warnlog( "Cutomuze Toolbar not open (from context menu)" )
'Closing the Context menu if the dialog does not come up.
- Menuselect(0)
+ Menuselect( MENUITEM_CLOSEMENU )
endif
else
@@ -192,8 +200,7 @@ function hStandardbarItemGetCount() as integer
'///<ul>
dim iToolbarItemsCurrent as integer
- dim iToolbarItemsExpected as integer
- iToolbarItemsExpected = 30
+ const EXPECTED_TOOLBAR_ITEMCOUNT = 30
const CFN = "hStandardbarItemGetCount::"
@@ -220,10 +227,10 @@ function hStandardbarItemGetCount() as integer
' items on the standardbar, OOo and its spinoffs have 30.
- if ( iToolbarItemsCurrent = iToolbarItemsExpected ) then
+ if ( iToolbarItemsCurrent = EXPECTED_TOOLBAR_ITEMCOUNT ) then
printlog( CFN & "Correct number of items on the StandardBar. Good" )
else
- warnlog( CFN & "Expected: " & iToolbarItemsExpected & _
+ warnlog( CFN & "Expected: " & EXPECTED_TOOLBAR_ITEMCOUNT & _
" entries, found: " & iToolbarItemsCurrent )
endif
@@ -252,7 +259,8 @@ function hToggleToolbarItem( iMenuPos as integer )
'///<u>Description</u>:
'///<ul>
- const CFN = "hToggleToolbarItem::"
+ const CFN = "hToggleToolbarItem::"
+ const INVISIBLE_ITEMS_MODIFIER = 3
dim iItemsInMenu as integer
printlog( CFN & "Enter with option (Menu position): " & iMenuPos )
@@ -268,7 +276,7 @@ function hToggleToolbarItem( iMenuPos as integer )
' (those that are invisible will be listed as context menu entries),
' the menuitem (invisible items) is placed at position nItems - 3
'///+<li>Take the number of items -3, select the entry</li>
- hMenuselectNr( iItemsInMenu - 3 )
+ hMenuselectNr( iItemsInMenu - INVISIBLE_ITEMS_MODIFIER )
'///+<li>Select the provided menu position</li>
hMenuselectNr( iMenuPos )
@@ -300,8 +308,7 @@ function hStandardbarLoadUrl() as boolean
' written to and disabled again (no use of reset toolbar here, this is
' done in another testcase
- dim iItemMenuPos as integer
- iItemMenuPos = 1
+ dim iItemMenuPos as integer : iItemMenuPos = 1
const ITEM_MENU_POSITION = 1
const CFN = "hStandardbarLoadUrl::"
@@ -367,6 +374,10 @@ function hStandardbarNewDialog()
const CFN = "hStandardbarNewDialog::"
const ITEM_MENU_POSITION = 3
+ const TEMPLATE_DIALOG_MAX_RETRIES = 3
+ const RC_TIMEOUT = -1
+
+ dim iTry as integer
printlog( CFN & "Enter" )
@@ -383,35 +394,36 @@ function hStandardbarNewDialog()
hToggleToolbarItem( ITEM_MENU_POSITION )
'///+<li>click the button</li>
- Kontext "Standardbar"
- sleep( 1 )
- try
- NeuDialog.click()
- catch
- endcatch
-
- '///+<li>handle possible dialogs (there should never be one)</li>
- kontext "Active"
- if ( active.exists( 1 ) ) then
- warnlog( CFN & "Unexpected active" )
- printlog( CFN & active.gettext() )
- try
- printlog( CFN & "Closing dialog" )
- active.ok()
- catch
- warnlog( CFN & "Unknown dialog blocks test, now crashing" )
- endcatch
- endif
+ for iTry = 1 to TEMPLATE_DIALOG_MAX_RETRIES
+
+ Kontext "Standardbar"
+ hClickButton( NeuDialog )
+
+ '///+<li>handle possible dialogs (there should never be one)</li>
+ kontext "Active"
+ if ( active.exists() ) then
+ warnlog( CFN & "Unexpected active" )
+ printlog( CFN & active.gettext() )
+ if ( hCloseDialog( Active, "ok" ) = RC_TIMEOUT ) then
+ warnlog( CFN & "Unknown dialog blocks test, now crashing" )
+ endif
+ endif
+
+ '///+<li>close the templates and samples dialog</li>
+ printlog( CFN & "Close templates and samples (cancel)" )
+ Kontext "TemplateAndDocuments"
+ if ( TemplateAndDocuments.Exists( 5 ) ) then
+ hCloseDialog( TemplateAndDocuments, "cancel" )
+ exit for
+ else
+ if ( iTry = TEMPLATE_DIALOG_MAX_RETRIES ) then
+ warnlog( CFN & "The 'Template and Documents'-dialog was not activated" )
+ endif
+ endif
+
+ next iTry
+
- '///+<li>close the templates and samples dialog</li>
- printlog( CFN & "Close templates and samples (cancel)" )
- Kontext "TemplateAndDocuments"
- if ( TemplateAndDocuments.Exists( 5 ) ) then
- TemplateAndDocuments.cancel()
- else
- warnlog( CFN & "The 'Template and Documents'-dialog was not activated" )
- endif
-
'///+<li>finally remove the button from the toolbar</li>
printlog( CFN & "Deactivate New from Template button" )
hToggleToolbarItem( ITEM_MENU_POSITION )
@@ -455,7 +467,7 @@ function hStandardbarSaveAs()
kontext "SpeichernDlg"
if ( SpeichernDlg.exists( 1 ) ) then
warnlog( "#i46363# (?)The 'SaveAs'-button should be invisible." )
- SpeichernDlg.cancel()
+ hCloseDialog( SpeichernDlg, "cancel" )
else
'///+<li>Add the control to the standardbar</li>
@@ -471,7 +483,7 @@ function hStandardbarSaveAs()
printlog( CFN & "Close Save As (cancel)" )
Kontext "SpeichernDlg"
if ( SpeichernDlg.Exists( 2 ) ) then
- SpeichernDlg.cancel()
+ hCloseDialog( SpeichernDlg, "cancel" )
else
qaerrorlog( "Retrying" )
Kontext "Standardbar"
@@ -479,7 +491,7 @@ function hStandardbarSaveAs()
Kontext "SpeichernDlg"
if ( SpeichernDlg.exists( 1 ) ) then
printlog( "FileSaveAs dialog is open" )
- SpeichernDlg.cancel()
+ hCloseDialog( SpeichernDlg, "cancel" )
else
warnlog( CFN & "The 'Save As'-dialog was not activated" )
endif
diff --git a/testautomation/framework/tools/includes/webtools.inc b/testautomation/framework/tools/includes/webtools.inc
index a56639a269e3..a56639a269e3 100644..100755
--- a/testautomation/framework/tools/includes/webtools.inc
+++ b/testautomation/framework/tools/includes/webtools.inc
diff --git a/testautomation/framework/tools/includes/window_tools.inc b/testautomation/framework/tools/includes/window_tools.inc
index bb8579edfba7..bb8579edfba7 100644..100755
--- a/testautomation/framework/tools/includes/window_tools.inc
+++ b/testautomation/framework/tools/includes/window_tools.inc
diff --git a/testautomation/framework/tools/includes/wizards.inc b/testautomation/framework/tools/includes/wizards.inc
index f8890f0e5a4f..a140401c1202 100644..100755
--- a/testautomation/framework/tools/includes/wizards.inc
+++ b/testautomation/framework/tools/includes/wizards.inc
@@ -182,8 +182,7 @@ function hFinishWizard( iMode as integer ) as boolean
dim cAccel as string
dim iWait as integer
- dim brc as boolean
- brc = false
+ dim brc as boolean : brc = false
'///+<li>Try to close the wizard</li>
@@ -538,25 +537,20 @@ function hHandleSaveError() as integer
'///<li>Close the dialog either with YES or OK</li>
'///</ul>
- dim iErr as integer
-
kontext "active"
if ( active.exists( 2 ) ) then
printlog( CFN & "Unexpected MsgBox: " & active.getText() )
try
active.ok()
- iErr = 2
+ hHandleSaveError() = 2
catch
active.yes()
- iErr = 1
+ hHandleSaveError() = 1
endcatch
else
- iErr = 0
+ hHandleSaveError() = 0
endif
- hHandleSaveError() = iErr
-
-
end function
'*******************************************************************************
@@ -583,35 +577,19 @@ function hClickNextButton() as boolean
const CFN = "hClickNextButton::"
- dim irc as integer
- dim brc as boolean
- brc = false
- dim iBreak as integer
- iBreak = 0
+ hClickNextButton() = true
'///+<li>Click the &quot;Next&quot;-button</li>
- irc = hWaitForObject( NextButton, 5000 )
- if ( irc >= 0 ) then
- printlog( CFN & "Next..." )
- NextButton.click()
- brc = true
+ if ( hClickButton( NextButton ) = -1 ) then
+ hClickNextButton() = false
else
- qaerrorlog( CFN & "Button not available within specified time -> bad" )
- endif
-
- '///+<li>Handle the &quot;Document Creation&quot;-dialog (Mailmerge Wizard)</li>
- kontext "active"
- do while ( active.exists( 1 ) )
- iBreak = iBreak + 1
- printlog( CFN & "Waiting for document creation to complete..." )
- if ( iBreak = 10 ) then
- warnlog( "DocumentCreation (MailMergeWizard) not complete within 10 seconds" )
- brc = false
- exit do
+ '///+<li>Handle the &quot;Document Creation&quot;-dialog (Mailmerge Wizard)</li>
+ kontext "active"
+ if ( active.exists( 1 ) ) then
+ ' The dialog must disappear within 10 seconds
+ if ( not active.notExists( 10 ) ) then hClickNextButton() = false
endif
- loop
-
- hClickNextButton() = brc
+ endif
'///</ul>
end function
diff --git a/testautomation/global/input/accelerators.txt b/testautomation/global/input/accelerators.txt
index cb518c9e3335..c46dc31f9dae 100755
--- a/testautomation/global/input/accelerators.txt
+++ b/testautomation/global/input/accelerators.txt
@@ -1,7 +1,7 @@
# This file contains a list of most commonly used accelerators.
# These accelerators are language dependent
-# Include framework/tools/inc/accels.inc and use hGetAccel( string )
-# to retrieve one specific accelerator, where string is one of the sections
+# Include global/tools/includes/optional/t_accels.inc and use hGetAccel( <string> )
+# to retrieve one specific accelerator, where <string> is one of the sections
# from this file.
# mod1 = CTRL
@@ -159,48 +159,3 @@ zh-CN=mod2 u
zh-TW=mod2 u
sl=mod2 i
cs=mod2 a
-
-
-# This is the accelerator that switches tabs in the BASIC IDE. I found it by accident
-# and i'm not at all certain that it is documented somewhere.
-[IDE_SWITCH_TAB+]
-en-US=MOD1 PAGEUP
-pt-PT=MOD1 PAGEUP
-ru-RU=MOD1 PAGEUP
-nl-NL=MOD1 PAGEUP
-fr-FR=MOD1 PAGEUP
-es=MOD1 PAGEUP
-hu-HU=MOD1 PAGEUP
-it=MOD1 PAGEUP
-da-DK=MOD1 PAGEUP
-sv=MOD1 PAGEUP
-pl-PL=MOD1 PAGEUP
-de=MOD1 PAGEUP
-pt-BR=MOD1 PAGEUP
-ja-JP=MOD1 PAGEUP
-ko-KR=MOD1 PAGEUP
-zh-CN=MOD1 PAGEUP
-zh-TW=MOD1 PAGEUP
-sl=MOD1 PAGEUP
-
-# This is the accelerator that switches tabs in the BASIC IDE. I found it by accident
-# and i'm not at all certain that it is documented somewhere.
-[IDE_SWITCH_TAB-]
-en-US=MOD1 PAGEDOWN
-pt-PT=MOD1 PAGEDOWN
-ru-RU=MOD1 PAGEDOWN
-nl-NL=MOD1 PAGEDOWN
-fr-FR=MOD1 PAGEDOWN
-es=MOD1 PAGEDOWN
-hu-HU=MOD1 PAGEDOWN
-it=MOD1 PAGEDOWN
-da-DK=MOD1 PAGEDOWN
-sv=MOD1 PAGEDOWN
-pl-PL=MOD1 PAGEDOWN
-de=MOD1 PAGEDOWN
-pt-BR=MOD1 PAGEDOWN
-ja-JP=MOD1 PAGEDOWN
-ko-KR=MOD1 PAGEDOWN
-zh-CN=MOD1 PAGEDOWN
-zh-TW=MOD1 PAGEDOWN
-sl=MOD1 PAGEDOWN
diff --git a/testautomation/global/input/macros.txt b/testautomation/global/input/macros.txt
index ffe95be431e3..278765674855 100755
--- a/testautomation/global/input/macros.txt
+++ b/testautomation/global/input/macros.txt
@@ -1,5 +1,5 @@
# This is a collection of BASIC macros that can cause Syntax errors, Exceptions,
-# Runtime Errors.
+# Runtime Errors. They are loaded in the test framework/optional/f_basic_issues.bas
# ---------------------------------------------------------------------------- #
@@ -163,7 +163,7 @@ End Sub
# ---------------------------------------------------------------------------- #
[i86265]
-' There should be no "Paramtheses do not match" warning
+' There should be no "Parantheses do not match" warning
OPTION EXPLICIT
Public Const cMAX = 256
diff --git a/testautomation/global/input/officeinfo.txt b/testautomation/global/input/officeinfo.txt
index 92b4e492740d..6896fc5b16f0 100755
--- a/testautomation/global/input/officeinfo.txt
+++ b/testautomation/global/input/officeinfo.txt
@@ -1,7 +1,5 @@
[Current program versions]
-StarOffice=9
-StarSuite=9
-OpenOffice.org=3.1
-BrOffice.org=3.1
+OpenOffice.org=3.3
+BrOffice.org=3.3
Oracle Open Office=3.2
diff --git a/testautomation/global/required/includes/g_001.inc b/testautomation/global/required/includes/g_001.inc
index 3d22b6b8a1df..07c294f44e2f 100644
--- a/testautomation/global/required/includes/g_001.inc
+++ b/testautomation/global/required/includes/g_001.inc
@@ -50,73 +50,73 @@ testcase tFileExportAsPDF
' The file dialog has to come up
Kontext "SpeichernDlg"
if SpeichernDlg.exists(5) then
- '/// the selected file type should be: 'PDF - Portable Document Format (.pdf)' ///'
- sTemp = Dateityp.GetSelText
- if (sTemp <> sPDF) then
- Warnlog "filter for PDF export is missing :-( should: '" + sPDF + "'; is: '" + sTemp + "'"
- endif
- '///+ - set Textbox 'File name' to "abc" ///'
- Dateiname.SetText "abc"
- speichern.click
- kontext
- if active.exists(5) then
- ' catch active about already existing file name
- if active.getrt = 304 then
- active.yes
- endif
- endif
+ '/// the selected file type should be: 'PDF - Portable Document Format (.pdf)' ///'
+ sTemp = Dateityp.GetSelText
+ if (sTemp <> sPDF) then
+ Warnlog "filter for PDF export is missing :-( should: '" + sPDF + "'; is: '" + sTemp + "'"
+ endif
+ '///+ - set Textbox 'File name' to "abc" ///'
+ Dateiname.SetText "abc"
+ speichern.click
+ kontext
+ if active.exists(5) then
+ ' catch active about already existing file name
+ if active.getrt = 304 then
+ active.yes
+ endif
+ endif
else
- ' changed with SRC680m210 - first options, then file dialog...
- ' kept for testcase backwards compatibility
- 'warnlog "Export dialog didn't come up."
+ ' changed with SRC680m210 - first options, then file dialog...
+ ' kept for testcase backwards compatibility
+ 'warnlog "Export dialog didn't come up."
endif
kontext
'/// dialog 'PDF Options' comes up ///'
if active.exists(5) then
- '/// select the tab page 'General' ///'
- active.setPage PDFOptions
- kontext "PDFOptions"
- if PDFOptions.exists(5) then
- dialogTest(PDFOptions)
- else
- warnlog "Tab page 'PDF Options - General' isn't available."
- endif
+ '/// select the tab page 'General' ///'
+ active.setPage PDFOptions
+ kontext "PDFOptions"
+ if PDFOptions.exists(5) then
+ dialogTest(PDFOptions)
+ else
+ warnlog "Tab page 'PDF Options - General' isn't available."
+ endif
else
- warnlog "Dialog 'PDF Options' didn't come up"
+ warnlog "Dialog 'PDF Options' didn't come up"
endif
kontext
if active.exists(5) then
- '/// select the tab page 'Initial View' ///'
- active.setPage PDFOptionsInitialView
- kontext "PDFOptionsInitialView"
- if PDFOptionsInitialView.exists(5) then
- dialogTest(PDFOptionsInitialView)
- else
- warnlog "Tab page 'PDF Options - Initial View' isn't available."
- endif
+ '/// select the tab page 'Initial View' ///'
+ active.setPage PDFOptionsInitialView
+ kontext "PDFOptionsInitialView"
+ if PDFOptionsInitialView.exists(5) then
+ dialogTest(PDFOptionsInitialView)
+ else
+ warnlog "Tab page 'PDF Options - Initial View' isn't available."
+ endif
endif
kontext
if active.exists(5) then
- '/// select the tab page 'User Interface' ///'
- active.setPage PDFOptionsUserInterface
- kontext "PDFOptionsUserInterface"
- if PDFOptionsUserInterface.exists(5) then
- dialogTest(PDFOptionsUserInterface)
- else
- warnlog "Tab page 'PDF Options - User Interface' isn't available."
- endif
+ '/// select the tab page 'User Interface' ///'
+ active.setPage PDFOptionsUserInterface
+ kontext "PDFOptionsUserInterface"
+ if PDFOptionsUserInterface.exists(5) then
+ dialogTest(PDFOptionsUserInterface)
+ else
+ warnlog "Tab page 'PDF Options - User Interface' isn't available."
+ endif
endif
kontext
if active.exists(5) then
- '/// select the tab page 'General' ///'
- active.setPage PDFOptions
- kontext "PDFOptions"
- '/// close the dialog with 'Cancel' ///'
- if PDFOptions.exists(5) then
- PDFOptions.cancel
- else
- warnlog "Tab page 'PDF Options - General' isn't available."
- endif
+ '/// select the tab page 'General' ///'
+ active.setPage PDFOptions
+ kontext "PDFOptions"
+ '/// close the dialog with 'Cancel' ///'
+ if PDFOptions.exists(5) then
+ PDFOptions.cancel
+ else
+ warnlog "Tab page 'PDF Options - General' isn't available."
+ endif
endif
'/// close application ///'
Call hCloseDocument
@@ -125,24 +125,24 @@ endcase
'-------------------------------------------------------------------------------
'
testcase tExportAsPDFButton
- Dim sTemp as string
+ Dim sTemp as string
'/// Create new document
Call hNewDocument
- '/// Click the button 'Export Directly as PDF' on the standard toolbar.
- Kontext "Standardbar"
- ExportAsPDF.click
- '/// The 'Export as PDF' dialog has to come up, with the only 'File type' 'PDF - Portable Document Format'
- Kontext "SpeichernDlg"
- if SpeichernDlg.exists(1) then
- sTemp = Dateityp.GetSelText
- if InStr(sTemp, "PDF") = 0 then
- warnlog "Filter for PDF export seems to be wrong or is missing in selection."
- endif
- '/// Leave dialog with CANCEL button
- SpeichernDlg.Cancel
- else
- warnlog "SaveAsPDF dialog did not come up."
+ '/// Click the button 'Export Directly as PDF' on the standard toolbar.
+ Kontext "Standardbar"
+ ExportAsPDF.click
+ '/// The 'Export as PDF' dialog has to come up, with the only 'File type' 'PDF - Portable Document Format'
+ Kontext "SpeichernDlg"
+ if SpeichernDlg.exists(1) then
+ sTemp = Dateityp.GetSelText
+ if InStr(sTemp, "PDF") = 0 then
+ warnlog "Filter for PDF export seems to be wrong or is missing in selection."
endif
+ '/// Leave dialog with CANCEL button
+ SpeichernDlg.Cancel
+ else
+ warnlog "SaveAsPDF dialog did not come up."
+ endif
'/// Close spreadsheet document.
Call hCloseDocument
endcase
diff --git a/testautomation/global/required/includes/g_009.inc b/testautomation/global/required/includes/g_009.inc
index 1e6372bbdb7f..17b31cf3fd08 100644
--- a/testautomation/global/required/includes/g_009.inc
+++ b/testautomation/global/required/includes/g_009.inc
@@ -43,10 +43,10 @@ testcase tHelpCheckForUpdates
dim bOnceAgain as boolean
dim sProxyFile as string
dim iOldProxy as integer
-
+
bProxy = FALSE
bOnceAgain = TRUE
-
+
'/// open application ///'
Call hNewDocument
@@ -56,7 +56,7 @@ testcase tHelpCheckForUpdates
sIniFile = convertPath(gNetzOfficePath+"program\version.ini")
endif
sTemp = GetIniValue (sIniFile, "Version", "UpdateURL")
- if (sTemp <> "" AND NOT gOOO) then
+ if (sTemp <> "" AND NOT gOOO) then
'/// choose Help -> Check for Updates... ///'
while (bOnceAgain)
if bProxy AND bOnceAgain then
@@ -70,14 +70,14 @@ testcase tHelpCheckForUpdates
printlog "This could be a (patched) installation on Solaris Sparc/Intel or OOo - No Online Update Feature available."
hCloseDocument
else
- warnlog "Help->Check for Updates failed"
- hCloseDocument
+ warnlog "Help->Check for Updates failed"
+ hCloseDocument
endif
goto endsub
endcatch
' The dialog has to come up: 'Check for Updates'
Kontext "CheckForUpdates"
-' if CheckForUpdates.exists(10) then ' id not in build for dialog workaround: ' not working due to i 80859
+ ' if CheckForUpdates.exists(10) then ' id not in build for dialog workaround: ' not working due to i 80859
if Status.exists(10) then
if sTemp <> "" then
printlog "'Check for Updates' came up"
@@ -103,25 +103,25 @@ testcase tHelpCheckForUpdates
bOnceAgain = FALSE
Kontext "CheckForUpdates"
try
- CheckForUpdates.cancel
+ CheckForUpdates.cancel
catch
- 'cancel button is no more availabale
- printlog "cancel wasnt possible"
- try
- 'CheckForUpdates.close
- ' close method doesn't work
- printlog "1:"+status.gettext
- printlog "2:"+description.gettext
- closebtn.click
- catch
- printlog "close wasnt possible"
- ' last fallback
- 'printlog resetapplication
- 'hNewDocument
- printlog "1:"+status.gettext
- printlog "2:"+description.gettext
- cancel.click
- endcatch
+ 'cancel button is no more availabale
+ printlog "cancel wasnt possible"
+ try
+ 'CheckForUpdates.close
+ ' close method doesn't work
+ printlog "1:"+status.gettext
+ printlog "2:"+description.gettext
+ closebtn.click
+ catch
+ printlog "close wasnt possible"
+ ' last fallback
+ 'printlog resetapplication
+ 'hNewDocument
+ printlog "1:"+status.gettext
+ printlog "2:"+description.gettext
+ cancel.click
+ endcatch
endcatch
endif
else
@@ -167,7 +167,7 @@ testcase tHelpCheckForUpdates
bOnceAgain = FALSE
endif
endif
- bOnceAgain = FALSE
+ bOnceAgain = FALSE
wend
else
qaErrorlog "Test disabled, because it is OOo build and UpdateURL is empty and calling the slot would succeed"
diff --git a/testautomation/global/system/includes/gvariabl.inc b/testautomation/global/system/includes/gvariabl.inc
index 562cde3a216e..eff969fbee2c 100755
--- a/testautomation/global/system/includes/gvariabl.inc
+++ b/testautomation/global/system/includes/gvariabl.inc
@@ -174,6 +174,9 @@ Global gOOoImprovementIsEnabled as boolean
'///* Performance flags
Global GLOBAL_USE_NEW_SLEEP as boolean ' keep the old sleep() behavior
+'///* If set to TRUE in master.inc many functions become more talkative
+Global GVERBOSE as boolean
+
sub OnlyForDocuGVariables
'///<b>System for the installed Office</b>
'///<i>gPlatform</i>: Operatingsystem (internal shortkey)
diff --git a/testautomation/global/system/includes/iniinfo.inc b/testautomation/global/system/includes/iniinfo.inc
index 8a2807269152..7be9633bb395 100755
--- a/testautomation/global/system/includes/iniinfo.inc
+++ b/testautomation/global/system/includes/iniinfo.inc
@@ -47,7 +47,7 @@ sub GetIniInformation
dim bOOo(3) as string
dim iSoffice(3) as integer
dim sTemp as string
-
+
gPathSigne = hGetPathSigne(gPLatform)
gTTProfileName = hfGetTTProfileName()
@@ -61,10 +61,10 @@ sub GetIniInformation
gOfficePath = GetIniValue ( gTesttoolIni, "Office IniPath", "Current" ) + gPathSigne
gRemotePath = GetIniValue ( gTesttoolIni, "RemoteBaseDir", "Current" ) + gPathSigne
else
- '/// The part of getting the location of the executable OOo is put into seperated functions.
- '/// The first OOo executeable is being used.
- '///+ <ol><li>Entry in TestTool control file (.testtoolrc on UNIX; testtool.ini on Win32)</li>
- '///+ <li>or<ul><li><b>Win32</b>: Entry in registry</li><li><b>UNIX</b>: If link <pre>/usr/bin/soffice</pre> or <pre>$HOME/soffice</pre> exists</li></ul></li></ol>
+ '/// The part of getting the location of the executable OOo is put into seperated functions.
+ '/// The first OOo executeable is being used.
+ '///+ <ol><li>Entry in TestTool control file (.testtoolrc on UNIX; testtool.ini on Win32)</li>
+ '///+ <li>or<ul><li><b>Win32</b>: Entry in registry</li><li><b>UNIX</b>: If link <pre>/usr/bin/soffice</pre> or <pre>$HOME/soffice</pre> exists</li></ul></li></ol>
sSoffice(0) = getSofficeTesttool() : bOOO(0) = gOOO
' DEBUG: If you need more detailed information about the installation environment
' enable the next line.
@@ -73,47 +73,47 @@ sub GetIniInformation
sSoffice(0) = getSofficeNative() : bOOO(0) = gOOO
if (sSoffice(0) <> "") then
gOfficePath = sSoffice(0)
- gVersionsnummer = FindBuildID()
+ gVersionsnummer = FindBuildID()
call hSetBuildVersionInformation(TRUE)
iSoffice(0) = gBuild
end if
' DEBUG: If you need more detailed information about the installation environment
- ' enable the next line.
+ ' enable the next line.
' printlog "RESULT from Native : '" + sSoffice(0) + "' - OOo? " + bOOO(0) + " - BuildID: " + iSoffice(0)
if sSoffice(0) = "" then
warnlog "No OOo version found on this computer. - Please look into documentation, how to select an OOo version to test."
end if
else
- printlog "----------------------------------------------------------------------------------------------------"
- printlog "** Using [OOoProgramDir] value : " & sSoffice(0)
+ printlog "----------------------------------------------------------------------------------------------------"
+ printlog "** Using [OOoProgramDir] value : " & sSoffice(0)
printlog "----------------------------------------------------------------------------------------------------"
end if
gOfficePath = sSoffice(0)
gOOO = bOOO(0)
end if
- if ((gSamePC = TRUE) AND (gOfficePath = "")) then
+ if ((gSamePC = TRUE) AND (gOfficePath = "")) then
MsgBox ("The test ends, because no OOo version was found on this computer. - Please look into documentation, how to select an OOo version to test.", 1, "No OOo program installed")
end
- end if
+ end if
- gtHidLstPath = GetIniValue ( gTesttoolIni, gTTProfileName, "HIDDir" ) + hGetPathSigne(gtPlatform)
- gPort = GetIniValue ( gTesttoolIni, "Communication", "TTPort" )
- '--------
- gPCName = GetIniValue ( gTesttoolIni, "Others", "PCname" )
- if (gPCName = "NOT_SET!" OR gPCName = "") then
- gPCName = environ ( "HOSTNAME" )
- if (gPCName = "") then
- gPCName = environ ( "COMPUTERNAME" )
- if (gPCName = "") then
- gPCName = environ ( "hostname" )
- ' If testtool.ini/rc is unmodified, the default value is NOT_SET!
- if gPCName = "" then
- qaErrorLog "Please insert the computername in section [Others] on the line 'PCname=' in the TestTool confguration file at: '" + gTesttoolIni + "'"
- end if
- end if
- end if
- end if
- '--------
+ gtHidLstPath = GetIniValue ( gTesttoolIni, gTTProfileName, "HIDDir" ) + hGetPathSigne(gtPlatform)
+ gPort = GetIniValue ( gTesttoolIni, "Communication", "TTPort" )
+ '--------
+ gPCName = GetIniValue ( gTesttoolIni, "Others", "PCname" )
+ if (gPCName = "NOT_SET!" OR gPCName = "") then
+ gPCName = environ ( "HOSTNAME" )
+ if (gPCName = "") then
+ gPCName = environ ( "COMPUTERNAME" )
+ if (gPCName = "") then
+ gPCName = environ ( "hostname" )
+ ' If testtool.ini/rc is unmodified, the default value is NOT_SET!
+ if gPCName = "" then
+ qaErrorLog "Please insert the computername in section [Others] on the line 'PCname=' in the TestTool confguration file at: '" + gTesttoolIni + "'"
+ end if
+ end if
+ end if
+ end if
+ '--------
call GetTheInstallationType ' gNetzInst and gNetzOfficePath will be set if StarOffice is a Network-Installation
gOfficeBasisPath = getOfficeBasisPath()
@@ -135,13 +135,13 @@ end sub
'-------------------------------------------------------------------------
sub GetOfficeInformation
-'/// Generates the path to the StarOffice executable.
-'/// <u>Output</u>: <b>sAppExe</b> variable is the StarOffice executable or the client executable (StarOffice server, StarPortal&trade;, Sun&trade; ONE Webtop, ...)
+ '/// Generates the path to the StarOffice executable.
+ '/// <u>Output</u>: <b>sAppExe</b> variable is the StarOffice executable or the client executable (StarOffice server, StarPortal&trade;, Sun&trade; ONE Webtop, ...)
Dim sProgramNeu as String
Dim iClient as Integer
Dim sPlatformProgramPath as string
- Dim sPlatformBinExt as string
-
+ Dim sPlatformBinExt as string
+
if ( lcase( gPlatform ) = "osx" ) then
sPlatformProgramPath = "MacOS"
sPlatformBinExt = ""
@@ -153,154 +153,127 @@ sub GetOfficeInformation
sPlatformBinExt = ""
end if
end if
-
- 'if it's a client on the same PC
- if gClient = TRUE AND gClientUser <> "" then
- if gtPlatform <> "w95" AND gtPlatform <> "wnt" AND gPlatform <> "w2k" AND gtPlatform <> "os2" AND gtPlatform <> "os4" then
+
+ 'if it's a client on the same PC
+ if gClient = TRUE AND gClientUser <> "" then
+ if gtPlatform <> "w95" AND gtPlatform <> "wnt" AND gPlatform <> "w2k" AND gtPlatform <> "os2" AND gtPlatform <> "os4" then
sAppExe = gsClient + "/bin/sclient"
- else
+ else
if right( lcase ( sAppExe ), 3 ) <> "exe" then sAppExe = gsClient + "\sclient.exe"
- end if
- sAppParameter = " -remote -connect=portal,service=soffice,host=" + gHost + ",port=8208,user=" + gClientUser + ",password=" + gClientUserPWD + ",type=compressed_secure"
- else
- if gNetzInst = TRUE then ' wenn es sich um eine Netzwerkinstallation handelt
- select case UCase(gApplication)
- case "WRITER" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-writer"
- case "CALC" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-calc"
- case "IMPRESS" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "private:factory/simpress"
- case "DRAW" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-draw"
- case "MASTERDOCUMENT": sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-global"
- case "MATH" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-math"
- case "HTML" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-web"
- case else : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- end select
- 'If it's a normal (FAT) office
- else
+ end if
+ sAppParameter = " -remote -connect=portal,service=soffice,host=" + gHost + ",port=8208,user=" + gClientUser + ",password=" + gClientUserPWD + ",type=compressed_secure"
+ else
+ if gNetzInst = TRUE then ' wenn es sich um eine Netzwerkinstallation handelt
+ select case UCase(gApplication)
+ case "WRITER" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-writer"
+ case "CALC" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-calc"
+ case "IMPRESS" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "private:factory/simpress"
+ case "DRAW" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-draw"
+ case "MASTERDOCUMENT": sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-global"
+ case "MATH" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-math"
+ case "HTML" : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-web"
+ case else : sAppExe = gNetzOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ end select
+ 'If it's a normal (FAT) office
+ else
'If it's a RVP-Office
if gClient = TRUE then
- if gPlatgroup <> "unx" then
- sAppExe = gOfficePath + "client\sclient.exe"
- else
- sAppExe = gOfficePath + "client/sclient"
- end if
+ if gPlatgroup <> "unx" then
+ sAppExe = gOfficePath + "client\sclient.exe"
+ else
+ sAppExe = gOfficePath + "client/sclient"
+ end if
else
- select case UCase(gApplication)
- case "WRITER" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-writer"
- case "CALC" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-calc"
- case "IMPRESS" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "private:factory/simpress"
- case "DRAW" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-draw"
- case "MASTERDOCUMENT": sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-global"
- case "MATH" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-math"
- case "HTML" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- sFactory = "-web"
- case else : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
- end select
+ select case ( gApplication )
+ case "WRITER" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-writer"
+ case "CALC" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-calc"
+ case "IMPRESS" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "private:factory/simpress"
+ case "DRAW" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-draw"
+ case "MASTERDOCUMENT": sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-global"
+ case "MATH" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-math"
+ case "HTML" : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ sFactory = "-web"
+ case else : sAppExe = gOfficePath & sPlatformProgramPath & gPathSigne & "soffice" & sPlatformBinExt
+ end select
end if
- end if
- end if
+ end if
+ end if
end sub
'-------------------------------------------------------------------------
function hGetPathSigne(sPlatform as string) as string
-'/// Seperators for the different platforms.
-'/// <u>Input</u>: string of class gPlatform
-'/// <u>Output</u>: string which can be used as seperator in directories
+ '/// Seperators for the different platforms.
+ '/// <u>Input</u>: string of class gPlatform
+ '/// <u>Output</u>: string which can be used as seperator in directories
select case sPlatform
- case "w95" : hGetPathSigne = "\"
- case "w98" : hGetPathSigne = "\"
- case "wnt" : hGetPathSigne = "\"
- case "wme" : hGetPathSigne = "\"
- case "wse" : hGetPathSigne = "\"
- case "w2k" : hGetPathSigne = "\"
- case "wxp" : hGetPathSigne = "\"
- case "ecs" : hGetPathSigne = "\"
- case "os4" : hGetPathSigne = "\"
- case "os5" : hGetPathSigne = "\"
- case "osx" : hGetPathSigne = "/"
- case "ppc" : hGetPathSigne = "/"
- case "sol" : hGetPathSigne = "/"
- case "lin" : hGetPathSigne = "/"
- case "x86" : hGetPathSigne = "/"
- case "fbsd": hGetPathSigne = "/"
- case "nbsd": hGetPathSigne = "/"
- case "lin64": hGetPathSigne= "/"
- case "linsparc": hGetPathSigne = "/"
- case else : hGetPathSigne = ""
- qaErrorLog " No pathseperator is defined for this platform : " + sPlatform
+ case "w95" : hGetPathSigne = "\"
+ case "w98" : hGetPathSigne = "\"
+ case "wnt" : hGetPathSigne = "\"
+ case "wme" : hGetPathSigne = "\"
+ case "wse" : hGetPathSigne = "\"
+ case "w2k" : hGetPathSigne = "\"
+ case "wxp" : hGetPathSigne = "\"
+ case "ecs" : hGetPathSigne = "\"
+ case "os4" : hGetPathSigne = "\"
+ case "os5" : hGetPathSigne = "\"
+ case "osx" : hGetPathSigne = "/"
+ case "ppc" : hGetPathSigne = "/"
+ case "sol" : hGetPathSigne = "/"
+ case "lin" : hGetPathSigne = "/"
+ case "x86" : hGetPathSigne = "/"
+ case "fbsd": hGetPathSigne = "/"
+ case "nbsd": hGetPathSigne = "/"
+ case "lin64": hGetPathSigne= "/"
+ case "linsparc": hGetPathSigne = "/"
+ case else : hGetPathSigne = ""
+ qaErrorLog " No pathseperator is defined for this platform : " + sPlatform
end select
end function
'-------------------------------------------------------------------------
-function ConvertPath ( sDatei$, optional sPlatform as string ) as String
-'/// Path conversion
-'/// <u>Input</u>: path as string; OPTIONAL: string of class gPlatform
-'/// <u>Output</u>: converted path respected to gPlatform; if optional paramter: to that Platform
-'/// Convert the <i>pathsigne</i> '\' to '/' when a test runs under UNIX
- Dim iW32 as Integer : Dim iUNX as Integer
- Dim i as Integer : Dim Ende as Integer
- Dim s1$ : Dim s2$ : Dim s3$
- dim sLocalPlatGroup as string
- dim sLocalPathSigne as string
-
- if (isMissing(sPlatform)) then
- sLocalPlatGroup = gPlatGroup
- sLocalPathSigne = gPathSigne
- else
- sLocalPlatGroup = hPlatformToGroup(sPlatform)
- sLocalPathSigne = hGetPathSigne(sPlatform)
- end if
+function ConvertPath( sPath as string ) as string
+ if ( getPathSeparator = "/" ) then
+ ConvertPath() = hStringReplaceChar( sPath, "\", "/" )
+ else
+ ConvertPath() = hStringReplaceChar( sPath, "/", "\" )
+ endif
+end function
- s3$ = "" : iW32 = 0 : iUNX = 0
- s1$ = sDatei$
- Ende = len ( s1$ )
-
-' convert all / to \ if WIN
- if sLocalPlatGroup <> "unx" then
- do
- i = InStr( s1$, "/" )
- if i = 0 then exit do
- s2$ = Left( s1$ , i-1 )
- s1$ = Mid( s1$ , i+1 )
- s3$ = s3$ + s2$ + "\"
- loop until s1$=""
- s1$ = s3$ + s1$
- s3$ = "" : s2$ = ""
- end if
+'-------------------------------------------------------------------------------
- ' convert all \ to gPathSigne => WIN -> XXX
- do
- i = InStr( s1$, "\" )
- if i = 0 then exit do
- s2$ = Left( s1$ , i-1 )
- s1$ = Mid( s1$ , i+1 )
- s3$ = s3$ + s2$ + sLocalPathSigne
- loop until s1$=""
+function hStringReplaceChar( cString as string, old_char as string, new_char as string ) as string
+
+ dim iChar as integer
+ dim myString as string : myString = cString
+ for iChar = 1 to len( myString )
+ if ( mid( myString, iChar, 1 ) = old_char ) then mid( myString, iChar, 1, new_char )
+ next iChar
+ hStringReplaceChar() = myString
- ConvertPath = s3$ + s1$
end function
-'-------------------------------------------------------------------------
+'-------------------------------------------------------------------------------
sub GetLanguageInformation
-'/// Extracts the language information from <i>Setup.xcu</i>.
-'/// <u>note</u>: It uses the <b>fgetL10Nvalue</b>.
- Dim sLanOutIni as string
+ '/// Extracts the language information from <i>Setup.xcu</i>.
+ '/// <u>note</u>: It uses the <b>fgetL10Nvalue</b>.
+ Dim sLanOutIni as string
' function 'fgetL10Nvalue' is also in this library
sLanOutIni = fgetL10Nvalue()
@@ -310,12 +283,61 @@ sub GetLanguageInformation
warnlog "=> default is now 01 = en_US"
end if
- 'language Code ISO 639 (and ISO 3166 for en language) is now gLangCode
- 'ISO 639 http://www.oasis-open.org/cover/iso639a.html
- 'ISO 3166: http://xml.coverpages.org/country3166.html
-
- gISOLang = sLanOutIni
-
+ 'language Code ISO 639 (and ISO 3166 for en language) is now gLangCode
+ 'ISO 639 http://www.oasis-open.org/cover/iso639a.html
+ 'ISO 3166: http://xml.coverpages.org/country3166.html
+
+ gISOLang = sLanOutIni
+
+<<<<<<< local
+ select case lcase ( sLanOutIni )
+ case "en_us", "en-us", "en" : iSprache = 01 ' English (USA)
+ case "pt_pt", "pt-pt", "pt" : iSprache = 03 ' Portuguese
+ case "ru_ru", "ru-ru", "ru" : iSprache = 07 ' Russian
+ case "el_gr", "el-gr", "el" : iSprache = 30 ' Greek
+ case "nl_nl", "nl-nl", "nl" : iSprache = 31 ' Dutch
+ case "fr_fr", "fr-fr", "fr" : iSprache = 33 ' French
+ case "es_es", "es-es", "es" : iSprache = 34 ' Spanish
+ case "fi_fi", "fi-fi", "fi" : iSprache = 35 ' Finnish
+ case "hu_hu", "hu-hu", "hu" : iSprache = 36 ' Hungaria
+ case "ca_ad", "ca-ad", "ca" : iSprache = 37 ' Catalan
+ case "it_it", "it-it", "it" : iSprache = 39 ' Italian
+ case "cs_cz", "cs-cz", "cs" : iSprache = 42 ' Czech
+ case "sk_sk", "sk-sk", "sk" : iSprache = 43 ' Slowak
+ case "en_gb", "en-gb" : iSprache = 44 ' English (GB)
+ case "da_dk", "da-dk", "da" : iSprache = 45 ' Danish
+ case "sv_se", "sv-se", "sv" : iSprache = 46 ' Swedish
+ case "no_no", "no-no", "no" : iSprache = 47 ' Norwegian
+ case "pl_pl", "pl-pl", "pl" : iSprache = 48 ' Polish
+ case "de_de", "de-de", "de" : iSprache = 49 ' German
+ case "sr_rs", "sr-rs", "sr" : iSprache = 51 ' Serbian (Cyrillic)
+ case "sh_rs", "sh-rs", "sh" : iSprache = 52 ' Serbian (Latin)
+ case "pt_br", "pt-br", "br" : iSprache = 55 ' Portuguese (Brazil)
+ case "th_th", "th-th", "th" : iSprache = 66 ' Thai
+ case "ja_jp", "ja-jp", "ja" : iSprache = 81 ' Japanese
+ case "ko_kr", "ko-kr", "ko" : iSprache = 82 ' Korean
+ case "vi_vi", "vi-vi", "vi" : iSprache = 84 ' Vietnamese
+ case "zh_cn", "zh-cn", "zh" : iSprache = 86 ' Chinese (simplified)
+ case "zh_tw", "zh-tw" : iSprache = 88 ' Chinese (traditional)
+ case "tr_tr", "tr-tr", "tr" : iSprache = 90 ' Turkish
+ case "hi_in", "hi-in", "hi" : iSprache = 91 ' Hindi
+ case "ar_ar", "ar-ar", "ar" : iSprache = 96 ' Arabic
+ case "he_he", "he-he", "he" : iSprache = 97 ' Hebrew
+ case "sl_si", "sl-si", "sl" : iSprache = 386 ' Slovenian
+ case "zz_zz", "zz-zz", "zz" : iSprache = 01 ' unknown
+ warnlog "iniinfo.inc::GetLanguageInformation()"
+ warnlog "- sLanOutIni = " & sLanOutIni & " (unknown language)"
+ warnlog "- iSprache has been set 01!"
+ case "" : iSprache = 01 ' empty
+ warnlog "iniinfo.inc::GetLanguageInformation()"
+ warnlog "- empty sLanOutIni = " & sLanOutIni
+ warnlog "- iSprache has been set 01!"
+ case else : iSprache = 01
+ warnlog "iniinfo.inc::GetLanguageInformation()"
+ warnlog "- sLanOutIni = " & sLanOutIni & " (fallback mode; unknown language)"
+ warnlog "- iSprache has been set 01!"
+ end select
+=======
select case lcase ( sLanOutIni )
case "en_us", "en-us", "en" : iSprache = 01 ' English (USA)
case "pt_pt", "pt-pt", "pt" : iSprache = 03 ' Portuguese
@@ -363,6 +385,7 @@ sub GetLanguageInformation
warnlog "- sLanOutIni = " & sLanOutIni & " (fallback mode; unknown language)"
warnlog "- iSprache has been set 01!"
end select
+>>>>>>> other
if iSprache = 81 OR iSprache = 82 OR iSprache = 86 OR iSprache = 88 then
bAsianLan = TRUE
@@ -380,8 +403,40 @@ end sub
'-------------------------------------------------------------------------
function ConvertLanguage ( Sprache as String ) as Integer
-'/// Sets international language code for the whole language name.
-
+ '/// Sets international language code for the whole language name.
+
+<<<<<<< local
+ select case lCase ( Sprache )
+ case "deutsch", "german" : ConvertLanguage = 49
+ case "englisch", "english" : ConvertLanguage = 01
+ case "portugisisch", "portugiesisch", "portuguese" : ConvertLanguage = 03
+ case "russisch", "russian" : ConvertLanguage = 07
+ case "czech", "tschechisch" : ConvertLanguage = 29
+ case "griechisch", "greek" : ConvertLanguage = 30
+ case "niederlaendisch", "hollaendisch", "netherlands" : ConvertLanguage = 31
+ case "franzoesisch", "french" : ConvertLanguage = 33
+ case "spanisch", "spanish" : ConvertLanguage = 34
+ case "finisch", "finnish" : ConvertLanguage = 35
+ case "hungaria", "ungarisch" : ConvertLanguage = 36
+ case "italienisch", "italian" : ConvertLanguage = 39
+ case "slowak", "slovakisch" : ConvertLanguage = 43
+ case "daenisch", "danish" : ConvertLanguage = 45
+ case "schwedisch", "swedish" : ConvertLanguage = 46
+ case "norwegian", "norwegisch" : ConvertLanguage = 47
+ case "polnisch", "polish" : ConvertLanguage = 48
+ case "serbisch kyrillisch", "serbian cyrillic" : ConvertLanguage = 51
+ case "serbisch latein", "serbian latin" : ConvertLanguage = 52
+ case "japanisch", "japanese" : ConvertLanguage = 81
+ case "koreanisch", "korean" : ConvertLanguage = 82
+ case "vietnamesisch", "vietnamese" : ConvertLanguage = 84
+ case "chinesisch", "chinese" : ConvertLanguage = 86
+ case "chinesisch trad.", "chinese trad." : ConvertLanguage = 88
+ case "tuerkisch", "turkish" : ConvertLanguage = 90
+ case "arabisch", "arab" : ConvertLanguage = 96
+ case "catalan", "katalanisch" : ConvertLanguage = 99
+ case "slovenian", "slovenisch" : ConvertLanguage = 386
+ end select
+=======
select case lCase ( Sprache )
case "deutsch", "german" : ConvertLanguage = 49
case "englisch", "english" : ConvertLanguage = 01
@@ -412,11 +467,52 @@ function ConvertLanguage ( Sprache as String ) as Integer
case "arabisch", "arab" : ConvertLanguage = 96
case "catalan", "katalanisch" : ConvertLanguage = 99
end select
+>>>>>>> other
end function
'-------------------------------------------------------------------------
function GetLanguageText ( iLan ) as String
+<<<<<<< local
+ '/// Sets the language name for the international language-code.
+ select case iLan
+ case 01 : GetLanguageText = "English (USA)"
+ case 03 : GetLanguageText = "Portuguese"
+ case 07 : GetLanguageText = "Russian"
+ case 30 : GetLanguageText = "Greek"
+ case 31 : GetLanguageText = "Dutch"
+ case 33 : GetLanguageText = "French"
+ case 34 : GetLanguageText = "Spanish"
+ case 35 : GetLanguageText = "Finnish"
+ case 36 : GetLanguageText = "Hungarian"
+ case 37 : GetLanguageText = "Catalan"
+ case 39 : GetLanguageText = "Italian"
+ case 42 : GetLanguageText = "Czech"
+ case 43 : GetLanguageText = "Slowak"
+ case 44 : GetLanguageText = "English (GB)"
+ case 45 : GetLanguageText = "Danish"
+ case 46 : GetLanguageText = "Swedish"
+ case 47 : GetLanguageText = "Norwegian"
+ case 48 : GetLanguageText = "Polnish"
+ case 49 : GetLanguageText = "German"
+ case 51 : GetlanguageText = "Serbian (Cyrillic)"
+ case 52 : GetlanguageText = "Serbian (Latin)"
+ case 55 : GetLanguageText = "Portuguese (Brazil)"
+ case 66 : GetLanguageText = "Thai"
+ case 81 : GetLanguageText = "Japanese"
+ case 82 : GetLanguageText = "Korean"
+ case 84 : GetLanguageText = "Vietnamese"
+ case 86 : GetLanguageText = "Chinese (simplified)"
+ case 88 : GetLanguageText = "Chinese (traditional)"
+ case 90 : GetLanguageText = "Turkish"
+ case 91 : GetLanguageText = "Hindi"
+ case 96 : GetLanguageText = "Arabic"
+ case 97 : GetLanguageText = "Hebrew"
+ case 99 : GetLanguageText = "Unknown"
+ case 386 : GetlanguageText = "Slovenian"
+ case else : GetLanguageText = "detection failed"
+ end select
+=======
'/// Sets the language name for the international language-code.
select case iLan
case 01 : GetLanguageText = "English (USA)"
@@ -455,11 +551,64 @@ function GetLanguageText ( iLan ) as String
case 99 : GetLanguageText = "Unknown"
case else : GetLanguageText = "detection failed"
end select
+>>>>>>> other
end function
'-------------------------------------------------------------------------
function ConvertLanguage2 ( sSprache as String, optional bExact ) as Integer
+<<<<<<< local
+ '/// Sets the international language code for the international language shortcut.
+ '/// <i>optional <b>bExact</i></b>: If language not available, 'shut up' and return '0'
+ select case lCase ( sSprache )
+ case "en_us", "en-us", "en" : ConvertLanguage2 = 01 ' English (USA)
+ case "pt_pt", "pt-pt", "pt" : ConvertLanguage2 = 03 ' Portuguese
+ case "ru_ru", "ru-ru", "ru" : ConvertLanguage2 = 07 ' Russian
+ case "el_gr", "el-gr", "el" : ConvertLanguage2 = 30 ' Greek
+ case "nl_nl", "nl-nl", "nl" : ConvertLanguage2 = 31 ' Dutch
+ case "fr_fr", "fr-fr", "fr" : ConvertLanguage2 = 33 ' French
+ case "es_es", "es-es", "es" : ConvertLanguage2 = 34 ' Spanish
+ case "fi_fi", "fi-fi", "fi" : ConvertLanguage2 = 35 ' Finnish
+ case "hu_hu", "hu-hu", "hu" : ConvertLanguage2 = 36 ' Hungaria
+ case "ca_ad", "ca-ad", "ca" : ConvertLanguage2 = 37 ' Catalan
+ case "it_it", "it-it", "it" : ConvertLanguage2 = 39 ' Italian
+ case "cs_cz", "cs-cz", "cs" : ConvertLanguage2 = 42 ' Czech
+ case "sk_sk", "sk-sk", "sk" : ConvertLanguage2 = 43 ' Slowak
+ case "en_gb", "en-gb" : ConvertLanguage2 = 44 ' English (GB)
+ case "da_dk", "da-dk", "da" : ConvertLanguage2 = 45 ' Danish
+ case "sv_se", "sv-se", "sv" : ConvertLanguage2 = 46 ' Swedish
+ case "no_no", "no-no", "no" : ConvertLanguage2 = 47 ' Norwegian
+ case "pl_pl", "pl-pl", "pl" : ConvertLanguage2 = 48 ' Polish
+ case "de_de", "de-de", "de" : ConvertLanguage2 = 49 ' German
+ case "sr_rs", "sr_rs", "sr" : ConvertLanguage2 = 51 ' Serbian (Cyrillic)
+ case "sh_rs", "sh_rs", "sh" : ConvertLanguage2 = 52 ' Serbian (Latin)
+ case "pt_br", "pt-br", "br" : ConvertLanguage2 = 55 ' Portuguese (Brazil)
+ case "th_th", "th-th", "th" : ConvertLanguage2 = 66 ' Thai
+ case "ja_jp", "ja-jp", "ja" : ConvertLanguage2 = 81 ' Japanese
+ case "ko_kr", "ko-kr", "ko" : ConvertLanguage2 = 82 ' Korean
+ case "vi_vi", "vi_vi", "vi" : ConvertLanguage2 = 84 ' Vietnamese
+ case "zh_cn", "zh-cn", "zh" : ConvertLanguage2 = 86 ' Chinese (simplified)
+ case "zh_tw", "zh-tw" : ConvertLanguage2 = 88 ' Chinese (traditional)
+ case "tr_tr", "tr-tr", "tr" : ConvertLanguage2 = 90 ' Turkish
+ case "hi_in", "hi-in", "hi" : ConvertLanguage2 = 91 ' Hindi
+ case "ar_ar", "ar-ar", "ar" : ConvertLanguage2 = 96 ' Arabic
+ case "he_he", "he-he", "he" : ConvertLanguage2 = 97 ' Hebrew
+ case "sl_si", "sl-si", "sl" : ConvertLanguage2 = 386
+ case "zz_zz", "zz-zz", "zz" : ConvertLanguage2 = 01 ' unknown
+ case else :
+ if isMissing (bExact) then
+ printlog "iniinfo.inc::ConvertLanguage2(): Unknown systemlanguage '" & sSprache & "'!"
+ printlog "Default will be set to 01!"
+ ConvertLanguage2 = 01
+ else
+ printlog "iniinfo.inc::ConvertLanguage2(): Unknown systemlanguage '" & sSprache & "'!"
+ if bExact = TRUE then
+ printlog "Default will be set to 00!"
+ ConvertLanguage2 = 00
+ end if
+ end if
+ end select
+=======
'/// Sets the international language code for the international language shortcut.
'/// <i>optional <b>bExact</i></b>: If language not available, 'shut up' and return '0'
select case lCase ( sSprache )
@@ -509,13 +658,54 @@ function ConvertLanguage2 ( sSprache as String, optional bExact ) as Integer
end if
end if
end select
+>>>>>>> other
end function
'-------------------------------------------------------------------------
function ConvertCodeToLanguage ( sSprache as String ) as Integer
-'/// Converts the old language code to international language code
-
+ '/// Converts the old language code to international language code
+
+<<<<<<< local
+ select case lCase ( sSprache )
+ case "1033" : ConvertCodeToLanguage = 01 ' English (USA)
+ case "2070" : ConvertCodeToLanguage = 03 ' Portuguese
+ case "1049" : ConvertCodeToLanguage = 07 ' Russian
+ case "1032" : ConvertCodeToLanguage = 30 ' Greek
+ case "1043" : ConvertCodeToLanguage = 31 ' Dutch
+ case "1036" : ConvertCodeToLanguage = 33 ' French
+ case "3082" : ConvertCodeToLanguage = 34 ' Spanish
+ case "1034" : ConvertCodeToLanguage = 34 ' Spanish
+ case "1035" : ConvertCodeToLanguage = 35 ' Finnish
+ case "1038" : ConvertCodeToLanguage = 36 ' Hungaria
+ case "2099" : ConvertCodeToLanguage = 37 ' Catalan
+ case "1040" : ConvertCodeToLanguage = 39 ' Italian
+ case "1029" : ConvertCodeToLanguage = 42 ' Czech
+ case "1051" : ConvertCodeToLanguage = 43 ' Slowak
+ case "2057" : ConvertCodeToLanguage = 44 ' English (GB)
+ case "1030" : ConvertCodeToLanguage = 45 ' Danish
+ case "1053" : ConvertCodeToLanguage = 46 ' Swedish
+ case "2047" : ConvertCodeToLanguage = 47 ' Norwegian
+ case "1045" : ConvertCodeToLanguage = 48 ' Polish
+ case "1031" : ConvertCodeToLanguage = 49 ' German
+ case " " : ConvertCodeToLanguage = 55 ' Portuguese (Brazil)
+ case "3098" : ConvertCodeToLanguage = 51 ' Serbian (Cyriliic)
+ case "2074" : ConvertCodeToLanguage = 52 ' Serbian (Latin)
+ case " " : ConvertCodeToLanguage = 66 ' Thai
+ case "1041" : ConvertCodeToLanguage = 81 ' Japanese
+ case "1042" : ConvertCodeToLanguage = 82 ' Korean
+ case "1066" : ConvertCodeToLanguage = 84 ' Vietnamese
+ case "2052" : ConvertCodeToLanguage = 86 ' Chinese (simplified)
+ case "1028" : ConvertCodeToLanguage = 88 ' Chinese (traditional)
+ case "1055" : ConvertCodeToLanguage = 90 ' Turkish
+ ' case " " : ConvertCodeToLanguage = 91 ' Hindi
+ case "1025" : ConvertCodeToLanguage = 96 ' Arabic
+ ' case " " : ConvertCodeToLanguage = 97 ' Hebrew
+ case "1060" : ConvertCodeToLanguage = 386 ' Slovenian
+ case else : printlog "iniinfo.inc::ConvertCodeToLanguage(): Num. Code could not be detect or is unknown and will be set to 01 (English (USA))!"
+ ConvertCodeToLanguage = 01
+ end select
+=======
select case lCase ( sSprache )
case "1033" : ConvertCodeToLanguage = 01 ' English (USA)
case "2070" : ConvertCodeToLanguage = 03 ' Portuguese
@@ -554,6 +744,7 @@ function ConvertCodeToLanguage ( sSprache as String ) as Integer
case else : printlog "iniinfo.inc::ConvertCodeToLanguage(): Num. Code could not be detect or is unknown and will be set to 01 (English (USA))!"
ConvertCodeToLanguage = 01
end select
+>>>>>>> other
end function
'-------------------------------------------------------------------------
@@ -569,18 +760,18 @@ sub GetTheInstallationType
dim aTemp3
dim i,x as integer
dim sPlatformProgramPath as string
-
+
if ( lcase( gPlatform ) = "osx" ) then
- sPlatformProgramPath = "MacOS"
+ sPlatformProgramPath = "MacOS"
else
- sPlatformProgramPath = "program"
+ sPlatformProgramPath = "program"
endif
-
+
if gSamePC = TRUE then
gNetzInst = TRUE
gNetzOfficePath = gOfficePath
if (gSamePC = TRUE) then
- if gPlatgroup = "unx" then
+ if gPlatgroup = "unx" then
sTemp = GetIniValue (gOfficePath & sPlatformProgramPath & "/bootstraprc", "Bootstrap", "UserInstallation")
else
sTemp = GetIniValue (gOfficePath & sPlatformProgramPath & "\bootstrap.ini", "Bootstrap", "UserInstallation")
@@ -599,8 +790,8 @@ sub GetTheInstallationType
gOfficePath = sURL + gPathSigne
else
if inStr(sURL,"$BRAND_BASE_DIR") > 0 then
- gOfficePath = gOfficePath & right(sURL, len(sURL) - (inStr(sURL,"$BRAND_BASE_DIR")+len("$BRAND_BASE_DIR")))
- else
+ gOfficePath = gOfficePath & right(sURL, len(sURL) - (inStr(sURL,"$BRAND_BASE_DIR")+len("$BRAND_BASE_DIR")))
+ else
qaErrorLog "ininfo.inc::GetTheInstallationType:: Unexpected entry in bootstrap file.(Entry UserInstallation not starting with: $SYSUSERCONFIG or $ORIGIN or file://; Using entry as absolute path!)"
printlog "ininfo.inc::GetTheInstallationType:: original UserInstallation entry from 'bootstrap' file: '" + sTemp + "'"
printlog "ininfo.inc::GetTheInstallationType:: using now converted from URL for 'gOfficePath': '" + sURL + "'"
@@ -614,7 +805,7 @@ sub GetTheInstallationType
' to support some developer bootstraprc/ini's:
gOfficePath = fRelativeToAbsolutePath(gOfficePath)
gOfficePath = fRemoveDoubleCharacter(gOfficePath + gPathSigne, gPathSigne)
- else
+ else
gNetzInst = GetIniValue ( gTesttoolIni, "Network", "Net" )
gNetzOfficePath = GetIniValue ( gTesttoolIni, "Network", "Current" )
if Right ( gNetzOfficePath,1 ) <> gPathSigne then gNetzOfficePath = gNetzOfficePath + gPathSigne
@@ -624,8 +815,8 @@ end sub
'-------------------------------------------------------------------------
function ReplaceCharacter(stringToChange$, charToReplace$, replaceWith$) As String
-'/// Replaces a specified character in a string with another character that you specify
-'///+ INPUT: &lt;string&gt; , &lt;which characterto replace&gt; , &lt;which caracter the old one should be replaced&gt;
+ '/// Replaces a specified character in a string with another character that you specify
+ '///+ INPUT: &lt;string&gt; , &lt;which characterto replace&gt; , &lt;which caracter the old one should be replaced&gt;
Dim ln, n As Long
Dim NextLetter As String
Dim FinalString As String
@@ -660,36 +851,32 @@ function fgetL10Nvalue() as string
dim args(0) as new com.sun.star.beans.NamedValue
args(0).Name = "nodepath"
args(0).Value = "/org.openoffice.Setup/L10N"
- fgetL10Nvalue = hGetUNOService()._
- createInstance("com.sun.star.configuration.DefaultProvider")._
- createInstanceWithArguments(_
- "com.sun.star.configuration.ConfigurationAccess", args())._
- getByName("ooLocale")
+ fgetL10Nvalue = hGetUNOService().createInstance("com.sun.star.configuration.DefaultProvider").createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", args()).getByName("ooLocale")
end function
'-------------------------------------------------------------------------
function hPlatformToGroup(sPLatform as string) as string
-'/// <u>Input</u>: string of class gPlatform
-'/// <u>Output</u>: string of class gPlatGroup
+ '/// <u>Input</u>: string of class gPlatform
+ '/// <u>Output</u>: string of class gPlatGroup
select case sPLatform
- case "w95":hPlatformToGroup = "w95"
- case "w98":hPlatformToGroup = "w95"
- case "wse":hPlatformToGroup = "w95"
- case "wme":hPlatformToGroup = "w95"
- case "wnt":hPlatformToGroup = "w95"
- case "w2k":hPlatformToGroup = "w95"
- case "wxp":hPlatformToGroup = "w95"
- case "mac":hPlatformToGroup = "mac"
- case "ppc":hPlatformToGroup = "unx"
- case "sol":hPlatformToGroup = "unx"
- case "x86":hPlatformToGroup = "unx"
- case "lin":hPlatformToGroup = "unx"
- case "fbsd":hPlatformToGroup= "unx"
- case "nbsd":hPlatformToGroup= "unx"
- case "lin64":hPlatformToGroup= "unx"
- case "linsparc":hPlatformToGroup = "unx"
- case "ecs":hPlatformToGroup = "ecs"
+ case "w95":hPlatformToGroup = "w95"
+ case "w98":hPlatformToGroup = "w95"
+ case "wse":hPlatformToGroup = "w95"
+ case "wme":hPlatformToGroup = "w95"
+ case "wnt":hPlatformToGroup = "w95"
+ case "w2k":hPlatformToGroup = "w95"
+ case "wxp":hPlatformToGroup = "w95"
+ case "mac":hPlatformToGroup = "mac"
+ case "ppc":hPlatformToGroup = "unx"
+ case "sol":hPlatformToGroup = "unx"
+ case "x86":hPlatformToGroup = "unx"
+ case "lin":hPlatformToGroup = "unx"
+ case "fbsd":hPlatformToGroup= "unx"
+ case "nbsd":hPlatformToGroup= "unx"
+ case "lin64":hPlatformToGroup= "unx"
+ case "linsparc":hPlatformToGroup = "unx"
+ case "ecs":hPlatformToGroup = "ecs"
end select
end function
@@ -699,72 +886,69 @@ sub sGetCrashreporterValues as boolean
'/// This routine reads the values of the [Crashreporter] section
'///+ in the TestTool control file (testtool.ini / .testtoolrc).
'///It returns FALSE if one of the required
- '///+ information is missing in testtool.ini.
-
+ '///+ information is missing in testtool.ini.
+
sGetCrashreporterValues = FALSE
'/// <i>gUseProxy</i> should be TRUE if you need a proxy or FALSE
- '///+ if you have a direct connection to the (inter)net.
- gUseProxy = GetIniValue ( gTesttoolIni, "Crashreporter" , "UseProxy" )
+ '///+ if you have a direct connection to the (inter)net.
+ gUseProxy = GetIniValue ( gTesttoolIni, "Crashreporter" , "UseProxy" )
'If there's no value (=no entries at all...) exit the routine.
'sGetCrashreporterValues = FALSE so the routine in master.inc
'will stop testing.
- if gUseProxy = "" then
+ if gUseProxy = "" then
exit sub
else
'Making a boolean value from it.
- gUseProxy = cBool(gUseProxy)
+ gUseProxy = cBool(gUseProxy)
'/// <i>gConnectiontype</i> has the value DIRECT or MANUALPROXY in dependency
'///+ of <i>gUseProxy</i>. If <i>gUseProxy</i> = TRUE then the value of
'///+ <i>gConnectiontype</i> is MANUALPROXY otherwiese DIRECT.
- if gUseProxy = FALSE then
- gConnectionType = "DIRECT"
+ if gUseProxy = FALSE then
+ gConnectionType = "DIRECT"
sGetCrashreporterValues = TRUE
- else
+ else
gConnectionType = "MANUALPROXY"
end if
-
- if gUseProxy then
- '/// <i>gProxyServer</i> should be the proxy server which is needed to send
- '///+ the crashreporter data via the net.
- gProxyServer = GetIniValue ( gTesttoolIni, "Crashreporter" , "ProxyServer" )
- 'Verifying that a proxy server has been entered if
- 'gUseProxy has been set to TRUE.
- if gUseProxy = TRUE AND gProxyServer = "" then
- warnlog "qatesttool::global::system::inc::iniinfo.inc::sGetCrashReporterValue: " _
- & "In the [Crashreporter]-section of TestTool control file 'UseProxy=true' but 'ProxyServer=' (empty). Please correct it!"
- sGetCrashreporterValues = FALSE
- else
- sGetCrashreporterValues = TRUE
- end if
-
- '/// <i>gProxyPort</i> should be the proxy server port which is needed to send
- '///+ the crashreporter data via the net.
- gProxyPort = GetIniValue ( gTesttoolIni, "Crashreporter" , "ProxyPort" )
- 'Verifying that a proxy server port has been entered if
- 'gUseProxy has been set to TRUE.
- if gUseProxy = TRUE AND gProxyPort = "" then
- sGetCrashreporterValues = FALSE
- warnlog "qatesttool::global::system::inc::iniinfo.inc::sGetCrashReporterValue: " _
- & "In the [Crashreporter]-section of TestTool control file 'UseProxy=true' but 'ProxyPort=' (empty). Please correct it!"
- end if
- else
- ' to workaround issue i94779 set server and port to empty in case of direkt access
- gProxyServer = ""
- gProxyPort = ""
- endif
-
+
+ if gUseProxy then
+ '/// <i>gProxyServer</i> should be the proxy server which is needed to send
+ '///+ the crashreporter data via the net.
+ gProxyServer = GetIniValue ( gTesttoolIni, "Crashreporter" , "ProxyServer" )
+ 'Verifying that a proxy server has been entered if
+ 'gUseProxy has been set to TRUE.
+ if gUseProxy = TRUE AND gProxyServer = "" then
+ warnlog "qatesttool::global::system::inc::iniinfo.inc::sGetCrashReporterValue: " & "In the [Crashreporter]-section of TestTool control file 'UseProxy=true' but 'ProxyServer=' (empty). Please correct it!"
+ sGetCrashreporterValues = FALSE
+ else
+ sGetCrashreporterValues = TRUE
+ end if
+
+ '/// <i>gProxyPort</i> should be the proxy server port which is needed to send
+ '///+ the crashreporter data via the net.
+ gProxyPort = GetIniValue ( gTesttoolIni, "Crashreporter" , "ProxyPort" )
+ 'Verifying that a proxy server port has been entered if
+ 'gUseProxy has been set to TRUE.
+ if gUseProxy = TRUE AND gProxyPort = "" then
+ sGetCrashreporterValues = FALSE
+ warnlog "qatesttool::global::system::inc::iniinfo.inc::sGetCrashReporterValue: " & "In the [Crashreporter]-section of TestTool control file 'UseProxy=true' but 'ProxyPort=' (empty). Please correct it!"
+ end if
+ else
+ ' to workaround issue i94779 set server and port to empty in case of direkt access
+ gProxyServer = ""
+ gProxyPort = ""
+ endif
+
'/// <i>gAllowContact</i> should be TRUE or FALSE
gAllowContact = GetIniValue ( gTesttoolIni, "Crashreporter" , "AllowContact" )
gAllowContact = cBool(gAllowContact)
-
- '/// <i>gReturnAddress</i> should be the E-Mail address which can be used
- '///+ to contact the user who has run the test scripts for additional information .
+
+ '/// <i>gReturnAddress</i> should be the E-Mail address which can be used
+ '///+ to contact the user who has run the test scripts for additional information .
gReturnAddress = GetIniValue ( gTesttoolIni, "Crashreporter" , "ReturnAddress" )
'Verifying that a mail address has been entered if
'gAllowContact has been set to TRUE.
if gAllowContact = TRUE AND gReturnAddress = "" then
- warnlog "qatesttool::global::system::inc::iniinfo.inc::sGetCrashReporterValue: " _
- & "In the [Crashreporter]-section of TestTool control file 'AllowContact=true' but 'ReturnAddress=' (empty). Please correct it!"
+ warnlog "qatesttool::global::system::inc::iniinfo.inc::sGetCrashReporterValue: " & "In the [Crashreporter]-section of TestTool control file 'AllowContact=true' but 'ReturnAddress=' (empty). Please correct it!"
sGetCrashreporterValues = FALSE
end if
end if
@@ -800,7 +984,7 @@ function getSofficeNative() as string
dim bError as boolean
bError = false
-
+
'/// separated handling between Linux/Unix and Win32 platforms ///'
if ("unx" = gPlatGroup) then
'/// on Linux/Unix systems we need to check/resolv 2 possible links which point to the directory with the 'soffice' executable ///'
@@ -831,30 +1015,30 @@ function getSofficeNative() as string
sCandidates(2) = sTemp + "/" + sCandidates(2)
end if
' DEBUG: If you need more detailed information about the installation environment
- ' enable the next line.
+ ' enable the next line.
' printlog "getSofficeNative() - : $HOME/soffice : '" + sCandidates(2) + "' destination exists?: " +fileExists(sCandidates(2))
catch
' DEBUG: If you need more detailed information about the installation environment
- ' enable the next line.
+ ' enable the next line.
' printlog "getSofficeNative() - : $HOME/soffice : NOT AVAILABLE"
sCandidates(2) = ""
endcatch
- for i = 1 to 2
- if fileExists(sCandidates(i)) then
- '/// cut off program//soffice from link destination ///'
- y = instr(sCandidates(i), "program/soffice")
- if ( lcase( gPlatform ) = "osx" AND y < 1 ) then
- ' Accept also MacOS in link to soffice binary
- y = instr(sCandidates(i), "MacOS/soffice")
- end if
- if (y > 0) then
- sCandidates(i) = left(sCandidates(i), y-1)
- else
- qaErrorLog "master.inc::getSofficeNative():: expected 'program/soffice' at end of link destination: '" + sCandidates(i) + "'"
- sCandidates(i) = ""
- end if
+ for i = 1 to 2
+ if fileExists(sCandidates(i)) then
+ '/// cut off program//soffice from link destination ///'
+ y = instr(sCandidates(i), "program/soffice")
+ if ( lcase( gPlatform ) = "osx" AND y < 1 ) then
+ ' Accept also MacOS in link to soffice binary
+ y = instr(sCandidates(i), "MacOS/soffice")
end if
- next i
+ if (y > 0) then
+ sCandidates(i) = left(sCandidates(i), y-1)
+ else
+ qaErrorLog "master.inc::getSofficeNative():: expected 'program/soffice' at end of link destination: '" + sCandidates(i) + "'"
+ sCandidates(i) = ""
+ end if
+ end if
+ next i
if (("" = sCandidates(1)) or ("" = sCandidates(2))) then
' if one candidate doesn't exist
'/// If only one candidate exist, take him. ///'
@@ -873,17 +1057,17 @@ function getSofficeNative() as string
end if
next i
' DEBUG: If you need more detailed information about the installation environment
- ' enable the next line.
+ ' enable the next line.
' printlog "getSofficeNative() - : BildId (1): " + iBuildId(1) + " (2): " + iBuildId(2)
'/// - Take the candidate which exists and comes from $HOME ///'
- if (iBuildId(1) > iBuildId(2)) then
+ if (iBuildId(1) > iBuildId(2)) then
gOfficePath = sCandidates(1)
else
'/// - If BuildIds are equal, the candidate from $HOME wins ///'
gOfficePath = sCandidates(2)
end if
end if
- if (not fileExists(gOfficePath)) then
+ if (not fileExists(gOfficePath)) then
'/// - check if resulting candidate exist; No: error ///'
bError = true
end if
@@ -905,14 +1089,14 @@ function getSofficeNative() as string
iVendorEntries = 1
sVendor(iVendorEntries) = "Sun Microsystems": inc (iVendorEntries)
sVendor(iVendorEntries) = "OpenOffice.org" : inc (iVendorEntries)
- sVendor(iVendorEntries) = "Oracle" : inc (iVendorEntries)
+ sVendor(iVendorEntries) = "Oracle" : inc (iVendorEntries)
iOfficeEntries = 1
sOffice(iOfficeEntries) = "Oracle Open Office" : inc (iOfficeEntries)
sOffice(iOfficeEntries) = "StarOffice" : inc (iOfficeEntries)
sOffice(iOfficeEntries) = "StarSuite" : inc (iOfficeEntries)
sOffice(iOfficeEntries) = "OpenOffice.org": inc (iOfficeEntries)
-
+
iVersionEntries = 1
sVersion(iVersionEntries) = "9" : inc (iVersionEntries)
sVersion(iVersionEntries) = "8" : inc (iVersionEntries)
@@ -921,10 +1105,10 @@ function getSofficeNative() as string
sVersion(iVersionEntries) = "2.0.0" : inc (iVersionEntries)
sVersion(iVersionEntries) = "680" : inc (iVersionEntries)
sVersion(iVersionEntries) = "2.2" : inc (iVersionEntries)
-
+
' put new versions ABOVE THIS LINE! ^^^^^^^^^^^
sVersion(iVersionEntries) ="NotFound": inc (iVersionEntries) ' HAS TO Stay at LAST
-
+
' I have to walk over both sPath(z),
' over all sOffice(y)-1
' over all sVersion(x)-2
@@ -939,15 +1123,15 @@ function getSofficeNative() as string
sTemp = sPath(z) + sVendor(j) + "\" + sOffice(y) + "\" + sVersion(x)
sOfficePath(z) = getRegistryValue(sTemp, sKey)
iOffice(z) = z*1000 + j*100 + y*10 + x
- if (sOfficePath(z) <> "") AND fileExists(sOfficePath(z)) then
+ if (sOfficePath(z) <> "") AND fileExists(sOfficePath(z)) then
' DEBUG: If you need more detailed information about the installation environment
- ' enable the next line.
+ ' enable the next line.
' printlog "getSofficeNative() - : A " + z + ":" + j + ":" + y + ":" + x + " " + sTemp + " +++++++++++ " + sOfficePath(z)
- else
- ' printlog "getSofficeNative() - : C " + z + ":" + j + ":" + y + ":" + x + " " + sTemp + " +++++++++++ " + sOfficePath(z)
- sOfficePath(z) = ""
- iOffice(z) = 0
- end if
+ else
+ ' printlog "getSofficeNative() - : C " + z + ":" + j + ":" + y + ":" + x + " " + sTemp + " +++++++++++ " + sOfficePath(z)
+ sOfficePath(z) = ""
+ iOffice(z) = 0
+ end if
else
' This is just for completeness. B has no effect, A counts.
sTemp = sPath(z) + sVendor(j) + "\" + sOffice(y) + "\" + sVersion(x)
@@ -955,7 +1139,7 @@ function getSofficeNative() as string
sTemp2 = getRegistryValue(sTemp, sKey)
if (sTemp2 <> "") then
' DEBUG: If you need more detailed information about the installation environment
- ' enable the next line.
+ ' enable the next line.
' printlog "getSofficeNative() - : B " + z + ":" + j + ":" + y + ":" + x + " " + sTemp + " +++++++++++ "+sTemp2
end if
end if
@@ -997,14 +1181,14 @@ function getSofficeNative() as string
end if
end if
' now we have gOfficePath set.
-
+
if (not bError) then
' needed input for function: fGetProductName()
'/// Look, if we got an OpenOffice.org version ///'
gNetzOfficePath = gOfficePath
- '/// Setting the global <i>gProductName</i> variable here.
+ '/// Setting the global <i>gProductName</i> variable here.
gProductName = fGetProductName
- ' A special build of OpenOffice.org is OOo-dev; #i56804#
+ ' A special build of OpenOffice.org is OOo-dev; #i56804#
if (gProductName = "OOo-dev") then
gProductName = "OpenOffice.org"
PrintLog "This is a 'OOo-dev' product build."
@@ -1024,11 +1208,11 @@ end function
'-------------------------------------------------------------------------
function getSofficeTesttool() as string
- dim sTemp as string
-
+ dim sTemp as string
+
sTemp = ""
'/// <ol><li>Look into the current profile section of the TestTool control file </li>
- '/// deprecated, just kept here for compatibility
+ '/// deprecated, just kept here for compatibility
sTemp = GetIniValue ( gTesttoolIni, gTTProfileName, "OOoProgramDir" )
if (sTemp = "") then
'///+ <li>Look into the global section of the TestTool control file OOoProgramDir section</li></ol>
@@ -1036,7 +1220,7 @@ function getSofficeTesttool() as string
end if
' Throw error, if the default '.' from first startup is found
if fileExists(sTemp) AND NOT (sTemp = "." )then
- ' make sure path ends with path seperator
+ ' make sure path ends with path seperator
if (right(sTemp,1) <> gPathSigne) then
sTemp = sTemp + gPathSigne
end if
@@ -1060,9 +1244,9 @@ function getSofficeTesttool() as string
gOfficePath = sTemp
gNetzOfficePath = gOfficePath
'/// Setting the global <i>gProductName</i> variable here because GetSofficeNative()
- '///+ won't fill this global variable if [OOoProgramDir] is being used.
+ '///+ won't fill this global variable if [OOoProgramDir] is being used.
gProductName = fGetProductName
- ' A special build of OpenOffice.org is OOo-dev; #i56804#
+ ' A special build of OpenOffice.org is OOo-dev; #i56804#
if (gProductName = "OOo-dev") then
gProductName = "OpenOffice.org"
PrintLog "This is a 'OOo-dev' product build."
@@ -1072,9 +1256,9 @@ function getSofficeTesttool() as string
else
gOOO = FALSE
end if
- getSofficeTesttool = sTemp
+ getSofficeTesttool = sTemp
else
- '/// No valid path will return an empty string.
+ '/// No valid path will return an empty string.
getSofficeTesttool = ""
end if
end function
@@ -1155,7 +1339,7 @@ function getOfficeBasisPath as string
sTemp = gNetzOfficePath
sFile = gNetzOfficePath & "basis-link"
-
+
if FileExists( sFile ) then
if ( lcase( gPlatform ) = "osx" ) then
'MacOS X
@@ -1163,12 +1347,12 @@ function getOfficeBasisPath as string
else
if ( gPlatGroup = "unx" ) then
'Unixes
- sPath = getLinkDestination( sFile )
- sTemp = fRelativeToAbsolutePath( gNetzOfficePath & sPath )
- if ( NOT FileExists( sTemp ) ) then
+ sPath = getLinkDestination( sFile )
+ sTemp = fRelativeToAbsolutePath( gNetzOfficePath & sPath )
+ if ( NOT FileExists( sTemp ) ) then
sTemp = fRelativeToAbsolutePath( sPath )
- endif
-
+ endif
+
else
'all other platforms are Windows/DOS style
ListRead( lTemp, sFile )
@@ -1181,7 +1365,7 @@ function getOfficeBasisPath as string
else
warnlog( CFN & "Basis-link could not be found" )
endif
-
+
if ( NOT FileExists( sTemp ) ) then
warnlog( CFN & "Retrieved invalid path" )
endif
diff --git a/testautomation/global/system/includes/inivalue.inc b/testautomation/global/system/includes/inivalue.inc
index e73aa240fef5..cf70fa365f7e 100644
--- a/testautomation/global/system/includes/inivalue.inc
+++ b/testautomation/global/system/includes/inivalue.inc
@@ -37,243 +37,200 @@
' #1 SetIniValue2 ' subroutine for SetIniValue
' #1 ChangeExt ' change the extension of an file
' #1 AnhaengenAnDatei ' add a string into a file
-' #1 DateiSperren ' set the hidden flag for file
-' #1 DateiFreigeben ' reset the hidden flag for file
'*
'\****************************************************************
function GetIniValue ( Datei$, Gruppe$, Variable$ ) as String
-'/// wrapper for GetIniValue2 ///'
-'///+ reads a value from an ini-file ///'
-'///+ INPUT : name of ini-file; name of group (the one in braces []); the item (left of '=') ///'
-'///+ OUTPUT: value (the right of the '=') ///'
- if Dir(Datei$) = "" then
- Warnlog "Error in GetIniValue(...):" + Datei$ + " not found"
- exit function
- end if
-
- GetIniValue = GetIniValue2( Datei$, Gruppe$, Variable$ ) ' Arbeiten
+ '/// wrapper for GetIniValue2 ///'
+ '///+ reads a value from an ini-file ///'
+ '///+ INPUT : name of ini-file; name of group (the one in braces []); the item (left of '=') ///'
+ '///+ OUTPUT: value (the right of the '=') ///'
+ if Dir(Datei$) = "" then
+ Warnlog "Error in GetIniValue(...):" + Datei$ + " not found"
+ exit function
+ end if
+
+ GetIniValue = GetIniValue2( Datei$, Gruppe$, Variable$ ) ' Arbeiten
end function
function SetIniValue( Datei$, Gruppe$, Variable$, Value$ ) as String
-'/// wrapper for SetIniValue2 ///'
-'///+ writes a value to an ini-file ///'
-'///+ INPUT : name of ini-file; name of group (the one in braces []); the item (left of '='); value (the right of the '=') ///'
-'///+ OUTPUT: - ///'
- Dim FileNum as Integer
-
- if Dir(Datei$) = "" then
- WarnLog "Error in SetIniValue(...):" + Datei$ + " not found. File will be created now!"
- FileNum = FreeFile
- Open Datei$ For Output As #FileNum ' make empty file
- Print #FileNum, ""
- Close #FileNum
- end if
-
- SetIniValue = SetIniValue2( Datei$, Gruppe$, Variable$, Value$ )
+ '/// wrapper for SetIniValue2 ///'
+ '///+ writes a value to an ini-file ///'
+ '///+ INPUT : name of ini-file; name of group (the one in braces []); the item (left of '='); value (the right of the '=') ///'
+ '///+ OUTPUT: - ///'
+ Dim FileNum as Integer
+
+ if Dir(Datei$) = "" then
+ WarnLog "Error in SetIniValue(...):" + Datei$ + " not found. File will be created now!"
+ FileNum = FreeFile
+ Open Datei$ For Output As #FileNum ' make empty file
+ Print #FileNum, ""
+ Close #FileNum
+ end if
+
+ SetIniValue = SetIniValue2( Datei$, Gruppe$, Variable$, Value$ )
end function
function GetIniValue2( Datei$, Gruppe$, Variable$ ) as String
-'/// see the wrapper for it : GetIniValue ///'
- Dim FileNum% : Dim GruppeOK% : Dim Pos% : Dim IniZeile$ : Dim IniZeile2$
-
- FileNum% = FreeFile
-
- GruppeOK%=FALSE
-
- GetIniValue2 = ""
-
- Open Datei$ For Input As #FileNum%
- do until EOF(#FileNum%) = True
- Line input #FileNum%, IniZeile$
-
- IniZeile$ = TRIM(IniZeile$)
- iniZeile2$ = UCASE( IniZeile$ ) ' compare case insensitive
- if GruppeOK% = FALSE then ' still no group
- if IniZeile2$= "[" + UCASE( Gruppe$ ) + "]" then 'Is it the wanted group?
- GruppeOK% = TRUE
- end if
- else
- If Left(IniZeile2$, 1) = "[" then 'sadly new group - goodby
- Exit do
- else
- Pos% = Instr( IniZeile2$, "=" ) 'is the item valid?
- if Pos%>0 then ' '=' not found
- if Left( IniZeile2$ , Pos%-1 ) = UCASE( Variable$ ) then 'compare leftvalue
- GetIniValue2 = Trim(Mid$( IniZeile$ , Pos%+ 1 )) 'return part right of '=' : with initial case
- exit do
- end if
- end if
- end if
- end if
-
- loop
-
- Close #FileNum%
- wait 1000
-end function
-
-
-sub SetIniValue2( Datei$, Gruppe$, Variable$, Value$ ) as String
-'/// see the wrapper for it : SetIniValue ///'
- Dim DateiBak$ : Dim D$ : Dim IniZeile$ : Dim IniZeile2$
- Dim FileBak% : Dim GruppeOK% : Dim Gefunden% : Dim FileNum% : Dim Pos%
+ '/// see the wrapper for it : GetIniValue ///'
+ Dim FileNum% : Dim GruppeOK% : Dim Pos% : Dim IniZeile$ : Dim IniZeile2$
-' rename
- DateiBak$ = ChangeExt( Datei$, "BAK" )
+ FileNum% = FreeFile
- GruppeOK% = FALSE
- Gefunden% = FALSE
+ GruppeOK%=FALSE
- if Dir(DateiBak$)<>"" then
- kill DateiBak$
- end if
+ GetIniValue2 = ""
- if Dir( Datei$ )<>"" then
- D$ = CurDir
- name Datei$ as DateiBak$
- else
- FileNum% = FreeFile
- Open Datei$ For Output As #FileNum%
- Print #FileNum%, "[" + Trim(Gruppe$) + "]"
- Print #FileNum%, Variable$ + "=" + Trim(Value$)
- Close #FileNum% ' finished here
- Exit sub
- endif
+ Open Datei$ For Input As #FileNum%
+ do until EOF(#FileNum%) = True
+ Line input #FileNum%, IniZeile$
- FileNum% = FreeFile
- Open Datei$ For Output As #FileNum%
-
- FileBak% = FreeFile
- Open DateiBak$ For Input As #FileBak%
-
- do until EOF(#FileBak%) = True
-
- Line input #FileBak%, IniZeile$
+ IniZeile$ = TRIM(IniZeile$)
+ iniZeile2$ = UCASE( IniZeile$ ) ' compare case insensitive
+ if GruppeOK% = FALSE then ' still no group
+ if IniZeile2$= "[" + UCASE( Gruppe$ ) + "]" then 'Is it the wanted group?
+ GruppeOK% = TRUE
+ end if
+ else
+ If Left(IniZeile2$, 1) = "[" then 'sadly new group - goodby
+ Exit do
+ else
+ Pos% = Instr( IniZeile2$, "=" ) 'is the item valid?
+ if Pos%>0 then ' '=' not found
+ if Left( IniZeile2$ , Pos%-1 ) = UCASE( Variable$ ) then 'compare leftvalue
+ GetIniValue2 = Trim(Mid$( IniZeile$ , Pos%+ 1 )) 'return part right of '=' : with initial case
+ exit do
+ end if
+ end if
+ end if
+ end if
- IniZeile$ = TRIM(IniZeile$)
+ loop
- if IniZeile$ <> "" then
+ Close #FileNum%
+ wait 1000
+end function
- IniZeile2$ = UCASE( IniZeile$ )
- if Left(IniZeile$, 1) = "[" then
- if GruppeOK% = TRUE then 'groupchange
- if Gefunden%=FALSE then
- Print #FileNum%, Variable$ + "=" + Trim(Value$)
- Gefunden% = TRUE
- end if
- GruppeOK% = FALSE
- end if
- Print #FileNum%, "" 'empty line
- Print #FileNum%, IniZeile$
- if IniZeile2$= "[" + UCASE( Gruppe$ ) + "]" then
- GruppeOK% = TRUE
- end if
- else
- if GruppeOK% = TRUE then ' found group
-
- Pos% = Instr( IniZeile$, "=" )
- if Left( IniZeile2$ , Pos%-1 ) = UCASE( Variable$ ) then
- IniZeile$ = Left( IniZeile$ , Pos% ) +Trim( Value$ )' after the '='
- Gefunden% = TRUE
- end if
+sub SetIniValue2( Datei$, Gruppe$, Variable$, Value$ ) as String
+ '/// see the wrapper for it : SetIniValue ///'
+ Dim DateiBak$ : Dim D$ : Dim IniZeile$ : Dim IniZeile2$
+ Dim FileBak% : Dim GruppeOK% : Dim Gefunden% : Dim FileNum% : Dim Pos%
+
+ ' rename
+ DateiBak$ = ChangeExt( Datei$, "BAK" )
+
+ GruppeOK% = FALSE
+ Gefunden% = FALSE
+
+ if Dir(DateiBak$)<>"" then
+ kill DateiBak$
+ end if
+
+ if Dir( Datei$ )<>"" then
+ D$ = CurDir
+ name Datei$ as DateiBak$
+ else
+ FileNum% = FreeFile
+ Open Datei$ For Output As #FileNum%
+ Print #FileNum%, "[" + Trim(Gruppe$) + "]"
+ Print #FileNum%, Variable$ + "=" + Trim(Value$)
+ Close #FileNum% ' finished here
+ Exit sub
+ endif
+
+ FileNum% = FreeFile
+ Open Datei$ For Output As #FileNum%
+
+ FileBak% = FreeFile
+ Open DateiBak$ For Input As #FileBak%
+
+ do until EOF(#FileBak%) = True
+
+ Line input #FileBak%, IniZeile$
+
+ IniZeile$ = TRIM(IniZeile$)
+
+ if IniZeile$ <> "" then
+
+ IniZeile2$ = UCASE( IniZeile$ )
+
+ if Left(IniZeile$, 1) = "[" then
+ if GruppeOK% = TRUE then 'groupchange
+ if Gefunden%=FALSE then
+ Print #FileNum%, Variable$ + "=" + Trim(Value$)
+ Gefunden% = TRUE
+ end if
+ GruppeOK% = FALSE
+ end if
+ Print #FileNum%, "" 'empty line
+ Print #FileNum%, IniZeile$
+ if IniZeile2$= "[" + UCASE( Gruppe$ ) + "]" then
+ GruppeOK% = TRUE
+ end if
+ else
+ if GruppeOK% = TRUE then ' found group
+
+ Pos% = Instr( IniZeile$, "=" )
+ if Left( IniZeile2$ , Pos%-1 ) = UCASE( Variable$ ) then
+ IniZeile$ = Left( IniZeile$ , Pos% ) +Trim( Value$ )' after the '='
+ Gefunden% = TRUE
+ end if
+ end if
+ Print #FileNum%, IniZeile$
end if
- Print #FileNum%, IniZeile$
- end if
- end if
+ end if
- loop
+ loop
- if Gefunden% = FALSE then
- ' set new group and value
- if GruppeOK%=FALSE then
- Print #FileNum%, ""
- Print #FileNum%, "[" + Trim(Gruppe$) + "]"
- end if
- Print #FileNum%, Variable$ + "=" + Value$
- end if
+ if Gefunden% = FALSE then
+ ' set new group and value
+ if GruppeOK%=FALSE then
+ Print #FileNum%, ""
+ Print #FileNum%, "[" + Trim(Gruppe$) + "]"
+ end if
+ Print #FileNum%, Variable$ + "=" + Value$
+ end if
- Close #FileNum%
- Close #FileBak%
+ Close #FileNum%
+ Close #FileBak%
- wait 1000
+ wait 1000
end sub
sub AnhaengenAnDatei ( Datei as String, Texte as String )
-'/// append a string at the end of the file ///'
-'///+ INPUT : filename; string///'
-'///+ OUTPUT: - ///'
- Dim FileNum%
+ '/// append a string at the end of the file ///'
+ '///+ INPUT : filename; string///'
+ '///+ OUTPUT: - ///'
+ Dim FileNum%
- FileNum% = FreeFile
- Open Datei for Append as #FileNum%
+ FileNum% = FreeFile
+ Open Datei for Append as #FileNum%
- Print #FileNum%, Texte
- Close #FileNum%
+ Print #FileNum%, Texte
+ Close #FileNum%
end sub
function ChangeExt( Datei$, Ext$ )as String
-'/// change the extension of a file ///'
-'///+ INPUT : filename; extension ///'
-'///+ OUTPUT: - ///'
- Dim i%
-
- i% = InStr( Right(Datei$, 4 ) , "." )
- if Ext$<>"" then
- if i%=0 then
- ChangeExt = Datei$ +"."+Ext$
- else
- ChangeExt = Left( Datei$, Len(Datei$)-4+i% ) + Ext$
- end if
-
- elseif i%<>0 then
- ChangeExt = Left( Datei$, Len(Datei$)-5+i% )
- end if
+ '/// change the extension of a file ///'
+ '///+ INPUT : filename; extension ///'
+ '///+ OUTPUT: - ///'
+ Dim i%
+
+ i% = InStr( Right(Datei$, 4 ) , "." )
+ if Ext$<>"" then
+ if i%=0 then
+ ChangeExt = Datei$ +"."+Ext$
+ else
+ ChangeExt = Left( Datei$, Len(Datei$)-4+i% ) + Ext$
+ end if
+
+ elseif i%<>0 then
+ ChangeExt = Left( Datei$, Len(Datei$)-5+i% )
+ end if
end function
-sub DateiSperren( Datei$ )
-'/// set the hidden flag of a file; lock the file ///'
-'///+ INPUT : filename ///'
-'///+ OUTPUT: - ///'
- Dim i%
-
- if hFileExists ( Datei$ ) <> TRUE then
- Warnlog "File '" + Datei$ + "' doesn't exist; exiting now!"
- exit sub
- end if
-
- i% = GetAttr( Datei$ )
- do while (i% AND 2) = 2 ' is file already locked?
- Wait( int( 400 * Rnd + 5 )
- i% = GetAttr( Datei$ )
- loop
- SetAttr( Datei$ , i% OR 2 ) ' Lock
-
- exit sub
-
-end sub
-
-sub DateiFreigeben( Datei$ )
-'/// reset the hidden flag of a file; release the file ///'
-'///+ INPUT : filename ///'
-'///+ OUTPUT: - ///'
- Dim i%
-
- if hFileExists ( Datei$ ) <> TRUE then
- Warnlog "File '" + Datei$ + "' doesn't exist; exiting now!"
- exit sub
- end if
-
- i% = GetAttr( Datei$ )
- SetAttr( Datei$ , i% AND NOT 2 ) ' release
- exit sub
-
-end Sub
-
-
-
diff --git a/testautomation/global/system/includes/master.inc b/testautomation/global/system/includes/master.inc
index 9e693eea445e..fafb5f758a85 100755
--- a/testautomation/global/system/includes/master.inc
+++ b/testautomation/global/system/includes/master.inc
@@ -70,6 +70,8 @@ sub GetUseFiles
gTestcaseStart = Now() ' get start time of test preparation phase
+ GVERBOSE = FALSE ' global switch to make some functions more talkative for profiling purposes
+
use "global\system\includes\sysinfo.inc" '///+ sysinfo.inc : routines to get all system informations
use "global\system\includes\inivalue.inc" '///+ inivalue.inc : routines to work with ini-files
use "global\system\includes\iniinfo.inc" '///+ iniinfo.inc : routines to get all informations about OpenOffice.org
@@ -281,7 +283,6 @@ end sub
sub LoadGlobalIncludeFiles
'///Load all important global files.
use "global\tools\includes\required\t_dir.inc" '///+<li><b>t_dir</b>: Routines to parse directories (methods execute on the office side)</li>
- use "global\tools\includes\required\t_dirloc.inc" '///+<li><b>t_dirloc</b>: Routines to parse directories (execute on the testtool side)</li>
use "global\tools\includes\required\t_doc1.inc" '///+<li><b>t_doc1</b>: Global routines to work on office documents (I)</li>
use "global\tools\includes\required\t_doc2.inc" '///+<li><b>t_doc2</b>: Global routines to work on office documents (II)</li>
use "global\tools\includes\required\t_files.inc" '///+<ul><li><b>t_files</b>: Routines to open/save/print files</li>
@@ -314,9 +315,7 @@ sub FirstOfficeStart
'Needs to get executed everytime after a 'ResetApplication' command
catchGPF false
' Recover to backingwindow, until resetApplication can handle this
- for i = 1 to getDocumentCount
- hCloseDocument()
- next i
+ hFileCloseAll()
end sub
'-------------------------------------------------------------------------
@@ -334,7 +333,7 @@ sub hStartTheOffice (optional sProfPath as String, optional sProfParameter as St
sErrorInformation = "global::systen::inc::master.inc:hStartTheOffice: "
- if gPlatform = lcase("osx") then
+ if lcase( gPlatform ) = "osx" then
sPlatformProgramPath = "MacOS"
else
sPlatformProgramPath = "program"
@@ -533,11 +532,11 @@ sub ExitRestartTheOffice (optional sProfPath as String, optional sProfParameter
catch
endcatch
'Disable Quickstarter internaly
- hDisableQuickstarterAPI
+ hDisableQuickstarterAPI
+
' Recover to backingwindow, until resetApplication can handle this
- for i = 1 to getDocumentCount
- hCloseDocument()
- next i
+ hFileCloseAll()
+
end sub
'-------------------------------------------------------------------------
@@ -671,15 +670,7 @@ sub PleaseRecover (sWhat as String)
Kontext
' Recover to backingwindow, until resetApplication can handle this
- a = getDocumentCount
- for i = 1 to a
- qaErrorLog "Needed to close window: (" + i + "/"+a+") on " + sWhat
- hCloseDocument()
- next i
- a = getDocumentCount
- if a > 0 then
- warnlog "Failed to close window; There are still open: " + a
- endif
+ hFileCloseAll()
end sub
'-------------------------------------------------------------------------
@@ -1144,7 +1135,7 @@ sub sStartUpOffice (optional sProfPath as String, optional sProfParameter as Str
' Set a valid URE_BOOTSTRAP path for soffice, else the invalid one from this testtool instance
' will get used i86718 - would result in a message about vcl stuff and a not starting soffice
- if gPlatform = lcase("osx") then
+ if lcase( gPlatform ) = "osx" then
sPlatformProgramPath = "MacOS"
sPlatformBinExt = "rc"
else
diff --git a/testautomation/global/tools/compressstatus.bas b/testautomation/global/tools/compressstatus.bas
index aa469847b5ba..b8ed46d3b3f5 100755
--- a/testautomation/global/tools/compressstatus.bas
+++ b/testautomation/global/tools/compressstatus.bas
@@ -142,7 +142,7 @@ function fZip(sDirectory as string, sZipFileName as string) as integer
oInfo.Attributes = 0
' get all files in a directory
- getFileNameListLocal (sDirectory+"/","*.txt",lsFile())
+ getFileNameList (sDirectory+"/","*.txt",lsFile())
printlog "Going to zip Directory: '" + sDirectory + "'"
for i = 1 to listCount(lsFile())
printlog "Going to add: " + i + ": '" + lsFile(i) + "'"
diff --git a/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc b/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc
index c13cb2ac1a04..9e1344c67bf1 100644
--- a/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc
@@ -38,12 +38,12 @@ function hShowMacroControls() as boolean
'///<ul>
const CFN = "hShowMacroControls::"
- printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
'///+<li>Test whether the ToolsCollectionBar is already open. If yes, exit directly</li>
kontext "ToolsCollectionBar"
if ( ToolsCollectionBar.exists( 3 ) ) then
- printlog( CFN & "Exit: ToolsCollectionBar is already open." )
+ printlog( CFN & "ToolsCollectionBar is already open." )
hShowMacroControls() = true
exit function
endif
@@ -66,23 +66,19 @@ function hShowMacroControls() as boolean
'///+<li>Move it to the upper left corner at pos 50/50</li>
ToolsCollectionBar.Move ( 50 , 50 )
- printlog( CFN & "Exit: ToolsCollectionBar is open and has been placed" )
+ printlog( CFN & "ToolsCollectionBar is open and has been placed" )
hShowMacroControls() = true
- exit function
else
- printlog( CFN & "Exit: ToolsCollectionBar is not available. Aborting." )
+ printlog( CFN & "ToolsCollectionBar is not available. Aborting." )
hShowMacroControls() = false
- exit function
endif
catch
- printlog( CFN & "Exit: The Controls-Button is not enabled. Aborting." )
+ printlog( CFN & "The Controls-Button is not enabled. Aborting." )
hShowMacroControls() = false
- exit function
endcatch
else
- printlog( CFN & "Exit: The Dialog Bar is not available. Aborting." )
+ printlog( CFN & "The Dialog Bar is not available. Aborting." )
hShowMacroControls() = false
- exit function
endif
'///</ul>
@@ -94,22 +90,10 @@ function hGetBasicWorkFile( cMajorID as string ) as string
'///<h3>Retrieve a filename, depending on gApplication and Build-ID</h3>
'///<i>Structure: work-directory/basic[.suffix]</i>
- '///<ul>
-
const CFN = "hGetBasicWorkFile::"
-
- dim sFile as string
-
- '///+<li>Build a path and a filename (path from UNO, Suffix from global-module)</li>
- sFile = hGetWorkPath() & "basic" & hGetSuffix( cMajorId )
- sFile = ConvertPath( sFile )
-
+ dim sFile as string : sFile = hGetWorkPath() & "basic" & hGetSuffix( cMajorId )
printlog( CFN & sFile & " for " & gApplication & " (" & cMajorID & ")" )
-
- '///+<li>Return the path as string</li>
- hGetBasicWorkFile() = convertpath( sFile )
-
- '///</ul>
+ hGetBasicWorkFile() = sFile
end function
@@ -119,31 +103,31 @@ function hOpenBasicIDE() as boolean
'///<h3>Open the Basic IDE for the last module listed in the Macro Organizer</h3>
'///<i>Starting point: Basic Macro Organizer has focus</i>
- '///<ul>
const CFN = "hOpenBasicIDE::"
+ const BUTTON_TIMEOUT = -1
- '///+<li>Select the last module in the treelist, verify that it can be edited</li>
- hSelectTheLastModule( true )
-
- '///+<li>Click the Edit-button</li>
- Bearbeiten.click()
-
- '///+<li>Maximize the Basic IDE (required to ensure proper operation of mousemovements)</li>
- sleep( 2 )
- kontext "BasicIde"
- BasicIde.maximize()
+ if ( hSelectTheLastModule( true ) ) then
- '///+<li>Verify that the Basic IDE is open, return TRUE on success</li>
- if ( BasicIde.exists() ) then
- printlog( CFN & "Open Basic-IDE for existing module: success" )
- hOpenBasicIDE() = true
+ if ( hClickButton( Bearbeiten) <> BUTTON_TIMEOUT ) then
+
+ kontext "BASICIDE"
+ if ( BasicIDE.exists( 2 ) ) then
+ printlog( "Basic IDE is open" )
+ BasicIDE.maximize()
+ hOpenBasicIDE() = true
+ else
+ warnlog( CFN & "Failed to open BASIC IDE" )
+ hOpenBasicIDE() = false
+ endif
+ else
+ warnlog( CFN & "Edit button is not enabled, cannot open BASIC IDE"
+ hOpenBasicIDE() = false
+ endif
else
- printlog( CFN & "Open Basic-IDE for existing module: failure" )
- hOpenBasicIDE() = false
+ warnlog( CFN & "Unable to select the last module" )
+ hOpenBasicIDE() = false
endif
-
- '///</ul>
end function
@@ -151,32 +135,10 @@ end function
function hCloseBasicIDE() as boolean
- '///<h3>Close the BASIC-IDE with best effort verification</h3>
- '///<i>Starting point: Basic IDE is open and has the focus</i>
- '///<ol>
- '///+<li>File-menu</li>
- '///+<li>Slot FileClose</li>
- '///+<li>hCloseDocument()/hDestroyDocument()</li>
- '///</ol>
- '///<ul>
-
- use "global\tools\includes\optional\t_docfuncs.inc"
-
- const CFN = "hCloseBasicIDE::"
- dim brc as boolean
-
- '///+<li>Close the macro controls float</li>
+ '///<h3>Close the BASIC-IDE</h3>
hCloseCollectionBar()
-
- '///+<li>Try to close the current document</li>
- brc = hDestroyDocument()
- if ( brc ) then
- hCloseBasicIDE() = true
- else
- hCloseBasicIDE() = false
- qaerrorlog( "#i54135# Failed to close BASIC IDE" )
- endif
- '///</ul>
+ kontext "BasicIDE"
+ hCloseBasicIDE() = hDestroyDocument()
end function
@@ -186,36 +148,31 @@ function hReOpenBasicDialog() as boolean
'///<h3>Open BASIC-IDE after loading a workfile with documentbound macro</h3>
'///<i>Starting point: Focus on document containing at least one macro</i><br>
- '///<i>IMPORTANT: Errorhandling is incomplete, test may end up in undefined state</i>
- '///<ul>
+ const CFN = "hReopenBasicDialog: "
+ const BUTTON_TIMEOUT = -1
- dim brc as boolean
+ if ( hSelectTheLastModule( true ) ) then
- '///+<li>open the macro dialog, select the last module</li>
- brc = hSelectTheLastModule( true )
- if ( not brc ) then
- warnlog( "Could not open the last module for editing." )
- hReOpenBasicDialog() = false
- exit function
- endif
+ if ( hClickButton( Bearbeiten ) <> BUTTON_TIMEOUT ) then
- '///+<li>edit the module</li>
- Bearbeiten.Click()
+ kontext "BasicIDE"
+ BasicIde.maximize()
- '///+<li>find the dialog window.</li>
- kontext "BasicIDE"
- BasicIde.maximize()
-
- brc = hFindFirstDialog()
- if ( not brc ) then
- warnlog( "Could not find any dialog" )
- hReOpenBasicDialog() = false
+ if ( hFindFirstDialog() ) then
+ printlog( "BASIC IDE is open." )
+ hReOpenBasicDialog() = true
+ else
+ warnlog( CFN & "Could not find any dialog" )
+ hReOpenBasicDialog() = false
+ endif
+ else
+ warnlog( CFN & "Unable to click Edit button, BASIC IDE not open" )
+ hReOpenBasicDialog() = false
+ endif
else
- hReOpenBasicDialog() = true
+ warnlog( CFN & "Could not open the last module for editing." )
+ hReOpenBasicDialog() = false
endif
-
- '///+<li>Return TRUE on success, FALSE on failure</li>
- '///</ul>
end function
@@ -227,39 +184,34 @@ function hFindFirstDialog() as boolean
'///<i>Starting point: Basic IDE must be open and has the focus</i>
'///<ul>
- dim iPosOverTabbar as integer
- dim brc as boolean
const CFN = "hFindFirstDialog::"
+ const REPEAT_COUNT = 5 ' number of times to send a keystroke to BASIC IDE
+ const PROBE_STEPPING = 5
+ const VERTICALLY_CENTERED = 50
+ const MAX_NUMBER_OF_RETRIES = 20
+
+ dim iPosOverTabbar as integer
+ hFindFirstDialog() = false
'///+<li>Set focus to Basic IDE, maximize it</li>
kontext "BasicIde"
BasicIde.maximize()
-
- brc = false
'///+<li>move pointer over the tabbar and click until a dialog opens (hopefully)</li>
- for iPosOverTabbar = 1 to 20
+ for iPosOverTabbar = 1 to MAX_NUMBER_OF_RETRIES
- Tabbar.MouseDown ( 5 * iPosOverTabbar , 50 )
- Tabbar.MouseUp ( 5 * iPosOverTabbar , 50 )
+ BASICIDE.typeKeys( "<MOD1 PAGEUP>" )
if ( DialogWindow.Exists() ) then
- brc = true
- DialogWindow.typeKeys( "<up>", 5 )
+ printlog( "BASIC Dialog window found" )
+ hFindFirstDialog() = true
+ DialogWindow.typeKeys( "<UP><LEFT>" , REPEAT_COUNT )
exit for
endif
next iPosOverTabbar
-
- '///+<li>Return TRUE on success, FALSE on failure</li>
- if ( brc ) then
- printlog( CFN & "Found dialog" )
- else
- printlog( CFN & "Could not find the first dialog via tabbar" )
- endif
- hFindFirstDialog() = brc
- '///</ul>
+ '///</ul>
end function
@@ -269,27 +221,19 @@ function hSelectDialogPane() as boolean
'///<h3>Select the dialog pane in the Basic dialog editor</h3>
'///<i>Starting point: Basic dialog editor is open and has the focus</i>
- '///<ul>
-
const CFN = "hSelectDialogPane::"
- printlog( CFN & "Enter" )
+ const UP_LEFT = 10
+ const DOWN_RIGHT = 90
+
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
- '///+<li>Select background dialog by rubberband</li>
kontext "BasicIDE"
+ DialogWindow.mouseDown( DOWN_RIGHT , DOWN_RIGHT )
+ DialogWindow.mouseMove( UP_LEFT , UP_LEFT )
+ DialogWindow.mouseUp ( UP_LEFT , UP_LEFT )
- '///+<li>Set the mousepointer down at 90/90</li>
- DialogWindow.mouseDown( 90 , 90 )
-
- '///+<li>Move it to 10/10</li>
- DialogWindow.mouseMove( 10 , 10 )
-
- '///+<li>Release the mouse pointer at 10/10</li>
- DialogWindow.mouseUp ( 10 , 10 )
-
- '///+<li>Return TRUE, currently no verification is implemented</li>
- printlog( CFN & "Exit: Selected dialog pane (not verified)" )
+ printlog( CFN & "Selected dialog pane (not verified)" )
hSelectDialogPane() = true
- '///</ul>
end function
@@ -297,33 +241,23 @@ end function
function hCloseCollectionBar() as boolean
- '///<h3>Close the ToolsCollectionBar (Macro Controls Float)</h3>
- '///<i>Starting point: Basic Dialog editor is open, ToolsCollectionBar is open</i>
- '///<ul>
-
- const CFN = "hCloseCollectionBar::"
- const RETRIES = 3
-
- dim iTry as integer
- iTry = 0
-
- '///+<li>Try to close the ToolsCollectionBar max 3 times</li>
+ const CFN = "hCloseCollectionBar(): "
+
kontext "ToolsCollectionBar"
- while ( ToolsCollectionBar.exists( 1 ) )
- iTry = iTry + 1
- printlog( CFN & "Closing ToolsCollectionBar..." )
- ToolsCollectionBar.close()
-
- if ( iTry = RETRIES ) then
- printlog( CFN & "Failed to close ToolsCollectionBar" )
+ if ( ToolsCollectionBar.exists() ) then
+
+ if ( hCloseDialog( ToolsCollectionBar, "close" ) ) then
+ printlog( "Closed Macro Controls Float" )
+ hCloseCollectionBar() = true
+ else
+ warnlog( CFN & "Failed to close Macro Controls Float" )
hCloseCollectionBar() = false
- exit function
endif
- wend
+ else
+ printlog( "Macro Controls Float not open" )
+ hCloseCollectionBar() = true
+ endif
- hCloseCollectionBar() = true
- '///</ul>
-
end function
'*******************************************************************************
@@ -332,49 +266,15 @@ function hDeleteMacro() as boolean
'///<h3>Delete all text in the Basic IDE editor</h3>
'///<i>Starting point: Basic IDE is open, has focus, code can be edited</i>
- '///<ul>
-
- use "global\tools\includes\optional\t_accels.inc"
-
- '///+<li>Verify all prerequisites are met (BasicIDE must be open)</li>
+ const TIMEOUT = -1
kontext "BasicIDE"
- if ( not BasicIde.exists() ) then
- warnlog( "hDeleteMacro::BasicIDE is not visible/active. Aborting" )
- hDeleteMacro() = false
- exit function
- endif
-
- dim brc as boolean
-
- '///+<li>get the languagespecific accelerator for "Edit->Select All"</li>
- dim cAccelerator as string
- cAccelerator = hGetAccel( "SelectAll" )
-
- printlog( "hDeleteMacro::Using Accel: " & cAccelerator )
-
- ' Common for all actions is that we delete the existing macro before
- ' inserting the new one. This fails if the accelerator for SelectAll
- ' is incorrect, we try to recover by doing this manually then.
- '///+<li>Delete the entire content of the Basic IDE editor</li>
- EditWindow.TypeKeys( cAccelerator )
- EditWindow.TypeKeys( "<Delete>" )
-
- ' Verify that the EditWindow is empty, if not use a method that
- ' should work for all languages/locales
- '///+<li>Verify that the editor window is indeed empty</li>
- brc = hIsEditWindowEmpty()
- if ( not brc ) then
- qaerrorlog( "#i52430# hDeleteMacro::Accelerator " & cAccelerator & " failed" )
- printlog( "hDeleteMacro::Trying alternative method" )
- EditWindow.TypeKeys( "<Mod1 Home>" )
- EditWindow.TypeKeys( "<Mod1 Shift End>" )
- EditWindow.TypeKeys( "<Delete>" )
- brc = hIsEditWindowEmpty()
+ if ( hUseAsyncSlot( "EditSelectAll" ) = TIMEOUT ) then
+ qaerrorlog( "<EditSelectAll> is not enabled in BASIC IDE" )
+ BasicIDE.typeKeys( "<MOD1 HOME>" )
+ BasicIDE.typeKeys( "<MOD1 SHIFT END>" )
endif
-
- '///+<li>Return TRUE on success, FALSE on failure</li>
- hDeleteMacro() = brc
- '///</ul>
+ BasicIDE.typeKeys( "<DELETE>" )
+ hDeleteMacro() = hIsEditWindowEmpty()
end function
@@ -384,38 +284,21 @@ function hIsEditWindowEmpty() as boolean
'///<h3>Test if the Basic-EditWindow is empty</h3>
'///<i>Starting point: Basic IDE editor is open and has the focus</i>
- '///<ul>
-
- '///+<li>Verify that prerequisites are met: Basic IDE must be open</li>
- kontext "BasicIDE"
- if ( not BasicIDE.exists() ) then
- warnlog( "hIsEditWindowEmpty::BasicIde is not open/visible" )
- hIsEditWindowEmpty() = false
- exit function
- endif
+ const CFN = "hIsEditWindowEmpty(): "
+ const SLOT_TIMEOUT = -1
- '///+<li>Verify that the EditWindow is empty. EditCopy is disabled when empty</li>
- EditWindow.TypeKeys( "<Mod1 Home>" )
- EditWindow.TypeKeys( "<Mod1 Shift End>" )
- try
- EditCopy
- printlog( "EditCopy should be enabled for empty Basic IDE editor" )
- catch
- setClipboard( "" )
- endcatch
+ SetClipboard( "" )
+ hUseAsyncSlot( "EditSelectAll" )
+ hUseAsyncSlot( "EditCopy" )
- if ( getClipBoardText() <> "" ) then
- hIsEditWindowEmpty() = false
- printlog( "hIsEditWindowEmpty::no - content follows:" )
- printlog( GetClipboardText )
- else
+ if ( GetClipBoardText() = "" ) then
hIsEditWindowEmpty() = true
- printlog( "hIsEditWindowEmpty::yes" )
+ else
+ warnlog( CFN & "Edit window is not empty" )
+ printlog( GetClipboardText )
+ hIsEditWindowEmpty() = false
endif
- '///+<li>Return TRUE on success, FALSE on failure</li>
- '///</ul>
-
end function
'*******************************************************************************
@@ -434,13 +317,16 @@ function hRenameTab( cTabName as string ) as integer
'///Description
'///<ul>
- const CFN = "hRenameTab::"
+ const CFN = "hRenameTab(): "
+ const RETVAL_SUCCESS = 0
+ const RETVAL_UNKNOWN_MESSAGE = 1
+ const RETVAL_UNKNOWN_ERROR = 2
+ const RETVAL_NO_CONTEXT_MENU = 3
dim cString as string
dim iWait as integer
dim iTry as integer
- dim brc as boolean
- brc = false
+ dim brc as boolean : brc = false
cString = "<HOME><SHIFT END>" & cTabName & "<RETURN>"
kontext "basicide"
@@ -449,7 +335,7 @@ function hRenameTab( cTabName as string ) as integer
for iTry = 1 to 5
try
kontext "basicide"
- Tabbar.OpenContextMenu
+ Tabbar.OpenContextMenu
hMenuSelectNr( 3 )
sleep( 2 )
brc = true
@@ -461,7 +347,7 @@ function hRenameTab( cTabName as string ) as integer
'///+<li>Select to rename the tab</li>
if ( not brc ) then
warnlog( CFN & "Unable to access Context Menu" )
- hRenameTab() = 3
+ hRenameTab() = RETVAL_NO_CONTEXT_MENU
exit function
endif
@@ -469,20 +355,19 @@ function hRenameTab( cTabName as string ) as integer
'///+<li>Overwrite the old name of the tab</li>
kontext "basicide"
Tabbar.TypeKeys( cString , true )
- hRenameTab() = 0
+ hRenameTab() = RETVAL_SUCCESS
printlog( CFN & "Tab renamed: " & cTabName )
catch
'///+<li>Handle possible errors</li>
- hRenameTab() = 2
+ hRenameTab() = RETVAL_UNKNOWN_ERROR
warnlog( CFN & "Failed to rename tab: " & cTabName )
exit function
endcatch
kontext "active"
for iWait = 1 to 3
- sleep( 1 )
- if ( active.exists() ) then
- hRenameTab() = 1
+ if ( active.exists( 1 ) ) then
+ hRenameTab() = RETVAL_UNKNOWN_MESSAGE
printlog( CFN & "Invalid name for tab: Warning is displayed" )
exit for
endif
@@ -549,10 +434,10 @@ function hNewDialog() as boolean
if ( DialogWindow.Exists() ) then
printlog( CFN & "New dialog is open" )
hNewDialog() = true
- if ( DialogWindow.IsMax() = false ) then
- DialogWindow.Maximize()
- Wait( 2000 )
- end if
+ if ( DialogWindow.IsMax() = false ) then
+ DialogWindow.Maximize()
+ Wait( 2000 )
+ end if
else
warnlog( CFN & "New dialog is not open" )
hNewDialog() = false
@@ -643,14 +528,13 @@ function hInitFormControls( cModule as string ) as boolean
'///Description:
'///<ul>
- const CFN = "hInitFormControls::"
- dim brc as boolean
+ const CFN = "hInitFormControls::"
+ hInitFormControls() = false
'///+<li>Create and edit a new module for the current document</li>
- brc = hInitBasicIde( cModule )
- if ( not brc ) then
+
+ if ( not hInitBasicIde( cModule ) ) then
warnlog( "Could not create new module" )
hCloseBasicIde()
- hInitFormControls() = false
exit function
endif
@@ -658,20 +542,16 @@ function hInitFormControls( cModule as string ) as boolean
BasicIde.maximize()
'///+<li>Create a new dialog.</li>
- brc = hNewDialog()
- if ( not brc ) then
+ if ( not hNewDialog() ) then
warnlog( "Could not create Basic-Dialog" )
hCloseBasicIde()
- hInitFormControls() = false
exit function
endif
'///+<li>Open the macro controls float.</li>
- brc = hShowMacroControls()
- if ( not brc ) then
+ if ( not hShowMacroControls() ) then
warnlog( CFN & "Could not tear off the macro controls float" )
hCloseBasicIde()
- hInitFormControls() = false
exit function
endif
@@ -688,53 +568,33 @@ function hInitBasicIde( cModule as string ) as boolean
'///<h3>Get from a new document to the Basic IDE in one go</h3>
'///<i>Starting point: New, plain document</i>
- '///<ul>
-
- use "global\tools\includes\optional\t_basic_organizer_tools.inc"
- use "global\tools\includes\optional\t_listfuncs.inc"
const CFN = "hInitBasicIde::"
- if ( cModule = "" ) then
- warnlog( CFN & "Invalid parameter passed to function" )
- hInitBasicIde() = false
- exit function
- endif
-
- ' some multi-purpose return code
- dim brc as boolean
-
- '///+<li>Open the basic Organizer</li>
- brc = hOpenBasicOrganizerFromDoc()
- if ( not brc ) then
- warnlog( CFN & "Could not open the Basic Organizer, aborting" )
- hInitBasicIde() = false
- exit function
- endif
+ ToolsMacro_uno
- '///+<li>Create a new module for the current document</li>
- brc = hCreateModuleForDoc( cModule )
- if ( not brc ) then
- warnlog( CFN & "The Basic-IDE is not open, aborting" )
- hInitBasicIde() = false
-
- kontext "Makro"
- if ( Makro.exists() ) then
- printlog( CFN & "Closed Macro Organizer" )
- Makro.cancel()
+ kontext "Makro"
+ if ( Makro.exists( 2 ) ) then
+
+ if ( hCreateModuleForDoc( cModule ) ) then
+
+ kontext "BasicIDE"
+ if ( BasicIDE.exists( 2 ) ) then
+ BasicIDE.maximize()
+ hInitBasicIde() = true
+ else
+ warnlog( CFN & "Failed to open BASIC IDE" )
+ hInitBasicIde() = false
+ endif
+ else
+ warnlog( CFN & "Failed to create a module for the current document" )
+ hInitBasicIde() = false
endif
- exit function
+ else
+ warnlog( CFN & "Failed to open macro organizer" )
+ hInitBasicIde() = false
endif
- '///+<li>Maximize the BasicIDE</li>
- kontext "BasicIde"
- BasicIde.maximize()
-
- '///+<li>Verify that the Basic IDE is open, return TRUE on success, FASLE on failure</li>
- hInitBasicIde() = true
- '///</ul>
- '///NOTE: The function will try to to clean up after itself in case of any error
-
end function
'*******************************************************************************
@@ -746,19 +606,12 @@ function hInsertMacro( _id as integer ) as boolean
'///<ul>
const CFN = "hInsertMacro::"
- dim brc as boolean
-
- if ( ( _id < 1 ) or ( _id > 3 ) ) then
- warnlog( CFN & "Invalid parameter passed to function: " & _id )
- hInsertMacro() = false
- exit function
- endif
-
kontext "basicide"
+
+ printlog( CFN & "This function is deprecated" )
'///+<li>Delete the content of the edit window</li>
- brc = hDeleteMacro()
- if ( not brc ) then
+ if ( not hDeleteMacro() ) then
warnlog( CFN & "Content of Basic-IDE was not deleted" )
hInsertMacro() = false
exit function
@@ -803,6 +656,7 @@ function hTestMacro( _id as integer ) as integer
'///<ul>
const CFN = "hTestMacro::"
+ qaerrorlog( CFN & "This function is deprecated, remove me!" )
kontext "basicide"
@@ -843,59 +697,49 @@ end function
function hCreateBasicWorkFiles() as string
'///<H3>Create a macro, attach it to a file, save the file</H3>
- '///<i>Starting point: The first doc or any other plain document</i>
+ '///<i>Starting point: Any plain document or the backing window</i>
'///<ul>
const CFN = "hCreateBasicWorkFiles::"
const CMACRO = "TestMacro"
- ' some returncodes
- dim brc as boolean
- dim irc as integer
- dim crc as string
-
- dim sFile as string
- sFile = hGetBasicWorkFile( "CURRENT" )
+ dim sFile as string : sFile = hGetBasicWorkFile( "CURRENT" )
'///+<li>Open a new document</li>
- call hCreateDocument()
+ hCreateDocument()
'///+<li>Change the document (to save it)</li>
- crc = hChangeDoc()
- printlog( CFN & crc )
+ printlog( CFN & hChangeDoc() )
'///+<li>Open Basic-Organizer, select the document and create a module</li>
- brc = hInitBasicIde( CMACRO )
- if ( not brc ) then
+ if ( not hInitBasicIde( CMACRO ) ) then
printlog( CFN & "Unable to create a module, aborting" )
- call hDestroyDocument()
+ hDestroyDocument()
hCreateBasicWorkFiles() = ""
exit function
endif
'///+<li>Insert a macro that triggers a messagebox</li>
- brc = hInsertMacro( 3 )
- if ( not brc ) then
+ if ( not hInsertMacro( 3 ) ) then
printlog( CFN & "Unable to insert macro, aborting" )
hCloseBasicIde()
- call hDestroyDocument()
+ hDestroyDocument()
hCreateBasicWorkFiles() = ""
exit function
endif
'///+<li>Close the Basic-IDE</li>
- brc = hCloseBasicIde()
+ hCloseBasicIde()
'///+<li>Save the file without autoextension, overwrite existing</li>
- brc = hFileSaveAsKill( sFile )
- if ( not brc ) then
+ if ( not hFileSaveAsKill( sFile ) ) then
printlog( CFN & "Unknown error while saving the file. Resetting" )
- call ExitRestartTheOffice
+ ExitRestartTheOffice
hCreateBasicWorkFiles() = ""
exit function
endif
'///+<li>Close the document</li>
- call hDestroyDocument()
+ hDestroyDocument()
'///</ul>
@@ -906,9 +750,6 @@ end function
function hIDESelectTabByIndex( iIndex as integer ) as string
- use "global\tools\includes\optional\t_accels.inc"
-
-
'///<h3>Select a tab within the BASIC-IDE by index</h3>
'///<i>The BASIC-IDE has to be open and has the focus. This function
'///+ selects the tab by sending CTRL+PAGEUP or CTRL+PAGEDOWN to the IDE using
@@ -947,7 +788,6 @@ function hIDESelectTabByIndex( iIndex as integer ) as string
dim cTabName as string
dim iCurrentTab as integer
- dim cAccel as string
'///<u>Description:</u>
'///<ul>
@@ -957,15 +797,14 @@ function hIDESelectTabByIndex( iIndex as integer ) as string
'///+<li>Retrieve the accelerator to switch tabs</li>
'///+<li>Switch tabs</li>
select case iIndex
- case 0 : cAccel = ""
- case 1 : cAccel = hGetAccel( "IDE_SWITCH_TAB-" )
- for iTab = 1 to 20
- BasicIDE.typeKeys( cAccel )
- next iTab
- case else: cAccel = hGetAccel( "IDE_SWITCH_TAB+" )
- for iTab = 1 to iIndex
- BasicIDE.typeKeys( cAccel )
- next iTab
+ case 1 :
+ for iTab = 1 to 20
+ BasicIDE.typeKeys( "<MOD1 PAGEDOWN>" )
+ next iTab
+ case else:
+ for iTab = 1 to iIndex
+ BasicIDE.typeKeys( "<MOD1 PAGEUP>" )
+ next iTab
end select
'///+<li>Select the Tabbar</li>
@@ -978,7 +817,7 @@ function hIDESelectTabByIndex( iIndex as integer ) as string
hSelectMenuNr( 3 )
'///+<li>Copy the selected string to the clipboard</li>
- EditCopy
+ hUseAsyncSlot( "EditCopy" )
'///+<li>Send ESC to the tabbar to deselect the tab</li>
Kontext "Tabbar"
@@ -988,7 +827,7 @@ function hIDESelectTabByIndex( iIndex as integer ) as string
cTabName = getClipboardText
'///+<li>Print exit message, set return value</li>
- printlog( CFN & "Exit with result: " & cTabName )
+ if ( GVERBOSE ) then printlog( CFN & "Exit with result: " & cTabName )
hIDESelectTabByIndex() = cTabName
'///</ul>
diff --git a/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc b/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc
index cb348d3c1c3f..a041089da25d 100644
--- a/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc
@@ -70,76 +70,42 @@ end function
function hCreateModuleForDoc( optional cName as string ) as boolean
- use "global\tools\includes\optional\t_treelist_tools.inc"
- use "global\tools\includes\optional\t_stringtools.inc"
-
'///<h3>Create a new Basic module for the current document</h3>
'///<i>Starting point: Basic Macro Organizer is visible and has focus</i>
- '///<ul>
-
const CFN = "hCreateModuleForDoc::"
+ const DEFAULT_WAIT = 2
+ if ( isMissing( cName ) ) then cName = "TTModule"
- dim iWait as integer ' how long we had to wait for the IDE to open
- dim iPos as integer
- dim brc as boolean ' boolean returncode, a temporary variable
- brc = false
- dim cMsg as string
-
- ' make sure that we have a name for the module
- if ( isMissing( cName ) ) Then
- cName = "TTModule"
- endif
-
- '///+<li>Select the last module (it should belong to the current document)</li>
kontext "Makro"
- iPos = hSelectTheLastNode( MakroAus )
-
- '///+<li>Click the New-Button, name the module</li>
- if ( Neu.isEnabled() ) then
- 'printlog( CFN & "New-button is enabled" )
- else
- warnlog( CFN & "New-button is disabled" )
- hCreateModuleForDoc() = false
- exit function
- endif
-
- Neu.Click()
-
- '///+<li>If the module already exists we end up on the Deletion dialog</li>
- kontext "Active"
- if ( Active.exists() ) then
- cMsg = active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- printlog( "Module seems to exist, deleting Main: " & cMsg )
- Active.Yes()
- endif
-
- Kontext "NeuesModul"
- if ( NeuesModul.exists() ) then
- Modulname.SetText( cName )
- NeuesModul.OK()
- else
- warnlog( CFN & "Failed create a new module, aborting" )
- hCreateModuleForDoc() = false
+ if ( hSelectTheLastNode( MakroAus ) > 0 ) then
+
kontext "Makro"
- Makro.cancel()
- exit function
- endif
-
- '///+<li>Wait for the BASIC_IDE to open, verify</li>
- ' BasicIDE is bad for "Kontexting", using the default toolbar instead
- kontext "MacroBar"
- if ( MacroBar.exists( 3 ) ) then
- printlog( CFN & "Exit: New module: " & cName & ". IDE is open" )
- brc = true
+ if ( hClickButton( Neu ) ) then
+
+ Kontext "NeuesModul"
+ if ( NeuesModul.exists( DEFAULT_WAIT ) ) then
+ Modulname.SetText( cName )
+ hCloseDialog( NeuesModul, "ok" )
+
+ kontext "BasicIDE"
+ if ( BasicIde.exists( DEFAULT_WAIT ) ) then
+ hCreateModuleForDoc() = true
+ else
+ warnlog( CFN & "BASIC IDE is not open" )
+ hCreateModuleForDoc() = false
+ endif
+ else
+ warnlog( CFN & "Dialog <NeuesModul> did not open" )
+ hCreateModuleForDoc() = false
+ endif
+ else
+ warnlog( CFN & "Failed to click <Neu> button" )
+ hCreateModuleForDoc() = false
+ endif
else
- warnlog( CFN & "Exit: Failed to create the Module" )
- brc = false
+ warnlog( CFN & "Failed to select the last node" )
+ hCreateModuleForDoc() = false
endif
-
- hCreateModuleForDoc() = brc
- '///+<li>Return TRUE on success, FALSE on failure</li>
- '///</ul>
end function
@@ -157,17 +123,12 @@ function hOpenBasicObjectOrganizer( iTabPage as integer ) as boolean
' BASIC-IDE
' NOTE: This is the organizer for libraries, modules and dialogs,
' not the one to run or assign macros!
-
- dim iMenuSize as integer
- dim brc as boolean
-
'///+<li>Open the context menu of the tabbar</li>
kontext "basicide"
- Tabbar.OpenContextMenu
+ Tabbar.OpenContextMenu()
'///+<li>Select the last entry of the context menu (dynamic menu!)</li>
- iMenuSize = hMenuItemgetCount()
- if ( iMenuSize = 2 ) then
+ if ( hMenuItemGetCount() = 2 ) then
printlog( " * short context menu (no edit-window)" )
hMenuSelectNr( 2 )
else
@@ -178,13 +139,12 @@ function hOpenBasicObjectOrganizer( iTabPage as integer ) as boolean
WaitSlot()
'///+<li>On the basic object organizer switch to the Modules tab</li>
- brc = hSelectBasicObjectOrganizerTab( 1 )
- if ( not brc ) then
+ if ( hSelectBasicObjectOrganizerTab( 1 ) ) then
+ printlog( CFN & "Requested page is open" )
+ hOpenBasicObjectOrganizer() = true
+ else
warnlog( CFN & "Failed to open requested Tabpage" )
hOpenBasicObjectOrganizer() = false
- else
- printlog( CFN & "Requested page is open" )
- hOpenBasicObjectOrganizer = true
endif
'///+<li>Return TRUE on success, FALSE on failure</li>
'///</ul>
@@ -194,37 +154,6 @@ end function
'*******************************************************************************
-function hOpenBasicOrganizerFromDoc() as boolean
-
- '///<h3>Open the Basic Macro Organizer from a plain document</h3>
- '///<i>Starting point: Plain document</i>
- '///<ul>
-
- const CFN = "hOpenBasicOrganizerFromDoc::"
-
- '///+<li>Use the slot ToolsMacro_uno to open the Basic Macro organizer</li>
- ToolsMacro_uno
-
- '///+<li>Verify that the dialog is open</li>
- kontext "Makro"
- if ( not Makro.exists() ) then
- warnlog( CFN & "Could not open Macro Organizer" )
- hOpenBasicOrganizerFromDoc() = false
- exit function
- endif
-
- call dialogtest( Makro )
-
- '///+<li>Return TRUE on success, FALSE on failure</li>
- printlog( CFN & "Basic Organizer is open" )
- hOpenBasicOrganizerFromDoc() = true
- kontext "Makro"
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hSelectBasicObjectOrganizerTab( iTabPage as integer ) as boolean
const CFN = "hSelectBasicObjectOrganizerTab::"
@@ -239,13 +168,6 @@ function hSelectBasicObjectOrganizerTab( iTabPage as integer ) as boolean
'///Description:
'///<ul>
- '///+<li>Verify function parameters</li>
- if ( ( iTabPage < 1 ) or ( iTabPage > 3 ) ) then
- warnlog( CFN & "Illegal argument passed to function: " & iTabPage )
- hSelectBasicObjectOrganizerTab() = false
- exit function
- endif
-
'///+<li>Switch between tabpages 1, 2 or 3</li>
select case iTabPage
case 1 :
@@ -295,22 +217,16 @@ function hDeleteLibrary( iLocation as integer, cLibName as string ) as boolean
const CFN = "hDeleteLibrary::"
const ITABPOS = 3
- '///+<li>Verify function parameters</li>
- if ( ( iLocation < 1 ) or ( iLocation > 3 ) ) then
- warnlog( CFN & "Invalid parameter passed to function" )
- hDeleteLibrary() = false
- endif
-
dim iObjectCount as integer
dim iCurrentObject as integer
dim cCurrentObjectName as string
'///+<li>Open Macro Organizer</li>
- hOpenBasicOrganizerFromDoc()
+ ToolsMakro_uno
'///+<li>Click Manage-button</li>
Kontext "Makro"
- Verwalten.click()
+ hClickButton( Verwalten )
'///+<li>Go to the Libraries Tab on the Macro Object Organizer</li>
hSelectBasicObjectOrganizerTab( ITABPOS )
@@ -329,7 +245,7 @@ function hDeleteLibrary( iLocation as integer, cLibName as string ) as boolean
if ( cCurrentObjectName = cLibName ) then
'///+<li>Click Delete</li>
- Loeschen.click()
+ hClickButton( Loeschen )
exit for
endif
@@ -337,7 +253,7 @@ function hDeleteLibrary( iLocation as integer, cLibName as string ) as boolean
'///+<li>Confirm to delete library</li>
Kontext "Active"
- if ( Active.exists() ) then
+ if ( Active.exists( 1 ) ) then
active.yes()
else
warnlog( CFN & "No confirmation for delete" )
@@ -354,11 +270,11 @@ function hDeleteLibrary( iLocation as integer, cLibName as string ) as boolean
endif
'///+<li>Cancel Macro Object Organizer</li>
- TabBibliotheken.cancel()
+ hCloseDialog( TabBibliotheken, "cancel" )
'///+<li>Cancel Basic Macro Organizer</li>
Kontext "Makro"
- Makro.cancel()
+ hCloseDialog( Makro, "cancel" )
'///+<li>Return TRUE on success, FALSE on failure</li>
'///</ul>
@@ -366,84 +282,6 @@ end function
'*******************************************************************************
-function hIsMacroEditButtonEnabled() as boolean
-
- '///<h3>Test whether the "Edit..." button is enabled or not</h3>
- '///<i>Starting point: Basic Macro Organizer</i>
- '///<ul>
-
- const CFN = "hIsMacroEditButtonEnabled::"
- dim brc as boolean
-
- '///+<li>Check that the macro dialog is open</li>
- Kontext "Makro"
- if ( not Makro.exists() ) then
- warnlog( "Macro organizer is not open, aborting function" )
- hIsMacroEditButtonEnabled() = false
- exit function
- endif
-
- '///+<li>Verify that the Edit...-Button exists and is enabled</li>
- if ( bearbeiten.exists() ) then
- if ( bearbeiten.isEnabled() ) then
- printlog( CFN & "Button exists and is enabled" )
- brc = true
- else
- printlog( CFN & "Button exists but is disabled" )
- brc = false
- endif
- else
- warnlog( CFN & "Button does not exist" )
- brc = false
- endif
-
- '///+<li>Return TRUE if button exists and is enabled</li>
- '///</ul>
- hIsMacroEditButtonEnabled() = brc
-
-end function
-
-'*******************************************************************************
-
-function hIsMacroNewButtonEnabled() as boolean
-
- '///<h3>Find out whether the "New..." button is enabled or not</h3>
- '///<i>Starting point: Basic Macro Organizer</i>
- '///<ul>
-
- const CFN = "hIsMacroNewButtonEnabled::"
- dim brc as boolean
-
- '///+<li>Check that the macro dialog is open</li>
- Kontext "Makro"
- if ( not Makro.exists() ) then
- warnlog( "Macro organizer is not open, aborting function" )
- hIsMacroNewButtonEnabled() = false
- exit function
- endif
-
- '///+<li>Verify that the New...-Button exists and is enabled</li>
- if ( neu.exists() ) then
- if ( neu.isEnabled() ) then
- printlog( CFN & "Button exists and is enabled" )
- brc = true
- else
- printlog( CFN & "Button exists but is disabled" )
- brc = false
- endif
- else
- warnlog( CFN & "Button does not exist" )
- brc = false
- endif
-
- '///+<li>Return TRUE if button exists and is enabled</li>
- '///</ul>
- hIsMacroNewButtonEnabled() = brc
-
-end function
-
-'*******************************************************************************
-
function hNameBasicModule( cName as string ) as boolean
'///<h3>Name a Basic Module</h3>
@@ -466,12 +304,7 @@ function hNameBasicModule( cName as string ) as boolean
'///<u>Description</u>:
'///<ul>
- use "global\tools\includes\optional\t_stringtools.inc"
-
const CFN = "hNameBasicModule::"
- dim brc as boolean
- brc = true
- dim cMsg as string
'///+<li>Verify that the naming dialog is open</li>
kontext "NeuesModul"
@@ -484,22 +317,20 @@ function hNameBasicModule( cName as string ) as boolean
Modulname.SetText( cName )
'///+<li>Accept the name with OK</li>
- NeuesModul.OK()
+ hCloseDialog( NeuesModul, "ok" )
'///+<li>If there is no warning, the name should be valid.</li>
kontext "BasicIDE"
if ( BasicIde.exists( 2 ) ) then
- brc = true
+ hNameBasicModule() = true
printlog( CFN & "Name accepted, Basic-Ide is open" )
else
- brc = false
+ hNameBasicModule() = false
'///+<li>Look for invalid name warning, close it</li>
kontext "active"
if ( active.exists() ) then
- cMsg = active.getText()
- cMsg = hRemoveLineBreaks( cMsg
- printlog( CFN & "Msgbox: " & cMsg )
- active.ok()
+ printlog( CFN & "Msgbox: " & active.exists() )
+ hCloseDialog( active, "ok" )
endif
'///+<li>If the name is invalid, get back to the naming-dialog</li>
@@ -510,8 +341,6 @@ function hNameBasicModule( cName as string ) as boolean
warnlog( CFN & "Naming failed but we are not on the naming dialog" )
endif
endif
-
- hNameBasicModule() = brc
'///</ul>
end function
diff --git a/testautomation/global/tools/includes/optional/t_ctrl_1.inc b/testautomation/global/tools/includes/optional/t_ctrl_1.inc
deleted file mode 100644
index d7fd3ac42f81..000000000000
--- a/testautomation/global/tools/includes/optional/t_ctrl_1.inc
+++ /dev/null
@@ -1,955 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : marc.neumann@sun.com
-'*
-'* short description :
-'*
-'*******************************************************************
-'*
-' #1 hChangeControlSettings
-'*
-'\******************************************************************
-
-function hChangeControlSettings ( sType as String, lsProps( ) ) as Boolean
-
- if bAsianLan = TRUE then
- printlog " ******************************************* "
- printlog " *** running on asian office version *** "
- printlog " ******************************************* "
- else
- printlog " ******************************************* "
- printlog " *** running on non-asian office version *** "
- printlog " ******************************************* "
- endif
-
- Kontext "TabGeneralControl"
- if TabGeneralControl.Exists = FALSE then
- Kontext "TB_MacroControls"
- printlog " activate properties for '" + sType + "'"
- Properties.Click
- Kontext "TabGeneralControl"
- Sleep (1)
- end if
-
- printlog "- change global settings"
- NameText.SetText "tt_" + sType + "_tt"
- ListAppend ( lsProps(), NameText.GetText )
-
- if Enabled.GetSelIndex = 1 then
- Enabled.Select 2
- else
- Enabled.Select 1
- end if
-
- ListAppend ( lsProps(), Enabled.GetSelText )
-
- if sType <> "dialog" then
- if Printable.GetSelIndex = 1 then
- Printable.Select 2
- else
- Printable.Select 1
- end if
- ListAppend ( lsProps(), Printable.GetSelText )
- else
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- end if
-
-' PageStep.More 2
-' ListAppend ( lsProps(), PageStep.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- Order.More 2
- Height.Less 3
- ListAppend ( lsProps(), Order.GetText ) ' have to be checked after another control is changed ( it depends on the number of controls )
- ListAppend ( lsProps(), Height.GetText )
- Width.More 4
- ListAppend ( lsProps(), Width.GetText )
-' PositionX.More 3
-' ListAppend ( lsProps(), PositionX.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' PositionY.Less 2
-' ListAppend ( lsProps(), PositionY.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- Information.SetText "tt info"
- ListAppend ( lsProps(), Information.GetText )
- Help.SetText "tt help"
- ListAppend ( lsProps(), Help.GetText )
- HelpURL.SetText "www.mopo.de"
- ListAppend ( lsProps(), HelpURL.GetText )
-
- printlog "- change special settings for '" + sType + "'"
-'##### CommandButton #####
- if instr ( lcase ( sType ), "commandbutton" ) then
-' SetControlType CTBrowseBox
-' Label.TypeKeys "tt_label_tt"
-' ListAppend ( lsProps(), Label.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- TabStop.Select 3
- ListAppend ( lsProps(), TabStop.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 5 )
- else
- Font.Select ( 5 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 17
- ListAppend ( lsProps(), Background.GetSelText )
-' ButtonType.Select 3
-' ListAppend ( lsProps(), ButtonType.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' if State.GetSelIndex = 1 then
-' State.Select 2
-' else
-' State.Select 1
-' end if
-' ListAppend ( lsProps(), State.GetSelText )
-
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- if DefaultButton.GetSelIndex = 1 then
- DefaultButton.Select 2
- else
- DefaultButton.Select 2
- end if
-
- ListAppend ( lsProps(), DefaultButton.GetSelText )
- GraphicsButton.Click
-
- Kontext "GrafikEinfuegenDlg"
- Dateiname.SetText ( ConvertPath ( gTesttoolPath + "global\input\graf_inp\baer.tif" ) )
- DateiTyp.Select 1 ' set the filter to 'all formats'
- Oeffnen.Click
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), Graphics.GetText )
- GraphicsAlignment.Select 4
- ListAppend ( lsProps(), GraphicsAlignment.GetSelText )
- end if
-
-'##### ImageControl #####
- if instr ( lcase ( sType ), "imagecontrol" ) then
- Background.Select 14
- ListAppend ( lsProps(), Background.GetSelText )
- GraphicsButton.Click
-
- Kontext "GrafikEinfuegenDlg"
- Dateiname.SetText ( ConvertPath ( gTesttoolPath + "global\input\graf_inp\baer.tif" ) )
- DateiTyp.Select 1 ' set the filter to 'all formats'
- Oeffnen.Click
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), Graphics.GetText )
-' if Scale.GetSelIndex = 1 then
-' Scale.Select 2
-' else
-' Scale.Select 1
-' end if
-' ListAppend ( lsProps(), Scale.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- end if
-
-'##### CheckBox #####
- if instr ( lcase ( sType ), "checkbox" ) then
-' SetControlType CTBrowseBox
-' Label.TypeKeys "tt_label_tt"
-' ListAppend ( lsProps(), Label.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- TabStop.Select 3
- ListAppend ( lsProps(), TabStop.GetSelText )
-
-' if State.GetSelIndex = 1 then
-' State.Select 2
-' else
-' State.Select 1
-' end if
-' ListAppend ( lsProps(), State.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-
-' if TriState.GetSelIndex = 1 then
-' TriState.Select 2
-' else
-' TriState.Select 1
-' end if
-' ListAppend ( lsProps(), TriState.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- end if
-
-'##### OptionButton #####
- if instr ( lcase ( sType ), "optionbutton" ) then
-' SetControlType CTBrowseBox
-' Label.TypeKeys "tt_label_tt"
-' ListAppend ( lsProps(), Label.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- TabStop.Select 3
- ListAppend ( lsProps(), TabStop.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 5 )
- else
- Font.Select ( 5 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
-
-' if State.GetSelIndex = 1 then
-' State.Select 2
-' else
-' State.Select 1
-' end if
-' ListAppend ( lsProps(), State.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- end if
-
-'##### Label #####
- if instr ( lcase ( sType ), "label" ) then
-' SetControlType CTBrowseBox
-' Label.TypeKeys "tt_label_tt"
-' ListAppend ( lsProps(), Label.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- TabStop.Select 3
- ListAppend ( lsProps(), TabStop.GetSelText )
-
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 5 )
- else
- Font.Select ( 5 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
-
- Align.Select 4
- ListAppend ( lsProps(), Align.GetSelText )
- Background.Select 20
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 3
- ListAppend ( lsProps(), Border.GetSelText )
-
- if MultiLine.GetSelIndex = 1 then
- MultiLine.Select 2
- else
- MultiLine.Select 1
- end if
-
- ListAppend ( lsProps(), MultiLine.GetSelText )
- end if
-
-'##### TextField #####
- if instr ( lcase ( sType ), "textfield" ) then
-' SetControlType CTBrowseBox
-' TextText.TypeKeys "tt_text_tt"
-' ListAppend ( lsProps(), TextText.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- MaxTextLen.More 5
- ListAppend ( lsProps(), MaxTextLen.GetText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 3
- ListAppend ( lsProps(), TabStop.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 5 )
- else
- Font.Select ( 5 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Align.Select 1
- ListAppend ( lsProps(), Align.GetSelText )
- Background.Select 20
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 3
- ListAppend ( lsProps(), Border.GetSelText )
-
- if MultiLine.GetSelIndex = 1 then
- MultiLine.Select 2
- else
- MultiLine.Select 1
- end if
-
- ListAppend ( lsProps(), MultiLine.GetSelText )
-
- if ManualLineBreak.GetSelIndex = 1 then
- ManualLineBreak.Select 2
- else
- ManualLineBreak.Select 1
- end if
-
- ListAppend ( lsProps(), ManualLineBreak.GetSelText )
-
- if HorizontalScroll.GetSelIndex = 1 then
- HorizontalScroll.Select 2
- else
- HorizontalScroll.Select 1
- end if
-
- ListAppend ( lsProps(), HorizontalScroll.GetSelText )
-
- if VerticalScroll.GetSelIndex = 1 then
- VerticalScroll.Select 2
- else
- VerticalScroll.Select 1
- end if
-
- ListAppend ( lsProps(), VerticalScroll.GetSelText )
- Password.SetText "t"
- ListAppend ( lsProps(), Password.GetText )
-
- end if
-
-'##### Listbox #####
- if instr ( lcase ( sType ), "listbox" ) then
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 3
- ListAppend ( lsProps(), TabStop.GetSelText )
-' SetControlType CTBrowseBox
-' ListEntries.TypeKeys "tt_text_tt"
-' ListAppend ( lsProps(), ListEntries.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 5 )
- else
- Font.Select ( 5 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
-
- if DropDown.GetSelIndex = 1 then
- DropDown.Select 2
- else
- DropDown.Select 1
- end if
-
- ListAppend ( lsProps(), DropDown.GetSelText )
- LineCount.Less 1
- ListAppend ( lsProps(), LineCount.GetText )
-
- if MultiSelection.GetSelIndex = 1 then
- MultiSelection.Select 2
- else
- MultiSelection.Select 1
- end if
-
- ListAppend ( lsProps(), MultiSelection.GetSelText )
- end if
-
-'##### Combobox #####
- if instr ( lcase ( sType ), "combobox" ) then
-
- TextText.SetText "tt_text_tt"
- ListAppend ( lsProps(), TextText.GetText )
- MaxTextLen.More 2
- ListAppend ( lsProps(), MaxTextLen.GetText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 3
- ListAppend ( lsProps(), TabStop.GetSelText )
-' SetControlType CTBrowseBox
-' ListEntries.TypeKeys "tt_text_tt"
-' ListAppend ( lsProps(), ListEntries.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 5 )
- else
- Font.Select ( 5 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
-
- if DropDown.GetSelIndex = 1 then
- DropDown.Select 2
- else
- DropDown.Select 1
- end if
-
- ListAppend ( lsProps(), DropDown.GetSelText )
-
- if AutoComplete.GetSelIndex = 1 then
- AutoComplete.Select 2
- else
- AutoComplete.Select 1
- end if
-
- ListAppend ( lsProps(), AutoComplete.GetSelText )
- LineCount.More 5
- ListAppend ( lsProps(), LineCount.GetText )
- Border.Select 2 ' sometimes the line count is not saved correctly, when it was changed as last property
- Border.Select 1 ' as work-around : change another property and then set it to the last entry
-
- end if
-
-'##### Scrollbar #####
- if instr ( lcase ( sType ), "scrollbar" ) then
-
-' ScrollValue.More 5
-' ListAppend ( lsProps(), ScrollValue.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' ScrollValueMax.Less 5
-' ListAppend ( lsProps(), ScrollValueMax.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' LineIncrement.More 1
-' ListAppend ( lsProps(), LineIncrement.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' BlockIncrement.Less 1
-' ListAppend ( lsProps(), BlockIncrement.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' VisibleSize.Less 2
-' ListAppend ( lsProps(), VisibleSize.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' if Orientation.GetSelIndex = 1 then
-' Orientation.Select 2
-' else
-' Orientation.Select 1
-' end if
-' ListAppend ( lsProps(), Orientation.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- Border.Select 2
- ListAppend ( lsProps(), Border.GetSelText )
- end if
-
-'##### FrameControl #####
- if instr ( lcase ( sType ), "framecontrol" ) then
-' SetControlType CTBrowseBox
-' Label.TypeKeys "tt_label_tt"
-' ListAppend ( lsProps(), Label.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
-
- end if
-
-'##### progressBar #####
- if instr ( lcase ( sType ), "progressbar" ) then
-
-' ScrollValue.More 5
-' ListAppend ( lsProps(), ScrollValue.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' ScrollValueMax.Less 5
-' ListAppend ( lsProps(), ScrollValueMax.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' LineIncrement.More 1
-' ListAppend ( lsProps(), LineIncrement.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' BlockIncrement.Less 1
-' ListAppend ( lsProps(), BlockIncrement.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' VisibleSize.Less 2
-' ListAppend ( lsProps(), VisibleSize.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' if Orientation.GetSelIndex = 1 then
-' Orientation.Select 2
-' else
-' Orientation.Select 1
-' end if
-' ListAppend ( lsProps(), Orientation.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- Background.Select 4
- ListAppend ( lsProps(), Background.GetSelText )
- end if
-
-'##### FixedLine #####
- if instr ( lcase ( sType ), "fixedline" ) then
-' SetControlType CTBrowseBox
-' Label.TypeKeys "tt_label_tt"
-' ListAppend ( lsProps(), Label.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
-' if Orientation.GetSelIndex = 1 then
-' Orientation.Select 2
-' else
-' Orientation.Select 1
-' end if
-' ListAppend ( lsProps(), Orientation.GetSelText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- end if
-
-
-'##### DateField #####
- if instr ( lcase ( sType ), "datefield" ) then
- if StrictFormat.GetSelIndex = 1 then
- StrictFormat.Select 2
- else
- StrictFormat.Select 1
- end if
- ListAppend ( lsProps(), StrictFormat.GetSelText )
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 2
- ListAppend ( lsProps(), TabStop.GetSelText )
- DateField.More 3
- ListAppend ( lsProps(), DateField.GetText )
- DateMin.More 3
- ListAppend ( lsProps(), DateMin.GetText )
- DateMax.Less 3
- ListAppend ( lsProps(), DateMax.GetText )
- DateFormat.Select 7
- ListAppend ( lsProps(), DateFormat.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
- if DropDown.GetSelIndex = 1 then
- DropDown.Select 2
- else
- DropDown.Select 1
- end if
- ListAppend ( lsProps(), DropDown.GetSelText )
- if Spin.GetSelIndex = 1 then
- Spin.Select 2
- else
- Spin.Select 1
- end if
- ListAppend ( lsProps(), Spin.GetSelText )
- end if
-
-'##### TimeField #####
- if instr ( lcase ( sType ), "timefield" ) then
-
- if StrictFormat.GetSelIndex = 1 then
- StrictFormat.Select 2
- else
- StrictFormat.Select 1
- end if
-
- ListAppend ( lsProps(), StrictFormat.GetSelText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 1
- ListAppend ( lsProps(), TabStop.GetSelText )
- TimeField.Less 3
- ListAppend ( lsProps(), TimeField.GetText )
- TimeMin.More 2
- ListAppend ( lsProps(), TimeMin.GetText )
- TimeMax.Less 3
- ListAppend ( lsProps(), TimeMax.GetText )
- TimeFormat.Select 3
- ListAppend ( lsProps(), TimeFormat.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
-
- if Spin.GetSelIndex = 1 then
- Spin.Select 2
- else
- Spin.Select 1
- end if
-
- ListAppend ( lsProps(), Spin.GetSelText )
- end if
-
-'##### NumericField #####
- if instr ( lcase ( sType ), "numericfield" ) then
-
- if StrictFormat.GetSelIndex = 1 then
- StrictFormat.Select 2
- else
- StrictFormat.Select 1
- end if
-
- ListAppend ( lsProps(), StrictFormat.GetSelText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 1
- ListAppend ( lsProps(), TabStop.GetSelText )
- Value.Less 3
- ListAppend ( lsProps(), Value.GetText )
- ValueMin.Less 2
- ListAppend ( lsProps(), ValueMin.GetText )
- ValueMax.Less 3
- ListAppend ( lsProps(), ValueMax.GetText )
- ValueStep.More 5
- ListAppend ( lsProps(), ValueStep.GetText )
- Accuray.More 3
- ListAppend ( lsProps(), Accuray.GetText )
-
- if ThousandSeperator.GetSelIndex = 1 then
- ThousandSeperator.Select 2
- else
- ThousandSeperator.Select 1
- end if
-
- ListAppend ( lsProps(), ThousandSeperator.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
- if Spin.GetSelIndex = 1 then
- Spin.Select 2
- else
- Spin.Select 1
- end if
- ListAppend ( lsProps(), Spin.GetSelText )
- end if
-
-
-'##### CurrencyField #####
- if instr ( lcase ( sType ), "currencyfield" ) then
-
- if StrictFormat.GetSelIndex = 1 then
- StrictFormat.Select 2
- else
- StrictFormat.Select 1
- end if
-
- ListAppend ( lsProps(), StrictFormat.GetSelText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 1
- ListAppend ( lsProps(), TabStop.GetSelText )
- Value.Less 3
- ListAppend ( lsProps(), Value.GetText )
- ValueMin.Less 2
- ListAppend ( lsProps(), ValueMin.GetText )
- ValueMax.Less 3
- ListAppend ( lsProps(), ValueMax.GetText )
- ValueStep.More 5
- ListAppend ( lsProps(), ValueStep.GetText )
- Accuray.More 2
- ListAppend ( lsProps(), Accuray.GetText )
-
- if ThousandSeperator.GetSelIndex = 1 then
- ThousandSeperator.Select 2
- else
- ThousandSeperator.Select 1
- end if
-
- ListAppend ( lsProps(), ThousandSeperator.GetSelText )
- CurrencySymbol.SetText "#"
- ListAppend ( lsProps(), CurrencySymbol.GetText )
-
- if CurrSymPosition.GetSelIndex = 1 then
- CurrSymPosition.Select 2
- else
- CurrSymPosition.Select 1
- end if
-
- ListAppend ( lsProps(), CurrSymPosition.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
-
- if Spin.GetSelIndex = 1 then
- Spin.Select 2
- else
- Spin.Select 1
- end if
-
- ListAppend ( lsProps(), Spin.GetSelText )
- end if
-
-'##### FormattedField #####
- if instr ( lcase ( sType ), "formattedfield" ) then
- MaxTextLen.More 4
- ListAppend ( lsProps(), MaxTextLen.GetText )
-
- if StrictFormat.GetSelIndex = 1 then
- StrictFormat.Select 2
- else
- StrictFormat.Select 1
- end if
-
- ListAppend ( lsProps(), StrictFormat.GetSelText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 1
- ListAppend ( lsProps(), TabStop.GetSelText )
-' Effective.SetText "2"
-' ListAppend ( lsProps(), Effective.GetText )
- ListAppend ( lsProps(), "not testable" ) ' dummy entry
- EffectiveMin.SetText "1"
- ListAppend ( lsProps(), EffectiveMin.GetText )
- EffectiveMax.SetText "1"
- ListAppend ( lsProps(), EffectiveMax.GetText )
- FormatkeyButton.Click
-
- Kontext "ZahlenFormat"
- Kategorie.Select 3
- Kategorieformat.Select ( Kategorieformat.GetItemCount )
- ZahlenFormat.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), FormatKey.GetText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Align.Select 1
- ListAppend ( lsProps(), Align.GetSelText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
-
- if Spin.GetSelIndex = 1 then
- Spin.Select 2
- else
- Spin.Select 1
- end if
-
- ListAppend ( lsProps(), Spin.GetSelText )
- end if
-
-'##### PatternField #####
- if instr ( lcase ( sType ), "patternfield" ) then
- TextText.SetText "tt_text_tt"
- ListAppend ( lsProps(), TextText.GetText )
- MaxTextLen.More 4
- ListAppend ( lsProps(), MaxTextLen.GetText )
- EditMask.SetText "aeiopu"
- ListAppend ( lsProps(), EditMask.GetText )
- LiteralMask.SetText "upqpsd"
- ListAppend ( lsProps(), LiteralMask.GetText )
-
- if StrictFormat.GetSelIndex = 1 then
- StrictFormat.Select 2
- else
- StrictFormat.Select 1
- end if
-
- ListAppend ( lsProps(), StrictFormat.GetSelText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 1
- ListAppend ( lsProps(), TabStop.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
- end if
-
-'##### FileControl #####
- if instr ( lcase ( sType ), "filecontrol" ) then
- TextText.SetText "tt_text_tt"
- ListAppend ( lsProps(), TextText.GetText )
-
- if Readonly.GetSelIndex = 1 then
- Readonly.Select 2
- else
- Readonly.Select 1
- end if
-
- ListAppend ( lsProps(), Readonly.GetSelText )
- TabStop.Select 1
- ListAppend ( lsProps(), TabStop.GetSelText )
- CharacterSetButton.Click
-
- Kontext "TabFont"
- if bAsianLan = TRUE then
- FontEast.Select ( 3 )
- else
- Font.Select ( 3 )
- endif
- TabFont.OK
-
- Kontext "TabGeneralControl"
- ListAppend ( lsProps(), CharacterSet.GetText )
- Background.Select 1
- ListAppend ( lsProps(), Background.GetSelText )
- Border.Select 1
- ListAppend ( lsProps(), Border.GetSelText )
- end if
-
-end function
diff --git a/testautomation/global/tools/includes/optional/t_ctrl_2.inc b/testautomation/global/tools/includes/optional/t_ctrl_2.inc
deleted file mode 100644
index 498f6f9f33ce..000000000000
--- a/testautomation/global/tools/includes/optional/t_ctrl_2.inc
+++ /dev/null
@@ -1,355 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : marc.neumann@sun.com
-'*
-'* short description :
-'*
-'*******************************************************************
-'*
-' #1 hCheckControlSettings
-'*
-'\******************************************************************
-
-function hCheckControlSettings ( sType as String, lsProps( ) ) as Boolean
-
- Kontext "TabGeneralControl"
- if TabGeneralControl.Exists = FALSE then
- Kontext "TB_MacroControls"
- printlog " activate properties for '" + sType + "'"
- Properties.Click
- Kontext "TabGeneralControl"
- Sleep (1)
- end if
-
- printlog "- check global settings"
- if NameText.GetText <> lsProps(1) then Warnlog "Name => changes not saved! should : '" + lsProps(1) + "' is : '" + NameText.GetText + "'"
- if Enabled.GetSelText <> lsProps(2) then Warnlog "Enabled => changes not saved! should : '" + lsProps(2) + "' is : '" + Enabled.GetSelText + "'"
- if sType <> "dialog" then
- if Printable.GetSelText <> lsProps(3) then Warnlog "Printable => changes not saved! should : '" + lsProps(3) + "' is : '" + Printable.GetSelText + "'"
- end if
-' if PageStep.GetText <> lsProps(4) then Warnlog "Page Step => changes not saved! should : '" + lsProps(4) + "' is : '" + PageStep.GetText + "'"
- if Order.GetText <> lsProps(5) then Warnlog "Order => changes not saved! should : '" + lsProps(5) + "' is : '" + Order.GetText + "'"
- if Height.GetText <> lsProps(6) then Warnlog "Height => changes not saved! should : '" + lsProps(6) + "' is : '" + Height.GetText + "'"
- if Width.GetText <> lsProps(7) then Warnlog "Width => changes not saved! should : '" + lsProps(7) + "' is : '" + Width.GetText + "'"
-' if PositionX.GetText <> lsProps(8) then Warnlog "Position x => changes not saved! should : '" + lsProps(8) + "' is : '" + PositionX.GetText + "'"
-' if PositionY.GetText <> lsProps(9) then Warnlog "Position y => changes not saved! should : '" + lsProps(9) + "' is : '" + PositionY.GetText + "'"
- if Information.GetText <> lsProps(10) then Warnlog "Information => changes not saved! should : '" + lsProps(10) + "' is : '" + Information.GetText + "'"
- if Help.GetText <> lsProps(11) then Warnlog "Help => changes not saved! should : '" + lsProps(11) + "' is : '" + Help.GetText + "'"
- if HelpURL.GetText <> lsProps(12) then Warnlog "Help URL => changes not saved! should : '" + lsProps(12) + "' is : '" + HelpURL.GetText + "'"
-
- printlog "- check special settings for " + sType
-
-'##### CommandButton #####
- if instr ( lcase ( sType ), "commandbutton" ) then
-' if Label.GetText <> lsProps(13) then Warnlog "Label => changes not saved! should : '" + lsProps(13) + "' is : '" + Label.GetText + "'"
- if TabStop.GetSelText <> lsProps(14) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(14) + "' is : '" + TabStop.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(15) then Warnlog "Character set => changes not saved! should : '" + lsProps(15) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(16) then Warnlog "Background => changes not saved! should : '" + lsProps(16) + "' is : '" + Background.GetSelText + "'"
-' if ButtonType.GetSelText <> lsProps(17) then Warnlog "Button type => changes not saved! should : '" + lsProps(17) + "' is : '" + ButtonType.GetSelText + "'"
-' if State.GetSelText <> lsProps(18) then Warnlog "State => changes not saved! should : '" + lsProps(18) + "' is : '" + State.GetSelText + "'"
- if DefaultButton.GetSelText <> lsProps(19) then Warnlog "Default button => changes not saved! should : '" + lsProps(19) + "' is : '" + DefaultButton.GetSelText + "'"
- if Graphics.GetText <> lsProps(20) then Warnlog "Graphics => changes not saved! should : '" + lsProps(20) + "' is : '" + Graphics.GetText + "'"
- if GraphicsAlignment.GetSelText <> lsProps(21) then Warnlog "Graphics alignment => changes not saved! should : '" + lsProps(21) + "' is : '" + GraphicsAlignment.GetSelText + "'"
- end if
-
-'##### ImageControl #####
- if instr ( lcase ( sType ), "imagecontrol" ) then
- if Background.GetSelText <> lsProps(13) then Warnlog "Background => changes not saved! should : '" + lsProps(13) + "' is : '" + Background.GetSelText + "'"
- if Graphics.GetText <> lsProps(14) then Warnlog "Graphics => changes not saved! should : '" + lsProps(14) + "' is : '" + Graphics.GetText + "'"
-' if Scale.GetSelText <> lsProps(15) then Warnlog "Scale => changes not saved! should : '" + lsProps(15) + "' is : '" + Scale.GetSelText + "'"
- end if
-
-'##### CheckBox #####
- if instr ( lcase ( sType ), "checkbox" ) then
-' if Label.GetText <> lsProps(13) then Warnlog "Label => changes not saved! should : '" + lsProps(13) + "' is : '" + Label.GetText + "'"
- if TabStop.GetSelText <> lsProps(14) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(14) + "' is : '" + TabStop.GetSelText + "'"
-' if State.GetSelText <> lsProps(15) then Warnlog "State => changes not saved! should : '" + lsProps(15) + "' is : '" + State.GetSelText + "'"
-' if TriState.GetSelText <> lsProps(16) then Warnlog "TriState => changes not saved! should : '" + lsProps(16) + "' is : '" + TriState.GetSelText + "'"
- end if
-
-'##### OptionButton #####
- if instr ( lcase ( sType ), "optionbutton" ) then
-' if Label.GetText <> lsProps(13) then Warnlog "Label => changes not saved! should : '" + lsProps(13) + "' is : '" + Label.GetText + "'"
- if TabStop.GetSelText <> lsProps(14) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(14) + "' is : '" + TabStop.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(15) then Warnlog "Character set => changes not saved! should : '" + lsProps(15) + "' is : '" + CharacterSet.GetText + "'"
-' if State.GetSelText <> lsProps(16) then Warnlog "State => changes not saved! should : '" + lsProps(16) + "' is : '" + State.GetSelText + "'"
- end if
-
-'##### Label #####
- if instr ( lcase ( sType ), "label" ) then
-' if Label.GetText <> lsProps(13) then Warnlog "Label => changes not saved! should : '" + lsProps(13) + "' is : '" + Label.GetText + "'"
- if TabStop.GetSelText <> lsProps(14) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(14) + "' is : '" + TabStop.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(15) then Warnlog "Character set => changes not saved! should : '" + lsProps(15) + "' is : '" + CharacterSet.GetText + "'"
- if Align.GetSelText <> lsProps(16) then Warnlog "Alignment => changes not saved! should : '" + lsProps(16) + "' is : '" + Align.GetSelText + "'"
- if Background.GetSelText <> lsProps(17) then Warnlog "Background => changes not saved! should : '" + lsProps(17) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(18) then Warnlog "Border => changes not saved! should : '" + lsProps(18) + "' is : '" + Border.GetSelText + "'"
- if MultiLine.GetSelText <> lsProps(19) then Warnlog "MultiLine => changes not saved! should : '" + lsProps(19) + "' is : '" + MultiLine.GetSelText + "'"
- end if
-
-'##### TextField #####
- if instr ( lcase ( sType ), "textfield" ) then
-' if TextText.GetText <> lsProps(13) then Warnlog "Text => changes not saved! should : '" + lsProps(13) + "' is : '" + TextText.GetText + "'"
- if MaxTextLen.GetText <> lsProps(14) then Warnlog "Max text lengh => changes not saved! should : '" + lsProps(14) + "' is : '" + MaxTextLen.GetText + "'"
- if Readonly.GetSelText <> lsProps(15) then Warnlog "Readonly => changes not saved! should : '" + lsProps(15) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(16) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(16) + "' is : '" + TabStop.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(17) then Warnlog "Character set => changes not saved! should : '" + lsProps(17) + "' is : '" + CharacterSet.GetText + "'"
- if Align.GetSelText <> lsProps(18) then Warnlog "Alignment => changes not saved! should : '" + lsProps(18) + "' is : '" + Align.GetSelText + "'"
- if Background.GetSelText <> lsProps(19) then Warnlog "Background => changes not saved! should : '" + lsProps(19) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(20) then Warnlog "Border => changes not saved! should : '" + lsProps(20) + "' is : '" + Border.GetSelText + "'"
- if MultiLine.GetSelText <> lsProps(21) then Warnlog "MultiLine => changes not saved! should : '" + lsProps(21) + "' is : '" + MultiLine.GetSelText + "'"
- if ManualLineBreak.GetSelText <> lsProps(22) then Warnlog "Manual line break => changes not saved! should : '" + lsProps(22) + "' is : '" + ManualLineBreak.GetSelText + "'"
- if HorizontalScroll.GetSelText <> lsProps(23) then Warnlog "Horizontal scrollbar => changes not saved! should : '" + lsProps(23) + "' is : '" + HorizontalScroll.GetSelText + "'"
- if VerticalScroll.GetSelText <> lsProps(24) then Warnlog "Vertical scrollbar => changes not saved! should : '" + lsProps(24) + "' is : '" + VerticalScroll.GetSelText + "'"
- if Password.GetText <> lsProps(25) then Warnlog "Password => changes not saved! should : '" + lsProps(25) + "' is : '" + Password.GetText + "'"
- end if
-
-'##### Listbox #####
- if instr ( lcase ( sType ), "listbox" ) then
- if Readonly.GetSelText <> lsProps(13) then Warnlog "Readonly => changes not saved! should : '" + lsProps(13) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(14) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(14) + "' is : '" + TabStop.GetSelText + "'"
-' if ListEntries.GetText <> lsProps(15) then Warnlog "List entries => changes not saved! should : '" + lsProps(15) + "' is : '" + ListEntries.GetText + "'"
- if CharacterSet.GetText <> lsProps(16) then Warnlog "Character set => changes not saved! should : '" + lsProps(16) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(17) then Warnlog "Background => changes not saved! should : '" + lsProps(17) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(18) then Warnlog "Border => changes not saved! should : '" + lsProps(18) + "' is : '" + Border.GetSelText + "'"
- if DropDown.GetSelText <> lsProps(19) then Warnlog "Drop Down => changes not saved! should : '" + lsProps(19) + "' is : '" + DropDown.GetSelText + "'"
- if LineCount.GetText <> lsProps(20) then Warnlog "Line counte => changes not saved! should : '" + lsProps(20) + "' is : '" + LineCount.GetText + "'"
- if MultiSelection.GetSelText <> lsProps(21) then Warnlog "Multi selection. => changes not saved! should : '" + lsProps(21) + "' is : '" + MultiSelection.GetSelText + "'"
- end if
-
-'##### Combobox #####
- if instr ( lcase ( sType ), "combobox" ) then
- if TextText.GetText <> lsProps(13) then Warnlog "Text => changes not saved! should : '" + lsProps(13) + "' is : '" + TextText.GetText + "'"
- if MaxTextLen.GetText <> lsProps(14) then Warnlog "Max text lenght => changes not saved! should : '" + lsProps(14) + "' is : '" + MaxTextLen.GetText + "'"
- if Readonly.GetSelText <> lsProps(15) then Warnlog "Readonly => changes not saved! should : '" + lsProps(15) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(16) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(16) + "' is : '" + TabStop.GetSelText + "'"
-' if ListEntries.GetText <> lsProps(17) then Warnlog "List entries => changes not saved! should : '" + lsProps(17) + "' is : '" + ListEntries.GetText + "'"
- if CharacterSet.GetText <> lsProps(18) then Warnlog "Character set => changes not saved! should : '" + lsProps(18) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(19) then Warnlog "Background => changes not saved! should : '" + lsProps(19) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(20) then Warnlog "Border => changes not saved! should : '" + lsProps(20) + "' is : '" + Border.GetSelText + "'"
- if DropDown.GetSelText <> lsProps(21) then Warnlog "Drop Down => changes not saved! should : '" + lsProps(21) + "' is : '" + DropDown.GetSelText + "'"
- if AutoComplete.GetSelText <> lsProps(22) then Warnlog "Auto complete => changes not saved! should : '" + lsProps(22) + "' is : '" + AutoComplete.GetSelText + "'"
- if LineCount.GetText <> lsProps(23) then Warnlog "Line count => changes not saved! should : '" + lsProps(23) + "' is : '" + LineCount.GetText + "'"
- end if
-
-'##### Scrollbar #####
- if instr ( lcase ( sType ), "scrollbar" ) then
-' if ScrollValue.GetText <> lsProps(13) then Warnlog "Scroll value => changes not saved! should : '" + lsProps(13) + "' is : '" + ScrollValue.GetText + "'"
-' if ScrollValueMax.GetText <> lsProps(14) then Warnlog "Scroll value max => changes not saved! should : '" + lsProps(14) + "' is : '" + ScrollValueMax.GetText + "'"
-' if LineIncrement.GetText <> lsProps(15) then Warnlog "Line increment => changes not saved! should : '" + lsProps(15) + "' is : '" + LineIncrement.GetText + "'"
-' if BlockIncrement.GetText <> lsProps(16) then Warnlog "Block increment => changes not saved! should : '" + lsProps(16) + "' is : '" + BlockIncrement.GetText + "'"
-' if VisibleSize.GetText <> lsProps(17) then Warnlog "Visible size => changes not saved! should : '" + lsProps(17) + "' is : '" + VisibleSize.GetText + "'"
-' if Orientation.GetSelText <> lsProps(18) then Warnlog "Orientation => changes not saved! should : '" + lsProps(18) + "' is : '" + Orientation.GetSelText + "'"
- if Border.GetSelText <> lsProps(19) then Warnlog "Border => changes not saved! should : '" + lsProps(19) + "' is : '" + Border.GetSelText + "'"
- end if
-
-'##### FrameControl #####
- if instr ( lcase ( sType ), "framecontrol" ) then
-' if Label.GetText <> lsProps(13) then Warnlog "Label => changes not saved! should : '" + lsProps(13) + "' is : '" + Label.GetText + "'"
- if CharacterSet.GetText <> lsProps(14) then Warnlog "Character set => changes not saved! should : '" + lsProps(14) + "' is : '" + CharacterSet.GetText + "'"
- end if
-
-
-'##### progressBar #####
- if instr ( lcase ( sType ), "progressbar" ) then
-' if ScrollValue.GetText <> lsProps(13) then Warnlog "Scroll value => changes not saved! should : '" + lsProps(13) + "' is : '" + ScrollValue.GetText + "'"
-' if ScrollValueMax.GetText <> lsProps(14) then Warnlog "Scroll value max. => changes not saved! should : '" + lsProps(14) + "' is : '" + ScrollValueMax.GetText + "'"'
-' if LineIncrement.GetText <> lsProps(15) then Warnlog "Line increment => changes not saved! should : '" + lsProps(15) + "' is : '" + LineIncrement.GetText + "'"'
-' if BlockIncrement.GetText <> lsProps(16) then Warnlog "Block increment => changes not saved! should : '" + lsProps(16) + "' is : '" + BlockIncrement.GetText + "'"'
-' if VisibleSize.GetText <> lsProps(17) then Warnlog "Visible size => changes not saved! should : '" + lsProps(17) + "' is : '" + VisibleSize.GetText + "'"'
-' if Orientation.GetSelText <> lsProps(18) then Warnlog "Orientation => changes not saved! should : '" + lsProps(18) + "' is : '" + Orientation.GetSelTextGetText + "'"'
- if Background.GetSelText <> lsProps(19) then Warnlog "Background => changes not saved! should : '" + lsProps(19) + "' is : '" + Background.GetSelText + "'"
- end if
-
-'##### FixedLine #####
- if instr ( lcase ( sType ), "fixedline" ) then
-' if Label.GetText <> lsProps(13) then Warnlog "Label => changes not saved! should : '" + lsProps(13) + "' is : '" + Label.GetText + "'"
-' if Orientation.GetSelText <> lsProps(14) then Warnlog "Orientation => changes not saved! should : '" + lsProps(14) + "' is : '" + Orientation.GetSelTextGetText + "'"'
- if CharacterSet.GetText <> lsProps(15) then Warnlog "Character set => changes not saved! should : '" + lsProps(15) + "' is : '" + CharacterSet.GetText + "'"
- end if
-
-'##### DateField #####
- if instr ( lcase ( sType ), "datefield" ) then
- if StrictFormat.GetSelText <> lsProps(13) then Warnlog "Strict format => changes not saved! should : '" + lsProps(13) + "' is : '" + StrictFormat.GetSelText + "'"'
- if Readonly.GetSelText <> lsProps(14) then Warnlog "Read only => changes not saved! should : '" + lsProps(14) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(15) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(15) + "' is : '" + TabStop.GetSelText + "'"
- if DateField.GetText <> lsProps(16) then Warnlog "Date => changes not saved! should : '" + lsProps(16) + "' is : '" + DateField.GetSelText + "'"
- if DateMin.GetText <> lsProps(17) then Warnlog "Date min. => changes not saved! should : '" + lsProps(17) + "' is : '" + DateMin.GetSelText + "'"
- if DateMax.GetText <> lsProps(18) then Warnlog "Date max => changes not saved! should : '" + lsProps(18) + "' is : '" + DateMax.GetSelText + "'"
- if DateFormat.GetSelText <> lsProps(19) then Warnlog "Date format => changes not saved! should : '" + lsProps(19) + "' is : '" + DateFormat.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(20) then Warnlog "Character set => changes not saved! should : '" + lsProps(20) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(21) then Warnlog "Background => changes not saved! should : '" + lsProps(21) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(22) then Warnlog "Border => changes not saved! should : '" + lsProps(22) + "' is : '" + Border.GetSelText + "'"
- if DropDown.GetSelText <> lsProps(23) then Warnlog "Drop Down => changes not saved! should : '" + lsProps(23) + "' is : '" + DropDown.GetSelText + "'"
- if Spin.GetSelText <> lsProps(24) then Warnlog "Spin button => changes not saved! should : '" + lsProps(24) + "' is : '" + Spin.GetSelText + "'"
- end if
-
-'##### TimeField #####
- if instr ( lcase ( sType ), "timefield" ) then
- if StrictFormat.GetSelText <> lsProps(13) then Warnlog "Strict format => changes not saved! should : '" + lsProps(13) + "' is : '" + StrictFormat.GetSelText + "'"'
- if Readonly.GetSelText <> lsProps(14) then Warnlog "Read only => changes not saved! should : '" + lsProps(14) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(15) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(15) + "' is : '" + TabStop.GetSelText + "'"
- if TimeField.GetText <> lsProps(16) then Warnlog "Time => changes not saved! should : '" + lsProps(16) + "' is : '" + TimeField.GetText + "'"
- if TimeMin.GetText <> lsProps(17) then Warnlog "Time min. => changes not saved! should : '" + lsProps(17) + "' is : '" + TimeMin.GetText + "'"
- if TimeMax.GetText <> lsProps(18) then Warnlog "Time max => changes not saved! should : '" + lsProps(18) + "' is : '" + TimeMax.Getext + "'"
- if TimeFormat.GetSelText <> lsProps(19) then Warnlog "Time format => changes not saved! should : '" + lsProps(19) + "' is : '" + TimeFormat.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(20) then Warnlog "Character set => changes not saved! should : '" + lsProps(20) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(21) then Warnlog "Background => changes not saved! should : '" + lsProps(21) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(22) then Warnlog "Border => changes not saved! should : '" + lsProps(22) + "' is : '" + Border.GetSelText + "'"
- if Spin.GetSelText <> lsProps(23) then Warnlog "Spin button => changes not saved! should : '" + lsProps(23) + "' is : '" + Spin.GetSelText + "'"
- end if
-
-'##### NumericField #####
- if instr ( lcase ( sType ), "numericfield" ) then
- if StrictFormat.GetSelText <> lsProps(13) then Warnlog "Strict format => changes not saved! should : '" + lsProps(13) + "' is : '" + StrictFormat.GetSelText + "'"'
- if Readonly.GetSelText <> lsProps(14) then Warnlog "Read only => changes not saved! should : '" + lsProps(14) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(15) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(15) + "' is : '" + TabStop.GetSelText + "'"
-
- if Value.GetText <> lsProps(16) then
- if Value.GetText <> lsProps(16) + "000" then
- Warnlog "Value => changes not saved! should : '" + lsProps(16) + "' is : '" + Value.GetText + "'"
- else
- Warnlog "Value => changes not saved! should : '" + lsProps(16) + "' is : '" + Value.GetText + "'"
- end if
- end if
- if ValueMin.GetText <> lsProps(17) then
- if ValueMin.GetText <> "-1,000,002.00000" then
- Warnlog "Value min. => changes not saved! should : '-1,000,002.00000' is : '" + ValueMin.GetText + "'"
- else
- Warnlog "Value min. => changes not saved! should : '" + lsProps(17) + "' is : '" + ValueMin.GetText + "'"
- end if
- end if
- if ValueMax.GetText <> lsProps(18) then
- if ValueMax.GetText <> "999,997.00000" then
- Warnlog "Value max => changes not saved! should : '999,997.00000' is : '" + ValueMax.GetText + "'"
- else
- Warnlog "Value max => changes not saved! should : '" + lsProps(18) + "' is : '" + ValueMax.GetText + "'"
- end if
- end if
- if ValueStep.GetText <> lsProps(19) then Warnlog "Incr./decrement value => changes not saved! should : '" + lsProps(19) + "' is : '" + ValueStep.GetText + "'"
- if Accuray.GetText <> lsProps(20) then Warnlog "Dec. accuracy => changes not saved! should : '" + lsProps(20) + "' is : '" + Accuray.GetText + "' Bugid #106852#"
- if ThousandSeperator.GetSelText <> lsProps(21) then Warnlog "Thousands seperator => changes not saved! should : '" + lsProps(21) + "' is : '" + ThousandSeperator.GetSelText + "' Bugid #106852#"
- if CharacterSet.GetText <> lsProps(22) then Warnlog "Character set => changes not saved! should : '" + lsProps(22) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(23) then Warnlog "Background => changes not saved! should : '" + lsProps(23) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(24) then Warnlog "Border => changes not saved! should : '" + lsProps(24) + "' is : '" + Border.GetSelText + "'"
- if Spin.GetSelText <> lsProps(25) then Warnlog "Spin button => changes not saved! should : '" + lsProps(25) + "' is : '" + Spin.GetSelText + "'"
- end if
-
-'##### CurrencyField #####
- if instr ( lcase ( sType ), "currencyfield" ) then
- if StrictFormat.GetSelText <> lsProps(13) then Warnlog "Strict format => changes not saved! should : '" + lsProps(13) + "' is : '" + StrictFormat.GetSelText + "'"'
- if Readonly.GetSelText <> lsProps(14) then Warnlog "Read only => changes not saved! should : '" + lsProps(14) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(15) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(15) + "' is : '" + TabStop.GetSelText + "'"
- if Value.GetText <> lsProps(16) then
- if Value.GetText <> lsProps(16) + "000" then
- Warnlog "Value => changes not saved! should : '" + lsProps(16) + "' is : '" + Value.GetText + "'"
- else
- Warnlog "Value => changes not saved! should : '" + lsProps(16) + "' is : '" + Value.GetText + "'"
- end if
- end if
- if ValueMin.GetText <> lsProps(17) then
- if ValueMin.GetText <> "-1,000,002.00000" then
- Warnlog "Value min. => changes not saved! should : '-1,000,002.00000' is : '" + ValueMin.GetText + "'"
- else
- Warnlog "Value min. => changes not saved! should : '" + lsProps(17) + "' is : '" + ValueMin.GetText + "'"
- end if
- end if
- if ValueMax.GetText <> lsProps(18) then
- if ValueMax.GetText <> "999,997.00000" then
- Warnlog "Value max => changes not saved! should : '999,997.00000' is : '" + ValueMax.GetText + "'"
- else
- Warnlog "Value max => changes not saved! should : '" + lsProps(18) + "' is : '" + ValueMax.GetText + "'"
- end if
- end if
- if ValueStep.GetText <> lsProps(19) then Warnlog "Incr./decrement value => changes not saved! should : '" + lsProps(19) + "' is : '" + ValueStep.GetText + "'"
- if Accuray.GetText <> lsProps(20) then Warnlog "Dec. accuracy => changes not saved! should : '" + lsProps(20) + "' is : '" + Accuray.GetText + "' Bugid #106852#"
- if ThousandSeperator.GetSelText <> lsProps(21) then Warnlog "Thousands seperator => changes not saved! should : '" + lsProps(21) + "' is : '" + ThousandSeperator.GetSelText + "' Bugid #106852#"
- if CurrencySymbol.GetText <> lsProps(22) then Warnlog "Currency symbol => changes not saved! should : '" + lsProps(22) + "' is : '" + CurrencySymbol.GetSelText + "'"
- if CurrSymPosition.GetSelText <> lsProps(23) then Warnlog "Prefix symbol => changes not saved! should : '" + lsProps(23) + "' is : '" + CurrSymPosition.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(24) then Warnlog "Character set => changes not saved! should : '" + lsProps(24) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(25) then Warnlog "Background => changes not saved! should : '" + lsProps(25) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(26) then Warnlog "Border => changes not saved! should : '" + lsProps(26) + "' is : '" + Border.GetSelText + "'"
- if Spin.GetSelText <> lsProps(27) then Warnlog "Spin button => changes not saved! should : '" + lsProps(27) + "' is : '" + Spin.GetSelText + "'"
- end if
-
-'##### FormattedField #####
- if instr ( lcase ( sType ), "formattedfield" ) then
- if MaxTextLen.GetText <> lsProps(13) then Warnlog "Max text lenght => changes not saved! should : '" + lsProps(13) + "' is : '" + MaxTextLen.GetText + "'"
- if StrictFormat.GetSelText <> lsProps(14) then Warnlog "Strict format => changes not saved! should : '" + lsProps(14) + "' is : '" + StrictFormat.GetSelText + "'"'
- if Readonly.GetSelText <> lsProps(15) then Warnlog "Read only => changes not saved! should : '" + lsProps(15) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(16) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(16) + "' is : '" + TabStop.GetSelText + "'"
-' if Effective.GetText <> lsProps(17) then Warnlog "Value => changes not saved! should : '" + lsProps(17) + "' is : '" + Effective.GetText + "'"
- if EffectiveMin.GetText <> lsProps(18) then
- printlog " Bugid #106852#:"
- if EffectiveMin.GetText <> "1.00" then
- Warnlog "Value min => changes not saved! should : '" + lsProps(18) + "' is : '" + EffectiveMin.GetText + "'"
- else
- Warnlog "Value min => changes not saved! should : '1.00' is : '" + EffectiveMin.GetText + "'"
- end if
- end if
- if EffectiveMax.GetText <> lsProps(19) then
- printlog " Bugid #106852#:"
- if EffectiveMax.GetText <> "1.00" then
- Warnlog "Value max => changes not saved! should : '1.00' is : '" + EffectiveMax.GetText + "'"
- else
- Warnlog "Value max => changes not saved! should : '" + lsProps(19) + "' is : '" + EffectiveMax.GetText + "'"
- end if
- end if
- if FormatKey.GetText <> lsProps(20) then Warnlog "Format key => changes not saved! should : '" + lsProps(20) + "' is : '" + FormatKey.GetText + "'"
- if CharacterSet.GetText <> lsProps(21) then Warnlog "Character set => changes not saved! should : '" + lsProps(21) + "' is : '" + CharacterSet.GetText + "'"
- if Align.GetSelText <> lsProps(22) then Warnlog "Alignment => changes not saved! should : '" + lsProps(22) + "' is : '" + Align.GetSelText + "' BugId #106872#"
- if Background.GetSelText <> lsProps(23) then Warnlog "Background => changes not saved! should : '" + lsProps(23) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(24) then Warnlog "Border => changes not saved! should : '" + lsProps(24) + "' is : '" + Border.GetSelText + "'"
- if Spin.GetSelText <> lsProps(25) then Warnlog "Spin button => changes not saved! should : '" + lsProps(25) + "' is : '" + Spin.GetSelText + "'"
- end if
-
-'##### PatternField #####
- if instr ( lcase ( sType ), "patternfield" ) then
- if TextText.GetText <> lsProps(13) then Warnlog "Text => changes not saved! should : '" + lsProps(13) + "' is : '" + TextText.GetText + "'"
- if MaxTextLen.GetText <> lsProps(14) then Warnlog "Max text lenght => changes not saved! should : '" + lsProps(14) + "' is : '" + MaxTextLen.GetText + "'"
- if EditMask.GetText <> lsProps(15) then Warnlog "Edit mask => changes not saved! should : '" + lsProps(15) + "' is : '" + EditMask.GetText + "'"
- if LiteralMask.GetText <> lsProps(16) then Warnlog "Literal mask => changes not saved! should : '" + lsProps(16) + "' is : '" + LiteralMask.GetText + "'"
- if StrictFormat.GetSelText <> lsProps(17) then Warnlog "Strict format => changes not saved! should : '" + lsProps(17) + "' is : '" + StrictFormat.GetSelText + "'"'
- if Readonly.GetSelText <> lsProps(18) then Warnlog "Read only => changes not saved! should : '" + lsProps(18) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(19) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(19) + "' is : '" + TabStop.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(20) then Warnlog "Character set => changes not saved! should : '" + lsProps(20) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(21) then Warnlog "Background => changes not saved! should : '" + lsProps(21) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(22) then Warnlog "Border => changes not saved! should : '" + lsProps(22) + "' is : '" + Border.GetSelText + "'"
- end if
-
-'##### FileControl #####
- if instr ( lcase ( sType ), "filecontrol" ) then
- if TextText.GetText <> lsProps(13) then Warnlog "Text => changes not saved! should : '" + lsProps(13) + "' is : '" + TextText.GetText + "'"
- if Readonly.GetSelText <> lsProps(14) then Warnlog "Read only => changes not saved! should : '" + lsProps(14) + "' is : '" + Readonly.GetSelText + "'"
- if TabStop.GetSelText <> lsProps(15) then Warnlog "Tab stop => changes not saved! should : '" + lsProps(15) + "' is : '" + TabStop.GetSelText + "'"
- if CharacterSet.GetText <> lsProps(16) then Warnlog "Character set => changes not saved! should : '" + lsProps(16) + "' is : '" + CharacterSet.GetText + "'"
- if Background.GetSelText <> lsProps(17) then Warnlog "Background => changes not saved! should : '" + lsProps(17) + "' is : '" + Background.GetSelText + "'"
- if Border.GetSelText <> lsProps(18) then Warnlog "Border => changes not saved! should : '" + lsProps(18) + "' is : '" + Border.GetSelText + "'"
- end if
-
-
-end function
diff --git a/testautomation/global/tools/includes/optional/t_docfuncs.inc b/testautomation/global/tools/includes/optional/t_docfuncs.inc
index 75aacf2e11e9..921879a80759 100644..100755
--- a/testautomation/global/tools/includes/optional/t_docfuncs.inc
+++ b/testautomation/global/tools/includes/optional/t_docfuncs.inc
@@ -31,8 +31,6 @@
'*
'\******************************************************************************
-private const VERBOSE = FALSE
-
function hUseImpressAutopilot( bEnable as boolean ) as boolean
'///<h3>Enable/disable the Impress Autopilot in Tools/Options</h3>
@@ -40,7 +38,7 @@ function hUseImpressAutopilot( bEnable as boolean ) as boolean
'///<ul>
const CFN = "global::tools::includes::optional::t_docfuncs.inc::hUseImpressAutopilot::"
- if ( VERBOSE ) then printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
'///+<li>Create a new IMPRESS document</li>
gApplication = "IMPRESS"
@@ -56,10 +54,10 @@ function hUseImpressAutopilot( bEnable as boolean ) as boolean
if ( bEnable ) then
mitAutopilotStarten.check()
- if ( VERBOSE ) then printlog( CFN & "Enable Impress Autopilot" )
+ if ( GVERBOSE ) then printlog( CFN & "Enable Impress Autopilot" )
else
mitAutopilotStarten.uncheck()
- if ( VERBOSE ) then printlog( CFN & "Disable Impress Autopilot" )
+ if ( GVERBOSE ) then printlog( CFN & "Disable Impress Autopilot" )
endif
'///+<li>Return Status of Checkbox (checked=TRUE)</li>
@@ -73,49 +71,19 @@ function hUseImpressAutopilot( bEnable as boolean ) as boolean
'///+<li>Close Tools/Options</li>
Kontext "OptionenDlg"
- OptionenDlg.OK()
-
+ hCloseDialog( OptionenDlg, "ok" )
+
'///+<li>Close IMPRESS document</li>
hDestroyDocument()
'///+<li>Returncode is undefined</li>
- if ( VERBOSE ) then printlog( CFN & "Exit" )
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
'///</ul>
end function
'*******************************************************************************
-function hCloseNavigator() as boolean
-
- '///<h3>Function to close the navigator</h3>
- const CFN = "global::tools::includes::optional::t_docfuncs.inc::hCloseNavigator::"
-
- if ( VERBOSE ) then printlog( CFN & "Enter" )
-
- Kontext "Navigator"
- if ( Navigator.Exists() ) then
- Navigator.Close()
- Navigator.notExists( 2 )
- if ( VERBOSE ) then printlog( CFN & "Closed Navigator" )
- else
- if ( VERBOSE ) then printlog( CFN & "Navigator not present" )
- endif
-
- Kontext "Navigator"
- if ( Navigator.exists() ) then
- hCloseNavigator() = false
- warnlog( CFN & "Failed to close Navigator, it is still open." )
- else
- hCloseNavigator() = true
- endif
-
- if ( VERBOSE ) then printlog( CFN & "Exit" )
-
-end function
-
-'*******************************************************************************
-
function hNumericDocType( doctype as integer ) as string
'///<h3>Convert a numeric expression to a gApplication</h3>
@@ -132,7 +100,7 @@ function hNumericDocType( doctype as integer ) as string
dim sList( 100 ) as string
dim iDocTypes as integer
- if ( VERBOSE ) then printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
'///+<li>Retrieve matching list from file</li>
hGetDataFileSection( sFile , sList() , "application" , "" , "" )
@@ -151,7 +119,7 @@ function hNumericDocType( doctype as integer ) as string
'///+<li>Set a plain text name as returnvalue for the function</li>
hGetDataFileSection( sFile , sList() , "application_names" , "" , "" )
hNumericDocType() = hGetValueForKeyAsString( sList() , gApplication )
- if ( VERBOSE ) then printlog( CFN & "Exit" )
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
'///</ul>
end function
@@ -184,28 +152,34 @@ function hChangeDoc() as string
case "WRITER", "HTML", "MASTERDOCUMENT"
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "<Return>This doc is changed!"
- hChangeDoc() = "Changed WRITER/HTML/MASTERDOC"
+ hChangeDoc() = "Changed WRITER/HTML/MASTERDOC"
+ 'DocumentWriter.typeKeys( "<MOD2 F6>" )
'///+<li>CALC: Write some text into the current location (usually A1)</li>
case "CALC" : Kontext "DocumentCalc"
DocumentCalc.TypeKeys "<Down>This doc is changed!<Return>"
- hChangeDoc() = "Changed CALC"
+ hChangeDoc() = "Changed CALC"
+ 'DocumentWriter.typeKeys( "<MOD2 F6>" )
'///+<li>DRAW: Draw a rectangle</li>
case "DRAW" : Kontext "DocumentDraw"
hRechteckErstellen ( 20, 20, 25, 25 )
gMouseClick ( 1, 1 )
- hChangeDoc() = "Changed DRAW"
+ hChangeDoc() = "Changed DRAW"
+ 'DocumentWriter.typeKeys( "<MOD2 F6>" )
'///+<li>IMPRESS: Draw a rectangle</li>
case "IMPRESS": Kontext "DocumentImpress"
hRechteckErstellen ( 20, 20, 25, 25 )
gMouseClick ( 1, 1 )
- hChangeDoc() = "Changed IMPRESS"
+ hChangeDoc() = "Changed IMPRESS"
+ 'DocumentWriter.typeKeys( "<MOD2 F6>" )
'///+<li>MATH: Create a simple formaula</li>
case "MATH" : SchreibenInMathdok( "b over c" )
- hChangeDoc() = "Changed MATH"
+ kontext "DocumentMath"
+ hChangeDoc() = "Changed MATH"
+ gMouseClick( 50 , 50 )
end select
'///</ul>
@@ -226,7 +200,7 @@ function hIdentifyWriterDoc( cString as string, bWarn as boolean ) as boolean
dim cIdentifier as string
dim irc as integer ' some temporary returnvalue
- if ( VERBOSE ) then printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
'///+<li>Test the function parameter</li>
if ( cString = "" ) then
@@ -253,14 +227,8 @@ function hIdentifyWriterDoc( cString as string, bWarn as boolean ) as boolean
DocumentWriter.typeKeys( "<SHIFT END>" )
'///+<li>copy the string to the clipboard and store it into a variable</li>
- try
- editcopy
- cIdentifier = getClipboardText()
- catch
- warnlog( "EditCopy failed. Probably the document is empty" )
- cIdentifier = "**** invalid ****"
- endcatch
-
+ hUseAsyncSlot( "EditCopy" )
+ cIdentifier = getClipboardText()
'///+<li>compare the string to the reference (given as parameter)</li>
irc = hCompareSubstrings( cIdentifier, cString )
@@ -271,7 +239,7 @@ function hIdentifyWriterDoc( cString as string, bWarn as boolean ) as boolean
if ( bWarn ) then
warnlog ( CFN & "The focus is not on the expected document" )
else
- if ( VERBOSE ) then printlog( CFN & "The focus is not on the expected document" )
+ if ( GVERBOSE ) then printlog( CFN & "The focus is not on the expected document" )
endif
printlog( CFN & "Expected: " & cString )
@@ -283,7 +251,7 @@ function hIdentifyWriterDoc( cString as string, bWarn as boolean ) as boolean
endif
'///+<li>Return TRUE only if the current document is the expected one</li>
- if ( VERBOSE ) then printlog( CFN & "Exit" )
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
'///</ul>
end function
@@ -300,12 +268,10 @@ function hCreateDocument() as boolean
dim iDocCountAfter as integer
iDocCountBefore = getDocumentCount
- if ( VERBOSE ) then printlog( CFN & "Number of open documents before: " & iDocCountBefore )
+ if ( GVERBOSE ) then printlog( CFN & "Number of open documents before: " & iDocCountBefore )
- if ( ucase( gApplication ) = "BACKGROUND" ) then
- do while( getDocumentCount > 0 )
- hCloseDocument()
- loop
+ if ( gApplication = "BACKGROUND" ) then
+ hFileCloseAll()
hCreateDocument() = true
else
@@ -317,7 +283,7 @@ function hCreateDocument() as boolean
hCreateDocument() = false
endif
endif
- if ( VERBOSE ) then printlog( CFN & "New document created. Open: " & iDocCountAfter )
+ if ( GVERBOSE ) then printlog( CFN & "New document created. Open: " & iDocCountAfter )
'///</ul>
end function
@@ -351,10 +317,9 @@ function hDocumentTypeKeys( cString as string ) as boolean
'///<ul>
const CFN = "global::tools::includes::optional::t_docfuncs.inc::hDocumentTypeKeys::"
- dim brc as boolean
- brc = true
- if ( VERBOSE ) then printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
+ hDocumentTypeKeys() = true
'///+<li>Set focus to the current documenttype determined by gApplication</li>
'///+<li>Type the string passed as function parameter</li>
@@ -375,15 +340,12 @@ function hDocumentTypeKeys( cString as string ) as boolean
DocumentWriter.typeKeys( cString )
case else
warnlog( CFN & "Exit: Unknown gApplication: " & gApplication )
- brc = false
+ hDocumentTypeKeys() = false
+ exit function
end select
'///+<li>Print some message to the log on success</li>
- if ( brc ) then
- printlog( CFN & "Exit: Sent keystroke to " & gApplication )
- endif
-
- hDocumentTypeKeys() = brc
+ printlog( CFN & "Exit: Sent keystroke to " & gApplication )
'///</ul>
end function
@@ -398,7 +360,7 @@ function hDestroyDocument() as boolean
hDestroyDocument() = false
if ( iDocCount = 0 ) then exit function
- if ( VERBOSE ) then printlog( CFN & "In.: Open: " & iDocCount )
+ if ( GVERBOSE ) then printlog( CFN & "In.: Open: " & iDocCount )
hUseAsyncSlot( "FileClose" )
@@ -406,16 +368,15 @@ function hDestroyDocument() as boolean
if ( Active.Exists( 2 ) ) then
printlog( "Msgbox: " & Active.getText() )
try
- Active.No
+ hCloseDialog( Active, "no" )
catch
- Active.Click ( 202 )
+ hCloseDialog( Active, "202" )
endcatch
- wait( 1000 )
end if
if ( getDocumentCount() = iDocCount ) then hCloseDocument()
if ( getDocumentCount() = iDocCount - 1 ) then hDestroyDocument() = true
- if ( VERBOSE ) then printlog( CFN & "Out: Open: " & getDocumentCount() )
+ if ( GVERBOSE ) then printlog( CFN & "Out: Open: " & getDocumentCount() )
end function
@@ -462,7 +423,7 @@ function hInitSingleDoc() as boolean
'///+<li>Verify that exactly one document is open</li>
if ( getDocumentCount = 1 ) then
- printlog( CFN & "A single unchanged writer document is open" )
+ printlog( "One single unchanged writer document is open" )
hInitSingleDoc() = true
else
printlog( CFN & "Failed to open just one single writer document" )
@@ -475,48 +436,7 @@ function hInitSingleDoc() as boolean
end function
-'*******************************************************************************
-
-function hInitBackingMode() as boolean
-
- '///<h3>Make that we are on the backing window (no open documents)</h3>
- '///<i>Close all open documents</i><br><br>
-
- '///<u>Parameter(s):</u><br>
- '///<ol>
- '///+<li>No input parameters</li>
- '///</ol>
-
-
- '///<u>Returns:</u><br>
- '///<ol>
- '///+<li>Errorcondition (Boolean)</li>
- '///<ul>
- '///+<li>TRUE: No open documents are present</li>
- '///+<li>FALSE: Any error</li>
- '///</ul>
- '///</ol>
-
- const CFN = "global::tools::includes::optional::t_docfuncs.inc::hInitBackingMode::"
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Close all documents until we are on the backing window</li>
- hFileCloseAll()
-
- '///+<li>verify that we do not have any open documents left (redundant check)</li>
- if ( getDocumentCount = 0 ) then
- printlog( CFN & "Office is in backing mode." )
- hInitBackingMode() = true
- else
- printlog( CFN & "Office is in undefined state." )
- hInitBackingMode() = false
- endif
- '///</ul>
-
-end function
-
-'*******************************************************************************
+'*******************************************************************************'*******************************************************************************
function hInitWriteDocIdentifier( cString as string ) as boolean
diff --git a/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc b/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc
index c231e6a798e6..eeb040e1cd0b 100644
--- a/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc
@@ -280,7 +280,7 @@ function hExtensionAddGUI( _path as string, _flags as string ) as integer
hExtensionAddGUI() = BrowsePackages.getItemCount()
'///+<li>Close the Extension Manager</li>
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
if ( bLogs ) then
printlog( "********** Installing extension end **********" )
@@ -349,7 +349,7 @@ function hExtensionRemoveGUI( cExtensionName as string ) as integer
endcatch
kontext "PackageManager"
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
else
hExtensionRemoveGUI() = 1
endif
@@ -456,7 +456,7 @@ function hExtensionGetItemList( cItemList() as string ) as integer
hExtensionGetItemList() = iItemCount
cItemList( 0 ) = iItemCount
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
else
@@ -496,7 +496,7 @@ function hSelectExtensionID( iPos as integer ) as string
catch
hSelectExtensionID() = ""
endcatch
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
else
hSelectExtensionID() = ""
endif
@@ -541,7 +541,7 @@ function hSelectExtensionName( cName as string ) as integer
catch
hSelectExtensionName() = 0
endcatch
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
else
hSelectExtensionName() = -1
endif
@@ -691,7 +691,7 @@ function hIsExtensionAlreadyInstalled( cName as string ) as boolean
endif
next
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
end function
@@ -741,7 +741,7 @@ function hDisableUserExtensionGUI( extension_name as string ) as integer
else
hDisableUserExtensionGUI() = 2
endif
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
catch
hDisableUserExtensionGUI() = 1
endcatch
@@ -762,7 +762,7 @@ function hGetExtensionCount() as integer
if ( PackageManager.exists( 2 ) ) then
try
hGetExtensionCount() = BrowsePackages.getItemCount()
- PackageManager.close()
+ hCloseDialog( PackageManager , "close" )
catch
hGetExtensionCount() = -2
endcatch
diff --git a/testautomation/global/tools/includes/optional/t_filetools.inc b/testautomation/global/tools/includes/optional/t_filetools.inc
index 76cbb35b153c..420b14ae9676 100644
--- a/testautomation/global/tools/includes/optional/t_filetools.inc
+++ b/testautomation/global/tools/includes/optional/t_filetools.inc
@@ -31,8 +31,6 @@
'*
'\******************************************************************************
-private const VERBOSE = false
-
function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean
'///<h3>Handle any dialogs that might pop up when loading a file</h3>
@@ -74,7 +72,7 @@ function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean
dim cMessage as string
dim bSkip as boolean
- if ( VERBOSE ) then printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
' not good but apparently required - else hDestroyDocument will handle the
' dialogs and warn about them.
@@ -169,7 +167,7 @@ function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean
printlog( CFN & "Exit: The test closed more dialogs than expected" )
hHandleActivesOnLoad() = false
else
- if ( VERBOSE ) then printlog( CFN & "Exit" )
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
endif
end function
@@ -208,7 +206,7 @@ function hHandleInitialDialogs() as integer
dim incident as integer
incident = 0
- if ( VERBOSE ) then printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
try
'///+<li>Test for UseOfThisTemplate-dialog</li>
@@ -254,7 +252,7 @@ function hHandleInitialDialogs() as integer
endcatch
hHandleInitialDialogs() = incident
- if ( VERBOSE ) then printlog( CFN & "Exit" )
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
'///</ul>
@@ -325,7 +323,7 @@ function hGetWorkPath() as string
sPath = convertpath( sPath )
'///+<li>Print info to the log and return the path</li>
- if ( VERBOSE ) then
+ if ( GVERBOSE ) then
if ( bPathIsFromAPI ) then
printlog( CFN & "(From API): " & sPath )
else
diff --git a/testautomation/global/tools/includes/optional/t_listfuncs.inc b/testautomation/global/tools/includes/optional/t_listfuncs.inc
index 2e9b6e20e1a3..e68c67511ff0 100644..100755
--- a/testautomation/global/tools/includes/optional/t_listfuncs.inc
+++ b/testautomation/global/tools/includes/optional/t_listfuncs.inc
@@ -29,158 +29,8 @@
'*
'* short description : Replacements for routines in t_lists.inc adds some
'*
-'*******************************************************************************
-'*
-' #1 hListTestUpperBoundary ' Tests upper boundary of arrays
-' #1 hListTestLowerBoundary ' Tests lower boundary of arrays
-' #1 hListDelete ' Deletes one item from a list by index
-' #1 hListAppend ' Append an item to a list
-' #1 hManageComparisionList ' quick way to compare/create reference lists
-' #1 hListFileGetSize ' find out how big an array has to be to hold the file
-' #1 hListCompare ' compare two lists
-' #1 hListPrependString ' Insert a string infront of each item in a list
-' #1 hListAppendList ' Append one list to another
-' #1 hCountMatchesInList ' Return count of occurrences of a string within a list
-'*
'\******************************************************************************
-' Note: These functions fix some minor bugs and introduce strict boundary
-' checking for the arrays we work with. The arrays must be compatible
-' to those from the "standard" list-functions.
-' Why: Two reasons:
-'
-' 1) When working with listboxes it might happen that they are empty (bug)
-' or contain more items than expected. In this case the tests would
-' usually break. This is not desired as many testcases do not rely
-' on the content of the listboxes.
-'
-' 2) This way eases the trouble of debugging huge amounts of arrays
-' like those in the installation test or anywhere else where we work
-' with reference lists. This is a coding help.
-
-'*******************************************************************************
-
-function hListTestUpperBoundary( aList() as string ) as boolean
-
- '///<h3>Verify that ListCount does not exceed upper boundary</h3>
- '///<i>About listfunctions: All listfunctions rely on a special type of
- '///+ array. This can be string arrays and - in some cases - numeric
- '///+ arrays. What makes the arrays unique is that the first item which
- '///+ has the index 0 contains the number of items in the list to be used,
- '///+ anything that is stored beyond this number is ignored. This has three
- '///+ consequences: 1) all listfunctions that alter an array must update
- '///+ the index stored in array(0) and 2) it is possible that the index
- '///+ point beyond ubound of the array which will most likely cause a
- '///+ runtime error. 3) Means that arrays may only have an upper boundary
- '///+ declared, all loops must start with index array(1) and must end with
- '///+ index array(val( array(0))</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>List (string)</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorstatus (boolean)</li>
- '///<ul>
- '///+<li>TRUE: Array is ok</li>
- '///+<li>FALSE: Array logic has errors</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
-
- const CFN = "hListTestUpperBoundary::"
-
- dim iUpperBoundary as integer ' size according to UBOUND
- dim iListSize as integer ' size according to ListCount
-
- dim brc as boolean
- brc = true
-
- '///+<li>Determine the size of the array</li>
- iUpperBoundary = UBOUND( aList() )
-
- '///+<li>Determine the <i>claimed</i> size of the array</li>
- iListSize = ListCount( aList() )
-
- '///+<li>Verify that val(array(0)) <= array-size</li>
- if ( iListSize > iUpperBoundary ) then
- warnlog ( CFN & "List points beyound upper array boundary:" )
- printlog( CFN & "ListCount: " & iListSize )
- printlog( CFN & "UBOUND...: " & iUpperBoundary )
- brc = false
- endif
-
- hListTestUpperBoundary() = brc
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hListTestLowerBoundary( aList() as string ) as boolean
-
- '///<h3>Verify that the lower boundaries of an array are ok</h3>
- '///<i>Prerequisite: Array compatible with those from t_lists.inc</i>
- '///<i>About listfunctions: All listfunctions rely on a special type of
- '///+ array. This can be string arrays and - in some cases - numeric
- '///+ arrays. What makes the arrays unique is that the first item which
- '///+ has the index 0 contains the number of items in the list to be used,
- '///+ anything that is stored beyond this number is ignored. This has three
- '///+ consequences: 1) all listfunctions that alter an array must update
- '///+ the index stored in array(0) and 2) it is possible that the index
- '///+ point beyond ubound of the array which will most likely cause a
- '///+ runtime error. 3) Means that arrays may only have an upper boundary
- '///+ declared, all loops must start with index array(1) and must end with
- '///+ index array(val( array(0))</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>List (string)</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorstatus (boolean)</li>
- '///<ul>
- '///+<li>TRUE: Array is ok</li>
- '///+<li>FALSE: Array logic has errors</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- const CFN = "hListTestLowerBoundary::"
-
- dim iLowerBoundary as integer ' size according to LBOUND
- dim iListSize as integer ' size according to ListCount
-
- dim brc as boolean
- brc = true
-
- iLowerBoundary = LBOUND( aList() )
- iListSize = ListCount( aList() )
-
- '///+<li>Verify that ubound for the array returns 0 (lower boundary)</li>
- if ( iLowerBoundary <> 0 ) then
- warnlog ( CFN & "Boundary of the array must be 0." )
- printlog( CFN & "Lower boundary is: " & iLowerBoundary )
- brc = false
- endif
-
- '///+<li>Verify that val(array(0)) &gt; 0</li>
- if ( iListSize < 0 ) then
- warnlog ( CFN & "Defined Listsize (ListCount) may never be negative" )
- printlog( CFN & "ListCount is: " & iListSize )
- brc = false
- endif
-
- hListTestLowerBoundary() = brc
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hListDelete( aList() as string, iItemToDelete as integer ) as boolean
'///<h3>Delete one item from a list specified by index</h3>
@@ -209,20 +59,6 @@ function hListDelete( aList() as string, iItemToDelete as integer ) as boolean
dim sItemToDelete as string ' The string that will be deleted
dim brc as boolean ' preliminary return value
- '///+<li>test array integrity: upper boundary</li>
- brc = hListTestUpperBoundary( alist() )
- if ( not brc ) then
- hListDelete() = brc
- exit function
- endif
-
- '///+<li>test array integrity: lower boundary</li>
- brc = hListTestLowerBoundary( alist() )
- if ( not brc ) then
- hListDelete() = brc
- exit function
- endif
-
'///+<li>Get some data from the arrays to work with.</li>
iArraySize = ubound( aList() )
iListSizeOld = ListCount( aList() )
@@ -324,77 +160,44 @@ function hManageComparisionList( sFileIn as string, sFileOut as string, sListOut
'///<ul>
const CFN = "hManageComparisionList::"
-
- '///+<li>The name of the input file may not be empty</li>
- if ( sFileIn = "" ) then
- warnlog( CFN & "Invalid parameter: Input filename is empty string" )
- hManageComparisionList() = 2
- exit function
- endif
-
- '///+<li>The name of the output-file may not be empty</li>
- if ( sFileOut = "" ) then
- warnlog( CFN & "Invalid parameter: Output filename is empty string" )
- hManageComparisionList() = 3
- exit function
- endif
-
- '///+<li>the list should not claim to be empty / be empty</li>
- if ( listcount( sListOut() ) = 0 ) then
- qaerrorlog( CFN & "Invalid parameter: Array claims to be empty" )
- hManageComparisionList() = 4
- exit function
- endif
-
- ' hListFileGetSize will return -1 if the list does not exist or the number
- ' of lines in the reference file plus additional 10 lines.
- '///+<li>Verify that the reference file exists and is non-empty</li>
- dim iFileSize as integer
- iFileSize = hListFileGetSize( sFileIn )
- dim brc as boolean
- brc = false
-
- '///+<li>Read the reference list and compare</li>
- if ( iFileSize > -1 ) then
-
- dim aReferenceList( iFileSize ) as string
- printlog( CFN & "Reading: " & sFileIn )
- ' disabled hGetDataFileSection because some lists contain a #
- ' (hash) as value which is identified as comment by the function.
- ' Fixing this for hGetDataFileSection() would break compatibility
- ' to other functions both in framework and global module
- 'hgetDataFileSection( sFileIn , aReferenceList() , "" , "" , "" )
- listread( aReferenceList(), sFileIn, "utf8" )
- brc = hListCompare( sListOut() , aReferenceList() )
+ const FILESIZE = 10000
+ const COMPARE_SUCCESS = 0
+ const ENCODING_UTF8 = "UTF8"
+
+ dim irc as integer
+ dim aReferenceList( FILESIZE ) as string
+
+ if ( GVERBOSE ) then printlog( CFN & "Reading: " & sFileIn )
+ ' disabled hGetDataFileSection because some lists contain a #
+ ' (hash) as value which is identified as comment by the function.
+ ' Fixing this for hGetDataFileSection() would break compatibility
+ ' to other functions both in framework and global module
+ 'hgetDataFileSection( sFileIn , aReferenceList() , "" , "" , "" )
+ listread( aReferenceList(), sFileIn, ENCODING_UTF8 )
+ irc = hListCompare( sListOut() , aReferenceList() )
- endif
-
' A this point there are three possible states:
' a) the reference list does not exist
' b) the comparision failed
' c) the comparision succeeded
- ' only if hListCompare() returns TRUE the testrun is successful.
+ ' only if hListCompare() returns 0 the testrun is successful.
' This means that on any error, the ref-list will be written so it can be
' directly reviewed/compared to the "faulty" list without having to run this
' test again (after deleting the ref-file)
'///+<li>In case the lists are not identical, write the new one to the local work directory</li>
- if ( brc ) then
+ if ( irc = COMPARE_SUCCESS ) then
printlog( CFN & "Comparision succeeded" )
- hManageComparisionList() = 0
+ hManageComparisionList() = COMPARE_SUCCESS
else
- printlog( CFN & "Writing: " & sFileOut )
- listwrite( sListOut(), sFileOut, "UTF8" )
- qaerrorlog ( CFN & "Reference file review required:" )
- printlog( "" )
- printlog( CFN & "Two possible reasons:" )
- printlog( CFN & "1) The reference file does not exist at all" )
- printlog( CFN & "2) Reference and actual UI-Content do not match." )
- printlog( CFN & "Location: " & sFileOut )
- printlog( CFN & "Target..: " & sFileIn )
- printlog( CFn & "Verify the content and copy the file to <Target>" )
- printlog( "" )
- printlog( CFN & "Comparision failed" )
- hManageComparisionList() = 1
+ if ( GVERBOSE ) then
+ printlog( CFN & "The two compared lists differ. There are two likely reasons:" )
+ printlog( CFN & "1) The reference file does not exist at all" )
+ printlog( CFN & "2) Reference and actual UI-Content do not match." )
+ printlog( CFN & "Verify and copy the file: " & sFileOut )
+ printlog( CFN & "to this location........: " & sFileIn )
+ endif
+ listwrite( sListOut(), sFileOut, ENCODING_UTF8 )
+ hManageComparisionList() = irc
endif
'///+<li>Return 0 if the lists are identical, 1 if not and 2-4 on any other error</li>
@@ -404,69 +207,7 @@ end function
'*******************************************************************************
-function hListFileGetSize( sFileIn as string ) as integer
-
- '///<h3>Get the number of lines from a file</h3>
- '///<i>Prerequisites: Path to an existing plain text file</i>
- '///<i>About listfunctions: All listfunctions rely on a special type of
- '///+ array. This can be string arrays and - in some cases - numeric
- '///+ arrays. What makes the arrays unique is that the first item which
- '///+ has the index 0 contains the number of items in the list to be used,
- '///+ anything that is stored beyond this number is ignored. This has three
- '///+ consequences: 1) all listfunctions that alter an array must update
- '///+ the index stored in array(0) and 2) it is possible that the index
- '///+ point beyond ubound of the array which will most likely cause a
- '///+ runtime error. 3) Means that arrays may only have an upper boundary
- '///+ declared, all loops must start with index array(1) and must end with
- '///+ index array(val( array(0))</i><br>
- '///<ul>
-
- const CFN = "hListFileGetSize::"
- const I_EXTRA_SIZE = 10
-
- '///+<li>Verify that the filename is non-empty</li>
- if ( sFileIn = "" ) then
- warnlog( CFN & "Invalid parameter: Filename is empty string" )
- hListFileGetSize() = -1
- exit function
- endif
-
- '///+<li>Verify that the file exists</li>
- if ( dir( sFileIn ) = "" ) then
- warnlog( CFN & "File not found: " & sFileIn )
- hListFileGetSize() = -1
- exit function
- endif
-
- dim iFile as integer
- dim sLine as string
- dim iLineCount as integer
- iLineCount = 0
-
- '///+<li>Open the file (standard BASIC calls)</li>
- iFile = freefile
- open sFileIn for input as iFile
-
- '///+<li>Read the number of lines from the file</li>
- while( not eof( iFile ) )
-
- line input #iFile, sLine
- iLineCount = iLineCount + 1
-
- wend
-
- '///+<li>Close the file</li>
- close #iFile
-
- '///+<li>Return the number of lines read or -1 on error</li>
- hListFileGetSize() = iLineCount + I_EXTRA_SIZE
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hListCompare( aListOne() as String, aListTwo() as String ) as boolean
+function hListCompare( aListOne() as String, aListTwo() as String ) as integer
const CFN = "hListcompare::"
@@ -496,14 +237,13 @@ function hListCompare( aListOne() as String, aListTwo() as String ) as boolean
dim iListOneSize as integer
dim bFound as boolean
- dim brc as boolean ' returncode: true only if lists are identical
- brc = true
+ dim irc as integer : irc = 0
'///+<li>Create a copy of list two so we do not change the original list</li>
ListCopy( aListTwo() , aTwoOnlyList() )
iTwoOnlyListSize = ListCount( aTwoOnlyList() )
- iListOneSize = ListCount( aListOne() )
+ iListOneSize = ListCount( aListOne() )
'///+<li>Step through each item in list one</li>
@@ -529,9 +269,7 @@ function hListCompare( aListOne() as String, aListTwo() as String ) as boolean
next iListTwoIndex
'///+<li>If there is no match, the item exists in list one only -> copy</li>
- if ( not bFound ) then
- hListAppend( aListOne( iListOneIndex ), aOneOnlyList() )
- end if
+ if ( not bFound ) then hListAppend( aListOne( iListOneIndex ), aOneOnlyList() )
next iListOneIndex
@@ -542,17 +280,17 @@ function hListCompare( aListOne() as String, aListTwo() as String ) as boolean
if ( ListCount( aOneOnlyList() ) > 0 ) then
printlog( CFN & "Objects have been added to the list" )
hListPrint( aOneOnlyList() , "Items found in list ONE only (NEW)" )
- brc = false
+ irc = ListCount( aOneOnlyList() )
end if
'///+<li>List all items that exist in List Two only</li>
if ( ListCount( aTwoOnlyList() ) > 0 ) then
printlog( CFN & "Objects have been removed from the list" )
hListPrint( aTwoOnlyList() , "Items found in list TWO only (MISSING)" )
- brc = false
+ irc = ListCount( aOneOnlyList() ) * -1
end if
- hListCompare() = brc
+ hListCompare() = irc
'///</ul>
end function
@@ -731,3 +469,36 @@ function hCountMatchesInList( acItemList() as string, cSearchTerm as string ) as
hCountMatchesInList() = iHitCount
end function
+
+'*******************************************************************************
+
+function hListResultEvaluation( i_diffcount as integer, i_allowed_delta as integer ) as boolean
+
+ ' This function evaluates the outcome of hManageComaprisionList() or
+ ' hListCompare(). This extra step is done because in some cases the
+ ' program installations might differ slightly - in some CWS (when using the
+ ' archive) we can end up having a different set of import/export filters.
+ ' So the evaluation must allow for a specific number of mismatches which is
+ ' specified in i_allowed_delta.
+
+ hListResultEvaluation() = true
+
+ ' If lists are identical we return directly.
+ if ( i_diffcount = 0 ) then
+ printlog( "The lists are identical. Good" )
+ exit function
+ endif
+
+ ' if we have differences we need to have a closer look.
+ ' Note that the difference is optional.
+ if ( i_allowed_delta <> 0 ) then
+ if ( i_diffcount = i_allowed_delta ) then
+ printlog( "The lists have the allowed delta of " & i_allowed_delta )
+ exit function
+ endif
+ endif
+
+ warnlog( "The list check failed, please review the test." )
+ hListResultEvaluation() = false
+
+end function
diff --git a/testautomation/global/tools/includes/optional/t_macro_tools.inc b/testautomation/global/tools/includes/optional/t_macro_tools.inc
index 825a1f98bef2..03738a96666c 100644..100755
--- a/testautomation/global/tools/includes/optional/t_macro_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_macro_tools.inc
@@ -56,6 +56,8 @@ function hInsertMacroFromFile( cMacroId as string, optional cSource as string )
'///<ul>
const CFN = "hInsertMacroFromFile::"
+ const RETVAL_FAILURE = 0
+ const MAX_LINES_IN_MACRO_FILE = 10000
'///+<li>Find the path to the source file</li>
dim cFile as string
@@ -65,11 +67,7 @@ function hInsertMacroFromFile( cMacroId as string, optional cSource as string )
cFile = convertpath( cSource )
endif
- '///+<li>Determine the required array size</li>
- dim iArraySize as integer
- iArraySize = hListFileGetSize( cFile )
-
- dim aInstructionList( iArraySize ) as string
+ dim aInstructionList( MAX_LINES_IN_MACRO_FILE ) as string
dim iInstructionCount as integer
dim iCurrentInstruction as integer
@@ -82,10 +80,8 @@ function hInsertMacroFromFile( cMacroId as string, optional cSource as string )
cMacroId, "", "" )
'///+<li>Delete all content from the BASIC IDE edit window</li>
- brc = hDeleteMacro()
-
'///+<li>Insert the code into the IDE line by line</li>
- if ( brc ) then
+ if ( hDeleteMacro() ) then
for iCurrentInstruction = 1 to iInstructionCount
@@ -100,7 +96,7 @@ function hInsertMacroFromFile( cMacroId as string, optional cSource as string )
else
printlog( CFN & "IDE is not empty, will not insert macro" )
- hInsertMacroFromFile() = 0
+ hInsertMacroFromFile() = RETVAL_FAILURE
endif
'///</ul>
@@ -111,66 +107,38 @@ end function
function hMacroOrganizerRunMacro( cMacroName as string ) as integer
- '///<h3>Execute a macro by name</h3>
- '///<i>Starting point: Any document</i><br>
- '///+<i>The function runs silent</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Name of the macro to be run (string)</li>
- '///<ul>
- '///+<li>Any macro that can run by itself (main)</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Position of the macro in the treelist (integer)</li>
- '///<ul>
- '///+<li>0 = error</li>
- '///+<li>1-n = position of macro</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- dim irc as integer
+ ' Run a macro by name. Returnvalues as follows:
+ ' = 0: any error
+ ' > 0: position of macro in the list, success.
+
const CFN = "hMacroOrganizerRunMacro::"
+ const RETVAL_FAILURE = 0
- '///+<li>Go to Tools/Macros/Organize Macros/OpenOffice.org Basic</li>
- printlog( CFN & "Enter with option: " & cMacroName )
- ToolsMacro_uno
-
- '///+<li>Find the Macro</li>
- kontext "Makro"
- hExpandAllNodes( MakroAus )
- irc = hSelectNodeByName( MakroAus , cMacroName )
- hExpandNode( MakroAus, irc )
- hSelectNextNode( MakroAus )
+ dim iMacroPosition as integer
+
+ ToolsMacro_uno
- if ( MakroAus.getSelText() = cMacroName ) then
- printlog( CFN & "Matching object found: " & cMacroName )
- else
- irc = 0
- endif
-
-
- '///+<li>Run the macro</li>
kontext "Makro"
- if ( Ausfuehren.exists( 1 ) ) then
- if ( Ausfuehren.isEnabled( 1 ) ) then
- Ausfuehren.click()
+ if ( Makro.exists( 2 ) ) then
+ hExpandAllNodes( MakroAus )
+ iMacroPosition = hSelectNodeByName( MakroAus, cMacroName )
+ if ( iMacroPosition ) then
+ iMacroPosition = hSelectNextNode( MakroAus )
+ if ( hClickButton( Ausfuehren ) ) then
+ hMacroOrganizerRunMacro() = iMacroPosition
+ else
+ ' run macro button not enabled
+ warnlog( CFN & "Unable to click <Run macro> button" )
+ hMacroOrganizerRunMacro() = RETVAL_FAILURE
+ endif
else
- printlog( CFN & "Could not execute macro, button is disabled" )
- Makro.close()
- irc = 0
+ warnlog( CFN & "Macro was not found" )
+ hMacroOrganizerRunMacro() = RETVAL_FAILURE
endif
else
- printlog( CFN & "Control does not exist/context failed" )
- Makro.close()
- irc = 0
+ warnlog( CFN & "Failed to open Macro Organizer" )
+ hMacroOrganizerRunMacro() = RETVAL_FAILURE
endif
-
- hMacroOrganizerRunMacro() = irc
- printlog( CFN & "Exit with result: " & irc )
- '///</ul>
+
end function
diff --git a/testautomation/global/tools/includes/optional/t_ole.inc b/testautomation/global/tools/includes/optional/t_ole.inc
index 28268ef5394e..f31798c37bbc 100644..100755
--- a/testautomation/global/tools/includes/optional/t_ole.inc
+++ b/testautomation/global/tools/includes/optional/t_ole.inc
@@ -31,36 +31,37 @@
'*
'\******************************************************************************
-private const VERBOSE = FALSE
-
-'*******************************************************************************
-
function hGetOfficeVersion() as string
- dim cPath as string
- dim aItemList( 20 ) as string
-
const CFN = "global::tools::includes::optional::t_ole.inc::hGetOfficeVersion(): "
+ const DATAFILE = "global/input/officeinfo.txt"
+ const MAX_LINES_IN_DATAFILE = 20
+ dim cPath as string
+ dim aItemList( MAX_LINES_IN_DATAFILE ) as string
+
' Path to info file
- cPath = convertpath( gTesttoolPath & "global/input/officeinfo.txt" )
- if ( VERBOSE ) then printlog( CFN & "Reading: " & cPath )
+ cPath = convertpath( gTesttoolPath & DATAFILE )
+ if ( GVERBOSE ) then printlog( CFN & "Reading: " & cPath )
- ' Read the file
+ ' Read the file, store the list of known office versions
hGetDatafileSection( cPath, aItemList(), "", "", "" )
- ' Set global variable
+ ' Search for the version number matching the product name, store value in global variable
gOfficeVersion = hGetValueForKeyAsString( aItemList(), gProductName )
- ' Set returnvalue
+ ' Return content of the global variable as well
hGetOfficeVersion() = gOfficeVersion
end function
'*******************************************************************************
-function hGetOleObjectName( ObjectType as string ) as string
+function hGetOleObjectName( cApplication as string ) as string
+
+ ' for cApplication you may pass gApplication.
+ dim Application_API_Name as string
dim oUnoOfficeConnection as object
dim oUnoConfigurationAccess as object
dim aPropertyValue(1) as new com.sun.star.beans.PropertyValue
@@ -69,28 +70,26 @@ function hGetOleObjectName( ObjectType as string ) as string
dim cString as string
const CFN = "global::tools::includes::optional::t_ole.inc::hGetOleObjectName(): "
-
- ' Test function parameters. They are <> gApplication as the API is case sensitive
- select case ObjectType
- case "Writer"
- case "Calc"
- case "Impress"
- case "Draw"
- case "Math"
- case "Chart"
+
+ ' The application names for the API are case sensitive so we cannot use gApplication
+ select case ( cApplication )
+ case "WRITER" : Application_API_Name = "Writer
+ case "CALC" : Application_API_Name = "Calc"
+ case "IMPRESS": Application_API_Name = "Impress"
+ case "DRAW" : Application_API_Name = "Draw"
+ case "MATH" : Application_API_Name = "Math"
+ case "CHART" : Application_API_Name = "Chart"
case else
- warnlog( CFN & "Invalid object type passed to function: " & ObjectType )
- warnlog( CFN & "This function is case sensitive." )
- warnlog( CFN & "Supported are: Writer, Calc, Impress, Draw, Math, Chart" )
+ warnlog( CFN & "Invalid object type passed to function: " & cApplication )
hGetOleObjectName() = ""
exit function
end select
- if ( VERBOSE ) then printlog( CFN & "Retrieving OLE name for: " & ObjectType )
+ if ( GVERBOSE ) then printlog( CFN & "Retrieving OLE name for: " & cApplication )
' ...Embedding is physical path, ObjectNames the top node
aPropertyValue( 0 ).Name = "nodepath"
- aPropertyValue( 0 ).Value = "/org.openoffice.Office.Embedding/ObjectNames/" & ObjectType
+ aPropertyValue( 0 ).Value = "/org.openoffice.Office.Embedding/ObjectNames/" & Application_API_Name
' Connect to remote UNO
oUnoOfficeConnection = hGetUnoService( TRUE )
@@ -125,7 +124,7 @@ end function
function GetOleDefaultNames()
const CFN = "global::tools::includes::optional::t_ole.inc::GetOleDefaultNames(): "
- if ( VERBOSE ) then printlog( CFN & "Retrieving OLE names" )
+ if ( GVERBOSE ) then printlog( CFN & "Retrieving OLE names" )
hGetOfficeVersion()
gOLEWriter = hGetOleObjectName( "Writer" )
diff --git a/testautomation/global/tools/includes/optional/t_proxy_info.inc b/testautomation/global/tools/includes/optional/t_proxy_info.inc
deleted file mode 100644
index 90fe1cfe3e48..000000000000
--- a/testautomation/global/tools/includes/optional/t_proxy_info.inc
+++ /dev/null
@@ -1,138 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Tools to retrieve auxilary environment information
-'*
-'*******************************************************************************
-'**
-' #1 hGetProxyInfo ' Retrieve the names and ports of the proxies
-' #0 hPrintProxyInstructions ' print instructions to the log
-'**
-'\******************************************************************************
-
-function hGetProxyInfo( sSection as string, sItem as string ) as string
-
-
- '///<h3>Retrieve the names and ports of the proxies</h3>
- '///<i>This function retrieves the names and ports of the proxies used
- '///+ in your local network. The data is taken from a textfile that is
- '///+ not visible on OpenOffice.org (Sun security policy)<br>
- '///+ If the file is not found a message is printed to the log that
- '///+ gives instructions on how to create and format such a file and
- '///+ what other steps must be taken to make this work for your local
- '///+ network (don't panic, it's simple!).</i><br><br>
-
- '///<u>Input values:</u><br>
- '///<ol>
-
- '///+<li>Section (string). Valid options:</li>
- '///<ul>
- '///+<li>&quot;http_proxy&quot;</li>
- '///+<li>&quot;ftp_proxy&quot;</li>
- '///+<li>&quot;socks_proxy&quot;</li>
- '///+<li>&quot;no_proxy_for&quot;</li>
- '///</ul>
-
- '///+<li>Item (string). Valid options:</li>
- '///<ul>
- '///+<li>&quot;Name&quot;</li>
- '///+<li>&quot;Port&quot; (not for &quot;no_proxy_for&quot)</li>
- '///</ul>
-
- '///</ol>
-
-
- '///<u>Return Value:</u><br>
- '///<ol>
- '///+<li>Name or port of an item (string)</li>
- '///<ul>
- '///+<li>Empty String on error</li>
- '///</ul>
- '///</ol>
-
- const CFN = "hGetProxyInfo::"
-
- dim irc as integer ' some integer returnvalue
- dim crc as string ' some string returnvalue
-
- ' This is the workfile. Make sure it exists and contains valid data
- dim cFile as string
- cFile = gTesttoolPath & "sun_global\input\proxies.txt"
- ' cFile = gTesttoolPath & "global\input\proxies.txt"
- cFile = convertpath ( cFile )
-
- ' this is a temporary list that holds the workfile
- dim acList( 50 ) as string
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Open the file, read the section, abort on error</li>
- irc = hGetDataFileSection( cFile, acList(), sSection , "" , "" )
- if ( irc = 0 ) then
- qaerrorlog( CFN & "File or section not found" )
- hGetProxyInfo() = ""
- hPrintProxyInstructions()
- exit function
- endif
-
- '///+<li>Isolate the key</li>
- crc = hGetValueForKeyAsString( acList(), sItem )
- if ( instr( crc , "Error:" ) > 0 ) then
- qaerrorlog( CFN & "The requested item could not be found" )
- hGetProxyInfo() = ""
- hPrintProxyInstructions()
- exit function
- endif
-
- '///+<li>Return the requested item</li>
-
- '///</ul>
-
- hGetProxyInfo() = crc
-
-end function
-
-'*******************************************************************************
-
-function hPrintProxyInstructions()
-
- printlog( "" )
- printlog( "How to configure proxy settings for your local network" )
- printlog( "" )
- printlog( "1. Edit the sample configuration file" )
- printlog( " Location: global/input/proxies.txt" )
- printlog( " Replace servernames and ports with valid entries" )
- printlog( "" )
- printlog( "2. Edit the function hGetProxyInfo" )
- printlog( " Make the first line with cFile = ... a comment"
- printlog( " Make the second line with cFile = ... active"
- printlog( " Save the file" )
- printlog( "" )
-
-end function
diff --git a/testautomation/global/tools/includes/optional/t_security_tools.inc b/testautomation/global/tools/includes/optional/t_security_tools.inc
index 2306bda01e27..24a718fd7a48 100755
--- a/testautomation/global/tools/includes/optional/t_security_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_security_tools.inc
@@ -68,35 +68,42 @@ function hSetPasswordRecommendation( bEnable as boolean ) as boolean
'///+<li>Click on the &quot;Options...&quot; button</li>
kontext "TabSecurity"
- Options.click()
+ if ( hClickButton( Options ) ) then
- kontext "TabSecurityOptionsAndWarnings"
- if ( TabSecurityOptionsAndWarnings.exists( 1 ) ) then
-
- '///+<li>Retrieve the current setting for passwor recommendation</li>
- if ( RecommendPasswordProtectionOnSaving.isChecked() ) then
- hSetPasswordRecommendation() = true
+ kontext "TabSecurityOptionsAndWarnings"
+ if ( TabSecurityOptionsAndWarnings.exists( 1 ) ) then
+
+ '///+<li>Retrieve the current setting for passwor recommendation</li>
+ if ( RecommendPasswordProtectionOnSaving.isChecked() ) then
+ hSetPasswordRecommendation() = true
+ else
+ hSetPasswordRecommendation() = false
+ endif
+
+ '///+<li>Set the requested state</li>
+ if ( bEnable ) then
+ printlog( CFN & "Enabled password recommendation" )
+ RecommendPasswordProtectionOnSaving.check()
+ else
+ printlog( CFN & "Disabled password recommendation" )
+ RecommendPasswordProtectionOnSaving.uncheck()
+ endif
+
+ hCloseDialog( TabSecurityOptionsAndWarnings, "ok" )
+
else
+ warnlog( "Failed to open security options page" )
hSetPasswordRecommendation() = false
endif
-
- '///+<li>Set the requested state</li>
- if ( bEnable ) then
- printlog( CFN & "Enabled password recommendation" )
- RecommendPasswordProtectionOnSaving.check()
- else
- printlog( CFN & "Disabled password recommendation" )
- RecommendPasswordProtectionOnSaving.uncheck()
- endif
- TabSecurityOptionsAndWarnings.ok()
else
- warnlog( "Failed to open security options page" )
+ warnlog( CFN & "Unable to click options button" )
+ hSetPasswordRecommendation() = false
endif
'///+<li>Close Tools/Options</li>
Kontext "ToolsOptionsDlg"
- ToolsOptionsDlg.ok()
+ hCloseDialog( ToolsOptionsDlg, "ok" )
else
warnlog( "Failed to open Tools/Options" )
@@ -127,19 +134,23 @@ function hOpenDigitalSignaturesDialog() as boolean
'///<u>Description</u>:
'///<ul>
- dim brc as boolean
const CFN = "hOpenDigitalSignaturesDialog::"
+ const FILE_MENU_POSITION = 1
+ const SIGNATURES_MENU_POSITION_OTHER = 15
+ const SIGNATURES_MENU_POSITION_MATH = 14
+
+ hOpenDigitalSignaturesDialog() = false
'///+<li>Open the file-menu</li>
call hUseMenu()
- call hMenuSelectNr( 1 )
+ call hMenuSelectNr( FILE_MENU_POSITION )
'///+<li>Select &quot;Digital signatures...&quot;</li>
try
- if ( ucase( gApplication ) = "MATH" ) then
- call hMenuSelectNr( 14 )
+ if ( gApplication = "MATH" ) then
+ call hMenuSelectNr( SIGNATURES_MENU_POSITION_MATH )
else
- call hMenuSelectNr( 15 )
+ call hMenuSelectNr( SIGNATURES_MENU_POSITION_OTHER )
endif
catch
warnlog( CFN & "Failed to execute menuitem <Digital Signature...>" )
@@ -155,13 +166,9 @@ function hOpenDigitalSignaturesDialog() as boolean
kontext "DigitalSignature"
if ( DigitalSignature.exists() ) then
printlog( CFN & "Digital signatures is open" )
- brc = true
- else
- brc = false
+ hOpenDigitalSignaturesDialog() = true
endif
-
'///</ul>
- hOpenDigitalSignaturesDialog() = brc
end function
@@ -188,18 +195,18 @@ function hAllowMacroExecution() as boolean
'///<ul>
const CFN = "hAllowMacroExecution::"
+ const MAX_WAIT_FOR_SECURITY_DIALOG = 5
'///+<li>Verify that the Macro security Warning is displayed</li>
kontext "SecurityWarning"
- if ( SecurityWarning.exists( 5 ) ) then
+ if ( SecurityWarning.exists( MAX_WAIT_FOR_SECURITY_DIALOG ) ) then
'///+<li>Click &quot;Run&quot; to allow macro execution</li>
- SecurityWarning.ok()
- hAllowMacroExecution() = true
- printlog( CFN & "Allowed macro execution" )
+ printlog( CFN & "Allowing macro execution" )
+ hAllowMacroExecution() = hCloseDialog( SecurityWarning, "ok" )
else
- hAllowMacroExecution() = false
printlog( CFN & "Macro dialog not displayed" )
+ hAllowMacroExecution() = false
endif
'///</ul>
@@ -234,12 +241,11 @@ function hDenyMacroExecution() as boolean
if ( SecurityWarning.exists() ) then
'///+<li>Click &quot;Cancel&quot; to deny execution</li>
- SecurityWarning.cancel()
- hDenyMacroExecution() = true
printlog( CFN & "Denied macro execution" )
+ hDenyMacroExecution() = hCloseDialog( SecurityWarning, "cancel" )
else
- hDenyMacroExecution() = false
printlog( CFN & "Macro dialog not displayed" )
+ hDenyMacroExecution() = false
endif
'///</ul>
@@ -301,7 +307,6 @@ function hAddTrustedPath( cPath as string ) as boolean
const CFN = "hAddTrustedPath::"
dim iPathCount as integer
- dim brc as boolean
'///<u>Description</u>:
'///<ul>
@@ -313,7 +318,7 @@ function hAddTrustedPath( cPath as string ) as boolean
hToolsOptions( "StarOffice" , "Security" )
'///+<li>Click Macro Security</li>
- MacroSecurity.click()
+ hClickButton( MacroSecurity )
'///+<li>Switch to the Trusted Paths tab</li>
hSwitchMacroSecurityTab( "trustedpaths" )
@@ -323,34 +328,31 @@ function hAddTrustedPath( cPath as string ) as boolean
iPathCount = LocationsListBox.getItemCount()
'///+<li>Click the &quot;Add&quot; button</li>
- LocationsAdd.click()
+ hClickButton( LocationsAdd )
'///+<li>Enter a path to some files containing macros</li>
kontext "OeffnenDlg"
DateiName.setText( cPath )
'///+<li>Click &quot;Select&quot;</li>
- Oeffnen.click()
+ hClickButton( Oeffnen )
'///+<li>Verify that the item has been added to the list</li>
kontext "TabTrustedSources"
if ( LocationsListBox.getItemCount() <> ( iPathCount + 1 ) ) then
warnlog( CFN & "Incorrect number of items in locations listbox" )
- brc = false
+ hAddTrustedPath() = false
else
- printlog( CFN & "Added: " & cPath )
- brc = true
+ printlog( "Added: " & cPath )
+ hAddTrustedPath() = true
endif
'///+<li>Close the dialog</li>
- TabTrustedSources.ok()
+ hCloseDialog( TabTrustedSources, "ok" )
'///+<li>Close Tools/Options</li>
Kontext "OptionenDlg"
- OptionenDlg.ok()
-
- hAddTrustedPath() = brc
-
+ hCloseDialog( OptionenDlg, "ok" )
'///</ul>
end function
@@ -379,8 +381,7 @@ function hRemoveTrustedPath( cPath as string ) as boolean
dim iPathCount as integer
dim iCurrentPathItem as integer
- dim brc as boolean
- brc = false
+ hRemoveTrustedPath() = false
'///<u>Description</u>:
'///<ul>
@@ -392,41 +393,42 @@ function hRemoveTrustedPath( cPath as string ) as boolean
hToolsOptions( "StarOffice" , "Security" )
'///+<li>Click Macro Security</li>
- MacroSecurity.click()
+ hClickButton( MacroSecurity )
'///+<li>Switch to the Trusted Paths tab</li>
hSwitchMacroSecurityTab( "trustedpaths" )
kontext "TabTrustedSources"
- '///+<li>Get the number of currently listed items from the list</li>
- iPathCount = LocationsListBox.getItemCount()
+ if ( TabTrustedSources.exists() ) then
- '///+<li>Find the entry in the list</li>
- for iCurrentPathItem = 1 to iPathCount
+ '///+<li>Get the number of currently listed items from the list</li>
+ iPathCount = LocationsListBox.getItemCount()
- '///+<li>If it is there, delete it</li>
- LocationsListBox.select( iCurrentPathItem )
- if ( LocationsListBox.getSelText() = cPath ) then
- LocationsRemove.click()
- printlog( CFN & "Removed item at pos. " & iCurrentPathItem )
- brc = true
- exit for
- endif
+ '///+<li>Find the entry in the list</li>
+ for iCurrentPathItem = 1 to iPathCount
- next iCurrentPathItem
-
- '///+<li>Close the dialog</li>
- TabTrustedSources.ok()
+ '///+<li>If it is there, delete it</li>
+ LocationsListBox.select( iCurrentPathItem )
+ if ( LocationsListBox.getSelText() = cPath ) then
+ LocationsRemove.click()
+ printlog( CFN & "Removed item at pos. " & iCurrentPathItem )
+ hRemoveTrustedPath() = true
+ exit for
+ endif
- '///+<li>Close Tools/Options</li>
- Kontext "OptionenDlg"
- OptionenDlg.ok()
+ next iCurrentPathItem
+
+ '///+<li>Close the dialog</li>
+ hCloseDialog( TabTrustedSources, "ok" )
- if ( not brc ) then
- printlog( CFN & "The trusted path was not found in the list" )
+ else
+ warnlog( CFN & "Trusted Sources Tab did not open" )
+ hRemoveTrustedPath() = false
endif
- hRemoveTrustedPath() = brc
+ '///+<li>Close Tools/Options</li>
+ Kontext "OptionenDlg"
+ hCloseDialog( OptionenDlg, "ok" )
'///</ul>
@@ -468,8 +470,7 @@ function hSecurityEnterPasswordOnSave( cPassword as string ) as boolean
'///</ol>
const CFN = "hSecurityEnterPasswordOnSave::"
- printlog( CFN & "Enter" )
- dim brc as boolean : brc = true
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
'///<u>Description:</u>
'///<ul>
@@ -486,7 +487,7 @@ function hSecurityEnterPasswordOnSave( cPassword as string ) as boolean
PasswordConfirm.setText( cPassword & "1" )
'///+<li>Click on OK</li>
- PasswordFileSave.ok()
+ hCloseDialog( PasswordFileSave, "ok" )
'///+<li>There should be a warning about a faulty password confirmation</li>
kontext "Active"
@@ -498,7 +499,7 @@ function hSecurityEnterPasswordOnSave( cPassword as string ) as boolean
Active.notExists( 2 )
else
qaerrorlog( CFN & "Warning about faulty password confirmation is missing" )
- brc = false
+ hSecurityEnterPasswordOnSave() = false
endif
'///+<li>We should now be back on the password dialog</li>
@@ -514,19 +515,20 @@ function hSecurityEnterPasswordOnSave( cPassword as string ) as boolean
PasswordConfirm.setText( cPassword )
'///+<li>Click on OK</li>
- PasswordFileSave.ok()
+ hCloseDialog( PasswordFileSave, "ok" )
+ hSecurityEnterPasswordOnSave() = true
else
qaerrorlog( CFN & "The password dialog is missing after confirmation error" )
- brc = false
+ hSecurityEnterPasswordOnSave() = false
endif
else
qaerrorlog( CFN & "The password dialog did not open" )
- brc = false
+ hSecurityEnterPasswordOnSave() = false
endif
@@ -535,12 +537,11 @@ function hSecurityEnterPasswordOnSave( cPassword as string ) as boolean
if ( SpeichernDlg.exists() ) then
qaerrorlog( CFN & "File Save dialog is open, cancelling." )
SpeichernDlg.cancel()
- brc = false
+ hSecurityEnterPasswordOnSave() = false
endif
'///</ul>
- printlog( CFN & "Exit with result: " & brc )
- hSecurityEnterPasswordOnSave() = brc
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
end function
@@ -549,8 +550,6 @@ end function
function hSecurityEnterPasswordOnLoad( cPassword as string, bValid as boolean ) as boolean
- use "global\tools\includes\optional\t_stringtools.inc"
-
'///<h3>Enter a password while loading a document</h3>
'///<i>Enters a valid or invalid password while loading a passworded file</i><br><br>
@@ -581,11 +580,12 @@ function hSecurityEnterPasswordOnLoad( cPassword as string, bValid as boolean )
'///</ol>
const CFN = "hSecurityEnterPasswordOnLoad::"
- printlog( CFN & "Enter with option (Password): " & cPassword )
- printlog( CFN & "Enter with option (Validity): " & bValid )
- dim brc as boolean 'a multi purpose boolean returnvalue
- brc = true
- dim cMsg as string
+ if ( GVERBOSE ) then
+ printlog( CFN & "Enter with option (Password): " & cPassword )
+ printlog( CFN & "Enter with option (Validity): " & bValid )
+ endif
+
+ hSecurityEnterPasswordOnLoad() = true
'///<u>Description:</u>
'///<ul>
@@ -595,7 +595,7 @@ function hSecurityEnterPasswordOnLoad( cPassword as string, bValid as boolean )
'///+<li>Enter password, click OK</li>
PasswortName.setText( cPassword )
- PasswordFileOpen.ok()
+ hCloseDialog( PasswordFileOpen, "ok" )
'///+<li>If the password was incorrect:</li>
'///<ul>
@@ -604,61 +604,74 @@ function hSecurityEnterPasswordOnLoad( cPassword as string, bValid as boolean )
'///+<li>Look for a warning message</li>
kontext "Active"
if ( Active.exists( 1 ) ) then
-
- cMsg = Active.getText()
- cMsg = hRemoveLineBreaks( cMsg )
- if ( bValid ) then
- warnlog( CFN & "Message: " & cMsg )
- else
- printlog( CFN & "Message: " & cMsg )
- endif
+ printlog( CFN & "Message: " & Active.getText() )
'///+<li>Close the messagebox</li>
- Active.ok()
+ hCloseDialog( Active, "ok" )
'///+<li>Close the Password dialog with &quot;Cancel&quot;</li>
kontext "PasswordFileOpen"
if ( PasswordFileopen.exists( 2 ) ) then
-
- PasswordFileOpen.cancel()
-
+ hCloseDialog( PasswordFileOpen, "cancel" )
else
-
qaerrorlog( CFN & "Password dialog is not present" )
- brc = false
-
+ hSecurityEnterPasswordOnLoad() = false
endif
else
-
qaerrorlog( CFN & "Warning about incorrect password is missing" )
- brc = false
-
+ hSecurityEnterPasswordOnLoad() = false
endif
else
-
kontext "Active"
if ( Active.exists( 1 ) ) then
-
- cMsg = Active.getText()
- cMsg = hRemoveLIneBreaks( cMsg )
- qaerrorlog( CFN & "Unexpected messagebox: " & cMsg )
- brc = false
-
+ warnlog( CFN & "Unexpected messagebox: " & Active.getText() )
+ hSecurityEnterPasswordOnLoad() = false
endif
-
endif
'///</ul>
else
-
- qaerrorlog( CFN & "Password dialog is missing" )
- brc = false
-
+ warnlog( CFN & "Password dialog is missing" )
+ hSecurityEnterPasswordOnLoad() = false
endif
'///</ul>
+
+end function
- printlog( CFN & "Exit with result:" & brc )
- hSecurityEnterPasswordOnLoad() = brc
+'*******************************************************************************
+
+function hSelectXMLSecTab( cTab as string ) as boolean
+
+ const CFN = "hSelectXMLSecTab::"
+ hSelectXMLSecTab() = false
+
+ kontext
+
+ select case ( ucase( cTab ) )
+ case "GENERAL" : active.setpage TabXMLSecGeneral
+ if ( TabXMLSecGeneral.exists() and TabXMLSecGeneral.isVisible() ) then
+ printlog( CFN & "Switched to General page" )
+ hSelectXMLSecTab() = true
+ exit function
+ endif
+
+ case "DETAILS" : active.setpage TabXMLSecDetails
+ if ( TabXMLSecDetails.exists() and TabXMLSecDetails.isVisible() ) then
+ printlog( CFN & "Switched to Details page" )
+ hSelectXMLSecTab() = true
+ exit function
+ endif
+
+ case "PATH" : active.setpage TabXMLSecCertPath
+ if ( TabXMLSecCertPath.exists() and TabXMLSecCertPath.isVisible() ) then
+ printlog( CFN & "Switched to Certification Path page" )
+ hSelectXMLSecTab() = true
+ exit function
+ endif
+ end select
+
+ warnlog( CFN & "Failed to switch XML Security Tabpage" )
end function
+
diff --git a/testautomation/global/tools/includes/optional/t_server_info.inc b/testautomation/global/tools/includes/optional/t_server_info.inc
deleted file mode 100644
index 75ff6ab8a8b4..000000000000
--- a/testautomation/global/tools/includes/optional/t_server_info.inc
+++ /dev/null
@@ -1,148 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/******************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Tools to retrieve information about available servers
-'*
-'*******************************************************************************
-'**
-' #1 hGetServerInfo ' Retrieve names and services of some servers
-' #0 hPrintServerInstructions ' print instructions to the log
-'**
-'\******************************************************************************
-
-function hGetServerInfo( sType as string, sItem as string ) as string
-
-
- '///<h3>Retrieve names and services of some servers</h3>
- '///<i>This function retrieves some information about available
- '///+ servers within the LAN. These services can be anything like
- '///+ http-server, ftp etc.<br>
- '///+ Please make sure you read the comments in the configuration
- '///+ file to fully understand what this thing does.</i><br><br>
-
- '///<u>Input values:</u><br>
- '///<ol>
-
- '///+<li>Type (string). Valid options:</li>
- '///<ul>
- '///+<li>&quot;http_internal&quot;</li>
- '///+<li>&quot;http_external&quot;</li>
- '///+<li>&quot;ftp_internal&quot;</li>
- '///+<li>&quot;ftp_external&quot;</li>
- '///</ul>
-
- '///+<li>Item (string). Valid options:</li>
- '///<ul>
- '///+<li>&quot;Name&quot; to get a name for the server</li>
- '///+<li>&quot;Port&quot; to get the server's port</li>
- '///+<li>&quot;Protocol&quot; to get the supported protocol</li>
- '///+<li>&quot;URL&quot; to get the url (e.g. www.heise.de)</li>
- '///+<li>&quot;UseProxy&quot; to find out whether proxies are needed or not</li>
- '///+<li>&quot;User&quot; to get a loginname</li>
- '///+<li>&quot;Pass&quot; to get a password</li>
- '///</ul>
-
- '///</ol>
-
-
- '///<u>Return Value:</u><br>
- '///<ol>
- '///+<li>Name, port or other info of an item (string)</li>
- '///<ul>
- '///+<li>Empty String on error</li>
- '///+<li>Unique name for a server (can be NIS name)</li>
- '///+<li>Port (optional, e.g. 80 for http, 21 for ftp ...)</li>
- '///+<li>Protocol (e.g. &quot;http://&quot; or &quot;ftp://&quot;</li>
- '///+<li>URL like www.mydomain.de</li>
- '///+<li>UseProxy (&quot;yes&quot;/&quot;no&quot;)</li>
- '///+<li>User (some username)</li>
- '///+<li>Password (some password, plain text!)
- '///</ul>
- '///</ol>
-
- const CFN = "hGetServerInfo::"
-
- dim irc as integer ' some integer returnvalue
- dim crc as string ' some string returnvalue
-
- ' This is the workfile. Make sure it exists and contains valid data
- dim cFile as string
- cFile = gTesttoolPath & "sun_global\input\servers.txt"
- ' cFile = gTesttoolPath & "global\input\servers.txt"
- cFile = convertpath ( cFile )
-
- ' this is a temporary list that holds the workfile
- dim acList( 50 ) as string
-
- '///<u>Description:</u>
- '///<ul>
- '///+<li>Open the file, read the section, abort on error</li>
- irc = hGetDataFileSection( cFile, acList(), sType , "" , "" )
- if ( irc = 0 ) then
- qaerrorlog( CFN & "File or section not found" )
- hGetServerInfo() = ""
- hPrintServerInstructions()
- exit function
- endif
-
- '///+<li>Isolate the key</li>
- crc = hGetValueForKeyAsString( acList(), sItem )
- if ( instr( crc , "Error:" ) > 0 ) then
- qaerrorlog( CFN & "The requested item could not be found" )
- hGetServerInfo() = ""
- hPrintServerInstructions()
- exit function
- endif
-
- '///+<li>Return the requested item</li>
-
- '///</ul>
-
- hGetServerInfo() = crc
-
-end function
-
-'*******************************************************************************
-
-function hPrintServerInstructions()
-
- printlog( "" )
- printlog( "How to configure server settings for your local network" )
- printlog( "" )
- printlog( "1. Edit the sample configuration file" )
- printlog( " Location: global/input/servers.txt" )
- printlog( " Replace servernames, ports etc. with valid entries" )
- printlog( "" )
- printlog( "2. Edit the function hGetServerInfo" )
- printlog( " Make the first line with cFile = ... a comment"
- printlog( " Make the second line with cFile = ... active"
- printlog( " Save the file" )
- printlog( "" )
-
-end function
diff --git a/testautomation/global/tools/includes/optional/t_stringtools.inc b/testautomation/global/tools/includes/optional/t_stringtools.inc
index 0fc34d89ecf6..914d8b7c6ab4 100644..100755
--- a/testautomation/global/tools/includes/optional/t_stringtools.inc
+++ b/testautomation/global/tools/includes/optional/t_stringtools.inc
@@ -33,46 +33,11 @@
function hRemoveLineBreaks( cString as string ) as string
- '///<h3>Remove linebreaks and tabs from a string</h3>
- '///<i>Used to &quot;beautify&quot; content of messageboxes when printed to the log</i><br><br>
- '///<u>Parameter(s):</u>
- '///<ol>
- '///+<li>Content of a messagebox as captured with .getText() (string)</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>A string without tabs, linebreaks and linefeed (string)</li>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
- '///+<li>Walk through the string, replace linebreaks, tabs etc. with spaces</li>
-
- ' Function (undocumented) to remove LF and CR from strings.
- ' When a messagebox appears with multiple lines of text this usually
- ' breaks the output of the printlog into multiple lines making it
- ' hard to read. So this function puts the entire text in one line.
-
- dim iCharPos as integer
- dim cCurrentChar as string
- dim cNewString as string
-
- ' walk through the string character by character and replace those
- ' characters that break the line. Tabs and linebreaks become spaces
- for iCharPos = 1 to len( cString )
-
- cCurrentChar = mid( cString , iCharPos , 1 )
-
- select case cCurrentChar
- case CHR$(13) : cNewString = cNewString & " " ' replace linebreak
- case CHR$(10) : ' Simply ignore linefeed
- case CHR$(09) : cNewString = cNewString & " " ' replace tab with space
- case else : cNewString = cNewString & cCurrentChar ' append char
- end select
-
- next iCharPos
-
- hRemoveLineBreaks() = cNewString
- '///</ul>
+ dim myString as string : myString = cString
+ myString = hStringReplaceChar( myString, CHR$(09), " " )
+ myString = hStringReplaceChar( myString, CHR$(13), " " )
+ myString = hStringReplaceChar( myString, CHR$(10), "" )
+ hRemoveLineBreaks() = myString
end function
@@ -101,35 +66,41 @@ function hCompareSubStrings( cRef as string, cSub as string ) as integer
'///<ul>
const CFN = "hCompareSubStrings::"
+ const RETVAL_INVALID_PARAMETER = -1
+ const RETVAL_MATCH_NONE = 0
+ const RETVAL_MATCH_EXACT = 1
+ const RETVAL_MATCH_SUBSTRING = 2
'///+<li>Test function parameters</li>
if ( ( cRef = "" ) or ( cSub = "" ) ) then
warnlog( CFN & "invalid parameter(s): Empty string passed." )
- hCompareSubStrings() = -1
+ hCompareSubStrings() = RETVAL_INVALID_PARAMETER
exit function
endif
dim irc as integer
'///+<li>Test if we have a substring</li>
- if ( instr( cRef, cSub ) > 0 ) then
- irc = 2
+ if ( instr( cRef, cSub ) ) then
+ irc = RETVAL_MATCH_SUBSTRING
else
- irc = 0
+ irc = RETVAL_MATCH_NONE
endif
'///+<li>Test if we have an exact match</li>
- if ( irc = 2 ) then
+ if ( irc = RETVAL_MATCH_SUBSTRING ) then
if ( ( cRef = cSub ) and ( len( cRef ) = len( cSub ) ) ) then
- irc = 1
+ irc = RETVAL_MATCH_EXACT
endif
endif
-
- select case irc
- case 0 : printlog( CFN & "No matching substring found" )
- case 1 : printlog( CFN & "Strings are identical" )
- case 2 : printlog( CFN & "String is substring" )
- end select
+
+ if ( GVERBOSE ) then
+ select case irc
+ case RETVAL_MATCH_NONE : printlog( CFN & "No matching substring found" )
+ case RETVAL_MATCH_EXACT : printlog( CFN & "Strings are identical" )
+ case RETVAL_MATCH_SUBSTRING : printlog( CFN & "String is substring" )
+ end select
+ endif
hCompareSubStrings() = irc
'///</ul>
@@ -162,8 +133,7 @@ function hGetDirTreeLevel( cFullPath as string ) as integer
dim iCurrentChar as integer
dim cCurrentChar as string
- dim iSeparatorCount as integer
- iSeparatorCount = 0
+ dim iSeparatorCount as integer : iSeparatorCount = 0
'///+<li>Walk through the string</li>
'///<ul>
@@ -173,9 +143,7 @@ function hGetDirTreeLevel( cFullPath as string ) as integer
cCurrentChar = mid( cFullPath , iCurrentChar , 1 )
'///+<li>If it is a separtator, increase the counter</li>
- if ( cCurrentChar = gPathSigne ) then
- iSeparatorCount = iSeparatorCount + 1
- endif
+ if ( cCurrentChar = gPathSigne ) then iSeparatorCount = iSeparatorCount + 1
next iCurrentChar
'///</ul>
@@ -232,7 +200,7 @@ function hGetStringFromStaticTextField( oControl as object ) as string
dim cCopy as string
dim cText as string
- printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
'///<u>Description:</u>
'///<ul>
@@ -250,14 +218,14 @@ function hGetStringFromStaticTextField( oControl as object ) as string
oControl.typeKeys( cCopy )
cText = getClipboardText()
- printlog( CFN & "Exit with result: " & cText )
+ if ( GVERBOSE ) then printlog( CFN & "Exit with result: " & cText )
else
ctext = ""
- qaerrorlog( CFN & "Exit: Control exists but is not visible" )
+ warnlog( CFN & "Exit: Control exists but is not visible" )
endif
else
cText = ""
- qaerrorlog( CFN & "Exit: Control does not exist in this context" )
+ warnlog( CFN & "Exit: Control does not exist in this context" )
endif
'///</ul>
@@ -304,17 +272,16 @@ function hConvertStringToLong( cValue as string ) as long
'///</ol>
const CFN = "hConvertStringToLong::"
- printlog( CFN & "Enter with option: " & cValue )
- dim brc as boolean 'a multi purpose boolean returnvalue
+ const ONE_CHARACTER = 1
- dim iLen as integer
- iLen = len( cValue )
+ if ( GVERBOSE ) then printlog( CFN & "Enter with option: " & cValue )
+
+ dim iLen as integer : iLen = len( cValue )
dim iChar as integer
dim cChar as string
- dim cStringValue as string
- cStringValue = ""
+ dim cStringValue as string : cStringValue = ""
'///<u>Description:</u>
'///<ul>
@@ -323,7 +290,7 @@ function hConvertStringToLong( cValue as string ) as long
for iChar = 1 to iLen
'///+<li>Get the current character</li>
- cChar = mid( cValue , iChar , 1 )
+ cChar = mid( cValue , iChar , ONE_CHARACTER )
'///+<li>Copy valid characters to temporary string, drop invalid, exit on first space or other character</li>
select case cChar
@@ -344,10 +311,45 @@ function hConvertStringToLong( cValue as string ) as long
next iChar
'///</ul>
- printlog( CFN & "Exit with value: " & cStringValue )
+ if ( GVERBOSE ) then printlog( CFN & "Exit with value: " & cStringValue )
'///+<li>Convert string to long integer and return to calling function</li>
hConvertStringToLong() = val( cStringValue )
'///</ul>
end function
+
+'*******************************************************************************
+
+function hStringReplace( cString as string, search_string as string, replace_with as string ) as string
+
+ const CFN = "hStringReplace(): "
+
+ dim search_string_position as string
+ dim search_string_found as boolean : search_string_found = true
+ dim len_search_string as integer : len_search_string = len( search_string )
+ dim len_replace_with as integer : len_replace_with = len( replace_with )
+ dim myString as string : myString = cString
+
+ if ( GVERBOSE ) then printlog( CFN & "Replace all <" & search_string & "> with <" & replace_with & "> in <" & myString & ">" )
+
+ if ( not instr( replace_with, search_string ) and len_search_string >= len_replace_with ) then
+ do while( search_string_found )
+ search_string_position = instr( myString, search_string )
+ if ( search_string_position > 0 ) then
+ mid( myString, search_string_position, len( search_string ), replace_with )
+ else
+ search_string_found = false
+ endif
+ loop
+ else
+ warnlog( CFN & "Function used incorrectly" )
+ warnlog( CFN & "Replace all <" & search_string & "> with <" & replace_with & "> in <" & myString & ">" )
+ warnlog( CFN & "The new string must be of equal length or shorter than the string to be replaced" )
+ warnlog( CFN & "The new string may not contain the string to be replaced (e.g. replace 'a' with 'ha' is not allowed)" )
+ endif
+
+ if ( GVERBOSE ) then printlog( CFN & "Return string is <" & myString & ">" )
+ hStringReplace() = myString
+
+end function
diff --git a/testautomation/global/tools/includes/optional/t_toolbar_calc.inc b/testautomation/global/tools/includes/optional/t_toolbar_calc.inc
deleted file mode 100644
index 30c2b7e7e11c..000000000000
--- a/testautomation/global/tools/includes/optional/t_toolbar_calc.inc
+++ /dev/null
@@ -1,300 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : helge.delfs@sun.com
-'*
-'* short description : Toolbar tools - Calc
-'*
-'***************************************************************************************
-'*
-' #0 fGetObjectCalc
-'*
-'\*************************************************************************************
-
-'*******************************************************
-'* This function will get the location for image button
-'* in Commands in Tools/Customize/Toolbars from Calc
-'*******************************************************
-function fGetObjectCalc(sToolbar as String , sObject as String) as Integer
-
- Select case sToolbar
- case "3D-Settings"
- Select case sObject
- case "Extrusion On/Off" : fGetObjectCalc = 1
- '----------------- 2
- case "Tilt Down" : fGetObjectCalc = 3
- case "Tilt Up" : fGetObjectCalc = 4
- case "Tilt Left" : fGetObjectCalc = 5
- case "Tilt Right" : fGetObjectCalc = 6
- '----------------- 7
- case "Depth" : fGetObjectCalc = 8
- case "Direction" : fGetObjectCalc = 9
- case "Lighting" : fGetObjectCalc = 10
- case "Surfact" : fGetObjectCalc = 11
- case "3D Color" : fGetObjectCalc = 12
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Align"
- Select case sObject
- case "Left" : fGetObjectCalc = 1
- case "Centered" : fGetObjectCalc = 2
- case "Right" : fGetObjectCalc = 3
- case "Top" : fGetObjectCalc = 4
- case "Center" : fGetObjectCalc = 5
- case "Bottom" : fGetObjectCalc = 6
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Basic Shapes"
- Select case sObject
- end select
-
- case "Block Arrows"
- Select case sObject
- end select
-
- case "Callouts"
- Select case sObject
- end select
-
- case "Color"
- Select case sObject
- end select
-
- case "Controls"
- Select case sObject
- end select
-
- case "Drawing"
- Select case sObject
- case "Select" : fGetObjectCalc = 1
- '----------------- 2
- case "Line" : fGetObjectCalc = 3
- case "Rectangle" : fGetObjectCalc = 4
- case "Ellipse" : fGetObjectCalc = 5
- case "Polygon" : fGetObjectCalc = 6
- case "Curve" : fGetObjectCalc = 7
- case "Freeform Line" : fGetObjectCalc = 8
- case "Arc" : fGetObjectCalc = 9
- case "Ellipse Pie" : fGetObjectCalc = 10
- case "Circle Segment" : fGetObjectCalc = 11
- case "Text" : fGetObjectCalc = 12
- case "Vertical Text" : fGetObjectCalc = 13
- case "Text Animation" : fGetObjectCalc = 14
- case "Callouts" : fGetObjectCalc = 15
- case "Vertical Callouts" : fGetObjectCalc = 16
- '----------------- 17
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Drawing Object Properties"
- Select case sObject
- case "Display Grid" : fGetObjectCalc = 21
- case "Snap to Grid" : fGetObjectCalc = 22
- case "Guides When Moving" : fGetObjectCalc = 23
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Flowchart"
- Select case sObject
- end select
-
- case "Fontwork"
- Select case sObject
- end select
-
- case "Fontwork Shape"
- Select case sObject
- end select
-
- case "Form Design"
- Select case sObject
- case "Bring to Front" : fGetObjectCalc = 14
- case "Send to Back" : fGetObjectCalc = 15
- case "Group" : fGetObjectCalc = 17
- case "UnGroup" : fGetObjectCalc = 18
- case "Enter Group" : fGetObjectCalc = 19
- case "Exit Group" : fGetObjectCalc = 20
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Form Filter"
- Select case sObject
- end select
-
- case "Form Navigation"
- Select case sObject
- end select
-
- case "Form Object"
- Select case sObject
- end select
-
- case "Formatting" :
- Select case sObject
- case "Styles and Formatting" : fGetObjectCalc = 1
- case "Apply Style" : fGetObjectCalc = 2
- '---------------------- 3
- case "Font Name" : fGetObjectCalc = 4
- '---------------------- 5
- case "Font Size" : fGetObjectCalc = 6
- '---------------------- 7
- case "Bold" : fGetObjectCalc = 8
- case "Italic" : fGetObjectCalc = 9
- case "Underline" : fGetObjectCalc = 10
- case "Underline:Double" : fGetObjectCalc = 11
- '---------------------- 12
- case "Align Left" : fGetObjectCalc = 13
- case "Align Center Horizontally" : fGetObjectCalc = 14
- case "Align Right" : fGetObjectCalc = 15
- case "Justified" : fGetObjectCalc = 16
- case "Merge Cells" : fGetObjectCalc = 17
- '---------------------- 18
- case "Left-To-Right" : fGetObjectCalc = 19
- case "Right-To-Left" : fGetObjectCalc = 20
- '---------------------- 21
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Full Screen"
- Select case sObject
- case "Full Screen" : fGetObjectCalc = 1
- end select
-
- case "Graphic Filter"
- Select case sObject
- end select
-
- case "Insert"
- Select case sObject
- case "Chart" : fGetObjectCalc = 18
- case "Insert Object" : fGetObjectCalc = 19
- case "Controls" : fGetObjectCalc = 20
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Insert Cell"
- Select case sObject
- end select
-
- case "Insert Object"
- Select case sObject
- end select
-
- case "Media Playback"
- Select case sObject
- end select
-
- case "More Controls"
- Select case sObject
- end select
-
- case "Picture"
- Select case sObject
- end select
-
- case "Standard"
- Select case sObject
- case "Load URL" : fGetObjectCalc = 1
- case "New" : fGetObjectCalc = 2
- case "New Document From Template" : fGetObjectCalc = 3
- case "Open" : fGetObjectCalc = 4
- case "Save" : fGetObjectCalc = 5
- case "Save As" : fGetObjectCalc = 6
- case "Document as E-mail" : fGetObjectCalc = 7
- '----------------- 8
- case "Edit File" : fGetObjectCalc = 9
- '----------------- 10
- case "Export Directly as PDF" : fGetObjectCalc = 11
- case "Print File Directly" : fGetObjectCalc = 12
- case "Page Rreview" : fGetObjectCalc = 13
- '----------------- 14
- case "Spellcheck" : fGetObjectCalc = 15
- case "AutoSpellcheck" : fGetObjectCalc = 16
- '----------------- 17
- case "Cut" : fGetObjectCalc = 18
- case "Copy" : fGetObjectCalc = 19
- case "Paste" : fGetObjectCalc = 20
- case "Format Paintbrush" : fGetObjectCalc = 21
- '----------------- 22
- case "Can't Undo" : fGetObjectCalc = 23
- case "Can't Restore" : fGetObjectCalc = 24
- '----------------- 25
- case "Hyperlink" : fGetObjectCalc = 26
- case "Sort Ascending" : fGetObjectCalc = 27
- case "Sort Descending" : fGetObjectCalc = 28
- '----------------- 29
- case "Insert Chart" : fGetObjectCalc = 30
- case "Show Draw Functions" : fGetObjectCalc = 31
- '----------------- 32
- case "Find & Replace" : fGetObjectCalc = 33
- case "Navigator" : fGetObjectCalc = 34
- case "Gallery" : fGetObjectCalc = 35
- case "Data Sources" : fGetObjectCalc = 36
- case "Zoom" : fGetObjectCalc = 37
- '----------------- 38
- case "StarOffice Help" : fGetObjectCalc = 39
- case "What's This?" : fGetObjectCalc = 40
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectCalc = 0
- end select
-
- case "Standard(Viewing Mode)"
- Select case sObject
- end select
-
- case "Stars and Banners"
- Select case sObject
- end select
-
- case "Symbol Shapes"
- Select case sObject
- end select
-
- case "Text Formatting"
- Select case sObject
- end select
-
- case "Tools"
- Select case sObject
- end select
-
- case "previewbar"
- Select case sObject
- end select
-
- end select
-
-end function
diff --git a/testautomation/global/tools/includes/optional/t_toolbar_impress.inc b/testautomation/global/tools/includes/optional/t_toolbar_impress.inc
deleted file mode 100644
index 433c83f23515..000000000000
--- a/testautomation/global/tools/includes/optional/t_toolbar_impress.inc
+++ /dev/null
@@ -1,290 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : helge.delfs@sun.com
-'*
-'* short description : Toolbar tools - Impress
-'*
-'***************************************************************************************
-'*
-' #0 fGetObjectImpress
-'*
-'\*************************************************************************************
-
-'*******************************************************
-'* This function will get the location for image button
-'* in Commands in Tools/Customize/Toolbars from Impress
-'*******************************************************
-function fGetObjectImpress(sToolbar as String , sObject as String) as Integer
-
- Select case sToolbar
- case "3D-Objects"
- Select case sObject
- end select
-
- case "3D-Settings"
- Select case sObject
- case "Extrusion On/Off" : fGetObjectImpress = 1
- '----------------- 2
- case "Tilt Down" : fGetObjectImpress = 3
- case "Tilt Up" : fGetObjectImpress = 4
- case "Tilt Left" : fGetObjectImpress = 5
- case "Tilt Right" : fGetObjectImpress = 6
- '----------------- 7
- case "Depth" : fGetObjectImpress = 8
- case "Direction" : fGetObjectImpress = 9
- case "Lighting" : fGetObjectImpress = 10
- case "Surfact" : fGetObjectImpress = 11
- case "3D Color" : fGetObjectImpress = 12
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectImpress = 0
- end select
-
- case "Align"
- Select case sObject
- case "Left" : fGetObjectImpress = 1
- case "Centered" : fGetObjectImpress = 2
- case "Right" : fGetObjectImpress = 3
- '----------------- 4
- case "Top" : fGetObjectImpress = 5
- case "Center" : fGetObjectImpress = 6
- case "Bottom" : fGetObjectImpress = 7
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectImpress = 0
- end select
-
- case "Arrows"
- Select case sObject
- end select
-
- case "Basic Shapes"
- Select case sObject
- end select
-
- case "Block Arrows"
- Select case sObject
- end select
-
- case "Bullets and Numbering"
- Select case sObject
- end select
-
- case "Callouts"
- Select case sObject
- end select
-
- case "Color"
- Select case sObject
- end select
-
- case "Connectors"
- Select case sObject
- end select
-
- case "Controls"
- Select case sObject
- end select
-
- case "Drawing"
- Select case sObject
- case "Select" : fGetObjectImpress = 1
- '----------------- 2
- case "Line" : fGetObjectImpress = 3
- case "Rectangle" : fGetObjectImpress = 4
- case "Ellipse" : fGetObjectImpress = 5
- case "Text" : fGetObjectImpress = 6
- case "Vertical Text" : fGetObjectImpress = 7
- '----------------- 8
- case "Curve" : fGetObjectImpress = 9
- case "Connector" : fGetObjectImpress = 10
- case "3D Objects" : fGetObjectImpress = 11
- case "Basic Shapes" : fGetObjectImpress = 12
- case "Symbol Shapes" : fGetObjectImpress = 13
- case "Block Arrows" : fGetObjectImpress = 14
- case "Flowcharts" : fGetObjectImpress = 15
- case "Callouts" : fGetObjectImpress = 16
- case "Stars" : fGetObjectImpress = 17
- '----------------- 18
- case "Points" : fGetObjectImpress = 19
- case "Glue Points" : fGetObjectImpress = 20
- case "To Curve" : fGetObjectImpress = 21
- case "To Polygon" : fGetObjectImpress = 22
- case "To 3D" : fGetObjectImpress = 23
- case "To 3D Rotation Objet" : fGetObjectImpress = 24
- '----------------- 25
- case "Fontwork Gallery" : fGetObjectImpress = 26
- case "From File" : fGetObjectImpress = 27
- case "Gallerty" : fGetObjectImpress = 28
- '----------------- 29
- case "Rotate" : fGetObjectImpress = 30
- case "Rotation and Size" : fGetObjectImpress = 31
- case "Flip" : fGetObjectImpress = 32
- case "Alignment" : fGetObjectImpress = 33
- case "Arrange" : fGetObjectImpress = 34
- '----------------- 35
- case "Insert" : fGetObjectImpress = 36
- case "Controls" : fGetObjectImpress = 37
- '----------------- 38
- case "Extrusion On/Off" : fGetObjectImpress = 39
- case "Custom Animation" : fGetObjectImpress = 40
- case "Interaction" : fGetObjectImpress = 41
- case "Animated Image" : fGetObjectImpress = 42
- case "3D Effects" : fGetObjectImpress = 43
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectImpress = 0
- end select
-
- case "Edit Points"
- Select case sObject
- end select
-
- case "Flowchart"
- Select case sObject
- end select
-
- case "Fontwork"
- Select case sObject
- end select
-
- case "Fontwork Shape"
- Select case sObject
- end select
-
- case "Form Design"
- Select case sObject
- end select
-
- case "Form Filter"
- Select case sObject
- end select
-
- case "Form Navigation"
- Select case sObject
- end select
-
- case "Full Screen"
- Select case sObject
- end select
-
- case "Gluepoints"
- Select case sObject
- end select
-
- case "Graphic Filter"
- Select case sObject
- end select
-
- case "Insert"
- Select case sObject
- case "Floating Frame" : fGetObjectImpress = 6
- case "Plug-in" : fGetObjectImpress = 8
- case "Applet" : fGetObjectImpress = 9
- case "File" : fGetObjectImpress = 11
- case "Sound" : fGetObjectImpress = 14
- case "Video" : fGetObjectImpress = 15
- end select
-
- case "OLE-Object"
- Select case sObject
- case "Wrap Left" : fGetObjectImpress = 11
- case "Wrap Right" : fGetObjectImpress = 12
- case "Optimal Page Wrap" : fGetObjectImpress = 16
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectImpress = 0
- end select
-
- case "Standard"
- Select case sObject
- case "Load URL" : fGetObjectImpress = 1
- case "New" : fGetObjectImpress = 2
- case "New Document From Template" : fGetObjectImpress = 3
- case "Open" : fGetObjectImpress = 4
- case "Save" : fGetObjectImpress = 5
- case "Save As" : fGetObjectImpress = 6
- case "Document as E-mail" : fGetObjectImpress = 7
- '----------------- 8
- case "Edit File" : fGetObjectImpress = 9
- '----------------- 10
- case "Export Directly as PDF" : fGetObjectImpress = 11
- case "Print File Directly" : fGetObjectImpress = 12
- '----------------- 13
- case "Spellcheck" : fGetObjectImpress = 14
- case "AutoSpellcheck" : fGetObjectImpress = 15
- '----------------- 16
- case "Cut" : fGetObjectImpress = 17
- case "Copy" : fGetObjectImpress = 18
- case "Paste" : fGetObjectImpress = 19
- case "Format Paintbrush" : fGetObjectImpress = 20
- '----------------- 21
- case "Can't Undo" : fGetObjectImpress = 22
- case "Can't Restore" : fGetObjectImpress = 23
- '----------------- 24
- case "Chart" : fGetObjectImpress = 25
- case "CALC" : fGetObjectImpress = 26
- case "Hyperlink" : fGetObjectImpress = 27
- '----------------- 28
- case "Display Grid" : fGetObjectImpress = 29
- '----------------- 30
- case "Navigator" : fGetObjectImpress = 31
- case "Zoom" : fGetObjectImpress = 32
- '----------------- 33
- case "StarOffice Help" : fGetObjectImpress = 34
- case "What's This?" : fGetObjectImpress = 35
- case else : QAErrorLog "The test does not support Object : " + sObject
- fGetObjectImpress = 0
- end select
-
- case "Table"
- Select case sObject
- case "Table" : fGetObjectImpress = 22
- case "Columns" : fGetObjectImpress = 23
- case "Rows" : fGetObjectImpress = 24
- end select
-
- case "Text Object"
- Select case sObject
- case "Line Spacing 1" : fGetObjectImpress = 16
- case "Line Spacing 1.5" : fGetObjectImpress = 17
- case "Line Spacing 2" : fGetObjectImpress = 18
- case "Font Color" : fGetObjectImpress = 20
- case "Left-To-Right" : fGetObjectImpress = 22
- case "Right-To-Left" : fGetObjectImpress = 23
- end select
-
- case "XML Form Design"
- Select case sObject
- case "Bring to Front" : fGetObjectImpress = 14
- case "Send to Back" : fGetObjectImpress = 15
- case "Group" : fGetObjectImpress = 17
- case "UnGroup" : fGetObjectImpress = 18
- case "Enter Group" : fGetObjectImpress = 19
- case "Exit Group" : fGetObjectImpress = 20
- end select
-
- end select
-
-end function
diff --git a/testautomation/global/tools/includes/optional/t_treelist_tools.inc b/testautomation/global/tools/includes/optional/t_treelist_tools.inc
index b459b2c0f4a0..a983510352e4 100644
--- a/testautomation/global/tools/includes/optional/t_treelist_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_treelist_tools.inc
@@ -31,8 +31,6 @@
'*
'\******************************************************************************
-private const DEBUG_ENABLE = false
-
function hGetNodeCount( oControl as object ) as integer
'///<h3>Retrieve the number of visible (open) nodes from a treelist</h3>
@@ -56,6 +54,7 @@ function hGetNodeCount( oControl as object ) as integer
const CFN = "hGetNodeCount::"
+ const RETVAL_FAILURE = 0
dim iCount as integer
'///+<li>Verify that the control exists</li>
@@ -64,15 +63,13 @@ function hGetNodeCount( oControl as object ) as integer
'///+<li>Verify that the control is enabled</li>
if ( oControl.isEnabled() ) then
- if ( DEBUG_ENABLE ) then
- printlog( CFN & "Regular access, control available and enabled" )
- endif
+ if ( GVERBOSE ) then printlog( CFN & "Regular access, control available and enabled" )
'///+<li>get the number of items from the control</li>
iCount = oControl.getItemCount()
else
printlog( CFN & "Failure: Control claims to be disabled." )
- iCount = 0
+ iCount = RETVAL_FAILURE
endif
else
try
@@ -80,12 +77,12 @@ function hGetNodeCount( oControl as object ) as integer
iCount = oControl.getItemCount()
catch
printlog( CFN & "Failure: Control not available." )
- iCount = 0
+ iCount = RETVAL_FAILURE
endcatch
endif
- if ( DEBUG_ENABLE ) then
- printlog( CFN & "Exit with nodecount = " & iCount )
- endif
+
+ if ( GVERBOSE ) then printlog( CFN & "Exit with nodecount = " & iCount )
+
hGetNodeCount = iCount
'///</ul>
@@ -111,9 +108,7 @@ function hSelectTopNode( oControl as object ) as boolean
hSelectTopNode() = false
endcatch
- if ( DEBUG_ENABLE ) then
- printlog( CFN & "Selected Node: " & oControl.getText() )
- endif
+ if ( GVERBOSE ) then printlog( CFN & "Selected Node: " & oControl.getText() )
end function
@@ -137,13 +132,9 @@ function hSelectNextNode( oControl as object ) as integer
iPosAfter = oControl.getSelIndex()
- if ( iPosAfter = iPosBefore ) then
- hSelectNextNode() = 0
- endif
+ if ( iPosAfter = iPosBefore ) then hSelectNextNode() = 0
- if ( iPosAfter = ( iPosBefore + 1 ) ) then
- hSelectnextNode() = iPosAfter
- endif
+ if ( iPosAfter = ( iPosBefore + 1 ) ) then hSelectNextNode() = iPosAfter
printlog( CFN & "Selected node: " & oControl.getText() )
@@ -184,7 +175,7 @@ function hExpandNode( oControl as object, iNode as integer ) as integer
dim iOldNodeCount as integer
- if ( DEBUG_ENABLE ) then
+ if ( GVERBOSE ) then
printlog( CFN & "Enter with option (Control): " & oControl.name() )
printlog( CFN & "Enter with option (iNode): " & iNode )
endif
@@ -229,7 +220,7 @@ function hExpandAllNodes( oControl as object ) as integer
iNodeRefCount = -1
iIteration = 0
- if ( DEBUG_ENABLE ) then
+ if ( GVERBOSE ) then
printlog( CFN & "Initial iNodeCurCount: " & iNodeCurCount )
printlog( CFN & "Initial iNodeRefCount: " & iNodeRefCount )
endif
@@ -245,7 +236,7 @@ function hExpandAllNodes( oControl as object ) as integer
iNodeCurCount = hGetNodeCount( oControl )
- if ( DEBUG_ENABLE ) then
+ if ( GVERBOSE ) then
printlog( "" )
printlog( CFN & "Exit iteration....: " & iIteration )
printlog( CFN & "Exit iNodeCurCount: " & iNodeCurCount )
@@ -254,7 +245,7 @@ function hExpandAllNodes( oControl as object ) as integer
loop
- if ( DEBUG_ENABLE ) then
+ if ( GVERBOSE ) then
printlog( CFN & "Exit with " & iNodeCurCount & _
" items after " & iIteration & " iterations" )
endif
@@ -282,7 +273,7 @@ function hGetVisibleNodeNames( oControl as object , lsList() as string ) as inte
dim iNodeCount as integer
dim iThisNode as integer
- printlog( CFN & "Enter" )
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
iNodeCount = hGetNodeCount( oControl )
@@ -298,7 +289,7 @@ function hGetVisibleNodeNames( oControl as object , lsList() as string ) as inte
endif
hGetVisibleNodeNames() = listcount( lsList() )
- printlog( CFN & "Exit" )
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
end function
@@ -327,6 +318,7 @@ function hSelectNodeByName( oControl as object , _name as string ) as integer
'///</ul>
const CFN = "hSelectNodeByName::"
+ const RETVAL_FAILURE = 0
dim iThisNode as integer
dim iCurrentNode as integer
@@ -334,9 +326,9 @@ function hSelectNodeByName( oControl as object , _name as string ) as integer
dim cNodeName as string
- printlog( CFN & "Enter with option (NodeName): " & _name )
+ if ( GVERBOSE ) then printlog( CFN & "Enter with option (NodeName): " & _name )
- iThisNode = 0
+ iThisNode = RETVAL_FAILURE
' First we try to jump to the node directly, if this fails we use the
' slower but safer method (expand all nodes and step through)
@@ -359,10 +351,10 @@ function hSelectNodeByName( oControl as object , _name as string ) as integer
next iCurrentNode
endcatch
- if ( iThisNode = 0 ) then
+ if ( iThisNode = RETVAL_FAILURE ) then
printlog( CFN & "Exit: Node not found." )
else
- printlog( CFN & "Exit: Node selected at pos: " & iThisNode )
+ if ( GVERBOSE ) then printlog( CFN & "Exit: Node selected at pos: " & iThisNode )
endif
hSelectNodeByName() = iThisNode
@@ -383,7 +375,7 @@ function hSelectTheLastNode( oControl as object ) as integer
const CFN = "hSelectTheLastNode::"
dim iCurrentNodeCount as integer
- printlog( CFN & "Enter with option (control): " & oControl.name() )
+ if ( GVERBOSE ) then printlog( CFN & "Enter with option (control): " & oControl.name() )
iCurrentNodeCount = -1
@@ -392,14 +384,14 @@ function hSelectTheLastNode( oControl as object ) as integer
iCurrentNodeCount = hGetNodeCount( oControl )
hExpandNode( oControl, iCurrentNodeCount )
- if ( DEBUG_ENABLE ) then
+ if ( GVERBOSE ) then
printlog( CFN & "Nodename.....: " & oControl.getText() )
printlog( CFN & "Node position: " & iCurrentNodeCount )
endif
loop
- printlog( CFN & "Exit with result: " & iCurrentNodeCount )
+ if ( GVERBOSE ) then printlog( CFN & "Exit with result: " & iCurrentNodeCount )
hSelectTheLastNode() = iCurrentNodeCount
end function
@@ -418,51 +410,6 @@ function hVerifyNodeName( oControl as object , cName as string ) as boolean
end function
-'*******************************************************************************
-
-function hWaitForTreelist( oTreeList as object, cContext as string, iItemCount as integer ) as boolean
-
- '///<h3>Wait for a treelist to get populated (java related delay)</h3>
- '///<b>IMPORTANT: Do not use unless absolutely necessary</b>
- '///+<p>Retrieve the number of items from the treelist until a specified
- '///+ number has been reached.</p>
-
- const CFN = "hWaitForTreelist::"
- dim iTry as integer
- dim iObjects as integer
- dim brc as boolean
-
- brc = false
- iTry = 0
-
- kontext cContext
-
- qaerrorlog( CFN & "Stupid function, do not use" )
-
- iObjects = 0
- do while ( iObjects < iItemCount )
-
- iTry = iTry + 1
- iObjects = hGetNodeCount( oTreeList )
-
- if ( iObjects >= iItemCount ) then
- brc = true
- exit do
- endif
-
- ' Failsafe mechanism
- if ( iTry = 10 ) then
- qaerrorlog( CFN & "Requested number of items never reached" )
- brc = false
- exit do
- endif
-
- loop
-
- hWaitForTreelist() = brc
-
-end function
-
'******************************************************************************
function hGetListItems( oControl as object, aList() as string ) as integer
@@ -474,8 +421,9 @@ function hGetListItems( oControl as object, aList() as string ) as integer
'///</ul>
const CFN = "hGetListItems::"
+ const RETVAL_FAILURE = 0
- printlog( CFN & "Enter with option (control): " & oControl.name() )
+ if ( GVERBOSE ) then printlog( CFN & "Enter with option (control): " & oControl.name() )
dim iItemCount as integer
dim iCurrentItem as integer
@@ -484,7 +432,7 @@ function hGetListItems( oControl as object, aList() as string ) as integer
iItemCount = oControl.getItemCount()
if ( iItemCount > ubound( aList() ) ) then
printlog( CFN & "Array too small, needed: " & iItemCount )
- hGetListItems() = 0
+ hGetListItems() = RETVAL_FAILURE
exit function
endif
@@ -496,7 +444,7 @@ function hGetListItems( oControl as object, aList() as string ) as integer
next iCurrentItem
- printlog( CFN & "Exit with number of items: " & iItemCount )
+ if ( GVERBOSE ) then printlog( CFN & "Exit with number of items: " & iItemCount )
hGetListItems() = iItemCount
end function
diff --git a/testautomation/global/tools/includes/optional/t_ui_filters.inc b/testautomation/global/tools/includes/optional/t_ui_filters.inc
index 0b22b8a94141..b76765e05069 100644
--- a/testautomation/global/tools/includes/optional/t_ui_filters.inc
+++ b/testautomation/global/tools/includes/optional/t_ui_filters.inc
@@ -99,8 +99,7 @@ function hGetFilterGroup( api_filters() as string, ui_filters() as string )
dim iCurrentFilter as integer
- dim iFilterCount as integer
- iFilterCount = ubound( api_filters() )
+ dim iFilterCount as integer : iFilterCount = ubound( api_filters() )
dim iAPIfilterList as integer
@@ -115,9 +114,11 @@ function hGetFilterGroup( api_filters() as string, ui_filters() as string )
if ( oFilter( iAPIFilterList ).Name = "UIName" ) then
ui_filters( iCurrentFilter ) = oFilter( iAPIFilterList ).Value()
- 'printlog( CFN & "DEBUG: Index (iCurrentFilter): " & iCurrentFilter )
- 'printlog( CFN & "DEBUG: API Filter: " & api_filters( iCurrentFilter ) )
- 'printlog( CFN & "DEBUG: UI Filter.: " & ui_filters( iCurrentFilter ) )
+ if ( GVERBOSE ) then
+ 'printlog( CFN & "DEBUG: Index (iCurrentFilter): " & iCurrentFilter )
+ 'printlog( CFN & "DEBUG: API Filter: " & api_filters( iCurrentFilter ) )
+ 'printlog( CFN & "DEBUG: UI Filter.: " & ui_filters( iCurrentFilter ) )
+ endif
endif
next iAPIFilterList
diff --git a/testautomation/global/tools/includes/required/t_dir.inc b/testautomation/global/tools/includes/required/t_dir.inc
index 0c7d887825f7..04c4bd8956f9 100644
--- a/testautomation/global/tools/includes/required/t_dir.inc
+++ b/testautomation/global/tools/includes/required/t_dir.inc
@@ -31,55 +31,6 @@
'*
'\************************************************************************
-function hFileExists ( Dat as String ) as Boolean
- '/// Checks if a file exists
- '/// <u>Input</u>: Filename with complete path
- '/// <u>Return</u>: TRUE or FALSE if the file exists.
- if app.Dir ( Dat ) = "" then
- hFileExists = FALSE
- else
- hFileExists = TRUE
- end if
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hDirectoryExists ( Verz as String ) as Boolean
- '/// Checks if a directory exists
- '/// <u>Input</u>: Directory with complete path
- '/// <u>Return</u>: TRUE or FALSE if the directory exists.
- ' at the end of the string has to be teh path seperator, else the dir-command doesn't work
- if right ( Verz, 1 ) <> gPathSigne then Verz = Verz + gPathsigne
- if app.Dir ( Verz, 16 ) = "" then
- hDirectoryExists = FALSE
- else
- hDirectoryExists = TRUE
- end if
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hKillFile ( Dat as String ) as Boolean
- '/// Delete a file
- '/// <u>Input</u>: File with complete path
- '/// <u>Return</u>: TRUE or FALSE success on deleting?
- if app.Dir ( Dat ) <> "" then
- try
- app.kill ( Dat )
- catch
- endcatch
- if app.Dir ( Dat ) <> "" then
- hKillFile = FALSE
- else
- hKillFile = TRUE
- end if
- else
- hKillFile = TRUE
- end if
-end function
-'
-'-------------------------------------------------------------------------------
-'
function DirNameList (ByVal sPfad$ , lsDirName() as String ) as Integer
'/// seperate a path in its parts
'/// <u>Input</u>: Path to seperate; Empty list, because it get's reset in this function!;
@@ -293,45 +244,8 @@ end function
'
'-------------------------------------------------------------------------------
'
-function PfadExtract ( sFiledat$ ) as string
- '/// Get the path from a file
- '/// <u>Input</u>: file with path
- '/// <u>Return</u>: path without the filename
- Dim s$ : Dim i% : Dim k%
- dim ls(25) as String
-
- s$ = ""
- i% = DirNameList( sFileDat$, ls() )
- k% = 2
- do until K%>=i%
- ls( 1 ) = ls( 1 ) + ls(k%)
- k% = k% +1
- loop
- PfadExtract = Left( ls(1), Len(ls( 1 ))-1)
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hPfadname (Dateipfad$) as string
- '/// Get the path from a file
- '/// <u>Input</u>: file with path
- '/// <u>Return</u>: path without the filename
- dim wh as integer
-
- for wh = len(Dateipfad$) to 1 step -1
- if mid(Dateipfad$,wh,1) = gPathSigne then
- hpfadname = left(Dateipfad$,wh)
- exit for
- else
- hpfadname = Dateipfad$
- end if
- next wh
-end function
-'
-'-------------------------------------------------------------------------------
-'
function DateiExtract ( sFileDat$ )
- '/// Get the filename from a path
+ '/// Get the filename from a path
'/// <u>Input</u>: path with file
'/// <u>Return</u>: filename without the path
Dim i%
diff --git a/testautomation/global/tools/includes/required/t_dirloc.inc b/testautomation/global/tools/includes/required/t_dirloc.inc
deleted file mode 100644
index d8bef397c74b..000000000000
--- a/testautomation/global/tools/includes/required/t_dirloc.inc
+++ /dev/null
@@ -1,288 +0,0 @@
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : thorsten.bosbach@sun.com
-'*
-'* short description : functions for directories and files; execution happens in the testtool
-'*
-'\************************************************************************
-
-function hFileExistsLocal ( Dat as String ) as Boolean
- '/// Checks if a file exists
- '/// <u>Input</u>: Filename with complete path
- '/// <u>Return</u>: TRUE or FALSE if the file exists.
- if Dir ( Dat ) = "" then
- hFileExistsLocal = FALSE
- else
- hFileExistsLocal = TRUE
- end if
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hDirectoryExistsLocal ( Verz as String ) as Boolean
- '/// Checks if a directory exists
- '/// <u>Input</u>: Directory with complete path
- '/// <u>Return</u>: TRUE or FALSE if the directory exists.
- ' at the end of the string has to be teh path seperator, else the dir-command doesn't work
- if right ( Verz, 1 ) <> gPathSigne then Verz = Verz + gPathSigne
- if Dir ( Verz, 16 ) = "" then
- hDirectoryExistsLocal = FALSE
- else
- hDirectoryExistsLocal = TRUE
- end if
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hKillFileLocal ( Dat as String ) as Boolean
- '/// Delete a file
- '/// <u>Input</u>: File with complete path
- '/// <u>Return</u>: TRUE or FALSE success on deleting?
- if Dir ( Dat ) <> "" then
- try
- kill ( Dat )
- catch
- endcatch
- if Dir ( Dat ) <> "" then
- hKillFileLocal = FALSE
- else
- hKillFileLocal = TRUE
- end if
- else
- hKillFileLocal = TRUE
- end if
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function DirNameListLocal (ByVal sPfad$ , lsDirName() as String ) as Integer
- '/// seperate a path in its parts
- '/// <u>Input</u>: Path to seperate; Empty list, because it get's reset in this function!;
- '/// <u>Return</u>: Number on entries in the list; list with entries
- Dim i%
- Dim Pos%
-
- lsDirName(0) = 0
- do
- Pos% = InStr(1, sPfad$, "\") ' got a path
- i% = Val(lsDirName(0) ) + 1
- lsDirName(0) = i%
- lsDirName( i% ) = Left( sPfad$, Pos% ) ' .. put in list
- sPfad = Mid( sPfad$, Pos% + 1 ) ' ...cut off
- loop while Pos%>0
- lsDirName( i% ) = sPfad$
- DirNameListLocal = i% ' count of
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function GetFileNameListLocal ( sPath$, sMatch$ ,lsFile() as String ) as integer
- '/// Get files from a directory that match the pattern and append them to a list (without path)
- '/// <u>Input</u>: Directory with complete path; Search Pattern, e.g *.*; List
- '/// <u>Return</u>: count of appended entries; updated list
- Dim Count%
- Dim Datname as String
-
- Count% = 0
-
- if right ( sPath$, 1 ) <> gPathSigne then sPath$ = sPath$ + gPathSigne
- ' at the end of the string has to be teh path seperator, else the dir-command doesn't work
- Datname = Dir( sPath$ + sMatch$ , 0)
-
- do until Len(Datname) = 0
- Count% = Count% + 1
- lsFile(Count%) = Datname ' append
- lsFile(0) = Count%
- Datname = Dir
- loop
-
- GetFileNameListLocal = Count% ' all files
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function GetFileListLocal ( sPath$, sMatch$ ,lsFile() as String ) as integer
- '/// Get files from a directory that match the pattern and append them to a list (<b>with</b> path)
- '/// <u>Input</u>: Directory with complete path; Search Pattern, e.g *.*; List
- '/// <u>Return</u>: count of appended entries; updated list
- Dim Count%
- Dim Datname as String
-
- Count% = 0
-
- if right ( sPath$, 1 ) <> gPathSigne then sPath$ = sPath$ + gPathSigne
- ' at the end of the string has to be teh path seperator, else the dir-command doesn't work
- Datname = Dir( sPath$ + sMatch$ , 0)
-
- do until Len(Datname) = 0
- lsFile(0) = Val(lsFile(0)) + 1
- lsFile( lsFile(0) ) =sPath$ + Datname
- Count% = Count% + 1
- Datname = Dir
- loop
- GetFileListLocal = Count%
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function GetDirListLocal ( sPath$, sMatch$ ,lsFile() as String ) as integer
- '/// Get Subdirectories from a directory and append them to a list (<b>with</b> path)
- '/// <u>Input</u>: Directory with complete path; Search Pattern, e.g *; List
- '/// <u>Return</u>: count of appended entries; updated list
- Dim Count%
- Dim Verzeichnis as String
-
- if right ( sPath$, 1 ) <> gPathSigne then sPath$ = sPath$ + gPathSigne
- ' at the end of the string has to be teh path seperator, else the dir-command doesn't work
- Verzeichnis = Dir( sPath$ + sMatch$ , 16)
- Count% = 0
-
- do until Len(Verzeichnis) = 0
- if Verzeichnis <>"." AND Verzeichnis <> ".." then
- lsFile(0) = Val(lsFile(0)) + 1
- lsFile( lsFile(0) ) = sPath$ + Verzeichnis + gPathSigne
- Count% = Count% + 1
- end if
- Verzeichnis = Dir
- loop
-
- GetDirListLocal = Count%
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function GetAllDirListLocal ( byVal sPath$, byVal sMatch$ ,lsFile() as String ) as integer
- '/// Get all directorys recursiv that match the pattern and append them to a list
- '/// <u>Input</u>: Directory with complete path; Search Pattern, e.g *; Empty list, because it get's reset in this function!;
- '/// <u>Return</u>: Count of appended entries (1. entry is the whole path); updated list
- Dim Count% : Dim DirCount%
-
- DirCount% = 1 ' dummy
- Count% = 1
- lsFile(0) = 1 'new list
- lsFile(1) = sPath$ 'first path is the calling path
-
- do until Count%>Val(lsFile(0)) ' get first generation
- DirCount% = GetDirListLocal ( lsFile(Count%) , sMatch$, lsFile() ) ' append all subdirectories
- Count% = Count% +1
- loop
-
- GetAllDirListLocal = Count% - 1 ' count of listelements
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function GetAllFileListLocal ( byVal sPath$, byVal sMatch$ ,lsFile() as String ) as integer
- '/// Get all Files recursiv (including in subdirectories) that match the pattern and append them to a list
- '/// <u>Input</u>: Directory with complete path; Search Pattern, e.g *.*; Empty list, because it get's reset in this function!;
- '/// <u>Return</u>: Count of appended entries (1. entry is the whole path); updated list
- Dim DirCount% : Dim FileCount% : Dim Count%
- Dim lsDir(1000) as String
-
- DirCount% = GetAllDirListLocal ( sPath$, "*", lsDir() ) ' just all directories
- FileCount% = 0
- lsFile(0) = 1
- lsFile(1) = sPath$
-
- For Count% = 1 to Val( lsDir(0) )
- FileCount% = FileCount% + GetFileListLocal ( lsDir( Count% ), sMatch$, lsFile() )
- next Count%
-
- GetAllFileListLocal = FileCount% ' count of files
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function KillFileListLocal ( lsList() as String ) as Boolean
- '/// Delete all files in the list
- '/// <u>Input</u>: List with files
- '/// <u>Return</u>: TRUE or FALSE if files are killed; modified list with not deleted files.
- Dim i as Integer
- Dim FehlerListe ( 1000 ) as String
-
- FehlerListe ( 0 ) = 0
- for i=1 to ListCount ( lsList() )
- try
- kill ( lsList(i) )
- catch
- ListAppend ( FehlerListe (), lsList(i) )
- endcatch
- next i
-
- lsList(0) = 0 ' delete old list
- KillFileListLocal = TRUE
- for i=1 to ListCount ( FehlerListe () )
- KillFileListLocal = FALSE
- ListAppend ( lsList(), FehlerListe (i) )
- next i
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function KillDirListLocal ( lsList() as String ) as Boolean
- '/// Delete all directories in the list
- '/// <u>Input</u>: List with directories
- '/// <u>Return</u>: TRUE or FALSE if directories are killed; modified list with not deleted directories.
- Dim i as Integer
- Dim FehlerListe ( 1000 ) as String
-
- FehlerListe ( 0 ) = 0
- for i=1 to ListCount ( lsList() )
- try
- rmDir ( lsList(i) )
- catch
- ListAppend ( FehlerListe (), lsList(i) )
- endcatch
- next i
-
- lsList(0) = 0 ' delete old list
- KillDirListLocal = TRUE
- for i=1 to ListCount ( FehlerListe () )
- KillDirListLocal = FALSE
- ListAppend ( lsList(), FehlerListe (i) )
- next i
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function GetFileSizesLocal ( lsList() as String ) as long
- '/// Computes the total Filesize of the files in the list
- '/// <u>Input</u>: List with files
- '/// <u>Return</u>: Filesize in bytes
- Dim iSum
- Dim i as Integer
-
- iSum = 0
- for i=1 to ListCount ( lsList() )
- try
- iSum = iSum + FileLen ( lsList(i) )
- catch
- endcatch
- next i
-
- GetFileSizesLocal = iSum
-end function
diff --git a/testautomation/global/tools/includes/required/t_doc2.inc b/testautomation/global/tools/includes/required/t_doc2.inc
index efd2d2799a0e..160de6dedff4 100755
--- a/testautomation/global/tools/includes/required/t_doc2.inc
+++ b/testautomation/global/tools/includes/required/t_doc2.inc
@@ -31,35 +31,34 @@
'*
'\***********************************************************************
-private const VERBOSE = TRUE
-
sub hTabelleEinfuegen
'/// <b>WRITER only </b>///'
'/// hTabelleEinfuegen hInsertTable ///'
'/// insert a dummy table in writer/writerweb/masterdocument ///'
TableInsertTable
- sleep(2)
+
Kontext "TabelleEinfuegenWriter"
- wait 500
- TabelleEinfuegenWriter.OK
- sleep(1)
+ if ( TabelleEinfuegenWriter.exists( 2 ) ) then
- Kontext "TableObjectbar"
- sleep(1)
- if TableObjectbar.NotExists then
- Kontext "TextObjectbar"
- TextObjectbar.SetNextToolBox
- end if
+ hCloseDialog( TabelleEinfuegenWriter, "ok" )
+
+ Kontext "TableObjectbar"
+ if ( TableObjectbar.exists( 1 ) ) then
+ ' We are happy then, do nothing
+ else
+ Kontext "TextObjectbar"
+ TextObjectbar.SetNextToolBox
+ end if
+
+ select case ( gApplication )
+ Case "WRITER" : Kontext "DocumentWriter"
+ Case "MASTERDOCUMENT" : Kontext "DocumentMasterDoc"
+ Case "HTML" : Kontext "DocumentWriterWeb"
+ end select
+ else
+ warnlog( "hTabelleEinfuegen: Failed to open <TabelleEinfuegenWriter> dialog" )
+ endif
- select case uCASE(gApplication)
- Case "WRITER"
- Kontext "DocumentWriter"
- Case "MASTERDOCUMENT"
- Kontext "DocumentMasterDoc"
- Case "HTML"
- Kontext "DocumentWriterWeb"
- end select
- sleep(1)
end sub
'
'-------------------------------------------------------------------------------
@@ -109,8 +108,7 @@ sub SchreibenInMathdok ( Eingabe as String )
warnlog "--No Clipboard available :-(--"
printlog "---ClipTest--- should: "+Eingabe +", is: "+GetClipboard
endif
- EditPaste
- sleep(3)
+ hUseAsyncSlot( "EditPaste" )
end sub
'
'-------------------------------------------------------------------------------
@@ -125,7 +123,7 @@ function sMakeReadOnlyDocumentEditable() as boolean
dim rc as integer
const CFN = "sMakeReadOnlyDocumentEditable::"
- if ( VERBOSE ) then printlog( CFN & "Making document editable (create a copy) if it is readonly" )
+ if ( GVERBOSE ) then printlog( CFN & "Making document editable (create a copy) if it is readonly" )
' We still run into synchronization problems with the "Make document editable" feature
' because we do not know when this button becomes available and ready for use: The
@@ -133,13 +131,13 @@ function sMakeReadOnlyDocumentEditable() as boolean
' One thing appears to work though: Try to execute the slot using hUseAsyncSlot.
' This is a little bit tricky because the state of the document is altered but if
' the slot has been executed once we know for sure that the button on the toolbar is
- ' available and can check its state and - if need be - chenge the document state back.
+ ' available and can check its state and - if need be - change the document state back.
' ========== Workaround begin ==========
hUseAsyncSlot( "EditDoc" )
kontext "Active"
if ( Active.exists() ) then
- if ( VERBOSE ) then printlog( "Handling create copy message" )
+ if ( GVERBOSE ) then printlog( "Handling create copy message" )
Active.yes()
wait( 1000 )
endif
@@ -169,7 +167,7 @@ function sMakeReadOnlyDocumentEditable() as boolean
if ( Bearbeiten.getState( 2 ) = 0 ) then
- rc = hUseAsyncSlot("editdoc")
+ rc = hUseAsyncSlot("editdoc")
if ( rc >= 0 ) then
for iTry = 1 to 2
@@ -181,11 +179,11 @@ function sMakeReadOnlyDocumentEditable() as boolean
printlog( CFN & "Messagebox: " & Active.getText() )
try
- if ( VERBOSE ) then printlog( CFN & "Document was read-only. A copy will be used." )
+ if ( GVERBOSE ) then printlog( CFN & "Document was read-only. A copy will be used." )
Active.Yes()
- if ( VERBOSE ) then printlog( CFN & "Closed 'use copy' message" )
+ if ( GVERBOSE ) then printlog( CFN & "Closed 'use copy' message" )
catch
- if ( VERBOSE ) then printlog( CFN & "Probing for unexpected messagebox..." )
+ if ( GVERBOSE ) then printlog( CFN & "Probing for unexpected messagebox..." )
active.ok()
qaerrorlog( "#i100701 - Object not found message" )
endcatch
@@ -198,11 +196,11 @@ function sMakeReadOnlyDocumentEditable() as boolean
printlog( CFN & "Document appears to be editable" )
endif
else
- if ( VERBOSE ) then printlog( CFN & "Button <Bearbeiten> is pressed, document is editable" )
+ if ( GVERBOSE ) then printlog( CFN & "Button <Bearbeiten> is pressed, document is editable" )
sMakeReadOnlyDocumentEditable() = FALSE
endif
else
- if ( VERBOSE ) then printlog( CFN & "Control <Bearbeiten> is not enabled" )
+ if ( GVERBOSE ) then printlog( CFN & "Control <Bearbeiten> is not enabled" )
endif
end function
@@ -215,16 +213,20 @@ function fSelectFirstOLE() as integer
'+ 0 := Sucess
'- 1 := unknown application
- dim bNavigatorWasVisible as boolean
- bNavigatorWasVisible = FALSE
- dim iIndex
+ const RETVAL_SUCCESS = 0
+ const RETVAL_UNKNOWN_APPLICATION = -1
+
+ const MAX_WAIT_FOR_NAVIGATOR = 10
+
+ dim bNavigatorWasVisible as boolean : bNavigatorWasVisible = FALSE
+ dim iIndex as integer
- fSelectFirstOLE = -1
+ fSelectFirstOLE() = RETVAL_UNKNOWN_APPLICATION
- select case uCASE(gApplication)
+ select case ( gApplication )
case "CALC" : Kontext "NavigatorCalc"
'First check if Navigator is visible and remember result
- if NavigatorCalc.exists (10) then
+ if NavigatorCalc.exists ( MAX_WAIT_FOR_NAVIGATOR ) then
bNavigatorWasVisible = TRUE
else
try
@@ -240,7 +242,7 @@ function fSelectFirstOLE() as integer
endcatch
end if
Kontext "NavigatorCalc"
- if NavigatorCalc.exists (10) then
+ if NavigatorCalc.exists ( MAX_WAIT_FOR_NAVIGATOR ) then
'Select first OLE in list
Liste.TypeKeys "<HOME>"
for iIndex = 1 to 8
@@ -252,12 +254,12 @@ function fSelectFirstOLE() as integer
Liste.select(6)
Liste.TypeKeys "+"
Liste.TypeKeys "<DOWN><RETURN>"
- fSelectFirstOLE = 0
+ fSelectFirstOLE() = RETVAL_SUCCESS
else
QAErrorLog "Navigator couldn't be opened!"
end if
case "DRAW" , "IMPRESS" : Kontext "NavigatorDraw"
- if NavigatorDraw.Exists(10) then
+ if NavigatorDraw.Exists( MAX_WAIT_FOR_NAVIGATOR ) then
bNavigatorWasVisible = TRUE
else
try
@@ -272,21 +274,21 @@ function fSelectFirstOLE() as integer
ViewNavigator
endcatch
Kontext "NavigatorDraw"
- if NavigatorDraw.exists(10) then
+ if NavigatorDraw.exists( MAX_WAIT_FOR_NAVIGATOR ) then
'Select first OLE in list
Liste.TypeKeys "<HOME>"
Liste.select(1)
Liste.TypeKeys "+<DOWN><RETURN>"
- fSelectFirstOLE = 0
+ fSelectFirstOLE() = RETVAL_SUCCESS
else
- QAErrorLog "Navigator did not occoured!"
+ QAErrorLog "Navigator did not open!"
end if
end if
case "WRITER" , "HTML" , "MASTERDOCUMENT" :
- select case uCASE(gApplication)
+ select case ( gApplication )
case "MASTERDOCUMENT" : Kontext "NavigatorGlobalDoc"
- if NavigatorGlobalDoc.Exists(10) then
+ if NavigatorGlobalDoc.Exists( MAX_WAIT_FOR_NAVIGATOR ) then
bNavigatorWasVisible = TRUE
else
ViewNavigator
@@ -299,7 +301,7 @@ function fSelectFirstOLE() as integer
endif
case else : Kontext "NavigatorWriter"
'First check if Navigator is visible and remember result
- if NavigatorWriter.Exists (10) then
+ if NavigatorWriter.Exists ( MAX_WAIT_FOR_NAVIGATOR ) then
bNavigatorWasVisible = TRUE
else
try
@@ -317,7 +319,7 @@ function fSelectFirstOLE() as integer
end if
end select
Kontext "NavigatorWriter"
- if NavigatorWriter.Exists(10) then
+ if NavigatorWriter.Exists( MAX_WAIT_FOR_NAVIGATOR ) then
' Check if all content is visible
if Auswahlliste.GetItemCount < 2 then
Inhaltsansicht.Click
@@ -329,7 +331,7 @@ function fSelectFirstOLE() as integer
next iIndex
Auswahlliste.select(5)
Auswahlliste.TypeKeys "+<DOWN><RETURN>"
- fSelectFirstOLE = 0
+ fSelectFirstOLE() = RETVAL_SUCCESS
else
QAErrorLog "Navigator did not occoured!"
end if
@@ -340,7 +342,7 @@ function fSelectFirstOLE() as integer
if bNavigatorWasVisible = TRUE then
printlog "Leaving navigator open as initially found"
else
- if fSelectFirstOLE = 0 then
+ if ( fSelectFirstOLE = RETVAL_SUCCESS ) then
ViewNavigator
printlog "Closing navigator as initially found"
else
diff --git a/testautomation/global/tools/includes/required/t_files.inc b/testautomation/global/tools/includes/required/t_files.inc
index 0736de15debf..7859e6495cf1 100644
--- a/testautomation/global/tools/includes/required/t_files.inc
+++ b/testautomation/global/tools/includes/required/t_files.inc
@@ -31,8 +31,6 @@
'*
'\******************************************************************************
-private const VERBOSE = FALSE ' set to TRUE for debugging
-
function hGrafikEinfuegen ( Grafik$ ) as Boolean
'/// hGrafikEinfuegen hGraphicInsert
'/// A graphic will be inserted (not linked).
@@ -143,56 +141,7 @@ function hGrafikVerknuepftEinfuegen ( Grafik$ ) as Boolean
'GrafikEinfuegenDlg not open
endif
end function
-'
-'-------------------------------------------------------------------------------
-'
-function IsItSaved as boolean
- '/// IsItSaved
- '/// Wait until document is saved.
- Dim iLoop as integer
- IsItSaved = FALSE
- sleep(3)
- for iLoop =1 to 20
- try
- 'Calling slot 'IsDocSaving'
- IsItSaved = IsDocSaving
- catch
- IsItSaved = FALSE
- endcatch
-
- if IsItSaved = TRUE then
- exit for
- end if
- sleep(1)
- next iLoop
- sleep(2)
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function IsItLoaded as boolean
- '/// IsItLoaded
- '/// Wait until document is loaded
- Dim iLoop as integer
-
- IsItLoaded = FALSE
- sleep(3)
- for iLoop =1 to 20
- try
- 'Calling slot 'IsDocLoading'
- IsItLoaded = IsDocLoading
- catch
- IsItLoaded = FALSE
- endcatch
-
- if IsItLoaded = TRUE then
- exit for
- end if
- sleep(1)
- next iLoop
- sleep(2)
-end function
'
'-------------------------------------------------------------------------------
'
@@ -229,6 +178,11 @@ end function
'-------------------------------------------------------------------------------
'
function IsImageLoaded
+
+' used by:
+' - hGrafikEinfuegen = IsImageLoaded
+' - hGrafikVerknuepftEinfuegen = IsImageLoaded
+
'/// IsImageLoaded
'/// Wait until images in document are loaded
Dim i% : Dim Herbert as Boolean
@@ -254,70 +208,9 @@ end function
'
'-------------------------------------------------------------------------------
'
-sub hIsWebPageLoaded as boolean
- 'Author: Joerg Sievers
- '/// If a document in StarOffice Writer is loaded all 9 items in the
- '///+ statusbar are visible otherwise not.
- '///+ This sub checks the state of these items.
- Dim i as integer
- Dim iGibtdenStatusraus as integer
- printlog "- global::tools::inc::tfiles.inc::hIsWebPageLoaded"
- hIsWebPageLoaded = FALSE
- for i = 1 to 20
- Kontext "DocumentWriter"
- if DocumentWriter.Exists(3) then
- 'Count the items on the status bar.
- iGibtdenStatusraus = DocumentWriter.StatusGetItemCount
- 'There are nine items on the status bar if the web page has been loaded.
- if iGibtdenStatusraus = 9 then
- hIsWebPageLoaded = TRUE
- exit for
- end If
- end if
- WaitSlot( 3000 )
- next i
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub hSys2IntDlg
- '/// Change from system to StarOffice-internal file-dialog (only for Win32)
- if gPlatgroup <> "unx" then
- Call hhSysToInt ( TRUE )
- endif
- gUseSysDlg = FALSE
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub hInt2SysDlg
- '/// Change from StarOffice-internal to system file-dialog (only for Win32)
- if gPlatgroup <> "unx" then
- Call hhSysToInt ( FALSE )
- endif
- gUseSysDlg = TRUE
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub hhSysToInt ( bwhats as Boolean )
- '/// subroutine for <i>hSys2IntDlg</i> and </i>hInt2SysDlg</i>
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- if bwhats = TRUE then
- StarOfficeDialogeBenutzen.Check
- else
- StarOfficeDialogeBenutzen.Uncheck
- end if
- Sleep 1
- Kontext "OptionenDlg"
- OptionenDlg.OK
- WaitSlot( 3000 )
-end sub
-'
-'-------------------------------------------------------------------------------
-'
function hGetUsedFilter () as string
+
+ ' used in math and graphics modules
'/// Get used filter for loaded file.
try
FileSaveAs
@@ -331,28 +224,6 @@ end function
'
'-------------------------------------------------------------------------------
'
-function hFileExport (sName as string, sFilter as string) as boolean
- '/// Wrapper function to simplify the use of the export functions, just give a filename and export format.
- '///+ INPUT:<ul><li>sName: filename</li><li>sFilter: &quot;PDF&quot;: call export for PDF</li></ul>
- '///+ RETURN: execution success?
- select case sFilter
- case "PDF" : '/// use the function 'hExportAsPDF' with RECOMMENDED values /// '
- hFileExport = hExportAsPDFmulti (3, TRUE, sName, FALSE, TRUE, 1, 1)
- end select
- kontext
- if active.exists(5) then
- try
- printlog active.getText
- active.ok
- warnLog "i26820 - errormessage about saving"
- catch
- printlog "pdf unexpected error in hFileExport()"
- endcatch
- endif
-end function
-'
-'-------------------------------------------------------------------------------
-'
function hExportAsPDFmulti (iTypeOfCall as integer, bExecute as boolean, sFileName as string, bAutoExtension as boolean, bOverwriteFile as boolean, iRange as integer, iConpression as integer, optional sRange as string) as boolean
'/// Export a document to PDF with various options.
'///+ INPUT
@@ -665,7 +536,7 @@ function hDeleteFile( cFileOrig as string ) as boolean
warnlog( CFN & "File was not deleted: " & cFile )
hDeleteFile() = false
else
- if ( VERBOSE ) then printlog( CFN & "File successfully deleted: " & cFile )
+ if ( GVERBOSE ) then printlog( CFN & "File successfully deleted: " & cFile )
hDeleteFile() = true
endif
catch
@@ -699,7 +570,7 @@ function hFileOpen( cFile as string ) as boolean
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
hFileOpen() = FALSE
const CFN = "global::tools::inc::t_files.inc::hFileOpen():"
- if ( VERBOSE ) then printlog( CFN & "Load: " & sFile )
+ if ( GVERBOSE ) then printlog( CFN & "Load: " & sFile )
FileOpen( "URL", sFile, "FrameName", "_default" )
if ( hFileWait( FALSE ) >= 0 ) then hFileOpen() = TRUE
@@ -717,7 +588,7 @@ function hFileOpenSpecial( cFile as string, cFlag as string ) as boolean
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
const CFN = "global::tools::inc::t_files.inc::hFileOpenSpecial():"
hFileOpenSpecial() = FALSE
- if ( VERBOSE ) then printlog( "Load (Flag): " & sFile & " (" & cFlag & ")" )
+ if ( GVERBOSE ) then printlog( "Load (Flag): " & sFile & " (" & cFlag & ")" )
select case( lcase( cFlag ) )
case "readonly"
@@ -742,7 +613,7 @@ function hFileOpenWithFilter( cFile as string, cFilter as string )
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
const CFN = "global::tools::inc::t_files.inc::hFileOpenWithFilter():"
hFileOpenWithFilter() = FALSE
- if ( VERBOSE ) then printlog( CFN & "Load (Filter): " & sFile & " (" & cFilter & ")" )
+ if ( GVERBOSE ) then printlog( CFN & "Load (Filter): " & sFile & " (" & cFilter & ")" )
FileOpen( "URL", sFile, "FrameName", "_default", "FilterName", cFilter )
if ( hFileWait( FALSE ) >= 0 ) then hFileOpenWithFilter() = TRUE
@@ -754,7 +625,7 @@ function hFileSave() as boolean
const CFN = "global::tools::inc::t_files.inc::hFileSave():"
hFileSave() = FALSE
- if ( VERBOSE ) then printlog( CFN & "Save file." )
+ if ( GVERBOSE ) then printlog( CFN & "Save file." )
FileSave( "SynchronMode", TRUE )
if ( hFileWait( TRUE ) >= 0 ) then hFileSave() = TRUE
@@ -767,7 +638,7 @@ function hFileSaveAs( cFile as string ) as boolean
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
const CFN = "global::tools::inc::t_files.inc::hFileSaveAs():"
hFileSaveAs() = FALSE
- if ( VERBOSE ) then printlog( CFN & "Save: " & sFile )
+ if ( GVERBOSE ) then printlog( CFN & "Save: " & sFile )
FileSaveAs( "URL", sFile, "Overwrite", FALSE )
if ( hFileWait( TRUE ) >= 0 ) then hFileSaveAs() = TRUE
@@ -780,7 +651,7 @@ function hFileSaveAsKill( cFile as string ) as boolean
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
const CFN = "global::tools::inc::t_files.inc::hFileSaveAsKill():"
hFileSaveAsKill() = FALSE
- if ( VERBOSE ) then printlog( CFN & "Save, replacing: " & sFile )
+ if ( GVERBOSE ) then printlog( CFN & "Save, replacing: " & sFile )
FileSaveAs( "URL", sFile, "Overwrite", TRUE )
if ( hFileWait( TRUE ) >= 0 ) then hFileSaveAsKill() = TRUE
@@ -793,7 +664,7 @@ function hFileSaveAsKillWithPassword( cFile as string, cPassword as string ) as
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
const CFN = "global::tools::inc::t_files.inc::hFileSaveAsKillWithPassword():"
hFileSaveAsKillWithPassword() = FALSE
- if ( VERBOSE ) then printlog( CFN & "Save with password, replacing: " & sFile & "::" & cPassword )
+ if ( GVERBOSE ) then printlog( CFN & "Save with password, replacing: " & sFile & "::" & cPassword )
FileSaveAs( "URL", sFile, "Overwrite", TRUE, "Password", cPassword )
if ( hFileWait( TRUE ) >= 0 ) then hFileSaveAsKillWithPassword() = TRUE
@@ -806,7 +677,7 @@ function hFileSaveAsWithFilter( cFile as string, cFilter as string ) as boolean
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
const CFN = "global::tools::inc::t_files.inc::hFileSaveAsWithFilter():"
hFileSaveAsWithFilter() = FALSE
- if ( VERBOSE ) then printlog( CFN & "Save with filter: " & sFile & "::" & cFilter )
+ if ( GVERBOSE ) then printlog( CFN & "Save with filter: " & sFile & "::" & cFilter )
FileSaveAs( "URL", sFile, "FilterName", cFilter, "Overwrite", FALSE )
if ( hFileWait( TRUE ) >= 0 ) then hFileSaveAsWithFilter() = TRUE
@@ -819,7 +690,7 @@ function hFileSaveAsWithFilterKill( cFile as string, cFilter as string ) as bool
dim sFile as string : sFile = convertToURL( convertpath( cFile ) )
const CFN = "global::tools::inc::t_files.inc::hFileSaveAsWithFilterKill():"
hFileSaveAsWithFilterKill() = FALSE
- if ( VERBOSE ) then printlog( CFN & "Save with filter, replacing: " & sFile & "::" & cFilter )
+ if ( GVERBOSE ) then printlog( CFN & "Save with filter, replacing: " & sFile & "::" & cFilter )
FileSaveAs( "URL", sFile, "FilterName", cFilter, "Overwrite", TRUE )
if ( hFileWait( TRUE ) >= 0 ) then hFileSaveAsWithFilterKill() = TRUE
@@ -924,7 +795,7 @@ function hFileWait( optional bWarn as boolean ) as integer
loop
- if ( VERBOSE ) then
+ if ( GVERBOSE ) then
select case iWait
case -1 : printlog( CFN & "Timeout reached, rc = " & iWait )
case -2 : printlog( CFN & "Macro security warning displayed, rc = " & iWait )
diff --git a/testautomation/global/tools/includes/required/t_lists.inc b/testautomation/global/tools/includes/required/t_lists.inc
index 3819a21097b0..f32db2f29277 100644
--- a/testautomation/global/tools/includes/required/t_lists.inc
+++ b/testautomation/global/tools/includes/required/t_lists.inc
@@ -595,31 +595,5 @@ function hListClearBlank( lsList() as string ) as integer
end function
-'*******************************************************************************
-
-function hListIntegrityTest( sList() as string ) as boolean
-
- const CFN = "global::tools::inc::t_list.inc::hListIntegrityTest:"
-
- '///<h3>Verify that listcount( array ) < ubound( array )</h3>
- ' NOTE: some listfunctions fail if ubound = listcount
-
- dim iListCount as integer
- dim iUbound as integer
-
- iListCount = listcount( sList() )
- iUbound = ubound( sList() )
-
- if ( iListCount >= iUbound ) then
- warnlog( CFN & "ListCount points beyond array boundary" )
- warnlog( CFN & "ListCount: " & iListCount )
- warnlog( CFN & "UBOUND...: " & iUbound )
- hListIntegrityTest() = false
- exit function
- end if
-
- hListIntegrityTest() = true
-
-end function
diff --git a/testautomation/global/tools/includes/required/t_menu.inc b/testautomation/global/tools/includes/required/t_menu.inc
index d8b1288c3e04..f78e2239e943 100755
--- a/testautomation/global/tools/includes/required/t_menu.inc
+++ b/testautomation/global/tools/includes/required/t_menu.inc
@@ -585,37 +585,57 @@ function hUseMenu ()
'///<b> function hUseMenu () </b>///'
'///+ very global function: depends on 'gApplication' just activates the menu-bar ///'
- Select Case Ucase(gApplication)
- Case "WRITER"
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- Case "MASTERDOCUMENT"
- Kontext "DocumentMasterDoc"
- DocumentMasterDoc.UseMenu
- Case "HTML"
- Kontext "DocumentWriterWeb"
- DocumentWriterWeb.UseMenu
- case "CALC" ' there are 2 entries over :-( usually only one, html 0 :-((((
- Kontext "DocumentCalc"
- DocumentCalc.UseMenu
- case "DRAW"
- Kontext "DocumentDraw"
- DocumentDraw.UseMenu
- case "IMPRESS"
- Kontext "DocumentImpress"
- DocumentImpress.UseMenu
- case "MATH" :
- Kontext "DocumentMath"
- DocumentMath.UseMenu
- case "DATABASE" :
- Kontext "DATABASE"
- Database.UseMenu
- case "BASIC" :
- Kontext "BasicIde"
- BasicIde.UseMenu
- case "NONE" :
- Kontext "DocumentBackground"
- DocumentBackground.UseMenu
+ Select Case ( gApplication )
+ Case "WRITER"
+
+ Kontext "DocumentWriter"
+ DocumentWriter.UseMenu
+
+ Case "MASTERDOCUMENT"
+
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.UseMenu
+
+ Case "HTML"
+
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.UseMenu
+
+ case "CALC" ' there are 2 entries over :-( usually only one, html 0 :-((((
+
+ Kontext "DocumentCalc"
+ DocumentCalc.UseMenu
+
+ case "DRAW"
+
+ Kontext "DocumentDraw"
+ DocumentDraw.UseMenu
+
+ case "IMPRESS"
+
+ Kontext "DocumentImpress"
+ DocumentImpress.UseMenu
+
+ case "MATH" :
+
+ Kontext "DocumentMath"
+ DocumentMath.UseMenu
+
+ case "DATABASE" :
+
+ Kontext "DATABASE"
+ Database.UseMenu
+
+ case "BASIC" :
+
+ Kontext "BasicIde"
+ BasicIde.UseMenu
+
+ case "NONE" :
+
+ Kontext "DocumentBackground"
+ DocumentBackground.UseMenu
+
end select
end function
@@ -625,28 +645,42 @@ end function
function hOpenContextMenu()
'/// very global function: depends on 'gApplication' just opens the Context Menu ///'
- Select Case Ucase(gApplication)
- Case "WRITER"
- Kontext "DocumentWriter"
- DocumentWriter.openContextMenu
- Case "MASTERDOCUMENT"
- Kontext "DocumentMasterDoc"
- DocumentMasterDoc.openContextMenu
- Case "HTML"
- Kontext "DocumentWriterWeb"
- DocumentWriterWeb.openContextMenu
- case "CALC"
- Kontext "DocumentCalc"
- DocumentCalc.openContextMenu
- case "DRAW"
- Kontext "DocumentDraw"
- DocumentDraw.openContextMenu
- case "IMPRESS"
- Kontext "DocumentImpress"
- DocumentImpress.openContextMenu
- case "MATH" :
- Kontext "DocumentMath"
- DocumentMath.openContextMenu
+ Select Case ( gApplication )
+ Case "WRITER"
+
+ Kontext "DocumentWriter"
+ DocumentWriter.openContextMenu
+
+ Case "MASTERDOCUMENT"
+
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.openContextMenu
+
+ Case "HTML"
+
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.openContextMenu
+
+ case "CALC"
+
+ Kontext "DocumentCalc"
+ DocumentCalc.openContextMenu
+
+ case "DRAW"
+
+ Kontext "DocumentDraw"
+ DocumentDraw.openContextMenu
+
+ case "IMPRESS"
+
+ Kontext "DocumentImpress"
+ DocumentImpress.openContextMenu
+
+ case "MATH" :
+
+ Kontext "DocumentMath"
+ DocumentMath.openContextMenu
+
end select
end function
@@ -811,35 +845,33 @@ function fSplitWindowTitle(sInString as string)
' sanity checks, to warn if assumptions are not met!
select case x
- case 1:
- if ((bTestToolCommunication) OR (bDebugVersion)) then
- qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 1"
- bError = TRUE
- endif
- case 2:
- if ((bTestToolCommunication) OR (NOT bDebugVersion)) then
- qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 2"
- bError = TRUE
- endif
- case 3:
- if ((NOT bTestToolCommunication) OR (bDebugVersion)) then
- qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 3"
- bError = TRUE
- endif
- case 4:
- if ((NOT bTestToolCommunication) OR (NOT bDebugVersion)) then
- qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 4"
- bError = TRUE
- endif
- case else:
- qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 0"
+ case 1:
+ if ((bTestToolCommunication) OR (bDebugVersion)) then
+ qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 1"
+ bError = TRUE
+ endif
+ case 2:
+ if ((bTestToolCommunication) OR (NOT bDebugVersion)) then
+ qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 2"
+ bError = TRUE
+ endif
+ case 3:
+ if ((NOT bTestToolCommunication) OR (bDebugVersion)) then
+ qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 3"
bError = TRUE
+ endif
+ case 4:
+ if ((NOT bTestToolCommunication) OR (NOT bDebugVersion)) then
+ qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 4"
+ bError = TRUE
+ endif
+ case else:
+ qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 0"
+ bError = TRUE
end select
- if bError then
- printlog sInString
- endif
-
+ if bError then printlog sInString
+
if (x > 1) then ' there is more to evaluate
' save the current computed values
for i=0 to 2
@@ -849,7 +881,6 @@ function fSplitWindowTitle(sInString as string)
redim sTempReturn(4) as string
' copy data back
for i=0 to 2
- '***** Warning: Indention error *****
sTempReturn(i) = sTempReturn2(i)
next i
' set remaining values, if exist
diff --git a/testautomation/global/tools/includes/required/t_option2.inc b/testautomation/global/tools/includes/required/t_option2.inc
index 174048985c59..2b10f50ce00a 100644
--- a/testautomation/global/tools/includes/required/t_option2.inc
+++ b/testautomation/global/tools/includes/required/t_option2.inc
@@ -196,6 +196,9 @@ function hSetMacroSecurity( iLevel as integer ) as integer
'///Switch between macro security levels in Tools/Options
'///<ul>
const CFN = "hSetMacroSecurity::"
+ const RETVAL_FAILURE = -1
+ const DEFAULT_WAIT_TIME = 2
+
dim iOldSecurityLevel as integer
dim caLevel( 3 ) as string
@@ -206,7 +209,7 @@ function hSetMacroSecurity( iLevel as integer ) as integer
if ( ( iLevel < GC_MACRO_SECURITY_LEVEL_LOW ) or ( iLevel > GC_MACRO_SECURITY_LEVEL_VERYHIGH ) ) then
warnlog( CFN & "Invalid index (0...3) passed to function: " & ilevel )
- hSetMacroSecurity() = -1
+ hSetMacroSecurity() = RETVAL_FAILURE
exit function
end if
@@ -216,12 +219,12 @@ function hSetMacroSecurity( iLevel as integer ) as integer
'///+<li>Click on the macro security button</li>
Kontext "TabSecurity"
- if ( MacroSecurity.exists( 2 ) ) then
+ if ( MacroSecurity.exists( DEFAULT_WAIT_TIME ) ) then
MacroSecurity.click()
'///+<li>Ensure we are on the Security Level page</li>
kontext "Active"
- if ( Active.exists( 2 ) ) then
+ if ( Active.exists( DEFAULT_WAIT_TIME ) ) then
Kontext
active.setpage TabSecurityLevel
@@ -241,12 +244,12 @@ function hSetMacroSecurity( iLevel as integer ) as integer
else
printlog( CFN & "Security Tabpage not available. Aborting." )
kontext "OptionenDlg"
- if ( OptionenDlg.exists( 2 ) ) then
+ if ( OptionenDlg.exists( DEFAULT_WAIT_TIME ) ) then
OptionenDlg.cancel()
else
warnlog( CFN & "Unrecoverable error, status unknown." )
endif
- hSetMacroSecurity() = -1
+ hSetMacroSecurity() = RETVAL_FAILURE
exit function
endif
@@ -263,12 +266,12 @@ function hSetMacroSecurity( iLevel as integer ) as integer
else
printlog( CFN & "Macro Security Dialog did not open. Aborting." )
kontext "OptionenDlg"
- if ( OptionenDlg.exists( 2 ) ) then
+ if ( OptionenDlg.exists( DEFAULT_WAIT_TIME ) ) then
OptionenDlg.cancel()
else
warnlog( CFN & "Unrecoverable error, status unknown." )
endif
- hSetMacroSecurity() = -1
+ hSetMacroSecurity() = RETVAL_FAILURE
exit function
endif
@@ -276,7 +279,7 @@ function hSetMacroSecurity( iLevel as integer ) as integer
TabSecurityLevel.ok()
else
warnlog( CFN & "The Macro Security Button is not available" )
- iOldSecurityLevel = -1
+ iOldSecurityLevel = RETVAL_FAILURE
end if
Kontext "OptionenDLG"
OptionenDLG.OK()
@@ -312,6 +315,7 @@ function hGetMacroSecurityAPI() as integer
'///</ol>
const CFN = "hGetMacroSecurityAPI::"
+ const RETVAL_FAILURE = -1
dim oUnoOfficeConnection as object
dim oUnoConfigurationAccess as object
@@ -336,7 +340,7 @@ function hGetMacroSecurityAPI() as integer
catch
warnlog( CFN & "Failed to retrieve macro security Level via API" )
- iLevel = -1
+ iLevel = RETVAL_FAILURE
endcatch
diff --git a/testautomation/global/tools/includes/required/t_tools1.inc b/testautomation/global/tools/includes/required/t_tools1.inc
index a908af39e5af..f351a49d0aee 100644
--- a/testautomation/global/tools/includes/required/t_tools1.inc
+++ b/testautomation/global/tools/includes/required/t_tools1.inc
@@ -35,8 +35,6 @@ private SLEEP_TIME_REQUESTED as integer
private SLEEP_CALLS_SUM as integer
private SLEEP_TIME_USED as integer
-private const VERBOSE = FALSE
-
function GetClipboardText as string
'/// Returns the correct clipboard text (also if there is a 'RETURN' at it's end.
@@ -318,7 +316,7 @@ function Sleep( optional _iSeconds as integer ) as integer
printlog( CFN & "Zero time. Please consider removing Sleep() statement" )
endif
- if ( VERBOSE ) then
+ if ( GVERBOSE ) then
SLEEP_CALLS_SUM = SLEEP_CALLS_SUM + 1
SLEEP_TIME_USED = SLEEP_TIME_USED + iTimeDiff / 1000 ' good enough
SLEEP_TIME_REQUESTED = SLEEP_TIME_REQUESTED + iSeconds
@@ -412,10 +410,10 @@ sub DialogTest( Window, optional iNumber as integer)
'save with respect to application and language
sCapturePath = ConvertPath (gOfficePath + "user\work\screenshots"+iSprache+"\")
sPicName = sCapturePath + lCase(gApplication)
+
'create directory if it doesn't exist
- if hDirectoryExists(sPicName) <> TRUE then
- mkdir (sPicName)
- end if
+ if ( not FileExists(sPicName) ) then mkdir sPicName
+
sPicName = sPicName + sName
try
sleep 1
@@ -697,28 +695,6 @@ end function
'*******************************************************************************
-sub ErgebnisSchreiben ( Window, Name$ )
-
- '/// ErgebnisSchreiben
- '///+ Used in context with making screenshots.
-
- Dim FileNum% : Dim i%
- Dim Datei$
- Dim Text$ : Dim Text2$
-
- Datei$ = sCapturePath + "Ergebis.txt"
- Text2$ = Window.Name
- Text$ = Text2$ + " => " + Name$
-
- FileNum% = FreeFile
- Open Datei$ for Append as #FileNum%
- Print #FileNum%, Text$
- Close #FileNum%
-
-end sub
-
-'*******************************************************************************
-
sub TextInDatei ( TextText$, Datei$ )
'/// TextInDatei
@@ -1178,152 +1154,3 @@ sub raiseApplication
end if
end sub
-
-'*******************************************************************************
-
-function hUseAsyncSlot( cSlot as string ) as integer
-
- dim iWait as integer
- dim iTime as integer : iTime = 0
- const MAX_WAIT = 100
- const DELAY = 100
- const CFN = "global::tools::includes::required::hUseAsyncSlot():"
-
- if ( VERBOSE ) then printlog( CFN & "Using slot: " & cSlot )
- WaitSlot()
- for iWait = 1 to MAX_WAIT
- try
- select case ( lcase( cSlot ) )
- case "fileclose" : FileClose
- case "filesaveas" : FileSaveAs( "SynchronMode", TRUE )
- case "filesaveall" : FileSaveAll( "SynchronMode", TRUE )
- case "fileexport" : FileExport
- case "filereload" : FileReload( "SynchronMode", TRUE )
- case "fileopen" : FileOpen
-
- case "editdoc" : EditDoc
- case "editcopy" : EditCopy
- case "editchangesrecord" : EditChangesRecord
- case "editchangesshow" : EditChangesShow
- case "editchangesprotecttrace" : EditChangesProtectTrace
- case "editchangescomment" : EditChangesComment
-
- case "editpaste" : EditPaste
- case "editcopy" : EditCopy
- case "editcut" : EditCut
- case "editselectall" : EditSelectAll
- case "editselectallmath" : EditSelectAllMath
- case "editselectionmodeblock" : EditSelectionModeBlock
- case "editselectionmodestandard" : EditSelectionModeStandard
- case "editdeletecontents" : EditDeleteContents
- case "editundo" : EditUndo
- case "editredo" : EditRedo
- case "editrepeat" : EditRepeat
- case "editpastespecial" : EditPasteSpecial
- case "editpastespecialwriter" : EditPasteSpecialWriter
- case "editsearchandreplace" : EditSearchAndReplace
- case "editduplicate" : EditDuplicate
- case "editgluepoints" : EditGluePoints
- case "editdeleteslide" : EditDeleteSlide
- case "editobjectproperties" : EditObjectProperties
- case "editobjectedit" : EditObjectEdit
- case "editobjectsavecopyas" : EditObjectSaveCopyAs
-
- case "formatcharttype" : FormatChartType
- case "formatcontrol" : FormatControl
- case "formateditpoints" : FormatEditPoints
- case "formatsections" : FormatSections
- case "formatchangecaseupper" : FormatChangeCaseUpper
- case "formatchangecaselower" : FormatChangeCaseLower
- case "formatarea" : FormatArea
- case "formatarrangebringtofrontcalc" : FormatArrangeBringToFrontCalc
- case "formatflipvertically" : FormatFlipVertically
- case "formatfliphorizontally" : FormatFlipHorizontally
- case "formatline" : FormatLine
- case "formatpositionandsize" : FormatPositionAndSize
- case "formatfontwork" : FormatFontwork
- case "formatparagraph" : FormatParagraph
- case "formatstylebold" : FormatStyleBold
- case "formatungroupdraw" : FormatUngroupDraw
- case "formatexitgroupdraw" : FormatExitGroupDraw
- case "formatgroupgroup" : FormatGroupGroup
- case "formatgroupeditgroupcalc" : FormatGroupEditGroupCalc
- case "formatalignmentlefttext" : FormatAlignmentLeftText
- case "formatgraphics" : FormatGraphics
- case "formatanchortopage" : FormatAnchorToPage
- case "formatwrapcontour" : FormatWrapContour
- case "formatwrapeditcontour" : FormatWrapEditContour
- case "formatpagewriter" : FormatPageWriter
-
- case "insertindexesbibliographyentry" : InsertIndexesBibliographyEntry
- case "insertobjectchart" : InsertObjectChart
- case "inserttablewriter" : InsertTableWriter
- case "insertobjectformulawriter" : InsertObjectFormulaWriter
- case "insertfloatingframe" : InsertFloatingFrame
-
- case "contextpositionandsize" : ContextPositionAndSize
-
- case "toolslanguagehyphenate" : ToolsLanguageHyphenate
- case "toolsupdateallindexes" : ToolsUpdateAllIndexes
- case "toolsupdatefields" : ToolsUpdateFields
- case "toolsupdatelinks" : ToolsUpdateLinks
- case "toolslanguagehangulhanjaconversion" : ToolsLanguageHangulHanjaConversion
-
- ' This is the property browser in the BASIC IDE
- case "contextproperties" : ContextProperties
-
- case else : warnlog( "Unknown slot called: " & cSlot )
- end select
-
- exit for
- catch
- wait( DELAY )
- iTime = iWait * DELAY
- endcatch
- next iWait
-
- ' Timeout is -1
- if ( iTime = MAX_WAIT * DELAY ) then
- iTime = -1
- endif
- if ( VERBOSE ) then printlog( CFN & "Exit with rc=" & iTime )
- hUseAsyncSlot() = iTime
-
-
-end function
-
-'*******************************************************************************
-
-function hClickButton( oButton as object ) as integer
-
- dim iWait as integer
- dim iTime as integer : iTime = 0
- const MAX_WAIT = 50
- const CFN = "global::tools::includes::required::hClickButton():"
-
- if ( VERBOSE ) then printlog( CFN & "Click button: " & oButton.name() )
- WaitSlot()
- for iWait = 1 to MAX_WAIT
- try
- if ( oButton.exists() ) then
- if ( VERBOSE ) then printlog( CFN & "Button exists" )
- if ( oButton.isEnabled() ) then
- if ( VERBOSE ) then printlog( "Button is enabled" )
- oButton.click()
- endif
- endif
- exit for
- catch
- wait( 100 )
- iTime = iWait * 100
- endcatch
- next iWait
- if ( iTime = 5000 ) then
- iTime = -1
- endif
- if ( VERBOSE ) then printlog( CFN & "Exit with rc=" & iTime )
- hClickButton() = iTime
-
-end function
-
-
diff --git a/testautomation/global/tools/includes/required/t_tools2.inc b/testautomation/global/tools/includes/required/t_tools2.inc
index 2301c2e5648f..449977d9329d 100644
--- a/testautomation/global/tools/includes/required/t_tools2.inc
+++ b/testautomation/global/tools/includes/required/t_tools2.inc
@@ -96,69 +96,6 @@ function hSetLocaleStrings (fLocale as String, TBOstringLocale() as String ) as
hSetLocaleStrings = bFoundLanguage
end function
-'-------------------------------------------------------------------------
-
-sub GetHTMLCharSet as String
-'///function to get the Character Set for HTML export
-'///+(tools/options/load&save/HTML compatibility -> Character Set)
- ToolsOptions
- hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- GetHTMLCharSet = Zeichensatz.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-end sub
-
-'-------------------------------------------------------------------------
-
-sub SetHTMLCharSet ( CharSet as String )
-'///routine to set the Character Set for HTML export
-'///+( tools/options/load&save/HTML compatibility -> Character Set )
- ToolsOptions
- hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- Zeichensatz.Select CharSet
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-end sub
-
-'-------------------------------------------------------------------------
-
-sub SetHTMLCharSetToUTF8 as Boolean
-'///function to set the Character Set for HTML export to 'Unicode UTF8'
-'///+( tools/options/load&save/HTML compatibility -> Character Set )
- Dim i as Integer
- Dim sDum as String
-
- ToolsOptions
- hToolsOptions ( "LoadSave", "HTMLCompatibility" )
-
- for i=1 to Zeichensatz.GetItemCount
- sDum = Zeichensatz.GetItemText (i)
- if Instr ( lcase (sDum), "utf-8" ) <> 0 then
- Zeichensatz.Select (i)
- i=1000
- else
- if Instr ( lcase (sDum), "utf8" ) <> 0 then
- Zeichensatz.Select (i)
- i=1000
- else
- if Instr ( lcase (sDum), "utf 8" ) <> 0 then
- Zeichensatz.Select (i)
- i=1000
- end if
- end if
- end if
- next i
- if i<1000 then
- SetHTMLCharSetToUTF8 = FALSE
- else
- SetHTMLCharSetToUTF8 = TRUE
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-end sub
-
-'-------------------------------------------------------------------------
-
function dec(Ref as integer)
'/// decrement variable, call it like 'dec variable' ///'
' reference or value .-) an excursion :-))
@@ -177,235 +114,11 @@ end function
'-------------------------------------------------------------------------
-function ActivateAutoPilot ( sWhichOne as String ) as Boolean
-'Author: TZ
-'///Routine to activate (WebPage Autopilot, Form Autopilot, Documentconverter and Euroconveter)
-'///Open via menu items (not via SlotID or Macro URL)
-'///<u>input</u>: Which Autopilot (<i>webpage</i>, <i>form</i>, <i>documentconverter</i>, <i>euroconverter</i>,<i>addressdatasource</i>)
-'///<u>output</u>:<ul><li>TRUE: Autopilot is open</li><li>FALSE: Autopilot can not be opened</li></ul>
- Dim bIsLoaded as boolean, LoadTime as integer, PrintTime as Integer
-
- bIsLoaded = FALSE
- LoadTime = 0
-
- select case gApplication
- case "WRITER"
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- case "HTML"
- Kontext "DocumentWriterWeb"
- DocumentWriterWeb.UseMenu
- case "MASTERDOCUMENT"
- Kontext "DocumentMasterDoc"
- DocumentMasterDoc.UseMenu
- case "CALC"
- Kontext "DocumentCalc"
- DocumentCalc.UseMenu
- case "IMPRESS"
- Kontext "DocumentImpress"
- DocumentImpress.UseMenu
- case "DRAW"
- Kontext "DocumentDraw"
- DocumentDraw.UseMenu
- case "MATH"
- Kontext "DocumentMath"
- DocumentMath.UseMenu
- case else
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- end select
- sleep(2)
- hMenuSelectNr(1)
- sleep(2)
- hMenuSelectNr(4)
- sleep(2)
-
- select case lcase (sWhichOne)
- case "webpage" : hMenuSelectNr(5)
- case "documentconverter" : hMenuSelectNr(6)
- case "euroconverter" : hMenuSelectNr(7)
- case "addressdatasource" : hMenuSelectNr(8)
- end select
- sleep(5)
-
- while bIsLoaded = False
- while LoadTime < 20
- PrintTime = LoadTime * 3
- select case lcase ( sWhichOne )
- case "webpage" : Kontext "AutopilotWebPage"
- if AutopilotWebPage.Exists(1) then
- bIsLoaded = true
- printlog "Autopilot is loaded in " + PrintTime + " seconds!"
- LoadTime = 20
- ActivateAutoPilot = TRUE
- end if
- case "report" : Kontext "AutoPilotReport"
- if AutoPilotReport.Exists(1) then
- bIsLoaded = true
- printlog "Autopilot is loaded in " + PrintTime + " seconds!"
- LoadTime = 20
- ActivateAutoPilot = TRUE
- end if
- case "form" : Kontext "ChooseDatabase"
- if ChooseDatabase.Exists(1) then
- bIsLoaded = true
- printlog "Autopilot is loaded in " + PrintTime + " seconds!"
- LoadTime = 20
- ActivateAutoPilot = TRUE
- end if
- case "documentconverter" : Kontext "DocumentConverter"
- if DocumentConverter.Exists(1) then
- bIsLoaded = true
- printlog "Autopilot is loaded in " + PrintTime + " seconds!"
- LoadTime = 20
- ActivateAutoPilot = TRUE
- end if
- case "euroconverter" : Kontext "AutoPilotEuroKonverter"
- if AutoPilotEuroKonverter.Exists(1) then
- bIsLoaded = true
- printlog "Autopilot is loaded in " + PrintTime + " seconds!"
- LoadTime = 20
- ActivateAutoPilot = TRUE
- end if
- case "addressdatasource" : Kontext "AddressSourceAutopilot"
- if AddressSourceAutopilot.Exists(1) then
- bIsLoaded = true
- printlog "Autopilot is loaded in " + PrintTime + " seconds!"
- LoadTime = 20
- ActivateAutoPilot = TRUE
- end if
-
- end select
- 'NOTE: Maybe a messagebox occurs.
- Kontext "Active"
- if Active.Exists (1) then
- warnlog Active.GetText
- try
- Active.OK
- catch
- Active.Cancel
- endcatch
- ActivateAutoPilot = FALSE
- end if
- sleep(1)
- LoadTime = LoadTime + 1
- if LoadTime = 20 and bIsLoaded = False then
- warnlog "Autopilot has not been loaded!"
- ActivateAutoPilot = FALSE
- bIsLoaded = TRUE
- end if
- wend
- wend
-end function
-
-'-------------------------------------------------------------------------
-
-function SetURL ( sURL as String )
-'Author: TZ
-'/// Routine to open a special URL with <i>file open</i>-dialog
-'/// <u>input</u>: The URL as string
- FileOpen
- Kontext "OeffnenDlg"
- Dateiname.SetText sURL
- Oeffnen.Click
- wait 500
-end function
-
-'-------------------------------------------------------------------------
-
-function fGetFileText (sFilename as string, iCount as long) as string
-'/// This function is for getting the first or last n characters of a file
-'///+<u>Input</u>:<ul><li>filename</li><li>number</li></ul>If the number greater 0 then get n characters from start.
-'///+A number smaller 0 get from end of file.
-'///+<u>Output</u>:<ul><li>string with <b><i>n</i></b> characters</li></ul>
-
- dim iFile as integer ' filehandle
- dim iTem as integer ' get 2 bytes of the file
- dim iTemByte(2) as integer ' move 1 byte from iTem in each item
- dim sTemp as string ' string of file
- dim iSize as long ' size in bytes of file
- dim i as long ' runner :-)
-
- iFile = FreeFile
-' Printlog "FreeFile: " + iFile
- if (dir (sFilename) <> "") then
-' Printlog "FileLen: " + FileLen(sFile)
- Open sFilename For binary access read shared As #iFile
-' Printlog "Loc: " + Loc(#iFile) ' LONG! where am i in the file?
-
- iSize = Lof(#iFile) ' get size in bytes of file
- if (iSize > 65530) then '65536 = 64kB
- 'Warnlog "fGetFileText: file '" + sFilename + "' might get problems on reading it? size is > 65530 Byte: '" + iSize + "'"
- else
-' printlog "iSize: " + iSize
- endif
-
- sTemp = ""
- if (iCount >= 0) then ' get bytes from file start
- get iFile,1,sTemp ' get max 64kByte; but not the 1st 2 bytes :-(
- get iFile,1,iTem ' get the first 2 bytes of the file
- iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes
- iTemByte(1) = (iTem AND &H000000FF)
- sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together
- else ' get bytes from file end
- if ((iSize+iCount) > 0) then
- select case (iSize+iCount)
- case 1: get iFile,1,sTemp ' take bytes from the end of the file
- get iFile,1,iTem ' get the first 2 bytes of the file
- sTemp = chr(iTemByte(2)) + sTemp ' put them together
- case else: get iFile,(iSize+iCount)-1,sTemp ' take bytes from the end of the file
- end select
- else
- get iFile,1,sTemp ' take bytes from the end of the file
- get iFile,1,iTem ' get the first 2 bytes of the file
- iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes
- iTemByte(1) = (iTem AND &H000000FF)
- sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together
- endif
- endif
-' printlog "'"+left(sTemp,iSize)+"'" ' gotcha!
-
- if (iSize-(Abs(iCount)) >= 0) then
- fGetFileText = left(sTemp,Abs(iCount))
- else
- 'Warnlog "fGetFileText: file '" + sFilename + "' isn't as big as expected; will only return '" + iSize+ "' bytes fom: " + iCount
- fGetFileText = left(sTemp,iSize)
- endif
-
- ' debugging routine --------------------------------------
- ' iSize = Lof(#iFile)
- ' printlog "iSize: " + iSize
- ' sTemp = ""
- ' if iSize > 0 then
- ' printlog "iSize \ 2: " + (iSize \ 2)
- ' for i = 0 to ((iSize \ 2)-1)
- ' get iFile,(i*2)+1,iTem
- ' Printlog "i: " + i + ": 0x" + hex(iTem)
- ' iTemByte(2) = (iTem AND &H0000FF00) \ &H100
- ' iTemByte(1) = (iTem AND &H000000FF)
- ' sTemp = sTemp + chr(iTemByte(1)) + chr(iTemByte(2))
- ' next i
- ' if (iSize MOD 2) = 1 then
- ' get iFile,iSize,iTem
- ' Printlog "i: " + iSize + ": 0x" + hex(iTem)
- ' iTemByte(1) = (iTem AND &H000000FF)
- ' sTemp = sTemp + chr(iTemByte(1))
- ' endif
- ' endif
- ' printlog "'"+sTemp+"'"
- ' debugging routine --------------------------------------
- Close #iFile
- else ' does file exist
- Warnlog "fGetFileText: file '" + sFilename + "' doesn't exist"
- fGetFileText = ""
- endif
-end function
-'
-'-------------------------------------------------------------------------
-'
function fSetMeasurementToCM() as string
'/// Sets the measurement unit to centimeter (cm) and returns the unit.
Dim i as integer
+
+ const LANGUAGE_CODE_JAPANESE = 81
Call hNewDocument
ToolsOptions
@@ -413,7 +126,7 @@ function fSetMeasurementToCM() as string
case "WRITER"
Call hToolsOptions("WRITER","GENERAL")
Masseinheit.Select(2)
- if iSprache = 81 then
+ if iSprache = LANGUAGE_CODE_JAPANESE then
fSetMeasurementToCM = Right$( Tabulatorenabstand.Gettext, 3 )
else
fSetMeasurementToCM = Right$( Tabulatorenabstand.Gettext, 2 )
@@ -421,7 +134,7 @@ function fSetMeasurementToCM() as string
case "CALC"
Call hToolsOptions("CALC","GENERAL")
Masseinheit.Select(2)
- if iSprache = 81 then
+ if iSprache = LANGUAGE_CODE_JAPANESE then
fSetMeasurementToCM = Right$( Tabulator.Gettext , 3 )
else
fSetMeasurementToCM = Right$( Tabulator.Gettext , 2 )
@@ -429,7 +142,7 @@ function fSetMeasurementToCM() as string
case "IMPRESS"
Call hToolsOptions("IMPRESS","GENERAL")
Masseinheit.Select(2)
- if iSprache = 81 then
+ if iSprache = LANGUAGE_CODE_JAPANESE then
fSetMeasurementToCM = Right$( Tabulatorabstand.Gettext, 3 )
else
fSetMeasurementToCM = Right$( Tabulatorabstand.Gettext, 2 )
@@ -437,7 +150,7 @@ function fSetMeasurementToCM() as string
case "DRAW"
Call hToolsOptions("DRAW","GENERAL")
Masseinheit.Select(2)
- if iSprache = 81 then
+ if iSprache = LANGUAGE_CODE_JAPANESE then
fSetMeasurementToCM = Right$( Tabulatorabstand.Gettext, 3 )
else
fSetMeasurementToCM = Right$( Tabulatorabstand.Gettext, 2 )
@@ -445,7 +158,7 @@ function fSetMeasurementToCM() as string
case "MASTERDOCUMENT"
Call hToolsOptions("WRITER","GENERAL")
Masseinheit.Select(2)
- if iSprache = 81 then
+ if iSprache = LANGUAGE_CODE_JAPANESE then
fSetMeasurementToCM = Right$( Tabulatorenabstand.Gettext, 3 )
else
fSetMeasurementToCM = Right$( Tabulatorenabstand.Gettext, 2 )
@@ -457,7 +170,7 @@ function fSetMeasurementToCM() as string
'because .sdw, .sxw etc. export to HTML depends on it.
Call hToolsOptions("WRITER","GENERAL")
Masseinheit.Select(2)
- if iSprache = 81 then
+ if iSprache = LANGUAGE_CODE_JAPANESE then
fSetMeasurementToCM = Right$( Tabulatorenabstand.Gettext, 3 )
else
fSetMeasurementToCM = Right$( Tabulatorenabstand.Gettext, 2 )
@@ -498,12 +211,6 @@ End Function
'-------------------------------------------------------------------------
-function fRemoveDoubleSpace(stringToChange as string) As String
- fRemoveDoubleSpace = fRemoveDoubleCharacter(stringToChange, " ")
-End Function
-
-'-------------------------------------------------------------------------
-
function writeCrashRepFile()
'/// Creates a file <i>(gOfficePath)</i>/user/work/crashrep.txt with two lines:
'///+ <ol><li>name of .bas file</li>
@@ -559,7 +266,7 @@ function hGetUNOService(optional bSilent as boolean, optional byRef sUnoPortExte
' To not to change the old behaviour, set variable if parameter is not given
if (isMissing(bSilent)) then
- bSilent = FALSE
+ bSilent = TRUE
end if
' master.inc::sStartUpOffice needs just the Port Numberr from UNO, to pass it to first start up
diff --git a/testautomation/global/tools/includes/required/t_tools3.inc b/testautomation/global/tools/includes/required/t_tools3.inc
index b55546edd8d6..721d7470bc13 100644..100755
--- a/testautomation/global/tools/includes/required/t_tools3.inc
+++ b/testautomation/global/tools/includes/required/t_tools3.inc
@@ -29,8 +29,7 @@
'*
'* short description : Global Tools III
'*
-'\*************************************************************************************
-
+'\******************************************************************************
sub hToolbarSelect( sType as string, sOpen as boolean, optional SetToDefault as boolean )
Dim sDefault as integer, sKontext as string, sPosition as integer
@@ -916,6 +915,7 @@ sub hCloseAllToolbars
endif
end sub
+'*******************************************************************************
function hIsAccessbridgeInstalled() as boolean
'/// created by HDE
@@ -942,7 +942,7 @@ function hIsAccessbridgeInstalled() as boolean
sAccessBridgeFolder = "Java Access Bridge"
sCompareString = sProgramFiles & "\" & sAccessBridgeFolder & "\AccessBridgeTester.class"
sAccessibilityCompare = "with accessibility support"
- if hFileExists(sCompareString) = True then
+ if ( FileExists( sCompareString ) ) then
AccessbridgeIsInstalled = True
else
ToolsOptions
@@ -965,7 +965,7 @@ function hIsAccessbridgeInstalled() as boolean
endif
endif
Kontext "OptionenDlg"
- OptionenDlg.Cancel
+ hCloseDialog( OptionenDlg, "Cancel" )
endif
end select
endif
@@ -973,3 +973,257 @@ function hIsAccessbridgeInstalled() as boolean
hIsAccessbridgeInstalled = AccessbridgeIsInstalled
end function
+
+'*******************************************************************************
+
+function hUseAsyncSlot( cSlot as string ) as integer
+
+ dim iRetries as integer : iRetries = 0
+ dim iTime as integer : iTime = 0
+
+ dim slot as string : slot = lcase( cSlot )
+
+ const MAX_RETRIES = 100 ' Number of time we try to call the slot
+ const DELAY = 100 ' 100ms delay to wait between retries
+ const RETVAL_TIMEOUT = -1 ' Returnvalue if slot is not available
+ const CFN = "global::tools::includes::required::hUseAsyncSlot(): "
+
+ if ( GVERBOSE ) then printlog( "Execute <" & cSlot & ">" )
+ WaitSlot()
+
+ for iRetries = 1 to MAX_RETRIES
+ try
+ select case ( slot )
+ case "fileclose" : FileClose
+ case "filesaveas" : FileSaveAs( "SynchronMode", TRUE )
+ case "filesaveall" : FileSaveAll( "SynchronMode", TRUE )
+ case "fileexport" : FileExport
+ case "filereload" : FileReload( "SynchronMode", TRUE )
+ case "fileopen" : FileOpen
+ case "fileprint" : FilePrint
+
+ case "editdoc" : EditDoc
+ case "editcopy" : EditCopy
+ case "editchangesrecord" : EditChangesRecord
+ case "editchangesshow" : EditChangesShow
+ case "editchangesprotecttrace" : EditChangesProtectTrace
+ case "editchangescomment" : EditChangesComment
+
+ case "editpaste" : EditPaste
+ case "editcut" : EditCut
+ case "editselectall" : EditSelectAll
+ case "editselectallmath" : EditSelectAllMath
+ case "editselectionmodeblock" : EditSelectionModeBlock
+ case "editselectionmodestandard" : EditSelectionModeStandard
+ case "editdeletecontents" : EditDeleteContents
+ case "editundo" : EditUndo
+ case "editredo" : EditRedo
+ case "editrepeat" : EditRepeat
+ case "editpastespecial" : EditPasteSpecial
+ case "editpastespecialwriter" : EditPasteSpecialWriter
+ case "editsearchandreplace" : EditSearchAndReplace
+ case "editduplicate" : EditDuplicate
+ case "editgluepoints" : EditGluePoints
+ case "editdeleteslide" : EditDeleteSlide
+ case "editobjectproperties" : EditObjectProperties
+ case "editobjectedit" : EditObjectEdit
+ case "editobjectsavecopyas" : EditObjectSaveCopyAs
+ case "edithyperlink" : EditHyperlink
+ case "editlinkswriter" : EditLinksWriter
+ case "editfields" : EditFields
+
+ case "formatcharttype" : FormatChartType
+ case "formatcontrol" : FormatControl
+ case "formateditpoints" : FormatEditPoints
+ case "formatsections" : FormatSections
+ case "formatchangecaseupper" : FormatChangeCaseUpper
+ case "formatchangecaselower" : FormatChangeCaseLower
+ case "formatarea" : FormatArea
+ case "formatarrangebringtofrontcalc" : FormatArrangeBringToFrontCalc
+ case "formatflipvertically" : FormatFlipVertically
+ case "formatfliphorizontally" : FormatFlipHorizontally
+ case "formatline" : FormatLine
+ case "formatpositionandsize" : FormatPositionAndSize
+ case "formatfontwork" : FormatFontwork
+ case "formatpagewriter" : FormatPageWriter
+ case "formatparagraph" : FormatParagraph
+ case "formatruby" : FormatRuby
+ case "formatstylebold" : FormatStyleBold
+ case "formatungroupdraw" : FormatUngroupDraw
+ case "formatexitgroupdraw" : FormatExitGroupDraw
+ case "formatgroupgroup" : FormatGroupGroup
+ case "formatgroupeditgroupcalc" : FormatGroupEditGroupCalc
+ case "formatalignmentlefttext" : FormatAlignmentLeftText
+ case "formatgraphics" : FormatGraphics
+ case "formatanchortopage" : FormatAnchorToPage
+ case "formatwrapcontour" : FormatWrapContour
+ case "formatwrapeditcontour" : FormatWrapEditContour
+ case "formatpagewriter" : FormatPageWriter
+ case "formatautoformatapply" : FormatAutoformatApply
+
+ case "insertfieldsother" : InsertFieldsOther
+ case "insertgraphicsfromfile" : InsertGraphicsFromFile
+ case "insertindexesbibliographyentry" : InsertIndexesBibliographyEntry
+
+ case "contextpositionandsize" : ContextPositionAndSize
+ case "contextproperties" : ContextProperties
+
+ case "toolslanguagehyphenate" : ToolsLanguageHyphenate
+ case "toolsupdateallindexes" : ToolsUpdateAllIndexes
+ case "toolsupdatefields" : ToolsUpdateFields
+ case "toolsupdatelinks" : ToolsUpdateLinks
+ case "toolslanguagehangulhanjaconversion" : ToolsLanguageHangulHanjaConversion
+
+ case "viewzoom" : ViewZoom
+
+ case else : warnlog( "Unknown slot called: " & cSlot )
+ end select
+
+ exit for ' This is only executed if the slot was called successfully
+ catch
+ wait( DELAY )
+ endcatch
+ next iRetries
+
+ ' Total time used
+ iTime = iRetries * DELAY
+
+ ' Timeout is -1
+ if ( iRetries = MAX_RETRIES ) then iTime = RETVAL_TIMEOUT
+
+ if ( GVERBOSE ) then printlog( CFN & "Exit with rc=" & iTime )
+ hUseAsyncSlot() = iTime
+
+end function
+
+'*******************************************************************************
+
+function hClickButton( oButton as object ) as integer
+
+ dim iRetries as integer : iRetries = 0
+ dim iTime as integer : iTime = 0
+
+ const MAX_RETRIES = 50 ' Try to click the button max 50 times
+ const DELAY = 100 ' 100ms wait between retries
+ const RETVAL_TIMEOUT = -1 ' Return -1 if the button is not available
+ const CFN = "global::tools::includes::required::hClickButton(): "
+
+ if ( GVERBOSE ) then printlog( "Click <" & oButton.name() & ">" )
+ WaitSlot()
+
+ for iRetries = 1 to MAX_RETRIES
+ try
+ oButton.click()
+ exit for
+ catch
+ wait( DELAY )
+ endcatch
+ next iRetries
+
+ ' Total time used
+ iTime = iRetries * DELAY
+
+ if ( iRetries = MAX_RETRIES ) then iTime = RETVAL_TIMEOUT
+
+ if ( GVERBOSE ) then printlog( CFN & "Exit with rc=" & iTime )
+ hClickButton() = iTime
+
+end function
+
+'*******************************************************************************
+
+function hCloseDialog( oDialog as object, sUserFlags as string ) as boolean
+
+ ' this function closes a dialog providing three different methods while
+ ' removing the need for static sleep statements
+
+ const CFN = "global::tools::includes::required::t_tools3.inc:hCloseDialog"
+ const METHOD_CLOSE = 1
+ const METHOD_CANCEL = 2
+ const METHOD_OK = 3
+ const METHOD_202 = 4
+ const METHOD_YES = 5
+ const METHOD_NO = 6
+ const TIMEOUT = 2 ' Maximum time to wait for a dialog to close
+
+ dim sFlags as string : sFlags = lcase( sUserFlags )
+ dim iClosingMethod as integer
+ dim bDialogMustExist as boolean : bDialogMustExist = TRUE
+
+ hCloseDialog() = FALSE ' Set default returnvalue, assume failure
+
+ ' Find out which closing method was provided, "close" ist the default
+ if ( instr( sFlags, "cancel" ) ) then
+ iClosingMethod = METHOD_CANCEL
+ elseif ( instr( sFlags, "202" ) ) then
+ iClosingMethod = METHOD_202
+ elseif ( instr( sFlags, "yes" ) ) then
+ iClosingMethod = METHOD_YES
+ elseif ( instr( sFlags, "ok" ) ) then
+ iClosingMethod = METHOD_OK
+ elseif ( instr( sFlags, "no" ) ) then
+ iClosingMethod = METHOD_NO
+ else
+ iClosingMethod = METHOD_CLOSE
+ endif
+
+ ' Find out whether the dialog must exist (default) or is just closed as a precaution ("optional")
+ if ( instr( sFlags, "optional") ) then bDialogMustExist = FALSE
+
+ if ( GVERBOSE ) then
+ printlog( "Closing dialog <" & oDialog.name() & "> using the flags <" & sFlags & ">.")
+ endif
+
+ if ( oDialog.exists() ) then
+ select case( iClosingMethod )
+ case METHOD_CLOSE : oDialog.close()
+ case METHOD_CANCEL : oDialog.cancel()
+ case METHOD_OK : oDialog.ok()
+ case METHOD_202 : oDialog.click( 202 )
+ case METHOD_YES : oDialog.yes()
+ case METHOD_NO : oDialog.no()
+ case else :
+ warnlog( CFN & " Script error: Allowed closing methods are cancel, close, ok, yes, no and 202" )
+ end select
+ else
+ if ( bDialogMustExist ) then
+ warnlog( CFN & "The requested dialog is not available, no action taken" )
+ hCloseDialog() = FALSE
+ exit function
+ endif
+ endif
+
+ ' Any other outcome until now returned FALSE. If we get here, we have a success.
+ if ( oDialog.notExists( TIMEOUT ) ) then hCloseDialog() = TRUE
+
+end function
+
+'*******************************************************************************
+
+function hWaitForObject( oControl as object, iTime as integer ) as integer
+
+ const CFN = "hWaitForObject()::"
+ dim iWait as integer
+
+ if ( GVERBOSE ) then printlog( CFN & "Entering function for control: " & oControl.name() )
+
+ WaitSlot( 2000 )
+
+ for iWait = 0 to iTime
+ try
+ if ( oControl.isEnabled() ) then
+ printlog( CFN & "Control is enabled: " & oControl.name() )
+ hWaitForObject() = iWait
+ exit function
+ else
+ if ( GVERBOSE ) then printlog( "Waiting..." )
+ endif
+ catch
+ wait( 1 )
+ endcatch
+ next iWait
+
+ printlog( CFN & "Control not found or not enabled, timeout reached" )
+ hWaitForObject() = -1
+
+end function
diff --git a/testautomation/global/tools/record_macro.bas b/testautomation/global/tools/record_macro.bas
deleted file mode 100755
index d4d7095e9efc..000000000000
--- a/testautomation/global/tools/record_macro.bas
+++ /dev/null
@@ -1,54 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/license.html>
-' for a copy of the LGPLv3 License.
-'
-'/************************************************************************
-'*
-'* owner : thorsten.bosbach@sun.com
-'*
-'* short description : Records your actions in the Office at the cursorposition in the TestTool window
-'*
-'\*************************************************************************************
-
-sub main
-' start with <F5>; wait until it got runned,
-' open a new window in testtool,
-' perform some actions in the office,
-' take a look into the testtool window
-
- RecordMacro true
-
-' if you're done, comment the above line and uncomment the following line,
-' run it <F5> and the macromodus is left
-
-' RecordMacro false
-
-end sub
-
-sub LoadIncludeFiles
- use "global\system\includes\declare.inc"
- use "global\system\includes\gvariabl.inc"
- Call GetUseFiles()
-end sub
-
diff --git a/testautomation/global/win/bars.win b/testautomation/global/win/bars.win
index dd65f825893d..7cc207cc3483 100755
--- a/testautomation/global/win/bars.win
+++ b/testautomation/global/win/bars.win
@@ -797,7 +797,7 @@ ManageBreakpoints .uno:ManageBreakPoints
Modules SID_BASICIDE_MODULEDLG
ObjectCatalog SID_BASICIDE_OBJCAT
ProcedureStep .uno:BasicStepOver
-SaveSourceTest .uno:SaveBasicAs
+SaveSourceText .uno:SaveBasicAs
SingleStep .uno:BasicStepInto
StepBack .uno:BasicStepOut
'-------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
index d4c6f46ed272..db750da85c37 100755
--- a/testautomation/graphics/optional/includes/global/export_graphic_2.inc
+++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
@@ -1437,3 +1437,91 @@ testcase tWMF
endcase 'tWMF
'-------------------------------------------------------------------------
+
+function fGetFileText (sFilename as string, iCount as long) as string
+'/// This function is for getting the first or last n characters of a file
+'///+<u>Input</u>:<ul><li>filename</li><li>number</li></ul>If the number greater 0 then get n characters from start.
+'///+A number smaller 0 get from end of file.
+'///+<u>Output</u>:<ul><li>string with <b><i>n</i></b> characters</li></ul>
+
+ dim iFile as integer ' filehandle
+ dim iTem as integer ' get 2 bytes of the file
+ dim iTemByte(2) as integer ' move 1 byte from iTem in each item
+ dim sTemp as string ' string of file
+ dim iSize as long ' size in bytes of file
+ dim i as long ' runner :-)
+
+ iFile = FreeFile
+' Printlog "FreeFile: " + iFile
+ if (dir (sFilename) <> "") then
+' Printlog "FileLen: " + FileLen(sFile)
+ Open sFilename For binary access read shared As #iFile
+' Printlog "Loc: " + Loc(#iFile) ' LONG! where am i in the file?
+
+ iSize = Lof(#iFile) ' get size in bytes of file
+ if (iSize > 65530) then '65536 = 64kB
+ 'Warnlog "fGetFileText: file '" + sFilename + "' might get problems on reading it? size is > 65530 Byte: '" + iSize + "'"
+ else
+' printlog "iSize: " + iSize
+ endif
+
+ sTemp = ""
+ if (iCount >= 0) then ' get bytes from file start
+ get iFile,1,sTemp ' get max 64kByte; but not the 1st 2 bytes :-(
+ get iFile,1,iTem ' get the first 2 bytes of the file
+ iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes
+ iTemByte(1) = (iTem AND &H000000FF)
+ sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together
+ else ' get bytes from file end
+ if ((iSize+iCount) > 0) then
+ select case (iSize+iCount)
+ case 1: get iFile,1,sTemp ' take bytes from the end of the file
+ get iFile,1,iTem ' get the first 2 bytes of the file
+ sTemp = chr(iTemByte(2)) + sTemp ' put them together
+ case else: get iFile,(iSize+iCount)-1,sTemp ' take bytes from the end of the file
+ end select
+ else
+ get iFile,1,sTemp ' take bytes from the end of the file
+ get iFile,1,iTem ' get the first 2 bytes of the file
+ iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes
+ iTemByte(1) = (iTem AND &H000000FF)
+ sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together
+ endif
+ endif
+' printlog "'"+left(sTemp,iSize)+"'" ' gotcha!
+
+ if (iSize-(Abs(iCount)) >= 0) then
+ fGetFileText = left(sTemp,Abs(iCount))
+ else
+ 'Warnlog "fGetFileText: file '" + sFilename + "' isn't as big as expected; will only return '" + iSize+ "' bytes fom: " + iCount
+ fGetFileText = left(sTemp,iSize)
+ endif
+
+ ' debugging routine --------------------------------------
+ ' iSize = Lof(#iFile)
+ ' printlog "iSize: " + iSize
+ ' sTemp = ""
+ ' if iSize > 0 then
+ ' printlog "iSize \ 2: " + (iSize \ 2)
+ ' for i = 0 to ((iSize \ 2)-1)
+ ' get iFile,(i*2)+1,iTem
+ ' Printlog "i: " + i + ": 0x" + hex(iTem)
+ ' iTemByte(2) = (iTem AND &H0000FF00) \ &H100
+ ' iTemByte(1) = (iTem AND &H000000FF)
+ ' sTemp = sTemp + chr(iTemByte(1)) + chr(iTemByte(2))
+ ' next i
+ ' if (iSize MOD 2) = 1 then
+ ' get iFile,iSize,iTem
+ ' Printlog "i: " + iSize + ": 0x" + hex(iTem)
+ ' iTemByte(1) = (iTem AND &H000000FF)
+ ' sTemp = sTemp + chr(iTemByte(1))
+ ' endif
+ ' endif
+ ' printlog "'"+sTemp+"'"
+ ' debugging routine --------------------------------------
+ Close #iFile
+ else ' does file exist
+ Warnlog "fGetFileText: file '" + sFilename + "' doesn't exist"
+ fGetFileText = ""
+ endif
+end function
diff --git a/testautomation/graphics/optional/includes/global/g_autocorrection.inc b/testautomation/graphics/optional/includes/global/g_autocorrection.inc
index 74fa830a9b11..cd174c632a02 100755
--- a/testautomation/graphics/optional/includes/global/g_autocorrection.inc
+++ b/testautomation/graphics/optional/includes/global/g_autocorrection.inc
@@ -147,7 +147,7 @@ testcase tToolsAutocorrectCustomQuotes(bSimple as boolean)
sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString))
endif
- if hFileExists ( sFileName ) = FALSE then
+ if FileExists ( sFileName ) = FALSE then
warnlog "The language-file was not found or accessible! The test ends."
goto endsub
endif
diff --git a/testautomation/graphics/optional/includes/global/id_006.inc b/testautomation/graphics/optional/includes/global/id_006.inc
index a32bbd962ad5..e6d98d799c42 100644
--- a/testautomation/graphics/optional/includes/global/id_006.inc
+++ b/testautomation/graphics/optional/includes/global/id_006.inc
@@ -104,7 +104,7 @@ testcase tiToolsThesaurus
else
sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odg"))
end if
- if hFileExists ( sFileName ) = FALSE then
+ if FileExists ( sFileName ) = FALSE then
warnlog "The language-file was not found or accessible! The test ends."
goto endsub
end if
diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc
index 0a8359c1efef..5bf7d7ed679b 100644
--- a/testautomation/graphics/required/includes/global/id_006.inc
+++ b/testautomation/graphics/required/includes/global/id_006.inc
@@ -120,7 +120,7 @@ testcase tiToolsThesaurus
else
sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odg"))
end if
- if hFileExists ( sFileName ) = FALSE then
+ if FileExists ( sFileName ) = FALSE then
warnlog "The language-file was not found or accessible! The test ends."
goto endsub
end if
diff --git a/testautomation/graphics/required/includes/impress/im_003_.inc b/testautomation/graphics/required/includes/impress/im_003_.inc
index 280dae56b1d1..02f6dae3b2b1 100644..100755
--- a/testautomation/graphics/required/includes/impress/im_003_.inc
+++ b/testautomation/graphics/required/includes/impress/im_003_.inc
@@ -204,46 +204,55 @@ testcase tiViewSlideMaster
endcase 'tiViewSlideMaster
'--------------------------------------------------------
testcase tiViewToolbar_1
+
+ const DEFAULT_DELAY = 3
- Dim Zaehler as integer
- Dim i as integer
-
+ Dim NumberOfGraphicModes as integer
+ Dim iCurrentGraphicsMode as integer
+
+ dim TestFile as string
+ TestFile = ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
+
printlog "open application "
Call hNewDocument
- sleep 2
+
printlog "Insert->Graphic... : global\input\graf_inp\desp.bmp "
- InsertGraphicsFromFile
- sleep 2
+ hUseAsyncSlot( "InsertGraphicsFromFile" )
+
Kontext "GrafikEinfuegenDlg"
- sleep 1
- Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
- sleep 1
- Oeffnen.Click
- sleep 3
- Kontext "Messagebox"
- if Messagebox.Exists then
- Warnlog Messagebox.GetText
- Messagebox.OK
- end if
- Kontext "DocumentImpress"
- printlog "select graphic "
- EditSelectAll
- sleep 2
- Kontext "GraphicObjectbar"
- sleep 1
- printlog "The Graphics Toolbar has to be visible now; If not -> ERROR "
- if GraphicObjectbar.Exists Then
- Printlog "- graphic object toolbar exists"
- Zaehler=Grafikmodus.GetItemCount
- for i = 1 to Zaehler
- Printlog "- access all controls in the toolbar (" +i+"/"+Zaehler+")"
- Grafikmodus.Select i
- sleep 3
- next i
- sleep 3
+ if ( GrafikEinfuegenDlg.exists( DEFAULT_DELAY ) ) then
+ Dateiname.SetText( TestFile )
+ Oeffnen.Click
+
+ Kontext "Messagebox"
+ if ( Messagebox.Exists( DEFAULT_DELAY ) ) then
+ Warnlog Messagebox.GetText
+ hCloseDialog( Messagebox, "ok" )
+ end if
+
+ Kontext "DocumentImpress"
+ printlog "select graphic "
+ hUseAsyncSlot( "EditSelectAll" )
+
+ Kontext "GraphicObjectbar"
+ printlog "The Graphics Toolbar has to be visible now; If not -> ERROR "
+ if ( GraphicObjectbar.Exists( DEFAULT_DELAY ) ) Then
+
+ Printlog "- graphic object toolbar exists"
+ NumberOfGraphicModes=Grafikmodus.GetItemCount
+
+ for iCurrentGraphicsMode = 1 to NumberOfGraphicModes
+ Printlog( "- access all controls in the toolbar (" & iCurrentGraphicsMode & "/" & NumberOfGraphicModes & ")" )
+ Grafikmodus.Select( iCurrentGraphicsMode )
+ sleep ( DEFAULT_DELAY )
+ next iCurrentGraphicsMode
+ else
+ Warnlog "- No graphic function toolbar visible"
+ end if
else
- Warnlog "- No graphic function toolbar visible"
- end if
+ warnlog( "Insert Graphics dialog did not open" )
+ endif
+
printlog "close application "
Call hCloseDocument
diff --git a/testautomation/math/optional/includes/m_101_.inc b/testautomation/math/optional/includes/m_101_.inc
index e529119e0bfc..2fc34b5c1f01 100644
--- a/testautomation/math/optional/includes/m_101_.inc
+++ b/testautomation/math/optional/includes/m_101_.inc
@@ -429,7 +429,7 @@ testcase tFilePrint
DokumentWriter.MouseUp 99,99
sFileName = convertpath( gOfficePath + "user/work/math/level1/ftc_a.odt")
- if (hFileExists(sFileName)) then
+ if (FileExists(sFileName)) then
'/// goto end of page; insert page break ///'
kontext "DokumentWriter"
DokumentWriter.typeKeys "<mod1 end>"
@@ -660,20 +660,12 @@ function hSpeichernUnterMitFilterKillTBO (sFileName as String, sFilterName, opti
Dim bAlienNotAllowed as boolean
sDerName = ConvertPath (sFileName)
-
- if hFileExists (sDerName) = TRUE then
- try
- app.kill (sDerName)
- catch
- Exceptlog
- endcatch
- end if
-
- if FileExists(sDerName) then
- warnlog "file '" & sDerName & "' couldn't be deleted. Exiting function now..."
+ if ( not hDeleteFile( sDerName ) ) then
+ warnlog( "Aborting function because the file could not be deleted: " & sDerName )
+ hSpeichernUnterMitFilterKillTBO() = FALSE
exit function
- end if
-
+ endif
+
sleep (1)
FileSaveAs
Kontext "SpeichernDlg"
diff --git a/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc b/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc
index c8cc9ddb308f..87c6d899b7bb 100644
--- a/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc
+++ b/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc
@@ -55,6 +55,31 @@ end sub
'
'-------------------------------------------------------------------------------
'
+function IsItLoaded as boolean
+ '/// IsItLoaded
+ '/// Wait until document is loaded
+ Dim iLoop as integer
+
+ IsItLoaded = FALSE
+ sleep(3)
+ for iLoop =1 to 20
+ try
+ 'Calling slot 'IsDocLoading'
+ IsItLoaded = IsDocLoading
+ catch
+ IsItLoaded = FALSE
+ endcatch
+
+ if IsItLoaded = TRUE then
+ exit for
+ end if
+ sleep(1)
+ next iLoop
+ sleep(2)
+end function
+'
+'-------------------------------------------------------------------------------
+'
testcase tLoadSpreadsheetDocument (SourceFile)
Dim sOnlyFileName as string
Dim sOnlyFileExtension as string
@@ -115,7 +140,7 @@ function fCalcFileOpen (sDocName as string, optional bLinked as boolean) as bool
sSourceFile = ConvertPath ( sDocName )
fCalcFileOpen = TRUE
- if hFileExists (sSourceFile) = FALSE then
+ if FileExists (sSourceFile) = FALSE then
warnlog "fCalcFileOpen: '" + sSourceFile + "' does not exists!"
fCalcFileOpen = FALSE
else
diff --git a/testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc b/testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc
index 8ffdb8afe37e..1b2579ee0aaf 100644
--- a/testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc
+++ b/testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc
@@ -925,7 +925,7 @@ testcase tLine_6
soeFile = ConvertPath(gOfficePath + "user\work\standard_reserver.soe")
soeDefaultFile = ConvertPath(gOfficePath + "user\config\standard.soe")
- if hFileExists ( soeFile ) then app.kill ( soeFile )
+ if FileExists ( soeFile ) then app.kill ( soeFile )
PrintLog "- check the attributes in format/line/arrow styles"
@@ -1007,7 +1007,7 @@ testcase tLine_6
Kontext
Kontext "TabLinienenden"
- if hFileExists ( soeDefaultFile ) then app.kill ( soeDefaultFile )
+ if FileExists ( soeDefaultFile ) then app.kill ( soeDefaultFile )
Speichern.Click
Kontext
diff --git a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc b/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
index f0f6e458b8b4..0207a177c706 100644
--- a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
+++ b/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
@@ -610,7 +610,7 @@ testcase tGroup_12
PrintLog "- Edit object group via Menu Format/Group/Edit Group"
sDocument = ConvertPath ( gOfficePath +"user\work\tGroup_12.odt")
- if hFileExists ( sDocument ) then app.kill ( sDocument )
+ if FileExists ( sDocument ) then app.kill ( sDocument )
Call hNewDocument
diff --git a/testautomation/writer/optional/includes/fields/w_fields2.inc b/testautomation/writer/optional/includes/fields/w_fields2.inc
index 826d9ec769b9..6991a2c2ec53 100644
--- a/testautomation/writer/optional/includes/fields/w_fields2.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields2.inc
@@ -401,7 +401,7 @@ testcase tDocumentFilename
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc
index 446d5b458f0f..b8742ab35610 100644
--- a/testautomation/writer/optional/includes/fields/w_fields4.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields4.inc
@@ -277,7 +277,7 @@ testcase tDocInformationUserDefined
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
@@ -361,7 +361,7 @@ testcase tDocInformationCreated
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
@@ -475,7 +475,7 @@ testcase tDocInformationModified
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
@@ -491,7 +491,7 @@ testcase tDocInformationModified
printlog "Doc Information - Modified"
'/// <b> Doc Information - Modified </b>
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
Call hNewDocument
@@ -585,7 +585,7 @@ testcase tDocInformationModified
endcatch
end if
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
@@ -612,7 +612,7 @@ testcase tDocInformationModifiedSavefile
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
@@ -625,7 +625,7 @@ testcase tDocInformationModifiedSavefile
sFixResult(1) = "08/18/2000"
sFixResult(2) = "11:40:11"
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
printlog "Doc Information - Modified (save file)"
'/// <b> Doc Information - Modified (save file)</b>
@@ -707,7 +707,7 @@ testcase tDocInformationModifiedSavefile
endcatch
end if
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
@@ -731,7 +731,7 @@ testcase tDocInformationPrinted
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
@@ -860,13 +860,13 @@ testcase tDocInformationRevisionnumber
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
printlog "Doc Information - Revision number"
'/// <b> Doc Information - Revision number</b>
@@ -939,7 +939,7 @@ testcase tDocInformationRevisionnumber
endcatch
end if
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
@@ -959,13 +959,13 @@ testcase tDocInformationTotaleditingtime
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
printlog "Doc Information - Tatal editing time"
'/// <b> Doc Information - Tatal editing time </b>
@@ -1027,7 +1027,7 @@ testcase tDocInformationTotaleditingtime
endcatch
end if
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields5.inc b/testautomation/writer/optional/includes/fields/w_fields5.inc
index 2f4e3b0b9ecb..85a693c851c7 100644
--- a/testautomation/writer/optional/includes/fields/w_fields5.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields5.inc
@@ -685,7 +685,7 @@ testcase tVariablesDDEFieldManual
printlog "DDE field - manual"
'/// <b> DDE field - manual </b>
- if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
+ if FileExists ( sDDEFile ) then app.kill ( sDDEFile )
Call hNewDocument
@@ -753,7 +753,7 @@ testcase tVariablesDDEFieldManual
Call hCloseDocument
- if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
+ if FileExists ( sDDEFile ) then app.kill ( sDDEFile )
endcase
@@ -778,7 +778,7 @@ testcase tVariablesDDEFieldAutomatic
printlog "DDE field - automatic"
'/// <b> DDE field - automatic </b>
- if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
+ if FileExists ( sDDEFile ) then app.kill ( sDDEFile )
Call hNewDocument
@@ -832,7 +832,7 @@ testcase tVariablesDDEFieldAutomatic
Call hCloseDocument
- if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
+ if FileExists ( sDDEFile ) then app.kill ( sDDEFile )
endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields7.inc b/testautomation/writer/optional/includes/fields/w_fields7.inc
index fdec55afb9ce..70dfedc62085 100644
--- a/testautomation/writer/optional/includes/fields/w_fields7.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields7.inc
@@ -220,7 +220,7 @@ testcase tL10NtestDate
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
@@ -343,7 +343,7 @@ testcase tL10NtestTime
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
- if hFileExists ( sTestFile ) = false then
+ if FileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
diff --git a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
index 62c997927ab6..57d1be96d871 100644
--- a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
+++ b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
@@ -448,7 +448,7 @@ testcase tExportTop5FormatsIntoTop5
Call hCloseDocument
Loop
printlog " - check if file exists"
- if hFileExists (sCurrentSaveFile) then
+ if FileExists (sCurrentSaveFile) then
printlog " - success"
printlog " - reload previously saved file"
if hFileOpenWithFilter(sCurrentSaveFile, sCurrentSaveFilter) = true then
diff --git a/testautomation/writer/optional/includes/section/w_section_4.inc b/testautomation/writer/optional/includes/section/w_section_4.inc
index 3d8acb4a9cd5..03a59b567f18 100644
--- a/testautomation/writer/optional/includes/section/w_section_4.inc
+++ b/testautomation/writer/optional/includes/section/w_section_4.inc
@@ -1190,11 +1190,11 @@ testcase tScenarioSection_1
j = UBound(SectionName)
- if hFileExists ( MasterDoc ) then app.kill ( MasterDoc )
+ if FileExists ( MasterDoc ) then app.kill ( MasterDoc )
For i = 0 to j
tempFile = Convertpath( gOfficePath + "user\work\" + SectionName(i) )
- if hFileExists ( tempFile ) then app.kill ( tempFile )
+ if FileExists ( tempFile ) then app.kill ( tempFile )
next i
'/// open testdocument (tScenarioSection_1.sxw) ///
@@ -1310,11 +1310,11 @@ testcase tScenarioSection_2
j = UBound(SectionName)
- if hFileExists ( MasterDoc ) then app.kill ( MasterDoc )
+ if FileExists ( MasterDoc ) then app.kill ( MasterDoc )
For i = 0 to j
tempFile = Convertpath( gOfficePath + "user\work\" + SectionName(i) )
- if hFileExists ( tempFile ) then app.kill ( tempFile )
+ if FileExists ( tempFile ) then app.kill ( tempFile )
next i
'/// open testdocument (tScenarioSection_2.sxw) ///
diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
index e4818c34029f..80b613563dda 100644
--- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
+++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
@@ -52,7 +52,7 @@ testcase tToolsSpellcheckWithShortcut
'/// Check if Spellcheck dialog comes up with shortcut 'F7'
printlog " Open document where the formatting is set to the language we wish to test."
TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if hFileExists ( TheFile ) <> TRUE then
+ if FileExists ( TheFile ) <> TRUE then
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
exit sub
end if
@@ -120,7 +120,7 @@ testcase tToolsSpellcheckCorrect
Dim FFText as String
TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if hFileExists ( TheFile ) <> TRUE then
+ if FileExists ( TheFile ) <> TRUE then
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
exit sub
end if
@@ -219,7 +219,7 @@ testcase tToolsSpellcheck1Mistake
Dim TheFile as String
TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if hFileExists ( TheFile ) <> TRUE then
+ if FileExists ( TheFile ) <> TRUE then
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
exit sub
end if
@@ -726,7 +726,7 @@ testcase tToolsSpellcheckAutomatic
Dim TheFile as String
TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if hFileExists ( TheFile ) <> TRUE then
+ if FileExists ( TheFile ) <> TRUE then
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
exit sub
end if
@@ -1238,7 +1238,7 @@ testcase tToolsThesaurus
printlog " Open document where the formatting is set to the language we wish to test."
TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if hFileExists ( TheFile ) <> TRUE then
+ if FileExists ( TheFile ) <> TRUE then
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
exit sub
end if
diff --git a/testautomation/writer/required/includes/w_002_.inc b/testautomation/writer/required/includes/w_002_.inc
index 73de7ba6edeb..013b4bb857ec 100755
--- a/testautomation/writer/required/includes/w_002_.inc
+++ b/testautomation/writer/required/includes/w_002_.inc
@@ -1,5 +1,5 @@
'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
+'*******************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,13 +23,13 @@
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
-'/************************************************************************
-'* **
-'* owner : helge.delfs@sun.com **
-'* **
-'* short description : **
-'* **
-'\******************************************************************
+'/******************************************************************************
+'* **
+'* owner : helge.delfs@sun.com **
+'* **
+'* short description : **
+'* **
+'\******************************************************************************
sub w_002_
@@ -60,14 +60,12 @@ sub w_002_
Call tEditImageMap
Call tEditObjectEdit
- 'Writer Web
- gApplication = "HTML"
- Call tHtmlDocEditFields
- gApplication = "WRITER"
-
'Writer Master Document
gApplication = "MASTERDOCUMENT"
Call tMasterDocEditNavigator
+
+ Call tHtmlDocEditFields
+
gApplication = "WRITER"
end sub
@@ -82,6 +80,7 @@ testcase tEditUndoRedo
PrintLog "Insert table"
Call hTabelleEinfuegen
+
PrintLog "Edit / Undo"
hUseAsyncSlot( "EditUndo" )
@@ -93,13 +92,14 @@ testcase tEditUndoRedo
PrintLog "File / Close"
hUseAsyncSlot( "FileClose" )
- Kontext
- if ( Active.Exists ) then
- if Active.GetRT = 304 then
- WarnLog ( "Messagebox: '" & Active.Gettext & "' should not appear" )
- Active.No
- end if
+
+ Kontext "Active"
+ if ( Active.Exists( 1 ) ) then
+ warnlog( "No messagebox was expected upon file close" )
+ printlog( Active.getText )
+ Active.no()
end if
+
endcase
'----------------------------------------------------
@@ -172,64 +172,62 @@ testcase tEditPasteSpecial
PrintLog "Open new document"
Call hNewDocument
- if gSamePC = TRUE then
- PrintLog " - External Clipboard"
- PrintLog "Enter some text in external clipboard"
- SetClipboard "Text from external clipboard!"
+ PrintLog " - External Clipboard"
+ PrintLog "Enter some text in external clipboard"
+ SetClipboard "Text from external clipboard!"
- PrintLog "Paste from external clipboard with Edit / Paste in Office"
- hUseAsyncSlot( "EditPaste" )
+ PrintLog "Paste from external clipboard with Edit / Paste in Office"
+ hUseAsyncSlot( "EditPaste" )
- Call wTypeKeys("<Mod1 A>")
- Wait(200)
- hUseAsyncSlot( "EditCopy" )
+ Call wTypeKeys("<Mod1 A>")
+ Wait(200)
+ hUseAsyncSlot( "EditCopy" )
- if GetClipboardText <> "Text from external clipboard!" then
- Warnlog "External Clipboard not available!"
- Warnlog "Is: " & GetClipboardText
- end if
- Call wTypeKeys("<End><Return>")
- SetClipboard ""
- SetClipboard "2nd Text from external clipboard!"
- try
- PrintLog "Edit / Paste / Special"
- hUseAsyncSlot( "EditPasteSpecialWriter" )
-
- Kontext "InhaltEinfuegen"
- if ( InhaltEinfuegen.Exists( 2 ) ) then
- try
- Auswahl.Select 1
- catch
- Warnlog "Unable to select entry in format list !"
- InhaltEinfuegen.Close
- Call hCloseDocument
- goto endsub
- endcatch
- InhaltEinfuegen.OK
- Wait(200)
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog "Maybe Bug#109331"
- Warnlog Active.Gettext
- try
- Active.Ok
- catch
- Active.No
- endcatch
- end if
- else
- Call wTypeKeys("<Home><Shift End>")
- hUseAsyncSlot( "EditCopy" )
- if GetClipboardText <> "2nd Text from external clipboard!" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText
+ if GetClipboardText <> "Text from external clipboard!" then
+ Warnlog "External Clipboard not available!"
+ Warnlog "Is: " & GetClipboardText
+ end if
+ Call wTypeKeys("<End><Return>")
+ SetClipboard ""
+ SetClipboard "2nd Text from external clipboard!"
+ try
+ PrintLog "Edit / Paste / Special"
+ hUseAsyncSlot( "EditPasteSpecialWriter" )
+
+ Kontext "InhaltEinfuegen"
+ if ( InhaltEinfuegen.Exists( 2 ) ) then
+ try
+ Auswahl.Select 1
+ catch
+ Warnlog "Unable to select entry in format list !"
+ InhaltEinfuegen.Close
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ InhaltEinfuegen.OK
+ Wait(200)
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog "Maybe Bug#109331"
+ Warnlog Active.Gettext
+ try
+ Active.Ok
+ catch
+ Active.No
+ endcatch
end if
else
- Warnlog "Dialog 'Paste Special' is not up!"
+ Call wTypeKeys("<Home><Shift End>")
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "2nd Text from external clipboard!" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText
end if
- catch
- Exceptlog
- endcatch
- end if
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ end if
+ catch
+ Exceptlog
+ endcatch
PrintLog " - Internal Clipboard with StarOffice Writer-Text"
PrintLog "Enter some text in writer and copy it"
@@ -316,11 +314,7 @@ testcase tEditChanges
PrintLog "Passwort-dialog has to come up, cancel it"
Kontext "Passwort"
- if ( Passwort.Exists( 1 ) ) then
- Passwort.Close
- else
- Warnlog "Password-dialog is not up!"
- end if
+ hCloseDialog( Passwort, "close" )
PrintLog "Edit / Changes / Accept or Reject"
EditChangesAcceptOrReject
@@ -368,52 +362,67 @@ endcase
'----------------------------------------------------
testcase tEditCompareDocument
+
PrintLog "- Edit/Compare Document"
- Select Case gApplication
- Case "WRITER"
- Call hNewDocument
- PrintLog "Open new document"
- EditCompareDocumentCalc
- PrintLog "Edit / Compare document"
- Case "MASTERDOCUMENT"
- printlog "Comparing documents not in Masterdocument!"
- goto endsub
- Case "HTML"
- printlog "Comparing documents not in WriterWeb!"
+
+ dim sFile as string
+ sFile = gTesttoolPath & "writer\required\input\bt.sxw"
+
+ if ( gApplication <> "WRITER" ) then
+ printlog( "Test only designed for WRITER, skipping" )
goto endsub
- end select
+ endif
- if gUseSysDlg = False then
- Kontext "OeffnenDlg"
- Dateiname.SetText ConvertPath ( gTesttoolPath & "writer\required\input\bt.sxw" )
- PrintLog "in File-Open-dialog load ..\writer\required\input\bt.sxw"
- Oeffnen.Click
- end if
- Kontext "FilterAuswahl"
- if Filterauswahl.Exists then Filterauswahl.OK
- Sleep 1
- Kontext "Active"
- if Active.Exists then
- Warnlog Active.Gettext
- Active.Ok
- end if
+ call hNewDocument()
+
+ printlog( "Open test document")
+ EditCompareDocumentCalc
+
+ Kontext "OeffnenDlg"
+ printlog( "File Open dialog" )
+ if ( OeffnenDlg.exists( 2 ) ) then
+
+ printlog( "Load file: " & sFile )
+ Dateiname.SetText ConvertPath ( sFile )
+ Oeffnen.Click()
+
+ Kontext "FilterAuswahl"
+ printlog( "Check for filterselection dialog (comes up e.g. if file is broken)" )
+ if Filterauswahl.Exists( 2 ) then
+ warnlog( "Dialog <Filterauswahl> was not expected at this point" )
+ Filterauswahl.OK()
+ else
+ printlog( "No dialog <Filterauswahl>, good" )
+ endif
+
+ Kontext "Active"
+ if Active.Exists( 1 ) then
+ warnlog( "Unexpected messagebox displayed:" )
+ printlog( Active.getText() )
+ Active.Ok()
+ else
+ printlog( "No unexpected messageboxes, good." )
+ endif
- Kontext "Redlining"
- PrintLog "Dialog 'Accept and Reject changes' has to come up"
- if Redlining.Exists then
- TabControl.SetPage TabListe
- wait 200
- Kontext "Redlining"
- TabControl.SetPage TabFilter
Kontext "Redlining"
- Redlining.Close
- PrintLog "Close dialog"
+ PrintLog "Dialog 'Accept and Reject changes' has to come up"
+ if Redlining.Exists( 1 ) then
+ TabControl.SetPage TabListe
+ wait 200
+ Kontext "Redlining"
+ TabControl.SetPage TabFilter
+ Kontext "Redlining"
+ hCloseDialog( Redlining, "close" )
+ else
+ Warnlog "- Dialog 'Redlining' does not exist!"
+ endif
else
- Warnlog "- Dialog 'Redlining' does not exist!"
- end if
+ warnlog( "Dialog <FileOpen> did not open")
+ endif
- Call hCloseDocument
PrintLog "Close active document"
+ Call hCloseDocument
+
endcase
'----------------------------------------------------
@@ -529,24 +538,15 @@ testcase tViewNavigator
Kontext "NavigatorWriter"
Umschalten.Click
- Kontext "NavigatorGlobalDoc"
- Sleep (1)
- printlog " - Bearbeiten"
- try
- Bearbeiten.Click
- catch
- Sleep (2)
- try
- Bearbeiten.Click
- catch
- Warnlog " Either taking more than three seconds to switch Navigator-modes, or something has gone wrong."
- endcatch
- endcatch
- wait (300)
+ Kontext "NavigatorGlobalDoc"
+ printlog( "Click <Edit>" )
+ if ( hClickButton( Bearbeiten ) = -1 ) then
+ warnlog( "Unable to click <Edit> button, cannot switch Navigator-Mode" )
+ endif
Kontext "Navigator"
- Navigator.Close
+ hCloseDialog( Navigator, "close" )
Call hCloseDocument
PrintLog "Close active document"
goto endsub
@@ -680,9 +680,9 @@ testcase tEditAutotext
PrintLog "Click Categories"
Kontext "Autotext"
Bereiche.Click
- Sleep 1
+
Kontext "BereicheBearbeitenAutoText"
- if BereicheBearbeitenAutoText.Exists then
+ if BereicheBearbeitenAutoText.Exists( 2 ) then
DialogTest ( BereicheBearbeitenAutoText )
PrintLog "Create a new categorie"
Bereich.SetText "Hallo"
@@ -695,12 +695,11 @@ testcase tEditAutotext
if Neu.IsEnabled then
Neu.Click
Wait (200)
- if Loeschen.IsEnabled then
- PrintLog "Delete created categorie"
- Loeschen.Click
- else
- Warnlog "- Not able to delete new category. Button disabled!"
- end if
+
+ printlog( "Click <Delete>" )
+ if ( hClickButton( Loeschen ) = -1 ) then
+ warnlog( "Unable to delete category, the button is disabled" )
+ endif
else
if gNetzInst = False then
Warnlog "- Category cannot be created!"
@@ -720,20 +719,19 @@ testcase tEditAutotext
Kontext "PfadeAuswaehlen"
PrintLog "On 'Select Paths' dialog click 'add'"
Hinzufuegen.Click
- wait 200
+
Kontext "OeffnenDlg"
- if OeffnenDlg.Exists then
+ if OeffnenDlg.Exists( 2 ) then
PrintLog "Cancel File-Open dialog"
- OeffnenDlg.Cancel
+ hCloseDialog( OeffnenDlg, "cancel" )
else
Warnlog "Dialog ' Select Paths' not up!"
end if
- wait 200
+
Kontext "PfadeAuswaehlen"
PrintLog "Cancel dialog 'Select Paths'"
- PfadeAuswaehlen.Cancel
+ hCloseDialog( PfadeAuswaehlen, "cancel" )
- Wait (300)
Kontext "AutoText"
PrintLog "We have to create an autotext first"
PrintLog "to assure the 'Autotext'-Button enabled"
@@ -788,6 +786,7 @@ testcase tEditAutotext
Call hCloseDocument
goto endsub
end if
+
printlog "Select created autotext"
EditAutotext
WaitSlot (2000)
@@ -856,14 +855,16 @@ testcase tEditAutotext
exit do
end if
Loop
+
' Dialog needs some time to be opened
Kontext "MakroZuweisen"
- if NOT MakroZuweisen.Exists(5) then
- warnlog "AutoText-Macro - Assign Macro took longer than 5 seconds to load. Check why."
+ printlog( "Close <MakroZuweisen> dialog" )
+ if ( MakroZuweisen.exists( 5 ) ) then
+ call Dialogtest( MakroZuweisen )
+ hCloseDialog( MakroZuweisen, "close" )
else
- PrintLog "Cancel 'Macro' dialog"
- MakroZuweisen.Cancel
- end if
+ warnlog "AutoText-Macro - Assign Macro took longer than 5 seconds to load. Check why."
+ endif
catch
Warnlog "Menu Autotext->'Macro' disabled !"
Call hMenuClose
@@ -922,50 +923,58 @@ endcase
testcase tEditHyperlink
Printlog "- Edit / Hyperlink"
- Call hNewDocument
+
PrintLog "Open new document"
- InsertHyperlink
+ Call hNewDocument
+
PrintLog "Insert / Hyperlink"
- WaitSlot(5000)
- Kontext "Hyperlink"
+ InsertHyperlink
- Call wEinfuegenHyperlink(1)
- Kontext "TabHyperlinkInternet"
- Internet.Check
- ZielUrl.Settext "http://www.sonor.de"
- PrintLog "Enter URL "
Kontext "Hyperlink"
- PrintLog "Click 'Apply'"
- Uebernehmen.Click
- PrintLog "Close Hyperlink dialog"
- Hyperlink.Close
+ if ( Hyperlink.exists( 2 ) ) then
+
+ Call wEinfuegenHyperlink(1)
+ Kontext "TabHyperlinkInternet"
+
+ printlog( "Check <Internet>" )
+ Internet.Check()
+
+ PrintLog "Enter URL "
+ ZielUrl.Settext "http://www.sonor.de"
+
+ Kontext "Hyperlink"
+ PrintLog "Click 'Apply'"
+ Uebernehmen.Click
+
+ PrintLog "Close Hyperlink dialog"
+ hCloseDialog( Hyperlink, "close" )
+ else
+ warnlog( "Dialog <Hyperlink> did not open" )
+ hCloseDocument()
+ goto endsub
+ endif
Call wDocSetContext
- try
- PrintLog "Check if correct URL has been set to document"
- hUseAsyncSlot( "EditCopy" )
+
+ PrintLog "Check if correct URL has been set to document"
+ if ( hUseAsyncSlot( "EditCopy" ) > -1 ) then
if GetClipBoardtext = "" then
Warnlog "No Hyperlink or wrong hyperlink in document!" & GetClipBoardtext
end if
- catch
- Warnlog "No Hyperlink in document!"
- goto endsub
- endcatch
+ else
+ warnlog( "Slot <EditCopy> could not be executed. Most likely the hyperlink was not selected" )
+ endif
PrintLog "Set cursor into link"
Call wTypeKeys("<Left>")
- try
- PrintLog "Edit / Hyperlink has to be enabled"
- EditHyperlink
+
+ PrintLog "Edit / Hyperlink has to be enabled"
+ if ( hUseAsyncSlot( "EditHyperlink" ) > -1 ) then
Kontext "Hyperlink"
- if Hyperlink.Exists then
- Hyperlink.Close
- else
- Warnlog "- Hyperlinkdialog not up"
- end if
- catch
- Warnlog "- Not able to edit Hyperlink!"
- endcatch
+ hCloseDialog( Hyperlink, "close" )
+ else
+ warnlog( "Slot <EditHyperlink> could not be called" )
+ endif
PrintLog "Close active document"
Call hCloseDocument
@@ -974,150 +983,101 @@ endcase
'----------------------------------------------------------------
testcase tEditFields
- PrintLog "- Edit/Fields"
- PrintLog "Open new document"
- Call hNewDocument
+ gApplication = "WRITER"
+ call sEditFields()
- PrintLog "Select Insert / Fields Other"
- InsertFieldsOther
- Kontext
- Active.Setpage TabDokumentFeldbefehle
- Kontext "TabDokumentFeldbefehle"
- Sleep 1
- PrintLog "Insert Field 'Sender -> Company'"
- Select Case gApplication
- Case "HTML"
- Select case iSprache
- case 01 : Feldtyp.Select 5 'Sender
- Auswahl.Select 1 'Company
- case 03 : Feldtyp.Select 8
- Auswahl.Select 1
- case 07 : Feldtyp.Select 5
- Auswahl.Select 1
- case 31 : Feldtyp.Select 1
- Auswahl.Select 1
- case 33 : Feldtyp.Select 2
- Auswahl.Select 1
- case 34 : Feldtyp.Select 6
- Auswahl.Select 1
- case 36 : Feldtyp.Select 3
- Auswahl.Select 1
- case 39 : Feldtyp.Select 3
- Auswahl.Select 1
- case 45 : Feldtyp.Select 1
- Auswahl.Select 1
- case 46 : Feldtyp.Select 2
- Auswahl.Select 1
- case 48 : Feldtyp.Select 3
- Auswahl.Select 1
- case 49 : Feldtyp.Select 1
- Auswahl.Select 1
- case 51 : Feldtyp.Select 5
- Auswahl.Select 1
- case 52 : Feldtyp.Select 5
- Auswahl.Select 1
- case 55 : Feldtyp.Select 7
- Auswahl.Select 1
- case 81 : Feldtyp.Select 4
- Auswahl.Select 1
- case 82 : Feldtyp.Select 2
- Auswahl.Select 1
- case 84 : Feldtyp.Select 3
- Auswahl.Select 1
- case 86 : Feldtyp.Select 1
- Auswahl.Select 1
- case 88 : Feldtyp.Select 2
- Auswahl.Select 1
-
- case else : Warnlog "Missing language support!"
- TabDokumentFeldbefehle.Cancel
- PrintLog "Close active document"
- Call hCloseDocument
- goto endsub
- end select
- Case else
- Select case iSprache
- case 01 : Feldtyp.Select 6 'Sender
- Auswahl.Select 1 'Company
- case 03 : Feldtyp.Select 9
- Auswahl.Select 1
- case 07 : Feldtyp.Select 6
- Auswahl.Select 1
- case 31 : Feldtyp.Select 1
- Auswahl.Select 1
- case 33 : Feldtyp.Select 3
- Auswahl.Select 1
- case 34 : Feldtyp.Select 8
- Auswahl.Select 1
- case 36 : Feldtyp.Select 4
- Auswahl.Select 1
- case 39 : Feldtyp.Select 4
- Auswahl.Select 1
- case 45 : Feldtyp.Select 1
- Auswahl.Select 1
- case 46 : Feldtyp.Select 2
- Auswahl.Select 1
- case 48 : Feldtyp.Select 3
- Auswahl.Select 1
- case 49 : Feldtyp.Select 1
- Auswahl.Select 1
- case 51 : Feldtyp.Select 6
- Auswahl.Select 1
- case 52 : Feldtyp.Select 6
- Auswahl.Select 1
- case 55 : Feldtyp.Select 9
- Auswahl.Select 1
- case 81 : Feldtyp.Select 5
- Auswahl.Select 1
- case 82 : Feldtyp.Select 2
- Auswahl.Select 2
- case 84 : Feldtyp.Select 5
- Auswahl.Select 1
- case 86 : Feldtyp.Select 1
- Auswahl.Select 1
- case 88 : Feldtyp.Select 2
- Auswahl.Select 1
-
- case else : Warnlog "Missing language support!"
- TabDokumentFeldbefehle.Cancel
- PrintLog "Close active document"
- Call hCloseDocument
- goto endsub
- end select
- end select
-
- Einfuegen.Click
- Wait (400)
- PrintLog "Close Fields dialog"
- Schliessen.Click
-
- PrintLog "Put cursor in front of field"
- Call wTypeKeys("<Home>")
-
- PrintLog "Edit / Fields"
- EditFields
- WaitSlot (2000)
+endcase
- Kontext "FeldbefehlBearbeitenDokument"
- Call DialogTest ( FeldbefehlBearbeitenDokument )
+' ----------------------------------------------------------------
- PrintLog "In 'Edit Fields' dialog select 'Edit'"
- if Bearbeiten.IsVisible and Bearbeiten.IsEnabled then
- Bearbeiten.Click
- Kontext "TabBenutzerdaten"
- TabBenutzerdaten.Cancel
- Kontext "FeldbefehlBearbeitenDokument"
- else
- Warnlog "Button 'Edit' in Dialog disabled!"
- end if
+testcase tHtmlDocEditFields
+
+ gApplication = "HTML"
+ call sEditFields()
- PrintLog "Close dialog"
- FeldbefehlBearbeitenDokument.Cancel
- PrintLog "Close active document"
- Call hCloseDocument
endcase
+' ----------------------------------------------------------------
+
+sub sEditfields
+
+ PrintLog( "Edit/Fields: Edit Fields dialog: " & gApplication )
+ dim iCurrentType as integer
+
+ PrintLog( "Open new document" )
+ Call hNewDocument()
+
+ printlog( "Insert->Field->Other" )
+ hUseAsyncSlot( "InsertFieldsOther" )
+
+ ' Note that the tabdialog does not have a unique ID yet, so we treat it as "Active"
+ kontext
+ if ( Active.exists( 2 ) ) then
+
+ printlog( "Switch to <Document> tab" )
+ Active.setPage( TabDokumentFeldbefehle )
+
+ kontext "TabDokumentFeldbefehle"
+ printlog( "Select sender item from the user data, insert the field, close the dialog" )
+ if ( TabDokumentFeldbefehle.isVisible() ) then
+
+ ' Search for the sender item in the "Type" listbox by counting the
+ ' number of items in the "Select" box. Only the sender item has
+ ' more than 12 (usually 15) selectable options.
+ ' This is done to make sure that we have an enabled "Edit..." button
+ ' in the "Edit Fields" dialog called later in this test
+ printlog( "Search for suitable field type" )
+ for iCurrentType = 1 to FeldTyp.getItemCount()
+ FeldTyp.select( iCurrentType )
+ if ( Auswahl.isEnabled() and Auswahl.getItemCount() > 12 ) then
+ exit for
+ endif
+ next iCurrentType
+
+ hClickButton( Einfuegen )
+ hCloseDialog( TabDokumentFeldbefehle , "close" )
+
+ PrintLog( "Move cursor infront of field (start of document)" )
+ Call wTypeKeys("<Home>")
+
+ PrintLog( "Edit / Fields" )
+ hUseAsyncSlot( "EditFields" )
+
+ Kontext "FeldbefehlBearbeitenDokument"
+ if ( FeldbefehlBearbeitenDokument.exists( 2 ) ) then
+ Call DialogTest ( FeldbefehlBearbeitenDokument )
+
+ PrintLog( "In 'Edit Fields' dialog select 'Edit'" )
+ hClickButton( Bearbeiten )
+
+ Kontext "TabBenutzerdaten"
+ if ( TabBenutzerdaten.exists( 2 ) ) then
+ printlog( "<TabBenutzerdaten> is open. Good." )
+ call DialogTest( TabBenutzerdaten )
+ hCloseDialog( TabBenutzerdaten, "cancel" )
+ else
+ warnlog( "<TabBenutzerdaten> did not open" )
+ endif
+ else
+ warnlog( "<TabDokumentFeldbefehle> is not visible" )
+ endif
+
+ PrintLog( "Close dialog" )
+ Kontext "FeldbefehlBearbeitenDokument"
+ hCloseDialog( FeldbefehlBearbeitenDokument, "cancel" )
+ else
+ warnlog( "<FeldbefehlBearbeitenDokument> did not open" )
+ endif
+ else
+ warnlog( "Unable to open <InsertFieldsOther>")
+ endif
+
+ PrintLog( "Close active document" )
+ Call hCloseDocument()
+
+end sub
+
'----------------------------------------------------------------
testcase tEditFieldsInputList
@@ -1203,9 +1163,7 @@ endcase
'----------------------------------------------------------------
testcase tEditIndexEntry
- qaErrorLog "#158646# - Insert Indexes Entry causes crash."
- goto endsub
-
+
PrintLog "- Edit/Index Entry"
if gApplication = "HTML" then
printlog "Not in WriterWeb!"
@@ -1249,53 +1207,66 @@ endcase
testcase tEditLinks
PrintLog "- Edit/Links"
- if gApplication = "HTML" then
+
+ dim sFile as string
+ sFile = gTesttoolPath & "writer\required\input\graphics\jolink.jpg"
+
+ if ( gApplication = "HTML" ) then
printlog "Not in WriterWeb!"
goto endsub
end if
+ printlog( "Open a new document" )
Call hNewDocument
- Call hGrafikVerknuepftEinfuegen ( gTesttoolPath & "writer\required\input\graphics\jolink.jpg" )
- Wait 200
- try
- EditLinksWriter
- catch
+
+ printlog( "Insert graphic file (linked): " & sFile )
+ Call hGrafikVerknuepftEinfuegen ( sFile )
+
+ printlog( "Edit->Links" )
+ if ( hUseAsyncSlot( "EditLinksWriter" ) = -1 ) then
Warnlog "Error on calling Edit / Links ! (disabled)"
Call hCloseDocument
goto endsub
- endcatch
+ endif
Kontext "VerknuepfungenBearbeiten"
- if VerknuepfungenBearbeiten.Exists then
+ if ( VerknuepfungenBearbeiten.Exists( 1 ) ) then
Call DialogTest ( VerknuepfungenBearbeiten )
- Wait 200
- try
- Aendern.Click
+
+ Kontext "VerknuepfungenBearbeiten"
+ printlog( "Click <Change>" )
+ if ( hClickButton( Aendern ) > -1 ) then
Kontext "GrafikEinfuegenDlg"
- GrafikEinfuegenDlg.Cancel
- catch
+ call DialogTest( GrafikEinfuegenDlg )
+ hCloseDialog( GrafikEinfuegenDlg, "cancel" )
+ else
Warnlog "Error modifying the link!"
- endcatch
+ endif
Kontext "VerknuepfungenBearbeiten"
- Wait 200
- try
- Aktualisieren.Click
- catch
+ printlog( "Click <Update>" )
+ if ( hClickButton( Aktualisieren ) = -1 ) then
Warnlog "Error on updating the link!"
- endcatch
- Wait 200
+ endif
- try
- Loesen.Click
+ Kontext "VerknuepfungenBearbeiten"
+ printlog( "Click <Release>" )
+ if ( hClickButton( Loesen ) > -1 ) then
Kontext "Active"
- if Active.Exists then Active.No
- catch
- Warnlog "- Error on breaking the link!"
- endcatch
+ printlog( "Check for confirmation message" )
+ if ( Active.Exists( 1 ) ) then
+ printlog( "Message displayed, good. Closing with <No>" )
+ printlog( Active.getText() )
+ Active.No
+ else
+ Warnlog( "The <Are you sure you want to remove the selected link?> message is missing" )
+ endif
+ else
+ Warnlog( "Unable to break the link to the file" )
+ endif
Kontext "VerknuepfungenBearbeiten"
- VerknuepfungenBearbeiten.Close
+ hCloseDialog( VerknuepfungenBearbeiten, "close" )
else
Warnlog "Dialog Edit / Links not opened!"
end if
@@ -1321,23 +1292,41 @@ endcase
'------------------------------------------------------
testcase tEditImageMap
- PrintLog "- Edit / ImageMap"
+ PrintLog "- Edit / ImageMap"
+
+ dim sFile as string
+ sFile = gTesttoolPath & "writer\required\input\graphics\jolink.jpg"
+
PrintLog "Open new document"
Call hNewDocument
- if hGrafikEinfuegen ( gTesttoolPath & "writer\required\input\graphics\jolink.jpg" )=true then
+ printlog( "Insert graphics file: " & sFile )
+ if ( hGrafikEinfuegen( sFile ) ) then
+
+ printlog( "Edit->Imagemap" )
+ EditImageMap
+
Kontext "ImageMapEditor"
- if ImageMapEditor.Exists then ImageMapEditor.Close
- try
- EditImageMap
- Kontext "ImageMapEditor"
+ if ( ImageMapEditor.exists( 1 ) ) then
Call DialogTest (ImageMapEditor)
- Sleep 1
- ImageMapEditor.Close
- catch
- Warnlog "Edit/ImageMap disabled!"
- endcatch
+ hCloseDialog( ImageMapEditor, "close" )
+
+ printlog( "Check for <Imagemap changed> messagebox (should not appear)" )
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ qaerrorlog( "#i109605# - <imagemap changed> message displayed." )
+ printlog( Active.getText )
+ Active.no()
+ else
+ printlog( "No messagebox on close, good." )
+ endif
+
+ else
+ warnlog( "Dialog <ImageMapEditor> did not open" )
+ endif
+ else
+ warnlog( "Insert graphics failed" )
end if
PrintLog "Close active document"
@@ -1370,103 +1359,6 @@ endcase
'----------------------------------------------------------------
-testcase tHtmlDocEditFields
- PrintLog "- Edit/Fields"
-
- gApplication = "HTML"
- PrintLog "Open new document"
- Call hNewDocument
-
- PrintLog "Select Insert / Fields Other"
- InsertFieldsOther
- Kontext
- Active.Setpage TabDokumentFeldbefehle
- Kontext "TabDokumentFeldbefehle"
- Sleep 1
- PrintLog "Insert Field 'Sender -> Company'"
- Select case iSprache
- case 01 : Feldtyp.Select 5 'Sender
- Auswahl.Select 1 'Company
- case 03 : Feldtyp.Select 8
- Auswahl.Select 1
- case 07 : Feldtyp.Select 5
- Auswahl.Select 1
- case 31 : Feldtyp.Select 1
- Auswahl.Select 1
- case 33 : Feldtyp.Select 2
- Auswahl.Select 1
- case 34 : Feldtyp.Select 6
- Auswahl.Select 1
- case 36 : Feldtyp.Select 3
- Auswahl.Select 1
- case 39 : Feldtyp.Select 3
- Auswahl.Select 1
- case 45 : Feldtyp.Select 1
- Auswahl.Select 1
- case 46 : Feldtyp.Select 2
- Auswahl.Select 1
- case 48 : Feldtyp.Select 3
- Auswahl.Select 1
- case 49 : Feldtyp.Select 1
- Auswahl.Select 1
- case 51 : Feldtyp.Select 5
- Auswahl.Select 1
- case 52 : Feldtyp.Select 5
- Auswahl.Select 1
- case 55 : Feldtyp.Select 7
- Auswahl.Select 1
- case 81 : Feldtyp.Select 4
- Auswahl.Select 1
- case 82 : Feldtyp.Select 2
- Auswahl.Select 1
- case 84 : Feldtyp.Select 3
- Auswahl.Select 1
- case 86 : Feldtyp.Select 1
- Auswahl.Select 1
- case 88 : Feldtyp.Select 2
- Auswahl.Select 1
-
- case else : Warnlog "Missing language support!"
- TabDokumentFeldbefehle.Cancel
- PrintLog "Close active document"
- Call hCloseDocument
- goto endsub
- end select
-
- Einfuegen.Click
- Wait (400)
- PrintLog "Close Fields dialog"
- Schliessen.Click
-
- PrintLog "Put cursor in front of field"
- Call wTypeKeys("<Home>")
-
- PrintLog "Edit / Fields"
- EditFields
- WaitSlot (2000)
-
- Kontext "FeldbefehlBearbeitenDokument"
- Call DialogTest ( FeldbefehlBearbeitenDokument )
-
- PrintLog "In 'Edit Fields' dialog select 'Edit'"
- if Bearbeiten.IsVisible and Bearbeiten.IsEnabled then
- Bearbeiten.Click
- Kontext "TabBenutzerdaten"
- TabBenutzerdaten.Cancel
- Kontext "FeldbefehlBearbeitenDokument"
- else
- Warnlog "Button 'Edit' in Dialog disabled!"
- end if
-
- PrintLog "Close dialog"
- FeldbefehlBearbeitenDokument.Cancel
- PrintLog "Close active document"
- Call hCloseDocument
- gApplication = "WRITER"
-endcase
-
-'----------------------------------------------------------------
-
testcase tMasterDocEditNavigator
printlog "- View/Navigator"
Dim ToolboxOk as boolean
diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc
index 57c83706029f..3a93dfae45db 100644
--- a/testautomation/writer/required/includes/w_007_.inc
+++ b/testautomation/writer/required/includes/w_007_.inc
@@ -80,7 +80,7 @@ testcase tToolsSpellcheck
printlog " Open document where the formatting is set to the language we wish to test."
TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if ( not hFileExists ( TheFile ) ) then
+ if ( not FileExists ( TheFile ) ) then
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
goto endsub
end if
@@ -243,7 +243,7 @@ testcase tToolsThesaurus
printlog " Open document where the formatting is set to the language we wish to test."
TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if ( not hFileExists ( TheFile ) ) then
+ if ( not FileExists ( TheFile ) ) then
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
goto endsub
end if
@@ -339,7 +339,7 @@ testcase tToolsHyphenation
LingFile = str$(iSprache) + "-hyph.dat"
end select
- if ( not hFileExists( DieDatei ) ) then
+ if ( not FileExists( DieDatei ) ) then
Warnlog "No defined Errortext for language: " + isprache + "! Exit!"
goto endsub
end if
@@ -1232,7 +1232,7 @@ testcase tMasterDocToolsHyphenation
end select
sTestFile = convertpath( sTestFile )
- if ( not hFileExists( sTestFile ) )then
+ if ( not FileExists( sTestFile ) )then
Warnlog "No defined Errortext for language: " + isprache + "! Exit!"
goto endsub
end if
diff --git a/testautomation/writer/required/includes/w_011_.inc b/testautomation/writer/required/includes/w_011_.inc
index a8b64e5dbe2e..ce6498a4408f 100755
--- a/testautomation/writer/required/includes/w_011_.inc
+++ b/testautomation/writer/required/includes/w_011_.inc
@@ -467,8 +467,10 @@ testcase tZORest
wait 500
catch
Warnlog "#i56594#Shortcut selecting objects doesn't work"
- Call hCloseDocument
- goto endsub
+ Call gMouseClick ( 40, 40 )
+ Kontext "DrawingObjectbar"
+ Drehen.Click
+ wait 500
endcatch
printlog " - Change Anchor"
diff --git a/testautomation/writer/tools/includes/w_tool4.inc b/testautomation/writer/tools/includes/w_tool4.inc
index 78cee6ca3042..8b8c52e12627 100644
--- a/testautomation/writer/tools/includes/w_tool4.inc
+++ b/testautomation/writer/tools/includes/w_tool4.inc
@@ -143,7 +143,7 @@ function wGetSpellcheckDocumentName(xCategory as integer) as string
end select
if sReturn <> "None" then
- if hFileExists(sTemp) then
+ if FileExists(sTemp) then
sReturn = sTemp
else
sReturn = "Empty"
diff --git a/testautomation/xml/optional/includes/docbook_001.inc b/testautomation/xml/optional/includes/docbook_001.inc
index f79f4fd36c4a..d26a60025de6 100644
--- a/testautomation/xml/optional/includes/docbook_001.inc
+++ b/testautomation/xml/optional/includes/docbook_001.inc
@@ -43,7 +43,7 @@ sub tDocBookXMLtestdocs
exit sub
end if
'Calculating how many documents are in that directory (max. 500)
- if hDirectoryExists(sSourcePath) then
+ if FileExists(sSourcePath) then
'Get the file list and put it in a list (max. 500 per directory!)
call GetAllFileList(sSourcePath, "*.xml" , sSourceDocuments())
iNumberOfDocuments = ListCount(sSourceDocuments())
diff --git a/testautomation/xml/tools/includes/xmltool1.inc b/testautomation/xml/tools/includes/xmltool1.inc
index e0356be2076c..e25a5d03506e 100644
--- a/testautomation/xml/tools/includes/xmltool1.inc
+++ b/testautomation/xml/tools/includes/xmltool1.inc
@@ -43,7 +43,7 @@ sub CreateWorkXMLExportDir ( DirName as string )
Dim Isliste(200) as string
Dim i, BornToKill
printlog "Checking work-dir & creating '" & gOfficePath & ConvertPath(DirName) & "'."
- if hDirectoryExists ( gOfficePath & ConvertPath(DirName) ) = TRUE then
+ if ( FileExists( gOfficePath & ConvertPath( DirName) ) then
OutputPath = gOfficePath & ConvertPath(DirName)
IsListe(0) = 0
GetFileList ( OutputPath , "*", IsListe() )