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: id_005.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:41 $
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 : wolfram.garten@sun.com
36 '* short description :
38 '***********************************************************************************
43 ' #1 tiFormatPositionAndSize
44 ' #1 tiFormatCharacter
45 ' #1 tiFormatControlForm
46 ' #1 tiFormatDimensions
47 ' #1 tiFormatConnector
48 ' #1 tiFormat3D_Effects
49 ' #1 tiFormatNumberingBullets
50 ' #1 tiFormatCaseCharacter
51 ' #1 tiFormatParagraph
53 ' #1 tiFormatStylesAndFormatting
54 ' #1 tiFormatStylesSlideDesign
58 '\**********************************************************************************
60 testcase tiFormatDefault
64 Call hRechteckErstellen ( 10, 10, 20, 40 )
72 Call hRechteckErstellen ( 10, 10, 20, 40 )
75 Messagebox.SetPage TabLinie
77 Call DialogTest ( TabLinie )
80 Messagebox.SetPage TabLinienstile
81 kontext "TabLinienstile"
82 Call DialogTest ( TabLinienstile )
85 Call DialogTest ( NameDlg )
88 kontext "TabLinienstile"
91 Call DialogTest ( NameDlg )
93 kontext "TabLinienstile"
98 kontext "TabLinienstile"
101 call Dialogtest (OeffnenDLG)
103 kontext "TabLinienstile"
105 Kontext "SpeichernDLG"
106 call Dialogtest (SpeichernDLG)
109 Messagebox.SetPage TabLinienenden
110 kontext "TabLinienenden"
111 Call DialogTest ( TabLinienenden )
114 Call DialogTest ( NameDlg )
117 kontext "TabLinienenden"
123 'print "TabLinienenden"
127 Call DialogTest ( NameDlg )
130 kontext "TabLinienenden"
135 kontext "TabLinienenden"
138 call Dialogtest (OeffnenDLG)
140 kontext "TabLinienenden"
142 Kontext "SpeichernDLG"
143 call Dialogtest (SpeichernDLG)
145 kontext "TabLinienenden"
146 TabLinienenden.cancel
150 testcase tdFormatArea
153 Call hRechteckErstellen (15,15,65,65)
158 Messagebox.SetPage TabArea
160 Call DialogTest ( TabArea )
162 Messagebox.SetPage TabSchatten
163 kontext "TabSchatten"
165 Call DialogTest ( TabSchatten )
167 Messagebox.SetPage TabFarben
171 Call DialogTest ( TabFarben,1 )
173 Call DialogTest ( TabFarben,2 )
179 Call DialogTest ( NameDlg )
189 Kontext "SpeichernDLG"
190 call Dialogtest (SpeichernDLG)
197 call Dialogtest (OeffnenDLG)
202 Messagebox.SetPage TabFarbverlaeufe
203 kontext "TabFarbverlaeufe"
204 Call DialogTest ( TabFarbverlaeufe )
208 Call DialogTest ( NameDlg )
211 kontext "TabFarbverlaeufe"
214 Call DialogTest ( NameDlg )
217 kontext "TabFarbverlaeufe"
223 warnlog "nobody cares about deleting a gradient :-("
226 kontext "TabFarbverlaeufe"
229 call Dialogtest (OeffnenDLG)
231 kontext "TabFarbverlaeufe"
233 Kontext "SpeichernDLG"
234 call Dialogtest (SpeichernDLG)
238 Messagebox.SetPage TabSchraffuren
239 kontext "TabSchraffuren"
240 Call DialogTest ( TabSchraffuren)
244 Call DialogTest ( NameDlg )
247 kontext "TabSchraffuren"
250 Call DialogTest ( NameDlg )
253 kontext "TabSchraffuren"
258 kontext "TabSchraffuren"
261 call Dialogtest (OeffnenDLG)
263 kontext "TabSchraffuren"
265 Kontext "SpeichernDLG"
266 call Dialogtest (SpeichernDLG)
270 Messagebox.SetPage TabBitmap
272 Call DialogTest ( TabBitmap )
277 Call DialogTest ( NameDlg )
284 Call DialogTest ( NameDlg )
287 WarnLog "Control is disabled - modify bitmap"
292 Kontext "GrafikEinfuegenDlg"
293 Call DialogTest ( GrafikEinfuegenDlg )
294 Kontext "GrafikEinfuegenDlg"
295 GrafikEinfuegenDlg.Cancel
297 Warnlog "Insert graphic does not work"
308 call Dialogtest (OeffnenDLG)
312 Kontext "SpeichernDLG"
313 call Dialogtest (SpeichernDLG)
320 testcase tiFormatText
324 Messagebox.SetPage TabText
326 DialogTest ( TabText )
328 Messagebox.SetPage TabLauftext
329 Kontext "TabLauftext"
330 DialogTest ( TabLauftext )
335 testcase tiFormatPositionAndSize
337 Call hRechteckErstellen ( 10, 10, 20, 40 )
338 ContextPositionAndSize
340 Messagebox.setpage TabPositionAndSize
341 Kontext "TabPositionAndSize"
342 call Dialogtest ( TabPositionAndSize )
343 kontext "PositionPosition"
344 PositionPosition.TypeKeys ("<right>", 2)
345 kontext "SizePosition"
346 SizePosition.TypeKeys ("<down>", 2)
348 Messagebox.setPage TabDrehung
350 call Dialogtest ( TabDrehung )
352 Messagebox.setpage TabSchraegstellen
353 Kontext "TabSchraegstellen"
354 call Dialogtest ( TabSchraegstellen )
355 TabSchraegstellen.cancel
359 testcase tiFormatCharacter
364 Messagebox.SetPage TabFont
367 Call DialogTest ( TabFont )
369 Messagebox.SetPage TabFontEffects
370 kontext "TabFontEffects"
372 Call DialogTest ( TabFontEffects )
375 Messagebox.SetPage TabFontPosition
376 Kontext "TabFontPosition"
378 Call DialogTest ( TabFontPosition )
380 TabFontPosition.Cancel
384 testcase tiFormatControlForm
386 printlog "testcase: check if controls are available"
388 printlog "open new document"
391 'click in the document to get the focus into the document
392 if ( UCase(gApplication) = "DRAW" ) then
393 Kontext "DocumentDraw"
394 DocumentDraw.MouseDown(50,50)
395 DocumentDraw.MouseUp(50,50)
397 Kontext "DocumentImpress"
398 DocumentImpress.MouseDown(50,50)
399 DocumentImpress.MouseUp(50,50)
402 printlog "open the form controls toolbar"
403 call hToolbarSelect("FormControls",true)
405 kontext "FormControls"
406 printlog "insert a PushButton"
409 gMouseMove (50, 20,70, 40)
411 printlog "open the control properties dialog"
414 Kontext "ControlPropertiesDialog"
416 printlog "close the control properties dialog"
417 ControlPropertiesDialog.Close
419 printlog "open the form properties dialog"
421 Kontext "ControlPropertiesDialog"
423 printlog "close the form properties dialog"
424 ControlPropertiesDialog.Close
426 printlog "close the form control toolbar"
427 call hToolbarSelect("FormControls",false)
429 printlog "close application"
434 testcase tiFormatDimensions
438 DialogTest ( Bemassung )
443 testcase tiFormatConnector
447 DialogTest ( Verbinder )
452 testcase tiFormat3D_Effects
455 Kontext "Drei_D_Effekte"
456 Call DialogTest ( Drei_D_Effekte,1 )
458 Call DialogTest ( Drei_D_Effekte,2 )
460 Call DialogTest ( Drei_D_Effekte,3 )
462 Call DialogTest ( Drei_D_Effekte,4 )
464 Call DialogTest ( Drei_D_Effekte,5 )
466 Call DialogTest ( Drei_D_Effekte,6 )
467 Kontext "Drei_D_Effekte"
472 '---------------------------------------------------------------------------------------
474 testcase tiFormatNumberingBullets
477 FormatNumberingBulletsDraw
480 Messagebox.SetPage TabBullet
482 Call DialogTest ( TabBullet )
484 Messagebox.SetPage TabNumerierungsart
485 Kontext "TabNumerierungsart"
486 Call DialogTest ( TabNumerierungsart )
488 Messagebox.SetPage TabGrafiken
489 Kontext "TabGrafiken"
490 Call DialogTest ( TabGrafiken )
492 Messagebox.SetPage TabPositionNumerierung
493 Kontext "TabPositionNumerierung"
494 Call DialogTest ( TabPositionNumerierung )
496 Messagebox.SetPage TabOptionenNumerierung
497 Kontext "TabOptionenNumerierung"
498 Call DialogTest ( TabOptionenNumerierung )
499 Numerierung.Select 9 ' last one always ? -> graphics
500 TabOptionenNumerierung.MouseDown 50,60
501 TabOptionenNumerierung.MouseUp 50,60
502 Auswahl.TypeKeys "<SPACE>"
510 Messagebox.SetPage TabOptionenNumerierung
511 Kontext "TabOptionenNumerierung"
514 Auswahl.TypeKeys "<SPACE>"
519 warnlog "couldn't do something :-) (1)"
523 TabOptionenNumerierung.Cancel
528 '---------------------------------------------------------------------------------------
530 testcase tiFormatCaseCharacter
532 Call hTextrahmenErstellen ("testit",20,20,50,30)
536 FormatChangeCaseUpper
538 FormatChangeCaseLower
541 if not gAsianSup then
542 qaerrorlog "This is an asian language-office, but asian support was disabled in a previous test?"
545 FormatChangeCaseHalfWidth
547 Warnlog "Format / Change Case / Half Width does not work."
551 FormatChangeCaseFullWidth
553 Warnlog "Format / Change Case / Full Width does not work!"
557 FormatChangeCaseHiragana
559 Warnlog "Format / Change Case / Hiragana does not work."
563 FormatChangeCaseKatagana
565 Warnlog "Format / Change Case / Katagana does not work."
571 '---------------------------------------------------------------------------------------
573 testcase tiFormatParagraph
577 Messagebox.SetPage TabEinzuegeUndAbstaende
578 kontext "TabEinzuegeUndAbstaende"
579 Call DialogTest ( TabEinzuegeUndAbstaende )
581 Messagebox.SetPage TabAusrichtungAbsatz
582 Kontext "TabAusrichtungAbsatz"
583 Call DialogTest ( TabAusrichtungAbsatz )
585 Messagebox.SetPage TabTabulator
586 kontext "TabTabulator"
587 Call DialogTest ( TabTabulator )
592 '---------------------------------------------------------------------------------------
594 testcase tiFormatPage
598 if Messagebox.exists (5) then
599 Messagebox.SetPage TabSeite
601 if TabSeite.exists (5) then
602 Call Dialogtest (TabSeite)
608 Messagebox.SetPage TabArea
611 if messagebox.GetRT = 304 then
612 printlog "active about pagesize != printersettings, will say NO: " + Messagebox.GetText
616 warnlog messagebox.getText
617 Messagebox.ok ' should be Error loading BASIC of document ##?
619 if messagebox.GetRT = 304 then
621 warnlog messagebox.getText
624 printlog "not expected state."
631 Messagebox.SetPage TabArea
633 if TabArea.exists (5) then
634 Call Dialogtest (TabArea)
639 warnlog "FormatPage doesn't come up with dialog :-("
644 '---------------------------------------------------------------------------------------
646 testcase tiFormatStylesAndFormatting
648 dim sSettings(20,3) ' Control_name; control_type; value
655 hTextrahmenErstellen ("I love Wednesdays...",20,20,80,40)
657 printlog "Checking if TextObjectBar is up"
658 Kontext "TextObjectbar"
659 if TextObjectbar.Exists Then
660 printlog "TextObjectbar.Exists = " + TextObjectbar.Exists
662 ViewToolbarsTextFormatting
667 if (Stylist.NotExists) then
668 qaErrorLog "There is no stylist open, trying again now"
672 Vorlagenliste.TypeKeys "<End>"
673 Vorlagenliste.TypeKeys "<Up>"
674 Vorlagenliste.TypeKeys "<Up>"
676 Vorlagenliste.OpenContextMenu
682 if Messagebox.exists (5) then
684 Messagebox.SetPage TabVerwalten
685 Kontext "TabVerwalten"
686 TabVerwalten.TypeKeys "<TAB>"
687 VorlagenName.setText("1Test")
688 sTemp = VorlagenName.getText
689 VerknuepftMit.getSelText
693 warnlog "Under Gnome we have a focus problem here."
698 Vorlagenliste.TypeKeys "<Home>" 'to go to the style we've created ourselves.
700 Vorlagenliste.OpenContextMenu
702 hMenuSelectNr (2) 'modify...
705 if Messagebox.exists (5) then
707 Messagebox.SetPage TabVerwalten
708 Kontext "TabVerwalten"
709 VorlagenName.setText("2Test")
712 warnlog "Under Gnome we have a focus problem here."
718 Vorlagenliste.TypeKeys "<Home>" 'to go to the style we've created ourselves.
721 Vorlagenliste.TypeKeys "<Delete>" 'To delete the style.
722 Kontext "Active" 'do you really wish to delete?
726 Warnlog "Couldnt delete the new Style, or maybe wrong position?"
729 if (Stylist.NotExists) then
730 ErrorLog "There was no Stylist open, should be."
734 if (Stylist.Exists) then
735 ErrorLog "The Stylist should be closed now."
741 '---------------------------------------------------------------------------------------
743 testcase tiFormatFontwork
745 Call hTextrahmenErstellen ("Flightplanning via www.aua.com is hard!",20,20,50,30)
749 if FontWork.exists (5) then
750 DialogTest ( FontWork )
754 warnlog "FontWork didn't came up :-("
759 '---------------------------------------------------------------------------------------
761 testcase tiFormatGroup
763 hRechteckErstellen ( 10, 10, 20, 20 )
764 hRechteckErstellen ( 30, 30, 40, 40 )
777 '---------------------------------------------------------------------------------------
779 testcase tiFormatStylesSlideDesign
780 ' create recktanglr; click outside ?
783 FormatModifyLayout ' is OK : Format->Styles->Slide Design; 27064; SID_PRESENTATION_LAYOUT
785 Kontext "Seitenvorlage"
786 Call DialogTest ( Seitenvorlage )
787 HintergrundseiteAustauschen.check
788 DeleteUnusedBackgrounds.check
797 printlog "Preview wasn't checkable :-( hopfully now:"
801 printlog "... OK :-)"
804 Kontext "Seitenvorlage"
810 '---------------------------------------------------------------------------------------