summaryrefslogtreecommitdiff
path: root/testautomation/graphics/optional/includes/global/g_load_save.inc
blob: 7e9f9e8320fc7a7149fa46bf9661639b274369c3 (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
'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 : wolfram.garten@oracle.com
'*
'* short description :
'*
'**************************************************************************************
' #1 tFileOpenSaveEtc
' #1 tFileProperties
' #1 tFilePassword52
' #1 tFileOpenImport
' #1 tTestDXF255CharBug
' #1 tDeletedTemplate
' #1 tSaveLoadLayoutOLE
' #1 tSaveLoadLayoutEmpty
' #1 tSaveLoadLayoutText
' #1 tSaveLoadLayoutOutline
' #1 tSaveLoadLayoutPicture
' #1 tSaveLoadLayoutChart
' #1 tSaveLoadLayoutSpreadsheet
'\*************************************************************************************
testcase tFileOpenSaveEtc
    Dim Dokument$
    Dim Dokument2$

      Dokument$ = ConvertPath ( gOfficePath + "user\work\test1")
      Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2")

    if (gApplication = "IMPRESS") then
        ExtensionString = "odp"
    else
        ExtensionString = "odg"
    end if

   printlog "delete previous created documents: 'user\\work\\test1*.od?'"
   if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp")
   if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg")

   printlog "open application"
   hNewDocument
   gMouseclick 90,90
   printlog "create a textframe with content"
   Call hTextrahmenErstellen ( "This is a test",20,20,40,30 )
   printlog "save file as 'test1'"
   hFileSaveAsKill (Dokument$ + "." + ExtensionString)
   Sleep 10
   printlog "close Document"
   hCloseDocument
   printlog "Document Saved and Closed"

   printlog "load document 'test1'"
   hFileOpen (Dokument$ + "." + ExtensionString)

    Sleep 10
    printlog "close Document"
    hCloseDocument
    printlog "- document Loaded and closed"
    Sleep 10
    printlog "load document 'test1'"
    hFileOpen (Dokument$ + "." + ExtensionString)
    printlog "check if the document is writable"
    if fIsDocumentWritable = false then
        printlog "make the document writable and check if it's succesfull"
        if fMakeDocumentWritable = false then
            warnlog "The document can't be make writeable. Test stopped."
            goto endsub
        endif
    endif
    Sleep 10
    gMouseclick 90,90
    printlog "create another textbox with content"
    Call hTextrahmenerstellen ( "Change",60,60,80,80 )
    printlog "File->Close needn't work, just say CANCEL to the question about saving changes!"
    FileClose
    Kontext
    printlog "message about 'something changed should i [overwrite discard cancel]?'"
    if Messagebox.exists (5) then
      printlog "2:"+messagebox.gettext
      Messagebox.Cancel
    else
      Warnlog "Mesagebox is missing :-("
    endif
    printlog "Document loaded, changed and closed discarding all changes"

    printlog "Last version"
    try
        printlog "File Reload"
        FileReload
    catch
        kontext "DocumentImpress"
    try
        printlog "File Reload"
        FileReload
   catch
           warnlog "BREAKPOINT! File reload doesn't work. Create new object and try again :-("
       endcatch
   endcatch
   Kontext
   Messagebox.Yes
   Sleep 10
   gMouseDoubleClick 70,70
   hTypeKeys "<Down>", 3
   hTypeKeys "<SHIFT LEFT>",10
   hTypeKeys "<MOD1 C>"
   Sleep 1
   if GetClipboardText = "Change" then Warnlog "- Last version not loaded. Changes in the document still in."
   printlog "- Change document, save it under different name"
   Kontext "DocumentImpress"
   printlog "new textbox"
   Call hTextrahmenErstellen ("Change2",10,10,50,20 )		
   gMouseclick 90,90
   sleep 1
    FileSaveAs
    Kontext "SpeichernDlg"
    Dateiname.SetText Dokument2$
    Speichern.Click
    kontext "AlienWarning"
    if AlienWarning.exists(5) then
     warnlog "#i41983# Alien Warning on export not allowed"
     AlienWarning.OK
    endif
    Kontext "Messagebox"
    if Messagebox.Exists(2) then Messagebox.Yes
   Sleep 3
   printlog "Close document"
   FileClose								
   sleep 10
      Kontext "Messagebox"
      if Messagebox.Exists Then
          Warnlog "- Document saved, but Msgbox appeared, even no changes were made: " + Messagebox.GetText
          Messagebox.Yes
      end if
      sleep 2
      printlog "- Loading write protected file"
      FileOpen
      printlog "Open write protected file"
      Kontext "OeffnenDlg"
      Dateiname.SetText (Dokument2$ + "." + ExtensionString)
      NurLesen.Check
      Oeffnen.Click
    Sleep 10
    printlog "check if the document is writable"
    try
        printlog "attempt to create a textbox"
        Call hTextrahmenErstellen ( "Hello",85,85,95,95 )
        hTypeKeys "<SHIFT LEFT>",5
        hTypeKeys "<MOD1 C>"
        sleep 1
        if GetClipboardText = "Hello" then Warnlog "Write protected document could be edited"
   catch
        Printlog "- Write protected document could not be edited"
   endcatch
   sleep 5
   printlog "Close document"
   FileClose								
   
endcase 'tFileOpenSaveEtc
'-------------------------------------------------------------------------------
testcase tFileProperties

    qaerrorlog "#i88163#, File/properties/user defined fields get mixed up."
    goto endsub
    Call hNewDocument
    Call hTextrahmenErstellen ("This is a document to test the Menupoint in File/Properties",30,30,60,40)
    if (gApplication = "IMPRESS") then
        ExtensionString = "odp"
    else
        ExtensionString = "odg"
    end if
    FileProperties
    Kontext
    active.SetPage TabDokumentinfo
    Kontext "TabDokumentinfo"
    Titel.SetText "Properties"
    Thema.SetText "Documentproperties"
    Schluesselworte.SetText "None"

    qaerrorlog "#i95523#"
    'Kontext
    'active.SetPage TabBenutzer
    'Kontext "TabBenutzer"
    'Info2.SetText "Thorsten Peters"

    'Infofelder.Click
    'Kontext "InfonamenBearbeiten"
    'Namen2.SetText "Name"
    'InfonamenBearbeiten.OK
    'sleep 2
    Kontext
    active.SetPage TabInternet
    Kontext "TabInternet"
    RefreshThisDocument.Check

    TabInternet.OK
    hFileSaveAsKill ConvertPath (gOfficePath + "user\work\eigen." & ExtensionString)
    FileClose
    Kontext "Active"
    if Active.Exists(2) then Active.Yes

        PrintLog "- File / Properties  compare"
        Sleep 2
        hFileOpen ConvertPath (gOfficePath + "user\work\eigen." + ExtensionString)

        printlog "check if the document is writable"
        if fIsDocumentWritable = false then
            printlog "make the document writable and check if it's succesfull"
            if fMakeDocumentWritable = false then
                warnlog "The document can't be make writeable. Test stopped."
                goto endsub
            endif
        endif
    FileProperties
    Kontext
    active.SetPage TabDokumentinfo
    Kontext "TabDokumentinfo"
    if Titel.GetText <> "Properties" then Warnlog "Description / Titel is wrong"
    if Thema.GetText <> "Documentproperties" then Warnlog "Description / Thema is wrong"
    if Schluesselworte.GetText <> "None" then Warnlog "Description / Keywords is wrong"

    qaerrorlog "#i95523#"
    'Kontext
    'active.SetPage TabBenutzer
    'Kontext "TabBenutzer"
    'if Info2.GetText <> "Thorsten Peters" then Warnlog "User Defined / Info2 is wrong"

    'Infofelder.Click
    'sleep 2
    'Kontext "InfonamenBearbeiten"
    'if Namen2.GetText <> "Name" then Warnlog "Edit Field Names / Info2 is wrong"
    'InfonamenBearbeiten.OK

    Kontext
    active.SetPage TabInternet
    Kontext "TabInternet"
    if RefreshThisDocument.IsChecked = FALSE then Warnlog "Internet / 'Refresh this document' is not checked"

    TabInternet.Close

    Call hCloseDocument
endcase 'tFileProperties

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

testcase tFilePassword52
    Dim Datei$
    dim i as integer
    dim x as integer
    dim y as integer
    dim sExt() as string

    sExt = array("d","a")
    for i = 0 to 1
        Datei$ = ConvertPath ( gTesttoolPath + "graphics\required\input\passwo52.sd"+sExt(i) )
        hFileOpen(Datei$)
        sleep 2
        Kontext "passwordFileOpen"
        if passwordFileOpen.exists(5) then
            PasswortName.SetText "12345"
            passwordFileOpen.OK
            Printlog "Ok, password dialog came up :-) for file : '" + datei$ + "'"
        else
            Warnlog "No password dialog came up :-( for file : '" + datei$ + "'"
        endif
        Kontext "Messagebox"
        if Messagebox.Exists(2) then
            Warnlog "messagebox ?: '" + Messagebox.GetText + "'"
        endif
        hCloseDocument
    next i
endcase 'tFilePassword52

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

testcase tFileOpenImport
    dim q as integer
    call hNewDocument
    FileOpen
    Kontext "OeffnenDlg"
    Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\imsusmap.cgm"))
    Oeffnen.Click
    Sleep 2
    
    call fMakeDocumentWritable
    
    kontext "DocumentImpress"
    if DocumentImpress.exists(5) then
        DocumentImpress.TypeKeys ("<Tab>")
    else
        warnlog "Not loaded in impress"
    endif
    try
        ContextPositionAndSize
        kontext
        messagebox.setpage TabPositionAndSize
        sleep 1
        TabPositionAndSize.Close
    catch
        warnlog "Documents of Type 'ComputerGraphicsMetafile' can't get loaded :-("
    endcatch
    Call hCloseDocument
    if (gApplication="DRAW") then
        Call hCloseDocument
    endif
endcase 'tFileOpenImport

'-------------------------------------------------------------------------------
testcase tTestDXF255CharBug

    printlog "tries to load a DXF-document which has a string-leght of 255 characters."
    dim q as integer
    call hNewDocument
    printlog "insert graphic "
    InsertGraphicsFromFile
    sleep 1
    kontext "Active"
    sleep 1
    if Active.Exists Then
        Active.OK
    end if
    sleep 1
    Kontext "GrafikEinfuegenDlg"
    sleep 2
    Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))
    Oeffnen.Click
    Sleep 2

   if gApplication = "DRAW" then
      Kontext "Documentdraw"
      if Documentdraw.exists(5) then
         Documentdraw.TypeKeys ("<Tab>")
      else
         warnlog "Not loaded in draw"
      endif
   else '(Impress)
      Kontext "DocumentImpress"
      if DocumentImpress.exists(5) then
         DocumentImpress.TypeKeys ("<Tab>")
      else
         warnlog "Not loaded in impress"
      endif
   endif

   try
      ContextPositionAndSize
      kontext
      messagebox.setpage TabPositionAndSize
      sleep 1
      TabPositionAndSize.Close
   catch
      warnlog "DXF-Document could not be loaded :-("
   endcatch
   Call hCloseDocument
   
endcase 'tTestDXF255CharBug
'-------------------------------------------------------------------------------
testcase tDeletedTemplate

    dim i as integer
    dim Dokument1$
    dim Dokument2$
    dim SavedActiveMessage as string
    dim found as boolean

    if (gApplication = "IMPRESS") then 
        ExtensionString = "odp"
    else
        ExtensionString = "odg"
    end if
    
    Dokument1$ = ConvertPath ( gOfficePath + "user\work\test1." & ExtensionString)
    Dokument2$ = ConvertPath ( gOfficePath + "user\work\test2." & ExtensionString)

    

   printlog "delete previous created documents: 'user\\work\\test*.odp'"
   if Dir (Dokument1$) <> "" then kill Dokument1$
   if Dir (Dokument2$) <> "" then kill Dokument2$

   printlog "open application"
   hNewDocument
   gMouseclick 90,90
   printlog "create a textframe with content"
   Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 )
   printlog "save file as 'test1.odp'"
   hFileSaveAsKill (Dokument1$)
   Sleep 10
   printlog "close Document"
   hCloseDocument
   printlog "-  Document 'test1.odp' Saved and Closed"

   printlog "open application again"
   hNewDocument
   gMouseclick 90,90
   printlog "create another textframe with content"
   Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 )
   printlog "save file as 'test2.odp'"
   hFileSaveAsKill (Dokument2$)
   Sleep 10
   printlog "close Document"
   hCloseDocument
   printlog "-  Document 'test2.odp' Saved and Closed"

   printlog "Delete the first file"
   try
       kill Dokument1$
       Printlog "   Correctly deleted the file: " + Dokument1$
   catch
       warnlog "Could not delete the file: " + Dokument1$
   endcatch

    printlog "File => New => Presentation"
    printlog "new document-autopilot"
    FileAutopilotPresentation
    Kontext "AutopilotPraesentation1"
    sleep 5
    Existingpresentation.Check
    sleep 5
    kontext "active"
    if active.exists then
    SavedActiveMessage = Active.GetText
    QaErrorLog "Message: " + SavedActiveMessage
    active.ok
    Kontext "AutopilotPraesentation1"
    if Existinglist.GetSelText = "test1.odp" then
    warnlog "   The deleted File was found. Messagebox said: " + SavedActiveMessage
    endif
    SavedActiveMessage = ""
    endif
    Kontext "AutopilotPraesentation1"
    Existinglist.TypeKeys "<HOME>"
    sleep 5
    found = false
    for i = 1 to Existinglist.GetItemCount
          kontext "active"
          if active.exists then
             SavedActiveMessage = Active.GetText
             active.ok
          endif
          Kontext "AutopilotPraesentation1"
          if Existinglist.GetSelText = "test1.odp" then
             found = true
             if SavedActiveMessage <> "" then
                warnlog "   The deleted File was found. Messagebox said: " + SavedActiveMessage
             else
                warnlog "   The deleted File was found. However without any messagebox."
             endif
          endif
          Existinglist.TypeKeys "<DOWN>"
          sleep 5
      next i
      if found = true then warnlog "   An error-message showed up. Eventually a result of '138498'"
      AutopilotPraesentation1.Cancel
   Sleep 2
   printlog "Delete the second file"
    try
        kill Dokument2$
        Printlog "   Correctly deleted the file: " + Dokument2$
    catch
        warnlog "Could not delete the file: " + Dokument2$
    endcatch

endcase 'tDeletedTemplate
'-------------------------------------------------------------------------------

testcase tSaveLoadLayoutEmpty
warnlog "#i110054# Empty OOo saved as UOF file comes up read only"
goto endsub
    Dim NewFileDir as String

    NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")

    printlog "   Will try to create the directory: " + NewFileDir
    app.mkdir NewFileDir

    gApplication = "IMPRESS"
    Call hNewDocument

    printlog "Choose and Insert an empty Layout."
    FormatModifyPage
    sleep 1
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<HOME>"
    kontext "Pagelayout_UndoDeleteWarning"
    if Pagelayout_UndoDeleteWarning.exists then
        Pagelayout_UndoDeleteWarning.ok
    endif
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<RETURN>"
    sleep (5)

    call fSaveLoadAllFormats (NewFileDir)   'Runs the Function below.
    printlog "Will try to delete the directory: " + NewFileDir
    app.rmDir NewFileDir

endcase 'tSaveLoadLayoutEmpty

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

testcase tSaveLoadLayoutOLE
    qaerrorlog "not yet ready"
    goto endsub
    Dim NewFileDir as String

    NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")

    printlog "Will try to create the directory: " + NewFileDir
    app.mkdir NewFileDir


    gApplication = "IMPRESS"
    Call hNewDocument

    printlog "Choose and Insert an Layout with an OLE."
    FormatModifyPage
    sleep 1
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<HOME>"
    kontext "Pagelayout_UndoDeleteWarning"
    if Pagelayout_UndoDeleteWarning.exists then
        Pagelayout_UndoDeleteWarning.ok
    endif
    kontext "Tasks"
    LayoutsPreview.TypeKeys ("<RIGHT>",12)
    sleep (1)
    LayoutsPreview.TypeKeys ("<Return>")
    sleep (1)
    hTypeKeys ("<TAB><TAB><TAB>")
    hTypeKeys ("<Return>")
    try
        sleep (2)
        kontext "OLEObjektInsert"
        sleep (1)
        OLEObjektInsert.Cancel
        Printlog "Inserted a layout with an 'Insert OLE-Object'-frame. Correct."
    catch
        warnlog "Ole wasn't selected :-("
        CALL hCloseDocument
        Goto Endsub
    endcatch
    sleep (5)

    call fSaveLoadAllFormats (NewFileDir)   'Runs the Function below.

    printlog "Will try to delete the directory: " + NewFileDir
    app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir

endcase 'tSaveLoadLayoutOLE

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

testcase tSaveLoadLayoutText
    qaerrorlog "not yet ready"
    goto endsub
    Dim NewFileDir as String

    NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")

    printlog "   Will try to create the directory: " + NewFileDir
    app.mkdir NewFileDir

    gApplication = "IMPRESS"
    Call hNewDocument

    printlog "Choose and Insert an Layout with a Text-field."
    FormatModifyPage
    sleep 1
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<HOME>"
    kontext "Pagelayout_UndoDeleteWarning"
    if Pagelayout_UndoDeleteWarning.exists then
        Pagelayout_UndoDeleteWarning.ok
    endif
    kontext "Tasks"
    LayoutsPreview.TypeKeys ("<RIGHT>")
    sleep (1)
    LayoutsPreview.TypeKeys ("<Return>")
    sleep (1)
    hTypeKeys ("<TAB><TAB><TAB>")
    hTypeKeys ("<Return>")
    hTypeKeys ("<ESCAPE>")
    sleep (5)

    call fSaveLoadAllFormats (NewFileDir)   'Runs the Function below.

    printlog "Will try to delete the directory: " + NewFileDir
    app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir

endcase 'tSaveLoadLayoutText

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

testcase tSaveLoadLayoutOutline
    qaerrorlog "not yet ready"
    goto endsub
    Dim NewFileDir as String

    NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")

    printlog "   Will try to create the directory: " + NewFileDir
    app.mkdir NewFileDir

    gApplication = "IMPRESS"
    Call hNewDocument

    printlog "Choose and Insert an Layout with a Outline-field."
    FormatModifyPage
    sleep 1
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<HOME>"
    kontext "Pagelayout_UndoDeleteWarning"
    if Pagelayout_UndoDeleteWarning.exists then
        Pagelayout_UndoDeleteWarning.ok
    endif
    kontext "Tasks"
    LayoutsPreview.TypeKeys ("<RIGHT>",3)
    sleep (1)
    LayoutsPreview.TypeKeys ("<Return>")
    sleep (1)
    hTypeKeys ("<TAB><TAB><TAB>")
    hTypeKeys ("<Return>")
    hTypeKeys ("<ESCAPE>")
    sleep (5)

    call fSaveLoadAllFormats (NewFileDir)   'Runs the Function below.

    printlog "   Will try to delete the directory: " + NewFileDir
    app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir

endcase 'tSaveLoadLayoutOutline

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

testcase tSaveLoadLayoutPicture
    qaerrorlog "not yet ready"
    goto endsub
    Dim NewFileDir as String

    NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")

    printlog "   Will try to create the directory: " + NewFileDir
    app.mkdir NewFileDir

    gApplication = "IMPRESS"
    Call hNewDocument

    printlog "Choose and Insert an Layout with a Graphic-field."
    FormatModifyPage
    sleep 1
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<HOME>"
    kontext "Pagelayout_UndoDeleteWarning"
    if Pagelayout_UndoDeleteWarning.exists then
        Pagelayout_UndoDeleteWarning.ok
    endif
    kontext "Tasks"
    LayoutsPreview.TypeKeys ("<RIGHT>",8)
    sleep (1)
    LayoutsPreview.TypeKeys ("<Return>")
    sleep (1)
    hTypeKeys ("<TAB><TAB><TAB>")
    hTypeKeys ("<Return>")
    hTypeKeys ("<ESCAPE>")
    sleep (5)

    call fSaveLoadAllFormats (NewFileDir)   'Runs the Function below.

    printlog "   Will try to delete the directory: " + NewFileDir
    app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir

endcase 'tSaveLoadLayoutPicture

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

testcase tSaveLoadLayoutChart
    qaerrorlog "not yet ready"
    goto endsub
    Dim NewFileDir as String

    NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")

    printlog "   Will try to create the directory: " + NewFileDir
    app.mkdir NewFileDir

    gApplication = "IMPRESS"
    Call hNewDocument

    printlog "Choose and Insert an Layout with a Chart-field."
    FormatModifyPage
    sleep 1
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<HOME>"
    kontext "Pagelayout_UndoDeleteWarning"
    if Pagelayout_UndoDeleteWarning.exists then
        Pagelayout_UndoDeleteWarning.ok
    endif
    kontext "Tasks"
    LayoutsPreview.TypeKeys ("<RIGHT>",6)
    sleep (1)
    LayoutsPreview.TypeKeys ("<Return>")
    sleep (1)
    hTypeKeys ("<TAB><TAB><TAB>")
    hTypeKeys ("<Return>")
    hTypeKeys ("<ESCAPE>")
    sleep (5)

    call fSaveLoadAllFormats (NewFileDir)   'Runs the Function below.

    printlog "   Will try to delete the directory: " + NewFileDir
    app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir

endcase 'tSaveLoadLayoutChart

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

testcase tSaveLoadLayoutSpreadsheet
    qaerrorlog "not yet ready"
    goto endsub
    Dim NewFileDir as String

    NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")

    printlog "   Will try to create the directory: " + NewFileDir
    app.mkdir NewFileDir

    gApplication = "IMPRESS"
    Call hNewDocument

    printlog "Choose and Insert an Layout with a Spreadsheet-field."
    FormatModifyPage
    sleep 1
    kontext "Tasks"
    LayoutsPreview.TypeKeys "<HOME>"
    kontext "Pagelayout_UndoDeleteWarning"
    if Pagelayout_UndoDeleteWarning.exists then
        Pagelayout_UndoDeleteWarning.ok
    endif
    kontext "Tasks"
    LayoutsPreview.TypeKeys ("<RIGHT>",7)
    sleep (1)
    LayoutsPreview.TypeKeys ("<Return>")
    sleep (1)
    hTypeKeys ("<TAB><TAB><TAB>")
    hTypeKeys ("<Return>")
    hTypeKeys ("<ESCAPE>")
    sleep (5)

    call fSaveLoadAllFormats (NewFileDir)   'Runs the Function below.

    printlog "Will try to delete the directory: " + NewFileDir
    app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir

endcase 'tSaveLoadLayoutSpreadsheet

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