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: w_insertgraphic2.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:30:51 $
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 : helge.delfs@sun.com
36 '* short description : Test of the insert graphic function - 2
38 '************************************************************************
40 ' #1 tInsertGraphic_13 'Test Set different attributes via dialog Arrange (send to back)
41 ' #1 tInsertGraphic_14 'Test Set different attributes via dialog Arrange (send backward)
42 ' #1 tInsertGraphic_15 'Test Set different attributes via dialog Arrange (bring to front)
43 ' #1 tInsertGraphic_16 'Test Set different attributes via dialog Arrange (bring forward)
44 ' #1 tInsertGraphic_17 'Test Set different attributes via Contextmenu Arrange (send to back)
45 ' #1 tInsertGraphic_18 'Test Set different attributes via Contextmenu Arrange (send backward)
46 ' #1 tInsertGraphic_19 'Test Set different attributes via Contextmenu Arrange (bring to front)
47 ' #1 tInsertGraphic_20 'Test Set different attributes via Contextmenu Arrange (bring forward)
49 '\***********************************************************************
51 testcase tInsertGraphic_13
53 Dim sGraphicName1 as String
54 Dim sGraphicName2 as String
55 Dim sGraphicName3 as String
59 sGraphicName1 = "TEST1"
60 sGraphicName2 = "TEST2"
61 sGraphicName3 = "TEST3"
63 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
64 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
66 PrintLog "- Test Set different attributes via dialog Arrange (send to back)"
67 '/// Test Set different attributes via dialog Arrange (send to back)
71 Call wTypeKeys "<Return>"
73 '/// Insert three Graphics at the same place , and named in series
76 fInsertGraphics("Bughunter.jpg")
78 fFormatGraphic("TabZusaetze")
80 ObjektName.SetText sGraphicName1
83 fFormatGraphic("TabType")
88 Height.SetText sHeight
92 Call wTypeKeys "<ESCape>"
95 fInsertGraphics("flowers.gif")
97 fFormatGraphic("TabZusaetze")
99 ObjektName.SetText sGraphicName2
102 fFormatGraphic("TabType")
107 Height.SetText sHeight
111 Call wTypeKeys "<ESCape>"
114 fInsertGraphics("game.bmp")
116 fFormatGraphic("TabZusaetze")
118 ObjektName.SetText sGraphicName3
121 fFormatGraphic("TabType")
126 Height.SetText sHeight
130 '/// Format / Arrange / Send to back
131 FormatArrangeSendToBack
134 Call wTypeKeys "<ESCape>"
137 '/// Check if the attributes Arrange (send to back) works well
138 Call wNavigatorAuswahl(4,1)
140 fFormatGraphic("TabZusaetze")
142 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
145 Call wNavigatorAuswahl(4,2)
147 fFormatGraphic("TabZusaetze")
149 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
152 Call wNavigatorAuswahl(4,3)
154 fFormatGraphic("TabZusaetze")
156 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
163 '-------------------------------------------------------------------------------------------
165 testcase tInsertGraphic_14
167 Dim sGraphicName1 as String
168 Dim sGraphicName2 as String
169 Dim sGraphicName3 as String
171 Dim sHeight as String
173 sGraphicName1 = "TEST1"
174 sGraphicName2 = "TEST2"
175 sGraphicName3 = "TEST3"
177 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
178 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
180 PrintLog "- Test Set different attributes via dialog Arrange (send backward)"
181 '/// Test Set different attributes via dialog Arrange (send backward)
185 Call wTypeKeys "<Return>"
187 '/// Insert three Graphics at the same place , and named in series
190 fInsertGraphics("Bughunter.jpg")
192 fFormatGraphic("TabZusaetze")
194 ObjektName.SetText sGraphicName1
197 fFormatGraphic("TabType")
202 Height.SetText sHeight
206 Call wTypeKeys "<ESCape>"
209 fInsertGraphics("flowers.gif")
211 fFormatGraphic("TabZusaetze")
213 ObjektName.SetText sGraphicName2
216 fFormatGraphic("TabType")
221 Height.SetText sHeight
225 Call wTypeKeys "<ESCape>"
228 fInsertGraphics("game.bmp")
230 fFormatGraphic("TabZusaetze")
232 ObjektName.SetText sGraphicName3
235 fFormatGraphic("TabType")
240 Height.SetText sHeight
244 '/// Format / Arrange / Send backward
245 FormatArrangeSetBackward
248 Call wTypeKeys "<ESCape>"
251 '/// Check if the attributes Arrange (send to back) works well
252 Call wNavigatorAuswahl(4,1)
254 fFormatGraphic("TabZusaetze")
256 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
259 Call wNavigatorAuswahl(4,2)
261 fFormatGraphic("TabZusaetze")
263 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
266 Call wNavigatorAuswahl(4,3)
268 fFormatGraphic("TabZusaetze")
270 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
277 '-------------------------------------------------------------------------------------------
279 testcase tInsertGraphic_15
281 Dim sGraphicName1 as String
282 Dim sGraphicName2 as String
283 Dim sGraphicName3 as String
285 Dim sHeight as String
287 sGraphicName1 = "TEST1"
288 sGraphicName2 = "TEST2"
289 sGraphicName3 = "TEST3"
291 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
292 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
294 PrintLog "- Test Set different attributes via dialog Arrange (bring to front)"
295 '/// Test Set different attributes via dialog Arrange (bring to front)
299 Call wTypeKeys "<Return>"
301 '/// Insert three Graphics at the same place , and named in series
304 fInsertGraphics("Bughunter.jpg")
306 fFormatGraphic("TabZusaetze")
308 ObjektName.SetText sGraphicName1
311 fFormatGraphic("TabType")
316 Height.SetText sHeight
320 Call wTypeKeys "<ESCape>"
323 fInsertGraphics("flowers.gif")
325 fFormatGraphic("TabZusaetze")
327 ObjektName.SetText sGraphicName2
330 fFormatGraphic("TabType")
335 Height.SetText sHeight
339 Call wTypeKeys "<ESCape>"
342 fInsertGraphics("game.bmp")
344 fFormatGraphic("TabZusaetze")
346 ObjektName.SetText sGraphicName3
349 fFormatGraphic("TabType")
354 Height.SetText sHeight
358 '/// Format / Arrange / Send to back
359 FormatArrangeSendToBack
362 '/// Format / Arrange / bring to front
363 FormatArrangeBringToFront
366 Call wTypeKeys "<ESCape>"
369 '/// Check if the attributes Arrange (send to back) works well
370 Call wNavigatorAuswahl(4,1)
372 fFormatGraphic("TabZusaetze")
374 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
377 Call wNavigatorAuswahl(4,2)
379 fFormatGraphic("TabZusaetze")
381 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
384 Call wNavigatorAuswahl(4,3)
386 fFormatGraphic("TabZusaetze")
388 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
395 '-------------------------------------------------------------------------------------------
397 testcase tInsertGraphic_16
399 Dim sGraphicName1 as String
400 Dim sGraphicName2 as String
401 Dim sGraphicName3 as String
403 Dim sHeight as String
405 sGraphicName1 = "TEST1"
406 sGraphicName2 = "TEST2"
407 sGraphicName3 = "TEST3"
409 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
410 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
412 PrintLog "- Test Set different attributes via dialog Arrange (bring forward)"
413 '/// Test Set different attributes via dialog Arrange (bring forward)
417 Call wTypeKeys "<Return>"
419 '/// Insert three Graphics at the same place , and named in series
422 fInsertGraphics("Bughunter.jpg")
424 fFormatGraphic("TabZusaetze")
426 ObjektName.SetText sGraphicName1
429 fFormatGraphic("TabType")
434 Height.SetText sHeight
438 Call wTypeKeys "<ESCape>"
441 fInsertGraphics("flowers.gif")
443 fFormatGraphic("TabZusaetze")
445 ObjektName.SetText sGraphicName2
448 fFormatGraphic("TabType")
453 Height.SetText sHeight
457 Call wTypeKeys "<ESCape>"
460 fInsertGraphics("game.bmp")
462 fFormatGraphic("TabZusaetze")
464 ObjektName.SetText sGraphicName3
467 fFormatGraphic("TabType")
472 Height.SetText sHeight
476 '/// Format / Arrange / Send to back
477 FormatArrangeSendToBack
480 '/// Format / Arrange / bring forward
481 FormatArrangeBringForward
484 Call wTypeKeys "<ESCape>"
487 '/// Check if the attributes Arrange (send to back) works well
488 Call wNavigatorAuswahl(4,1)
490 fFormatGraphic("TabZusaetze")
492 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
495 Call wNavigatorAuswahl(4,2)
497 fFormatGraphic("TabZusaetze")
499 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
502 Call wNavigatorAuswahl(4,3)
504 fFormatGraphic("TabZusaetze")
506 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
513 '-------------------------------------------------------------------------------------------
515 testcase tInsertGraphic_17
517 Dim sGraphicName1 as String
518 Dim sGraphicName2 as String
519 Dim sGraphicName3 as String
521 Dim sHeight as String
523 sGraphicName1 = "TEST1"
524 sGraphicName2 = "TEST2"
525 sGraphicName3 = "TEST3"
527 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
528 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
530 PrintLog "- Test Set different attributes via Contextmenu Arrange (send to back)"
531 '/// Test Set different attributes via Contextmenu Arrange (send to back)
535 Call wTypeKeys "<Return>"
537 '/// Insert three Graphics at the same place , and named in series
540 fInsertGraphics("Bughunter.jpg")
542 fFormatGraphic("TabZusaetze")
544 ObjektName.SetText sGraphicName1
547 fFormatGraphic("TabType")
552 Height.SetText sHeight
556 Call wTypeKeys "<ESCape>"
559 fInsertGraphics("flowers.gif")
561 fFormatGraphic("TabZusaetze")
563 ObjektName.SetText sGraphicName2
566 fFormatGraphic("TabType")
571 Height.SetText sHeight
575 Call wTypeKeys "<ESCape>"
578 fInsertGraphics("game.bmp")
580 fFormatGraphic("TabZusaetze")
582 ObjektName.SetText sGraphicName3
585 fFormatGraphic("TabType")
590 Height.SetText sHeight
594 '/// ContextMenu Arrange / Send to back
595 Call wOpenContextMenu
601 Call wTypeKeys "<ESCape>"
604 '/// Check if the attributes Arrange (send to back) works well
605 Call wNavigatorAuswahl(4,1)
607 fFormatGraphic("TabZusaetze")
609 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
612 Call wNavigatorAuswahl(4,2)
614 fFormatGraphic("TabZusaetze")
616 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
619 Call wNavigatorAuswahl(4,3)
621 fFormatGraphic("TabZusaetze")
623 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
630 '-------------------------------------------------------------------------------------------
632 testcase tInsertGraphic_18
634 Dim sGraphicName1 as String
635 Dim sGraphicName2 as String
636 Dim sGraphicName3 as String
638 Dim sHeight as String
640 sGraphicName1 = "TEST1"
641 sGraphicName2 = "TEST2"
642 sGraphicName3 = "TEST3"
644 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
645 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
647 PrintLog "- Test Set different attributes via Contextmenu Arrange (send backward)"
648 '/// Test Set different attributes via Contextmenu Arrange (send backward)
652 Call wTypeKeys "<Return>"
654 '/// Insert three Graphics at the same place , and named in series
657 fInsertGraphics("Bughunter.jpg")
659 fFormatGraphic("TabZusaetze")
661 ObjektName.SetText sGraphicName1
664 fFormatGraphic("TabType")
669 Height.SetText sHeight
673 Call wTypeKeys "<ESCape>"
676 fInsertGraphics("flowers.gif")
678 fFormatGraphic("TabZusaetze")
680 ObjektName.SetText sGraphicName2
683 fFormatGraphic("TabType")
688 Height.SetText sHeight
692 Call wTypeKeys "<ESCape>"
695 fInsertGraphics("game.bmp")
697 fFormatGraphic("TabZusaetze")
699 ObjektName.SetText sGraphicName3
702 fFormatGraphic("TabType")
707 Height.SetText sHeight
711 '/// ContextMenu Arrange / Send backward
712 Call wOpenContextMenu
718 Call wTypeKeys "<ESCape>"
721 '/// Check if the attributes Arrange (send to back) works well
722 Call wNavigatorAuswahl(4,1)
724 fFormatGraphic("TabZusaetze")
726 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
729 Call wNavigatorAuswahl(4,2)
731 fFormatGraphic("TabZusaetze")
733 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
736 Call wNavigatorAuswahl(4,3)
738 fFormatGraphic("TabZusaetze")
740 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
747 '-------------------------------------------------------------------------------------------
749 testcase tInsertGraphic_19
751 Dim sGraphicName1 as String
752 Dim sGraphicName2 as String
753 Dim sGraphicName3 as String
755 Dim sHeight as String
757 sGraphicName1 = "TEST1"
758 sGraphicName2 = "TEST2"
759 sGraphicName3 = "TEST3"
761 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
762 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
764 PrintLog "- Test Set different attributes via Contextmenu Arrange (bring to front)"
765 '/// Test Set different attributes via Contextmenu Arrange (bring to front)
769 Call wTypeKeys "<Return>"
771 '/// Insert three Graphics at the same place , and named in series
774 fInsertGraphics("Bughunter.jpg")
776 fFormatGraphic("TabZusaetze")
778 ObjektName.SetText sGraphicName1
781 fFormatGraphic("TabType")
786 Height.SetText sHeight
790 Call wTypeKeys "<ESCape>"
793 fInsertGraphics("flowers.gif")
795 fFormatGraphic("TabZusaetze")
797 ObjektName.SetText sGraphicName2
800 fFormatGraphic("TabType")
805 Height.SetText sHeight
809 Call wTypeKeys "<ESCape>"
812 fInsertGraphics("game.bmp")
814 fFormatGraphic("TabZusaetze")
816 ObjektName.SetText sGraphicName3
819 fFormatGraphic("TabType")
824 Height.SetText sHeight
828 '/// Format / Arrange / Send to back
829 FormatArrangeSendToBack
832 '/// ContextMenu Arrange / bring to front
833 Call wOpenContextMenu
839 Call wTypeKeys "<ESCape>"
842 '/// Check if the attributes Arrange (send to back) works well
843 Call wNavigatorAuswahl(4,1)
845 fFormatGraphic("TabZusaetze")
847 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
850 Call wNavigatorAuswahl(4,2)
852 fFormatGraphic("TabZusaetze")
854 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
857 Call wNavigatorAuswahl(4,3)
859 fFormatGraphic("TabZusaetze")
861 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
868 '-------------------------------------------------------------------------------------------
870 testcase tInsertGraphic_20
872 Dim sGraphicName1 as String
873 Dim sGraphicName2 as String
874 Dim sGraphicName3 as String
876 Dim sHeight as String
878 sGraphicName1 = "TEST1"
879 sGraphicName2 = "TEST2"
880 sGraphicName3 = "TEST3"
882 sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
883 sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
885 PrintLog "- Test Set different attributes via Contextmenu Arrange (bring forward)"
886 '/// Test Set different attributes via Contextmenu Arrange (bring forward)
890 Call wTypeKeys "<Return>"
892 '/// Insert three Graphics at the same place , and named in series
895 fInsertGraphics("Bughunter.jpg")
897 fFormatGraphic("TabZusaetze")
899 ObjektName.SetText sGraphicName1
902 fFormatGraphic("TabType")
907 Height.SetText sHeight
911 Call wTypeKeys "<ESCape>"
914 fInsertGraphics("flowers.gif")
916 fFormatGraphic("TabZusaetze")
918 ObjektName.SetText sGraphicName2
921 fFormatGraphic("TabType")
926 Height.SetText sHeight
930 Call wTypeKeys "<ESCape>"
933 fInsertGraphics("game.bmp")
935 fFormatGraphic("TabZusaetze")
937 ObjektName.SetText sGraphicName3
940 fFormatGraphic("TabType")
945 Height.SetText sHeight
949 '/// Format / Arrange / Send to back
950 FormatArrangeSendToBack
953 '/// ContextMenu Arrange / bring forward
954 Call wOpenContextMenu
960 Call wTypeKeys "<ESCape>"
963 '/// Check if the attributes Arrange (send to back) works well
964 Call wNavigatorAuswahl(4,1)
966 fFormatGraphic("TabZusaetze")
968 if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
971 Call wNavigatorAuswahl(4,2)
973 fFormatGraphic("TabZusaetze")
975 if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
978 Call wNavigatorAuswahl(4,3)
980 fFormatGraphic("TabZusaetze")
982 if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
989 '-------------------------------------------------------------------------------------------