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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : Tools->Options: OpenOffice.org Appearance
32 '\******************************************************************************
34 testcase tOOoAppearance
35 Dim iSchemes as Integer
36 Dim sSchemeNames (10) as String
37 Dim sCurScheme as String, sCurScheme2 as String
38 Dim bIsError as Boolean
42 printlog " - save settings"
43 'tools / options / staroffice / appearance
45 hToolsOptions ( "StarOffice", "Appearance" )
47 'get the number of schemes
48 iSchemes = Scheme.GetItemCount
49 sCurScheme = Scheme.GetSelText
50 if iSchemes > 10 then Warnlog "There are more than 10 schemes, please update the test for it!"
51 'get the name of schemes
53 ListAppend ( sSchemeNames(), Scheme.GetItemText (i) )
56 printlog " - change settings"
57 'insert a new scheme ( press Save, insert TT-Scheme as name, and close all dialogs with OK )
60 SchemeName.SetText "TT-Scheme"
64 warnlog( "The newly created scheme cannot be saved (ok is disabled) -> #i26913")
69 Kontext "ExtrasOptionenDlg"
73 printlog " - exit/restart StarOffice"
76 printlog " - check settings"
77 'tools / options / staroffice / appearance
79 hToolsOptions ( "StarOffice", "Appearance" )
81 'try to select the TT-Scheme
83 Scheme.Select "TT-Scheme"
86 if Scheme.GetItemCount <> iSchemes + 1 then
87 Warnlog "The new scheme 'TT-Scheme' is not saved!"
89 Warnlog "The new scheme 'TT-Scheme' has another name!"
94 printlog " - delete the new scheme"
97 if bIsError = FALSE then
99 Scheme.Select "TT-Scheme"
100 'press delete and click 'no'
105 warnlog( "The scheme does not exist in the scheme-selector listbox")
108 Kontext "TabAppearance"
110 'press delete and click 'yes'
111 Scheme.Select "TT-Scheme"
117 Warnlog "Perhaps the Scheme is deleted! But the messagebox was left with 'NO'!"
120 'select the default-entry
122 Kontext "TabAppearance"
123 sCurScheme2 = Scheme.GetSelText
125 printlog " - press OK for options dialog"
126 'press OK for options dialog
127 Kontext "ExtrasOptionenDlg"
131 printlog " - check if the scheme is deleted and the saved base state is current"
133 hToolsOptions ( "StarOffice", "Appearance" )
135 if Scheme.GetSelText <> sCurScheme2 then
136 Warnlog "The last selected entry after deleting is not selected after restart the options dialog!"
138 if iSchemes <> Scheme.GetItemCount then Warnlog "There are not " + iSchemes + " items in the scheme list! There are " + Scheme.GetItemCount
139 for i = 1 to Scheme.GetItemCount
140 if Scheme.GetItemText(i) <> sSchemeNames(i) then
141 Warnlog "The " + i + " entry is not the same -> should : '" + sSchemeNames(i) + "' is '" + Scheme.GetItemText(i) + "'"
145 printlog " - set the selected scheme to default"
146 Scheme.Select sCurScheme
148 printlog " - press OK at the options dialog"
149 Kontext "ExtrasOptionenDlg"
153 printlog " - check if the default setting is active, after deleting a scheme and a restart of the options dialog"
155 hToolsOptions ( "StarOffice", "Appearance" )
157 if Scheme.GetSelText <> sCurScheme then
158 Warnlog "The default scheme is not selected!"
163 printlog " - press OK at the options dialog"
164 Kontext "ExtrasOptionenDlg"