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: ctrl_General.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 07:43:41 $
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 : marc.neumann@sun.com
36 '* short description : Data Source Administrator
38 '\***********************************************************************
42 call tAutomaticControlFocus1
43 call tAutomaticControlFocus2'
44 call tPosAndSize_Protect_Position
45 call tPosAndSize_Protect_Size
46 call tPosAndSize_Keyboard
47 call tPosAndSize_Dialog
48 call tPosAndSize_KeepRatio
49 'TODO Control the Setting on tabpage Rotation & Slant (should be inactive).
57 '--------------------------------------------------------------------------------------
59 testcase tLoad_Save_Print
61 dim iXMLElementCount as integer
63 '/// Load the document TT_All_Controls.odt
64 hFileOpen ( gTesttoolPath + ConvertPath("dbaccess/optional/input/TT_All_Controls.odt"))
65 'TODO: Are all controlls shown right (color, fonts etc.)?
66 '/// save the doc under a diffrent name.
67 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_All_Controls.odt"))
68 '/// Reload & compare it with the origin doc.
70 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_All_Controls.odt"))
72 'TODO: Print the doc & compare it with the origin.
73 '(Attention: Background can't be printed colored (Task: <A HREF="http://webserver1.stardiv.de/Bugtracker/Source/Body_ReportDetail.asp?ID=57223">57223</A>)).
76 '--------------------------------------------------------------------------------------
77 testcase tAutomaticControlFocus1
79 '/// Open a new document,
80 printlog "Open a new document,"
82 Kontext "DocumentWriter"
83 DocumentWriter.TypeKeys "tt_doc" , true
86 call hToolbarSelect("FormControls",true)
88 Kontext "FormControls"
91 '/// insert a Text Boxes
92 printlog "insert three Text Boxes"
93 call hDrawingWithSelection ( 40, 40, 55, 55 )
97 Kontext "FormControls"
98 ControlProperties.Click
101 fSetControlProperty("Edit","DefaultValue","tt_control")
103 '/// activate the Automatic control focus.
104 printlog "activate the Automatic control focus."
106 call hToolbarSelect("FormDesignTools",true)
108 Kontext "FormDesignTools"
109 AutoControlFocus.Click
112 '/// save the document
113 printlog "save the document"
114 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_Control_Test1.odt"))
118 '/// reload the document
119 printlog "reload the document"
120 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Control_Test1.odt"))
121 ' /// check if the control has the focus after reload.
122 printlog " check if the second control has the focus after reload."
123 Kontext "DocumentWriter"
124 DocumentWriter.TypeKeys "<MOD1 HOME>" , true
126 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
128 DocumentWriter.TypeKeys "<MOD1 C>" , true
130 if GetClipboard <> "tt_control" then
131 warnlog "The control has not the focus. The document has the focus."
137 '--------------------------------------------------------------------------------------
138 testcase tAutomaticControlFocus2
140 '/// Open a new document,
141 printlog "Open a new document,"
143 Kontext "DocumentWriter"
144 DocumentWriter.TypeKeys "tt_doc" , true
147 call hToolbarSelect("FormControls",true)
149 Kontext "FormControls"
152 '/// insert three Text Boxes
153 printlog "insert three Text Boxes"
154 call hDrawingWithSelection ( 50, 20, 60, 30 )
156 Kontext "FormControls"
157 ControlProperties.Click
159 fSetControlProperty("Edit","DefaultValue","tt_control1")
161 call hDrawingWithSelection ( 50, 40, 60, 50 )
163 ' open and close the form property browser to get the focus
164 Kontext "FormControls"
165 ControlProperties.Click
167 ControlProperties.Click
170 fSetControlProperty("Edit","TabOrder","1")
172 ' open and close the property browser
173 Kontext "FormControls"
174 ControlProperties.Click
176 ControlProperties.Click
179 fSetControlProperty("Edit","DefaultValue","tt_control2")
183 call hDrawingWithSelection ( 50, 60, 60, 70 )
185 ' open and close the form property browser to get the focus
186 Kontext "FormControls"
187 ControlProperties.Click
189 ControlProperties.Click
191 fSetControlProperty("Edit","DefaultValue","tt_control3")
193 '/// activate the Automatic control focus.
194 printlog "activate the Automatic control focus."
196 call hToolbarSelect("FormDesignTools",true)
198 Kontext "FormDesignTools"
199 AutoControlFocus.Click
202 '/// save the document
203 printlog "save the document"
204 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_Control_Test2.odt"))
207 '/// reload the document
208 printlog "reload the document"
209 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Control_Test2.odt"))
210 ' /// check if the second control has the focus after reload.
211 printlog " check if the second control has the focus after reload."
212 Kontext "DocumentWriter"
213 DocumentWriter.TypeKeys "<MOD1 HOME>" , true
215 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
217 DocumentWriter.TypeKeys "<MOD1 C>" , true
219 if GetClipboard <> "tt_control2" then
220 warnlog "The wrong control has the focus."
226 '--------------------------------------------------------------------------------------
227 testcase tPosAndSize_Keyboard
232 dim sHeight as String
234 '/// Open a new document,
235 printlog "Open a new document,"
239 call hToolbarSelect("FormControls",true)
240 Kontext "FormControls"
243 '/// insert a Text Box
244 printlog "insert a Text Box"
245 Kontext "DocumentWriter"
246 DocumentWriter.MouseDown ( 45, 45 )
247 DocumentWriter.MouseMove ( 55, 55 )
248 DocumentWriter.MouseUp ( 55, 55 )
250 '/// open the position and size dialog.
251 printlog "open the position and size dialog."
253 call fOpenPositionAndSizeDialog
255 '/// remember the settings.
256 printlog "remember the settings."
257 Kontext "TabPositionAndSizeWriter"
258 sPosX = HorizontalBy.getText()
259 sPosY = Verticalby.getText()
260 sWidth = Width.getText()
261 sHeight = Height.getText()
262 TabPositionAndSizeWriter.OK
265 Kontext "DocumentWriter"
269 '/// move the control via keyboard
270 printlog "move the control via keyboard"
272 DocumentWriter.TypeKeys "<DOWN>" , true
273 DocumentWriter.TypeKeys "<RIGHT>" , true
274 DocumentWriter.TypeKeys "<MOD1 TAB>" , true
275 DocumentWriter.TypeKeys "<DOWN>" , true
276 DocumentWriter.TypeKeys "<RIGHT>" , true
279 '/// open the position and size dialog
280 printlog "open the position and size dialog"
282 call fOpenPositionAndSizeDialog
284 Kontext "TabPositionAndSizeWriter"
285 '/// check the settings.
286 printlog "check the settings."
287 if sPosX = HorizontalBy.getText() then
288 warnlog "The X position has not change."
290 if sPosY = VerticalBy.getText() then
291 warnlog "The Y position has not change."
293 if sWidth = Width.getText() then
294 warnlog "The width position has not change."
296 if sHeight = Height.getText() then
297 warnlog "The height position has not change."
300 TabPositionAndSizeWriter.OK
306 '--------------------------------------------------------------------------------------
307 testcase tPosAndSize_Dialog
312 dim sHeight as String
315 '/// Open a new document,
316 printlog "Open a new document,"
318 Kontext "DocumentWriter"
319 DocumentWriter.TypeKeys "tt_doc" , true
322 call hToolbarSelect("FormControls",true)
324 Kontext "FormControls"
327 '/// insert a Text Box
328 printlog "insert a Text Box"
329 call hDrawingWithSelection ( 40, 40, 60, 60 )
331 '/// open the position and size dialog
332 printlog "open the position and size dialog"
334 call fOpenPositionAndSizeDialog
336 '/// set values for X , Y , width and height
337 printlog "set values for X , Y , width and height"
338 Kontext "TabPositionAndSizeWriter"
339 ' uncheck KeepRatio because maybe it have set from a test before.
341 HorizontalBy.setText("3")
342 VerticalBy.setText("3")
346 TabPositionAndSizeWriter.OK
348 '/// open the position and size dialog
349 printlog "open the position and size dialog"
351 call fOpenPositionAndSizeDialog
353 Kontext "TabPositionAndSizeWriter"
354 '/// check the settings.
355 printlog "check the settings."
356 sText = HorizontalBy.getText()
357 if Instr(sText,"3") = 0 then
358 warnlog "The X position has not changed."
360 sText = VerticalBy.getText()
361 if Instr(sText,"3") = 0 then
362 warnlog "The Y position has not changed."
364 sText = Width.getText()
365 if Instr(sText,"3") = 0 then
366 warnlog "The width has not changed."
368 sText = Height.getText()
369 if Instr(sText,"3") = 0 then
370 warnlog "The height has not changed."
373 TabPositionAndSizeWriter.OK
379 '--------------------------------------------------------------------------------------
380 testcase tPosAndSize_Protect_Position
385 '/// Open a new document,
386 printlog "Open a new document,"
388 Kontext "DocumentWriter"
389 DocumentWriter.TypeKeys "tt_doc" , true
392 call hToolbarSelect("FormControls",true)
394 Kontext "FormControls"
397 '/// insert a Text Box
398 printlog "insert a Text Box"
399 call hDrawingWithSelection ( 40, 40, 60, 60 )
401 '/// open the position and size dialog
402 printlog "open the position and size dialog"
404 call fOpenPositionAndSizeDialog
406 Kontext "TabPositionAndSizeWriter"
407 sPosX = HorizontalBy.getText()
408 sPosY = VerticalBy.getText()
409 '/// check protect position
410 printlog "check protect position"
411 ProtectPosition.Check
412 TabPositionAndSizeWriter.OK
415 Kontext "DocumentWriter"
418 'Kontext "DocumentWriter"
419 '/// test if is possible to move the control via keyboard
420 printlog "test if is possible to move the control via keyboard"
421 DocumentWriter.TypeKeys "<DOWN>" , true
422 DocumentWriter.TypeKeys "<RIGHT>" , true
425 '/// open the position and size dialog
426 printlog "open the position and size dialog"
428 call fOpenPositionAndSizeDialog
430 Kontext "TabPositionAndSizeWriter"
431 '/// check the settings, if the position is changed.
432 printlog "check the settings, if the position is changed."
433 if sPosX <> HorizontalBy.getText() then
434 warnlog "The X position has change although the protect position is checked."
436 if sPosY <> VerticalBy.getText() then
437 warnlog "The Y position has change although the protect position is checked."
439 TabPositionAndSizeWriter.OK
445 '--------------------------------------------------------------------------------------
446 testcase tPosAndSize_KeepRatio
449 dim sHeight as String
451 '/// Open a new document,
452 printlog "Open a new document,"
454 Kontext "DocumentWriter"
455 DocumentWriter.TypeKeys "tt_doc" , true
458 call hToolbarSelect("FormControls",true)
460 Kontext "FormControls"
463 '/// insert a Text Box
464 printlog "insert a Text Box"
465 call hDrawingWithSelection ( 40, 40, 60, 60 )
467 '/// open the position and size dialog
468 printlog "open the position and size dialog"
470 call fOpenPositionAndSizeDialog
473 '/// set a width and height.
474 printlog "set a width and height."
475 Kontext "TabPositionAndSizeWriter"
481 '/// check keep ratio
482 printlog "check keep ratio"
487 '/// check if keep ratio is working
488 printlog "check if keep ratio is working"
489 if Instr(Height.getText(),"3") = -1 then
490 warnlog "The height doesn't keep the ratio"
492 TabPositionAndSizeWriter.OK
494 '/// open the position and size dialog
495 printlog "open the position and size dialog"
496 call fOpenPositionAndSizeDialog
498 Kontext "TabPositionAndSizeWriter"
499 '/// check the settings.
500 printlog "check the settings."
501 if Instr(Width.getText(),"6") = -1 then
502 warnlog "The width isn't correct. " + Width.getText()+" instead of 6."
504 if Instr(Height.getText(),"3") = -1 then
505 warnlog "The height isn't correct. " + height.getText()+" instead of 3."
508 TabPositionAndSizeWriter.OK
514 '--------------------------------------------------------------------------------------
515 testcase tPosAndSize_Protect_Size
518 dim sHeight as String
520 '/// Open a new document,
521 printlog "Open a new document,"
523 Kontext "DocumentWriter"
524 DocumentWriter.TypeKeys "tt_doc" , true
527 call hToolbarSelect("FormControls",true)
529 Kontext "FormControls"
532 '/// insert a Text Box
533 printlog "insert a Text Box"
534 call hDrawingWithSelection ( 40, 40, 60, 60 )
536 '/// open the position and size dialog
537 printlog "open the position and size dialog"
539 call fOpenPositionAndSizeDialog
541 Kontext "TabPositionAndSizeWriter"
542 sWidth = Width.getText()
543 sHeight = Height.getText()
544 '/// check protect size
545 printlog "check protect size"
547 TabPositionAndSizeWriter.OK
550 Kontext "DocumentWriter"
553 'Kontext "DocumentWriter"
554 '/// test is is possible to change the size of the control via keyboard
555 printlog "test is is possible to change the size of the control via keyboard"
556 DocumentWriter.TypeKeys "<MOD1 TAB>" , true
557 DocumentWriter.TypeKeys "<DOWN>" , true
558 DocumentWriter.TypeKeys "<RIGHT>" , true
560 '/// open the position and size dialog
561 printlog "open the position and size dialog"
563 call fOpenPositionAndSizeDialog
565 Kontext "TabPositionAndSizeWriter"
566 '/// check the settings
567 printlog "check the settings"
568 if sWidth <> Width.getText() then
569 warnlog "The width has change although the protect size is checked."
571 if sHeight <> Height.getText() then
572 warnlog "The height has change although the protect size is checked."
574 TabPositionAndSizeWriter.OK
580 '-------------------------------------------------------------------------
583 '/// Open a new document,
584 printlog "Open a new document,"
586 Kontext "DocumentWriter"
587 DocumentWriter.TypeKeys "tt_doc" , true
590 call hToolbarSelect("FormControls",true)
592 Kontext "FormControls"
595 '/// insert one Text Box
596 printlog "insert one Text Box"
597 call hDrawingWithSelection ( 50, 20, 60, 30 )
600 '/// open the control propery browser
601 printlog "open the control propery browser"
602 call fOpenControlPropertyBrowser
604 '/// the the default text to tt_control1
605 printlog "the the default text to tt_control1"
606 call fSetControlProperty("TextBox","DefaultValue","tt_control1")
608 ' close the property browser
609 Kontext "FormControls"
610 ControlProperties.Click
614 '/// insert again one Text Box
615 printlog "insert again one Text Box"
616 call hDrawingWithSelection ( 50, 40, 60, 50 )
620 '/// open the property browser
621 printlog "open the property browser"
622 call fOpenControlPropertyBrowser
624 '/// set the Order property to 2
625 printlog "set the Order property to 2"
626 call fSetControlProperty("TextBox","Order","2")
628 'close and reopen the control property browser to get the default focus
629 call fOpenControlPropertyBrowser
631 '/// set the DefaultValue property to tt_control2
632 call fSetControlProperty("TextBox","DefaultValue","tt_control2")
634 'close the control propery browser
635 Kontext "FormControls"
636 ControlProperties.Click
638 '/// insert again one Text Box
639 printlog "insert again one Text Box"
640 call hDrawingWithSelection ( 50, 60, 60, 70 )
644 ' open and close the form property browser to get the focus
645 call fOpenControlPropertyBrowser
647 '/// set the Order property to 1
648 printlog "set the Order property to 1"
649 call fSetControlProperty("TextBox","Order","1")
651 'close and reopen the control property browser to get the default focus
652 call fOpenControlPropertyBrowser
654 '/// set the DeaultValue property to tt_control3
655 printlog "set the DeaultValue property to tt_control3"
656 call fSetControlProperty("TextBox","DefaultValue","tt_control3")
658 call hToolbarSelect("FormDesignTools",true)
659 Kontext "FormDesignTools"
660 '/// activate the AutomaticControlFocus
661 printlog "activate the AutomaticControlFocus"
662 AutoControlFocus.Click
664 '/// turn of the design view
665 printlog "turn of the design view"
666 Kontext "FormControls"
667 SwitchControlDesignMode.Click
668 printlog "after designview click"
670 '/// check if the right control has the focus
671 printlog "check if the right control has the focus"
672 Kontext "DocumentWriter"
673 DocumentWriter.TypeKeys "<MOD1 HOME>" , true
675 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
677 DocumentWriter.TypeKeys "<MOD1 C>" , true
679 if GetClipboard = "tt_doc" then
680 warnlog "The control has not the focus. The document has the focus."
681 elseif GetClipboard <> "tt_control3" then
682 warnlog "The wrong control has the focus."
684 '/// check that tyou travel to the right controls via TAB
685 printlog "check that tyou travel to the right controls via TAB"
686 DocumentWriter.TypeKeys "<TAB>" , true
688 DocumentWriter.TypeKeys "<MOD1 HOME>" , true
690 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
692 DocumentWriter.TypeKeys "<MOD1 C>" , true
694 if GetClipboard <> "tt_control2" then
695 warnlog "The wrong control has the focus."
701 '--------------------------------------------------------------------------------------
702 testcase tActivationOrder
704 Dim sSelText as string
706 '/// Open a new document,
707 printlog "Open a new document,"
709 Kontext "DocumentWriter"
710 DocumentWriter.TypeKeys "tt_doc" , true
713 call hToolbarSelect("FormControls",true)
715 Kontext "FormControls"
719 '/// insert one Text Box
720 printlog "insert one Text Box"
721 call hDrawingWithSelection ( 50, 20, 60, 30 )
724 '/// open the control property browser
725 printlog "open the control property browser"
726 call fOpenControlPropertyBrowser
728 '/// set the Name Property to tt_control1
729 printlog "set the Name Property to tt_control1"
730 call fSetControlProperty("TextBox","NameText","tt_control1")
732 'close and reopen the control property browser to get the default focus
733 call fOpenControlPropertyBrowser
735 '/// set the DefaultValue Property to tt_control1
736 printlog "set the DefaultValue Property to tt_control1"
737 call fSetControlProperty("TextBox","DefaultValue","tt_control1")
741 ' close the property browser
742 Kontext "FormControls"
743 ControlProperties.Click
745 '/// insert one Text Box
746 printlog "insert one Text Box"
747 call hDrawingWithSelection ( 50, 40, 60, 50 )
750 '/// open the control property browser
751 printlog "open the control property browser"
752 call fOpenControlPropertyBrowser
754 '/// set the Name Property to tt_control2
755 printlog "set the Name Property to tt_control2"
756 call fSetControlProperty("TextBox","NameText","tt_control2")
758 'close and reopen the control property browser to get the default focus
759 call fOpenControlPropertyBrowser
761 '/// set the DefaultValue Property to tt_control2
762 call fSetControlProperty("TextBox","DefaultValue","tt_control2")
764 ' close the property browser
765 Kontext "FormControls"
766 ControlProperties.Click
768 '/// insert one Text Box
769 printlog "insert one Text Box"
770 call hDrawingWithSelection ( 50, 60, 60, 70 )
773 '/// open the control property browser
774 printlog "open the control property browser"
775 call fOpenControlPropertyBrowser
777 '/// set the Name Property to tt_control3
778 call fSetControlProperty("TextBox","NameText","tt_control3")
780 'close and reopen the control property browser to get the default focus
781 call fOpenControlPropertyBrowser
783 '/// set the Defaultvalue property to tt_control3
784 call fSetControlProperty("TextBox","DefaultValue","tt_control3")
786 '/// open the tab order dialog
787 printlog "open the tab order dialog"
791 printlog "IndexKLiener"
792 Kontext "ActivationOrder"
794 ControlList.TypeKeys "<END>" , true ' to select the first entry
796 ControlList.TypeKeys "<HOME>" , true
798 sSelText = ControlList.getSelText()
799 if sSelText <> "tt_control1" then
800 warnlog "Wrong control on first position in activation order dialog.(" + sSelText + ")"
803 ControlList.TypeKeys "<DOWN>" , true
805 sSelText = ControlList.getSelText()
806 if sSelText <> "tt_control2" then
807 warnlog "Wrong control on second position in activation order dialog.(" + sSelText + ")"
810 ControlList.TypeKeys "<DOWN>" , true
812 sSelText = ControlList.getSelText()
813 if sSelText <> "tt_control3" then
814 warnlog "Wrong control on third position in activation order dialog.(" + sSelText + ")"
819 ControlList.TypeKeys "<HOME>" , true
821 ControlList.TypeKeys "<DOWN>" , true
822 sSelText = ControlList.getSelText()
823 if sSelText <> "tt_control3" then
824 warnlog "The move up button in activation order dialog doesn't work.(" + sSelText + ")"
830 printlog "open TabOrder dialog"
833 Kontext "ActivationOrder"
835 ControlList.TypeKeys "<END>" , true ' to select the first entry
837 ControlList.TypeKeys "<HOME>" , true
839 sSelText = ControlList.getSelText()
840 if sSelText <> "tt_control1" then
841 warnlog "Wrong control on first position in activation order dialog.(" + sSelText + ")"
846 ControlList.TypeKeys "<HOME>" , true
848 ControlList.TypeKeys "<DOWN>" , true
849 sSelText = ControlList.getSelText()
850 if sSelText <> "tt_control1" then
851 warnlog "The move down button in activation order dialog doesn't work.(" + sSelText + ")"
858 call hToolbarSelect("FormDesignTools",true)
860 Kontext "FormDesignTools"
862 '/// activate the AutomaticControlFocus
863 printlog "activate the AutomaticControlFocus"
864 AutoControlFocus.Click
866 '/// turn of the design view
867 printlog "turn of the design view"
868 Kontext "FormControls"
869 SwitchControlDesignMode.Click
870 printlog "after designview click"
873 Kontext "DocumentWriter"
874 DocumentWriter.TypeKeys "<MOD1 HOME>" , true
876 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
878 DocumentWriter.TypeKeys "<MOD1 C>" , true
880 if GetClipboard = "tt_doc" then
881 warnlog "The control has not the focus. The document has the focus."
882 elseif GetClipboard <> "tt_control3" then
883 warnlog "The wrong control has the focus. (" + GetClipboard + ")"
885 DocumentWriter.TypeKeys "<TAB>" , true
887 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
889 DocumentWriter.TypeKeys "<MOD1 C>" , true
891 if GetClipboard = "tt_doc" then
892 warnlog "The control has not the focus. The document has the focus."
893 elseif GetClipboard <> "tt_control1" then
894 warnlog "The wrong control has the focus. (" + GetClipboard + ")"
897 DocumentWriter.TypeKeys "<TAB>" , true
899 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
901 DocumentWriter.TypeKeys "<MOD1 C>" , true
903 if GetClipboard = "tt_doc" then
904 warnlog "The control has not the focus. The document has the focus."
905 elseif GetClipboard <> "tt_control2" then
906 warnlog "The wrong control has the focus. (" + GetClipboard + ")"
910 printlog "turn of the design view"
911 Kontext "FormControls"
912 SwitchControlDesignMode.Click
913 printlog "after designview click"
916 printlog "open TabOrder dialog"
919 Kontext "ActivationOrder"
925 Kontext "FormControls"
926 '/// turn off the design view
927 printlog "turn of the design view"
928 SwitchControlDesignMode.Click
931 Kontext "DocumentWriter"
932 DocumentWriter.TypeKeys "<MOD1 HOME>" , true
934 DocumentWriter.TypeKeys "<MOD1 SHIFT END>" , true
936 DocumentWriter.TypeKeys "<MOD1 C>" , true
938 if GetClipboard = "tt_doc" then
939 warnlog "The control has not the focus. The document has the focus."
940 elseif GetClipboard <> "tt_control1" then
941 warnlog "The wrong control has the focus.(" + GetClipboard + ")"
943 DocumentWriter.TypeKeys "<TAB>" , true
945 DocumentWriter.TypeKeys "<MOD1 C>" , true
947 if GetClipboard = "tt_doc" then
948 warnlog "The control has not the focus. The document has the focus."
949 elseif GetClipboard <> "tt_control2" then
950 warnlog "The wrong control has the focus.(" + GetClipboard + ")"
953 DocumentWriter.TypeKeys "<TAB>" , true
955 DocumentWriter.TypeKeys "<MOD1 C>" , true
957 if GetClipboard = "tt_doc" then
958 warnlog "The control has not the focus. The document has the focus."
959 elseif GetClipboard <> "tt_control3" then
960 warnlog "The wrong control has the focus.(" + GetClipboard + ")"
968 '-------------------------------------------------------------------------
971 Dim sControlName1 as String
972 Dim sControlName2 as String
973 '/// Open a new document,
974 printlog "Open a new document,"
976 Kontext "DocumentWriter"
977 DocumentWriter.TypeKeys "tt_doc" , true
980 call hToolbarSelect("FormControls",true)
982 Kontext "FormControls"
985 '/// insert three Text Boxes
986 printlog "insert three Text Boxes"
987 call hDrawingWithSelection ( 50, 20, 60, 30 )
989 Kontext "FormControls"
993 Kontext "FormPropertiesDialog"
994 FormPropertiesTabControl.SetPage TabDataForm
996 Kontext "TabDataForm"
998 DataSource.Select "Bibliography"
999 TabDataForm.typeKeys("<RETURN>")
1001 Content.Select "biblio"
1002 TabDataForm.typeKeys("<RETURN>")
1005 Kontext "FormControls"
1006 FormProperties.Click
1009 call hToolbarSelect("FormDesignTools",true)
1011 Kontext "FormDesignTools"
1015 Kontext "FeldAuswahl"
1017 sControlName1 = Liste.getSelText
1018 Liste.TypeKeys "<RETURN>"
1021 Kontext "FormDesignTools"
1022 ShowFmExplorer.Click
1025 Kontext "FormularNavigator"
1026 Liste.TypeKeys "<HOME>" , true
1027 Liste.TypeKeys "<DOWN>" , 4, true
1028 sControlName2 = Liste.getSelText
1029 if sControlName1 <> sControlName2 then
1030 qaerrorlog "#i98316# The control name is not the same as the fieldname."
1039 function fOpenPositionAndSizeDialog
1041 call hToolbarSelect("FormDesignTools",true)
1043 Kontext "FormDesignTools"
1044 PositionAndSizeDialog.Click
1046 fOpenPositionAndSizeDialog=true
1049 '-------------------------------------------------------------------------
1050 function fOpenTabOrder
1052 printlog "open FormControls Toolbar"
1054 call hToolbarSelect("FormDesignTools",true)
1056 Kontext "FormDesignTools"
1063 '-------------------------------------------------------------------------