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_Several2.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 : Control Serveral Part 2 (more controls) - check each control and each property
38 '\***********************************************************************
42 call fSwitchAutopilotOff(true) ' has to run first to switch off the autopilot
44 call tSpinButton ' tested properties: Repeat, Name, Symbol color (disabled bug:i39944), Background color
45 call tScrollBar ' tested properties: Scroll value min, Scroll value max, Default Scroll value, Orientation, Line increment (small change), Block increment (large change), Delay, Visible Size
46 call tImageButton ' tested properties: Scale, Frame (disabled bug:i39970)
47 call tImageControl ' tested properties: Help URL
48 call tFileControl ' tested properties: Border, Tabstop
49 call tDateField ' tested properties: Date max, Date min, Date format, Dropdown
50 call tTimeField ' tested properties: Time min, Time max, Time format
51 call tNumericField ' tested properties: Spin Button, Strict format, Thousands Seperator, Value step
52 call tCurrencyField ' tested properties: Inc/dec value, Prefix symbol, Currency symbol, Accuracy
53 call tPatternField ' tested properties: Read only, Edit mask, Literal mask, Order
54 call tGroupBox ' tested properties: Character set, Label
55 call tTableControl ' tested properties: Navigation bar, Record marker, Row high
56 call tNavigationBar ' tested properties: IconSize, Positioning, Navigation, RecordActions, FilteringSorting
58 call fSwitchAutopilotOff(false)
63 '--------------------------------------------------------------------------------------
67 '/// Open a new document,
68 printlog "Open a new document,"
70 Kontext "DocumentWriter"
71 DocumentWriter.TypeKeys "tt_doc" , true
73 call addControl ( "SpinButton", 50, 20, 60, 30 )
75 '/// open the control property browser
76 call fOpenControlPropertyBrowser
77 Kontext "ControlPropertiesTabControl"
78 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
80 '/// set properties: Repeat, Name
81 printlog "set properties"
82 call fsetControlProperty("ScrollBar","Repeat","1") 'listbox property: no
83 call fsetControlProperty("ScrollBar","NameText","Changed")
84 call fsetControlProperty("ScrollBar","Background","55")
85 '/// save the document
86 printlog "save the document"
87 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_Spinbutton.odt"))
90 '/// reload the document
91 printlog "reload the document"
92 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Spinbutton.odt"))
94 call hToolbarSelect("MoreControls",true)
95 call hToolbarSelect("FormControls",true)
96 call fSwitchControlDesignMode
97 Kontext "DocumentWriter"
98 DocumentWriter.TypeKeys "<SHIFT F4>"
101 call fOpenControlPropertyBrowser
103 '/// check if inserted property values are saved right
104 printlog "check if property values are inserted"
105 Kontext "TabGeneralControl"
106 dim bScrOK as boolean 'control variable if all properties are correct
108 if fgetControlProperty("Spinbutton","Repeat") <> "1" then
109 warnlog "the spinbutton is not saved with property: Repeat"
112 if fgetControlProperty("Spinbutton","NameText") <> "Changed" then
113 warnlog "the spinbutton is not saved with property: NameText"
116 if fgetControlProperty("Spinbutton","Background") <> "55" then
117 warnlog "the spinbutton is not saved with property: Background"
120 if bScrOK = true then printlog "Spinbutton was saved correctly"
123 call closePropertyBrowserAndDocument()
126 '--------------------------------------------------------------------------------------
130 dim sMem as string 'comparing variable
132 '/// Open a new document,
133 printlog "Open a new document,"
135 Kontext "DocumentWriter"
136 DocumentWriter.TypeKeys "tt_doc" , true
138 call addControl("ScrollBar", 50, 20, 60, 30 )
140 printlog "open the control property browser"
141 call fOpenControlPropertyBrowser
143 Kontext "ControlPropertiesTabControl"
144 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
146 '/// set properties: Scroll value min, Scroll value max, Default Scroll value, Orientation, Line increment, Block increment, Delay, symbol color, Visible Size
147 printlog "set properties"
148 call fsetControlProperty("ScrollBar","ScrollValueMin","10")
149 call fsetControlProperty("ScrollBar","ScrollValueMax","90")
150 call fsetControlProperty("ScrollBar","ScrollValueDefault","5")
151 call fsetControlProperty("ScrollBar","Orientation","2") 'listbox property: vertical
152 call fsetControlProperty("ScrollBar","LineIncrement","10")
153 call fsetControlProperty("ScrollBar","BlockIncrement","25")
154 call fsetControlProperty("ScrollBar","Delay","100")
155 TabGeneralControl.TypeKeys "<RETURN>" , true 'an ms is added to 100 -> 100ms
156 sMem = fgetControlProperty("ScrollBar","Delay")
157 call fsetControlProperty("ScrollBar","VisibleSize","10")
159 '/// save the document
160 printlog "save the document"
161 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_Scrollbar.odt"))
164 '/// reload the document
165 printlog "reload the document"
166 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Scrollbar.odt"))
169 call hToolbarSelect("MoreControls",true)
170 call hToolbarSelect("FormControls",true)
171 call fSwitchControlDesignMode
172 Kontext "DocumentWriter"
173 DocumentWriter.TypeKeys "<SHIFT F4>"
176 call fOpenControlPropertyBrowser
178 '/// check if inserted property values are saved right
179 printlog "check if property values are inserted"
180 Kontext "TabGeneralControl"
181 dim bScrOK as boolean 'control variable if all properties are correct
183 if fgetControlProperty("ScrollBar","ScrollValueMin") <> "10" then
184 warnlog "the scrollbar is not saved with property: ScrollValueMin"
187 if fgetControlProperty("ScrollBar","ScrollValueMax") <> "90" then
188 warnlog "the scrollbar is not saved with property: ScrollValueMax"
191 if fgetControlProperty("ScrollBar","ScrollValueDefault") <> "5" then
192 warnlog "the scrollbar is not saved with property: ScrollValueDefault"
195 if fgetControlProperty("ScrollBar","Orientation") <> "2" then
196 warnlog "the scrollbar is not saved with property: Orientation"
199 if fgetControlProperty("ScrollBar","LineIncrement") <> "10" then
200 warnlog "the scrollbar is not saved with property: LineIncrement"
203 if fgetControlProperty("ScrollBar","BlockIncrement") <> "25" then
204 warnlog "the scrollbar is not saved with property: BlockIncrement"
207 if fgetControlProperty("ScrollBar","Delay") <> sMem then
208 warnlog "the scrollbar is not saved with property: Delay"
211 if fgetControlProperty("ScrollBar","VisibleSize") <> "10" then
212 warnlog "the scrollbar is not saved with property: VisibleSize"
215 if bScrOK = true then printlog "Scrollbar was saved correctly"
218 call closePropertyBrowserAndDocument()
221 '--------------------------------------------------------------------------------------
223 testcase tImageButton
225 '/// Open a new document,
226 printlog "Open a new document,"
228 Kontext "DocumentWriter"
229 DocumentWriter.TypeKeys "tt_doc" , true
231 call addControl("ImageButton", 50, 20, 60, 30 )
233 printlog "open the control property browser"
234 call fOpenControlPropertyBrowser
236 Kontext "ControlPropertiesTabControl"
237 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
240 printlog "set properties"
241 'to activate property: scale, following properties must be active: Graphics (with choosen path)
242 Kontext "TabGeneralControl"
243 if gNetzInst = false then
244 fsetControlProperty("ImageButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
246 fsetControlProperty("ImageButton","Graphics", gNetzOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
249 TabGeneralControl.TypeKeys "<RETURN>" , true
250 fsetControlProperty("ImageControl","Scale","1") 'listbox content: no
251 'fsetControlProperty("ImageControl","Frame","4")
252 '/// save the document
253 printlog "save the document"
254 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_ImageButton.odt"))
257 '/// reload and prepare the document
258 printlog "reload the document"
259 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_ImageButton.odt"))
261 call hToolbarSelect("MoreControls",true)
262 call hToolbarSelect("FormControls",true)
263 call fSwitchControlDesignMode
264 Kontext "DocumentWriter"
265 DocumentWriter.TypeKeys "<SHIFT F4>"
267 call fOpenControlPropertyBrowser
268 '/// check if property values are inserted
269 printlog "check if property values are inserted"
270 Kontext "TabGeneralControl"
271 dim bScrOK as boolean 'control variable if all properties are correct
273 if fgetControlProperty("ImageButton","Scale") <> "1" then
274 warnlog "the imagebutton is not saved with property: Frame"
277 'if fgetControlProperty("ImageButton","Frame") <> "4" then
278 'warnlog "the imagebutton is not saved with property: Frame"
281 if bScrOK = true then printlog "Imagebutton was saved correctly"
283 call closePropertyBrowserAndDocument()
286 '--------------------------------------------------------------------------------------
287 testcase tImageControl
289 '/// Open a new document,
290 printlog "Open a new document,"
292 Kontext "DocumentWriter"
293 DocumentWriter.TypeKeys "tt_doc" , true
295 call addControl("ImageControl", 50, 20, 60, 30 )
297 printlog "open the control property browser"
298 call fOpenControlPropertyBrowser
300 Kontext "ControlPropertiesTabControl"
301 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
304 printlog "set HelpURL"
305 fsetControlProperty("ImageControl","HelpURL","HID:1234567")
306 '/// save the document
307 printlog "save the document"
308 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_ImageControl.odt"))
311 '/// reload and prepare the document
312 printlog "reload the document"
313 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_ImageControl.odt"))
315 call hToolbarSelect("MoreControls",true)
316 call hToolbarSelect("FormControls",true)
317 call fSwitchControlDesignMode
318 Kontext "DocumentWriter"
319 DocumentWriter.TypeKeys "<SHIFT F4>"
321 call fOpenControlPropertyBrowser
322 '/// check if property values are inserted
323 printlog "check if property values are inserted"
324 Kontext "TabGeneralControl"
325 dim bScrOK as boolean 'control variable if all properties are correct
327 if fgetControlProperty("ImageControl","HelpURL") <> "HID:1234567" then
328 warnlog "the imagecontrol is not saved with property: HelpURL"
331 if bScrOK = true then printlog "Imagecontrol was saved correctly"
334 call closePropertyBrowserAndDocument()
337 '--------------------------------------------------------------------------------------
339 testcase tFileControl
341 '/// Open a new document,
342 printlog "Open a new document,"
344 Kontext "DocumentWriter"
345 DocumentWriter.TypeKeys "tt_doc" , true
347 call addControl("FileControl", 50, 20, 60, 30 )
349 printlog "open the control property browser"
350 call fOpenControlPropertyBrowser
352 Kontext "ControlPropertiesTabControl"
353 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
355 '/// set properties: border to flat, tabstop to no
356 printlog "set border to flat"
357 fsetControlProperty("FileControl","Border","3")
358 fsetControlProperty("FileControl","TabStop","1")
359 '/// save the document
360 printlog "save the document"
361 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_FileControl.odt"))
364 '/// reload the document
365 printlog "reload the document"
366 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_FileControl.odt"))
368 call hToolbarSelect("MoreControls",true)
369 call hToolbarSelect("FormControls",true)
370 call fSwitchControlDesignMode
371 Kontext "DocumentWriter"
372 DocumentWriter.TypeKeys "<SHIFT F4>"
374 call fOpenControlPropertyBrowser
375 '/// check if the values are saved
376 printlog "check if the values are saved"
378 Kontext "TabGeneralControl"
379 TabGeneralControl.TypeKeys "<TAB>" , true ' this tab is importent, I don't know why but it is.
380 if fgetControlProperty("FileControl","Border") <> "3" then
381 warnlog "the value border is not saved"
383 if fgetControlProperty("FileControl","TabStop") <> "1" then
384 warnlog "the value border is not saved"
387 call closePropertyBrowserAndDocument()
390 '--------------------------------------------------------------------------------------
394 '/// Open a new document,
395 printlog "Open a new document,"
397 Kontext "DocumentWriter"
398 DocumentWriter.TypeKeys "tt_doc" , true
400 call addControl("DateField", 50, 20, 60, 30 )
402 printlog "open the control property browser"
403 call fOpenControlPropertyBrowser
405 Kontext "ControlPropertiesTabControl"
406 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
408 '/// set DateMin to 09/09/2009 and DateMax to 10/10/2010
409 printlog "set DateMin to 09/09/2009 and DateMax to 10/10/2010"
410 if iSystemSprache = 01 then
411 fsetControlProperty("DateField","DateMin","09/09/2009")
412 fsetControlProperty("DateField","DateMax","10/10/2010")
413 elseif iSystemSprache = 49 then
414 fsetControlProperty("DateField","DateMin","09.09.2009")
415 fsetControlProperty("DateField","DateMax","10.10.2010")
417 '/// set date format, dropdown
418 printlog "set date format, date format"
419 fsetControlProperty("DateField","DateFormat","7") 'YY/MM/DD
420 printlog "set date format, dropdown"
421 fsetControlProperty("DateField","DropDown","2") 'yes
422 '/// save the document
423 printlog "save the document"
424 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_DateField.odt"))
427 '/// reload the document
428 printlog "reload the document"
429 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_DateField.odt"))
431 call hToolbarSelect("MoreControls",true)
432 call hToolbarSelect("FormControls",true)
433 call fSwitchControlDesignMode
434 Kontext "DocumentWriter"
435 DocumentWriter.TypeKeys "<SHIFT F4>"
437 call fOpenControlPropertyBrowser
438 '/// check if the values are saved
439 printlog "check if the values are saved"
441 Kontext "TabGeneralControl"
442 TabGeneralControl.TypeKeys "<TAB>" , true ' this tab is importent, I don't not why but it is.
443 if iSystemSprache = 01 then
444 if fgetControlProperty("DateField","DateMin") <> "09/09/2009" then
445 warnlog "the value date min is not saved"
447 if fgetControlProperty("DateField","DateMax") <> "10/10/2010" then
448 warnlog "the value date max is not saved"
450 elseif iSystemSprache = 49 then
451 if fgetControlProperty("DateField","DateMin") <> "09.09.2009" then
452 warnlog "the value date min is not saved"
454 if fgetControlProperty("DateField","DateMax") <> "10.10.2010" then
455 warnlog "the value date max is not saved"
458 if fgetControlProperty("DateField","DateFormat") <> "7" then
459 warnlog "the value date format is not saved"
461 if fgetControlProperty("DateField","DropDown") <> "2" then
462 warnlog "the value dropdown is not saved"
465 printlog " - testcase end"
467 call closePropertyBrowserAndDocument()
470 '--------------------------------------------------------------------------------------
474 '/// Open a new document,
475 printlog "Open a new document,"
477 Kontext "DocumentWriter"
478 DocumentWriter.TypeKeys "tt_doc" , true
480 call addControl("TimeField", 50, 20, 60, 30 )
482 printlog "open the control property browser"
483 call fOpenControlPropertyBrowser
485 Kontext "ControlPropertiesTabControl"
486 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
488 '/// set TimeMin to 09:09:09 and TimeMax to 10:10:10 and time format to 01:45 PM
489 printlog "set TimeMin to 09:09:09 and TimeMax to 10:10:10 and time format to 01:45 PM"
490 fsetControlProperty("TimeField","TimeMin","09:09:09")
491 fsetControlProperty("TimeField","TimeMax","10:10:10")
492 fsetControlProperty("TimeField","TimeFormat","3")
493 '/// save the document
494 printlog "save the document"
495 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_TimeField.odt"))
498 '/// reload the document
499 printlog "reload the document"
500 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_TimeField.odt"))
502 call hToolbarSelect("MoreControls",true)
503 call hToolbarSelect("FormControls",true)
504 call fSwitchControlDesignMode
505 Kontext "DocumentWriter"
506 DocumentWriter.TypeKeys "<SHIFT F4>"
508 call fOpenControlPropertyBrowser
509 '/// check if the values are saved
510 printlog "check if the values are saved"
512 Kontext "TabGeneralControl"
513 TabGeneralControl.TypeKeys "<TAB>" , true ' this tab is importent, I don't not why but it is.
514 if fgetControlProperty("TimeField","TimeMin") <> "09:09:09" then
515 warnlog "the value time min is not saved"
517 if fgetControlProperty("TimeField","TimeMax") <> "10:10:10" then
518 warnlog "the value time max is not saved"
520 if fgetControlProperty("TimeField","TimeFormat") <> "3" then
521 warnlog "the value time format is not saved"
524 printlog " - testcase end"
526 call closePropertyBrowserAndDocument()
529 '--------------------------------------------------------------------------------------
531 testcase tNumericField
533 '/// Open a new document,
534 printlog "Open a new document,"
536 Kontext "DocumentWriter"
537 DocumentWriter.TypeKeys "tt_doc" , true
539 call addControl("NumericField", 50, 20, 60, 30 )
541 printlog "open the control property browser"
542 call fOpenControlPropertyBrowser
544 Kontext "ControlPropertiesTabControl"
545 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
547 '/// set properties: spinbutton, Strict format, Thousands seperator
548 printlog "set properties: spinbutton, Default value, Strict format, Tabstop, Thousands seperator"
549 fsetControlProperty("NumericField","StrictFormat","2") 'yes
550 fsetControlProperty("NumericField","ThousandSeperator","2") 'yes
551 fsetControlProperty("NumericField","Spin","2") 'yes
552 fsetControlProperty("NumericField","ValueStep","6")
553 '/// save the document
554 printlog "save the document"
555 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_NumericField.odt"))
558 '/// reload and prepare the document
559 printlog "reload the document"
560 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_NumericField.odt"))
562 call hToolbarSelect("MoreControls",true)
563 call hToolbarSelect("FormControls",true)
564 call fSwitchControlDesignMode
565 Kontext "DocumentWriter"
566 DocumentWriter.TypeKeys "<SHIFT F4>"
568 call fOpenControlPropertyBrowser
569 '/// check if property values are inserted
570 printlog "check if property values are inserted"
571 Kontext "TabGeneralControl"
572 dim bScrOK as boolean 'control variable if all properties are correct
574 if fgetControlProperty("NumericField","StrictFormat") <> "2" then
575 warnlog "the NumericField is not saved with property: StrictFormat"
578 if fgetControlProperty("NumericField","ThousandSeperator") <> "2" then
579 warnlog "the NumericField is not saved with property: ThousandSeperator"
582 if fgetControlProperty("NumericField","Spin") <> "2" then
583 warnlog "the NumericField is not saved with property: Spin"
586 '(spin field - cannot be read out)
587 'if fgetControlProperty("NumericField","ValueStep") <> "2" then
588 'warnlog "the NumericField is not saved with property: Value Step"
591 if bScrOK = true then printlog "Numeric field was saved correctly"
594 call closePropertyBrowserAndDocument()
597 '--------------------------------------------------------------------------------------
599 testcase tCurrencyField
601 '/// Open a new document,
602 printlog "Open a new document,"
604 Kontext "DocumentWriter"
605 DocumentWriter.TypeKeys "tt_doc" , true
607 call addControl("CurrencyField", 50, 20, 60, 30 )
609 printlog "open the control property browser"
610 call fOpenControlPropertyBrowser
612 Kontext "ControlPropertiesTabControl"
613 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
615 '/// set valueStep to 5 and prefix symbol to yes and current symbol to zoq
616 printlog "set valueStep to 5 and prefix symbol to yes and current symbol to zoq"
617 fsetControlProperty("CurrencyField","CurrSymPosition","2")
618 fsetControlProperty("CurrencyField","ValueStep","5")
619 fsetControlProperty("CurrencyField","CurrencySymbol","nin")
620 fsetControlProperty("CurrencyField","Accuracy","3")
621 '/// save the document
622 printlog "save the document"
623 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_CurrencyField.odt"))
626 '/// reload the document
627 printlog "reload the document"
628 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_CurrencyField.odt"))
630 call hToolbarSelect("MoreControls",true)
631 call hToolbarSelect("FormControls",true)
632 call fSwitchControlDesignMode
633 Kontext "DocumentWriter"
634 DocumentWriter.TypeKeys "<SHIFT F4>"
636 call fOpenControlPropertyBrowser
637 '/// check if the values are saved
638 printlog "check if the values are saved"
640 Kontext "TabGeneralControl"
641 TabGeneralControl.TypeKeys "<TAB>" , true ' this tab is importent, I don't not why but it is.
642 if fgetControlProperty("CurrencyField","CurrSymPosition") <> "2" then
643 warnlog "the prefix symbol is not saved"
645 if fgetControlProperty("CurrencyField","ValueStep") <> "5" then
646 warnlog "the value step is not saved"
648 if fgetControlProperty("CurrencyField","CurrencySymbol") <> "nin" then
649 warnlog "the CurrencySymbol is not saved"
651 '(spin field - cannot be read out)
652 'if fgetControlProperty("CurrencyField","Accuracy") <> "3" then
653 'warnlog "the CurrencySymbol is not saved"
656 printlog " - testcase end"
658 call closePropertyBrowserAndDocument()
661 '--------------------------------------------------------------------------------------
663 testcase tPatternField
665 '/// Open a new document,
666 printlog "Open a new document,"
668 Kontext "DocumentWriter"
669 DocumentWriter.TypeKeys "tt_doc" , true
671 call addControl("PatternField", 50, 20, 60, 30 )
673 printlog "open the control property browser"
674 call fOpenControlPropertyBrowser
676 Kontext "ControlPropertiesTabControl"
677 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
679 '/// set properties: Readonly, Edit mask, Literal mask, Order
680 printlog "set properties: Readonly, Edit mask, Literal mask, Order"
681 fsetControlProperty("PatternField","Readonly","2")
682 fsetControlProperty("PatternField","EditMask","oxox")
683 fsetControlProperty("PatternField","LiteralMask","ooxoo")
684 fsetControlProperty("PatternField","Order","7")
685 '/// save the document
686 printlog "save the document"
687 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_PatternField.odt"))
690 '/// reload the document
691 printlog "reload the document"
692 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_PatternField.odt"))
694 call hToolbarSelect("MoreControls",true)
695 call hToolbarSelect("FormControls",true)
696 call fSwitchControlDesignMode
697 Kontext "DocumentWriter"
698 DocumentWriter.TypeKeys "<SHIFT F4>"
700 call fOpenControlPropertyBrowser
701 '/// check if the values are saved
702 printlog "check if the values are saved"
704 Kontext "TabGeneralControl"
705 TabGeneralControl.TypeKeys "<TAB>" , true ' this tab is importent, I don't not why but it is.
706 if fgetControlProperty("PatternField","Readonly") <> "2" then
707 warnlog "the value readonly is not saved"
709 if fgetControlProperty("PatternField","EditMask") <> "oxox" then
710 warnlog "the value EditMask is not saved"
712 if fgetControlProperty("PatternField","LiteralMask") <> "ooxoo" then
713 warnlog "the value LiteralMask is not saved"
715 if fgetControlProperty("PatternField","Order") <> "7" then
716 warnlog "the value Order is not saved"
719 printlog " - testcase end"
721 call closePropertyBrowserAndDocument()
724 '--------------------------------------------------------------------------------------
728 '/// Open a new document,
729 printlog "Open a new document,"
731 Kontext "DocumentWriter"
732 DocumentWriter.TypeKeys "tt_doc" , true
734 addControl("GroupBox", 50, 20, 60, 30 )
736 printlog "open the control property browser"
737 call fOpenControlPropertyBrowser
739 Kontext "ControlPropertiesTabControl"
740 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
741 '/// set properties: Label, Character set
742 printlog "set properties"
743 Kontext "TabGeneralControl"
744 TabGeneralControl.TypeKeys "<TAB>",TRUE 'label
745 TabGeneralControl.TypeKeys "Changed label name",TRUE
746 CharacterSetButton.Click 'character set
749 TabFont.TypeKeys "<DOWN>",TRUE
751 '/// save the document
752 printlog "save the document"
753 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_GroupBox.odt"))
756 '/// reload and prepare the document
757 printlog "reload the document"
758 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_GroupBox.odt"))
760 call hToolbarSelect("MoreControls",true)
761 call hToolbarSelect("FormControls",true)
762 call fSwitchControlDesignMode
763 Kontext "DocumentWriter"
764 DocumentWriter.TypeKeys "<SHIFT F4>"
766 call fOpenControlPropertyBrowser
767 '/// check if property values are inserted
768 printlog "check if property values are inserted"
769 Kontext "TabGeneralControl"
770 TabGeneralControl.TypeKeys "<TAB>" , true
771 TabGeneralControl.TypeKeys "<MOD1 C>" , true
772 if getclipboard() <> "Changed label name" then
773 warnlog "Property: Label is not saved correctly"
775 'printlog "property character set text: " & CharacterSet.getText
776 if CharacterSet.getText = "" then
777 warnlog "Property: Character set is not saved correctly"
780 printlog " - testcase end"
782 call closePropertyBrowserAndDocument()
785 '--------------------------------------------------------------------------------------
787 testcase tTableControl
789 '/// Open a new document,
790 printlog "Open a new document,"
792 Kontext "DocumentWriter"
793 DocumentWriter.TypeKeys "tt_doc" , true
795 call addControl("Grid", 50, 20, 60, 30 )
797 printlog "open the control property browser"
798 call fOpenControlPropertyBrowser
800 Kontext "ControlPropertiesTabControl"
801 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
803 '/// set properties: Navigation bar, Record marker, Row high
804 printlog "set properties"
805 fsetControlProperty("TableControl","NavigationBar","1") 'listbox content: no
806 fsetControlProperty("TableControl","RecordMarker","1") 'listbox content: no
807 fsetControlProperty("TableControl","RowHeight","5")
808 '/// save the document
809 printlog "save the document"
810 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_TableControl.odt"))
813 '/// reload and prepare the document
814 printlog "reload the document"
815 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_TableControl.odt"))
817 call hToolbarSelect("MoreControls",true)
818 call hToolbarSelect("FormControls",true)
819 call fSwitchControlDesignMode
820 Kontext "DocumentWriter"
821 DocumentWriter.TypeKeys "<SHIFT F4>"
823 call fOpenControlPropertyBrowser
824 '/// check if property values are inserted
825 printlog "check if property values are inserted"
826 Kontext "TabGeneralControl"
827 dim bScrOK as boolean 'control variable if all properties are correct
829 if fgetControlProperty("TableControl","NavigationBar") <> "1" then
830 warnlog "the imagebutton is not saved with property: NavigationBar"
833 if fgetControlProperty("TableControl","RecordMarker") <> "1" then
834 warnlog "the imagebutton is not saved with property: RecordMarker"
837 if fgetControlProperty("TableControl","RowHeight") = "" then
838 warnlog "the imagebutton is not saved with property: RowHeight"
841 if bScrOK = true then printlog "TableControl was saved correctly"
844 call closePropertyBrowserAndDocument()
847 '--------------------------------------------------------------------------------------
849 testcase tNavigationBar
851 '/// Open a new document,
852 printlog "Open a new document,"
854 Kontext "DocumentWriter"
855 DocumentWriter.TypeKeys "tt_doc" , true
857 call addControl("NavigationBar", 50, 20, 60, 30 )
859 printlog "open the control property browser"
860 call fOpenControlPropertyBrowser
862 Kontext "ControlPropertiesTabControl"
863 ControlPropertiesTabControl.setPage TabGeneralControl 'make shure that tabpage general in property is choosen
865 '/// set properties: IconSize, Positioning, Navigation, RecordActions, FilteringSorting
866 printlog "set properties"
867 fsetControlProperty("NavigationBar","IconSize","2") 'listbox content: large
868 fsetControlProperty("NavigationBar","Positioning","1") 'listbox content: no
869 fsetControlProperty("NavigationBar","Navigation","1") 'listbox content: no
870 fsetControlProperty("NavigationBar","RecordActions","1") 'listbox content: no
871 fsetControlProperty("NavigationBar","FilteringSorting","1") 'listbox content: no
872 '/// save the document
873 printlog "save the document"
874 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_NavigationBar.odt"))
877 '/// reload and prepare the document
878 printlog "reload the document"
879 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_NavigationBar.odt"))
881 call hToolbarSelect("MoreControls",true)
882 call hToolbarSelect("FormControls",true)
883 call fSwitchControlDesignMode
884 Kontext "DocumentWriter"
885 DocumentWriter.TypeKeys "<SHIFT F4>"
887 call fOpenControlPropertyBrowser
888 '/// check if property values are inserted
889 printlog "check if property values are inserted"
890 Kontext "TabGeneralControl"
891 dim bScrOK as boolean 'control variable if all properties are correct
893 if fgetControlProperty("NavigationBar","IconSize") <> "2" then
894 warnlog "the NavigationBar is not saved with property: IconSize"
897 if fgetControlProperty("NavigationBar","Positioning") <> "1" then
898 warnlog "the NavigationBar is not saved with property: Positioning"
901 if fgetControlProperty("NavigationBar","Navigation") <> "1" then
902 warnlog "the NavigationBar is not saved with property: Navigation"
905 if fgetControlProperty("NavigationBar","RecordActions") <> "1" then
906 warnlog "the NavigationBar is not saved with property: RecordActions"
909 if fgetControlProperty("NavigationBar","FilteringSorting") <> "1" then
910 warnlog "the NavigationBar is not saved with property: FilteringSorting"
913 if bScrOK = true then printlog "NavigationBar was saved correctly"
916 call closePropertyBrowserAndDocument()
919 '--------------------------------------------------------------------------------------
920 '--------------------------------------------------------------------------------------
924 'make shure that design mode is not off, else switch on
925 function fSwitchOn_DesignMode
926 Kontext "FormControls"
930 SwitchControlDesignMode.Click