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 the Load/Save HTML compatibility page
32 '\******************************************************************************
34 testcase tLoadSaveHTML
36 Dim lbSave ( 10 ) as Boolean
37 Dim lsSave2 ( 8 ) as String
38 Dim lsSave ( 10 ) as String
44 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
46 printlog " - save old settings"
47 lsSave ( 1 ) = Groesse1.GetText
48 lsSave ( 2 ) = Groesse2.GetText
49 lsSave ( 3 ) = Groesse3.GetText
50 lsSave ( 4 ) = Groesse4.GetText
51 lsSave ( 5 ) = Groesse5.GetText
52 lsSave ( 6 ) = Groesse6.GetText
53 lsSave ( 7 ) = Groesse7.GetText
54 lbSave ( 1 ) = UnbekannteHTML.IsChecked
55 lbSave ( 2 ) = FontEinstellungen.IsChecked
56 lbSave ( 3 ) = StarBasic.IsChecked
57 lbSave ( 4 ) = WarnungAnzeigen.IsChecked
58 lbSave ( 5 ) = Drucklayout.IsChecked
59 lbSave ( 6 ) = Grafikenkopieren.IsChecked
60 lsSave ( 8 ) = Export.GetSelText
61 lsSave ( 9 ) = Zeichensatz.GetSelText
62 lbSave ( 7 ) = UseEnglishlocaleForNumbers.isChecked
64 printlog " - change/invert settings"
65 Groesse1.More 1 : lsSave2 (1) = Groesse1.GetText
66 Groesse2.More 2 : lsSave2 (2) = Groesse2.GetText
67 Groesse3.More 3 : lsSave2 (3) = Groesse3.GetText
68 Groesse4.More 4 : lsSave2 (4) = Groesse4.GetText
69 Groesse5.More 5 : lsSave2 (5) = Groesse5.GetText
70 Groesse6.More 6 : lsSave2 (6) = Groesse6.GetText
71 Groesse7.More 7 : lsSave2 (7) = Groesse7.GetText
72 if lbSave ( 1 ) = TRUE then UnbekannteHTML.Uncheck else UnbekannteHTML.Check
73 if lbSave ( 2 ) = TRUE then FontEinstellungen.Uncheck else FontEinstellungen.Check
74 if FontEinstellungen.IsChecked <> TRUE then
75 if lbSave ( 3 ) = TRUE then StarBasic.Uncheck else StarBasic.Check
77 if lbSave ( 4 ) = TRUE then WarnungAnzeigen.Uncheck else WarnungAnzeigen.Check
78 if lbSave ( 5 ) = TRUE then Drucklayout.Uncheck else Drucklayout.Check
79 if lbSave ( 6 ) = TRUE then Grafikenkopieren.Uncheck else Grafikenkopieren.Check
80 if lbSave ( 7 ) = TRUE then UseEnglishlocaleForNumbers.Uncheck else UseEnglishlocaleForNumbers.Check
84 Kontext "ExtrasOptionenDlg"
90 printlog " - exit/restart StarOffice"
93 printlog " - check inverting / changes"
95 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
97 if Groesse1.GetText <> lsSave2 (1) then Warnlog "Size 1 => changes not saved!"
98 if Groesse2.GetText <> lsSave2 (2) then Warnlog "Size 2 => changes not saved!"
99 if Groesse3.GetText <> lsSave2 (3) then Warnlog "Size 3 => changes not saved!"
100 if Groesse4.GetText <> lsSave2 (4) then Warnlog "Size 4 => changes not saved!"
101 if Groesse5.GetText <> lsSave2 (5) then Warnlog "Size 5 => changes not saved!"
102 if Groesse6.GetText <> lsSave2 (6) then Warnlog "Size 6 => changes not saved!"
103 if Groesse7.GetText <> lsSave2 (7) then Warnlog "Size 7 => changes not saved!"
104 if UnbekannteHTML.IsChecked = lbSave ( 1 ) then Warnlog "Unknown HTML => changes not saved!"
105 if FontEinstellungen.IsChecked = lbSave ( 2 ) then Warnlog "Font settings => changes not saved!"
106 if FontEinstellungen.IsChecked <> TRUE then
107 if StarBasic.IsChecked = lbSave ( 3 ) then Warnlog "StarBasic => changes not saved!"
109 if WarnungAnzeigen.IsChecked = lbSave ( 4 ) then Warnlog "Show Warnings => changes not saved!"
110 if Drucklayout.IsEnabled then
111 if Drucklayout.IsChecked = lbSave ( 5 ) then Warnlog "Printlayout => changes not saved!"
113 if Grafikenkopieren.IsChecked = lbSave ( 6 ) then Warnlog "Copy graphics => changes not saved!"
114 if UseEnglishlocaleForNumbers.IsChecked = lbSave ( 7 ) then Warnlog "UseEnglishlocaleForNumbers => changes not saved!"
115 if Export.GetSelIndex <> 1 then Warnlog "Export => changes not saved!"
116 if Zeichensatz.GetSelIndex <> 10 then Warnlog "Font => changes not saved!"
118 printlog " - 2. changes"
121 Groesse3.SetText "10"
122 Groesse4.SetText "11"
123 Groesse5.SetText "20"
124 Groesse6.SetText "38"
125 Groesse7.SetText "50"
126 UnbekannteHTML.Uncheck
127 FontEinstellungen.Check
130 WarnungAnzeigen.UnCheck
132 Grafikenkopieren.Check
133 UseEnglishlocaleForNumbers.Check
136 Kontext "ExtrasOptionenDlg"
140 printlog " - check 2. changes"
142 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
144 if Groesse1.GetText <> "6" then Warnlog "Size 1 => changes not saved!"
145 if Groesse2.GetText <> "9" then Warnlog "Size 2 => changes not saved!"
146 if Groesse3.GetText <> "10" then Warnlog "Size 3 => changes not saved!"
147 if Groesse4.GetText <> "11" then Warnlog "Size 4 => changes not saved!"
148 if Groesse5.GetText <> "20" then Warnlog "Size 5 => changes not saved!"
149 if Groesse6.GetText <> "38" then Warnlog "Size 6 => changes not saved!"
150 if Groesse7.GetText <> "50" then Warnlog "Size 7 => changes not saved!"
151 if UnbekannteHTML.IsChecked <> FALSE then Warnlog "Unknown HTML => changes not saved!"
152 if FontEinstellungen.IsChecked <> TRUE then Warnlog "Font settings => changes not saved!"
153 if StarBasic.IsChecked <> FALSE then
154 Warnlog "StarBasic => changes not saved!"
156 if WarnungAnzeigen.IsChecked <> FALSE then Warnlog "Show Warnings => changes not saved!"
158 if Drucklayout.IsEnabled then
159 if Drucklayout.IsChecked <> TRUE then Warnlog "Printlayout => changes not saved!"
161 if Grafikenkopieren.IsChecked <> TRUE then Warnlog "Copy graphics => changes not saved!"
162 if UseEnglishlocaleForNumbers.IsChecked <> TRUE then Warnlog "UseEnglishlocaleForNumbers => changes not saved!"
163 if Export.GetSelIndex <> 2 then Warnlog "Export => changes not saved!"
164 if Zeichensatz.GetSelIndex <> 2 then Warnlog "Font => changes not saved!"
166 printlog " - reset to saved settings"
167 Groesse1.SetText lsSave (1)
168 Groesse2.SetText lsSave (2)
169 Groesse3.SetText lsSave (3)
170 Groesse4.SetText lsSave (4)
171 Groesse5.SetText lsSave (5)
172 Groesse6.SetText lsSave (6)
173 Groesse7.SetText lsSave (7)
174 if lbSave(1) = TRUE then UnbekannteHTML.Check else UnbekannteHTML.UnCheck
175 if lbSave(2) = TRUE then FontEinstellungen.Check else FontEinstellungen.UnCheck
177 if lbSave(4) = TRUE then WarnungAnzeigen.Check else WarnungAnzeigen.UnCheck
179 if lbSave(3) = TRUE then StarBasic.Check else StarBasic.UnCheck
180 Export.Select lsSave ( 8 )
181 if lbSave(5) = TRUE then Drucklayout.Check else Drucklayout.UnCheck
182 if lbSave(6) = TRUE then Grafikenkopieren.Check else Grafikenkopieren.UnCheck
183 if lbSave(7) = TRUE then UseEnglishlocaleForNumbers.Check else UseEnglishlocaleForNumbers.UnCheck
184 Export.Select lsSave ( 8 )
185 Zeichensatz.Select lsSave ( 9 )
187 Kontext "ExtrasOptionenDlg"
191 printlog " - check default settings"
193 hToolsOptions ( "LoadSave", "HTMLCompatibility" )
195 if Groesse1.GetText <> lsSave (1) then Warnlog "Size 1 => changes not saved!"
196 if Groesse2.GetText <> lsSave (2) then Warnlog "Size 2 => changes not saved!"
197 if Groesse3.GetText <> lsSave (3) then Warnlog "Size 3 => changes not saved!"
198 if Groesse4.GetText <> lsSave (4) then Warnlog "Size 4 => changes not saved!"
199 if Groesse5.GetText <> lsSave (5) then Warnlog "Size 5 => changes not saved!"
200 if Groesse6.GetText <> lsSave (6) then Warnlog "Size 6 => changes not saved!"
201 if Groesse7.GetText <> lsSave (7) then Warnlog "Size 7 => changes not saved!"
202 if UnbekannteHTML.IsChecked <> lbSave(1) then Warnlog "Unknown HTML => changes not saved!"
203 if FontEinstellungen.IsChecked <> lbSave(2) then Warnlog "Font settings => changes not saved!"
204 if StarBasic.IsChecked <> lbSave(3) then Warnlog "StarBasic => changes not saved!"
206 if WarnungAnzeigen.IsChecked <> lbSave(4) then Warnlog "Show Warnings => changes not saved!"
208 if lbSave(3) = TRUE then StarBasic.Check else StarBasic.UnCheck
209 if Drucklayout.IsEnabled then
210 if Drucklayout.IsChecked <> lbSave(5) then Warnlog "Printlayout => changes not saved!"
212 if Grafikenkopieren.IsChecked <> lbSave(6) then Warnlog "Copy graphics => changes not saved!"
213 if UseEnglishlocaleForNumbers.IsChecked <> lbSave(7) then Warnlog "UseEnglishlocaleForNumbers => changes not saved!"
214 if Export.GetSeltext <> lsSave (8) then Warnlog "Export => changes not saved!"
215 if Zeichensatz.GetSeltext <> lsSave (9) then Warnlog "Font => changes not saved!"
217 Kontext "ExtrasOptionenDlg"