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_drawing_tools1.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:25:48 $
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 drawing tools
38 '\***********************************************************************
42 printLog Chr(13) + "- Test of the drawing tools 1"
44 printLog Chr(13) + " -- Format/Position And Size"
46 Call tCreateObjects_1 'Create objects from the drawing functions of the Toolbar
48 Call tPositionAndSize_1 'check checkbox "protect position" of the object
49 Call tPositionAndSize_2 'check Undo/Redo function of position assignment
50 Call tPositionAndSize_3 'check "keep ratio" option
51 Call tPositionAndSize_4 'check Undo/Redo function of size assignment
52 Call tPositionAndSize_5 'check rotation angle of an object
53 Call tPositionAndSize_6 'check corner radius of rectangles
54 Call tPositionAndSize_7 'check corner radius of textboxes
55 Call tPositionAndSize_8
57 printLog Chr(13) + " -- Format/line"
58 'Dialog format/line/line
59 Call tLine_1 'check style, color, width and arrow styles . Test undo and redo .
60 Call tLine_2 'Check call Format.Line dialog via Button in object bar
61 Call tLine_3 'check line attributes are applied in object bar
62 Call tLine_4 'check "synchronize ends"
63 'Dialog format/line/line styles
64 Call tline_5 'check the attributes in format/line/line styles
65 'Dialog format/line/arrow styles
66 Call tline_6 'check the attributes in format/line/arrow styles
70 '-------------------------------------------------------------------------
72 testcase tCreateObjects_1
74 PrintLog "- Create objects from the drawing functions of the Toolbar , include ..."
78 Call hToolbarSelect("DRAWING", true)
80 PrintLog "- Draw a line"
83 gMouseMove(30,30,55,55)
87 PrintLog "- Draw a rectangle"
90 gMouseMove(35,35,40,40)
94 PrintLog "- Draw a ellipse (circle)"
97 Call gMouseMove(50,30,75,50)
101 PrintLog "- Draw textobject"
104 gMouseMove(40,60,60,75)
106 Kontext "DocumentWriter"
107 Call wTypeKeys "This is StarOffice Test !"
110 PrintLog "- Draw callouts"
113 gMouseMove(30,80,50,95)
124 '-------------------------------------------------------------------------
126 testcase tPositionAndSize_1
128 Dim sPositionX as String
129 Dim sPositionY as String
130 Dim sPositionXMove as String
131 Dim sPositionYMove as String
133 sPositionX = "3" + gSeperator + "00" + gMeasurementUnit
134 sPositionY = "3" + gSeperator + "00" + gMeasurementUnit
135 sPositionXMove = "5" + gSeperator + "00" + gMeasurementUnit
136 sPositionYMove = "5" + gSeperator + "00" + gMeasurementUnit
138 PrintLog "- Check the checkbox 'protect position' of the object"
142 PrintLog "- Insert a drawing object (rectangle)"
143 Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
144 Call gMouseClick(40,50)
146 printLog "when 'protect position' is Checked"
147 PrintLog "- Format/Position and size /Position and size ,"
148 PrintLog "- + set positionX and positionY , and Check 'postion' in protect area"
149 PrintLog "- + close the dialogue and reopen it"
150 PrintLog "- check wether the rectangle can be removed when 'protect position' is Checked"
151 fPositionAndSize("TabPositionAndSizeWriter")
153 Horizontalby.Settext "3"
154 Verticalby.Settext "3"
155 ProtectPosition.Check
157 TabPositionAndSizeWriter.OK
160 Kontext "DocumentWriter"
161 Call wTypeKeys "<Right>",2
162 Call wTypeKeys "<Down>" ,2
165 fPositionAndSize("TabPositionAndSizeWriter")
167 if Horizontalby.Gettext <> sPositionX then Warnlog "X-Position is wrong: Not -> "+sPositionX+" but -> "+Horizontalby.Gettext
168 if Verticalby.Gettext <> sPositionY then Warnlog "Y-Position is wrong: Not -> "+sPositionY+" but -> "+Verticalby.Gettext
170 ProtectPosition.UnCheck
171 TabPositionAndSizeWriter.OK
173 PrintLog "- check wether the rectangle can be removed when 'protect position' is UnChecked"
174 Kontext "DocumentWriter"
175 Call wTypeKeys "<Right>",2
176 Call wTypeKeys "<Down>" ,2
179 fPositionAndSize("TabPositionAndSizeWriter")
181 if Horizontalby.Gettext <> sPositionXMove then Warnlog "X-Position is wrong: Not -> "+sPositionXMove+" but -> "+Horizontalby.Gettext
182 if Verticalby.Gettext <> sPositionYMove then Warnlog "Y-Position is wrong: Not -> "+sPositionYMove+" but -> "+Verticalby.Gettext
184 TabPositionAndSizeWriter.OK
190 '-------------------------------------------------------------------------
192 testcase tPositionAndSize_2
194 Dim sPositionX as String
195 Dim sPositionY as String
196 Dim sPositionXMove as String
197 Dim sPositionYMove as String
199 sPositionX = "3" + gSeperator + "00" + gMeasurementUnit
200 sPositionY = "3" + gSeperator + "00" + gMeasurementUnit
201 sPositionXMove = "4" + gSeperator + "00" + gMeasurementUnit
202 sPositionYMove = "4" + gSeperator + "00" + gMeasurementUnit
204 PrintLog "- check Undo/Redo function of position assignment"
208 PrintLog "- Insert a drawing object (rectangle)"
209 Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
210 Call gMouseClick(40,50)
212 fPositionAndSize("TabPositionAndSizeWriter")
213 Horizontalby.Settext "3"
214 Verticalby.Settext "3"
215 TabPositionAndSizeWriter.OK
218 Kontext "DocumentWriter"
219 Call wTypeKeys "<Right>"
220 Call wTypeKeys "<Down>"
223 PrintLog "- check undo function"
229 fPositionAndSize("TabPositionAndSizeWriter")
230 if Horizontalby.Gettext <> sPositionX then Warnlog "#i40845# X-Position is wrong: Not -> "+sPositionX+" but -> "+Horizontalby.Gettext
231 if Verticalby.Gettext <> sPositionY then Warnlog "Y-Position is wrong: Not -> "+sPositionY+" but -> "+Verticalby.Gettext
232 TabPositionAndSizeWriter.Cancel
234 PrintLog "- check redo function"
240 fPositionAndSize("TabPositionAndSizeWriter")
241 if Horizontalby.Gettext <> sPositionXMove then Warnlog "X-Position is wrong: Not -> "+sPositionXMove+" but -> "+Horizontalby.Gettext
242 if Verticalby.Gettext <> sPositionYMove then Warnlog "Y-Position is wrong: Not -> "+sPositionYMove+" but -> "+Verticalby.Gettext
243 TabPositionAndSizeWriter.Cancel
249 '-------------------------------------------------------------------------
251 testcase tPositionAndSize_3
254 Dim sHeight as String
255 Dim sWidthChange as String
256 Dim sHeightChange as String
258 sHeightChange = "8" + gSeperator + "00" + gMeasurementUnit
259 sWidthChange = "6" + gSeperator + "00" + gMeasurementUnit
261 PrintLog "- check 'keep ratio' option"
265 PrintLog "- Insert a drawing object (rectangle)"
266 Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
267 Call gMouseClick(40,50)
269 fPositionAndSize("TabPositionAndSizeWriter")
271 PrintLog "- Check when ratio is 5:4"
278 if Height.GetText <> sHeightChange then Warnlog "Height is wrong: Not -> "+sHeightChange+" but -> "+Height.GetText
281 PrintLog "- Check when ratio is 3:5"
288 if Width.GetText <> sWidthChange then Warnlog "Width is wrong: Not -> "+sWidthChange+" but -> "+Width.GetText
290 'Recover to the default
292 TabPositionAndSizeWriter.OK
298 '-------------------------------------------------------------------------
300 testcase tPositionAndSize_4
303 Dim sHeight as String
304 Dim sWidthChange as String
305 Dim sHeightChange as String
307 sWidth = "5" + gSeperator + "00" + gMeasurementUnit
308 sHeight = "4" + gSeperator + "00" + gMeasurementUnit
309 sWidthChange = "8" + gSeperator + "00" + gMeasurementUnit
310 sHeightChange = "6" + gSeperator + "00" + gMeasurementUnit
312 PrintLog "- check Undo/Redo function of size assignment"
316 PrintLog "- Insert a drawing object (rectangle) , and set the first Size"
317 Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
318 Call gMouseClick(40,50)
320 fPositionAndSize("TabPositionAndSizeWriter")
322 Height.Settext sHeight
323 TabPositionAndSizeWriter.OK
326 PrintLog "- Set the second Size."
327 fPositionAndSize("TabPositionAndSizeWriter")
328 Width.Settext sWidthChange
329 Height.Settext sHeightChange
330 TabPositionAndSizeWriter.OK
333 PrintLog "- check undo function"
336 fPositionAndSize("TabPositionAndSizeWriter")
337 if Width.GetText <> sWidth then Warnlog "Width is wrong: Not -> "+sWidth+" but -> "+Width.GetText
338 if Height.GetText <> sHeight then Warnlog "Height is wrong: Not -> "+sHeight+" but -> "+Height.GetText
339 TabPositionAndSizeWriter.Cancel
341 PrintLog "- check redo function"
345 fPositionAndSize("TabPositionAndSizeWriter")
346 if Width.GetText <> sWidthChange then Warnlog "Width is wrong: Not -> "+sWidthChange+" but -> "+Width.GetText
347 if Height.GetText <> sHeightChange then Warnlog "Height is wrong: Not -> "+sHeightChange+" but -> "+Height.GetText
348 TabPositionAndSizeWriter.Cancel
354 '-------------------------------------------------------------------------
356 testcase tPositionAndSize_5
358 PrintLog "- check rotation angle of an object"
362 PrintLog "- Insert a drawing object (rectangle) , and set its rotation angle"
363 Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
364 Call gMouseClick(40,50)
366 Call fPositionAndSize("TabDrehung")
371 Call fPositionAndSize("TabDrehung")
372 if Left$(Winkel.GetText,5) <> "45" + gSeperator + "00" then
373 Warnlog "The rotation angle isn't corroct! It should be 45" & gSeperator & "00, but get " + Left$(Winkel.GetText, 5)
381 '-------------------------------------------------------------------------
383 testcase tPositionAndSize_6
385 Dim sRadius as String
387 sRadius = "0" + gSeperator + "50" + gMeasurementUnit
389 PrintLog "- check corner radius of rectangles"
393 PrintLog "- Insert a rectangle , and set its corner radius."
394 Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
395 Call gMouseClick(40,50)
397 fPositionAndSize("TabSchraegstellen")
398 Radius.SetText sRadius
402 fPositionAndSize("TabSchraegstellen")
403 if Radius.GetText <> sRadius then Warnlog "The Radius isn't corroct! It should be " +sRadius + " , but was " +Radius.GetText
404 TabSchraegstellen.Cancel
410 '-------------------------------------------------------------------------
412 testcase tPositionAndSize_7
414 Dim sRadius as String
416 sRadius = "0" + gSeperator + "50" + gMeasurementUnit
418 PrintLog "- check corner radius of textboxes."
422 PrintLog "- Insert a rectangle , and set its corner radius"
424 Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
425 Call wTypeKeys "The test for corner radius of textboxes..."
426 Kontext "DocumentWriter"
427 Call wTypeKeys "<ESCAPE>"
429 fPositionAndSize("TabSchraegstellen")
430 Radius.SetText sRadius
434 fPositionAndSize("TabSchraegstellen")
435 if Radius.GetText <> sRadius then Warnlog "The Radius isn't corroct! It should be " +sRadius + " ,but get " +Radius.GetText
436 TabSchraegstellen.Cancel
442 '-------------------------------------------------------------------------
444 testcase tPositionAndSize_8
446 Dim sPositionStartX as String
447 Dim sPositionStartY as String
449 Dim sHeight as String
450 Dim sPivotDefaultX as String
451 Dim sPivotDefaultY as String
452 Dim sPivotStartX as String
453 Dim sPivotStartY as String
454 Dim sPivotEndX as String
455 Dim sPivotEndY as String
457 sPositionStartX = "3" + gSeperator + "00" + gMeasurementUnit
458 sPositionStartY = "3" + gSeperator + "00" + gMeasurementUnit
459 sWidth = "4" + gSeperator + "00" + gMeasurementUnit
460 sHeight = "3" + gSeperator + "00" + gMeasurementUnit
462 sPivotDefaultX = "5" + gSeperator + "00" + gMeasurementUnit
463 sPivotDefaultY = "4" + gSeperator + "50" + gMeasurementUnit
464 sPivotStartX = "3" + gSeperator + "50" + gMeasurementUnit
465 sPivotStartY = "2" + gSeperator + "50" + gMeasurementUnit
466 sPivotEndX = "6" + gSeperator + "50" + gMeasurementUnit
467 sPivotEndY = "6" + gSeperator + "50" + gMeasurementUnit
469 PrintLog "- check 'keep ratio' option"
473 PrintLog "- Insert a drawing object (rectangle)"
474 Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
475 Call gMouseClick(40,50)
477 fPositionAndSize("TabPositionAndSizeWriter")
479 Height.Settext sHeight
480 Horizontalby.Settext sPositionStartX
481 Verticalby.Settext sPositionStartY
482 TabPositionAndSizeWriter.OK
484 fPositionAndSize("TabDrehung")
489 fPositionAndSize("TabDrehung")
490 if PositionX.Gettext <> sPivotDefaultX then Warnlog "X-Position is wrong: Not -> "+sPivotDefaultX+" but -> "+PositionX.Gettext
491 if PositionY.Gettext <> sPivotDefaultY then Warnlog "Y-Position is wrong: Not -> "+sPivotDefaultY+" but -> "+PositionY.Gettext
493 Drehpunkt.TypeKeys "<Up>"
494 Drehpunkt.TypeKeys "<Left>"
496 if PositionX.Gettext <> sPivotStartX then Warnlog "X-Position is wrong: Not -> "+sPivotStartX+" but -> "+PositionX.Gettext
497 if PositionY.Gettext <> sPivotStartY then Warnlog "Y-Position is wrong: Not -> "+sPivotStartY+" but -> "+PositionY.Gettext
499 Drehpunkt.TypeKeys "<Right>" , 2
500 Drehpunkt.TypeKeys "<Down>" , 2
502 if PositionX.Gettext <> sPivotEndX then Warnlog "X-Position is wrong: Not -> "+sPivotEndX+" but -> "+PositionX.Gettext
503 if PositionY.Gettext <> sPivotEndY then Warnlog "Y-Position is wrong: Not -> "+sPivotEndY+" but -> "+PositionY.Gettext
510 '-------------------------------------------------------------------------
514 Dim iLineStyle as Integer
515 Dim iColor as Integer
516 Dim iArrowStyleLeft as Integer
517 Dim iArrowStyleRight as Integer
518 Dim sLineWidth as String
519 Dim sTransparency as String
520 Dim sArrowWidthLeft as String
521 Dim sArrowWidthRight as String
523 Dim iLineStyleDefault as Integer
524 Dim iColorDefault as Integer
525 Dim iArrowStyleLeftDefault as Integer
526 Dim iArrowStyleRightDefault as Integer
527 Dim sLineWidthDefault as String
528 Dim sTransparencyDefault as String
529 Dim sArrowWidthLeftDefault as String
530 Dim sArrowWidthRightDefault as String
532 sTransparency = "25%"
537 sLineWidth = "0" + gSeperator + "10" + gMeasurementUnit
538 sArrowWidthLeft = "0" + gSeperator + "55" + gMeasurementUnit
539 sArrowWidthRight = "0" + gSeperator + "60" + gMeasurementUnit
541 PrintLog "- check style, color, width and arrow styles"
545 PrintLog "- Insert a line"
546 Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
548 Call gMouseClick(40,40)
550 Call wTypeKeys ( "<Shift F4>" )
553 PrintLog "- modify Style ,color , width and arrow styles"
554 fFormatLine("TabLinie")
556 iLineStyleDefault = Stil.GetSelIndex
557 iColorDefault = Farbe.GetSelIndex
558 slineWidthDefault = Breite.GetText
559 sTransparencyDefault = Transparenz.GetText
560 iArrowStyleLeftDefault = StilLinks.GetSelIndex
561 iArrowStyleRightDefault = StilRechts.GetSelIndex
562 sArrowWidthLeftDefault = BreiteLinks.GetText
563 sArrowWidthRightDefault = BreiteRechts.GetText
565 PrintLog "- Line properties , include :"
567 Stil.Select iLineStyle
573 Breite.SetText sLineWidth
575 PrintLog "- - Transparency"
576 Transparenz.SetText sTransparency
579 PrintLog "- Arrow styles , include :"
580 PrintLog "- - Synchronize ends"
581 EndenSynchronisieren.UnCheck
582 PrintLog "- - Style (left and right)"
583 StilLinks.Select iArrowStyleLeft
584 StilRechts.Select iArrowStyleRight
586 PrintLog "- - Width (left and right)"
587 BreiteLinks.SetText sArrowWidthLeft
588 BreiteRechts.SetText sArrowWidthRight
589 PrintLog "- - Center (left and right)"
591 ZentriertRechts.Check
595 PrintLog "- Check all changes"
596 fFormatLine("TabLinie")
598 if Stil.GetSelIndex <> iLineStyle then Warnlog "Line style is wrong."
599 if Farbe.GetSelIndex <> iColor then Warnlog "Line color is wrong."
600 if Breite.GetText <> sLineWidth then Warnlog "Line width is wrong."
601 if Transparenz.GetText <> sTransparency then Warnlog "Line transparency is wrong."
603 if EndenSynchronisieren.IsChecked = TRUE then Warnlog "Synchronize ends should NOT be checked."
604 if StilLinks.GetSelIndex <> iArrowStyleLeft then Warnlog "The left arrow style is wrong."
605 if StilRechts.GetSelIndex <> iArrowStyleRight then Warnlog "The right arrow style is wrong."
606 if BreiteLinks.GetText <> sArrowWidthLeft then Warnlog "The left arrow width is wrong."
607 if BreiteRechts.GetText <> sArrowWidthRight then Warnlog "The right arrow width is wrong."
608 if ZentriertLinks.IsChecked <> TRUE then Warnlog "The left 'center' should be checked"
609 if ZentriertRechts.IsChecked <> TRUE then Warnlog "The right 'center' should be checked"
612 PrintLog "- Test Undo function"
613 Kontext "DocumentWriter"
617 fFormatLine("TabLinie")
618 if Stil.GetSelIndex <> iLineStyleDefault then Warnlog "Line style is wrong."
619 if Farbe.GetSelIndex <> iColorDefault then Warnlog "Line color is wrong."
620 if Breite.GetText <> sLineWidthDefault then Warnlog "Line width is wrong."
621 if Transparenz.GetText <> sTransparencyDefault then Warnlog "Line transparency is wrong."
623 if EndenSynchronisieren.IsChecked = TRUE then Warnlog "Synchronize ends should NOT be checked."
624 if StilLinks.GetSelIndex <> iArrowStyleLeftDefault then Warnlog "The left arrow style is wrong."
625 if StilRechts.GetSelIndex <> iArrowStyleRightDefault then Warnlog "The right arrow style is wrong."
626 if BreiteLinks.GetText <> sArrowWidthLeftDefault then Warnlog "The left arrow width is wrong."
627 if BreiteRechts.GetText <> sArrowWidthRightDefault then Warnlog "The right arrow width is wrong."
628 if ZentriertLinks.IsChecked = TRUE then Warnlog "The left 'center' should be checked"
629 if ZentriertRechts.IsChecked = TRUE then Warnlog "The right 'center' should be checked"
632 PrintLog "- Test Redo function"
633 Kontext "DocumentWriter"
637 fFormatLine("TabLinie")
638 if Stil.GetSelIndex <> iLineStyle then Warnlog "Line style is wrong."
639 if Farbe.GetSelIndex <> iColor then Warnlog "Line color is wrong."
640 if Breite.GetText <> sLineWidth then Warnlog "Line width is wrong."
641 if Transparenz.GetText <> sTransparency then Warnlog "Line transparency is wrong."
643 if EndenSynchronisieren.IsChecked = TRUE then Warnlog "Synchronize ends should NOT be checked."
644 if StilLinks.GetSelIndex <> iArrowStyleLeft then Warnlog "The left arrow style is wrong."
645 if StilRechts.GetSelIndex <> iArrowStyleRight then Warnlog "The right arrow style is wrong."
646 if BreiteLinks.GetText <> sArrowWidthLeft then Warnlog "The left arrow width is wrong."
647 if BreiteRechts.GetText <> sArrowWidthRight then Warnlog "The right arrow width is wrong."
648 if ZentriertLinks.IsChecked <> TRUE then Warnlog "The left 'center' should be checked"
649 if ZentriertRechts.IsChecked <> TRUE then Warnlog "The right 'center' should be checked"
656 '-------------------------------------------------------------------------
660 PrintLog "- Check call Format.Line dialog via Button in object bar."
664 PrintLog "- Insert a line."
665 Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
667 Call gMouseClick(40,40)
669 Call wTypeKeys ( "<Shift F4>" )
672 PrintLog "- call Format/Line dialog via Button in object bar."
674 Kontext "DrawingObjectbar"
677 active.SetPage TabLinie
681 active.SetPage TabLinienstile
683 Kontext "TabLinienstile"
685 active.SetPage TabLinienenden
687 Kontext "TabLinienenden"
688 TabLinienenden.Cancel
690 Warnlog "Can't call format/line via Button in object bar."
697 '-------------------------------------------------------------------------
701 Dim iLineStyle as Integer
702 Dim iColor as Integer
703 Dim iArrowStyleLeft as Integer
704 Dim iArrowStyleRight as Integer
705 Dim sLineWidth as String
712 PrintLog "- check line attributes are applied in object bar ,include -"
716 PrintLog "- Insert a line"
717 Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
719 Call gMouseClick(40,40)
721 Call wTypeKeys ( "<Shift F4>" )
724 PrintLog "- set Arrow Styles"
725 Kontext "DrawingObjectbar"
726 Linienendenstil.TearOff
727 Kontext "Linienenden"
729 Auswahl.TypeKeys "<Down>" , 4
731 Auswahl.TypeKeys "<Return>"
733 Auswahl.TypeKeys "<Right>"
735 Auswahl.TypeKeys "<Down>" , 2
737 Auswahl.TypeKeys "<Return>"
742 PrintLog "- set Line Style"
743 Kontext "DrawingObjectbar"
744 Linienstil.Select iLineStyle
746 PrintLog "- + Line Width"
748 sLineWidth = Linienbreite.GetText
750 PrintLog "- + Line Color"
751 Linienfarbe.Select iColor
753 PrintLog "- check the lines status"
754 fFormatLine("TabLinie")
755 if Stil.GetSelIndex <> iLineStyle then Warnlog "Line style is wrong."
756 if Farbe.GetSelIndex <> iColor then Warnlog "Line color is wrong."
757 if Breite.GetText <> sLineWidth then warnlog "Line width is wrong."
759 if StilLinks.GetSelIndex <> iArrowStyleLeft then Warnlog "Arrow style is not correctly shown in format dialog"
760 if StilRechts.GetSelIndex <> iArrowStyleRight then Warnlog "Arrow style is not correctly shown in format dialog"
768 '-------------------------------------------------------------------------
772 Dim iArrowStyleLeft as Integer
773 Dim iArrowStyleRight as Integer
778 PrintLog "- check 'synchronize ends'"
782 Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
784 Call gMouseClick(40,40)
786 Call wTypeKeys ( "<Shift F4>" )
789 fFormatLine("TabLinie")
790 PrintLog "- Check Synchronize ends"
791 EndenSynchronisieren.Check
793 PrintLog "- Style (left and right)"
794 StilLinks.Select iArrowStyleLeft
796 if StilRechts.GetSelIndex <> iArrowStyleLeft then Warnlog "The right arrow style is wrong."
798 StilRechts.Select iArrowStyleRight
800 if StilLinks.GetSelIndex <> iArrowStyleRight then Warnlog "The left arrow style is wrong."
808 '-------------------------------------------------------------------------
812 Dim iLineTypeLeft as Integer
813 Dim iLineTypeRight as Integer
814 Dim sLineStyle as String
815 Dim sRightLength as String
817 Dim sLeftNumber as String
818 Dim sRightNumber as String
820 sLineStyle = "myTest"
825 sRightLength = "0" + gSeperator + "30" + gMeasurementUnit
826 sSpace = "0" + gSeperator + "10" + gMeasurementUnit
828 PrintLog "- check 'check the attributes in format/line/line styles'"
832 Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
834 Call gMouseClick(40,40)
836 Call wTypeKeys ( "<Shift F4>" )
839 Call fFormatLine("TabLinienstile")
841 AnLinienbreite.UnCheck
843 TypLinks.Select iLineTypeLeft
844 TypRechts.Select iLineTypeRight
845 AnzahlLinks.SetText sLeftNumber
846 AnzahlRechts.SetText sRightNumber
847 LaengeRechts.SetText sRightLength
848 Abstand.SetText sSpace
854 if Linienstil.Exists then
857 Warnlog "The dialog doesn't appear ! No test for this case"
858 Kontext "TabLinienstile"
866 if LinieName.Exists then
868 Eingabefeld.SetText sLineStyle
873 Warnlog "The dialog doesn't appear !"
877 Call fFormatLine("TabLinienstile")
879 if AnLinienbreite.IsChecked = TRUE then Warnlog "Fit to line width should NOT be checked"
881 if TypLinks.GetSelIndex <> iLineTypeLeft then Warnlog "The left line type is wrong !"
883 if TypRechts.GetSelIndex <> iLineTypeRight then Warnlog "The right line type is wrong !"
885 if AnzahlLinks.GetText <> sLeftNumber then Warnlog "The left number is wrong !"
887 if AnzahlRechts.GetText <> sRightNumber then Warnlog "The right number is wrong !"
889 if LaengeLinks.IsEnabled then Warnlog "The left length should be unable !"
891 if LaengeRechts.GetText <> sRightLength then Warnlog "The right length is wrong !"
893 if Abstand.GetText <> sSpace then Warnlog "The spacing is wrong !"
897 'delete the testing line type , recover to the default
901 if Active.Exists then
902 if Active.GetRT = 304 then
906 Warnlog "Something wrong when deleting the new line type!"
911 Kontext "TabLinienstile"
918 '-------------------------------------------------------------------------
923 Dim sArrowTitle1 as String
924 Dim sArrowTitle2 as String
925 Dim soeFile as String
926 Dim soeDefaultFile as String
928 sArrowTitle1 = "myTest1"
929 sArrowTitle2 = "myTest2"
931 soeFile = ConvertPath(gOfficePath + "user\work\standard_reserver.soe")
932 soeDefaultFile = ConvertPath(gOfficePath + "user\config\standard.soe")
934 if hFileExists ( soeFile ) then app.kill ( soeFile )
936 PrintLog "- check the attributes in format/line/arrow styles"
940 Call wZeichenobjektEinfuegen("RECHTECK", 32, 40, 40, 60)
941 Call wZeichenobjektEinfuegen("ELLIPSE", 32, 65, 40, 85)
943 Call wZeichenobjektEinfuegen("LINIE", 30,40 , 60,50 , false)
944 Call gMouseClick(30,40)
946 PrintLog "- add the first test arrow type."
947 fFormatLine("TabLinienenden")
948 PrintLog "- save the arrow types first."
951 Kontext "SpeichernDlg"
952 Dateiname.SetText soeFile
957 Kontext "TabLinienenden"
958 PrintLog "- delete the all arrow types."
959 if Loeschen.IsEnabled then
960 for i = 1 to Liste.GetItemCount
963 if Active.Exists then
964 if Active.GetRT = 304 then
967 Warnlog "Something wrong when deleting the arrow types!"
971 Kontext "TabLinienenden"
978 Eingabefeld.SetText sArrowTitle1
982 Kontext "TabLinienenden"
985 PrintLog "- add the second test arrow type."
986 Call wZeichenobjektEinfuegen("LINIE", 30,70 , 60,50 , false)
987 Call gMouseClick(30,70)
988 fFormatLine("TabLinienenden")
992 Eingabefeld.SetText sArrowTitle2
996 Kontext "TabLinienenden"
999 Call gMouseClick(30,40)
1000 fFormatLine("TabLinienenden")
1003 if TextFeld.GetText <> sArrowTitle1 then Warnlog "The first arraw title is wrong, hope "+sArrowTitle1+ " but get " +TextFeld.GetText
1005 if TextFeld.GetText <> sArrowTitle2 then Warnlog "The first arraw title is wrong, hope "+sArrowTitle2+ " but get " +TextFeld.GetText
1009 Kontext "OeffnenDlg"
1010 Pfad.SetText soeFile
1014 Kontext "TabLinienenden"
1016 if hFileExists ( soeDefaultFile ) then app.kill ( soeDefaultFile )
1020 Kontext "SpeichernDlg"
1021 Dateiname.SetText soeDefaultFile
1026 Kontext "TabLinienenden"
1033 '-------------------------------------------------------------------------