1 '**************************************************************************
2 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* Copyright 2008 by Sun Microsystems, Inc.
6 '* OpenOffice.org - a multi-platform office productivity suite
8 '* $RCSfile: w_011_.inc,v $
12 '* last change: $Author: vg $ $Date: 2008-08-18 12:42:23 $
14 '* This file is part of OpenOffice.org.
16 '* OpenOffice.org is free software: you can redistribute it and/or modify
17 '* it under the terms of the GNU Lesser General Public License version 3
18 '* only, as published by the Free Software Foundation.
20 '* OpenOffice.org is distributed in the hope that it will be useful,
21 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
22 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 '* GNU Lesser General Public License version 3 for more details
24 '* (a copy is included in the LICENSE file that accompanied this code).
26 '* You should have received a copy of the GNU Lesser General Public License
27 '* version 3 along with OpenOffice.org. If not, see
28 '* <http://www.openoffice.org/license.html>
29 '* for a copy of the LGPLv3 License.
31 '/************************************************************************
33 '* owner : helge.delfs@sun.com
35 '* short description: Testcases for the Toolbar.
37 '\******************************************************************
41 printLog Chr(13) + "--------- Toolbar ( w_011_.inc ) ----------"
42 gApplication = "WRITER"
46 'Objektleiste Zeichenobjekt
56 '-----------------------------------------------------------
58 testcase tGraphicFilters
59 printlog "- Objectbar Graphic (Filters)"
60 if gApplication = "HTML" then
61 printlog "This test applies not to HTML-Document"
62 Printlog "Not in WriterWeb!"
66 printlog "Open new document"
68 printlog "Insert graphic '/writer/required/input/grafik/jolink.jpg'"
69 Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
71 printlog "- Select all Filters"
72 Kontext "GraphicObjectbar"
73 printlog "In graphic toolbox taer off 'Filter' Toolbox"
74 if Not GraphicObjectbar.Exists then hToolbarSelect ( "Picture", true )
78 Warnlog "Unable to tear off 'Filter'-Toolbar"
83 Kontext "GraphicFilterBar"
85 GraphicFilterBar.Move ( 20, 20 )
87 Warnlog "Unable to move toolbar"
91 printlog "Select 'Invert'"
92 if Invert.IsEnabled then
95 Warnlog "- 'Invert' is disabled !"
98 if CheckForFilters=False then
99 printlog "Close active document"
103 printlog "Click 'Smooth'"
105 if Smooth.IsEnabled then
108 Warnlog "- 'Smooth' is disabled!"
111 if CheckForFilters=False then
112 printlog "Close active document"
117 printlog "Click 'Sharpen'"
118 if Sharpen.IsEnabled then
121 Warnlog "- 'Sharpen' is disabled!"
125 if CheckForFilters=False then
126 printlog "Close active document"
130 printlog "- Remove Noise"
131 printlog "Click 'Remove Noise'"
132 if Remove.IsEnabled then
135 Warnlog "- 'Remove Noise' is disabled!"
139 if ( CheckForFilters=False ) then
140 printlog "Close active document"
144 printlog "- Solarization"
145 printlog "Click 'Solarization'"
146 if Solarization.IsEnabled then
148 Kontext "Solarization"
149 printlog "Cancel upcoming 'Solarization' dialog"
150 if Solarization.Exists then
151 Call Dialogtest( Solarization )
154 Warnlog "- Dialog 'Solarisation' has not been opened! Try a second time!"
155 Kontext "GraphicFilterBar"
156 if Solarization.IsEnabled then
158 Kontext "Solarization"
159 if Solarization.Exists then
160 Call Dialogtest( Solarization )
163 Warnlog "- Dialog 'Solarisation' has not been opened!"
168 Warnlog "- 'Solarization' is disabled!"
171 if CheckForFilters=False then
172 printlog "Close active document"
177 printlog "Click 'Aging'"
178 if Aging.IsEnabled then
180 printlog "Cancel upcoming 'Aging' dialog"
183 Call Dialogtest( Aging )
186 Warnlog "- Dialog 'Aging' has not been opened! Try a second time!"
187 Kontext "GraphicFilterBar"
188 if Aging.IsEnabled then
192 Call Dialogtest( Aging )
195 Warnlog "- Dialog 'Aging' has not been opened!"
200 Warnlog "- 'Aging' is disabled!"
203 if CheckForFilters=False then
204 printlog "Close active document"
208 printlog "- Posterize"
209 printlog "Click 'Posterize'"
210 if Posterize.IsEnabled then
212 printlog "Cancel upcoming 'Posterize' dialog"
214 if Posterize.Exists then
215 Call Dialogtest( Posterize )
218 Warnlog "- Dialog 'Posterize' has not been opened! Try a second time!"
219 Kontext "GraphicFilterBar"
220 if Posterize.IsEnabled then
223 if Posterize.Exists then
224 Call Dialogtest( Posterize )
227 Warnlog "- Dialog 'Posterize' has not been opened!"
232 Warnlog "- 'Posterize' is disabled!"
235 if CheckForFilters=False then
236 printlog "Close active document"
240 printlog "Click 'Pop Art'"
242 if Art.IsEnabled then
245 Warnlog "- 'Pop Art' is disabled!"
248 if CheckForFilters=False then
249 printlog "Close active document"
253 printlog "- Charcoal Sketch"
254 printlog "Click 'Charcoal Sketch'"
255 if CharcoalSketch.IsEnabled then
258 Warnlog "- 'Charcoal Sketch' is disabled!"
261 if CheckForFilters=False then
262 printlog "Close active document"
267 printlog "Click 'Relief'"
268 if Relief.IsEnabled then
271 if Relief.Exists then
272 Call Dialogtest( Relief )
275 printlog "Cancel upcoming 'relief' dialog"
276 Warnlog "- Dialog 'Relief' has not been opened! Try a second time!"
277 Kontext "GraphicFilterBar"
278 if Relief.IsEnabled then
281 if Relief.Exists then
282 Call Dialogtest( Relief )
285 Warnlog "- Dialog 'Relief' has not been opened!"
290 Warnlog "- 'Relief' is disabled!"
293 if CheckForFilters=False then
294 Printlog "Close active document"
299 Printlog "Clock 'Mosaic'"
300 if Mosaic.IsEnabled then
303 Printlog "Cancel upcoming 'Mosaic' dialog"
304 if Mosaic.Exists then
305 Call Dialogtest( Mosaic )
308 Warnlog "- Dialog 'Mosaic' has not been opened!"
311 Warnlog "- 'Mosaic' is disabled!"
314 Printlog "Close active document"
318 '-----------------------------------------------------------
320 testcase tZOEditPoints
321 printlog "- Draw Functions-Objectbar: Edit Points"
322 if gApplication = "HTML" then
323 Printlog "This test does not apply to HTML documents"
324 Printlog "Not in WriterWeb!"
327 Printlog "Open new document"
329 Printlog "Insert a drawing object (rectangle)"
330 Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
331 Printlog "Select drawing object with shortcut 'Shift F4'"
332 Call wTypeKeys ( "<Shift F4>" )
335 if Not Drawbar.Exists then Call hToolbarSelect("Drawing", true)
338 Printlog "In Toolbox click 'Edit Points'"
342 Warnlog "#i56594#Shortcut selecting objects doesn't work"
343 Printlog "Close active document"
348 Printlog "Click 'Edit Points' in toolbox again"
350 Printlog "Close active document"
354 '-----------------------------------------------------------
357 printlog "- Draw Functions-Objectbar: all within Line"
358 if gApplication = "HTML" then
359 Printlog "This test does not apply to HTML documents"
360 Printlog "Not in WriterWeb!"
363 printlog "Open new document"
366 printlog "Insert a drawing object ( rectangle )"
367 Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
368 Call gMouseClick ( 25, 25 )
369 printlog "Select drawing object with shortcut 'Shift F4'"
370 Call wTypeKeys ( "<Shift F4>" )
372 Kontext "DrawingObjectbar"
373 if Not DrawingObjectbar.Exists then hToolbarSelect("GRAPHIC", true)
375 printlog " - Line-Tabdialog"
379 printlog "In Toolbox click 'Line'"
381 Warnlog "#i56594#Shortcut selecting objects doesn't work"
386 printlog "Step through all tabpages in upcoming dialog"
388 Active.SetPage TabLinie
391 Kontext "DrawingObjectbar"
392 if Not DrawingObjectbar.Exists then hToolbarSelect("GRAPHIC", true)
394 printlog " - Arrow Styles"
395 Linienendenstil.TearOff
396 Kontext "Linienenden"
397 Call Dialogtest(Linienenden)
398 printlog "Close dialog"
402 printlog "Close active document"
406 '-----------------------------------------------------------
409 printlog "- Draw Functions-Objectbar: all within rectangle"
410 if gApplication = "HTML" then
411 printlog "This test applies not to HTML document"
412 Printlog "Not in WriterWeb!"
416 printlog "Open new document"
418 printlog "Insert a draw object ( rectangle )"
419 Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
420 Call gMouseClick ( 25, 25 )
421 printlog "Select drawing object with shortcut 'Shift F4'"
422 Call wTypeKeys ( "<Shift F4>" )
424 Kontext "DrawingObjectbar"
425 if Not DrawingObjectbar.Exists then hToolbarSelect("GRAPHIC", true)
426 printlog " - Rectangle-Tabdialog"
429 printlog "In toolbox click 'Area'"
432 Warnlog "#i56594#Shortcut selecting objects doesn't work"
436 printlog "Close upcoming dialog"
438 Active.SetPage TabArea
442 printlog "Close active document"
446 '-----------------------------------------------------------
450 printlog "- Draw Functions-Objectbar: Rest"
451 if gApplication = "HTML" then
452 printlog "This test does not apply to HTML documents"
453 Printlog "Not in WriterWeb!"
457 printlog "Open new document"
459 printlog "Insert a draw object ( rectangle )"
460 Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
461 Call gMouseClick ( 25, 25 )
462 printlog "Select drawing object with shortcut 'Shift F4'"
463 Call wTypeKeys ( "<Shift F4>" )
465 printlog " - Object rotation mode"
468 printlog "Intoolbox click 'Object rotation mode'"
469 Kontext "DrawingObjectbar"
473 Warnlog "#i56594#Shortcut selecting objects doesn't work"
478 printlog " - Change Anchor"
479 printlog "Click 'Change Anchor' in Toolbox and select 1st entry in anchor list"
480 VerankerungWechseln.Click
482 Call hMenuSelectNr (1)
485 VerankerungWechseln.Click
486 printlog "Click 'Change Anchor' in Toolbox and select 2nd entry in anchor list"
488 Call hMenuSelectNr (2)
491 VerankerungWechseln.Click
493 printlog "Click 'Change Anchor' in Toolbox and select 3rd entry in anchor list"
494 Call hMenuSelectNr (3)
497 printlog " - To Background"
498 printlog "Click 'To Background' in toolbox"
499 InDenHintergrund.Click
501 printlog " - To Foreground"
502 printlog "Click 'To Foreground' in toolbox"
503 InDenVordergrund.Click
505 printlog " - Send to back"
506 printlog "Click 'Send To back' in toolbox"
509 printlog " - Bring to Front"
510 printlog "Click 'To Background' in toolbox"
513 printlog "Close active document"
517 '-----------------------------------------------------------
520 printlog "- Draw Functions-Objectbar: Text"
521 if gApplication = "HTML" then
522 printlog "This test does not apply to HTML documents"
523 Printlog "Not in WriterWeb!"
527 printlog "Open new document"
530 Call wZeichenobjektEinfuegen ( "Text", 30, 30, 50, 60 )
531 printlog "Insert draw object ( Text )"
532 printlog "Insert some text to textbox"
533 Call wTypeKeys ("Draw Functions-Objectbar: Text")
534 printlog "Select the text in textbox with <Strg A>"
535 Call wTypeKeys ("<Mod1 A>", 3)
538 Kontext "DrawTextObjectBar"
539 if DrawTextObjectBar.Exists = false then
540 Call hToolbarSelect("TextObject", true)
543 printlog " - Font Size"
544 printlog "For font size select 9th entry"
546 Schriftgroesse.Select 9
547 Schriftgroesse.TypeKeys "<Return>"
549 Warnlog "Unable to change font size"
554 printlog "In object bar select 6th entry in combobox 'Font'"
558 Warnlog "Unable to select font in object bar"
560 Schriftart.TypeKeys "<Return>"
564 printlog "Click 'Bold' in object bar"
569 printlog "Click 'Italic' in object bar"
573 printlog " - Underline"
574 printlog "Click 'Underline' in object bar"
578 printlog " - Align Left"
579 printlog "Click Align left in object bar"
583 printlog " - Align Right"
584 printlog "Click 'Align right' in object bar"
588 printlog " - Centered"
589 printlog "Click 'Centered' in object bar"
593 printlog " - Justify"
594 printlog "Click 'Justify' in object bar"
598 printlog " - Superscript"
599 printlog "Click 'Superscript' in object bar"
604 Warnlog "- Superscript is probably faded out!"
607 printlog " - Subscript"
609 printlog "Click 'Subscript' in object bar"
613 Warnlog "- Subscript is probably faded out!"
616 printlog " - Font attributes"
618 printlog "Click 'Font attributes' in object bar"
621 printlog "Close upcoming dialog"
623 Active.Setpage TabFont
627 Kontext "TextObjectbar"
629 Warnlog "- Font attributes is probably faded out!"
632 printlog " - Format:Paragraph"
635 printlog "Click Format:Paragraph in object bar"
638 printlog "Close upcoming dialog"
640 Active.Setpage TabEinzuegeUndAbstaende
641 Kontext "TabEinzuegeUndAbstaende"
642 TabEinzuegeUndAbstaende.OK
645 Warnlog "- Format:Paragraph is probably faded out!"
648 printlog "Close active document"
652 '-----------------------------------------------------------
654 testcase tZOVerticalText
655 printlog "- Draw Functions-Objectbar: Vertical Text"
656 if gAsianSup = False then goto endsub
657 if gApplication = "HTML" then
658 printlog "This test applies not to HTML document and only if Asian Support is enabled"
659 Printlog "Not in WriterWeb!"
663 printlog "Open new document"
666 printlog "Insert Draw object ( 'vertical Text' )"
667 Call wZeichenobjektEinfuegen ( "VText", 30, 30, 50, 60 )
668 printlog "Insert some text in textbox and select it"
669 Call wTypeKeys ("Checking vertical text")
670 Call wTypeKeys ("<Shift Home>")
673 printlog "In object bar select 6th entry in combobox 'Font'"
674 Call hToolbarSelect ( "Textobject", true )
677 Schriftart.TypeKeys "<Return>"
680 printlog " - Font Size"
681 printlog "For font size select 9th entry"
682 Schriftgroesse.Select 9
683 Schriftgroesse.TypeKeys "<Return>"
687 printlog "Click 'Bold' in object bar"
692 printlog "Click 'Italic' in object bar"
696 printlog " - Underline"
697 printlog "Click 'Underline' in object bar"
701 printlog " - Align Left"
702 printlog "Click 'Align left' in object bar"
706 printlog " - Align Right"
707 printlog "Click 'Align Right' in object bar"
711 printlog " - Centered"
712 printlog "Click 'Centered' in object bar"
716 printlog " - Justify"
717 printlog "Click 'Justify' in object bar"
721 printlog " - Superscript"
723 printlog "Click 'Superscript' in object bar"
727 Warnlog "- Superscript is probably faded out!"
730 printlog " - Subscript"
732 printlog "Click 'Subscript' in object bar"
736 Warnlog "- Subscript is probably faded out!"
739 printlog " - Font attributes"
741 printlog "Click 'Font attributes' in object bar"
745 Active.Setpage TabFont
749 Kontext "TextObjectbar"
751 Warnlog "- Font attributes is probably faded out!"
754 printlog " - Format:Paragraph"
758 printlog "Click 'Textdirection:Left To Right' in Objectbar"
759 TextdirectionLeftToRight.Click
762 Warnlog "Textdirection Left To Right probably faded out!"
766 printlog "Click 'Textdirection:Top to Bottom' in Objectbar"
767 TextdirectionTopToBottom.Click
770 Warnlog "Textdirection Top to Bottom probably faded out!"
774 printlog "Click 'Format: Paragraph' in object bar."
777 printlog "Close upcoming dialog"
779 Active.Setpage TabEinzuegeUndAbstaende
780 Kontext "TabEinzuegeUndAbstaende"
781 TabEinzuegeUndAbstaende.OK
784 Warnlog "- Format:Paragraph is probably faded out!"
787 printlog "Close active document"