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
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' 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 : oliver.craemer@oracle.com
'*
'* short description : Resource Test - Format Menu Part II
'*
'************************************************************************
'*
' #1 tFormatPrintRanges
' #1 tFormatCharacter
' #1 tFormatParagraph
' #1 tFormatChangeCase
' #1 tFormatStyles
' #1 tFormatAutoFormat
' #1 tFormatConditionalFormatting
' #1 tFormatAnchor
' #1 tFormatAlignment
' #1 tFormatArrange
' #1 tFormatFlip
' #1 tFormatGroup
' #0 tFormatControl
'*
'\***********************************************************************
sub c_upd_formatmenu2
Printlog Chr(13) + "--------- Format Menu Part II (c_upd_formatmenu2.inc) ---------"
call tFormatPrintRanges
call tFormatCharacter
call tFormatParagraph
call tFormatChangeCase
call tFormatStyles
call tFormatAutoFormat
call tFormatConditionalFormatting
call tFormatAnchor
call tFormatAlignment
call tFormatArrange
call tFormatFlip
call tFormatGroup
call tFormatControl 'testcase still under construction
end sub
'-----------------------------------------------------------
testcase tFormatPrintRanges
'///<u><b>Format - Print Ranges</b></u>
'/// Opening new spreadsheet document for getting defined starting environment
printlog " Opening new spreadsheet document for getting defined starting environment"
call hNewDocument
'/// Define a print range by 'Format – Print Ranges – Define'
printlog " Define a print range by 'Format – Print Ranges – Define'"
FormatPrintRangesDefine
'/// Add a print range by 'Format – Print Ranges – Add'
printlog " Add a print range by 'Format – Print Ranges – Add'"
FormatPrintRangesAdd
'/// Delete a print range by 'Format – Print Ranges – Delete'
printlog " Delete a print range by 'Format – Print Ranges – Delete'"
FormatPrintRangesRemove
'/// Open 'Edit Print Ranges' – dialog by 'Format – Print Ranges – Edit'
printlog " Open 'Edit Print Ranges' – dialog by 'Format – Print Ranges – Edit'"
FormatPrintRangesEdit
Kontext "DruckbereicheBearbeiten"
DialogTest ( DruckbereicheBearbeiten )
'/// Verify that there are four entries in 'Print range'
printlog " Verify that there are four entries in 'Print range'"
if not DruckbereichListe.GetItemCount = 4 then
warnlog "There are " & DruckbereichListe.GetItemCount & " items instead of 4"
end if
'/// Press 'Shrink' -button for 'Print Range'
printlog " Press 'Shrink' -button for 'Print Range'"
DruckbereichButton.Click
'/// Enlarge Rangechooser
printlog " Enlarge Rangechooser"
DruckbereichButton.Click
'/// Verify that there are two entries in 'Rows to repeat'
printlog " Verify that there are two entries in 'Rows to repeat'"
if not WiederholungszeileListe.GetItemCount = 2 then
warnlog "There are " & WiederholungszeileListe.GetItemCount & " items instead of 2"
end if
'/// Press 'Shrink' -button for 'Rows to repeat'
printlog " Press 'Shrink' -button for 'Rows to repeat'"
WiederholungszeileButton.Click
'/// Enlarge Rangechooser
printlog " Enlarge Rangechooser"
WiederholungszeileButton.Click
'/// Verify that there are two entries in 'Columns to repeat'
printlog " Verify that there are two entries in 'Columns to repeat'"
if not WiederholungsspalteListe.GetItemCount = 2 then
warnlog "There are " & WiederholungsspalteListe.GetItemCount & " items instead of 2"
end if
'/// Press 'Shrink' -button for 'Columns to repeat'
printlog " Press 'Shrink' -button for 'Columns to repeat'"
WiederholungsspalteButton.Click
'/// Enlarge Rangechooser
printlog " Enlarge Rangechooser"
WiederholungsspalteButton.Click
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
DruckbereicheBearbeiten.Cancel
'/// Close starting document
printlog " Close starting document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatCharacter
'///<u><b>Format - Character</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
Kontext "DocumentCalc"
'/// Type 'Test'
printlog " Type 'Test'"
DocumentCalc.TypeKeys "Test"
'/// Open 'Character' – dialog by 'Format – Character'
printlog " Open 'Character' – dialog by 'Format – Character'"
FormatCharacter
'/// Switch to tabpage 'Font'
printlog " Switch to tabpage 'Font'"
Kontext
active.SetPage TabFont
kontext "TabFont"
Call DialogTest ( TabFont )
'/// Switch to tabpage 'Font Effects'
printlog " Switch to tabpage 'Font Effects'"
Kontext
active.SetPage TabFontEffects
kontext "TabFontEffects"
Call DialogTest ( TabFontEffects )
'/// Switch to tabpage 'Font Position'
printlog " Switch to tabpage 'Font Position'"
Kontext
active.SetPage TabFontPosition
kontext "TabFontPosition"
Call DialogTest ( TabFontPosition )
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
TabFontPosition.Close
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatParagraph
'///<u><b>Insert - Paragraph</b></u>
Dim bAsianLanguage as boolean
Dim bCTLlanguage as boolean
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
call hNewDocument
'/// Enable language support for CJK and CTL (Tools-Options-Language Support)
printlog " Enable language support for CJK and CTL (Tools-Options-Language Support)"
bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
'/// Insert a note via 'Insert – Note'
printlog " Insert a note via 'Insert – Note'"
InsertNoteCalc
Kontext
'/// Enter 'Test' in Note
printlog " Enter 'Test' in Note"
DocumentCalc.TypeKeys "Test"
'/// Open 'Paragraph' – dialog by 'Format – Paragraph'
printlog " Open 'Paragraph' – dialog by 'Format – Paragraph'"
FormatParagraph
'/// Switch to tabpage 'Indents & Spacing'
printlog " Switch to tabpage 'Indents & Spacing'"
Kontext
active.SetPage TabEinzuegeUndAbstaende
Kontext "TabEinzuegeUndAbstaende"
Call DialogTest ( TabEinzuegeUndAbstaende )
'/// Increase 'Before text'
printlog " Increase 'Before text'"
Vonlinks.More
'/// Increase 'After text'
printlog " Increase 'After text'"
VonRechts.More
'/// Increase 'First line'
printlog " Increase 'First line'"
ErsteZeile.More
'/// Increase 'Above paragraph'
printlog " Increase 'Above paragraph'"
Oben.More
'/// Increase 'Below paragraph'
printlog " Increase 'Below paragraph'"
Unten.More
'/// Choose last (6) entry in listbox 'Line spacing'
printlog " Choose last (6) entry in listbox 'Line spacing'"
Zeilenabstand.Select 6
'/// Increase 'Line spacing'
printlog " Increase 'Line spacing'"
If Von.IsEnabled then
Von.More
else qaerrorlog "Line Spacing wrong, maybe the sort of this listbox is different"
end if
'/// Switch to tabpage 'Alignment'
printlog " Switch to tabpage 'Alignment'"
Kontext
active.SetPage TabAusrichtungAbsatz
Kontext "TabAusrichtungAbsatz"
Call DialogTest ( TabAusrichtungAbsatz )
'/// Choose option 'Left/Top'
printlog " Choose option 'Left/Top'"
Links.Check
'/// Choose option 'Right/Bottom'
printlog " Choose option 'Right/Bottom'"
Rechts.Check
'/// Choose option 'Center'
printlog " Choose option 'Center'"
Zentriert.Check
'/// Choose option 'Justified'
printlog " Choose option 'Justified'"
Blocksatz.Check
'/// Verify that listbox 'Text direction' has entries
printlog " Verify that listbox 'Text direction' has entries"
if TextDirection.GetItemCount < 1 then
warnlog "The Textdirection listbox is empty"
end if
'/// Switch to tabpage 'Asian Typography'
printlog " Switch to tabpage 'Asian Typography'"
Kontext
active.SetPage TabAsianTypography
Kontext "TabAsianTypography"
Call DialogTest ( TabAsianTypography )
'/// Check checkbox for 'Apply list...'
printlog " Check checkbox for 'Apply list...'"
ApplyList.Check
'/// Check checkbox 'Allow...'
printlog " Check checkbox 'Allow...'"
AllowHangingPunctuation.Check
'/// Check checkbox 'Apply spacing...'
printlog " Check checkbox 'Apply spacing...'"
ApplySpacingBetween.Check
'/// Switch to tabpage 'Tab'
printlog " Switch to tabpage 'Tab'"
Kontext
active.SetPage TabTabulatoren
Kontext "TabTabulatoren"
Call DialogTest ( TabTabulatoren )
'/// Close 'Paragraph' – dialog with 'Cancel'
TabTabulatoren.Close
'/// Close Note by <ESC>
printlog " Close Note by <ESC>"
Kontext "DocumentCalc"
DocumentCalc.TypeKeys "<ESCAPE>"
'/// Set support for CJK and CTL back to default (Tools – Options – Language Support)
printlog " Set support for CJK and CTL back to default (Tools – Options – Language Support)"
if bAsianLanguage = FALSE then
Call ActiveDeactivateAsianSupport(FALSE)
end if
if bCTLLanguage = FALSE then
Call ActiveDeactivateCTLSupport(FALSE)
end if
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatChangeCase
'///<u><b>Format - Change Case</b></u>
Dim bAsianLanguage as boolean
Dim bCTLlanguage as boolean
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Enable language support for CJK and CTL (Tools-Options-Language Support)
printlog " Enable language support for CJK and CTL (Tools-Options-Language Support)"
bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
'/// Change case by 'Format – Change Case – Uppercase'
printlog " Change case by 'Format – Change Case – Uppercase'"
FormatChangeCaseUpper
'/// Change case by 'Format – Change Case – Lowercase'
printlog " Change case by 'Format – Change Case – Lowercase'"
FormatChangeCaseLower
'/// Change case by 'Format – Change Case – Halfwidth'
printlog " Change case by 'Format – Change Case – Halfwidth'"
FormatChangeCaseHalfwidth
'/// Change case by 'Format – Change Case – Fullwidth'
printlog " Change case by 'Format – Change Case – Fullwidth'"
FormatChangeCaseFullwidth
'/// Change case by 'Format – Change Case – Hiragana'
printlog " Change case by 'Format – Change Case – Hiragana'"
FormatChangeCaseHiragana
'/// Change case by 'Format – Change Case – Katagana'
printlog " Change case by 'Format – Change Case – Katagana'"
FormatChangeCaseKatagana
'/// Set support for CJK and CTL back to default (Tools – Options – Language Support)
printlog " Set support for CJK and CTL back to default (Tools – Options – Language Support)"
if bAsianLanguage = FALSE then
Call ActiveDeactivateAsianSupport(FALSE)
end if
if bCTLLanguage = FALSE then
Call ActiveDeactivateCTLSupport(FALSE)
end if
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatStyles
'///<u><b>Format - Styles and Formatting</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Open 'Stylist' by 'Format – Styles and Formatting'
printlog " Open 'Stylist' by 'Format – Styles and Formatting'"
FormatStylist
Kontext "Gestalter"
if Gestalter.notexists (2) then
FormatStylist
Kontext "Gestalter"
end if
'/// Click on button 'Cell Styles'
printlog " Click on button 'Cell Styles'"
Zellvorlagen.Click
DialogTest ( Gestalter,1 )
'/// Click on button 'Fill Format Mode' to turn mode on
printlog " Click on button 'Fill Format Mode' to turn mode on"
Giesskanne.Click
'/// Click again on button 'Fill Format Mode' to turn mode off
printlog " Click again on button 'Fill Format Mode' to turn mode off"
Giesskanne.Click
'/// Click on button 'NewStyle from Selection'
printlog " Click on button 'NewStyle from Selection'"
AusSelektion.Click
Kontext "VorlageErzeugen"
DialogTest ( VorlageErzeugen )
'/// Type name 'Teststyle'
printlog " Type name 'Teststyle'"
Vorlagenname.SetText "Teststyle"
'/// Close 'Create Style' – dialog with 'Cancel'
printlog " Close 'Create Style' – dialog with 'Cancel'"
VorlageErzeugen.Cancel
Kontext "Gestalter"
'/// Click on button 'Update Style'
printlog " Click on button 'Update Style'"
Aktualisieren.Click
'/// Click on button 'Page Styles'
printlog " Click on button 'Page Styles'"
Absatzvorlagen.Click
'/// Close 'Stylist' by 'Format – Styles and Formatting
printlog " Close 'Stylist' by 'Format – Styles and Formatting"
Kontext "Gestalter"
Gestalter.Close
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatAutoFormat
'///<u><b>Format - AutoFormat/b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Select cells A1:E6
printlog " Select cells A1:E6"
Call fCalcSelectRange ("A1:E6")
'/// Open 'AutoFormat' – dialog by 'Format – AutoFormat'
printlog " Open 'AutoFormat' – dialog by 'Format – AutoFormat'"
FormatAutoformat
Kontext "AutoformatCalc"
'/// Click on 'More' – button
Zusaetze.Click
Call DialogTest ( AutoformatCalc )
'/// Verify that the 'Format' – listbox has items
printlog " Verify that the 'Format' – listbox has items"
if FormatListe.GetItemCount < 1 then
warnlog "The formatlist is empty"
end if
'/// Click on 'Add' – button
printlog " Click on 'Add' – button"
Einfuegen.Click
Kontext "AutoFormatHinzufuegenCalc"
Call DialogTest ( AutoFormatHinzufuegenCalc )
'/// Enter name 'Testformat'
printlog " Enter name 'Testformat'"
TabellenName.SetText "Testformat"
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
AutoFormatHinzufuegenCalc.Close
Kontext "AutoformatCalc"
'/// Select second entry in 'Format' – listbox
printlog " Select second entry in 'Format' – listbox"
FormatListe.Select 2
'/// Click on 'Rename' – button
printlog " Click on 'Rename' – button"
Umbenennen.Click
Kontext "RenameAutoFormat"
Call DialogTest ( RenameAutoFormat )
'/// Set format name to 'Newformat'
printlog " Set format name to 'Newformat'"
RenameAutoFormatName.SetText "Newformat"
'/// Close 'Rename AutoFormat' – dialog with 'Cancel'
printlog " Close 'Rename AutoFormat' – dialog with 'Cancel'"
RenameAutoFormat.Cancel
Kontext "AutoformatCalc"
'/// Click on 'Delete' – button
printlog " Click on 'Delete' – button"
Loeschen.Click
'/// Close messagebox with 'Yes'
Kontext
Active.No
Kontext "AutoformatCalc"
'/// Check 'Number format'
printlog " Check 'Number format'"
Zahlenformat.Check
'/// Check 'Borders'
printlog " Check 'Borders'"
Umrandung.Check
'/// Check 'Font'
printlog " Check 'Font'"
Schriftart.Check
'/// Check 'Pattern'
printlog " Check 'Pattern'"
Muster.Check
'/// Check 'Alignment'
printlog " Check 'Alignment'"
Ausrichtung.Check
'/// Check 'AutoFit width and height'
printlog " Check 'AutoFit width and height'"
BreiteHoeheAnpassen.Check
'/// Close 'AutoFormat' – dialog with 'Cancel'
printlog " Close 'AutoFormat' – dialog with 'Cancel'"
AutoformatCalc.Cancel
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatConditionalFormatting
'///<u><b>Format - Conditional Formatting</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Open 'Conditional Formatting' – dialog by 'Format – Conditional Formatting'
printlog " Open 'Conditional Formatting' – dialog by 'Format – Conditional Formatting'"
FormatConditionalFormatting
Kontext "BedingteFormatierung"
Call DialogTest ( BedingteFormatierung )
'/// Check 'Condition 1'
printlog " Check 'Condition 1'"
Bedingung1.Check
'/// Choose first entry (Cell value is)
printlog " Choose first entry (Cell value is)"
PopupList1.Select 1
'/// Choose first criteria for comparison (equal to)
printlog " Choose first criteria for comparison (equal to)"
Vergleich1.Select 1
'/// Click on 'Shrink' – button
printlog " Click on 'Shrink' – button"
Minimieren1.Click
'/// Close rangechoser by 'Shrink' -button
printlog " Close rangechoser by 'Shrink' -button"
Minimieren1.Click
'/// Set string '12' in editfield
printlog " Set string '12' in editfield"
TextField1.SetText "12"
'/// Verify that the 'Cell style' listbox has items
printlog " Verify that the 'Cell style' listbox has items"
if Zellvorlage1.GetItemCount < 1 then
warnlog "The 'Cell style' listbox is empty"
end if
printlog " Click on NewStyle button"
NewStyle1.Click
Kontext
active.SetPage TabVerwalten
printlog " Close Style dialog"
Kontext "TabVerwalten"
TabVerwalten.Close
Kontext "BedingteFormatierung"
'/// Check 'Condition 2'
printlog " Check 'Condition 2'"
Bedingung2.Check
'/// Choose second entry 'Formula is'
printlog " Choose second entry 'Formula is'"
PopupList2.Select 2
'/// Click on 'Shrink' – button
printlog " Click on 'Shrink' – button"
Minimieren2.Click
'/// Close rangechoser by 'Shrink' -button
printlog " Close rangechoser by 'Shrink' -button"
Minimieren2.Click
'/// Check 'Condition 3'
printlog " Check 'Condition 3'"
Bedingung3.Check
'/// Choose first entry (Cell value is)
printlog " Choose first entry (Cell value is)"
PopupList3.Select 1
'/// Choose last criteria for comparision (not between)
printlog " Choose last criteria for comparision (not between)"
Vergleich3.Select 8
'/// Click on first 'Shrink' – button
printlog " Click on first 'Shrink' – button"
Minimieren3.Click
'/// Close rangechoser by 'Shrink' -button
printlog " Close rangechoser by 'Shrink' -button"
Minimieren3.Click
'/// Click on second 'Shrink' – button
printlog " Click on second 'Shrink' – button"
Minimieren32.Click
'/// Close rangechoser by 'Shrink' -button
printlog " Close rangechoser by 'Shrink' -button"
Minimieren32.Click
'/// Close 'Conditional Formatting' – dialog with 'Cancel'
printlog " Close 'Conditional Formatting' – dialog with 'Cancel'"
BedingteFormatierung.close
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatAnchor
'///<u><b>Format - Anchor</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Go to cell D4
printlog " Go to cell D4"
Call fCalcSelectRange ("D4")
'/// Insert Picture by 'Insert – Picture – From File' global\input\graf_inp\borabora.jpg
printlog " Insert Picture by 'Insert – Picture – From File' global\input\graf_inp\borabora.jpg"
InsertGraphicsFromFile
Kontext "GrafikEinfuegenDlg"
Dateiname.Settext convertpath(gTesttoolpath + "global\input\graf_inp\borabora.jpg")
Oeffnen.Click
'/// Set Anchor to page by 'Format – Anchor – To Page'
printlog " Set Anchor to page by 'Format – Anchor – To Page'"
FormatAnchorToPageCalc
'/// Set Anchor to page by 'Format – Anchor – To Cell'
printlog " Set Anchor to page by 'Format – Anchor – To Cell'"
FormatAnchorToCell
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatAlignment
'///<u><b>Format - Alignment</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Set Alignment to default by ' Format -Alignment - Default'
printlog " Set Alignment to default by ' Format -Alignment - Default'"
FormatAlignmentHorizontalDefaultCalc
'/// Set Alignment to Left by ' Format -Alignment - Left'
printlog " Set Alignment to Left by ' Format -Alignment - Left'"
FormatAlignmentLeftCalc
'/// Set Alignment to Centered by ' Format -Alignment – Centered'
printlog " Set Alignment to Centered by ' Format -Alignment – Centered'"
FormatAlignmentHorizontalCenterCalc
'/// Set Alignment to Right by ' Format -Alignment – Right'
printlog " Set Alignment to Right by ' Format -Alignment – Right'"
FormatAlignmentRightCalc
'/// Set Alignment to Justified by ' Format -Alignment – Justified'
printlog " Set Alignment to Justified by ' Format -Alignment – Justified'"
FormatAlignmentJustifiedCalc
'/// Set Alignment to Top by ' Format -Alignment – Top'
printlog " Set Alignment to Top by ' Format -Alignment – Top'"
FormatAlignmentTopCalc
'/// Set Alignment to Center by ' Format -Alignment – Center'
printlog " Set Alignment to Center by ' Format -Alignment – Center'"
FormatAlignmentverticalCenterCalc
'/// Set Alignment to Bottom by ' Format -Alignment – Bottom'
printlog " Set Alignment to Bottom by ' Format -Alignment – Bottom'"
FormatAlignmentBottomCalc
'/// Close document
printlog " Close document"
Call hCloseDocument
'/// Load document from 'gTesttoolPath + "spreadsheet\required\input\twoobjects.ods"'
printlog " Load document from 'gTesttoolPath + spreadsheet\required\input\twoobjects.ods"
Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\twoobjects.ods" ))
'/// If the file is not editable, click the edit button on standardbar
printlog "If the file is not editable, click the edit button on standardbar"
call sMakeReadOnlyDocumentEditable
'/// Select first object by Navigator
printlog " Select first object by Navigator"
Call fNavigatorSelectObject ("drawing objects", 1)
'/// Select additional second drawing object by keyboard Strg-A
printlog " Select additional second drawing object by keyboard Strg-A"
Kontext "DocumentCalc"
DocumentCalc.TypeKeys "<Mod1 A>"
'/// Set Alignment to Left by ' Format -Alignment - Left'
printlog " Set Alignment to Left by ' Format -Alignment - Left'"
FormatAlignmentObjectLeftCalc
'/// Set Alignment to Centered by ' Format -Alignment – Centered'
printlog " Set Alignment to Centered by ' Format -Alignment – Centered'"
FormatAlignmentObjectCenteredCalc
'/// Set Alignment to Right by ' Format -Alignment – Right'
printlog " Set Alignment to Right by ' Format -Alignment – Right'"
FormatAlignmentObjectRightCalc
'/// Set Alignment to Top by ' Format -Alignment – Top'
printlog " Set Alignment to Top by ' Format -Alignment – Top'"
FormatAlignmentObjectTopCalc
'/// Set Alignment to Center by ' Format -Alignment – Center'
printlog " Set Alignment to Center by ' Format -Alignment – Center'"
FormatAlignmentObjectCenterCalc
'/// Set Alignment to Bottom by ' Format -Alignment – Bottom'
printlog " Set Alignment to Bottom by ' Format -Alignment – Bottom'"
FormatAlignmentObjectBottomCalc
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatArrange
'///<u><b>Format - Arrange</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Insert Picture by 'Insert – Picture – From File' ...
printlog " Insert Picture by 'Insert – Picture – From File' ..."
InsertGraphicsFromFile
Kontext "GrafikEinfuegenDlg"
Dateiname.Settext convertpath(gTesttoolpath + "global\input\graf_inp\borabora.jpg")
Oeffnen.Click
'/// 'Format – Arrange – Bring to Front'
printlog " 'Format – Arrange – Bring to Front'"
FormatArrangeBringToFrontCalc
'/// 'Format – Arrange – Forward One'
printlog " 'Format – Arrange – Forward One'"
FormatArrangeBringForwardCalc
'/// 'Format – Arrange – Back One'
printlog " 'Format – Arrange – Back One'"
FormatArrangeSendBackwardCalc
'/// 'Format – Arrange – Send to Back'
printlog " 'Format – Arrange – Send to Back'"
FormatArrangeSendToBackCalc
'/// 'Format – Arrange – To Background'
printlog " 'Format – Arrange – To Background'"
FormatArrangeToBackgroundCalc
'/// 'Format – Arrange – To Foreground'
printlog " 'Format – Arrange – To Foreground'"
'Sometimes the selection of the graphic get lost, then reselect by Navigator
try
FormatArrangeToForegroundCalc
catch
Call fNavigatorSelectObject ("graphics", 1)
FormatArrangeToForegroundCalc
endcatch
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatFlip
'///<u><b>Format - Flip</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Insert Picture by 'Insert – Picture – From File' ...
printlog " Insert Picture by 'Insert – Picture – From File' ..."
InsertGraphicsFromFile
Kontext "GrafikEinfuegenDlg"
Dateiname.Settext convertpath(gTesttoolpath + "global\input\graf_inp\borabora.jpg")
Oeffnen.Click
'/// Flip picture by 'Format – Flip – Flip Vertically'
printlog " Flip picture by 'Format – Flip – Flip Vertically'"
FormatFlipVerticallyCalc
'/// Flip picture by 'Format – Flip – Flip Object Horizontally'
printlog " Flip picture by 'Format – Flip – Flip Object Horizontally'"
FormatFlipHorizontalCalc
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatGroup
'///<u><b>Format - Group</b></u>
'/// Load document from 'gTesttoolPath + "spreadsheet\required\input\twoobjects.ods"'
printlog " Load document from 'gTesttoolPath + spreadsheet\required\input\twoobjects.ods"
Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\twoobjects.ods" ))
'/// If the file is not editable, click the edit button on standardbar
printlog "If the file is not editable, click the edit button on standardbar"
call sMakeReadOnlyDocumentEditable
'/// Select first object by Navigator
printlog " Select first object by Navigator"
Call fNavigatorSelectObject ("drawing objects", 1)
'/// Select additional second drawing object by keyboard Strg-A
printlog " Select additional second drawing object by keyboard Strg-A"
Kontext "DocumentCalc"
DocumentCalc.TypeKeys "<Mod1 A>"
'/// Group objects by 'Format - Group - Group
printlog " Group objects by 'Format - Group - Group"
FormatGroupGroup
'/// Enter Group by 'Format - Group - Enter'
printlog " Enter Group by 'Format - Group - Enter'"
FormatGroupEditGroupCalc
'/// Leave Group by 'Format - Group - Exit'
printlog " Leave Group by 'Format - Group - Exit'"
FormatExitGroupDraw
'/// Ungroup objects by 'Format - Group - Ungroup'
printlog " Ungroup objects by 'Format - Group - Ungroup'"
FormatUngroupDraw
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tFormatControl
'///<u><b>Format - Control</b></u>
qaerrorlog "Testcase still under construction"
goto endsub
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Insert Control Button
printlog " Insert Control Button"
'/// Open 'Properties' – dialog by 'Format – Control'
printlog " Open 'Properties' – dialog by 'Format – Control'"
'FormatControl
'/// Switch to tabpage 'General'
printlog " Switch to tabpage 'General'"
'/// Switch to tabpage 'Events'
printlog " Switch to tabpage 'Events'"
'/// Close dialog by 'Format – Controls'
printlog " Close dialog by 'Format – Controls'"
'/// Open 'Form Properties' – dialog by 'Format – Form'
printlog " Open 'Form Properties' – dialog by 'Format – Form'"
'FormatForm
'/// Switch to tabpage 'General'
printlog " Switch to tabpage 'General'"
'/// Switch to tabpage 'Data'
printlog " Switch to tabpage 'Data'"
'/// Switch to tabpage 'Events'
printlog " Switch to tabpage 'Events'"
'/// Close dialog by 'Format – Form'
printlog " Close dialog by 'Format – Form'"
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
|