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_loadsave_msoffice.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 : joerg.skottke@sun.com
36 '* short description : Test Load/Save MS-Office settings page
38 '\******************************************************************************
40 testcase tLoadSaveMSOffice
42 Dim lbSave1 ( 9 ) as Boolean
43 Dim lbSave2 ( 9 ) as Boolean
45 '///!!!!This routine works only with default settings (all checkboxes are checked, or all boxes are unchecked)
46 printlog "If you get errors in this test, please check the settings."
47 printlog "This test can only run without an error, when all checkboxes are checked or all are unchecked."
48 '///check if all settings are saved in configuration ( Load & Save / Microsoft Office )
51 '///open a new document
53 '///+open tools / options / load & save / Microsoft Office
55 hToolsOptions ( "LoadSave", "MicrosoftOffice" )
57 '///save old settings ( only the state of the first checkbox can be saved )
58 printlog " - save old settings"
59 Auswahl.TypeKeys "<PageUp>"
61 lbSave1(i) = Auswahl.IsChecked (1)
62 lbSave2(i) = Auswahl.IsChecked (2)
63 Auswahl.TypeKeys "<Down>"
66 '///inverted first checkbox for all entries
68 Auswahl.TypeKeys "<PageUp>"
71 printlog( " - invert setting: " + i )
73 if lbSave1(i) = TRUE then
74 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
75 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
77 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
78 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
81 Auswahl.TypeKeys ("<Down>")
85 '///+close options dialog with OK
86 Kontext "ExtrasOptionenDlg"
93 '///exit and restart StarOffice
94 printlog " - exit/restart StarOffice"
98 printlog " - check inverting"
99 '///+open tools / options / load & save / Microsoft Office
101 hToolsOptions ( "LoadSave", "MicrosoftOffice" )
103 Auswahl.TypeKeys( "<PageUp>" )
105 if Auswahl.IsChecked(1) = lbSave1(i) then warnlog "Entry " + i + ": state of 1. checkbox isn't saved"
106 if Auswahl.IsChecked(2) = lbSave2(i) then warnlog "Entry " + i + ": state of 2. checkbox isn't saved"
107 Auswahl.TypeKeys( "<Down>" )
111 printlog " - reset to saved settings"
112 Auswahl.TypeKeys "<PageUp>"
115 if lbSave1(i) = TRUE then
116 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
117 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
119 if lbSave2(i) = FALSE then Auswahl.TypeKeys ("<Space><Space><Space>") ' 2. checkboxes must be unchecked
120 if lbSave2(i) = TRUE then Auswahl.TypeKeys ("<Space>") ' 2. checkboxes must be checked
123 Auswahl.TypeKeys ("<Down>")
128 '///+close options dialog with OK
129 Kontext "ExtrasOptionenDlg"
134 printlog " - check default settings"
135 '///+open tools / options / load & save / Microsoft Office
137 hToolsOptions ( "LoadSave", "MicrosoftOffice" )
140 if Auswahl.IsChecked(1) <> lbSave1(i) then warnlog "Entry " + i + ": state of 1. checkbox isn't saved"
141 if Auswahl.IsChecked(2) <> lbSave2(i) then warnlog "Entry " + i + ": state of 2. checkbox isn't saved"
142 Auswahl.TypeKeys "<Down>"
145 '///+close options dialog with OK
146 Kontext "ExtrasOptionenDlg"