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: c_upd_toolsmenu2.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 08:06:07 $
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 : oliver.craemer@sun.com
36 '* short description : Resource Test - Tools Menu Part II
38 '************************************************************************
41 ' #1 tToolsExtensionManager
42 ' #1 tToolsXMLFilterSettings
47 '\***********************************************************************
51 Printlog Chr(13) + "--------- Tools Menu Part II (c_upd_toolsmenu2.inc) ---------"
55 call tToolsExtensionManager
56 call tToolsXMLFilterSettings
63 '-----------------------------------------------------------
66 '///<u><b>Tools - Macro</b></u>
68 Dim iWhichSecurityLevel as integer
69 printlog " Set SecurityLevel to low and remember starting value"
70 iWhichSecurityLevel = hSetMacroSecurity(0)
72 '/// Open new Spreadsheet document
73 printlog " Open new Spreadsheet document"
75 '/// Record macro by 'Tools – Macro – Record'
76 printlog " Record macro by 'Tools – Macro – Record'"
77 ' ToolsMacroRecordMacro
79 '/// Close macro recording by clicking 'Stop Recording'
80 printlog " Close macro recording by clicking 'Stop Recording'"
82 '/// Open 'Macro Selector' dialog by 'Tools – Macro – Run'
83 printlog " Open 'Macro Selector' dialog by 'Tools – Macro – Run'"
85 Kontext "ScriptSelector"
86 Call DialogTest ( ScriptSelector )
87 '/// Close 'Macro Selector' dialog with 'Cancel
88 printlog " Close 'Macro Selector' dialog with 'Cancel"
90 '/// Open Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'
91 printlog " Open Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'"
94 Call DialogTest ( Makro )
95 '/// Click on 'Assign' button
96 printlog " Click on 'Assign' button"
99 Active.SetPage TabCustomizeMenu
100 Kontext "TabCustomizeMenu"
101 '/// Close 'Customize' dialog with 'Cancel'
102 printlog " Close 'Customize' dialog with 'Cancel'"
103 TabCustomizeMenu.Cancel
105 '/// Click on 'Edit' button
106 printlog " Click on 'Edit' button"
108 '/// Close basic window by window closer
109 printlog " Close basic window by window closer"
112 '/// Reopen Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'
113 printlog " Reopen Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'"
116 '/// Click on 'Delete' button
117 printlog " Click on 'Delete' button"
119 '/// Close messagebox by 'No'
120 printlog " Close messagebox by 'No'"
122 if Active.exists then
126 '/// Click on Organizer' button
127 printlog " Click on Organizer' button"
130 Active.SetPage TabModule
132 '/// Close 'Organizer with 'Close'
133 printlog " Close 'Organizer with 'Close'"
136 '/// Close macro dialog
137 printlog " Close macro dialog"
139 '/// Open 'JavaScript Macros' dialog by 'Tools – Macro – Organize Macros – JavaScript'
140 printlog " Open 'JavaScript Macros' dialog by 'Tools – Macro – Organize Macros – JavaScript'"
141 ToolsMacrosOrganizeMacrosJavaScript
142 Kontext "ScriptOrganizer"
143 '/// Close 'JavaScript Macros' dialog by 'Close'
144 printlog " Close 'JavaScript Macros' dialog by 'Close'"
145 ScriptOrganizer.Close
146 '/// Open 'BeanShell Macros' dialog by 'Tools – Macro – Organize Macros – BeanShell'
147 printlog " Open 'BeanShell Macros' dialog by 'Tools – Macro – Organize Macros – BeanShell'"
148 ToolsMacrosOrganizeMacrosBeanShell
149 Kontext "ScriptOrganizer"
150 '/// Close ' BeanShell Macros' dialog by 'Close'
151 printlog " Close ' BeanShell Macros' dialog by 'Close'"
152 ScriptOrganizer.Close
154 printlog " Open testdocument 'gTesttoolPath + spreadsheet\required\input\DocwithMacro.ods'"
155 Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\DocwithMacro.ods" ))
157 if Active.exists then
160 Printlog " Save document as 'user/work/DocwithMacro.ods'"
161 Call hFileSaveAsKill convertpath(gOfficePath & "user/work/DocwithMacro.ods")
162 printlog " Use 'Tools – Macro – Signature'"
164 Kontext "DigitalSignature"
165 Call DialogTest ( DigitalSignature )
166 '/// On 'Digital Signatures' dialog press 'Add' button
167 printlog " On 'Digital Signatures' dialog press 'Add' button"
169 Kontext "SelectCertificate"
170 Call DialogTest ( SelectCertificate )
171 '/// Close Select Certificate' dialog with 'Cancel'
172 printlog " Close Select Certificate' dialog with 'Cancel'"
173 SelectCertificate.Cancel
174 Kontext "DigitalSignature"
175 '/// Close 'Digital Signatures' dialog with 'Cancel'
176 printlog " Close 'Digital Signatures' dialog with 'Cancel'"
177 DigitalSignature.Cancel
178 '/// Open 'Macro Organizer' by 'Tools – Macro – Organize Dialogs'
179 printlog " Open 'Macro Organizer' by 'Tools – Macro – Organize Dialogs'"
180 ToolsMacrosOrganizeDialogs
181 '/// Switch to tabpage 'Modules'
182 printlog " Switch to tabpage 'Modules'"
184 Active.SetPage TabModule
186 Call DialogTest ( TabModule )
187 '/// Switch to tabpage 'Dialogs'
188 printlog " Switch to tabpage 'Dialogs'"
190 Active.SetPage TabDialogs
192 Call DialogTest ( TabDialogs )
193 '/// Switch to tabpage 'Libraries'
194 printlog " Switch to tabpage 'Libraries'"
196 Active.SetPage TabBibliotheken
197 Kontext "TabBibliotheken"
198 Call DialogTest ( TabBibliotheken )
199 '/// Close dialog with 'Close'
200 printlog " Close dialog with 'Close'"
201 TabBibliotheken.Close
203 printlog " Close document"
205 printlog " Reset SecurityLevel to starting value"
206 Call hSetMacroSecurity(iWhichSecurityLevel)
210 '-----------------------------------------------------------
212 testcase tToolsExtensionManager
213 '///<u><b>Tools - Extension Manager</b></u>
215 '/// Open new Spreadsheet document
216 printlog " Open new Spreadsheet document"
218 '/// Open 'Extension Manager' by 'Tools – Extension Manager'
219 printlog " Open 'Extension Manager' by 'Tools – Extension Manager'"
221 Kontext "PackageManager"
222 Call DialogTest ( PackageManager )
223 '/// Close 'Extension Manager' with 'Close'
224 printlog " Close 'Extension Manager' with 'Close'"
227 printlog " Close document"
232 '-----------------------------------------------------------
234 testcase tToolsXMLFilterSettings
235 '///<u><b>Tools - XML Filter Settings</b></u>
237 '/// Open new Spreadsheet document
238 printlog " Open new Spreadsheet document"
240 '/// Open 'XML Filter Settings' dialog by 'Tools – XML Filter Settings'
241 printlog " Open 'XML Filter Settings' dialog by 'Tools – XML Filter Settings'"
242 ToolsXMLFilterSettings
243 Kontext "XMLFilterSettings"
244 Call DialogTest ( XMLFilterSettings )
245 '/// Close dialog with 'Close'
246 printlog " Close dialog with 'Close'"
249 printlog " Close document"
254 '-----------------------------------------------------------
256 testcase tToolsCustomize
257 '///<u><b>Tools - Customize</b></u>
259 '/// Open new Spreadsheet document
260 printlog " Open new Spreadsheet document"
262 '/// Open 'Customize' dialog by 'Tools – Customize'
263 printlog " Open 'Customize' dialog by 'Tools – Customize'"
265 '/// Switch to tabpage 'Menus'
266 printlog " Switch to tabpage 'Menus'"
268 Active.SetPage TabCustomizeMenu
269 Kontext "TabCustomizeMenu"
270 Call DialogTest ( TabCustomizeMenu )
271 '/// Switch to tabpage 'Keyboard'
272 printlog " Switch to tabpage 'Keyboard'"
274 Active.SetPage TabTastatur
275 Kontext "TabTastatur"
276 Call DialogTest ( TabTastatur )
277 '/// Switch to tabpage 'Toolbars'
278 printlog " Switch to tabpage 'Toolbars'"
280 Active.SetPage TabCustomizeToolbars
281 Kontext "TabCustomizeToolbars"
282 Call DialogTest ( TabCustomizeToolbars )
283 '/// Switch to tabpage 'Events'
284 printlog " Switch to tabpage 'Events'"
286 Active.SetPage TabCustomizeEvents
287 Kontext "TabCustomizeEvents"
288 Call DialogTest ( TabCustomizeEvents )
289 '/// Close 'Customize' dialog with 'Cancel'
290 printlog " Close 'Customize' dialog with 'Cancel'"
291 TabCustomizeEvents.Cancel
293 printlog " Close document"
298 '-----------------------------------------------------------
300 testcase tToolsOptions
301 '///<u><b>Tools - Options</b></u>
303 '/// Open new Spreadsheet document
304 printlog " Open new Spreadsheet document"
306 '/// Open 'Options' dialog by 'Tools – Options'
307 printlog " Open 'Options' dialog by 'Tools – Options'"
309 '/// Choose 'Calc – General'
310 printlog " Choose 'Calc – General'"
311 hToolsOptions("CALC", "GENERAL")
312 Call DialogTest ( TabLayoutCalc )
313 '/// Verify that the 'Measurement' combobox has items
314 printlog " Verify that the 'Measurement' combobox has items"
315 if Masseinheit.GetItemCount < 1 then
316 warnlog "The listbox is empty"
318 '/// Increase 'Tab stops'
319 printlog " Increase 'Tab stops'"
321 '/// Verify that the 'Move selection' combobox has four items
322 printlog " Verify that the 'Move selection' combobox has four items"
323 If SelektionNach.GetItemCount <> 4 then
324 warnlog "There are not 4 moves possible"
326 '/// Choose 'Calc – View'
327 printlog " Choose 'Calc – View'"
328 hToolsOptions("CALC", "VIEW")
329 Call DialogTest ( TabInhaltCalc )
330 '/// Verify that the 'Color' combobox has items
331 printlog " Verify that the 'Color' combobox has items"
332 if Farbe.GetItemCount < 1 then
333 warnlog "The listbox is empty"
335 '/// Verify that the 'Objects' combobox has items
336 printlog " Verify that the 'Objects' combobox has items"
337 if ObjekteGrafiken.GetItemCount < 1 then
338 warnlog "The listbox is empty"
340 '/// Verify that the 'Charts' combobox has items
341 printlog " Verify that the 'Charts' combobox has items"
342 if Diagramme.GetItemCount < 1 then
343 warnlog "The listbox is empty"
345 '/// Verify that the 'Drawing objects' combobox has items
346 printlog " Verify that the 'Drawing objects' combobox has items"
347 if Zeichenobjekte.GetItemCount < 1 then
348 warnlog "The listbox is empty"
350 '/// Choose 'Calc – Calculate'
351 printlog " Choose 'Calc – Calculate'"
352 hToolsOptions("CALC", "CALCULATE")
353 Call DialogTest ( TabBerechnen )
354 '/// Choose 'Calc – Sortlists'
355 printlog " Choose 'Calc – Sortlists'"
356 hToolsOptions("CALC", "SORTLISTS")
357 Call DialogTest ( TabSortierlisten )
358 '/// Verify that there are sortlists available
359 printlog " Verify that there are sortlists available"
360 if Listen.GetItemCount < 1 then
361 warnlog "The listbox is empty"
363 '/// Choose 'Calc – Changes'
364 printlog " Choose 'Calc – Changes'"
365 hToolsOptions("CALC", "CHANGES")
366 Call DialogTest ( TabAenderungenCalc )
367 '/// Verify that the 'Changes' combobox has items
368 printlog " Verify that the 'Changes' combobox has items"
369 if Aenderungen.GetItemCount < 1 then
370 warnlog "The listbox is empty"
372 '/// Choose 'Calc – Grid'
373 printlog " Choose 'Calc – Grid'"
374 hToolsOptions("CALC", "GRID")
375 Call DialogTest ( TabRaster )
376 '/// Decrease 'Horizontal Resolution'
377 printlog " Decrease 'Horizontal Resolution'"
378 RasterAufloesungXAchse.Less
379 '/// Increase 'Horizontal Subdivision'
380 printlog " Increase 'Horizontal Subdivision'"
381 RasterUnterteilungXAchse.More
382 '/// Choose 'Calc – Print'
383 printlog " Choose 'Calc – Print'"
384 hToolsOptions("CALC", "PRINT")
385 Call DialogTest ( TabPrintCalcOptions )
386 '/// Close 'Options' dialog with 'Cancel'
387 printlog " Close 'Options' dialog with 'Cancel'"
388 Kontext "OptionenDlg"
391 printlog " Close document"
396 '-----------------------------------------------------------
398 testcase tToolsSolver
399 '///<u><b>Tools - Solver</b></u>
403 '/// Open new Spreadsheet document
404 printlog " Open new Spreadsheet document"
406 '/// Open 'Solver' dialog by 'Tools - Solver'
407 printlog " Open 'Solver' dialog by 'Tools - Solver'"
411 qaerrorlog "Solver not available. This is true for versions older than SRC680_m246"
416 DialogTest ( Solver )
417 '/// Enter A1 for 'TargetCell'
418 printlog " Enter A1 for 'TargetCell'"
419 TargetCell.SetText "A1"
420 '/// Press 'Shrink' button for 'Target cell'
421 printlog " Press 'Shrink' button for 'Target cell'"
423 '/// On minimized dialog press 'Shrink' button again
424 printlog " On minimized dialog press 'Shrink' button again"
426 '/// Select 'Maximum'
427 printlog " Select 'Maximum'"
428 OptimizeMaximum.Check
429 '/// Select 'Minimum'
430 printlog " Select 'Minimum'"
431 OptimizeMinimum.Check
432 '/// Select 'Value of'
433 printlog " Select 'Value of'"
434 OptimizeValueOf.Check
435 '/// Minimize dialog by pressing 'Shrink' button for 'Value of'
436 printlog " Minimize dialog by pressing 'Shrink' button for 'Value of'"
437 OptimizeValueEditShrink.Click
438 '/// On minimized dialog press 'Shrink' button again
439 printlog " On minimized dialog press 'Shrink' button again"
440 OptimizeValueEditShrink.Click
441 '/// Minimize dialog by pressing 'Shrink' button for 'By changing cells'
442 printlog " Minimize dialog by pressing 'Shrink' button for 'By changing cells'"
443 ChangingCellsShrink.Click
444 '/// On minimized dialog press 'Shrink' button again
445 printlog " On minimized dialog press 'Shrink' button again"
446 ChangingCellsShrink.Click
447 '/// Enter 'A2' in edit box for 'Cell reference 1'
448 printlog " Enter 'A2' in edit box for 'Cell reference 1'"
449 CellReference1.SetText "A2"
450 '/// Minimize dialog by pressing 'Shrink' button for 'Cell reference 1'
451 printlog " Minimize dialog by pressing 'Shrink' button for 'Cell reference 1'"
452 CellReferenceShrink1.Click
453 '/// On minimized dialog press 'Shrink' button again
454 printlog " On minimized dialog press 'Shrink' button again"
455 CellReferenceShrink1.Click
456 '/// Verify that there are 'Operators' available
457 printlog " Verify that there are 'Operators' available"
458 If Operator1.GetItemCount < 1 then
459 warnlog "There are no operators available"
461 '/// Minimize dialog by pressing 'Shrink' button for 'Value 1'
462 printlog " Minimize dialog by pressing 'Shrink' button for 'Value 1'"
464 '/// On minimized dialog press 'Shrink' button again
465 printlog " On minimized dialog press 'Shrink' button again"
467 '/// Press 'Remove' button
468 printlog " Press 'Remove' button"
470 '/// Press 'Options' button
471 printlog " Press 'Options' button"
473 Kontext "SolverOptions"
474 DialogTest ( SolverOptions )
475 '/// On 'Options' dialog verify that there is min 1 'Solver engine' available
476 printlog " On 'Options' dialog verify that there is min 1 'Solver engine' available"
477 If SolverEngine.GetItemCount < 1 then
478 warnlog "There is no SolverEngine available"
480 '/// Check for 'Settings' which enables the edit button (e.g.Epsilon level)
481 printlog " Check for 'Settings' which enables the edit button (e.g.Epsilon level)"
482 For i = 1 to SolverSettings.GetItemCount
483 SolverSettings.Select i
484 if SolverSettingsEdit.IsEnabled then
485 i = SolverSettings.GetItemCount
488 If not SolverSettingsEdit.IsEnabled then
489 warnlog "Edit is not enabled"
496 '/// Click 'Edit' button to open 'Edit Setting' dialog
497 printlog " Click 'Edit' button to open 'Edit Setting' dialog"
498 SolverSettingsEdit.Click
499 Kontext "SolverEditSetting"
500 DialogTest ( SolverEditSetting )
502 '/// Increase 'Epsilon level'
503 printlog " Increase 'Epsilon level'"
505 '/// Close 'Edit Setting' dialog by 'Cancel'
506 printlog " Close 'Edit Setting' dialog by 'Cancel'"
507 SolverEditSetting.Cancel
508 Kontext "SolverOptions"
509 '/// Close 'Options' dialog by 'Cancel'
510 printlog " Close 'Options' dialog by 'Cancel'"
512 '/// Close 'Solver' dialog by 'Close'
513 printlog " Close 'Solver' dialog by 'Close'"
517 printlog " Close document"
522 '-----------------------------------------------------------