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_memory.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 '\******************************************************************************
42 Dim lsSave (7) as String
46 dim bHasQuickstarter as boolean
48 '///short test if 'StarOffice / Momory' is saved in configuration
49 '///open a new document
50 '///open options 'StarOffice' / 'Memory'
53 hToolsOptions ( "StarOffice", "Memory" )
55 '///check platform dependences
56 '///- 'Load StarOffice at system-startup' has to exist
57 printlog " - check platform dependences "
59 if ( LoadQuickstarter.exists() and LoadQuickstarter.isVisible() and LoadQuickstarter.isEnabled() ) then
60 bHasQuickstarter = TRUE
61 printlog( "Quickstarter is available" )
63 bHasQuickstarter = FALSE
64 printlog( "Quickstarter is NOT available on this platform" )
68 printlog " - save old data"
69 lsSave(1) = UndoSteps.GetText
70 lsSave(2) = StarOffice.GetText
71 lsSave(3) = MemoryPerObject.GetText
72 lsSave(4) = RemoveFromMemoryAfter.GetText
73 lsSave(5) = NumberOfObjects.GetText
74 if ( bHasQuickstarter ) then
75 lbSave = LoadQuickstarter.IsChecked
78 '///invert/change data
79 printlog " - invert/change data"
80 UndoSteps.SetText "80"
81 StarOffice.SetText "50"
82 if Instr ( lsSave(3), "," ) <> 0 then
87 MemoryPerObject.SetText sValue
88 RemoveFromMemoryAfter.SetText "00:41"
89 NumberOfObjects.SetText "81"
90 if ( bHasQuickstarter ) then
91 LoadQuickstarter.UnCheck
94 '///close options-dialog with OK
95 Kontext "ExtrasOptionenDlg"
102 '///exit/restart StarOffice
103 printlog " - exit/restart StarOffice"
106 '///open options 'StarOffice' / 'Memory'
107 printlog " - check data"
109 hToolsOptions ( "StarOffice", "Memory" )
112 if UndoSteps.GetText <> "80" then
113 Warnlog "Undo steps => changes not saved!"
115 if StarOffice.GetText <> "50" then
116 Warnlog "Use For StarOffice => changes not saved!"
118 if MemoryPerObject.GetText <> sValue then
119 Warnlog "Memory per object => changes not saved! => " + MemoryPerObject.GetText
121 if RemoveFromMemoryAfter.GetText <> "00:41" then
122 Warnlog "Remove from memory after => changes not saved! =>" + RemoveFromMemoryAfter.GetText
124 if NumberOfObjects.GetText <> "81" then
125 Warnlog "Number of objects => changes not saved!"
127 if ( bHasQuickstarter ) then
128 if LoadQuickstarter.IsEnabled then
129 if LoadQuickstarter.IsChecked = TRUE then
130 Warnlog "Load StarOffice during system-startup => changes not saved!"
136 printlog " - 2. change data"
137 UndoSteps.SetText "5"
138 StarOffice.SetText "11"
139 if Instr ( lsSave(3), "," ) <> 0 then
144 MemoryPerObject.SetText sValue
145 RemoveFromMemoryAfter.SetText "01:32"
146 NumberOfObjects.SetText "2"
147 if ( bHasQuickstarter ) then
148 LoadQuickstarter.Check
151 '///close options-dialog with OK
152 Kontext "ExtrasOptionenDlg"
155 '///open options 'StarOffice' / 'Memory'
156 printlog " - check data"
158 hToolsOptions ( "StarOffice", "Memory" )
161 if UndoSteps.GetText <> "5" then
162 Warnlog "Undo steps => changes not saved!"
164 if StarOffice.GetText <> "11" then
165 Warnlog "Use For StarOffice => changes not saved!"
167 if MemoryPerObject.GetText <> sValue then
168 Warnlog "Memory per object => changes not saved! => " + MemoryPerObject.GetText
170 if RemoveFromMemoryAfter.GetText <> "01:32" then
171 Warnlog "Remove from memory after => changes not saved! => " + RemoveFromMemoryAfter.GetText
173 if NumberOfObjects.GetText <> "2" then
174 Warnlog "Number of objects => changes not saved!"
176 if ( bHasQuickstarter ) then
177 if LoadQuickstarter.IsChecked <> TRUE then
178 Warnlog "Load StarOffice during system-startup => changes not saved!"
182 '///reset to saved data
183 printlog " - reset to saved data"
184 UndoSteps.SetText lsSave(1)
185 StarOffice.SetText lsSave(2)
186 MemoryPerObject.SetText lsSave(3)
187 RemoveFromMemoryAfter.SetText lsSave(4)
188 NumberOfObjects.SetText lsSave(5)
190 if ( bHasQuickstarter ) then
191 if lbSave = TRUE then
192 LoadQuickstarter.Check else LoadQuickstarter.UnCheck
196 '///close options-dialog with OK
197 Kontext "ExtrasOptionenDlg"
200 '///open options 'StarOffice' / 'Memory'
202 hToolsOptions ( "StarOffice", "Memory" )
205 printlog " - check the reset data"
206 if UndoSteps.GetText <> lsSave(1) then
207 Warnlog "Undo steps => changes not saved!"
209 if StarOffice.GetText <> lsSave(2) then
210 Warnlog "Use For StarOffice => changes not saved!"
212 if MemoryPerObject.GetText <> lsSave(3) then
213 Warnlog "Memory per object => changes not saved! => " + MemoryPerObject.GetText
215 if RemoveFromMemoryAfter.GetText <> lsSave(4) then
216 Warnlog "Remove from memory after => changes not saved! =>" + RemoveFromMemoryAfter.GetText
218 if NumberOfObjects.GetText <> lsSave(5) then
219 Warnlog "Number of objects => changes not saved!"
221 if ( bHasQuickstarter ) then
222 if LoadQuickstarter.IsChecked <> lbSave then
223 Warnlog "Load StarOffice during system-startup => changes not saved!"
227 '///close options-dialog with OK
228 Kontext "ExtrasOptionenDlg"