summaryrefslogtreecommitdiff
path: root/testautomation/writer/required/includes/w_001b_.inc
blob: 297d04b579bb69447a596ccf526f8206b6f23b61 (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
'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 : helge.delfs@oracle.com
'*
'* short description :  Required-Testcases for the File-menu.
'*
'\***********************************************************************

sub w_001b_

    printLog Chr(13) + "--------- File Menu (w_001b_.inc) ----------"
    gApplication = "WRITER"

    Call tToolsXMLFilterSettings
    Call tFileExportAsPDF
    Call tExportAsPDFButton
    Call tFileSendCreateMasterDocument
    Call tFileSendCreateHTMLDocument
    Call tFileSendOutlineToPresentation
    Call tFileSendOutlineToClipboard
    Call tFileSendCreateAutoabstract
    Call tFileSendAutoabstractToPresentation

    'Writer Master Document
    gApplication = "MASTERDOCUMENT"
    Call tMasterDocFileSaveWithPassword
    Call tMasterDocFileReload
    Call tMasterDocFileVersions
    Call tMasterDocFileSendCreateHTMLDocument
    Call tMasterDocFileSendOutlineToPresentation
    Call tMasterDocFileSendOutlineToClipboard
    Call tMasterDocFileSendCreateAutoabstract
    Call tMasterDocFileSendAutoabstractToPresentation
    gApplication = "WRITER"
    
end sub

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

testcase tFileSendCreateMasterDocument
    PrintLog "- File / Send / Create Masterdocument"
    if gApplication <> "WRITER" then
        printlog "Not in : " + gApplication
        goto endsub
    endif

    PrintLog "Open new document"
    Call hNewDocument
    Call wTypeKeys("File -> Send -> Create Master Document")
    PrintLog "Choose File / Send /Create Master Document"
    FileSendCreateMasterdocument
    Kontext "SendMasterDocument"

    PrintLog "Cancel File-Save-dialog"
    SendMasterdocument.Cancel
    Kontext "Active"
    if Active.Exists then Active.OK
    PrintLog "Close active document"
    Call hCloseDocument
endcase

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

testcase tFileSendCreateHTMLDocument
    PrintLog "- File / Send / Create HTML-Dokument"
    PrintLog "Open new document"
    Select Case gApplication
    Case "WRITER", "MASTERDOCUMENT" : hNewDocument()
    Case else
        printlog "Not in WriterWeb!"
        goto endsub
    end select
    PrintLog "Choose File / Send / Create HTML-Document"
    FileSendCreateHTMLDocument

    PrintLog "Cancel Filedialog"
    Kontext "SendHTMLDocument"
    SendHTMLDocument.Cancel
    Kontext "Active"
    if Active.Exists then Active.OK

    PrintLog "Close documents"
    Do Until GetDocumentCount = 0
        Call hCloseDocument
    Loop
endcase

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

testcase tFileSendOutlineToPresentation
    Dim sFile$
    PrintLog "- File / Send / Outline to Presentation"
    Select Case gApplication
    Case "WRITER"
        sFile$ = "htmltest.sxw"
    Case "MASTERDOCUMENT"
        sFile$ = "htmltest.sxg"
    Case "HTML"
        printlog "Not in Writer/Web!"
        goto endsub
    end select
    PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile$ )
    Kontext "Navigator"
    if Navigator.Exists then Navigator.Close
    Sleep 1
    Kontext "DocumentWriter"
    PrintLog "File / Send / Outline to presentation"
    try
        FileSendOutlineToPresentation
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'"
        Call hCloseDocument
        goto endsub
    endcatch
    Wait(500)

    Kontext "DocumentImpressOutlineView"
    if DocumentImpressOutlineView.Exists then
        DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
        DocumentImpressOutlineView.TypeKeys "<Shift End>"
        Wait(500)
        try
            EditCopy
            if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
        catch
            QAErrorlog "Send outline to presentation doesn't work correct."
        endcatch
    else
        WarnLog "Outlinemode comes not up!"
    endif

    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )
    hFileCloseAll()
endcase

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

testcase tFileSendOutlineToClipboard
    Dim sFile$
    PrintLog "- File / Send / Outline to Clipboard"
    Select Case gApplication
    Case "WRITER"
        sFile$ = "htmltest.sxw"
    Case "MASTERDOCUMENT"
        sFile$ = "htmltest.sxg"
    Case "HTML"
        printlog "Not in Writer/Web!"
        goto endsub
    end select

    PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile$ )
    Sleep 1
    PrintLog "File / Send / Outline to Clipboard"
    try
        FileSendOutlineToClipboard
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'"
        Call hCloseDocument
        goto endsub
    endcatch

    Sleep 1
    PrintLog "Close active document"
    Call hCloseDocument
    WaitSlot(1000)
    Call hNewDocument
    PrintLog "Open new document"

    WaitSlot(1000)

    PrintLog "Paste outline in new document"
    hUseAsyncSlot( "EditPaste" )
    Call wTypeKeys("<Up>", 6)
    Call wTypeKeys("<Home><Shift End>")
    hUseAsyncSlot( "EditCopy" )
    if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
    WaitSlot(1000)
    PrintLog "Close active document"
    Call hCloseDocument
endcase

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

testcase tFileSendCreateAutoabstract
    Dim sFile$
    PrintLog "- File / Send / Create Autoabstract"
    Select Case gApplication
    Case "WRITER"
        sFile$ = "htmltest.sxw"
    Case "MASTERDOCUMENT"
        sFile$ = "htmltest.sxg"
    Case "HTML"
        printlog "Not in Writer/Web!"
        goto endsub
    end select

    PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile$ )
    Kontext "Navigator"
    if Navigator.Exists then Navigator.Close
    Sleep 1
    Kontext "DocumentWriter"
    PrintLog "File / Send / Create Autoabstract"
    try
        FileSendCreateAutoabstract
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'"
        Call hCloseDocument
        goto endsub
    endcatch
    WaitSlot(2000)

    PrintLog "Close upcoming dialog with 'Ok"
    Kontext "AutoAbstractErzeugen"
    AutoAbstractErzeugen.OK
    Sleep 1
    Call wTypeKeys("<Home><Up>", 10)
    Call wTypeKeys("<Shift End>")
    try
        EditCopy
        WaitSlot(1000)
        if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
    catch
        QAErrorlog "Empty autoabstract created"
    endcatch

    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )
    hFileCloseAll()

endcase

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

testcase tFileSendAutoabstractToPresentation
    Dim sFile$
    PrintLog "- File / Send / Autoabstract to Presentation"
    Select Case gApplication
    Case "WRITER"
        sFile$ = "htmltest.sxw"
    Case "MASTERDOCUMENT"
        sFile$ = "htmltest.sxg"
    Case "HTML"
        printlog "Not in Writer/Web!"
        goto endsub
    end select

    PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile$ )
    Kontext "Navigator"
    if Navigator.Exists then Navigator.Close
    Sleep 1
    Kontext "DocumentWriter"
    PrintLog "File / Send / Create Autoabstract To Presentation"
    try
        FileSendAutoabstractToPresentation
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'"
        Call hCloseDocument
        goto endsub
    endcatch

    Sleep 1
    Kontext "AutoAbstractErzeugen"
    PrintLog "Close upcoming dialog with 'Ok'"
    AutoAbstractErzeugen.OK

    Sleep 2
    Kontext "DocumentImpressOutlineView"
    if DocumentImpressOutlineView.Exists then
        PrintLog "Point cursor to beginning of document"
        DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
        PrintLog "Mark text"
        DocumentImpressOutlineView.TypeKeys "<Shift End>"
        try
            EditCopy
            WaitSlot(1000)
            if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
        catch
            QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!"
        endcatch
    else
        Warnlog "- Outline in Impress not created!"
    endif
    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )
    Call hCloseDocument
    PrintLog "Close active document"

    hSetDocumentContext()
    FileClose
endcase
'--------------------------------------------------------------------------------------------------------------------------------------------

testcase tMasterDocFileSaveWithPassword
    Dim DokumentPfad$
    Dim Datei$
    Dim sFile$
    Dim sFile2$

    Printlog "- File / Save with Password"
    sFile$ = "password.odm"
    sFile2$ = "password2.odm"

    gApplication = "MASTERDOCUMENT"
    PrintLog "Open new document"
    Call hNewDocument
    PrintLog "Enter some text into document"
    Call wTypeKeys("This document will be saved with a password!")

    if gUseSysDlg = True then goto endsub
    Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile$ )
    if Dir (Datei$) <> "" then kill Datei$

    PrintLog "Choose File / Save as."
    FileSaveAs
    PrintLog "enter destination and check 'Password'"
    Kontext "SpeichernDlg"
    if Passwort.IsEnabled then
        Passwort.Check
    else
        Warnlog "- Not able to save with Password -> Checkbox is disabled! Maybe default-filter wrong!?"
        SpeichernDlg.Cancel
        PrintLog "if Checkbox is disabled the test stops here!"
        Call hCloseDocument
        goto endsub
    endif

    Dateiname.SetText Datei$
    PrintLog "Save your document"
    Speichern.Click
    Sleep 1
    Kontext "Active"
    if Active.Exists (1) then Active.Yes

    Sleep 1
    PrintLog "Password dialog has to come up"
    Kontext "PasswordFileSave"
    if PasswordFileSave.Exists then
        PrintLog "Enter your password"
        Password.SetText "12345"
        PrintLog "Re-Enter a wrong passwort"
        PasswordConfirm.Settext "54321"
        PasswordFileSave.OK
        Sleep 2
    else
        Warnlog "- Password-Dialog not up !"
    endif

    Kontext "Active"
    Sleep 1
    PrintLog "A messagebox has to come up, warns of wrong confirmation"
    if Active.Exists(1) then
        Active.OK
    else
        Warnlog "Able to save document with wrong password"
    endif

    Kontext "PasswordFileSave"
    if PasswordFileSave.Exists then
        PrintLog "Enter new password, and re-enter the same password"
        Password.SetText "12345"
        PasswordConfirm.SetText "12345"
        PasswordFileSave.OK
    else
        Warnlog "- Password-Dialog not up !"
    endif

    Sleep 1
    PrintLog "Close the document"
    FileClose
    WaitSlot(2000)
    PrintLog "Open previous saved document"
    Call hFileOpen( Datei$)

    Kontext "PasswordFileOpen"
    PrintLog "Enter a wrong password."
    if PasswordFileOpen.Exists then
        PasswortName.SetText "34567"
        PasswordFileOpen.OK
    else
        Warnlog "- Password-Dialog not up or Document couldn't be loaded!"
    endif

    PrintLog "A messagebox has to come up, warns of wrong password"
    Kontext "Active"
    Sleep 1
    if Not Active.Exists(1) then
        Warnlog "Able to load document with wrong password"
    else
        Active.OK
    endif

    Kontext "PasswordFileOpen"
    PrintLog "Close password dialog"
    if PasswordFileOpen.Exists then
        PasswordFileOpen.Cancel
    endif

    Sleep 1
    PrintLog "File / Open again your previous saved document"
    Call hFileOpen( Datei$)
    PrintLog "Enter your password in password dialog"
    Kontext "PasswordFileOpen"
    if PasswordFileOpen.Exists then
        PasswortName.SetText "12345"
        PasswordFileOpen.OK
    else
        Warnlog "- Password-Dialog not up!"
    endif
    Sleep 1

    Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile2$ )
    if Dir (Datei$) <> "" then kill Datei$
    PrintLog "File / Save as ..."
    FileSaveAs
    Kontext "SpeichernDlg"
    if Not Passwort.IsChecked = True then
        if gPlatgroup = "unx" then
            QAErrorlog "#i73968#Opening a password protected file looses focus after loading"
        else
            Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !"
        endif
        Passwort.Check
        SpeichernDlg.Cancel
    else
        Dateiname.SetText Datei$
        Speichern.Click
        Kontext "Active"
        if Active.Exists(2) then Active.Yes
        PrintLog "Click on 'Save' in file open dialog"
        Kontext "PasswordFileSave"
        if Not PasswordFileSave.Exists(1) then
            Warnlog "Passworddialog is not coming up on saving document"
        else
            Password.SetText "54321"
            PasswordConfirm.SetText "54321"
            PasswordFileSave.OK
            PrintLog "The password dialog should come up"
            Sleep 1
            FileClose
            PrintLog "File / Close and open your document again"
            hFileOpen( Datei$)
            Sleep 1
            Kontext "PasswordFileOpen"
            PrintLog "Now the passwort dialog should come up"
            if Not PasswordFileOpen.Exists(2) then
                Warnlog "Passworddialog is not coming up on reload"
            else
                PasswortName.SetText "54321"
                PasswordFileOpen.OK
            endif
        endif
    endif
    PrintLog "Close active document"
    Call hCloseDocument
endcase

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

testcase tMasterDocFileReload

    Dim sDocumentPath as string
    Dim sFile as string
    Dim WriterFilterExtension(10) as string
    Dim MasterDocFilterExtension(10) as string

    WriterFilterExtension() = hGetFilternameExtension ( "writer8" )
    MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" )

    PrintLog "- File / Reload"
    sFile = "reload." & MasterDocFilterExtension(0)
    sDocumentPath = gOfficePath + "user\work\" + sFile

    gApplication = "MASTERDOCUMENT"
    
    PrintLog "Open new document"
    Call hNewDocument

    PrintLog "Enter some text, save and close document"
    Call wTypeKeys("File -> Reload!")
    Call hFileSaveAsKill ( sDocumentPath )
    hUseAsyncSlot( "FileClose" )
    
    Kontext
    if ( MessageBox.Exists( 1 ) ) then
        WarnLog "Messagebox after saving and closing : " + MessageBox.GetText
        MessageBox.Yes
    endif

    PrintLog "Open previous saved document"
    Call hFileOpen(  sDocumentPath )
    
    PrintLog "Insert a table in document"
    Call hTabelleEinfuegen
    
    PrintLog "File / Reload"
    hUseAsyncSlot( "FileReload" )

    PrintLog "Quit messagebox with 'No'"
    Kontext "Active"
    if ( Active.exists( 1 ) ) then
        Active.No
    else
        warnlog( "Messagebox missing" )
    endif

    PrintLog "File / Reload again and quit messagebox with yes"
    hUseAsyncSlot( "FileReload" )

    Kontext "Active"
    if ( Active.exists( 2 ) ) then
        Active.Yes
    else
        warnlog( "Messagebox missing" )
    endif
    
    PrintLog "Close active document"
    Call hCloseDocument
    hDeleteFile( sDocumentPath )
    
endcase

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

testcase tMasterDocFileVersions

    Dim sFile as string
    Dim WriterFilterExtension(10) as string
    Dim MasterDocFilterExtension(10) as string

    WriterFilterExtension() = hGetFilternameExtension ( "writer8" )
    MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" )

    gApplication = "MASTERDOCUMENT"
    
    PrintLog "- File / Versions"
    sFile = "kann_weg." & MasterDocFilterExtension(0)

    PrintLog "Open new document"
    Call hNewDocument
    Call wTypeKeys ("File version")
    
    PrintLog "enter some text in documet and save it"
    Call hFileSaveAsKill(gOfficePath + "user\work\" + sFile )

    try
        PrintLog "Choose File / Versions"
        FileVersions
    catch
        Warnlog "- File / Versions not accessible!"
        goto endsub
    endcatch

    Kontext "Versionen"
    if ( Versionen.exists( 2 ) ) then
    
        Call DialogTest ( Versionen )
        Speichern.Click
        
        PrintLog "In Version-dialog click 'Save New Version'"
        Kontext "VersionskommentarEingeben"
        if ( VersionskommentarEingeben.exists( 1 ) ) then
            Call DialogTest ( VersionskommentarEingeben )
            
            PrintLog "Cancel dialog 'Insert version comment'"
            VersionskommentarEingeben.Cancel
        else
            warnlog( "Dialog <VersionskommentarEingeben> is not available" )
        endif

        Kontext "Versionen"
        PrintLog "Close dialog"
        Versionen.Close()
    else
        warnlog( "Dialog <Versionen> is not available" )
    endif
    
    PrintLog "Close active document"
    Call hCloseDocument
    
endcase

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

testcase tMasterDocFileSendCreateHTMLDocument

    PrintLog "- File / Send / Create HTML-Dokument"
    
    gApplication = "MASTERDOCUMENT"
    
    PrintLog "Open new document"
    Call hNewDocument

    PrintLog "Choose File / Send / Create HTML-Document"
    FileSendCreateHTMLDocument

    PrintLog "Cancel Filedialog"
    Kontext "SendHTMLDocument"
    if ( SendHTMLDocument.exists( 2 ) ) then
        SendHTMLDocument.Cancel
        
        Kontext "Active"
        if Active.Exists( 1 ) then 
            warnlog( "Unexpected messgebox" & Active.getText() )
            Active.OK
        endif
    else
        warnlog( "Dialog <SendHTMLDocument> is not available" )
    endif
        
    PrintLog "Close active document"
    Call hCloseDocument
    
endcase

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

testcase tMasterDocFileSendOutlineToPresentation

    PrintLog "- File / Send / Outline to Presentation"

    Dim sFile as string : sFile = "htmltest.sxg"

    gApplication = "MASTERDOCUMENT"

    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile )
    
    Kontext "Navigator"
    if ( Navigator.Exists ) then 
        Navigator.Close
        WaitSlot()
    endif
    
    Kontext "DocumentWriter"
    PrintLog "File / Send / Outline to presentation"
    try
        FileSendOutlineToPresentation
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'"
        Call hCloseDocument
        goto endsub
    endcatch

    Kontext "DocumentImpressOutlineView"
    if ( DocumentImpressOutlineView.Exists( 2 ) ) then
        DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
        DocumentImpressOutlineView.TypeKeys "<Shift End>"
        hUseAsyncSlot( "EditCopy" )
        if ( GetClipboardText <> "Seite 1." ) then 
            QAErrorlog "Wrong Outline in Impress Outlinemode"
        endif
    else
        WarnLog "Outlinemode comes not up!"
    endif

    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )
    
    PrintLog "Close documents"
    hFileCloseAll()
    
endcase

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

testcase tMasterDocFileSendOutlineToClipboard

    gApplication = "MASTERDOCUMENT"
    Dim sFile as string : sFile = "htmltest.sxg"

    PrintLog "- File / Send / Outline to Clipboard"
    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile )
    
    PrintLog "File / Send / Outline to Clipboard"
    try
        FileSendOutlineToClipboard
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'"
        Call hCloseDocument
        goto endsub
    endcatch

    PrintLog "Close active document"
    Call hCloseDocument
    
    PrintLog "Open new document"
    Call hNewDocument
    
    PrintLog "Paste outline in new document"
    hUseAsyncSlot( "EditPaste" )
    Call wTypeKeys("<Up>", 6)
    Call wTypeKeys("<Home><Shift End>")
    hUseAsyncSlot( "EditCopy" )
    if ( GetClipboardText <> "Seite 1." ) then 
        QAErrorlog "Wrong Outline in Impress Outlinemode"
    endif

    PrintLog "Close active document"
    Call hCloseDocument
    gApplication = "WRITER"
    
endcase

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

testcase tMasterDocFileSendCreateAutoabstract

    gApplication = "MASTERDOCUMENT"
    Dim sFile as string : sFile = "htmltest.sxg"

    PrintLog "- File / Send / Create Autoabstract"
    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile )
    
    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )

    Kontext "DocumentWriter"
    PrintLog "File / Send / Create Autoabstract"
    try
        FileSendCreateAutoabstract
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'"
        Call hCloseDocument
        goto endsub
    endcatch

    PrintLog "Close upcoming dialog with 'Ok"
    Kontext "AutoAbstractErzeugen"
    if ( AutoAbstractErzeugen.exists( 2 ) ) then
    
        AutoAbstractErzeugen.OK()

        Call wTypeKeys("<Home><Up>", 10)
        Call wTypeKeys("<Shift End>")
        
        hUseAsyncSlot( "EditCopy" )
        if GetClipboardText <> "Seite 1." then 
            QAErrorlog "Wrong Outline in Impress Outlinemode"
        endif
    else
        warnlog( "Dialog <AutoAbstractErzeugen> is not available" )
    endif    

    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )

    PrintLog "Close documents"
    hFileCloseAll()    
    gApplication = "WRITER"
    
endcase

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

testcase tMasterDocFileSendAutoabstractToPresentation

    gApplication = "MASTERDOCUMENT"
    Dim sFile as string : sFile = "htmltest.sxg"
    
    PrintLog "- File / Send / Autoabstract to Presentation"
    PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
    hFileOpenLocally(  gTesttoolPath + "writer\required\input\" + sFile )
    
    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )
    
    Kontext "DocumentWriter"
    PrintLog "File / Send / Create Autoabstract To Presentation"
    try
        FileSendAutoabstractToPresentation
    catch
        Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'"
        Call hCloseDocument
        goto endsub
    endcatch

    Kontext "AutoAbstractErzeugen"
    if ( AutoAbstractErzeugen.exists( 1 ) ) then
        PrintLog "Close upcoming dialog with 'Ok'"
        AutoAbstractErzeugen.OK
    else
        warnlog( "Dialog <AutoAbstractErzeugen> is not available" )
    endif

    Kontext "DocumentImpressOutlineView"
    if ( DocumentImpressOutlineView.Exists( 2 ) ) then
    
        PrintLog "Point cursor to beginning of document"
        DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
        
        PrintLog "Mark text"
        DocumentImpressOutlineView.TypeKeys "<Shift End>"
        try
            EditCopy
            WaitSlot(1000)
            if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
        catch
            QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!"
        endcatch
    else
        Warnlog "- Outline in Impress not created!"
    endif
    
    Kontext "Navigator"
    hCloseDialog( Navigator, "Close,optional" )

    Call hCloseDocument
    PrintLog "Close active document"

    hSetDocumentContext()
    FileClose
    gApplication = "WRITER"
    
endcase
'-------------------------------------------------------------------------------