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: options_ooo_appearance.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
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 : thorsten.bosbach@sun.com
36 '* short description : Tools->Options: OpenOffice.org Appearance
38 '\******************************************************************************
40 testcase tOOoAppearance
41 Dim iSchemes as Integer
42 Dim sSchemeNames (10) as String
43 Dim sCurScheme as String, sCurScheme2 as String
44 Dim bIsError as Boolean
47 '///check if all settings are saved in configuration ( StarOffice / Appearance )
49 printlog " - save settings"
50 '///save settings of schemes
51 'tools / options / staroffice / appearance
53 hToolsOptions ( "StarOffice", "Appearance" )
55 'get the number of schemes
56 iSchemes = Scheme.GetItemCount
57 sCurScheme = Scheme.GetSelText
58 if iSchemes > 10 then Warnlog "There are more than 10 schemes, please update the test for it!"
59 'get the name of schemes
61 ListAppend ( sSchemeNames(), Scheme.GetItemText (i) )
64 printlog " - change settings"
65 'insert a new scheme ( press Save, insert TT-Scheme as name, and close all dialogs with OK )
68 SchemeName.SetText "TT-Scheme"
72 warnlog( "The newly created scheme cannot be saved (ok is disabled) -> #i26913")
77 Kontext "ExtrasOptionenDlg"
81 '///exit and restart StarOffice
82 printlog " - exit/restart StarOffice"
85 '///check the new scheme
86 printlog " - check settings"
87 'tools / options / staroffice / appearance
89 hToolsOptions ( "StarOffice", "Appearance" )
91 'try to select the TT-Scheme
93 Scheme.Select "TT-Scheme"
96 if Scheme.GetItemCount <> iSchemes + 1 then
97 Warnlog "The new scheme 'TT-Scheme' is not saved!"
99 Warnlog "The new scheme 'TT-Scheme' has another name!"
104 '///delete the new scheme ( if all works correctly until now )
105 printlog " - delete the new scheme"
108 if bIsError = FALSE then
110 Scheme.Select "TT-Scheme"
111 'press delete and click 'no'
116 warnlog( "The scheme does not exist in the scheme-selector listbox")
119 Kontext "TabAppearance"
121 'press delete and click 'yes'
122 Scheme.Select "TT-Scheme"
128 Warnlog "Perhaps the Scheme is deleted! But the messagebox was left with 'NO'!"
131 'select the default-entry
133 Kontext "TabAppearance"
134 sCurScheme2 = Scheme.GetSelText
136 printlog " - press OK for options dialog"
137 'press OK for options dialog
138 Kontext "ExtrasOptionenDlg"
142 '///check if the scheme is deleted and the saved base state is current
143 printlog " - check if the scheme is deleted and the saved base state is current"
145 hToolsOptions ( "StarOffice", "Appearance" )
147 if Scheme.GetSelText <> sCurScheme2 then
148 Warnlog "The last selected entry after deleting is not selected after restart the options dialog!"
150 if iSchemes <> Scheme.GetItemCount then Warnlog "There are not " + iSchemes + " items in the scheme list! There are " + Scheme.GetItemCount
151 for i = 1 to Scheme.GetItemCount
152 if Scheme.GetItemText(i) <> sSchemeNames(i) then
153 Warnlog "The " + i + " entry is not the same -> should : '" + sSchemeNames(i) + "' is '" + Scheme.GetItemText(i) + "'"
157 '///set the selected scheme to default
158 printlog " - set the selected scheme to default"
159 Scheme.Select sCurScheme
161 '///press OK at the options dialog
162 printlog " - press OK at the options dialog"
163 Kontext "ExtrasOptionenDlg"
167 '///check if the default scheme is selected after restarting the options dialog
168 printlog " - check if the default setting is active, after deleting a scheme and a restart of the options dialog"
170 hToolsOptions ( "StarOffice", "Appearance" )
172 if Scheme.GetSelText <> sCurScheme then
173 Warnlog "The default scheme is not selected!"
178 '///press OK at the options dialog
179 printlog " - press OK at the options dialog"
180 Kontext "ExtrasOptionenDlg"