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_so_5.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 : general option test
38 '\******************************************************************************
41 testcase func_StarOfficeView_3
45 Dim xPos, yPos as Integer
47 '///StarOffice / View => 'Buttons' ( flat/3D-buttons, large/normal )
51 '///+open a new writer doc
54 '///+save the sizes of the writer doc
55 Kontext "DocumentWriter"
56 xPos = DocumentWriter.getSizeX
57 yPos = DocumentWriter.getSizeY
59 '///+open tools/options/staroffice/view
61 hToolsOptions ( "StarOffice", "View" )
63 '///+save the default settings for 'large buttons' and 'flat buttons'
64 iSave = IconScale.getSelIndex()
66 '///+select 'large buttons'
67 printlog " - set buttonsize to 'large'"
70 '///+click OK for the options dialog
71 Kontext "ExtrasOptionenDlg"
75 '///+check if the buttons in the toolbars are bigger ( testtool : comparison between the sizes before and after the changes )
76 Kontext "DocumentWriter"
77 if DocumentWriter.getSizeX = xPos AND DocumentWriter.getSizeY = yPos then
78 warnlog "Perhaps the buttons are not large!"
81 '///+open tools/options/staroffice/view
83 hToolsOptions ( "StarOffice", "View" )
85 '///+select buttonsize 'small'
86 printlog " - set buttonsize to 'small'"
89 '///+click OK for the options dialog
90 Kontext "ExtrasOptionenDlg"
94 '///+check if the buttons in the toolbars are normal ( testtool : comparison between the saved sizes before the changes )
95 Kontext "DocumentWriter"
96 if DocumentWriter.getSizeX <> xPos OR DocumentWriter.getSizeY <> yPos then
97 warnlog "Perhaps the buttons are not small!"
100 '///+open tools/options/staroffice/view
102 hToolsOptions ( "StarOffice", "View" )
104 '///+set 'Icon Size' back to the default
105 printlog " - large buttons => default"
107 IconScale.Select( iSave )
110 '///+click OK for the options dialog
111 Kontext "ExtrasOptionenDlg"
115 '///+close the writer doc
119 '*******************************************************************************
121 testcase func_StarOfficeView_4
122 Dim bSave ( 10 ) as Boolean
123 Dim i as Integer, iCount as Integer
125 '///StarOffice / View => 'Options'
127 printlog " - options"
129 '///open a new writer doc
132 '///+open tools / options / StarOffice / View
133 '///+save settings for all 'options'
135 hToolsOptions ( "StarOffice", "View" )
136 bSave(4) = VorschauInSchriftlisten.IsChecked
137 bSave(6) = SchriftenHistorie.IsChecked
139 '///<b>inactive menu items</b>
140 printlog " - inactive menu items : => check"
141 '///+click OK for the options dialog
142 Kontext "ExtrasOptionenDlg"
146 '///+open the context menu on a writer doc and save the number of menu items
147 Kontext "DocumentWriter"
148 DocumentWriter.OpenContextMenu
149 iCount = hMenuItemGetCount
153 '///+open tools / options / StarOffice / View
155 hToolsOptions ( "StarOffice", "View" )
156 printlog " - inactive menu items : => uncheck"
157 '///+click OK for the options dialog
158 Kontext "ExtrasOptionenDlg"
162 '///+open the context menu on a writer doc and compare the number of menu items with the numbers before
163 '///+ the behaviour changed: the checkbox in the options does not affect the context menu! ///'
164 Kontext "DocumentWriter"
165 DocumentWriter.OpenContextMenu
166 if hMenuItemGetCount <> iCount then
167 Warnlog "The number of entries at the context menu on a writer doc is NOT the same at 'show inactive' is checked or not => BUG!"
172 '///<b>single line tab headings</b>
173 '///+open tools / options / StarOffice / View
175 hToolsOptions ( "StarOffice", "View" )
176 printlog " - preview in fontlist : => Uncheck"
177 '///check 'preview in fontlist'
178 VorschauInSchriftlisten.Check
179 '///+click OK for the options dialog
180 Kontext "ExtrasOptionenDlg"
184 '///+select all Fonts in the fontlist in object bar => testtool cannot check if the preview is shown
185 Kontext "textobjectbar"
186 if textobjectbar.exists then
187 for i=1 to Schriftart.GetItemCount
191 warnlog "No Textobjectbar?"
194 '///+open tools / options / StarOffice / View
196 hToolsOptions ( "StarOffice", "View" )
197 printlog " - preview in fontlist : => check"
198 '///uncheck 'preview in fontlist'
199 VorschauInSchriftlisten.UnCheck
200 '///+click OK for the options dialog
201 Kontext "ExtrasOptionenDlg"
205 '///+select all Fonts in the fontlist in object bar => testtool cannot check if the preview is not shown
206 Kontext "textobjectbar"
207 for i=1 to Schriftart.GetItemCount
211 '///<b>font history</b>
212 '///+open tools / options / StarOffice / View
214 hToolsOptions ( "StarOffice", "View" )
215 if bSave(4) = TRUE then VorschauInSchriftlisten.Check else VorschauInSchriftlisten.UnCheck
216 '///reset 'preview in fontlist' to default
217 printlog " - font history : => Uncheck"
218 '///check 'font history'
219 SchriftenHistorie.Check
220 '///+click OK for the options dialog
221 Kontext "ExtrasOptionenDlg"
225 '///+select all Fonts in the fontlist in object bar => testtool cannot check if font history is not shown
226 Kontext "textobjectbar"
227 for i=1 to Schriftart.GetItemCount
231 '///+open tools / options / StarOffice / View
233 hToolsOptions ( "StarOffice", "View" )
234 printlog " - font history : => check"
235 '///uncheck 'font history'
236 SchriftenHistorie.UnCheck
237 '///+click OK for the options dialog
238 Kontext "ExtrasOptionenDlg"
242 '///+select all Fonts in the fontlist in object bar => testtool cannot check if font history is not shown
243 Kontext "textobjectbar"
244 for i=1 to Schriftart.GetItemCount
248 '///+open tools / options / StarOffice / View
250 hToolsOptions ( "StarOffice", "View" )
251 '///reset 'font history' to default
252 if bSave(6) = TRUE then SchriftenHistorie.Check else SchriftenHistorie.UnCheck
253 '///+click OK for the options dialog
254 Kontext "ExtrasOptionenDlg"
258 '///close the writer document
263 '*******************************************************************************
265 testcase func_StarOfficeView_5
267 '///StarOffice / View => '3D'
268 Dim bSave ( 5 ) as Boolean
272 printlog " - 3D-view"
274 '///<b>disable OpenGL</b>
275 '///+open tools / options / StarOffice / View
276 '///+save all settings for OpenGL
277 printlog " - use OpenGL => Uncheck"
279 hToolsOptions ( "StarOffice", "View" )
280 bSave (1) = OpenGL.IsChecked
281 bSave (2) = OptimierteAusgabe.IsChecked
285 '///+click OK for the options dialog
286 Kontext "ExtrasOptionenDlg"
290 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
293 printlog " - use OpenGL => Check + optimized output => UnCheck"
294 '///<b>enable OpenGL and disable optimized output</b>
295 '///+open tools / options / StarOffice / View
297 hToolsOptions ( "StarOffice", "View" )
298 '///+check 'OpenGL' and uncheck 'optimized output'
300 OptimierteAusgabe.Uncheck
301 '///+click OK for the options dialog
302 Kontext "ExtrasOptionenDlg"
306 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
309 printlog " - use OpenGL => Check + optimized output => Check"
310 '///<b>enable OpenGL and enable optimized output</b>
311 '///+open tools / options / StarOffice / View
313 hToolsOptions ( "StarOffice", "View" )
314 '///+check 'OpenGL' and check 'optimized output'
316 OptimierteAusgabe.Check
317 '///+click OK for the options dialog
318 Kontext "ExtrasOptionenDlg"
322 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
325 printlog " - use dithering => uncheck"
326 '///<b>disable 'use dithering'</b>
327 '///+open tools / options / StarOffice / View
329 hToolsOptions ( "StarOffice", "View" )
330 '///+set 'OpenGL' and 'optimized output' to default and uncheck 'dithering'
331 if bSave(2) = TRUE then OptimierteAusgabe.Check else OptimierteAusgabe.Check
332 if bSave(1) = TRUE then OpenGL.Check else OpenGL.UnCheck
333 bSave (3) = Dithering.IsChecked
335 '///+click OK for the options dialog
336 Kontext "ExtrasOptionenDlg"
340 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
343 '///<b>enable 'use dithering'</b>
344 printlog " - use dithering => Check"
345 '///+open tools / options / StarOffice / View
347 hToolsOptions ( "StarOffice", "View" )
348 '///+check 'dithering'
350 '///+click OK for the options dialog
351 Kontext "ExtrasOptionenDlg"
355 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
358 printlog " - use OpenGL => UnCheck + Dithering => UnCheck!"
359 '///<b>disable 'OpenGL' and 'use dithering'</b>
360 '///+open tools / options / StarOffice / View
362 hToolsOptions ( "StarOffice", "View" )
363 '///+uncheck 'OpenGL' and 'dithering'
366 '///+click OK for the options dialog
367 Kontext "ExtrasOptionenDlg"
371 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
374 printlog " - Object refresh after interaction => check!"
375 '///<b>enable 'Object refresh after interaction'</b>
376 '///+open tools / options / StarOffice / View
378 hToolsOptions ( "StarOffice", "View" )
379 '///+set 'OpenGL' and 'Dithering' to default
380 if bSave(1) = TRUE then OpenGL.check else OpenGL.UnCheck
381 if bSave(3) = TRUE then Dithering.Check else Dithering.UnCheck
382 bSave (4) = Volldarstellung.IsChecked
383 '///+check 'Object refresh after interaction'
384 Volldarstellung.Check
385 '///+click OK for the options dialog
386 Kontext "ExtrasOptionenDlg"
390 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
393 printlog " - use OpenGL => UnCheck + Object refresh after interaction => check!"
394 '///<b>disable OpenGL and enable 'Object refresh after interaction'</b>
395 '///+open tools / options / StarOffice / View
397 hToolsOptions ( "StarOffice", "View" )
398 '///+uncheck 'OpenGL' and check 'Object refresh after interaction'
400 Volldarstellung.Check
401 '///+click OK for the options dialog
402 Kontext "ExtrasOptionenDlg"
406 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
409 printlog " - Object refresh after interaction => UnCheck!"
410 '///<b>disable 'Object refresh after interaction'</b>
411 '///+open tools / options / StarOffice / View
413 hToolsOptions ( "StarOffice", "View" )
414 if bSave(1) = TRUE then OpenGL.check else OpenGL.UnCheck
415 '///+set 'OpenGL' to default and uncheck 'Object refresh after interaction'
416 Volldarstellung.UnCheck
417 '///+click OK for the options dialog
418 Kontext "ExtrasOptionenDlg"
422 '///+open a impress-doc, create cube and close the document => testtool can only test if this feature does not crash
425 printlog " - reset to default"
426 '///<b>reset all 3D-Options to default</b>
427 '///+open tools / options / StarOffice / View
429 hToolsOptions ( "StarOffice", "View" )
430 '///+set all settings back to default
431 if bSave(4) = TRUE then Volldarstellung.check else Volldarstellung.UnCheck
432 '///+click OK for the options dialog
433 Kontext "ExtrasOptionenDlg"
437 gApplication = "WRITER"
440 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
441 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
442 testcase func_StarOfficeView_6
443 '///StarOffice / View => Anti Aliasing - only on UNIX
448 if gPlatgroup <> "unx" then
449 printlog "No test for 'anti aliasing' fonts on windows platforms!"
453 '///open a new writer-document
454 printlog "open a new writer-document"
455 gApplication = "WRITER"
459 printlog " - anti aliasing"
461 '///+open tools / options / StarOffice / view
463 hToolsOptions ( "StarOffice", "View" )
465 '///+save the raw data for 'Font anti aliasing'
466 bSave = FontAntiAliasing.IsChecked
467 FontAntiAliasing.Check
468 sSave = AAPixel.GetText
470 '///+activate 'font anti aliasing' and change pixelsize to 5
471 printlog " change pixelsize to 5"
474 '///+close options dialog with OK
475 Kontext "ExtrasOptionenDlg"
478 '///+open all menus for the writer doc
480 Kontext "DocumentWriter"
481 DocumentWriter.UseMenu
487 '///open tools / options / StarOffice / view
488 printlog " change pixelsize to 15"
490 hToolsOptions ( "StarOffice", "View" )
491 '///+activate 'font anti aliasing' and change pixelsize to 15
494 '///+close options dialog with OK
495 Kontext "ExtrasOptionenDlg"
498 '///+open all menus for the writer doc
500 Kontext "DocumentWriter"
501 DocumentWriter.UseMenu
507 '///open tools / options / StarOffice / view
508 printlog " change pixelsize to 25"
510 hToolsOptions ( "StarOffice", "View" )
511 '///+activate 'font anti aliasing' and change pixelsize to 25
514 '///+close options dialog with OK
515 Kontext "ExtrasOptionenDlg"
518 '///+open all menus for the writer doc
520 Kontext "DocumentWriter"
521 DocumentWriter.UseMenu
527 '///open tools / options / StarOffice / view
528 printlog " reset all changes to raw data"
530 hToolsOptions ( "StarOffice", "View" )
531 '///+reset all changes
532 AAPixel.SetText sSave
533 if bSave = TRUE then FontAntiAliasing.Check else FontAntiAliasing.UnCheck
535 '///+close options dialog with OK
536 Kontext "ExtrasOptionenDlg"
539 '///+close the writer doc
544 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
545 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
546 testcase func_StarOfficePrint_1
547 Dim bSave as Boolean, bSave2 as Boolean
550 gApplication = "DRAW"
552 '///StarOffice / Print => Printer Warnings
553 printlog " - printer warnings"
555 '///<b>check 'printer size'</b>
556 printlog " - Paper size => active"
558 '///+open tools / options / StarOffice / print
560 hToolsOptions ( "StarOffice", "Print" )
562 '///+save settings for 'paper size'
563 bSave = PaperSize.IsChecked
564 '///+check 'paper size'
567 '///+click OK for the options dialog
568 Kontext "ExtrasOptionenDlg"
572 '///+open a new drawing document
574 '///+open format / page
576 '///+select the page tabpage and select the first entry out of the Format list ( A0 )
578 Active.Setpage TabSeite
580 Papierformat.Select 1 ' select the format A0
587 '///+click OK in the print-dialog
588 if DruckenDlg.Exists then
591 '///+wait a little bit => then you have to get a warning about the size of your document
592 Kontext "WarningPrintOptions"
593 if WarningPrintOptions.Exists(3) then
594 WarningPrintOptions.Cancel
596 Warnlog "The warning-message for papersize does not turn up!"
600 if Active.Exists then Warnlog Active.GetText
603 '///+click cancel => the document shouldn't be printed
605 '///close the document
608 '///<b>uncheck 'printer size'</b>
609 printlog " - Paper size => disabled"
610 '///+open tools / options / StarOffice / print
612 hToolsOptions ( "StarOffice", "Print" )
614 '///+uncheck 'paper size'
617 '///+click OK for the options dialog
618 Kontext "ExtrasOptionenDlg"
622 '///+open a new drawing document
624 '///+open format / page
626 '///+select the page tabpage and select the first entry out of the Format list ( A0 )
628 Active.Setpage TabSeite
630 Papierformat.Select 1 ' select the format A0
637 '///+click OK in the print-dialog
638 if DruckenDlg.Exists then
641 '///+wait a little bit => the document should be printed without a warning
642 Kontext "WarningPrintOptions"
643 if WarningPrintOptions.Exists(3) then
644 WarningPrintOptions.Cancel
645 Printlog "The warning-message for papersize does exist => not realy a BUG"
649 if Active.Exists then Warnlog Active.GetText
653 '///close the document
656 '///<b>check 'transparency'</b>
657 printlog " - Transparency => active"
658 '///+open tools / options / StarOffice / print
660 hToolsOptions ( "StarOffice", "Print" )
662 '///+save settings for 'trancparency'
663 bSave2 = Transparency.IsChecked
664 '///+uncheck 'paper size'
666 '///+check 'tranceparency'
669 '///+click OK for the options dialog
670 Kontext "ExtrasOptionenDlg"
674 '///+open a new drawing document
676 '///+create a rectangle
677 hRechteckErstellen ( 30, 30, 60, 60 )
679 '///+format/area => transparency => check transparency
682 Active.Setpage TabTransparenz
683 Kontext "TabTransparenz"
684 LineareTransparenz.Check
691 '///+click OK in the print-dialog
692 if DruckenDlg.Exists then
695 '///+wait a little bit => then you have to get a warning about the printing trancparency
696 Kontext "WarningPrintOptions"
697 if WarningPrintOptions.Exists(3) then
698 WarningPrintOptions.Cancel
700 Warnlog "The warning-message for papersize does not turn up!"
704 if Active.Exists then Warnlog Active.GetText
707 '///+click cancel => the document shouldn't be printed
709 '///close the document
712 '///<b>uncheck 'transparency'</b>
713 printlog " - Transparency => disabled"
714 '///+open tools / options / StarOffice / print
716 hToolsOptions ( "StarOffice", "Print" )
718 '///+uncheck 'tranceparency'
721 '///+click OK for the options dialog
722 Kontext "ExtrasOptionenDlg"
726 '///+open a new drawing document
728 '///+create a rectangle
729 hRechteckErstellen ( 30, 30, 60, 60 )
731 '///+format/area => transparency => check transparency
734 Active.Setpage TabTransparenz
735 Kontext "TabTransparenz"
736 LineareTransparenz.Check
743 '///+click OK in the print-dialog
744 if DruckenDlg.Exists then
747 '///+wait a little bit => then you have to get a warning about the printing trancparency
748 Kontext "WarningPrintTransparency"
749 if WarningPrintTransparency.Exists(3) then
750 WarningPrintTransparency.Cancel
751 Warnlog "The warning-message for papersize does exist => BUG!"
755 if Active.Exists then Warnlog Active.GetText
758 '///+click cancel => the document shouldn't be printed
760 '///close the document => perhaps it take some time, before you can close the document
765 if Active.Exists then
776 '///reset the printing options
777 printlog " - reset the printing options"
779 '///+open tools / options / StarOffice / print
781 hToolsOptions ( "StarOffice", "Print" )
782 '///+reset 'paper size' and 'trancparency' to default
783 if bSave = TRUE then PaperSize.Check else PaperSize.Uncheck
784 if bSave2 = TRUE then Transparency.Check else Transparency.Uncheck
786 '///+click OK for the options dialog
787 Kontext "ExtrasOptionenDlg"