1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
'*
'* $RCSfile: g_stylist.inc,v $
'*
'* $Revision: 1.1 $
'*
'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:40 $
'*
'* This file is part of OpenOffice.org.
'*
'* OpenOffice.org is free software: you can redistribute it and/or modify
'* it under the terms of the GNU Lesser General Public License version 3
'* only, as published by the Free Software Foundation.
'*
'* OpenOffice.org is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'* GNU Lesser General Public License version 3 for more details
'* (a copy is included in the LICENSE file that accompanied this code).
'*
'* You should have received a copy of the GNU Lesser General Public License
'* version 3 along with OpenOffice.org. If not, see
'* <http://www.openoffice.org/license.html>
'* for a copy of the LGPLv3 License.
'*
'/************************************************************************
'*
'* Owner : wolfram.garten@sun.com
'*
'* short description :
'*
'*******************************************************************
'*
' #1 tFormatStylistFlyer
' #1 tFormatStylistDocuments
' #1 tFormatStylistTemplatesUse
' #1 tFormatStylistTemplateCreate
' #1 tFormatStylistTemplateSelect
' #1 tFormatStylistTemplateNew
' #1 tiFormatStylist
' #1 tFormatStylist
' #1 hWalkTheStyles
'*
'\*******************************************************************
testcase tFormatStylistFlyer
Dim xPos%
Dim yPos%
Dim xSize%
Dim ySize%
printlog " - Format/Stylist : using all possible things to manipulate the flyer"
'/// open application ///'
Call hNewDocument
Kontext "Gestalter"
'/// Check if stylist is there. Expected: not there ///'
if Gestalter.NotExists = false Then
qaErrorLog " - Expected Stylist to be closed; But is Open. Check tests."
else
hTypekeys "<F11>" '/// open stylist by pressing key [F11] ///'
sleep 1
end if
Kontext "Gestalter"
if Gestalter.NotExists then
Warnlog " No stylist popped up using F11; opening now via slotID"
FormatStylist
end if
'///+ save stylist position and size ///'
xPos% = Gestalter.GetPosX
yPos% = Gestalter.GetPosY
xSize% = Gestalter.GetSizeX
ySize% = Gestalter.GetSizeY
'///+ if Stylist is docked; undock ///'
if Gestalter.IsDocked then Gestalter.UnDock
printlog " - '///move stylist ///"
'///+ move stylist to 10,10 ///'
Gestalter.Move 10, 10
Sleep 1
'///+ move stylist to 300,400 ///'
Gestalter.Move 300, 400
Sleep 1
'///+ move stylist to 590,790 ///'
Gestalter.Move 590, 790
Sleep 1
'///+ move stylist back to saved start position ///'
Gestalter.Move xPos%, yPos%
Sleep 1
printlog " - '///size stylist ///"
'///+ change size to 200,200 ///'
Gestalter.Size 200, 200
Sleep 1
'///+ change size to 300,400 ///'
Gestalter.Size 300, 400
Sleep 1
'///+ change size to 150,250 ///'
Gestalter.Size 150, 250
Sleep 1
'///+ change size back to saved size ///'
Gestalter.Size xSize%, ySize%
Sleep 1
printlog " - Close stylist reopen stylist, check if appearence is same as before"
'/// save stylist position and size ///'
xPos% = Gestalter.GetPosX
yPos% = Gestalter.GetPosY
xSize% = Gestalter.GetSizeX
ySize% = Gestalter.GetSizeY
'/// close stylist Format->Stylist ///'
FormatStylist
Sleep 1
'/// open stylist Format->Stylist ///'
FormatStylist
sleep (1)
if xPos% <> Gestalter.GetPosX then Warnlog "The x-Pos. has changed : Should be -> '"+ xPos% + "' Is -> '"+ Gestalter.GetPosX +"'."
if yPos% <> Gestalter.GetPosY then Warnlog "The y-Pos. has changed : Should be -> '"+ yPos% + "' Is -> '"+ Gestalter.GetPosY +"'."
if xSize% <> Gestalter.GetSizeX then Warnlog "The x-Size has changed : Should be -> '"+ xSize% + "' Is -> '"+ Gestalter.GetSizeX +"'."
if ySize% <> Gestalter.GetSizeY then Warnlog "The y-Size has changed : Should be -> '"+ ySize% + "' Is -> '"+ Gestalter.GetSizeY +"'."
printlog " - dock stylist"
'/// dock stylist ///'
Gestalter.Dock
Sleep 1
if (NOT Gestalter.IsDocked) then
warnlog " stylist not docked but should"
endif
'/// UNdock stylist ///'
if (Gestalter.IsDocked) Then
Gestalter.UnDock
endif
Sleep 1
printlog " - maximize/minimize stylist"
'/// minimize stylist ///'
Gestalter.Minimize
Sleep 1
'/// maximize stylist ///'
Gestalter.Maximize
Sleep 1
if (NOT Gestalter.IsMax) then
warnlog " The stylist did not return to maximized state"
endif
'/// close stylist ///'
Gestalter.Close
Call hCloseDocument
endcase 'tFormatStylistFlyer
'--------------------------------------------------------
testcase tFormatStylistDocuments
Dim xPos% as Integer
Dim yPos% as Integer
Dim xSize% as Integer
Dim ySize% as Integer
printlog " - Format/Stylist : check methods with more than 1 document"
Call hNewDocument
printlog " - Open stylist, check stylist in another document"
FormatStylist
Call hNewDocument
Kontext "Gestalter"
if (Gestalter.NotExists) then
warnlog " There is no stylist in the new document"
FormatStylist
endif
printlog " - Close all documents, reopen 1"
FileClose
Sleep 2
FileClose
Sleep 2
hNewDocument
Kontext "Gestalter"
if (Gestalter.NotExists) then
warnlog " There is no stylist in the new document"
endif
printlog " - stylist in a document docked, in a new rechecked"
Gestalter.Dock
Sleep 3
hNewDocument
sleep 3
Kontext "Gestalter"
if NOT Gestalter.IsDocked then
warnlog " In the new document is the stylist not docked"
endif
printlog " - Close all documents, reopen one and check the docked stylist"
FileClose
Sleep 2
FileClose
Sleep 2
Kontext "Gestalter"
hNewDocument
Kontext "Gestalter"
if NOT Gestalter.IsDocked then
warnlog " In the new document is the stylist not docked"
endif
printlog " - Close stylist using F11"
Gestalter.Undock
Sleep 1
hTypeKeys "<F11>"
Kontext "Gestalter"
if Gestalter.exists then
warnlog " Stylist still exists - closing again"
Gestalter.Close
end if
Call hCloseDocument
endcase 'tFormatStylistDocuments
'--------------------------------------------------------
testcase tFormatStylistTemplatesUse
Dim i as Integer
Dim save as integer
printlog "- Format/Stylist : use all templates"
hNewDocument
sleep 1
FormatStylist
sleep 1
Kontext "Gestalter"
if (Gestalter.NotExists) then
warnlog " There is no stylist open, trying again now"
FormatStylist
endif
printlog " - Presentation-templates"
if (Lcase (gApplication) = "IMPRESS") then
TBGestalter.Click Praesentationsvorlagen
endif
save = Gruppenliste.GetSelIndex
for i=1 to Gruppenliste.GetItemCount
Gruppenliste.Select i
Sleep 1
next i
TBGestalter.Click Grafikvorlagen
Sleep 2
printlog " - Graphic-templates"
for i=1 to Gruppenliste.GetItemCount
Gruppenliste.Select i
Sleep 1
next i
sleep 1
Gruppenliste.Select save
Gestalter.Close
sleep 3
Call hCloseDocument
endcase 'tFormatStylistTemplatesUse
'--------------------------------------------------------
testcase tFormatStylistTemplateCreate
goto endsub
dim i
dim Zaehler
printlog "- Format/stylist :Create template and use it"
Call hNewDocument
sleep 3
printlog " - create template for paragraph"
FormatStylesCatalog
Kontext "VorlagenKatalog"
sleep 2
printlog " " + Vorlagen.GetItemCount
Vorlagen.Select 1
sleep 3
Neu.Click
sleep 2
Kontext
Active.SetPage TabVerwalten
Kontext "TabVerwalten"
VorlagenName.SetText "ATesttool"
TabVerwalten.OK
sleep 2
Kontext "VorlagenKatalog"
sleep 1
VorlagenKatalog.Close
sleep 1
Printlog " - New created template will be deleted now"
FormatStylesCatalog
sleep 1
Kontext "Vorlagenkatalog"
sleep 1
Vorlagen.Select 1
sleep 1
zaehler=Ansicht.getItemCount
i=0
do
inc i
loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler))
if i>zaehler then
warnlog " error"
endif
Ansicht.Select i
sleep 1
Ansicht.TypeKeys "<SPACE>"
sleep 1
Loeschen.Click
Kontext "Active"
Active.Yes
sleep 1
Kontext "Vorlagenkatalog"
Vorlagenkatalog.Close
sleep 1
Kontext "DocumentDraw"
gMouseClick 90,90
sleep 1
Call hCloseDocument
sleep 1
endcase 'tFormatStylistTemplateCreate
'--------------------------------------------------------
testcase tFormatStylistTemplateSelect
dim i as integer
dim sListDown(21) as string
dim sListUp(21) as string
dim sTemp as string
printlog " - Format/Stylist : select template"
Call hNewDocument
hTextrahmenErstellen ("This is a formatted text <Shift Home>",20,20,80,30)
printlog " - format text"
FormatCharacter
Kontext
Active.SetPage TabFont
Kontext "TabFont"
TabFont.OK
printlog " - choose format using stylist"
FormatStylist
Kontext "Gestalter"
sleep 1
' going from bottom to top
Vorlagenliste.TypeKeys "<End>"
for i = 1 to 20
ListAppend(sListUp(), Vorlagenliste.GetText)
Vorlagenliste.TypeKeys "<Up>"
next i
' going from top to bottom
Vorlagenliste.TypeKeys "<Home>"
for i = 1 to 20
ListAppend(sListDown(), Vorlagenliste.GetText)
Vorlagenliste.TypeKeys "<Down>"
next i
' delete double entries in both lists (up/down)
sTemp = sListUp(20)
for i = 19 to 1 step -1
if (sListUp(i) = sTemp) then
printlog i
ListDelete(sListUp(), i+1)
endif
sTemp = sListUp(i)
next i
sTemp = sListDown(20)
for i = 19 to 1 step -1
if (sListDown(i) = sTemp) then
ListDelete(sListDown(), i+1)
endif
sTemp = sListDown(i)
next i
' if there are double entries...
if (ListCount(sListUp()) <> ListCount(sListDown())) then
if (iSprache = 82) then ' WorkAround BUG: #111652#
warnLog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
elseif (iSprache = 07) then
warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA
else
warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
endif
for i = ListCount(sListUp()) to 1 step -1
printlog "* " + i + ": '" + sListUp(i) + "'"
next i
endif
' here this method has to stay, because it will also find some errors;
' the method, that works even with an error in the list is shown in testcase tFormatStylistTemplateNew
hDoubleClickInList ( Vorlagenliste, glLocale (3) )
Gestalter.Close
printlog " - check Format"
FormatArea
Kontext
Active.SetPage TabArea
Kontext "TabArea"
'TODO: TBO check criteria, that right template is used....
' ???? if Farbe.IsChecked then Printlog "Standard template is used"
TabArea.OK
sleep 2
hCloseDocument
endcase 'tFormatStylistTemplateSelect
'---------------------------------------------------------
testcase tFormatStylistTemplateNew
dim sListDown(21) as string
dim sListUp(21) as string
dim sTemp as string
dim i as integer
printlog "- Format/Stylist : New template from selection"
Call hNewDocument
hTextrahmenErstellen ("This text will soon be formatted and thereafter made as template",20,20,80,40)
sleep 1
hTypeKeys "<Return><Up><Shift End>"
FormatCharacter
Kontext
Active.SetPage TabFont
Kontext "TabFont"
TabFont.OK
printlog " - Create template from selection"
FormatStylist
Kontext "Gestalter"
TBGestalter.Click Grafikvorlagen
Sleep 1
TBGestalterRight.Click AusSelektion
Kontext "VorlageErzeugen"
VorlagenName.SetText "Testtool"
VorlageErzeugen.OK
printlog " - assign new graphic template to selected text"
hTextrahmenErstellen ("This is another text",40,40,70,50)
hTypeKeys "<Return><Up><Shift End>"
Kontext "Gestalter"
TBGestalter.Click Grafikvorlagen
sleep 1
' test BUG: #111652# ' find illegal double entries in template list
' going from bottom to top
Vorlagenliste.TypeKeys "<End>"
for i = 1 to 20
sTemp = Vorlagenliste.GetText
ListAppend(sListUp(), sTemp)
Vorlagenliste.TypeKeys "<Up>"
next i
' going from top to bottom
Vorlagenliste.TypeKeys "<Home>"
for i = 1 to 20
ListAppend(sListDown(), Vorlagenliste.GetText)
Vorlagenliste.TypeKeys "<Down>"
next i
' delete double entries in both lists (up/down)
sTemp = sListUp(20)
for i = 19 to 1 step -1
if (sListUp(i) = sTemp) then
ListDelete(sListUp(), i+1)
endif
sTemp = sListUp(i)
next i
sTemp = sListDown(20)
for i = 19 to 1 step -1
if (sListDown(i) = sTemp) then
ListDelete(sListDown(), i+1)
endif
sTemp = sListDown(i)
next i
' if any double entries...
if (ListCount(sListUp()) <> ListCount(sListDown())) then
if (iSprache = 82) then ' WorkAround BUG: #111652#
warnLog "82: There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
elseif (iSprache = 07) then
warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA
else
warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
for i = ListCount(sListDown()) to 1 step -1
printlog " - " + i + " " + sListDown(i)
next i
for i = ListCount(sListUp()) to 1 step -1
printlog " - " + i + " " + sListUp(i)
next i
endif
endif
Vorlagenliste.TypeKeys "<End>"
i = 0
do
inc i
sTemp = Vorlagenliste.GetText
Vorlagenliste.TypeKeys "<Up>"
loop while (("Testtool" <> sTemp) AND (i<20))
Vorlagenliste.TypeKeys "<Return>"
Kontext "Gestalter"
Gestalter.Close
Printlog " - check template"
FormatCharacter
Kontext
Active.SetPage TabFont
Kontext "TabFont"
TabFont.OK
hTypeKeys ("<escape>",2)
hCloseDocument
endcase 'tFormatStylistTemplateNew
'--------------------------------------------------------
testcase tiFormatStylist
Dim Num1 as integer ' graphics : first line indent ; the one with 0,6cm in the summary
Dim Num2 as integer ' presentations : background ; just one tabpage pops up: Area
Dim Num3 as integer ' : background objects ; Line pops up
Dim Num4 as integer ' : notes ; font 20
Dim Num5 as integer ' : outline 1 ; where 9 items exist of
select case iSprache
case 01: Num1 = 3 : Num2 = 1 : Num3 = 2 : Num4 = 3 : Num5 = 4
case 07: Num1 = 3 : Num2 = 4 : Num3 = 2 : Num4 = 3 : Num5 = 1 'Russian TODO -FHA
case 31: Num1 = 1 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 5
case 33: Num1 = 3 : Num2 = 1 : Num3 = 3 : Num4 = 2 : Num5 = 5
case 34: Num1 = 2 : Num2 = 10 : Num3 = 12 : Num4 = 3 : Num5 = 4
case 36: Num1 = 2 : Num2 = 3 : Num3 = 4 : Num4 = 10 : Num5 = 6
case 39: Num1 = 2 : Num2 = 3 : Num3 = 2 : Num4 = 1 : Num5 = 5
case 45: Num1 = 11 : Num2 = 2 : Num3 = 2 : Num4 = 13 : Num5 = 5
case 46: Num1 = 2 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 4
case 48: Num1 = 11 : Num2 = 13 : Num3 = 11 : Num4 = 1 : Num5 = 5
case 49: Num1 = 1 : Num2 = 10 : Num3 = 11 : Num4 = 14 : Num5 = 1
case 55: Num1 = 4 : Num2 = 12 : Num3 = 11 : Num4 = 10 : Num5 = 1
' case 81: Num1 = 9 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 1 Asian languages not testable, because locale dependant :-(
' case 82: Num1 = 6 : Num2 = 11 : Num3 = 12 : Num4 = 10 : Num5 = 1
' case 86: Num1 = 15 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 2
' case 88: Num1 = 4 : Num2 = 13 : Num3 = 14 : Num4 = 3 : Num5 = 4
case else :
if (bAsianLan = FALSE) then
Warnlog "For the language " + iSprache +" nothing is prepared yet: find numbers of entries in stylist and insert here"
else
qaErrorLog "The Asian-office-languages aren't supported yet."
endif
goto endsub
end select
Call hNewDocument
sleep 2
Kontext "Gestalter"
if Gestalter.Exists Then
Warnlog "- Stylist exists, perhaps not closed last time a Impress doc was open"
Gestalter.Close
end if
sleep 1
FormatStylist
Kontext "Gestalter"
Grafikvorlagen.Click
sleep 1
Vorlagenliste.Select Num1 ' num1
sleep 1
Printlog "- open Grafic template Dialogs using the context menue , checking if all resources exist"
Vorlagenliste.OpenContextMenu
sleep 1
hMenuSelectNr (2)
sleep 1
call hWalkTheStyles
Kontext
Messagebox.SetPage TabText
Kontext "TabText"
sleep 1
TabText.Cancel
sleep 1
if (Ucase(gApplication) = "IMPRESS") AND (iSprache <> 07) then 'Russian TODO -FHA
Kontext "Gestalter"
Printlog "- presentation templates"
sleep 1
Praesentationsvorlagen.Click
Vorlagenliste.Select Num2
sleep 1
Vorlagenliste.OpenContextMenu
sleep 1
hMenuSelectNr (1)
sleep 1
Kontext
if Messagebox.exists (5) then
try
' Messagebox.SetPage TabArea
Kontext "TabArea"
if TabArea.Exists = false then
warnlog "Where is TabArea?"
else
Printlog "TabArea exists, good."
TabArea.Cancel
endif
catch
warnlog "there might be another systemlocale -> I can't select the entries in the stylist via numbers :-("
endcatch
else
warnlog "tab area/Messagebox doesn't exist :-("
endif
Kontext "Gestalter"
sleep 1
Vorlagenliste.Select Num3
sleep 1
Vorlagenliste.OpenContextMenu
sleep 1
hMenuSelectNr (1)
sleep 1
call hWalkTheStyles (1,1)
Kontext
Messagebox.SetPage TabEinzuegeUndAbstaende
Kontext "TabEinzuegeUndAbstaende"
sleep 1
TabEinzuegeUndAbstaende.Cancel
sleep 1
Kontext "Gestalter"
sleep 1
Vorlagenliste.Select Num4
sleep 1
Vorlagenliste.OpenContextMenu
sleep 1
hMenuSelectNr (1)
sleep 1
Kontext
Messagebox.SetPage TabFont
kontext "TabFont"
Kontext
Messagebox.SetPage TabFontEffects
kontext "TabFontEffects"
Kontext
Messagebox.SetPage TabEinzuegeUndAbstaende
kontext "TabEinzuegeUndAbstaende"
sleep 1
TabEinzuegeUndAbstaende.Cancel
sleep 1
Kontext "Gestalter"
sleep 1
Vorlagenliste.Select Num5
sleep 1
Vorlagenliste.OpenContextMenu
sleep 1
hMenuSelectNr (1)
sleep 1
Kontext
Messagebox.SetPage TabFont
kontext "TabFont"
Kontext
Messagebox.SetPage TabFontEffects
kontext "TabFontEffects"
Kontext
Messagebox.SetPage TabEinzuegeUndAbstaende
kontext "TabEinzuegeUndAbstaende"
sleep 1
Kontext
Messagebox.SetPage TabBullet
Kontext "TabBullet"
sleep 1
Kontext
Messagebox.SetPage TabNumerierungsart
Kontext "TabNumerierungsart"
sleep 1
Kontext
Messagebox.SetPage TabGrafiken
Kontext "TabGrafiken"
sleep 1
Kontext
Messagebox.SetPage TabOptionenNumerierung
Kontext "TabOptionenNumerierung"
sleep 1
TabOptionenNumerierung.Cancel
sleep 1
endif
hTypeKeys "<F11>"
sleep 1
Kontext "Gestalter"
if Gestalter.Exists Then Warnlog "- Stylist could not be closed pressing F11"
Call hCloseDocument
endcase 'tiFormatStylist
'---------------------------------------------------------
sub hWalkTheStyles (optional a as integer,optional b as integer)
' TODO: TBO DialogTest should go to Recource test!
dim i as integer
if isMissing (a) then a=1
if isMissing (b) then b=2
i=1
if a <= i AND i <= b then
Kontext
Messagebox.SetPage TabLinie
kontext "TabLinie"
Call DialogTest ( TabLinie )
Kontext
Messagebox.SetPage TabArea
kontext "TabArea"
Call DialogTest ( TabArea, 1 )
FillOptions.Select 1 ' NoFill.Check
Call DialogTest ( TabArea, 1 )
FillOptions.Select 2
Call DialogTest ( TabArea, 2 )
FillOptions.Select 3
Call DialogTest ( TabArea, 3 )
FillOptions.Select 4
Call DialogTest ( TabArea, 4 )
FillOptions.Select 5
Call DialogTest ( TabArea, 5 )
Kontext
Messagebox.SetPage TabSchatten
kontext "TabSchatten"
Anzeigen.check
Call DialogTest ( TabSchatten )
Kontext
Messagebox.SetPage TabTransparenz
kontext "TabTransparenz"
KeineTransparenz.Check
LineareTransparenz.Check
Transparenzverlauf.Check
Kontext
Messagebox.SetPage TabFont
kontext "TabFont"
Call DialogTest ( TabFont )
Kontext
Messagebox.SetPage TabFontEffects
kontext "TabFontEffects"
Kontext
Messagebox.SetPage TabEinzuegeUndAbstaende
kontext "TabEinzuegeUndAbstaende"
Call DialogTest ( TabEinzuegeUndAbstaende )
endif
i=2
if a <= i AND i <= b then
Kontext
Messagebox.SetPage TabVerwalten
kontext "TabVerwalten"
Call DialogTest ( TabVerwalten )
Kontext
Messagebox.SetPage TabText
Kontext "TabText"
Call DialogTest ( TabText )
Kontext
Messagebox.SetPage TabLauftext
Kontext "TabLauftext"
Call DialogTest ( TabLauftext )
Kontext
Messagebox.SetPage TabBemassung
Kontext "TabBemassung"
Call DialogTest ( TabBemassung )
Kontext
Messagebox.setpage TabVerbinder
Kontext "TabVerbinder"
Call Dialogtest ( TabVerbinder )
Kontext
Messagebox.setpage TabAusrichtungAbsatz
Kontext "TabAusrichtungAbsatz"
Links.Check
Rechts.Check
Zentriert.Check
Blocksatz.Check
Kontext
Messagebox.setpage TabTabulator
Kontext "TabTabulator"
Neu.click
AlleLoeschen.click
Neu.click
Loeschen.click
endif
i=3
if a <= i AND i <= b then
Kontext
Messagebox.SetPage TabBullet
Kontext "TabBullet"
sleep 1
Call DialogTest (TabBullet)
sleep 1
Kontext
Messagebox.SetPage TabNumerierungsart
Kontext "TabNumerierungsart"
sleep 1
Call DialogTest (TabNumerierungsart)
sleep 1
Kontext
Messagebox.SetPage TabGrafiken
Kontext "TabGrafiken"
sleep 1
Call DialogTest (TabGrafiken)
sleep 1
Kontext
Messagebox.SetPage TabOptionenNumerierung
Kontext "TabOptionenNumerierung"
sleep 1
Call DialogTest (TabOptionenNumerierung)
sleep 1
endif
end sub 'hWalkTheStyles
'---------------------------------------------------------
testcase tFormatStylist
Dim sTemp as String
dim sSettings(20,3) ' control_name; control_type; value
dim i as integer
dim abctemp
Call hNewDocument
sleep 5
hTextrahmenErstellen ("I hate mondays...",20,20,80,40)
sleep 1
FormatStylist
sleep 1
Kontext "Stylist"
if (Stylist.NotExists) then
qaErrorLog "There is no stylist open, trying again now"
FormatStylist
endif
sleep 1
Vorlagenliste.TypeKeys "<End>"
Vorlagenliste.TypeKeys "<Up>"
Vorlagenliste.TypeKeys "<Up>"
sleep 1
Vorlagenliste.OpenContextMenu
sleep 1
hMenuSelectNr 1
sleep 1
Kontext
if Messagebox.exists (5) then
Messagebox.SetPage TabVerwalten
Kontext "TabVerwalten"
VorlagenName.SetText "1Newtheme"
sTemp = VorlagenName.getText
VerknuepftMit.getSelText
Bereich.getSelText
TabVerwalten.OK
endif
sleep 1
Kontext "Stylist"
hSelectInList(Vorlagenliste,sTemp)
sleep 1
Vorlagenliste.OpenContextMenu
sleep 1
hMenuSelectNr 2
sleep 1
Kontext
if Messagebox.exists (5) then
Messagebox.SetPage TabVerwalten
Kontext "TabVerwalten"
VorlagenName.setText("1Test")
TabVerwalten.OK
endif
sleep 1
' hTextrahmenErstellen ("I hate mondays..., too",60,60,80,60)
' sleep 1
' FormatArea
' i = 1
' kontext "tabArea"
'' temp = Hatching
' abctemp = 666666
' printlog isobject(abctemp)
' printlog isnumeric(abctemp)
' sSettings(i,1) = Hatching
' printlog isobject(sSettings(i,1))
' printlog isnumeric(sSettings(i,1))
' sSettings(i,2) = "CheckBox"
' sSettings(i,3) = True
' inc (i)
'' printlog " " + i
' dim asgc as boolean
' asgc = true
'' hWalkTheStyles2(asgc, sSettings(), temp)
' ' hWalkTheStyles2(abctemp)
' Kontext "TabArea"
' TabArea.OK
Kontext "Stylist"
if (Stylist.NotExists) then
ErrorLog "There is no stylist open, should be."
else
hTypekeys "<F11>"
Kontext "Stylist"
if (Stylist.Exists) then
ErrorLog "The Stylist should be closed now."
endif
endif
Call hCloseDocument
endcase 'tFormatStylist
'--------------------------------------------------------
function hSelectInList (window, sEntry as String) as Boolean
Dim i as Integer
Dim sTemp as String
Dim sLastTemp as String
window.TypeKeys "<End>"
sTemp = ""
do
sLastTemp = sTemp
sTemp = window.GetText
window.TypeKeys "<Up>"
loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp))
if (sEntry = sTemp) then
window.TypeKeys "<Return>"
hSelectInList = TRUE
else
hSelectInList = FALSE
endif
end function 'hSelectInList
'---------------------------------------------------------
function hWalkTheStyles2 (atemp)
'function hWalkTheStyles2 (bSet as boolean, aSettings(), atemp as variant) as string
dim i as integer
dim x as integer
dim itemp
dim bSet
dim aSettings(5,5)
' dim atemp
i=1
Kontext
printlog aSettings(i,3)
printlog aSettings(i,2)
printlog val(aSettings(i,1))
printlog atemp
Messagebox.SetPage TabArea
kontext "TabArea"
'press button standard :-))))))
atemp = Hatching
printlog atemp
if aSettings(i,3) then
itemp = val(aSettings(i,1))
printlog isobject(atemp)
printlog isNumeric(atemp)
Hatching.check
atemp.check
else
' aSettings(i,1).Uncheck
endif
'print "baeh"
i=2
Kontext
Messagebox.SetPage TabSchatten
kontext "TabSchatten"
Kontext
Messagebox.SetPage TabVerwalten
kontext "TabVerwalten"
i=2
Kontext
Messagebox.SetPage TabLinie
kontext "TabLinie"
'Context: *Line; Line Styles; Arrow Styles
i=3
Kontext
Messagebox.SetPage TabArea
kontext "TabArea"
'Context: *Area; *Shadow; Transparency; Colors; Gradients; Hatching; Bitmaps
i=4
Kontext
Messagebox.SetPage TabSchatten
kontext "TabSchatten"
i=5
Kontext
Messagebox.SetPage TabTransparenz
kontext "TabTransparenz"
i=6
Kontext
Messagebox.SetPage TabFont
kontext "TabFont"
'Context: *Font; *Font Effect; Position
i=7
Kontext
Messagebox.SetPage TabFontEffects
kontext "TabFontEffects"
i=8
Kontext
Messagebox.SetPage TabEinzuegeUndAbstaende
kontext "TabEinzuegeUndAbstaende"
'Context: *Indents & Spacing; *Alignment; *Tabs
i=9
Kontext
Messagebox.SetPage TabText
Kontext "TabText"
'Context: *Text; *Text Animation
i=10
Kontext
Messagebox.SetPage TabLauftext
Kontext "TabLauftext"
i=11
Kontext
Messagebox.SetPage TabBemassung
Kontext "TabBemassung"
i=12
Kontext
Messagebox.setpage TabVerbinder
Kontext "TabVerbinder"
i=13
Kontext
Messagebox.setpage TabAusrichtungAbsatz
Kontext "TabAusrichtungAbsatz"
i=14
Kontext
Messagebox.setpage TabTabulator
Kontext "TabTabulator"
' Messagebox.SetPage TabBullet
' Kontext "TabBullet"
' sleep 1
' Call DialogTest (TabBullet)
' sleep 1
' Kontext
' Messagebox.SetPage TabNumerierungsart
' Kontext "TabNumerierungsart"
' sleep 1
' Call DialogTest (TabNumerierungsart)
' sleep 1
' Kontext
' Messagebox.SetPage TabGrafiken
' Kontext "TabGrafiken"
' sleep 1
' Call DialogTest (TabGrafiken)
' sleep 1
' Kontext
' Messagebox.SetPage TabOptionenNumerierung
' Kontext "TabOptionenNumerierung"
' sleep 1
' Call DialogTest (TabOptionenNumerierung)
' sleep 1
end function 'hWalkTheStyles2
|