summaryrefslogtreecommitdiff
path: root/testautomation/spreadsheet/required/includes/c_upd_editmenu.inc
blob: 9af880af0e1831570a752822d38090eec2a4d333 (plain)
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
'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@sun.com
'*
'* short description : Resource Test - Edit Menu
'*
'************************************************************************
'*
' #1 tEditUndoRedo     
' #1 tEditRepeat
' #1 tEditCut
' #1 tEditCopy
' #1 tEditPaste
' #1 tEditPasteSpecial
' #1 tEditSelectAll
' #1 tEditChanges
' #1 tEditCompareDocuments
' #1 tEditFindAndReplace
' #1 tEditHeadersAndFooters
'*
'\***********************************************************************

sub c_upd_editmenu1

    Printlog Chr(13) + "--------- EDIT Menu Part I (c_upd_editmenu.inc) ---------"
    
    call tEditUndoRedo
    call tEditRepeat
    call tEditCut
    call tEditCopy
    call tEditPaste
    call tEditPasteSpecial
    call tEditSelectAll
    call tEditChanges
    call tEditCompareDocuments
    call tEditFindAndReplace
    call tEditHeadersAndFooters

end sub

'-----------------------------------------------------------

testcase tEditUndoRedo
'///<u><b>Edit - UndoRedo</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Test<RETURN>"
    '/// Edit - Undo
    editUndo
'    sleep(1)
    if fCalcGetCellValue ("A1") = "" then
        printlog "  - Undo is working"
    else 
        warnlog "Undo doesn't work"
    end if
    editRedo
'    sleep(1)
    if fCalcGetCellValue ("A1") = "Test" then
        printlog "  - Redo is working"
    else 
        warnlog "Redo doesn't work"
    end if
    '/// Close document
    printlog " Close document"
    hCloseDocument
    
endcase

'-----------------------------------------------------------

testcase tEditRepeat
'///<u><b>Edit - Repeat</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Test<RETURN>"
    '/// Click on cell A2
    printlog " Click on cell A2"
    call fCalcSelectCell ("A2")
    '/// Repeat insertion via Edit - Repeat
    printlog " Repeat insertion via Edit - Repeat"
    EditRepeat
    if fCalcGetCellValue ("A2") = "Test" then
        printlog "  - Repeat is working"
    else 
        warnlog "Repeat doesn't work"
    end if
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditCut
'///<u><b>Edit - Cut</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Cutted Text<RETURN>"
    '/// Click on cell A1
    printlog " Click on cell A1"
    call fCalcSelectCell ("A1")
    '/// Make sure that the clipboard is empty
    printlog " Make sure that the clipboard is empty"
    setclipboard = ""
    '/// Cut cellcontent
    printlog " Cut cellcontent" 
    EditCut
    if GetClipboardText = "Cutted Text" AND fCalcGetCellValue ("A1") = "" then
        printlog "  - Cutting is working"
    else
        warnlog "Cutting does not work correctly"
    end if
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditCopy
'///<u><b>Edit - Copy</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Copied Text<RETURN>"
    '/// Click on cell A1
    printlog " Click on cell A1"
    call fCalcSelectCell ("A1")
    '/// Make sure that the clipboard is empty
    printlog " Make sure that the clipboard is empty"
    setclipboard = ""
    '/// Copy cellcontent
    printlog " Copy cellcontent" 
    EditCopy
    if GetClipboardText = "Copied Text" AND fCalcGetCellValue ("A1") = "Copied Text" then
        printlog "  - Copying is working"
    else
        warnlog "Copying does not work correctly"
    end if
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditPaste
'///<u><b>Edit - Paste</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Goto cell A1
    printlog " Gotocell A1"
    call fCalcSelectCell ("A1")
    '/// Fill clipboard with text
    printlog " Fill clipboard with text"
    setclipboard ("Pasted Text")
    '/// Paste clipboard
    printlog " Paste clipboard"
    EditPaste
    Kontext "TextImport"
    if TextImport.Exists(2) then
        call DialogTest (TextImport)
        '/// Close text import dialog with OK.
        printlog " Close text import dialog with OK."
        TextImport.OK
    end if        
    '/// Make sure that the clipboard is empty
    printlog " Make sure that the clipboard is empty"
    setclipboard = ""
    if fCalcGetCellValue ("A1") = "Pasted Text" then
        printlog "  - Pasting is working"
    else
        warnlog "Pasting does not work correctly"
    end if
    '/// Check overwrite messagebox via copy cellcontent and paste into itself
    printlog " Check overwrite messagebox via copy cellcontent and paste into itself"
    EditCopy
    EditPaste
    try
       Kontext "CellWarning"
       Dialogtest (CellWarning)
       '///<li>Cancel overwrite warning</li>///
       CellWarning.No
       printlog "  - Paste overwrite MsgBox tested"
    catch
       warnlog "MsgBox for overwrite warning doesn't exist"
    endcatch
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditPasteSpecial
'///<u><b>Edit - PasteSpecial</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Pasted Text<RETURN>"
    '/// Click on cell A1
    printlog " Click on cell A1"
    call fCalcSelectCell ("A1")
    '/// Copy cellcontent
    printlog " Copy cellcontent" 
    EditCopy
    '/// Paste Special the clipboard
    printlog " Paste Special the clipboard"
    EditPasteSpecialCalc
    kontext "InhalteEinfuegenCalc"
    call DialogTest (InhalteEinfuegenCalc)
    '/// Cancel PasteSpecial-Dialog
    printlog " Cancel PasteSpecial-Dialog"
    InhalteEinfuegenCalc.Cancel
    if fCalcGetCellValue ("A1") = "Pasted Text" then
        printlog "  - PasteSpecial of spreadsheet content is working"
    else
        warnlog "PasteSpecial of spreadsheet content does not work correctly"
    end if
    '/// Insert a picture from file Insert - Graphic - From File
    printlog " Insert a picture from file Insert - Graphic - From File"
    InsertGraphicsFromFile
    Kontext "GrafikEinfuegenDlg"
    '/// Choose gTesttoolpath + global\input\graf_inp\baer.tif
    printlog " Choose gTesttoolpath + global\input\graf_inp\baer.tif"
    Dateiname.Settext (convertpath( gTesttoolpath + "global\input\graf_inp\baer.tif" ))
    '/// Click OK
    printlog " Click OK"
    Oeffnen.Click
    kontext "DocumentCalc"
    '/// Cut the still selected graphic via Edit - Cut
    printlog " Cut the still selected graphic via Edit - Cut"
    EditCut
    '/// PasteSpecial the cutted graphic
    printlog " PasteSpecial the cutted graphic"
    EditPasteSpecialCalc
    kontext "InhaltEinfuegen"
    call DialogTest (InhaltEinfuegen)
    printlog "  - PasteSpecial of other content is working"
    '/// Cancel the PasteSpecial dialog
    printlog " Cancel the PasteSpecial dialog"
    InhaltEinfuegen.Cancel
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditSelectAll
'///<u><b>Edit - SelectAll</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Select whole sheet via Edit - Select All
    printlog " Select whole sheet via Edit - Select All"
    EditSelectAll
    '/// Check in areafield if the whole sheet is selected (A1:AMJ1048576)
    printlog " Check in areafield if the whole sheet is selected (A1:AMJ1048576)"
    kontext "RechenleisteCalc"
    if Bereich.getSelText = "A1:AMJ1048576" then
        printlog "  - SelectAll is working"
    else
       warnlog "SelectAll is not working as expected. The area is " & Bereich.getSelText & " instead of A1:AMJ1048576"
    end if
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditChanges
'///<u><b>Edit - Changes</b></u>

    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    
    '/// Activate recording mode via Edit Changes Record
    printlog " Activate recording mode via Edit Changes Record"
    EditChangesRecordCalc
    'If changerecording is initially activated (which should not be) a messagebox appears
    kontext
    if active.exists then
        active.Yes
        warnlog "Unexpected state of the office - Redlining was initialy enabled"
        EditChangesRecordCalc
    end if
    
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Recorded Text1<RETURN>Recorded Text2<RETURN>"
    
    '/// Open Protect changes dialog via Edit - Changes - Protect
    printlog " Open Protect changes dialog via Edit - Changes - Protect"
    EditChangesProtectTraceCalc
    Kontext ("PasswortEingeben")
    call Dialogtest (PasswortEingeben)
    '/// Cancel Passwort dialog
    printlog " Cancel Passwort dialog"
    PasswortEingeben.Cancel
    
    '/// Open Edit - Changes - Show dialog
    printlog " Open Edit - Changes - Show dialog"
    kontext "DocumentCalc"
    EditChangesShowCalc
    kontext "ShowChanges"
    call Dialogtest (ShowChanges)
    '/// Check all checkboxes
    printlog " Check all checkboxes"
    ShowChangesCalc.Check
    ShowDate.Check
    ShowAuthor.Check
    ShowRange.Check
    ShowComment.Check
    ShowAcceptedChanges.Check
    ShowRejectedChanges.Check
    '/// Click on range chooser button
    printlog " Click on range chooser button"
    ShrinkRange.Click
    '/// Enter range A1:B3
    printlog " Enter range A1:B3"
    RangeCalc.SetText "A1:B3"
    '/// Click on enlarge button
    printlog " Click on enlarge button"
    Shrink.Click
    '/// Click on 'Clock' button
    printlog " Click on 'Clock' button"
    Now1.Click
    '/// Choose 'Between' in date listbox
    printlog " Choose 'Between' in date listbox"
    DateList.Select 5
    '/// Now the second datefields are enabled, click on second 'Clock' button
    printlog " Now the second datefields are enabled, click on second 'Clock' button"
    Now2.Click
    '/// Choose first author from list
    printlog " Choose first author from list"
    AuthorList.Select 1
    '/// Enter comment 'Test' in comment field
    printlog " Enter comment 'Test' in comment field"
    EditComment.SetText "Test"
    '/// Close Edit - Changes - Show dialog with cancel
    printlog " Close Edit - Changes - Show dialog with cancel"
    ShowChanges.Cancel
    
    '/// Open dialog Edit - Changes - Accept or Discard changes
    printlog " Open dialog Edit - Changes - Accept or Discard changes"
    EditChangesAcceptOrDiscardCalc
    Kontext "AenderungenAnzeigen"
    '/// Choose tabpage List
    printlog " Choose tabpage List"
    Kontext "TabControl"
    TabControl.setpage TabListe
    Kontext "TabListe"
    Call Dialogtest (TabListe)
    '/// Choose tabpage Filter
    printlog " Choose tabpage Filter"
    Kontext "TabControl"
    TabControl.setpage TabFilter
    Call Dialogtest (TabFilter)
    '/// Close dialog Edit - Changes - Accept or Discard changes
    printlog " Close dialog Edit - Changes - Accept or Discard changes"
    Kontext "AenderungenAnzeigen"
    AenderungenAnzeigen.close
    
    '/// Select cell A1
    printlog " Select cell A1"
    call fCalcSelectRange ("A1")
    '/// Open Comments dialog via Edit - Changes - Comments
    printlog " Open Comments dialog via Edit - Changes - Comments"
    EditChangesCommentsCalc
    Kontext "Kommentar"
    call Dialogtest( Kommentar )
    '/// Click on arrow-right-button
    printlog " Click on arrow-right-button"
    Vor.Click
    '/// Click on arrow-left-button
    printlog " Click on arrow-left-button"
    Zurueck.Click
    '/// Enter comment "Test"
    printlog " Enter comment 'Test'"
    KommentarText.SetText "Test"
    '/// Close Comments dialog with cancel
    printlog " Close Comments dialog with cancel"
    Kommentar.cancel
    
    '/// Choose Edit - Changes - Merge Documents
    printlog " Choose Edit - Changes - Merge Documents"
    EditChangesMergeDocument
    '/// Enter filename 'gtesttoolpath +spreadsheet\required\input\merge.ods'
    printlog " Enter filename 'gtesttoolpath +spreadsheet\required\input\merge.ods'"
    kontext "OeffnenDlg"
    Dateiname.settext convertpath(gtesttoolpath +"spreadsheet\required\input\merge.ods")
    '/// Click Open
    printlog " Click Open"
    Oeffnen.Click
    '/// Now the redlining dialog should appear. Close dialog with windowcloser
    printlog " Now the redlining dialog should appear. Close dialog with windowcloser"
    kontext "AenderungenAnzeigen"
    AenderungenAnzeigen.close
    
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditCompareDocuments
'///<u><b>Edit - Compare Documents</b></u>
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Inserted Text<RETURN>"
    '/// Choose Edit - Compare Documents
    printlog " Choose Edit - Compare Documents"
    EditCompareDocumentCalc
    '/// Enter filename 'gtesttoolpath +spreadsheet\required\input\merge.ods'
    printlog " Enter filename 'gtesttoolpath +spreadsheet\required\input\merge.ods'"
    kontext "OeffnenDlg"
    Dateiname.settext convertpath(gtesttoolpath +"spreadsheet\required\input\merge.ods")
    '/// Click Open
    printlog " Click Open"
    Oeffnen.Click
    '/// Now the redlining dialog should appear. Close dialog with windowcloser
    printlog " Now the redlining dialog should appear. Close dialog with windowcloser"
    kontext "AenderungenAnzeigen"
    AenderungenAnzeigen.close
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditFindAndReplace
'///<u><b>Edit - Find And Replace</b></u>

    Dim bAsianLanguage as boolean
    
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enable 'Asian Language support' ON for getting all controls on dialog
    printlog " Enable 'Asian Language support' ON for getting all controls on dialog"
    bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
    '/// Enter some text
    printlog " Enter some text"
    kontext "DocumentCalc"
    DocumentCalc.Typekeys "Inserted Text<RETURN><UP>"
    '/// Choose Edit - Find And Replace
    printlog " Choose Edit - Find And Replace"
    EditSearchAndReplace
    kontext "FindAndReplace"
    '/// Click 'More' button
    printlog " Click 'More' button"
    More.Click
    call DialogTest ( FindAndReplace )
    '/// By default all checkboxes have to be unchecked.
    printlog " Uncheck all checkboxes (unchecked is also default)"
    if not MatchCase.IsEnabled then    'SoundsLike disables MatchCase
        SoundsLike.UnCheck
    end if 
    if MatchCase.IsEnabled then
        MatchCase.UnCheck
    end if
    if WholeWordsOnly.IsEnabled then
        WholeWordsOnly.UnCheck
    end if
    if CurrentSelectionOnly.IsEnabled then
        CurrentSelectionOnly.UnCheck
    end if
    if Backwards.IsEnabled then
        Backwards.UnCheck
    end if
    if RegularExpressions.IsEnabled then
        RegularExpressions.UnCheck
    end if
    if SearchForStyles.IsEnabled then
        SearchForStyles.UnCheck
    end if
    if SearchInAllSheets.IsEnabled then
        SearchInAllSheets.UnCheck
    end if
    '/// Check SimilaritySearch
    printlog " Check SimilaritySearch"
    if SimilaritySearch.IsEnabled then
        SimilaritySearch.Check
    end if
    '/// Click ...button for similaritysearch
    printlog " Click ...button for similaritysearch"
    If SimilaritySearchFor.IsEnabled then 
        SimilaritySearchFor.Click
    else
        SimilaritySearch.Check
        SimilaritySearchFor.Click
    end if
    kontext "Aehnlichkeitssuche"
    call DialogTest ( Aehnlichkeitssuche )
    '/// Use every control on opened similaritydialog
    printlog " Use every control on opened similaritydialog"
    ZeichenTauschen.More
    ZeichenHinzufuegen.Less
    ZeichenEntfernen.More
    Kombinieren.Click
    '/// Close similaritydialog with cancel
    printlog " Close similaritydialog with cancel"
    Aehnlichkeitssuche.Cancel
    kontext "FindAndReplace"
    SimilaritySearch.UnCheck
    If MatchFullHalfWidth.Isvisible then
        MatchFullHalfWidth.Uncheck
    end if
    If SoundsLike.Isvisible then
        SoundsLike.Check
        SoundsLikeOptions.Click
        kontext "TabJapaneseFind"
        call DialogTest ( TabJapaneseFind )
        TabJapaneseFind.Cancel
        kontext "FindAndReplace"
        SoundsLike.UnCheck
    end if    
    Rows.Check
    SearchIn.Select 1
    '/// Close Dialog
    printlog " Close Dialog"
    FindAndReplace.Close
    '/// Set the 'Asian Language support' to default
    printlog " Set the 'Asian Language support' to default"
    if bAsianLanguage = FALSE then
        Call ActiveDeactivateAsianSupport(FALSE)
    end if
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tEditHeadersAndFooters
'///<u><b>Edit - Headers and Footers</b></u>

    Dim bAsianLanguage as boolean
    Dim bCTLlanguage as boolean

    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Enable 'Asian and CTL Language support' ON for getting all controls on dialog
    printlog " Enable 'Asian and CTL Language support' ON for getting all controls on dialog"
    bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
    bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
    '/// Disable 'Same content left/right' on Format-Page to get all resources
    printlog " Disable 'Same content left/right' on Format-Page to get all resources"
    '/// - Open Format-Page dialog
    FormatPageCalc
    '/// - Switch to tabpage Header
    Kontext
    Active.SetPage TabKopfzeile
    Kontext
    if Active.Exists(2) then
        if Active.GetRT = 304 then
            Printlog Active.GetText
            Active.Yes
            sleep(1)
        end if
    end if
    '/// - Uncheck 'Same content left/right'
    Kontext "TabKopfzeile"
    InhaltLinksRechtsGleich.uncheck
    '/// - Switch to tabpage Footer
    Kontext
    Active.SetPage TabFusszeile
    Kontext "TabFussZeile"
    '/// - Uncheck 'Same content left/right'
    InhaltLinksRechtsGleich.uncheck
    '/// - Close Dialog with OK
    TabFusszeile.Ok
    
    '/// Open Edit - Headers & Footers
    printlog " Open Edit - Headers & Footers"
    EditHeadersAndFooters
    '/// Choose tabpage Header (right)
    printlog " Choose tabpage Header (right)"
    Kontext
    Active.SetPage TabKopfzeileCalc
    Kontext "TabKopfzeileCalc"
    Call DialogTest ( TabKopfzeileCalc )
    '/// Choose in Listbox Header the first entry (none)
    printlog " Choose in Listbox Header the first entry (none)"
    PredefinedHeader.Select 1
    '/// Enter '1' in left area field
    printlog " Enter '1' in left area field"
    LinkerBereich.typeKeys ("1")
    '/// Enter '1' in middle area field
    printlog " Enter '1' in middlearea field"
    MittlererBereich.typeKeys ("1")
    '/// Enter '1' in right area field
    printlog " Enter '1' in right area field"
    RechterBereich.typeKeys ("1")
    '/// Open fontdialog by clicking on Text Attributes button
    printlog " Open fontdialog by clicking on Text Attributes button"
    Textattribute.Click
    '/// Now the Dialog for Text Attributes opened. Choose tabpage Font
    printlog " Now the Dialog for Text Attributes opened. Choose tabpage Font"
    Kontext
    Active.setpage TabFont
    Kontext "TabFont"
    Call DialogTest ( TabFont)
    '/// Count number of western fonts (amount is dependent from system but should be more than one)
    printlog " Count number of western fonts (amount is dependent from system but should be more than one)"
    if Fontwest.GetItemCount < 1 then warnlog "The Fontwest listbox is empty"
    '/// Count number of western Typeface (amount is dependent from font but should be more than one)
    printlog " Count number of western Typeface (amount is dependent from font but should be more than one)"
    if StyleWest.GetItemCount < 1 then warnlog "The Stylewest listbox is empty"
    '/// Count number of western Size (amount is dependent from font but should be more than one)
    printlog " Count number of western Size (amount is dependent from font but should be more than one)"
    if SizeWest.GetItemCount < 1 then warnlog "The Sizewest listbox is empty"
    '/// Count number of western Language (amount is dependent from system but should be more than one)
    printlog " Count number of western Language (amount is dependent from system but should be more than one)"
    if LanguageWest.GetItemCount < 1 then warnlog "The Languagewest listbox is empty"
    '/// Count number of asian fonts (amount is dependent from system but should be more than one)
    printlog " Count number of asian fonts (amount is dependent from system but should be more than one)"
    if FontEast.GetItemCount < 1 then warnlog "The Fonteast listbox is empty"
    '/// Count number of asian Typeface (amount is dependent from font but should be more than one)
    printlog " Count number of asian Typeface (amount is dependent from font but should be more than one)"
    if StyleEast.GetItemCount < 1 then warnlog "The Styleeast listbox is empty"
    '/// Count number of asian Size (amount is dependent from font but should be more than one)
    printlog " Count number of asian Size (amount is dependent from font but should be more than one)"
    if SizeEast.GetItemCount < 1 then warnlog "The SizeEast listbox is empty"
    '/// Count number of asian Language (amount is dependent from system but should be more than one)
    printlog " Count number of asian Language (amount is dependent from system but should be more than one)"
    if LanguageEast.GetItemCount < 1 then warnlog "The Languageeast listbox is empty"
    '/// Count number of CTL fonts (amount is dependent from system but should be more than one)
    printlog " Count number of CTL fonts (amount is dependent from system but should be more than one)"
    if FontCTL.GetItemCount < 1 then warnlog "The FontCTL listbox is empty"
    '/// Count number of CTL Typeface (amount is dependent from font but should be more than one)
    printlog " Count number of CTL Typeface (amount is dependent from font but should be more than one)"
    if StyleCTL.GetItemCount < 1 then warnlog "The StyleCTL listbox is empty"
    '/// Count number of CTL Size (amount is dependent from font but should be more than one)
    printlog " Count number of CTL Size (amount is dependent from font but should be more than one)"
    if SizeCTL.GetItemCount < 1 then warnlog "The SizeCTL listbox is empty"
    '/// Count number of CTL Language (amount is dependent from system but should be more than one)
    printlog " Count number of CTL Language (amount is dependent from system but should be more than one)"
    if LanguageCTL.GetItemCount < 1 then warnlog "The LanguageCTL listbox is empty"
    '/// Choose tabpage Font Effects
    printlog " Choose tabpage Font Effects"
    Kontext
    Active.setpage TabFontEffects
    Kontext "TabFontEffects"
    Call DialogTest ( TabFontEffects)
    '/// Choose second entry for Underlining
    printlog " Choose second entry for Underlining"
    Underline.Select 2
    '/// Count number of Color
    printlog " Count number of Color"
    if Color.GetItemCount < 1 then warnlog "The Color listbox is empty"
    '/// Choose second entry for Strikethrough
    printlog " Choose second entry for Strikethrough"
    StrikeThrough.Select 2
    '/// Check Individual words
    printlog " Check Individual words"
    IndividualWords.Check
    '/// Check Outline
    printlog " Check Outline"
    Outline.Check
    '/// Check Shadow
    printlog " Check Shadow"
    Shadow.Check
    '/// Choose second entry for Relief
    printlog " Choose second entry for Relief"
    Relief.Select 2
    '/// Verify that Outline and Shadow are now disabled
    printlog " Verify that Outline and Shadow are now disabled"
    if Outline.IsEnabled then warnlog "Outline is enabled but should be disabled"
    if Shadow.IsEnabled then warnlog "Shadow is enabled but should be disabled"
    '/// Choose second entry for Emphasis mark
    printlog " Choose second entry for Emphasis mark"
    Emphasis.Select 2
    '/// Verify that Position is enabled
    printlog " Verify that Position is enabled"
    if not Position.IsEnabled then warnlog "Position is disabled but should be enabled"
    '/// Count number of Font colors
    printlog " Count number of Font colors"
    if FontColor.GetItemCount < 1 then warnlog "The FontColor listbox is empty"
    '/// Choose tabpage Font position
    printlog " Choose tabpage Font position"
    Kontext
    Active.setpage TabFontPosition
    Kontext "TabFontPosition"
    Call DialogTest ( TabFontPosition)
    '/// Check Superscript
    printlog " Check Superscript"
    SuperScript.Check
    '/// Check that Relative Font Size is enabled
    printlog " Check that Relative Font Size is enabled"
    if not RelativeFontSize.IsEnabled then warnlog "The RelativeFontSize is disabled but should be enabled"
    '/// Uncheck Automatic
    printlog " Uncheck Automatic"
    Automatic.UnCheck
    '/// Raise Raise/Lower by 1
    printlog " Raise Raise/Lower by 1"
    RaiseLower.More
    '/// Check Normal
    printlog " Check Normal"
    Normal.Check
    '/// Verify that Relative font size is disabled
    printlog " Verify that Relative font size is disabled"
    if RelativeFontSize.IsEnabled then warnlog "RelativeFontSize is enabled but should be disabled"
    '/// Verify that Raise is disabled
    printlog " Verify that Raise is disabled"
    if RaiseLower.IsEnabled then warnlog "Raise is enabled but should be disabled"
    '/// Verify that Automatic is disabled
    printlog " Verify that Automatic is disabled"
    if Automatic.IsEnabled then warnlog "Automatic is enabled but should be disabled"
    '/// Check Subscript
    printlog " Check Subscript"
    Subscript.Check
    '/// Verify that Relative font size is enabled
    printlog " Verify that Relative font size is enabled"
    if not RelativeFontSize.IsEnabled then warnlog "The RelativeFontSize is disabled but should be enabled"
    '/// Check Automatic
    printlog " Check Automatic"
    Automatic.Check
    '/// Verify that Raise is disabled
    printlog " Verify that Raise is disabled"
    if RaiseLower.IsEnabled then warnlog "Raise is enabled but should be disabled"
    '/// Lower Scale width by 1
    printlog " Lower Scale width by 1"
    ScaleWith.Less
    '/// Change Spacing to second entry
    printlog " Change Spacing to second entry"
    Spacing.Select 2
    '/// Verify that SpacingBy is enabled
    printlog " Verify that SpacingBy is enabled"
    if not SpacingBy.IsEnabled then warnlog "The SpacingBy is disabled but should be enabled"
    '/// Change Spacing to first entry
    printlog " Change Spacing to first entry"
    Spacing.Select 1
    '/// Verify that SpacingBy is disabled
    printlog " Verify that SpacingBy is disabled"
    if SpacingBy.IsEnabled then warnlog "SpacingBy is enabled but should be disabled"
    '/// Check Pair kerning
    printlog " Check Pair kerning"
    PairKerning.Check
    '/// Close Text Attributes dialog with Cancel
    printlog " Close Text Attributes dialog with Cancel"
    TabFontPosition.Cancel

    Kontext "TabKopfzeileCalc"
    '/// Open menu on File button
    printlog " Open menu on File button"
'Control not usable by testtool (#i85788')
'    Datei.Open ()
    '/// Choose second entry
    printlog " Choose second entry"
'    MenuSelect 2
    '/// Close menu
    printlog " Close menu"
'    MenuSelect (0)
    '/// Click button for Sheetname
    printlog " Click button for Sheetname"
    Tabelle.Click
    '/// Click button for Page
    printlog " Click button for Page"
    Seitennummer.Click
    '/// Click button for Pages
    printlog " Click button for Pages"
    Seitenanzahl.Click
    '/// Click button for Date
    printlog " Click button for Date"
    Datum.Click
    '/// Click button for Time
    printlog " Click button for Time"
    Zeit.Click

    '/// Choose tabpage Header (left)
    printlog " Choose tabpage Header (left)"
    Kontext
    Active.SetPage TabKopfzeileCalcLinks
    Kontext "TabKopfzeileCalcLinks"
    Call DialogTest ( TabKopfzeileCalcLinks )
    '/// Choose in Listbox Header the first entry (none)
    printlog " Choose in Listbox Header the first entry (none)"
    PredefinedHeaderLeft.Select 1    
    '/// Enter 'Test' in left area field
    printlog " Enter 'Test' in left area field"
    LinkerBereich.typeKeys ("Test")
    '/// Enter 'Test' in middle area field
    printlog " Enter 'Test' in middlearea field"
    MittlererBereich.typeKeys ("Test")
    '/// Enter 'Test' in right area field
    printlog " Enter 'Test' in right area field"
    RechterBereich.typeKeys ("Test")
    '/// Open fontdialog by clicking on Text Attributes button
    printlog " Open fontdialog by clicking on Text Attributes button"
    TextAttribute.Click
    '/// Now the Dialog for Text Attributes opened. Choose tabpage Font
    printlog " Now the Dialog for Text Attributes opened. Choose tabpage Font"
    Kontext
    Active.setpage TabFont
    Kontext "TabFont"
    '/// Close fontdialog with Cancel
    printlog " Close fontdialog with Cancel"
    TabFont.Cancel
    Kontext "TabKopfzeileCalcLinks"
    '/// Open menu on File button
    printlog " Open menu on File button"
'Control not usable by testtool (#i85788')
'    Datei.Open ()
    '/// Choose second entry
    printlog " Choose second entry"
'    MenuSelect 2
    '/// Close menu
    printlog " Close menu"
'    MenuSelect (0)
    '/// Click button for Sheetname
    printlog " Click button for Sheetname"
    Tabelle.Click
    '/// Click button for Page
    printlog " Click button for Page"
    Seitennummer.Click
    '/// Click button for Pages
    printlog " Click button for Pages"
    Seitenanzahl.click
    '/// Click button for Date
    printlog " Click button for Date"
    Datum.Click
    '/// Click button for Time
    printlog " Click button for Time"
    Zeit.Click
    
    '/// Choose tabpage Footer (right)
    printlog " Choose tabpage Footer (right)"
    Kontext
    Active.SetPage TabFusszeileCalc
    Kontext "TabFusszeileCalc"
    Call DialogTest ( TabFusszeileCalc )
    '/// Choose in Listbox Footer the first entry (none)
    printlog " Choose in Listbox Footer the first entry (none)"
    PredefinedFooter.Select 1    
    '/// Enter 'Test' in left area field
    printlog " Enter 'Test' in left area field"
    LinkerBereich.typeKeys ("Test")
    '/// Enter 'Test' in middle area field
    printlog " Enter 'Test' in middlearea field"
    MittlererBereich.typeKeys ("Test")
    '/// Enter 'Test' in right area field
    printlog " Enter 'Test' in right area field"
    RechterBereich.typeKeys ("Test")
    '/// Open fontdialog by clicking on Text Attributes button
    printlog " Open fontdialog by clicking on Text Attributes button"
    TextAttribute.Click
    '/// Now the Dialog for Text Attributes opened. Choose tabpage Font
    printlog " Now the Dialog for Text Attributes opened. Choose tabpage Font"
    Kontext
    Active.setpage TabFont
    Kontext "TabFont"
    '/// Close fontdialog with Cancel
    printlog " Close fontdialog with Cancel"
    TabFont.Cancel
    Kontext "TabFusszeileCalc"
    '/// Open menu on File button
    printlog " Open menu on File button"
'Control not usable by testtool (#i85788')
'    Datei.Open ()
    '/// Choose second entry
    printlog " Choose second entry"
'    MenuSelect 2
    '/// Close menu
    printlog " Close menu"
'    MenuSelect (0)
    '/// Click button for Sheetname
    printlog " Click button for Sheetname"
    Tabelle.Click
    '/// Click button for Page
    printlog " Click button for Page"
    Seitennummer.Click
    '/// Click button for Pages
    printlog " Click button for Pages"
    Seitenanzahl.click
    '/// Click button for Date
    printlog " Click button for Date"
    Datum.Click
    '/// Click button for Time
    printlog " Click button for Time"
    Zeit.Click

    '/// Choose tabpage Footer (left)
    printlog " Choose tabpage Footer (left)"
    Kontext
    Active.SetPage TabFusszeileCalcLinks
    Kontext "TabFusszeileCalcLinks"
    Call DialogTest ( TabFusszeileCalcLinks )
    '/// Choose in Listbox Footer the first entry (none)
    printlog " Choose in Listbox Footer the first entry (none)"
    PredefinedFooterLeft.Select 1    
    '/// Enter 'Test' in left area field
    printlog " Enter 'Test' in left area field"
    LinkerBereich.typeKeys ("Test")
    '/// Enter 'Test' in middle area field
    printlog " Enter 'Test' in middlearea field"
    MittlererBereich.typeKeys ("Test")
    '/// Enter 'Test' in right area field
    printlog " Enter 'Test' in right area field"
    RechterBereich.typeKeys ("Test")
    '/// Open fontdialog by clicking on Text Attributes button
    printlog " Open fontdialog by clicking on Text Attributes button"
    TextAttribute.Click
    '/// Now the Dialog for Text Attributes opened. Choose tabpage Font
    printlog " Now the Dialog for Text Attributes opened. Choose tabpage Font"
    Kontext
    Active.setpage TabFont
    Kontext "TabFont"
    '/// Close fontdialog with Cancel
    printlog " Close fontdialog with Cancel"
    TabFont.Cancel
    Kontext "TabFusszeileCalcLinks"
    '/// Open menu on File button
    printlog " Open menu on File button"
'Control not usable by testtool (#i85788')
'    Datei.Open ()
    '/// Choose second entry
    printlog " Choose second entry"
'    MenuSelect 2
    '/// Close menu
    printlog " Close menu"
'    MenuSelect (0)
    '/// Click button for Sheetname
    printlog " Click button for Sheetname"
    Tabelle.Click
    '/// Click button for Page
    printlog " Click button for Page"
    Seitennummer.Click
    '/// Click button for Pages
    printlog " Click button for Pages"
    Seitenanzahl.click
    '/// Click button for Date
    printlog " Click button for Date"
    Datum.Click
    '/// Click button for Time
    printlog " Click button for Time"
    Zeit.Click
    
    '/// Close Headers/Footers-dialog with cancel
    printlog " Close Headers/Footers-dialog with cancel"
    TabFusszeileCalcLinks.close
    '/// Set the 'Asian and CTL Language support' to default
    printlog " Set the 'Asian and CTL Language support' to default"
    if bAsianLanguage = FALSE then
        Call ActiveDeactivateAsianSupport(FALSE)
    end if
    if bCTLLanguage = FALSE then
        Call ActiveDeactivateCTLSupport(FALSE)
    end if
     '/// Close document
    printlog " Close document"
    hCloseDocument
    
endcase

'-----------------------------------------------------------