1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: basic_dialog_i18n.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:03 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/******************************************************************************
34 '* owner : joerg.skottke@sun.com
36 '* short description : Update test for Basic IDE / Dialog i18n-feature
38 '\******************************************************************************
40 testcase tUpdtBasicDialogI18n
42 printlog( "BASIC IDE Dialog i18n." )
49 brc = hInitFormControls( "tDialogI18n" )
51 warnlog( "Failed to open Basic IDE / Dialogs / ToolsCollectionBar" )
55 printlog( "Click Manage Languages on ToolsCollectionBar")
56 kontext "ToolsCollectionBar"
57 if ( ToolsCollectionBar.exists() ) then
58 ManageLanguage.click()
60 warnlog( "<ToolsCollectionBar> is not open, is the test environment dirty?" )
63 kontext "ManageUILanguages"
64 if ( ManageUILanguages.exists( 2 ) ) then
65 call dialogtest( ManageUILanguages )
67 printlog( "Add default language, choose preselection")
68 kontext "ManageUILanguages"
71 kontext "SetDefaultLanguage"
72 if ( SetDefaultLanguage.exists( 2 ) ) then
73 call dialogtest( SetDefaultLanguage )
75 kontext "SetDefaultLanguage"
76 DefaultLanguageListbox.select( 3 )
78 kontext "SetDefaultLanguage"
79 SetDefaultLanguage.ok()
81 warnlog( "Dialog <SetDefaultLanguage> did not open" )
84 printlog( "Back on Manage UI Languages Dialog we click <Add>")
85 kontext "ManageUILanguages"
88 kontext "AddUserInterface"
89 if ( AddUserInterface.exists( 2 ) ) then
90 call dialogtest( AddUserInterface )
92 printlog( "Add just another language at random")
93 kontext "AddUserInterface"
94 AddNewControl.typeKeys( "<HOME>" ) ' select first item
95 AddNewControl.typeKeys( "<SPACE>" ) ' check it
97 kontext "AddUserInterface"
100 warnlog( "Dialog <AddUserInterface> did not open" )
103 kontext "ManageUILanguages"
104 PresentLanguages.Select (1)
106 printlog( "Back on Manage UI Languages Dialog, delete selected language")
107 kontext "ManageUILanguages"
110 printlog( "Confirm delete")
112 if ( Active.exists( 1 ) ) then
113 call dialogtest( active )
118 warnlog( "Confirm delete messagebox is missing" )
121 printlog( "Leave Manage UI Languages Dialog")
122 kontext "ManageUILanguages"
123 ManageUILanguages.ok()
125 warnlog( "Manage UI languages did not open" )
128 printlog( "Verify that the translationbar is visible")
129 kontext "TranslationBar"
130 if ( not TranslationBar.exists() ) then
131 warnlog( "The IDE Translation Toolbar is not visible" )
134 kontext "ToolsCollectionBar"
135 if ( not ToolsCollectionBar.exists() ) then
136 warnlog( "The ToolsCollectionBar is not visible" )
139 printlog( "Cleanup" )
140 ToolsCollectionBar.Close