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
|
'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: w_insertgraphic4.inc,v $
'*
'* $Revision: 1.2 $
'*
'* last change: $Author: vg $ $Date: 2008-08-18 12:31:06 $
'*
'* 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 : helge.delfs@sun.com
'*
'* short description : Test of the insert graphic function - 4
'*
'************************************************************************
'*
' #1 tInsertGraphic_31 'Test Alignment via format/graphic: Anchor to paragraph -> Left, centered, right, top, center, bottom
' #1 tInsertGraphic_32 'Test Alignment via format/graphic: Anchor to page -> Left, centered, right, top, center, bottom
' #1 tInsertGraphic_33 'Test Alignment via format/graphic: Anchor to character -> Left, centered, right, top, center, bottom
' #1 tInsertGraphic_34 'Test Alignment via format/graphic: Anchor as character -> top, center, bottom of baseline
' #1 tInsertGraphic_35 'Test Wrap via format/graphic : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph
' #1 tInsertGraphic_36 'Test original size
' #1 tInsertGraphic_37 'Test keep ratio
' #1 tInsertGraphic_38 'Check the graphic name in Navigator
' #1 tInsertGraphic_39 'Test checkbox 'Position' in protect area
' #1 tInsertGraphic_40 'Test checkbox 'Print' in Property area"
' #1 tInsertGraphic_41 'Test checkbox 'Keep image size'
' #1 tInsertGraphic_42 'Test checkbox 'Keep scale'
'*
'\***********************************************************************
testcase tInsertGraphic_31
Dim iLeft as Integer
Dim iRight as Integer
Dim iCenterHorizontal as Integer
Dim iTop as Integer
Dim iBottom as Integer
Dim iCenterVertical as Integer
iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
iTop = 1 : iBottom = 2 : iCenterVertical = 3
PrintLog "- Test Alignment via format/graphic: Anchor to paragraph -> Left, centered, right, top, center, bottom"
'/// Test Alignment via format/graphic: Anchor to paragraph -> Left, centered, right, top, center, bottom
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
PrintLog " Left:"
'/// Format / Graphic tabpage Type ,
'/// + Anchor to paragraph , and set Horizontal to left
fFormatGraphic("TabType")
Kontext "TabType"
AnchorAtparagraph.Check
Horizontal.Select iLeft
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Kontext "TabType"
Sleep 1
if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Centered:"
'/// Format / Graphic tabpage Type
'/// + Anchor to paragraph , and set Horizontal to Centered
fFormatGraphic("TabType")
Kontext "TabType"
AnchorAtparagraph.Check
Horizontal.Select iCenterHorizontal
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
Kontext "TabType"
if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Right:"
'/// Format / Graphic tabpage Type
'/// + Anchor to paragraph , and set Horizontal to Right
fFormatGraphic("TabType")
Kontext "TabType"
AnchorAtparagraph.Check
Horizontal.Select iRight
TabType.OK
sleep(1)
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
Kontext "TabType"
if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Top:"
'/// Format / Graphic tabpage Type
'/// + Anchor to paragraph , and set Vertical to top
fFormatGraphic("TabType")
Kontext "TabType"
AnchorAtparagraph.Check
Vertical.Select iTop
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
Kontext "TabType"
if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
PrintLog " Center:"
'/// Format / Graphic tabpage Type
'/// + Anchor to paragraph , and set Vertical to Center
fFormatGraphic("TabType")
Kontext "TabType"
AnchorAtparagraph.Check
Vertical.Select iCenterVertical
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! #bug110281"
TabType.Cancel
PrintLog " Bottom:"
'/// Format / Graphic tabpage Type
'/// + Anchor to paragraph , and set Vertical to Bottom
fFormatGraphic("TabType")
AnchorAtparagraph.Check
Vertical.Select iBottom
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_32
Dim iLeft as Integer
Dim iRight as Integer
Dim iCenterHorizontal as Integer
Dim iTop as Integer
Dim iBottom as Integer
Dim iCenterVertical as Integer
iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
iTop = 1 : iBottom = 2 : iCenterVertical = 3
PrintLog "- Test Alignment via format/graphic: Anchor to page -> Left, centered, right, top, center, bottom"
'/// Test Alignment via format/graphic: Anchor to page -> Left, centered, right, top, center, bottom
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
PrintLog " Left:"
'/// Format / Graphic tabpage Type
'/// + Anchor to page , and set Horizontal to left
fFormatGraphic("TabType")
AnchorAtPage.Check
Horizontal.Select iLeft
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Centered:"
'/// Format / Graphic tabpage Type
'/// + Anchor to page , and set Horizontal to Centered
fFormatGraphic("TabType")
AnchorAtPage.Check
Horizontal.Select iCenterHorizontal
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Right:"
'/// Format / Graphic tabpage Type
'/// + Anchor to page , and set Horizontal to Right
fFormatGraphic("TabType")
AnchorAtPage.Check
Horizontal.Select iRight
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Top:"
'/// Format / Graphic tabpage Type
'/// + Anchor to page , and set Vertical to top
fFormatGraphic("TabType")
AnchorAtPage.Check
Vertical.Select iTop
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
PrintLog " Center:"
'/// Format / Graphic tabpage Type
'/// + Anchor to page , and set Vertical to Center
fFormatGraphic("TabType")
AnchorAtPage.Check
Vertical.Select iCenterVertical
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
PrintLog " Bottom:"
'/// Format / Graphic tabpage Type
'/// + Anchor to page , and set Vertical to Bottom
fFormatGraphic("TabType")
AnchorAtPage.Check
Vertical.Select iBottom
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_33
Dim iLeft as Integer
Dim iRight as Integer
Dim iCenterHorizontal as Integer
Dim iTop as Integer
Dim iBottom as Integer
Dim iCenterVertical as Integer
iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
iTop = 1 : iBottom = 2 : iCenterVertical = 4
PrintLog "- Test Alignment via format/graphic: Anchor to character -> Left, centered, right, top, center, bottom"
'/// Test Alignment via format/graphic: Anchor to character -> Left, centered, right, top, center, bottom
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
PrintLog " Left:"
'/// Format / Graphic tabpage Type
'/// + Anchor At Character , and set Horizontal to left
fFormatGraphic("TabType")
AnchorAtCharacter.Check
Horizontal.Select iLeft
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Centered:"
'/// Format / Graphic tabpage Type
'/// + Anchor At Character , and set Horizontal to Centered
fFormatGraphic("TabType")
AnchorAtCharacter.Check
Horizontal.Select iCenterHorizontal
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Right:"
'/// Format / Graphic tabpage Type
'/// + Anchor At Character , and set Horizontal to Right
fFormatGraphic("TabType")
AnchorAtCharacter.Check
Horizontal.Select iRight
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
TabType.Cancel
PrintLog " Top:"
'/// Format / Graphic tabpage Type
'/// + Anchor At Character , and set Vertical to top
fFormatGraphic("TabType")
AnchorAtCharacter.Check
Vertical.Select iTop
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
PrintLog " Center:"
'/// Format / Graphic tabpage Type
'/// + Anchor At Character , and set Vertical to Center
fFormatGraphic("TabType")
AnchorAtCharacter.Check
Vertical.Select iCenterVertical
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
if Vertical.GetSelIndex <> iCenterVertical then
if iSprache = 82 then
QAErrorlog "#i59378#Missing vertical position in in Format-Picture-dialog"
else
if Vertical.GetItemCount <> 6 then
QAErrorlog "#i59378#Missing vertical position in in Format-Picture-dialog"
else
Warnlog "The graphic's Vertical option is not correct ! "
end if
end if
end if
TabType.Cancel
PrintLog " Bottom:"
'/// Format / Graphic tabpage Type
'/// + Anchor At Character , and set Vertical to Bottom
fFormatGraphic("TabType")
AnchorAtCharacter.Check
Vertical.Select iBottom
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_34
Dim iTop as Integer
Dim iBottom as Integer
Dim iCenterVertical as Integer
iTop = 1 : iBottom = 2 : iCenterVertical = 3
PrintLog "- Test Alignment via format/graphic: Anchor as character -> top, center, bottom of baseline"
'/// Test Alignment via format/graphic: Anchor as character -> top, center, bottom of baseline
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
PrintLog " Base line at top:"
'/// Format / Graphic tabpage Type
'/// + Anchor as character , and set Base line at top
fFormatGraphic("TabType")
Sleep 1
AnchorAsCharacter.Check
Vertical.Select iTop
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAsCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'As character' !"
if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
PrintLog " Base line at center:"
'/// Format / Graphic tabpage Type
'/// + Anchor as character , and set Base line at center
fFormatGraphic("TabType")
Sleep 1
AnchorAsCharacter.Check
Vertical.Select iCenterVertical
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAsCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'As character' !"
if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
PrintLog " Base line at bottom:"
'/// Format / Graphic tabpage Type
'/// + Anchor as character , and set Base line at bottom
fFormatGraphic("TabType")
Sleep 1
AnchorAsCharacter.Check
Vertical.Select iBottom
TabType.OK
'/// Check the graphic position
fFormatGraphic("TabType")
Sleep 1
if AnchorAsCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'As character' !"
if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
TabType.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_35
PrintLog "- Test Wrap via dialog : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph"
'/// <b> Test Wrap via dialog , including </b>
'/// +<b> none, Page Wrap, Optimal Page Wrap, Contour Wrap, </b>
'/// +<b> Wrap through, in Background, first paragraph </b>
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
PrintLog " 1. No Wrap:"
'/// Format / Graphic / tabpage Wrap - No page
fFormatGraphic("TabUmlauf")
Sleep 1
Kein.Check
TabUmlauf.OK
fFormatGraphic("TabUmlauf")
Sleep 1
if Kein.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
TabUmlauf.Cancel
PrintLog " 2. Page Wrap:"
'/// Format / Graphic / tabpage Wrap - Page Wrap
fFormatGraphic("TabUmlauf")
Sleep 1
Parallel.Check
TabUmlauf.OK
fFormatGraphic("TabUmlauf")
Sleep 1
if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
TabUmlauf.Cancel
PrintLog " 3. Optimal Page Wrap:"
'/// Format / Graphic / tabpage Wrap - Optimal Page Wrap
fFormatGraphic("TabUmlauf")
Sleep 1
Dynamisch.Check
TabUmlauf.OK
fFormatGraphic("TabUmlauf")
Sleep 1
if Dynamisch.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
TabUmlauf.Cancel
PrintLog " 4. Wrap through:"
'/// Format / Graphic / tabpage Wrap - Wrap through
fFormatGraphic("TabUmlauf")
Sleep 1
Durchlauf.Check
TabUmlauf.OK
fFormatGraphic("TabUmlauf")
Sleep 1
if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
TabUmlauf.Cancel
PrintLog " 5. In Background:"
'/// Format / Graphic / tabpage Wrap - In Background
fFormatGraphic("TabUmlauf")
Sleep 1
Durchlauf.Check
ImHintergrund.Check
TabUmlauf.OK
fFormatGraphic("TabUmlauf")
Sleep 1
if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
if ImHintergrund.IsChecked <> TRUE then Warnlog "Background configuration is wrong !"
TabUmlauf.Cancel
PrintLog " 6. first paragraph:"
'/// Format / Graphic / tabpage Wrap - first paragraph
fFormatGraphic("TabUmlauf")
Sleep 1
Parallel.Check
ErsterAbsatz.Check
TabUmlauf.OK
fFormatGraphic("TabUmlauf")
Sleep 1
if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
if ErsterAbsatz.IsChecked <> TRUE then Warnlog "first paragraph configuration is wrong !"
TabUmlauf.Cancel
PrintLog " 7. Contour:"
'/// Format / Graphic / tabpage Wrap - first paragraph
FormatWrapPageWrap
Sleep 1
fFormatGraphic("TabUmlauf")
Sleep 1
Kontur.Check
TabUmlauf.OK
fFormatGraphic("TabUmlauf")
Sleep 1
if Kontur.IsChecked <> TRUE then Warnlog "Contour configuration is wrong !"
TabUmlauf.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_36
Dim sOriginalWidth as String
Dim sOriginalHeight as String
Dim sNewWidth as String
Dim sNewHeight as String
sNewWidth = "7"+ gSeperator + "00" + gMeasurementUnit
sNewHeight = "5"+ gSeperator + "00" + gMeasurementUnit
PrintLog "- Test original size "
'/// Test original size
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
'/// Format / Graphic tabpage Type , change the graphic's size
fFormatGraphic("TabType")
sOriginalWidth = Width.GetText
sOriginalHeight = Height.GetText
KeepRatio.UnCheck
wait 500
Width.SetText sNewWidth
wait 500
Height.SetText sNewHeight
wait 500
TabType.OK
'/// Check if original size works well
fFormatGraphic("TabType")
if Width.GetText <> sNewWidth then Warnlog "The graphic's width is wrong !"
wait 500
if Height.GetText <> sNewHeight then Warnlog "The graphic's height is wrong !"
wait 500
OriginalSize.Click
Sleep 1
if Width.GetText <> sOriginalWidth then Warnlog "The graphic's width isn't recovered to before!"
wait 500
if Height.GetText <> sOriginalHeight then Warnlog "The graphic's height isn't recovered to before !"
wait 500
TabType.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_37
Dim sWidth as String
Dim sHeight as String
Dim sNewWidth as String
Dim sNewHeight as String
sWidth = "4"+ gSeperator + "00" + gMeasurementUnit
sHeight = "3"+ gSeperator + "00" + gMeasurementUnit
sNewWidth = "8"+ gSeperator + "00" + gMeasurementUnit
sNewHeight = "6"+ gSeperator + "00" + gMeasurementUnit
PrintLog "- Test keep ratio"
'/// Test keep ratio
Call hNewDocument
'/// Insert a graphics and check 'keep ratio'
fInsertGraphics("Bughunter.jpg")
fFormatGraphic("TabType")
KeepRatio.UnCheck
wait 500
Width.SetText sWidth
wait 500
Height.SetText sHeight
wait 500
KeepRatio.Check
wait 500
TabType.OK
Sleep 1
'/// Format / Graphic tabpage Type , change the graphic's width
'/// + Check if keep ratio works well
fFormatGraphic("TabType")
Kontext "TabType"
Width.SetText sNewWidth
Sleep 1
if Height.GetText <> sNewHeight then Warnlog "The graphic's height is wrong !"
TabType.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_38
Dim sGraphicName as String
Dim sNavActualItemName as string
sGraphicName = "TEST1"
PrintLog "- Check the graphic name in Navigator"
'/// Check the graphic name in Navigator
Call hNewDocument
'/// Insert a graphics
Call fInsertGraphics("Bughunter.jpg")
'/// Format / Graphic / Options , set a new name
Call fFormatGraphic("TabZusaetze")
sleep(3)
Kontext "TabZusaetze"
ObjektName.SetText sGraphicName
sleep(3)
TabZusaetze.OK
sleep(1)
'/// Active navigator to check the graphic name
Call fStartupNavigator( "Graphics" , 2 )
sleep(2)
Kontext "NavigatorWriter"
sNavActualItemName = Auswahlliste.GetitemText(2)
if sNavActualItemName <> sGraphicName then
warnlog "The graphic name should be " + sGraphicName & " but get " & sNavActualItemName & "!"
end if
Call fCloseNavigator
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_39
Dim sHorizontalBy as String
Dim sVerticalBy as String
PrintLog "- Test checkbox 'Position' in protect area"
'/// Test checkbox 'Position' in protect area
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
'/// Format / Graphic / Options , check 'Position'
fFormatGraphic("TabZusaetze")
wait 500
if PositionSchuetzen.IsChecked = TRUE then warnlog "The default situation of checkbox - position should be unchecked"
wait 500
PositionSchuetzen.Check
wait 500
TabZusaetze.OK
'Check the original position
fFormatGraphic("TabType")
wait 500
sHorizontalBy = HorizontalBy.GetText
sVerticalBy = VerticalBy.GetText
TabType.Cancel
'/// move the picture with keyboard
Call wTypeKeys "<Down><Down><Right><Right>"
'/// + Check if the position is changed
fFormatGraphic("TabType")
if HorizontalBy.GetText <> sHorizontalBy then warnlog "The position Horizontal should be " +sHorizontalBy + " but get " + HorizontalBy.GetText
if VerticalBy.GetText <> sVerticalBy then warnlog "The position Vertical should be " +sVerticalBy + " but get " + VerticalBy.GetText
TabType.Cancel
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
testcase tInsertGraphic_40
Dim sHorizontalBy as String
Dim sVerticalBy as String
PrintLog "- Test checkbox 'Print' in Property area"
'/// Test checkbox 'Print' in Property area
Call hNewDocument
'/// Insert a graphics
fInsertGraphics("Bughunter.jpg")
'/// Format / Graphic / Options , check Position
fFormatGraphic("TabZusaetze")
wait 500
if Drucken.IsChecked <> TRUE then warnlog "The default situation of checkbox - print should be checked"
wait 500
PositionSchuetzen.UnCheck
wait 500
TabZusaetze.OK
'/// Print to Printer
PrintLog "- Please go to printer to check if you get a blank paper!"
FilePrint
Kontext "Active"
if Active.Exists then
if Active.GetRT = 304 then
Active.Ok
QAErrorLog "No Default-Printer!"
Kontext "Printing"
Sleep 1
Printing.Cancel
end if
else
Kontext "Printing"
Sleep 1
Printing.OK
Sleep 5
end if
Kontext "Active"
if Active.Exists then
if Active.GetRT = 304 then
Active.Ok
end if
end if
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------------------
|