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_ooo_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 : joerg.skottke@sun.com
36 '* short description : 1. test for general group userdata ... view)
38 '\******************************************************************************
43 dim lsSave (4) as String
44 dim lbSave (3) as Boolean
46 '///short test if 'StarOffice / General' is saved in configuration
48 '///<li>open a new document</li>
51 '///<li>open options 'StarOffice' / 'General'</li>
53 hToolsOptions ( "StarOffice", "General" )
55 '///<li>save old data</li>
56 printlog " - save old data"
57 lsSave ( 1 ) = Zweistellig.GetText
58 lbSave ( 1 ) = Aktivieren.IsChecked
60 if gPlatgroup = "w95" then
61 lbSave (2) = StarOfficeDialogeBenutzen.IsChecked
63 lbSave ( 3 ) = DruckenStatus.IsChecked
64 lsSave ( 3 ) = StyleSheet.GetSelText
66 '///<li>invert/change data</li>
67 printlog " - invert/change data"
68 Zweistellig.SetText "1950"
70 if gPlatgroup = "w95" then
71 if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Uncheck else StarOfficeDialogeBenutzen.Check
73 If lbSave ( 3 ) = TRUE then DruckenStatus.Uncheck else DruckenStatus.Check
76 '///<li>close options-dialog with OK</li>
77 Kontext "ExtrasOptionenDlg"
81 '///<li>close document</li>
84 '///<li>exit/restart StarOffice</li>
85 printlog " - exit/restart StarOffice"
88 '///<li>open options 'StarOffice' / 'General'</li>
89 printlog " - check data"
91 hToolsOptions ( "StarOffice", "General" )
93 '///<li>check data</li>
94 if Zweistellig.GetText <> "1950" then Warnlog "Year ( 2 digits ) => changes not saved: '" + Zweistellig.GetText +"' #i29810"
95 if Aktivieren.IsChecked <> TRUE then Warnlog "Enable HelpAgent => changes not saved"
97 if gPlatgroup = "w95" then
98 if StarOfficeDialogeBenutzen.IsChecked = lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
100 If DruckenStatus.IsChecked = lbSave ( 3 ) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
102 '///<li>make 2. changes</li>
103 printlog " - 2. change data"
104 Zweistellig.SetText "1800"
105 DruckenStatus.UnCheck
107 '///<li>close options-dialog with OK</li>
108 Kontext "ExtrasOptionenDlg"
112 '/// Check Issue i52248 Modify flag is set after printing though option is not set ///'
113 'It's a little tricky to reproduce.
114 if gPlatgroup = "unx" then
118 if DruckenDLG.exists(5) then
119 if gPlatform <> "osx" then
122 active.setPage TabSPAPaper
123 Kontext "TabSPAPaper"
124 if TabSPAPaper.exists (5) then
128 qaErrorlog "Properties of Printer didn't come up."
135 if active.exists(5) then
136 printlog "active: printing failed? '" + active.gettext + "'"
141 qaErrorlog "#i52248# Modify flag is set after printing though option is not set."
142 kontext "SpeichernDlg"
143 if SpeichernDlg.exists(5) then
147 printlog "#i52248# doesn't come up."
150 qaErrorLog "No printer available - resuming."
152 if active.exists(5) then
153 printlog active.getText
160 '///<li>open options 'StarOffice' / 'General'</li>
161 printlog " - check data"
163 hToolsOptions ( "StarOffice", "General" )
165 '///<li>check data</li>
166 if Zweistellig.GetText <> "1800" then Warnlog "Year ( 2 digits ) => changes not saved : '" + Zweistellig.GetText +"'"
167 If DruckenStatus.IsChecked <> FALSE then Warnlog "Printing sets 'Document modified' status => changes not saved!"
168 if StyleSheet.GetSelIndex <> 3 then Warnlog "Style sheet for StarOffice Help => changes not saved!"
170 '///<li>reset to saved data</li>
171 printlog " - reset to saved data"
172 Zweistellig.SetText lsSave ( 1 )
175 if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
176 if gPlatgroup = "w95" then
177 if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
179 If lbSave(3)= TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
180 StyleSheet.Select lsSave(3)
182 '///<li>close options-dialog with OK</li>
183 Kontext "ExtrasOptionenDlg"
187 '///<li>open options 'StarOffice' / 'General'</li>
189 hToolsOptions ( "StarOffice", "General" )
191 '///<li>check data</li>
192 printlog " - check the reset data"
193 if Zweistellig.GetText <> lsSave ( 1 ) then Warnlog "Year ( 2 digits ) => changes not saved"
194 if Aktivieren.IsChecked <> lbSave (1) then Warnlog "Enable HelpAgent => changes not saved"
197 if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
198 if gPlatgroup = "w95" then
199 if StarOfficeDialogeBenutzen.IsChecked <> lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
201 If DruckenStatus.IsChecked <> lbSave(3) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
202 if StyleSheet.GetSelText <> lsSave (3) then Warnlog "Style sheet for StarOffice Help => changes not saved!"
204 '///<li>close options-dialog with OK</li>
205 Kontext "ExtrasOptionenDlg"