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_html.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 the Load/Save HTML compatibility page
38 '\******************************************************************************
40 testcase tLoadSaveHTML
42 Dim lbSave ( 10 ) as Boolean
43 Dim lsSave2 ( 8 ) as String
44 Dim lsSave ( 10 ) as String
47 '///check if all settings are saved in configuration ( Load & Save / HTML Compatibility )
49 '///open a new document
51 '///+open tools / options / load & save / HTML Compatibility
53 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
56 printlog " - save old settings"
57 lsSave ( 1 ) = Groesse1.GetText
58 lsSave ( 2 ) = Groesse2.GetText
59 lsSave ( 3 ) = Groesse3.GetText
60 lsSave ( 4 ) = Groesse4.GetText
61 lsSave ( 5 ) = Groesse5.GetText
62 lsSave ( 6 ) = Groesse6.GetText
63 lsSave ( 7 ) = Groesse7.GetText
64 lbSave ( 1 ) = UnbekannteHTML.IsChecked
65 lbSave ( 2 ) = FontEinstellungen.IsChecked
66 lbSave ( 3 ) = StarBasic.IsChecked
67 lbSave ( 4 ) = WarnungAnzeigen.IsChecked
68 lbSave ( 5 ) = Drucklayout.IsChecked
69 lbSave ( 6 ) = Grafikenkopieren.IsChecked
70 lsSave ( 8 ) = Export.GetSelText
71 lsSave ( 9 ) = Zeichensatz.GetSelText
72 lbSave ( 7 ) = UseEnglishlocaleForNumbers.isChecked
74 '///change and invert all settings
75 printlog " - change/invert settings"
76 Groesse1.More 1 : lsSave2 (1) = Groesse1.GetText
77 Groesse2.More 2 : lsSave2 (2) = Groesse2.GetText
78 Groesse3.More 3 : lsSave2 (3) = Groesse3.GetText
79 Groesse4.More 4 : lsSave2 (4) = Groesse4.GetText
80 Groesse5.More 5 : lsSave2 (5) = Groesse5.GetText
81 Groesse6.More 6 : lsSave2 (6) = Groesse6.GetText
82 Groesse7.More 7 : lsSave2 (7) = Groesse7.GetText
83 if lbSave ( 1 ) = TRUE then UnbekannteHTML.Uncheck else UnbekannteHTML.Check
84 if lbSave ( 2 ) = TRUE then FontEinstellungen.Uncheck else FontEinstellungen.Check
85 if FontEinstellungen.IsChecked <> TRUE then
86 if lbSave ( 3 ) = TRUE then StarBasic.Uncheck else StarBasic.Check
88 if lbSave ( 4 ) = TRUE then WarnungAnzeigen.Uncheck else WarnungAnzeigen.Check
89 if lbSave ( 5 ) = TRUE then Drucklayout.Uncheck else Drucklayout.Check
90 if lbSave ( 6 ) = TRUE then Grafikenkopieren.Uncheck else Grafikenkopieren.Check
91 if lbSave ( 7 ) = TRUE then UseEnglishlocaleForNumbers.Uncheck else UseEnglishlocaleForNumbers.Check
95 '///+close options dialog with OK
96 Kontext "ExtrasOptionenDlg"
100 '///+close the document
103 '///exit and restart StarOffice
104 printlog " - exit/restart StarOffice"
107 '///check inverting and changes
108 printlog " - check inverting / changes"
109 '///+open tools / options / load & save / HTML Compatibility
111 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
113 if Groesse1.GetText <> lsSave2 (1) then Warnlog "Size 1 => changes not saved!"
114 if Groesse2.GetText <> lsSave2 (2) then Warnlog "Size 2 => changes not saved!"
115 if Groesse3.GetText <> lsSave2 (3) then Warnlog "Size 3 => changes not saved!"
116 if Groesse4.GetText <> lsSave2 (4) then Warnlog "Size 4 => changes not saved!"
117 if Groesse5.GetText <> lsSave2 (5) then Warnlog "Size 5 => changes not saved!"
118 if Groesse6.GetText <> lsSave2 (6) then Warnlog "Size 6 => changes not saved!"
119 if Groesse7.GetText <> lsSave2 (7) then Warnlog "Size 7 => changes not saved!"
120 if UnbekannteHTML.IsChecked = lbSave ( 1 ) then Warnlog "Unknown HTML => changes not saved!"
121 if FontEinstellungen.IsChecked = lbSave ( 2 ) then Warnlog "Font settings => changes not saved!"
122 if FontEinstellungen.IsChecked <> TRUE then
123 if StarBasic.IsChecked = lbSave ( 3 ) then Warnlog "StarBasic => changes not saved!"
125 if WarnungAnzeigen.IsChecked = lbSave ( 4 ) then Warnlog "Show Warnings => changes not saved!"
126 if Drucklayout.IsEnabled then
127 if Drucklayout.IsChecked = lbSave ( 5 ) then Warnlog "Printlayout => changes not saved!"
129 if Grafikenkopieren.IsChecked = lbSave ( 6 ) then Warnlog "Copy graphics => changes not saved!"
130 if UseEnglishlocaleForNumbers.IsChecked = lbSave ( 7 ) then Warnlog "UseEnglishlocaleForNumbers => changes not saved!"
131 if Export.GetSelIndex <> 1 then Warnlog "Export => changes not saved!"
132 if Zeichensatz.GetSelIndex <> 10 then Warnlog "Font => changes not saved!"
135 printlog " - 2. changes"
138 Groesse3.SetText "10"
139 Groesse4.SetText "11"
140 Groesse5.SetText "20"
141 Groesse6.SetText "38"
142 Groesse7.SetText "50"
143 UnbekannteHTML.Uncheck
144 FontEinstellungen.Check
147 WarnungAnzeigen.UnCheck
149 Grafikenkopieren.Check
150 UseEnglishlocaleForNumbers.Check
153 '///+close options dialog with OK
154 Kontext "ExtrasOptionenDlg"
159 printlog " - check 2. changes"
160 '///+open tools / options / load & save / HTML Compatibility
162 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
164 if Groesse1.GetText <> "6" then Warnlog "Size 1 => changes not saved!"
165 if Groesse2.GetText <> "9" then Warnlog "Size 2 => changes not saved!"
166 if Groesse3.GetText <> "10" then Warnlog "Size 3 => changes not saved!"
167 if Groesse4.GetText <> "11" then Warnlog "Size 4 => changes not saved!"
168 if Groesse5.GetText <> "20" then Warnlog "Size 5 => changes not saved!"
169 if Groesse6.GetText <> "38" then Warnlog "Size 6 => changes not saved!"
170 if Groesse7.GetText <> "50" then Warnlog "Size 7 => changes not saved!"
171 if UnbekannteHTML.IsChecked <> FALSE then Warnlog "Unknown HTML => changes not saved!"
172 if FontEinstellungen.IsChecked <> TRUE then Warnlog "Font settings => changes not saved!"
173 if StarBasic.IsChecked <> FALSE then
174 Warnlog "StarBasic => changes not saved!"
176 if WarnungAnzeigen.IsChecked <> FALSE then Warnlog "Show Warnings => changes not saved!"
178 if Drucklayout.IsEnabled then
179 if Drucklayout.IsChecked <> TRUE then Warnlog "Printlayout => changes not saved!"
181 if Grafikenkopieren.IsChecked <> TRUE then Warnlog "Copy graphics => changes not saved!"
182 if UseEnglishlocaleForNumbers.IsChecked <> TRUE then Warnlog "UseEnglishlocaleForNumbers => changes not saved!"
183 if Export.GetSelIndex <> 2 then Warnlog "Export => changes not saved!"
184 if Zeichensatz.GetSelIndex <> 2 then Warnlog "Font => changes not saved!"
186 '///reset to default settings
187 printlog " - reset to saved settings"
188 Groesse1.SetText lsSave (1)
189 Groesse2.SetText lsSave (2)
190 Groesse3.SetText lsSave (3)
191 Groesse4.SetText lsSave (4)
192 Groesse5.SetText lsSave (5)
193 Groesse6.SetText lsSave (6)
194 Groesse7.SetText lsSave (7)
195 if lbSave(1) = TRUE then UnbekannteHTML.Check else UnbekannteHTML.UnCheck
196 if lbSave(2) = TRUE then FontEinstellungen.Check else FontEinstellungen.UnCheck
198 if lbSave(4) = TRUE then WarnungAnzeigen.Check else WarnungAnzeigen.UnCheck
200 if lbSave(3) = TRUE then StarBasic.Check else StarBasic.UnCheck
201 Export.Select lsSave ( 8 )
202 if lbSave(5) = TRUE then Drucklayout.Check else Drucklayout.UnCheck
203 if lbSave(6) = TRUE then Grafikenkopieren.Check else Grafikenkopieren.UnCheck
204 if lbSave(7) = TRUE then UseEnglishlocaleForNumbers.Check else UseEnglishlocaleForNumbers.UnCheck
205 Export.Select lsSave ( 8 )
206 Zeichensatz.Select lsSave ( 9 )
208 '///+close options dialog with OK
209 Kontext "ExtrasOptionenDlg"
213 printlog " - check default settings"
214 '///+open tools / options / load & save / HTML Compatibility
216 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
218 if Groesse1.GetText <> lsSave (1) then Warnlog "Size 1 => changes not saved!"
219 if Groesse2.GetText <> lsSave (2) then Warnlog "Size 2 => changes not saved!"
220 if Groesse3.GetText <> lsSave (3) then Warnlog "Size 3 => changes not saved!"
221 if Groesse4.GetText <> lsSave (4) then Warnlog "Size 4 => changes not saved!"
222 if Groesse5.GetText <> lsSave (5) then Warnlog "Size 5 => changes not saved!"
223 if Groesse6.GetText <> lsSave (6) then Warnlog "Size 6 => changes not saved!"
224 if Groesse7.GetText <> lsSave (7) then Warnlog "Size 7 => changes not saved!"
225 if UnbekannteHTML.IsChecked <> lbSave(1) then Warnlog "Unknown HTML => changes not saved!"
226 if FontEinstellungen.IsChecked <> lbSave(2) then Warnlog "Font settings => changes not saved!"
227 if StarBasic.IsChecked <> lbSave(3) then Warnlog "StarBasic => changes not saved!"
229 if WarnungAnzeigen.IsChecked <> lbSave(4) then Warnlog "Show Warnings => changes not saved!"
231 if lbSave(3) = TRUE then StarBasic.Check else StarBasic.UnCheck
232 if Drucklayout.IsEnabled then
233 if Drucklayout.IsChecked <> lbSave(5) then Warnlog "Printlayout => changes not saved!"
235 if Grafikenkopieren.IsChecked <> lbSave(6) then Warnlog "Copy graphics => changes not saved!"
236 if UseEnglishlocaleForNumbers.IsChecked <> lbSave(7) then Warnlog "UseEnglishlocaleForNumbers => changes not saved!"
237 if Export.GetSeltext <> lsSave (8) then Warnlog "Export => changes not saved!"
238 if Zeichensatz.GetSeltext <> lsSave (9) then Warnlog "Font => changes not saved!"
240 '///+close options dialog with OK
241 Kontext "ExtrasOptionenDlg"