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 : gregor.hartmann@oracle.com
30 '* short description : Test Load/Save MS-Office settings page
32 '\******************************************************************************
34 testcase tLoadSaveMSOffice
36 Dim lbSave1 ( 9 ) as Boolean
37 Dim lbSave2 ( 9 ) as Boolean
39 printlog "If you get errors in this test, please check the settings."
40 printlog "This test can only run without an error, when all checkboxes are checked or all are unchecked."
45 hToolsOptions ( "LoadSave", "MicrosoftOffice" )
47 printlog " - save old settings"
48 Auswahl.TypeKeys "<PageUp>"
50 lbSave1(i) = Auswahl.IsChecked (1)
51 lbSave2(i) = Auswahl.IsChecked (2)
52 Auswahl.TypeKeys "<Down>"
56 Auswahl.TypeKeys "<PageUp>"
59 printlog( " - invert setting: " + i )
61 if lbSave1(i) = TRUE then
62 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
63 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
65 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
66 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
69 Auswahl.TypeKeys ("<Down>")
73 Kontext "ExtrasOptionenDlg"
79 printlog " - exit/restart StarOffice"
82 printlog " - check inverting"
84 hToolsOptions ( "LoadSave", "MicrosoftOffice" )
86 Auswahl.TypeKeys( "<PageUp>" )
88 if Auswahl.IsChecked(1) = lbSave1(i) then warnlog "Entry " + i + ": state of 1. checkbox isn't saved"
89 if Auswahl.IsChecked(2) = lbSave2(i) then warnlog "Entry " + i + ": state of 2. checkbox isn't saved"
90 Auswahl.TypeKeys( "<Down>" )
93 printlog " - reset to saved settings"
94 Auswahl.TypeKeys "<PageUp>"
97 if lbSave1(i) = TRUE then
98 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
99 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
101 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
102 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
105 Auswahl.TypeKeys ("<Down>")
110 Kontext "ExtrasOptionenDlg"
114 printlog " - check default settings"
116 hToolsOptions ( "LoadSave", "MicrosoftOffice" )
119 if Auswahl.IsChecked(1) <> lbSave1(i) then warnlog "Entry " + i + ": state of 1. checkbox isn't saved"
120 if Auswahl.IsChecked(2) <> lbSave2(i) then warnlog "Entry " + i + ": state of 2. checkbox isn't saved"
121 Auswahl.TypeKeys "<Down>"
124 Kontext "ExtrasOptionenDlg"