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: g_format.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-08-28 11:42:20 $
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 '*******************************************************************
41 ' #1 tdFormatConnector
42 ' #1 tiFormatPositionAndSize
43 ' #1 tiFormat3D_Effekte
44 ' #1 tdFormatTemplates
45 ' #1 tiFormatAufzaehlungszeichen
46 '\******************************************************************
55 '/// open application ///'
57 '/// create a textbox with text ///'
58 Call hTextrahmenErstellen ("This is a text, which, I hope, in Staroffice, will be automaticly formatted. Should that not be the case, then it doesn't matter.",20,20,70,20)
60 '/// click outside of textbox, to leave edit mode of textbox and deselect it ///'
62 '/// type key [TAB] to select textbox again ///'
65 '/// Format->Position and Size ///'
68 '/// select tabpage 'Format and Size' on dialog 'Position and Size' ///'
69 Active.SetPage TabPositionAndSize
70 Kontext "TabPositionAndSize"
72 '/// get and remember Position: 'Position X' ///'
74 '/// close dialog 'Position and Size' with OK ///'
77 '/// Format -> Text... ///'
80 '/// select tabpage 'Text' ///'
81 Active.SetPage TabText
83 '/// Check checkbox 'Fit width to text' ///'
84 BreiteAnTextAnpassen.Check
85 '/// leave dialog with OK ///'
88 '/// Dialog should have been resized and moved now! ///'
90 '/// Format->Position and Size ///'
91 ContextPositionAndSize
93 '/// select tabpage 'Format and Size' on dialog 'Position and Size' ///'
94 Active.SetPage TabPositionAndSize
95 Kontext "TabPositionAndSize"
97 '/// compare 'Position X' with saved value - has to be different ///'
98 sTemp = PositionX.GetText
100 Printlog " - Fit to frame does work"
102 warnlog " - Fit to frame doesn't work: expected: '" + a + "' is: '" + + "'"
104 '/// get and remember Position: 'Position Y' ///'
106 TabPositionAndSize.OK
108 '/// Format -> Text... ///'
111 '/// select tabpage 'Text' ///'
112 Active.SetPage TabText
114 '/// UNCheck checkbox 'Fit width to text' ///'
115 BreiteAnTextAnpassen.Uncheck
116 '/// check checkbox 'Fit height to text' ///'
117 HoeheAnTextAnpassen.Check
118 '/// if checkbox 'Fit to frame' is enabled: this state only happens, if 'Fit height to text' and 'Fit width to text' are checked ///'
119 if AmRahmenAnpassen.IsEnabled Then
120 WarnLog " - checkbox 'Fit to frame' is enabled, which is wrong!"
122 PrintLog " - checkbox 'Fit to frame' is disabled."
125 '/// UNcheck checkbox 'Fit height to text' ///'
126 HoeheAnTextAnpassen.UnCheck
127 '/// UNCheck checkbox 'Fit width to text' ///'
128 BreiteAnTextAnpassen.UnCheck
129 '/// if checkbox 'Fit to frame' is disabled: this state only happens, if 'Fit height to text' and/or 'Fit width to text' are checked ///'
130 if AmRahmenAnpassen.IsEnabled Then
131 PrintLog " - checkbox 'Fit to frame' is enabled."
133 WarnLog " - checkbox 'Fit to frame' is disabled, which is wrong!"
135 ' PrintLog "Full width: " + GanzeBreite.IsChecked
136 '/// set metric field 'Left' to 10 ///'
138 '/// set metric field 'Right' to 10 ///'
140 '/// set metric field 'Top' to 10 ///'
142 '/// set metric field 'Bottom' to 10 ///'
144 '/// leave dialog with OK ///'
147 '/// Edit -> Select All ///'
149 '/// type Keys [Strg]+[x] to cut object ///'
151 '/// No object exists in dokument right now! ///'
152 '/// Format -> Text... ///'
155 '/// select tabpage 'Text' ///'
156 Active.SetPage TabText
158 '/// check checkbox 'Adjust to contour' ///'
160 '/// now every other control on the dialog has to get disabled ///'
161 if ((AmRahmenAnpassen.IsEnabled=False) And (Links.IsEnabled=False) And (Rechts.IsEnabled=False) And (Oben.IsEnabled=False) And (Unten.IsEnabled =False)) Then
162 PrintLog " - Adjust to contour is working"
164 WarnLog " - contourflow aktivated doesn't work it's supposed to"
166 '/// leave dialog with OK ///'
169 '/// create a textbox with text ///'
170 Call hTextrahmenErstellen ("blablablablablablablablablablablabla",20,20,60,60)
172 '/// Format -> Text... ///'
175 '/// select tabpage 'Text Animation' ///'
176 Active.SetPage TabLauftext
177 Kontext "TabLauftext"
179 ZaehlerEffekt = Effekt.GetItemCount
180 if (ZaehlerEffekt <> 5) then
181 qaerrorlog "There are now more or less than 5 Effects - Change testcase! " + ZaehlerEffekt
183 for n=1 to ZaehlerEffekt
185 printlog "" + n + ": '" + Effekt.getSelText + "' -------------------------------"
187 '/// test all directions ///'
191 case 1: NachOben.click
192 case 2: NachLinks.click
193 case 3: NachRechts.click
194 case 4: NachUnten.click
196 sFormatTextDrawAnimation
199 if ((n > 1) AND (n < 5)) then
200 '/// test all Start/End Text visibility ///'
204 case 1: TextSichtbarBeimStarten.check : TextSichtbarBeimBeenden.uncheck
205 case 2: TextSichtbarBeimBeenden.check
206 case 3: TextSichtbarBeimStarten.uncheck
207 case 4: TextSichtbarBeimBeenden.uncheck
209 sFormatTextDrawAnimation
212 if ((n > 1) AND (n < 5)) then
213 '/// test all Animation cycles ///'
218 case 2: Endlos.UnCheck : Anzahl.typeKeys ("<PageUp>")
219 case 3: If Endlos.IsChecked = true then
220 QaErrorLog "#i74067# - Checkbox checked when it shouldn't have been."
225 sFormatTextDrawAnimation
229 '/// test all Increment ///'
233 case 1: Pixel.check : Schrittweite.setText("1")
234 case 2: printlog "#114551# Loop, if Step greater than object size"
235 case 3: Pixel.UnCheck : Schrittweite.typeKeys ("<PageDown>")
236 case 4: printlog "#114551# Loop, if Step greater than object size"
238 sFormatTextDrawAnimation
242 '/// test all Delay ///'
246 case 1: Automatisch.check
247 case 2: Automatisch.UnCheck : Verzoegerung.setText("1")
248 case 3: Verzoegerung.typeKeys ("<PageUp>")
250 sFormatTextDrawAnimation
257 endcase 'tiFormatText
258 '-------------------------------------------------------------------------------
259 testcase tdFormatLayer
261 '/// open application ///'
264 '/// Edit->Layer->Insert (in DRAW also via Insert->Layer) ///'
266 Kontext "EbeneEinfuegenDlg"
267 EbenenName.SetText " Test 4"
268 LayerTitle.SetText " Test no 4"
269 LayerDescription.SetText " This is the Description of the Layer."
272 '/// Edit->Layer->Modify (in DRAW also via Format->Layer)///'
274 Kontext "EbeneAendernDlg"
275 if EbenenName.GetText = " Test 4" Then
276 EbenenName.SetText "Layer 5"
278 if LayerTitle.GetText = " Test no 4" Then
279 LayerTitle.SetText "Layer test 5"
281 if LayerDescription.GetText = " This is the Description of the Layer." Then
282 LayerDescription.SetText " This is the changed Description of the Layer."
290 '/// Edit->Layer->Modify (in DRAW also via Format->Layer)///'
292 Kontext "EbeneAendernDlg"
293 if EbenenName.GetText <> "Layer 5" Then
294 WarnLog " Name-Value either didn't change at all, or was empty. Expected: 'Layer 5', but was: " + EbenenName.GetText
296 if LayerTitle.GetText <> "Layer test 5" Then
297 WarnLog " Title-Value either didn't change at all, or was empty. Expected: 'Layer test 5', but was: " + LayerTitle.GetText
299 if LayerDescription.GetText <> " This is the changed Description of the Layer." Then
300 WarnLog " Description-Value either didn't change at all, or was empty. Expected: ' This is the changed Description of the Layer.', but was: " + LayerDescription.GetText
303 if Sichtbar.IsChecked=False Then
304 WarnLog " Value changed: visible"
306 if Druckbar.IsChecked=False Then
307 WarnLog " Value changed: printable"
309 if Gesperrt.IsChecked=False then
310 WarnLog " Value changed: locked"
314 '/// close application ///'
317 endcase 'tdFormatLayer
318 '-------------------------------------------------------------------------------
319 testcase tdFormatConnector
321 Dim Zaehler as integer
325 dim cDecSep as string
327 if (gApplication = "IMPRESS") then
328 ExtensionString = "odp"
330 ExtensionString = "odg"
334 '/// insert connector ///
335 kontext "Connectorsbar"
336 if Connectorsbar.Exists then
343 Verbinder.TearOff ' insert connector
345 warnlog "bug for GH from TBO; .tearoff doesn't tell success"
348 kontext "Connectorsbar"
350 gMouseMove ( 10,10,30,30)
353 '/// Open file with a finished scenario ///'
354 hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\FormatConnector." + ExtensionString)
356 '/// Check if the document is writable ///'
357 if fIsDocumentWritable = false then
358 ' Make the document writable and check if it's succesfull
359 if fMakeDocumentWritable = false then
360 warnlog "The document can't be make writeable. Test stopped."
366 '/// Press TAB three times to select the connector. ///'
372 hTypeKeys "<SHIFT F10>" 'OpenContextMenu(true)
374 hMenuSelectNr(2) ' Connector
376 Typ.Select 2 ' the one with 2 from 3 posibilities to set a value...
378 AnfangHorizontal.SetText "1"
379 Verbinder.TypeKeys "<TAB>"
380 AnfangVertikal.SetText "1"
381 Verbinder.TypeKeys "<TAB>"
382 EndeHorizontal.SetText "1"
383 Verbinder.TypeKeys "<TAB>"
384 EndeVertikal.SetText "1"
385 Verbinder.TypeKeys "<TAB>"
386 printlog EndeVertikal.getText
389 Verbinder.TypeKeys "<TAB>"
390 sTemp = Linie1.getText
391 sUnit = GetMeasUnit(sTemp)
392 cDecSep = GetDecimalSeperator(sTemp)
394 PrintLog " Lineoffset not activated -> you have to choose another linetype: 1"
398 Verbinder.TypeKeys "<TAB>"
400 PrintLog " Lineoffset not activated -> you have to choose another linetype: 2"
404 Verbinder.TypeKeys "<TAB>"
406 PrintLog " Lineoffset not activated -> you have to choose another linetype: 3 when will this be enabled ?"
412 sTemp = AnfangHorizontal.GetText
414 if fCompareTwoValues(sTemp, "1"+cDecSep+"00"+sUnit) Then
415 WarnLog " value not changed"
416 printlog "AnfangHorizontal = is '" + sTemp + "' should: '"+"1"+cDecSep+"00"+sUnit+"'"
418 if fCompareTwoValues(AnfangVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then
419 WarnLog " value not changed"
420 printlog "AnfangVertikal.GetText = " + AnfangVertikal.GetText
422 if fCompareTwoValues(EndeHorizontal.GetText, "1"+cDecSep+"00"+sUnit) Then
423 WarnLog " value not changed"
424 printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText
426 if fCompareTwoValues(EndeVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then
427 WarnLog " value not changed"
428 printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText
431 Zaehler = Typ.GetItemCount
434 SetClipboard Typ.GetSelText
438 if GetClipboardText <> Typ.GetSelText Then
439 WarnLog " Selection not saved. Was: " + Typ.GetSelText + " . But should have been: " +GetClipboardText
445 endcase 'tdFormatConnector
446 '-------------------------------------------------------------------------------
447 testcase tiFormatPositionAndSize
449 Dim x 'Variable fuer PositionX
450 Dim y 'Variable fuer PositionY
451 Dim h 'Variable fuer Hoehe
452 Dim b 'Variable fuer Breite
453 Dim r 'Variable fuer Radius
454 Dim w 'Variable fuer Winkel
456 printlog "New impress doc"
459 printlog "RECTANGLE-----1/2"
460 printlog "create rectangle"
461 Call hRechteckErstellen (20,20,70,30)
465 printlog "Format-position and size"
466 ContextPositionAndSize
469 printlog "TabPositionAndSize"
470 Active.SetPage TabPositionAndSize
471 Kontext "TabPositionAndSize"
472 printlog "put x and y position into clipboard"
473 printlog "x = " & PositionX.GetText
474 printlog "y = " & PositionY.GetText
475 SetClipboard (PositionX.GetText + PositionY.GetText)
476 TabPositionAndSize.OK
478 printlog "move rectangle down and right"
479 hTypeKeys "<DOWN>",10
480 hTypeKeys "<RIGHT>",10
481 printlog "open PositionAndSize"
482 ContextPositionAndSize
485 printlog "TabPositionAndSize"
486 Active.SetPage TabPositionAndSize
487 Kontext "TabPositionAndSize"
488 printlog "control position changes with clipboard content"
489 if (PositionX.GetText + PositionY.GetText) = GetClipboardText Then WarnLog "Der Dialog hat die Positionsaenderung nicht registriert"
490 printlog "set position of rectange using the edit fields"
491 PositionX.SetText "2"
493 PositionY.SetText "2"
495 printlog "check protect"
496 ProtectPosition.Check
497 TabPositionAndSize.OK
499 ContextPositionAndSize
502 Active.SetPage TabPositionAndSize
503 Kontext "TabPositionAndSize"
504 printlog "check if values are correct"
505 if PositionX.GetText = x And PositionY.GetText = y Then PrintLog " Values could be changed"
506 printlog "check if protect works"
507 if PositionX.GetText<> x Then
508 WarnLog "Protect does not work"
510 PrintLog "Protext works, X axis checked"
512 if PositionY.GetText<> y Then
513 WarnLog "Protect does not work"
515 PrintLog " Protext does work, checked y axis"
517 printlog "uncheck protect"
518 ProtectPosition.UnCheck
519 TabPositionAndSize.OK
521 ContextPositionAndSize
524 printlog "TabPositionAndSize"
526 Active.SetPage TabPositionAndSize
527 Kontext "TabPositionAndSize"
529 printlog "set width to 10"
532 printlog "put value into a variable"
535 printlog "Width is " & b
536 SetClipboard Width.GetText
537 '/// set heigth to 5 ///'
539 printlog "put value into variable"
542 printlog "Height is " & h
543 printlog "check protect"
544 ProtectPosition.Check
545 printlog "close dialog"
546 TabPositionAndSize.OK
548 ContextPositionAndSize
551 Active.SetPage TabPositionAndSize
552 Kontext "TabPositionAndSize"
554 printlog "control size changes"
555 printlog "Width value is: " & Width.GetText
556 printlog "Value from Clipboard is: " & GetClipboardText
557 if Width.GetText = GetClipboardText Then
558 PrintLog " Size of rectangle could be changed. It is = " + Width.GetText + " but it should be = " + b
560 WarnLog " Controls for height and width do not work"
562 printlog "Uncheck the Position-Protection, so we can work with this window."
563 if ProtectPosition.isChecked = FALSE then
564 printlog "Should be checked since it was checked just 16 rows ago"
565 ErrorLog "ProtectPosition was not checked - why?"
567 ProtectPosition.Uncheck
571 printlog "raise value for width"
573 if Height.GetText = h Then
574 WarnLog " Keep ratio does not work properly"
576 PrintLog " Keep ratio does work"
579 TabPositionAndSize.OK
583 printlog "Now trying TEXT..."
584 printlog "create textbox"
585 Call hTextrahmenErstellen ("Never before have I written such a meaning" ,10,10,60,20)
587 printlog "Format-Postion and Size"
588 FormatPositionAndSize
591 printlog "TabPositionAndSize"
592 Active.SetPage TabPositionAndSize
593 Kontext "TabPositionAndSize"
594 printlog "default value ?: width :-----"+Width.IsEnabled
595 printlog "check fit width to text"
596 if Width.IsEnabled then FitWidthText.Check
597 if Width.IsEnabled = True Then
598 WarnLog " Fit width does not work"
600 PrintLog " Fit width does work"
602 printlog "fit heigth to text"
604 if Height.IsEnabled = True Then
605 WarnLog " fit heigth doe not work"
607 PrintLog " fit heigth does work"
609 ' PrintLog " Fit width to text active: " + FitWidthText.IsChecked
610 ' PrintLog " Fit heigth to text active: " + FitHeightText.IsChecked
611 printlog "uncheck fit width to text"
613 printlog "uncheck fit heigth to text"
614 FitHeightText.Uncheck
615 TabPositionAndSize.OK
617 hTypeKeys "<escape>",2
620 ContextPositionAndSize
623 Active.SetPage TabPositionAndSize
624 Kontext "TabPositionAndSize"
625 printlog "check x-position of textbox"
626 SetClipboard PositionX.GetText
629 printlog "set rotation angle to 50 and position x and y to 1"
630 Active.SetPage TabDrehung
632 PositionX.SetText "1"
633 PositionY.SetText "1"
639 printlog "check position of manipulated textbox"
640 ContextPositionAndSize
643 Active.SetPage TabPositionAndSize
644 Kontext "TabPositionAndSize"
645 if PositionX = GetClipboardText Then PrintLog " Position changed due to rotation"
647 Active.SetPage TabDrehung
650 printlog "check rotation angle"
651 if Winkel.GetText = w Then PrintLog " Object rotated"
654 printlog "RECTANGLE-----2/2"
655 printlog "create rectangle"
656 Call hRechteckErstellen (10,60,70,90)
658 ContextPositionAndSize
661 Active.SetPage TabPositionAndSize
662 Kontext "TabPositionAndSize"
663 printlog "put x-axis postion of rectangle into clipboard"
664 SetClipboard PositionX.GetText
666 printlog "set slant angle to 5"
667 Active.SetPage TabSchraegstellen
668 Kontext "TabSchraegstellen"
670 printlog "set radius to 5"
676 ContextPositionAndSize
678 Active.SetPage TabPositionAndSize
679 Kontext "TabPositionAndSize"
680 if PositionX <> GetClipboardText Then PrintLog " Object changed position due to scaling"
681 printlog "Before we change tab, we set the Position-marker back to checked "
682 ProtectPosition.Check
684 printlog "check slant angle and radius"
685 Active.SetPage TabSchraegstellen
686 Kontext "TabSchraegstellen"
687 if Radius.GetText = r Then PrintLog " Cornwer radius changed"
688 if Winkel.GetText =w Then PrintLog " Object rotated over 45°"
692 endcase 'tiFormatPositionAndSize
693 '-------------------------------------------------------------------------------
694 testcase tiFormat3D_Effekte
701 Dim Winkel as string ' get value for angle
705 Dim Zaehler as integer
709 printlog "new document"
710 '-----------------------------------RECTANGLE------------------------------------------------------
711 Call hRechteckErstellen (20,20,60,70) '/// create rectangle ///'
713 ContextPositionAndSize '/// get position and size of rectangle ///'
715 Active.SetPage TabPositionAndSize
716 Kontext "TabPositionAndSize"
717 PositionX.SetText "5"
719 printlog "--- created RECTANGLE; xPosition @ "+ x
720 TabPositionAndSize.OK
721 ContextConvertInto3D '/// convert rectangle into 3d ///'
723 Kontext "Drei_D_Effekte"
724 if Drei_D_Effekte.exists(3) then
725 qaerrorlog " The 3D-Effects-dialogue was open. Check why."
727 Format3D_Effects '/// open 3d flyer///'
730 if Perspektive.isvisible then
731 Perspektive.Click '/// check perspective ///'
733 warnlog "why not in draw?"
736 warnlog "something is wrong mit perspective"
738 Zuweisen.Click '/// assign perspective ///'
739 Kontext "DocumentImpress"
741 ContextPositionAndSize '/// check position and size ///'
743 Active.SetPage TabPositionAndSize
744 Kontext "TabPositionAndSize"
745 if PositionX.GetText = X Then
746 printlog "- Perspective acitvated x: "+PositionX.GetText
748 warnlog "- Perspective seems to have a problem, x value has changed!"
750 TabPositionAndSize.OK
751 Kontext "Drei_D_Effekte"
754 EditSelectAll '/// delete rectangle ///'
757 '-----------------------------------RECTANGLE------------------------------------------------------
758 hRechteckErstellen (20,20,60,70) '/// create new rectangle ///'
759 printlog "--- created RECTANGLE 2"
760 Format3D_Effects '/// open 3d flyer ///'
761 Kontext "Drei_D_Effekte"
762 Rotationskoerper.Click '/// create lathe object ///'
764 Kontext "DocumentImpress"
765 ContextPositionAndSize '/// check position and size ///'
767 Active.SetPage TabPositionAndSize
768 Kontext "TabPositionAndSize"
769 if PositionX.GetText = X Then
770 Warnlog "- Rectangle not converted into a lath object; x: "+PositionX.GetText
772 Printlog "- Creating a lath object seems to work"
774 TabPositionAndSize.OK
776 hTypeKeys "<DELETE>" '/// delete object ///'
778 '-----------------------------------RECTANGLE------------------------------------------------------
779 hRechteckErstellen (20,20,60,70) '/// create rectangle ///'
780 printlog "--- created RECTANGLE 3"
781 Kontext "Drei_D_Effekte"
783 In_3D_Umwandeln.Click '/// convert to 3d in 3d flyer ///'
786 qaerrorlog "#i92910: automation: crash when executing tiFormat3D_Effekte in test g_format"
788 'y = hMenuItemGetCount
791 'select case gApplication
792 ' case "DRAW" : if y = 13 then
793 ' Printlog "- 3D object created"
795 ' Warnlog " Context-menu-entry-number was wrong. Expected 13, but was " + y + "."
797 ' case else : if y = 15 then
798 ' Printlog "- 3D object created"
800 ' Warnlog " Context-menu-entry-number was wrong. Expected 15, but was " + y + "."
805 hTypeKeys "<DELETE>" '/// delete object ///'
807 '-----------------------------------ZYLINDER------------------------------------------------------
809 printlog "--- create CYLINDER"
810 WL_SD_Zylinder '/// create cylinder ///'
811 gMousemove 30,30,80,80 '/// This affects the Vertical-value down to 15 ///'
814 Kontext "Drei_D_Effekte"
815 Geometrie.Click '/// geometry ///'
818 Vert=Vertikale_Segmente.GetText '/// get value for vertical segments (default) ///'
819 Hor =Horizontale_Segmente.GetText '/// get value for horizontal segments (default) ///'
820 Rund=Kantenrundung.GetText '/// get value for edge rounding ///'
821 Skal=Tiefenskalierung.GetText '/// get value for scale ///'
822 Tief=Tiefe.GetText '/// get value for depth ///'
823 Winkel=Endwinkel.GetText '/// get value for angle ///'
825 '/// Check if every entry has a value <> "" -> an init value is shown. ///'
826 if Vert ="" then warnlog "Vertical Segment has no init value"
827 if Hor ="" then warnlog "Horizontal Segment has no init value"
828 if Rund ="" then warnlog "Rounded edges has no init value"
829 if Skal ="" then warnlog "Scaled depth has no init value"
830 if Tief ="" then warnlog "Depth has no init value"
831 if Winkel="" then printlog "Rotation angle has no init value"
833 '/// Go back to the 3d-effects-dialogue and change the value for the cylinder ///'
835 hTypeKeys "<ESC>" '/// Deselect object and check if 3d controller has default values again ///'
836 Kontext "Drei_D_Effekte"
838 '/// Check if value for vertical segments has changed in 3d controller ///'
839 if Vertikale_Segmente.GetText = Vert Then
840 Printlog "- Vertical segment value read from object's properties in the 3d flyer"
842 Warnlog "- 3D flyer could not read vertical segment information from object. It is = '"+ Vertikale_Segmente.GetText + "' but should be = '" + Vert + "'"
845 if Horizontale_Segmente.GetText = Hor Then '/// check if value for horizontal segments has changed ///'
846 Printlog "- Horizontal segment value read from object's properties in the 3d flyer"
848 Warnlog "- 3D flyer not be able to read horizonal segment information from object. It is = '"+ Horizontale_Segmente.GetText + "' but should be = '" + Hor + "'"
851 if Kantenrundung.GetText = Rund Then '/// check if value for edge rounding has changed ///'
852 Printlog "- Rounded edges works"
854 Warnlog "- Rounded edges value could not be read by the 3d flyer It is = '" + Kantenrundung.GetText + "' but should be = '" + rund + "'"
857 if Tiefenskalierung.GetText = Skal Then '/// check value for scale ///'
858 Printlog "- Scaled depth works"
860 Warnlog "- Scale depth value could not be read by the 3d flyer It is = '" + Tiefenskalierung.GetText + "' but should be = '" + skal + "'"
863 if Tiefe.GetText = Tief Then '/// check value for depth ///'
864 Printlog "- Depth value could be read by the 3d flyer"
866 Warnlog "- Depth value of object could not be read by the flyer It is = '"+ Tiefe.GetText + "' but should be = '" + tief + "'"
869 if Endwinkel.GetText = Winkel Then '/// check value for angle ///'
870 Printlog "- Angle value could be read by the 3d flyer"
872 Warnlog "- Angle value is not correct"
875 hTypeKeys "<ESC>" '/// deselect object and check if 3d controller has default values again ///'
876 Kontext "Drei_D_Effekte"
878 Printlog "- check if 3D flyer goes back to default values if object is deselected"
879 if Vertikale_Segmente.GetText <> Vert Then Warnlog " Vertical Segment - Default value is wrong is: "+Vertikale_Segmente.GetText+"; should: " +vert
880 if Horizontale_Segmente.GetText <> Hor Then Warnlog " Horizontal Segment - Default value is wrong"
881 if Kantenrundung.GetText <> Rund Then Warnlog " Rounded edges - Default value is wrong"
882 if Tiefenskalierung.GetText <> Skal Then Warnlog " Scaled depth - Default value is wrong"
883 if Endwinkel.GetText <> Winkel Then Warnlog " Rotation angle - Default value is wrong"
884 if Tiefe.GetText<>Tief Then Warnlog " Depth - Default value is wrong"
887 Kontext "Drei_D_Effekte"
889 Horizontale_Segmente.SetText "32" '/// change horizontal and vertical segments ///'
890 Vertikale_Segmente.SetText "32"
891 Kantenrundung.SetText "100"
892 Endwinkel.Settext "300"
893 Tiefenskalierung.SetText "500"
895 Zuweisen.Click '/// assign changes ///'
897 WaitSlot (1000) '/// check value changes ///'
898 if Vertikale_Segmente.GetText = Vert Then Warnlog "- Default value is wrong"
899 if Horizontale_Segmente.GetText = Hor Then Warnlog "- Default value is wrong"
900 if Kantenrundung.GetText = Rund Then Warnlog "- Default value is wrong"
901 if Tiefenskalierung.GetText = Skal Then Warnlog "- Default value is wrong"
902 if Endwinkel.GetText = Winkel Then Warnlog "- Default value is wrong"
903 if Tiefe.GetText=Tief Then Warnlog "- Default value is wrong"
905 hTypeKeys "<DELETE>" '/// delete cylinder ///'
907 '-----------------------------------ZYLINDER------------------------------------------------------
908 WL_SD_Zylinder '/// create new cylinder ///'
909 gMouseMove (20,20,60,60)
911 Kontext "Drei_D_Effekte"
912 Printlog "- Change basic geometric parameters for the object"
913 Printlog "Segments : Horizontal: 8; Vertical: 8; Rounded edges: 50 %"
914 Horizontale_Segmente.SetText "8" '/// changing values for cylinder ///'
915 Vertikale_Segmente.SetText "8"
916 Kantenrundung.SetText "50 %"
922 EditSelectAll '/// select object ///'
924 Kontext "Drei_D_Effekte" '/// control if changes are done ///'
925 if Horizontale_Segmente.GetText <> "8" Then Warnlog "- Horizontal segment count is not correct "+Horizontale_Segmente.GetText
926 if Vertikale_Segmente.GetText <> "8" Then Warnlog "- Vertical segment count is not correct "+Vertikale_Segmente.GetText
927 if Kantenrundung.GetText <> "50 %" Then Warnlog "- Value for rounded edges is not correct "+Kantenrundung.GetText
929 Zaehler=Modus.GetItemCount '/// get number of pssibole render methods ///'
932 Zuweisen.Click '/// assign every render method ///'
935 EditSelectAll '/// select object ///'
937 Kontext "Drei_D_Effekte"
938 if Modus.GetSelIndex <> i Then Warnlog "- Value for render modus did not change" '/// check if render method has changed ///'
940 Printlog "- Check 3d shadow and surface angle"
941 Drei_DSchatten.Click '/// check 3d shadow ///'
942 Papierneigung.SetText "90 degree(s)"
943 vert = Papierneigung.getText
944 Zuweisen.Click '/// assign shadow ///'
945 gMouseClick 90,90 '/// deselect object ///'
947 EditSelectAll '/// select object ///'
948 Kontext "Drei_D_Effekte"
949 if Papierneigung.GetText <> vert Then Warnlog "- Value for surface angle is not correct" '/// check value changes ///'
950 Entfernung.SetText "10" '/// set distance to 10 ///'
952 hor = Entfernung.getText
955 if Entfernung.GetText <> hor Then Warnlog "- Value for distance is not correct; should: "+hor+"; is: "+Entfernung.GetText
959 ContextPositionAndSize
962 Active.SetPage TabPositionAndSize
963 Kontext "TabPositionAndSize"
964 PositionX.SetText "5,00cm"
965 Posi=PositionX.GetText
966 TabPositionAndSize.OK
968 Kontext "Drei_D_Effekte"
970 Brennweite.SetText "50" '/// set focval length to 50 ///'
972 ContextPositionAndSize '/// check change in position of the object ///'
974 Active.SetPage TabPositionAndSize
975 Kontext "TabPositionAndSize"
976 If PositionX.GetText = Posi Then
977 printlog "- Raising value for focal length has not changed optical appearence of object, ok."
979 warnlog "Problem with focal lenght here!"
981 TabPositionAndSize.OK
983 Kontext "Drei_D_Effekte"
984 Brennweite.SetText "5"
989 ContextPositionAndSize
993 Active.SetPage TabPositionAndSize
994 Kontext "TabPositionAndSize"
996 if PositionX.GetText = Posi Then
997 printlog "- Lowering focus length value has not changed optical appearence of object, ok."
999 warnlog "problem with focus, check!"
1001 TabPositionAndSize.OK
1002 Kontext "Drei_D_Effekte"
1003 printlog "close document"
1004 Drei_D_Effekte.Close
1007 endcase 'tiFormat3D_Effekte
1008 '------------------------------------------------------------------
1009 testcase tdFormatTemplates
1011 qaerrorlog "Not yet ready."
1014 dim Zaehler as integer
1017 dim iWaitIndex as integer
1018 dim sStyleName as string
1019 dim bDouble as boolean
1020 dim sTemp(2) as string
1022 Call hNewDocument '/// new impress document ///'
1025 FormatStylesCatalog '/// format-Style catalog///'
1027 do while Vorlagenkatalog.NotExists AND iWaitIndex < 10
1029 iWaitIndex = iWaitIndex + 1
1032 Kontext "Vorlagenkatalog"
1033 Vorlagen.GetItemCount '/// get item count for templates ///'
1034 Vorlagen.Select 2 '/// select template 2 ///'
1036 if Bereich.GetItemCount = Vorlagen.GetItemCount Then '/// check if area changes when selecting a template ///'
1037 PrintLog " - Area did changed"
1039 WarnLog " Number of entrees should be 2, but it is " + Bereich.GetItemCount
1042 Zaehler = Ansicht.GetItemCount 'Vorlagenliste.GetItemCount
1044 for i = 1 to Zaehler
1045 Ansicht.TypeKeys "<DOWN>" ,i
1046 SetClipboard Ansicht.GetSelText
1049 PrintLog " "+i+": Offset: '" + Vorlagen.GetSelText+"'"
1050 if Bereich.GetItemCount=Vorlagen.GetItemCount Then WarnLog " Range has not changed"
1053 Ansicht.TypeKeys "<HOME>"
1057 PrintLog " : Offset: '"+Vorlagen.GetSelText + "'; Opinion: '" + Ansicht.GetSelText+"'"
1060 Kontext "Vorlagenkatalog"
1065 Vorlagen.Select 1 '/// select first template ///'
1066 if Neu.IsEnabled =False Then WarnLog " Button must be choosable, but is not"
1069 Neu.Click '/// create new template ///'
1071 Active.SetPage TabVerwalten
1072 Kontext "TabVerwalten"
1073 sStyleName = VorlagenName.GetText
1074 printlog " created new style: '"+sStyleName +"'"
1076 PrintLog " New template created"
1077 Kontext "Vorlagenkatalog"
1079 ' find newly created style, because they are alphabetical ordered :-( i have to check every entry :-(((((
1080 Zaehler = Ansicht.GetItemCount
1082 Ansicht.TypeKeys "<home>"
1084 sTemp(1) = Ansicht.GetText
1085 while (sTemp(1) <> sStyleName) AND (i <= Zaehler)
1086 Ansicht.TypeKeys "<DOWN>"
1088 if (i > Zaehler) then ' here we are only, if we didn't found 'our' template
1090 qaErrorLog "There are Double Entries in the list! #111652#"
1092 warnlog " style not found :-(" ' print out the styles...
1094 Ansicht.TypeKeys "<home>"
1096 printlog " "+(x+1)+": "+Ansicht.GetText
1097 if (Loeschen.IsEnabled) then qaErrorLog "^ is delete-able :-)"
1098 Ansicht.TypeKeys "<DOWN>"
1102 sTemp(1) = Ansicht.GetText
1103 if (sTemp(1) = sTemp(2)) then
1109 Ansicht.TypeKeys "<end>"
1110 sTemp(1) = Ansicht.GetText
1111 while (sTemp(1) <> sStyleName) AND (i <= Zaehler)
1112 printlog " "+(i)+": "+sTemp(1)
1113 Ansicht.TypeKeys "<UP>"
1115 if (i > Zaehler) then ' here we are only, if we didn't found 'our' template
1116 warnlog " style not found :-(" ' print out the styles...
1117 Ansicht.TypeKeys "<end>"
1119 printlog " "+(x+1)+": "+Ansicht.GetText
1120 if (Loeschen.IsEnabled) then qaErrorLog "^ is delete-able :-)"
1121 Ansicht.TypeKeys "<UP>"
1124 sTemp(1) = Ansicht.GetText
1127 if (i <= Zaehler) then printlog " found created entry for deleting it :-)"
1128 ' Ansicht.TypeKeys "<DOWN>" ,( i + 1 ) '/// control if template list has created template included ///'
1131 Loeschen.Click '/// delete template ///'
1134 if active.exists then
1135 printlog "ac: "+active.gettext
1139 warnlog "active-Yes doesn't exist :-( WorkInProgress TBO"
1142 PrintLog " Delete did work"
1143 Kontext "Vorlagenkatalog"
1145 WarnLog " Only a new created template can be deleted"
1151 Aendern.Click '/// modify template ///'
1154 Active.SetPage TabSchatten
1155 Kontext "TabSchatten"
1159 Kontext "Vorlagenkatalog"
1161 Verwalten.Click '/// organize templates ///'
1163 Kontext "DVVerwalten"
1167 Kontext "Vorlagenkatalog"
1170 Warnlog " - Style Catalog can't close unless the Template Management-dialog is closed"
1172 PrintLog " FormatStylesCatalog finished" '/// close template catalog ///'
1174 FormatModifyLayout '/// format modify layout ///'
1176 Kontext "Seitenvorlage"
1177 if HintergrundseiteAustauschen.IsChecked=True Then HintergrundseiteAustauschen.UnCheck '/// uncheck switch background page ///'
1178 Laden.Click '/// load ///'
1182 Kontext "Seitenvorlage" '/// choose a page layout ///'
1184 Seitenvorlage.OK '/// close dialog ///'
1186 Call hCloseDocument '/// close document ///'
1188 endcase 'tdFormatTemplates
1189 '-------------------------------------------------------------------------------
1190 testcase tiFormatAufzaehlungszeichen
1193 PrintLog "- Format/Numbering and Bullets"
1197 Kontext "DocumentImpress"
1198 hTextrahmenErstellen ("Hello <Return><Return>",20,20,60,60)
1200 Kontext "DocumentImpress"
1204 FormatNumberingBulletsDraw
1207 Active.SetPage TabBullet
1209 Auswahl.TypeKeys "<Right>", i
1211 Kontext "DocumentImpress"
1214 Kontext "DocumentImpress"
1218 FormatNumberingBulletsDraw
1220 Active.SetPage TabNumerierungsart
1221 Kontext "TabNumerierungsart"
1222 Auswahl.TypeKeys "<Right>", i
1223 TabNumerierungsart.OK
1224 Kontext "DocumentImpress"
1227 Kontext "DocumentImpress"
1230 FormatNumberingBulletsDraw
1232 Active.SetPage TabNumerierungsart
1233 Kontext "TabNumerierungsart"
1234 Auswahl.TypeKeys "<Right>", i
1235 TabNumerierungsart.OK
1236 Kontext "DocumentImpress"
1241 FormatNumberingBulletsDraw
1244 Active.SetPage TabGrafiken
1245 Kontext "TabGrafiken"
1247 Auswahl.TypeKeys "<Right>", i
1249 Kontext "DocumentImpress"
1256 endcase 'tiFormatAufzaehlungszeichen