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_general.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 : thorsten.bosbach@sun.com
36 '* short description : Tools->Options Load/Save: General
38 '\******************************************************************************
40 testcase tLoadSaveGeneral
41 Dim lbSave(15) as Boolean
42 Dim lsSave(20) as String
43 Dim AppCount as Integer
46 '///check if all settings are saved in configuration ( Load & Save / General )
48 '///+open tools / options / load & save / general
50 hToolsOptions("LoadSave","General")
52 printlog " - save old settings"
53 lbSave(13) = BenutzerspezifischeEinstellungen.IsChecked
54 lbSave(1) = DokumenteigenschaftenBearbeiten.IsChecked
55 lbSave(2) = Sicherungskopie.IsChecked
56 lbSave(3) = AutomatischSpeichern.IsChecked
58 if AutomatischSpeichern.IsChecked then
59 lsSave(1) = Minuten.GetText
62 lbSave(10) = NoPrettyPrinting.IsChecked
63 lbSave(11) = URLimDateisystem.IsChecked
64 lbSave(12) = URLimInternet.IsChecked
66 printlog("Listed Documenttypes are: ")
67 AppCount = Dokumenttyp.GetItemCount
68 if (AppCount > 7) then
69 Warnlog( "Seven applications should be listed, there are " & AppCount )
72 printlog( " - " & DokumentTyp.getSelText)
77 lsSave(2+i) = Dokumenttyp.GetSelText
78 lsSave(2+AppCount+i) = Filter.GetSelText
81 '///+invert and change all settings
82 printlog " - invert/change settings"
83 if lbSave(13) then BenutzerspezifischeEinstellungen.UnCheck else BenutzerspezifischeEinstellungen.Check
84 if lbSave(1) then DokumenteigenschaftenBearbeiten.Uncheck else DokumenteigenschaftenBearbeiten.Check
85 if lbSave(2) then Sicherungskopie.Uncheck else Sicherungskopie.Check
86 if lbSave(3) then AutomatischSpeichern.Uncheck else AutomatischSpeichern.Check
87 if AutomatischSpeichern.IsChecked then
88 lsSave(1) = Minuten.GetText
91 if lbSave(10) then NoPrettyPrinting.Uncheck else NoPrettyPrinting.Check
92 if lbSave(11) then URLimDateisystem.Uncheck else URLimDateisystem.Check
93 if lbSave(12) then URLimInternet.Uncheck else URLimInternet.Check
94 printlog( "Setting filters for documenttypes: Select third item from every list" )
98 printlog( "Doctype: " & Dokumenttyp.getSelText() & " has filter: " & Filter.getSelText() )
101 '///+close options dialog with OK
102 printlog " - close options-dlg with OK"
103 kontext "ExtrasOptionenDlg"
107 '///exit and restart StarOffice
108 printlog " - exit/restart StarOffice"
111 '///check inverting and changes
112 printlog " - check inverting/changes"
113 '///+open tools / options / load & save / general
115 hToolsOptions ( "LoadSave", "General" )
117 if BenutzerspezifischeEinstellungen.IsChecked = lbSave ( 13 ) then
118 Warnlog "'Load user setting with document' => changes not saved"
120 if DokumenteigenschaftenBearbeiten.IsChecked = lbSave ( 1 ) then
121 Warnlog "'Edit document properties before saving' => changes not saved"
123 if Sicherungskopie.IsChecked = lbSave ( 2 ) then
124 Warnlog "'Create backup copy' => changes not saved"
126 if AutomatischSpeichern.IsChecked = lbSave ( 3 ) then
127 printlog "AutoSave => changes not saved"
129 if AutomatischSpeichern.IsChecked then
130 if Minuten.GetText <> "23" then
131 Warnlog "Minutes for AutoSave => changes not saved"
134 if NoPrettyPrinting.IsChecked = lbSave ( 10 ) then
135 Warnlog "no pretty printing => changes not saved"
137 if URLimDateisystem.IsChecked = lbSave ( 11 ) then
138 Warnlog "URL: File system => changes not saved"
140 if URLimInternet.IsChecked = lbSave ( 12 ) then
141 Warnlog "URL: Internet => changes not saved"
144 printlog( "Verifying filters for documenttypes: Select third item from every list" )
146 Dokumenttyp.Select(i)
147 printlog( "Doctype: " & Dokumenttyp.getSelText() & " has filter: " & Filter.getSelText() )
149 if Filter.GetSelIndex <> 3 then
150 warnlog( "#i79150# some options in Tools/Options->Load/Save->General are not saved" )
154 '///make other changes
155 printlog " - make other changes"
156 BenutzerspezifischeEinstellungen.Uncheck
157 DokumenteigenschaftenBearbeiten.Check
158 Sicherungskopie.Uncheck
159 AutomatischSpeichern.Check
161 NoPrettyPrinting.Uncheck
162 URLimDateisystem.Uncheck
163 URLimInternet.Uncheck
165 Dokumenttyp.Select(i)
169 printlog " - close options-dlg with OK"
170 '///+close options dialog with OK
172 kontext "extrasoptionendlg"
176 '///+you must get for all applications a filter-changes-warning ( perhaps not for all )
177 printlog " - react on messageboxes for loosing settings after changing default-filters"
178 kontext "FilterWarning"
180 if FilterWarning.Exists(5) then
188 '///check second changes
189 printlog " - check second changes"
190 '///+open tools / options / load & save / general
192 hToolsOptions ( "LoadSave", "General" )
194 if BenutzerspezifischeEinstellungen.IsChecked <> FALSE then
195 Warnlog "'Load user setting with document' => changes not saved"
197 if DokumenteigenschaftenBearbeiten.IsChecked <> TRUE then
198 Warnlog "'Edit document properties before saving' => changes not saved"
200 if Sicherungskopie.IsChecked <> FALSE then
201 Warnlog "'Create backup copy' => changes not saved"
203 if AutomatischSpeichern.IsChecked <> TRUE then
204 Warnlog "AutoSave => changes not saved"
206 if Minuten.GetText <> "1" then
207 Warnlog "Minutes for AutoSave => changes not saved"
209 if NoPrettyPrinting.IsChecked <> FALSE then
210 Warnlog "no pretty printing => changes not saved"
212 if URLimDateisystem.IsChecked <> FALSE then
213 Warnlog "URL: File system => changes not saved"
215 if URLimInternet.IsChecked <> FALSE then
216 Warnlog "URL: Internet => changes not saved"
219 Dokumenttyp.Select(i)
220 if Filter.GetSelIndex <> 4 then
221 Warnlog "Document '" + Dokumenttyp.GetSelText + "': changes not saved"
225 '///reset to default settings
226 printlog " - reset to saved settings"
227 if lbSave ( 13 ) = FALSE then
228 BenutzerspezifischeEinstellungen.UnCheck else BenutzerspezifischeEinstellungen.Check
230 if lbSave ( 1 ) = FALSE then
231 DokumenteigenschaftenBearbeiten.UnCheck else DokumenteigenschaftenBearbeiten.Check
233 if lbSave ( 2 ) = FALSE then
234 Sicherungskopie.Uncheck else Sicherungskopie.Check
236 AutomatischSpeichern.Check
237 Minuten.SetText lsSave ( 1 )
238 if lbSave ( 3 ) = FALSE then
239 AutomatischSpeichern.Uncheck else AutomatischSpeichern.Check
241 if lbSave ( 10 ) = FALSE then
242 NoPrettyPrinting.Uncheck else NoPrettyPrinting.Check
244 if lbSave ( 11 ) = FALSE then
245 URLimDateisystem.UnCheck else URLimDateisystem.Check
247 if lbSave ( 12 ) = FALSE then
248 URLimInternet.UnCheck else URLimInternet.Check
251 Dokumenttyp.Select(i)
252 if Dokumenttyp.GetSelText <> lsSave ( 2 + i ) then
253 Warnlog "The sorting of the document-listbox has been changed!"
255 Filter.Select(lsSave(2+AppCount+i))
258 '///+close options dialog with OK
259 kontext "ExtrasOptionenDlg"
264 printlog " - check settings"
265 '///+open tools / options / load & save / general
267 hToolsOptions ( "LoadSave", "General" )
269 if BenutzerspezifischeEinstellungen.IsChecked <> lbSave ( 13 ) then
270 Warnlog "'Load user setting with document' => changes not saved"
272 if DokumenteigenschaftenBearbeiten.IsChecked <> lbSave ( 1 ) then
273 Warnlog "'Edit document properties before saving' => changes not saved"
275 if Sicherungskopie.IsChecked <> lbSave ( 2 ) then
276 Warnlog "'Create backup copy' => changes not saved"
278 if AutomatischSpeichern.IsChecked <> lbSave ( 3 ) then
279 Warnlog "AutoSave => changes not saved"
281 if AutomatischSpeichern.IsChecked then
282 if Minuten.GetText <> lsSave( 1 ) then
283 Warnlog "Minutes for AutoSave => changes not saved"
286 if NoPrettyPrinting.IsChecked <> lbSave ( 10 ) then
287 Warnlog "no pretty printing => changes not saved"
289 if URLimDateisystem.IsChecked <> lbSave ( 11 ) then
290 Warnlog "URL: File system => changes not saved"
292 if URLimInternet.IsChecked <> lbSave ( 12 ) then
293 Warnlog "URL: Internet => changes not saved"
296 Dokumenttyp.Select(i)
297 if Dokumenttyp.GetSelText <> lsSave ( 2 + i ) then
298 Warnlog "The sorting of the document-listbox has been changed!"
300 if Filter.GetSelText <> lsSave ( 2 + AppCount + i ) then
301 Warnlog "Document '" + Dokumenttyp.GetSelText + "': changes not saved"
305 '///+close options dialog with OK
306 kontext "extrasoptionendlg"