1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: g_savepictureas.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:40 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/********************************************************************
34 '* Owner : wolfram.garten@sun.com
36 '* short description : Graphics ContextMenu -SavePictureAs -Test
38 '*************************************************************************
40 ' #1 tContextSaveAsPicture
41 ' #1 tContextSavePictureLinkAsPicture
43 '\***********************************************************************
45 testcase tContextSaveAsPicture
46 Dim Counter as integer
47 Dim CounterShouldBe as integer
48 Dim SavedOrgPosition as integer
51 Dim iFileSize(50) as Long
52 Dim FileList(50) as String
53 Dim FileList2(50) as string
56 Dim Filename, LastFilterName as String
57 Dim Filetype as String
60 Dim OrgFileDir as String
61 Dim NewFileDir as String
62 Dim Testsize as Boolean
64 OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" )
65 NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" )
67 app.mkDir (NewFileDir)
70 GetFileList ((ConvertPath (NewFileDir)), "*.*" , FileList2() )
72 if (KillFileList (FileList2()) <> TRUE) then
73 for i = 1 to ListCount2 (FileList2())
74 Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'"
81 InsertGraphicsFromFile
82 Kontext "GrafikEinfuegenDlg"
83 Counter = Dateityp.GetItemCount
85 Pfad.SetText OrgFileDir
86 Pfad.TypeKeys ("<Return>")
89 warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
92 Kontext "GrafikEinfuegenDlg"
94 if Dateityp.GetItemCount > 0 then
95 Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types."
97 Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed"
100 for i = 2 to Dateityp.GetItemCount 'Get the number of entries.
101 Printlog " *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "
102 Pfad.SetText OrgFileDir
103 Pfad.TypeKeys ("<Return>")
105 if Active.Exists then
106 warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
109 Kontext "GrafikEinfuegenDlg"
111 if Dateityp.GetItemCount < 1 then
112 Warnlog "Only one or none selectable fileformats."
115 Filetype = Dateityp.GetSelText
116 Filetype = left(Right(Dateityp.GetSelText,4),3)
118 DateiAuswahl.TypeKeys "<END>"
119 DateiAuswahl.TypeKeys "<SPACE>"
120 if DateiAuswahl.GetItemCount < 1 then
121 warnlog "The file with the extension " + Filetype + " does not exist. Please inform FHA."
123 printlog "Selected: " + DateiAuswahl.GetSelText
124 Filename = Dateiname.GetSelText
125 OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText)
126 printlog " File is: " + OrgFile
128 iFileSize(i) = app.FileLen(OrgFile)
129 printlog " The filesize was: " + iFileSize(i)
131 DateiAuswahl.TypeKeys "<DOWN>",true
132 if DateiAuswahl.GetSelText <> Filename then
133 warnlog "More than one file with the same extension. Contact Test-Administrator."
136 if Link.IsChecked = true then
142 if (gApplication = "IMPRESS") then
143 Kontext "DocumentImpress"
145 Kontext "DocumentDraw"
150 if (gApplication = "IMPRESS") then
151 Kontext "DocumentImpress"
152 DocumentImpress.OpenContextMenu true
154 if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then
155 Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
160 Kontext "DocumentDraw"
161 DocumentDraw.OpenContextMenu true
163 if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then
164 Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
171 Kontext "ExportierenDlg"
172 if ExportierenDlg.IsVisible then
173 Printlog " 'Save As Picture' came up correctly when using the Context-menu."
176 Kontext "ExportierenDlg" 'SaveAsDialogue
179 SavedOrgPosition = Dateityp.GetSelIndex
180 select case left(lcase(Dateityp.GetSelText),3) 'Filetype
181 case "png" : if (Filetype = "png") OR (Filetype = "psd") OR (Filetype = "pcx") OR (Filetype = "xbm") OR (Filetype = "ras") OR (Filetype = "pbm") OR (Filetype = "pcd") OR (Filetype = "pgm") OR (Filetype = "bmp") OR (Filetype = "ppm") OR (Filetype = "sgf") OR (Filetype = "xpm") OR (Filetype = "tga") then
182 printlog " " + Filetype + " will be saved as png, correct."
185 warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file."
187 case "svm" : if (Filetype = "svm") OR (Filetype = "dxf") OR (Filetype = "eps") OR (Filetype = "sgv") then
188 printlog " " + Filetype + " will be saved as Svm, correct."
191 warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file."
193 case "wmf" : if (Filetype = "wmf") OR (Filetype = "emf") then
194 printlog " " + Filetype + " will be saved as Wmf, correct."
196 if Filetype = "wmf" then Testsize = true
198 warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file."
200 case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then
201 printlog " " + Filetype + " will be saved as Jpg, correct."
203 if Filetype = "jpg" then Testsize = true
205 warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file."
207 case "tif" : if Filetype = "tif" OR Filetype = "iff" then
208 printlog " " + Filetype + " will be saved as Tiff, correct."
210 if Filetype = "tif" then Testsize = true
212 warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file."
214 case "sgf" : if (Filetype = "sgv") OR (Filetype = "sgf") then
215 printlog " " + Filetype + " will be saved as Sgf, correct."
217 if Filetype = "sgf" then Testsize = true
219 warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file."
221 case "gif" : if (Filetype = "gif") then
222 printlog " " + Filetype + " will be saved as Gif, correct."
224 if Filetype = "gif" then Testsize = true
226 warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file."
228 case "met" : if (Filetype = "met") then
229 printlog " " + Filetype + " will be saved as Met, correct."
231 if Filetype = "met" then Testsize = true
233 warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file."
235 case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then
236 printlog " " + Filetype + " will be saved as Pct, correct."
238 if Filetype = "pct" then Testsize = true
240 warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file."
242 case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA."
243 printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3)
248 '..........................................................................................................................'
250 Dateityp.TypeKeys "<HOME>"
251 if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10
252 for q = 1 to CounterShouldBe - 1
253 LastFilterName = Dateityp.GetSelIndex
254 Dateityp.TypeKeys "<DOWN>"
255 if Dateityp.GetSelIndex = LastFilterName then
256 warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting test."
261 warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe
264 Dateityp.Select SavedOrgPosition
266 Dateiname.SetText ( NewFileDir )
267 Dateiname.TypeKeys ("<Return>")
270 if Active.Exists then 'Could not find directory.
271 warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText
272 warnlog "ABORTING TESTCASE. PLEASE INFORM TESTPROGRAMMER."
274 kontext "GrafikEinfuegenDlg"
275 GrafikEinfuegenDlg.Close
278 Kontext "ExportierenDlg"
281 Dateiname.SetText ConvertPath ( NewFileDir + "SaveAsPicture")
282 NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) )
283 Dateiname.TypeKeys ("<Return>")
285 if Active.Exists then 'either could not find directory, or overwrite.
286 Active.Yes ' Overwrite?
289 if Testsize = true then
290 if NewFile <> "" then
291 Filesize1 = iFileSize(i)
292 printlog " Saved file-size was: " + app.FileLen(NewFile)
293 Filesize2 = app.FileLen(NewFile)
297 if (Testsize = true) then
298 if (Filesize1 < (Filesize2*0.95)) OR (Filesize1 > (Filesize2*1.05)) then
299 warnlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'."
301 printlog " The Format '" + right(NewFile,3) + "' was saved correctly."
304 if (gApplication = "IMPRESS") then
305 Kontext "DocumentImpress"
307 Kontext "DocumentDraw"
312 InsertGraphicsFromFile
313 Kontext "GrafikEinfuegenDlg"
314 if GrafikEinfuegenDlg.exists(5) then
315 printlog " The Insertgraphics-dialogue showed up correctly."
318 warnlog " The Insertgraphics-dialogue didn't show up."
322 GrafikEinfuegenDlg.Close
324 GetFileList (NewFileDir, "*.*" , FileList() )
326 if (KillFileList (FileList()) <> TRUE) then
327 for i = 1 to ListCount (FileList())
328 Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'"
331 Printlog "The test will exit now."
334 endcase 'tContextSaveAsPicture
336 '--------------------------------------------------------------------------------------
338 '(Different behaviour = new testcase)
340 testcase tContextSavePictureLinkAsPicture
341 Dim Counter as integer
342 Dim CounterShouldBe as integer
343 Dim SavedOrgPosition as integer
344 Dim LastFilterName as String
347 Dim iFileSize(50) as Long
348 Dim FileList(50) as String
349 Dim FileList2(50) as string
350 Dim Filesize1 as Long
351 Dim Filesize2 as Long
352 Dim Filename as String
353 Dim Filetype as String
354 Dim SavedFileType as String
355 Dim OrgFile as String
356 Dim NewFile as String
357 Dim OrgFileDir as String
358 Dim NewFileDir as String
359 Dim Testsize as Boolean
362 OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" )
363 NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" )
365 app.mkDir (NewFileDir)
368 GetFileList ((ConvertPath (NewFileDir)), "*.*" , FileList2() )
370 if (KillFileList (FileList2()) <> TRUE) then
371 for i = 1 to ListCount2 (FileList2())
372 Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'"
379 InsertGraphicsFromFile
380 Kontext "GrafikEinfuegenDlg"
381 Counter = Dateityp.GetItemCount
383 Pfad.SetText OrgFileDir
384 Pfad.TypeKeys ("<Return>")
386 if Active.Exists then
387 warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
390 Kontext "GrafikEinfuegenDlg"
392 if Dateityp.GetItemCount > 0 then
393 Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types."
395 Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed"
398 for i = 2 to Dateityp.GetItemCount 'Get the number of entries.
399 Printlog " *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "
400 Pfad.SetText OrgFileDir
401 Pfad.TypeKeys ("<Return>")
403 if Active.Exists then
404 warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
407 Kontext "GrafikEinfuegenDlg"
409 if Dateityp.GetItemCount < 1 then
410 Warnlog "Only one or none selectable fileformats."
413 Filetype = Dateityp.GetSelText
414 printlog " orginal: " + Dateityp.GetSelText
415 Filetype = left(Right(Dateityp.GetSelText,4),3)
417 DateiAuswahl.TypeKeys "<END>"
418 DateiAuswahl.TypeKeys "<SPACE>"
419 if DateiAuswahl.GetItemCount < 1 then
420 warnlog "The file with the extension " + Filetype + " does not exist. Please inform FHA."
422 printlog " Selected: " + DateiAuswahl.GetSelText
423 Filename = Dateiname.GetSelText
424 OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText)
425 printlog " File is: " + OrgFile
427 iFileSize(i) = app.FileLen(OrgFile)
428 printlog " The filesize was: " + iFileSize(i)
430 DateiAuswahl.TypeKeys "<DOWN>",true
431 if DateiAuswahl.GetSelText <> Filename then
432 warnlog "More than one file with the same extension. Contact Test-Administrator."
435 if Link.IsChecked <> true then
440 if (gApplication = "IMPRESS") then
441 Kontext "DocumentImpress"
443 Kontext "DocumentDraw"
448 if (gApplication = "IMPRESS") then
449 Kontext "DocumentImpress"
450 DocumentImpress.OpenContextMenu true
451 if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then
452 Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
457 Kontext "DocumentDraw"
458 DocumentDraw.OpenContextMenu true
459 if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), false) = false then
460 Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
467 Kontext "ExportierenDlg"
468 if ExportierenDlg.IsVisible then
469 Printlog " 'Save As Picture' came up correctly when using the Context-menu."
472 Kontext "ExportierenDlg" 'SaveAsDialogue
476 SavedOrgPosition = Dateityp.GetSelIndex
477 select case left(lcase(Dateityp.GetSelText),3) 'Filetype
478 case "png" : if (Filetype = "png") then
479 printlog " " + Filetype + " will be saved as png, correct."
480 SavedFileType = "png"
484 warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file."
486 case "pcx" : if(Filetype = "pcx") then
487 printlog " " + Filetype + " will be saved as pcx, correct."
488 SavedFileType = "pcx"
492 warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file."
494 case "xbm" : if (Filetype = "xbm") then
495 printlog " " + Filetype + " will be saved as xbm, correct."
496 SavedFileType = "xbm"
500 warnlog "xbm should not have been selected when we opened a '" + Filetype + "'-file."
502 case "xpm" : if (Filetype = "xpm") then
503 printlog " " + Filetype + " will be saved as Xpm, correct."
504 SavedFileType = "xpm"
508 warnlog "xpm should not have been selected when we opened a '" + Filetype + "'-file."
510 case "svm" : if (Filetype = "svm") then
511 printlog " " + Filetype + " will be saved as Svm, correct."
512 SavedFileType = "svm"
513 if (Filetype = "svm") then Testsize = true
516 warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file."
518 case "tga" : if (Filetype = "tga") then
519 printlog " " + Filetype + " will be saved as Svm, correct."
520 SavedFileType = "tga"
521 if (Filetype = "tga") then Testsize = true
524 warnlog "Tga should not have been selected when we opened a '" + Filetype + "'-file."
526 case "bmp" : if (Filetype = "bmp") then
527 printlog " " + Filetype + " will be saved as Bmp, correct."
528 SavedFileType = "bmp"
532 warnlog "Bmp should not have been selected when we opened a '" + Filetype + "'-file."
534 case "ppm" : if (Filetype = "ppm") then
535 printlog " " + Filetype + " will be saved as Bmp, correct."
536 SavedFileType = "ppm"
537 if Filetype = "ppm" then Testsize = true
540 warnlog "Ppm should not have been selected when we opened a '" + Filetype + "'-file."
542 case "eps" : if (Filetype = "eps") then
543 printlog " " + Filetype + " will be saved as Eps, correct."
544 SavedFileType = "eps"
545 if Filetype = "eps" then Testsize = true
548 warnlog "Eps should not have been selected when we opened a '" + Filetype + "'-file."
550 case "pgm" : if (Filetype = "pgm") then
551 printlog " " + Filetype + " will be saved as Pgm, correct."
552 SavedFileType = "pgm"
553 if Filetype = "pgm" then Testsize = true
556 warnlog "Pgm should not have been selected when we opened a '" + Filetype + "'-file."
558 case "dxf" : if (Filetype = "dxf") then
559 printlog " " + Filetype + " will be saved as Dxf, correct."
560 SavedFileType = "dxf"
561 if Filetype = "dxf" then Testsize = true
564 warnlog "Dxf should not have been selected when we opened a '" + Filetype + "'-file."
566 case "pbm" : if (Filetype = "pbm") then
567 printlog " " + Filetype + " will be saved as Pbm, correct."
568 SavedFileType = "pbm"
569 if Filetype = "pbm" then Testsize = true
572 warnlog "Pbm should not have been selected when we opened a '" + Filetype + "'-file."
574 case "ras" : if (Filetype = "ras") then
575 printlog " " + Filetype + " will be saved as Ras, correct."
576 SavedFileType = "ras"
577 if Filetype = "ras" then Testsize = true
580 warnlog "Ras should not have been selected when we opened a '" + Filetype + "'-file."
582 case "wmf" : if (Filetype = "wmf") or (Filetype = "emf") then
583 printlog " " + Filetype + " will be saved as Wmf, correct."
584 SavedFileType = "wmf"
585 if Filetype = "wmf" then Testsize = true
588 warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file."
590 case "emf" : if (Filetype = "emf") then
591 printlog " " + Filetype + " will be saved as Wmf, correct."
592 SavedFileType = "emf"
596 qaerrorlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file. #i95364#"
598 case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then
599 printlog " " + Filetype + " will be saved as Jpg, correct."
600 SavedFileType = "jpg"
604 warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file."
606 case "tif" : if Filetype = "tif" OR Filetype = "iff" then
607 printlog " " + Filetype + " will be saved as Tiff, correct."
608 SavedFileType = "tif"
612 warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file."
614 case "sgf" : if (Filetype = "sgf") OR (Filetype = "sgv") then 'sgf
615 printlog " " + Filetype + " will be saved as Sgf, correct."
616 SavedFileType = "sgf"
620 warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file."
622 case "gif" : if (Filetype = "gif") then
623 SavedFileType = "gif"
624 printlog " " + Filetype + " will be saved as Gif, correct."
625 if Filetype = "gif" then Testsize = true
628 warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file."
630 case "met" : if (Filetype = "met") then
631 printlog " " + Filetype + " will be saved as Met, correct."
632 SavedFileType = "met"
633 if Filetype = "met" then Testsize = true
636 warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file."
638 case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then
639 printlog " " + Filetype + " will be saved as Pct, correct."
640 SavedFileType = "pct"
641 if Filetype = "pct" then Testsize = true
644 warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file."
646 case "pcd" : if (Filetype = "pcd") then
647 printlog " " + Filetype + " will be saved as Pcd, correct."
648 SavedFileType = "pcd"
649 if Filetype = "pcd" then Testsize = true
652 warnlog "Pcd should not have been selected when we opened a '" + Filetype + "'-file."
654 case "psd" : if (Filetype = "psd") then
655 printlog " " + Filetype + " will be saved as Psd, correct."
656 SavedFileType = "psd"
657 if Filetype = "psd" then Testsize = true
660 warnlog "Psd should not have been selected when we opened a '" + Filetype + "'-file."
662 case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA."
663 printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3)
668 Dateityp.TypeKeys "<HOME>"
669 if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10
670 for q = 1 to CounterShouldBe - 1
671 LastFilterName = Dateityp.GetSelIndex
672 Dateityp.TypeKeys "<DOWN>"
673 if Dateityp.GetSelIndex = LastFilterName then
674 warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting Test."
679 warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe
681 Dateityp.Select SavedOrgPosition
683 Dateiname.SetText ( NewFileDir )
684 Dateiname.TypeKeys ("<Return>")
687 if Active.Exists then 'Could not find directory.
688 warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText
689 warnlog "ABORTING TESTCASE. PLEASE INFORM THE TESTPROGRAMMER."
691 kontext "GrafikEinfuegenDlg"
692 GrafikEinfuegenDlg.Close
695 Kontext "ExportierenDlg"
699 if Found = false then
700 NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) )
702 NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + SavedFileType ' left(lcase(Dateityp.GetSelText),3) )
704 Dateiname.SetText NewFile
706 Dateiname.TypeKeys ("<Return>")
708 if Active.Exists then 'either could not find directory, or overwrite.
709 Active.Yes ' Overwrite?
712 if Testsize = true then
713 if NewFile <> "" then
714 Filesize1 = iFileSize(i)
715 printlog " Saved file-size was: " + app.FileLen(NewFile)
716 Filesize2 = app.FileLen(NewFile)
720 if (Testsize = true) AND (Filesize1 <> Filesize2) then
721 qaerrorlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'.#i95364#"
723 printlog " The Format '" + right(NewFile,3) + "' was saved correctly."
726 if (gApplication = "IMPRESS") then
727 Kontext "DocumentImpress"
729 Kontext "DocumentDraw"
734 InsertGraphicsFromFile
735 Kontext "GrafikEinfuegenDlg"
736 if GrafikEinfuegenDlg.exists(5) then
737 printlog " The Insertgraphics-dialogue showed up correctly."
740 warnlog " The Insertgraphics-dialogue didn't show up."
745 GrafikEinfuegenDlg.Close
747 GetFileList (NewFileDir, "*.*" , FileList() )
749 if (KillFileList (FileList()) <> TRUE) then
750 for i = 1 to ListCount (FileList())
751 Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'"
754 Printlog "The test will exit now."
758 endcase 'tContextSaveAsPicture
760 '******************************************************************************************************************************'
763 qaerrorlog "Not yet ready."
766 if iSprache = 01 then
769 TypeKeys ("<SHIFT S>")
770 kontext "ExportierenDlg"
771 if ExportierenDlg.IsVisible then
772 Printlog "'Save As Picture' came up correctly when using the Context-menu."