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_PropertyBrowser.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 : Property Browser
38 '\***********************************************************************
40 sub ctrl_PropertyBrowser
51 '--------------------------------------------------------------------------------------
54 call sCloseAllToolbars
56 '/// Open a new document
57 printlog "Open a new document"
59 Kontext "DocumentWriter"
60 DocumentWriter.TypeKeys "tt_doc" , true
63 call hToolbarSelect("FormControls",true)
65 Kontext "FormControls"
68 '/// insert a Push Button
69 printlog "insert a Push Button"
70 call hDrawingWithSelection ( 50, 20, 60, 30 )
72 Kontext "FormControls"
73 ControlProperties.Click
75 '/// change Buttontype to URL
76 printlog "change Buttontype to URL"
77 Kontext "TabGeneralControl"
78 fsetControlProperty("PushButton","ButtonType", "4")
79 '/// check if the URLField property is enabled
80 printlog "check if the URLField property is enabled"
81 if NOT URL.isEnabled then
82 warnlog "The URL fields doesn't gets enabled"
84 '/// add url to URLField
85 printlog "add url to URLField"
86 fsetControlProperty("PushButton","URL", "http://www.sun.com")
87 Kontext "TabGeneralControl"
88 TabGeneralControl.typekeys("<RETURN>",true)
89 '/// check if the Frame property is enabled
90 printlog "check if the Frame property is enabled"
91 if NOT Frame.isEnabled then
92 warnlog "The Frame fields doesn't gets enabled"
95 '/// add graphicfile to URLField
96 printlog "add graphicfile to URLField"
97 fsetControlProperty("PushButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
98 '/// check if the GraphicsAlignment property is enabled
99 printlog "check if the GraphicsAlignment property is enabled"
100 if NOT GraphicsAlignment.isEnabled then
101 warnlog "The GraphicsAlignment doesn't gets enabled"
103 '/// close the controlproperty browser
104 Kontext "ControlPropertiesDialog"
105 ControlPropertiesDialog.close
110 '--------------------------------------------------------------------------------------
113 call sCloseAllToolbars
115 '/// Open a new document,
116 printlog "Open a new document,"
118 Kontext "DocumentWriter"
119 DocumentWriter.TypeKeys "tt_doc" , true
122 call hToolbarSelect("FormControls",true)
124 Kontext "FormControls"
127 '/// insert a text box
128 printlog "insert a text box"
129 call hDrawingWithSelection ( 50, 20, 60, 30
131 Kontext "FormControls"
132 ControlProperties.Click
134 '/// change the propety multiline to yes
135 printlog "change the propety multiline to yes"
136 fsetControlProperty("TextBox","TextType","2")
137 '/// check if the scrollbars property is enabled
138 printlog "check if the scrollbars property is enabled"
139 if NOT Scrollbars.isEnabled then
140 warnlog "The scrollbars doesn't gets enabled"
142 '/// check if the password char is enabled
143 printlog "check if the password char is enabled"
144 if Password.isEnabled then
145 warnlog "The pasword is enabled ( issue 29477 ) "
148 '/// change the propety multiline to no
149 printlog "change the propety multiline to no"
150 fsetControlProperty("TextBox","TextType","1")
151 '/// check if the scrollbars property is disabled
152 printlog "check if the scrollbars property is disabled"
153 if Scrollbars.isEnabled then
154 warnlog "The scrollbars is enabled"
156 '/// check if the password char is disabled
157 printlog "check if the password char is disabled"
158 if NOT Password.isEnabled then
159 warnlog "The pasword doesn't gets enabled"
161 '/// close the controlproperty browser
162 Kontext "ControlPropertiesDialog"
163 ControlPropertiesDialog.close
164 '/// close the document
165 printlog "close the document"
170 '--------------------------------------------------------------------------------------
173 call sCloseAllToolbars
175 '/// Open a new document,
176 printlog "Open a new document,"
178 Kontext "DocumentWriter"
179 DocumentWriter.TypeKeys "tt_doc" , true
182 call hToolbarSelect("FormControls",true)
184 Kontext "FormControls"
189 '/// insert a list box
190 printlog "insert a list box"
191 call hDrawingWithSelection ( 50, 20, 60, 30
193 Kontext "FormControls"
194 ControlProperties.Click
196 '/// change the property DropDown to yes
197 printlog "change the propety multiline to yes"
198 fsetControlProperty("ListBox","DropDown","2")
199 '/// check if the scrollbars property is enabled
200 printlog "check if the LineCount property is enabled"
201 if NOT LineCount.isEnabled then
202 warnlog "The LineCount doesn't gets enabled"
206 '/// change the propety multiline to no
207 printlog "change the propety multiline to no"
208 fsetControlProperty("ListBox","DropDown","1")
209 '/// check if the scrollbars property is disabled
210 printlog "check if the LineCount property is disabled"
211 if LineCount.isEnabled then
212 warnlog "The LineCount is enabled"
215 Kontext "FormControls"
217 '/// close the controlproperty browser
218 Kontext "ControlPropertiesDialog"
219 ControlPropertiesDialog.close
220 '/// close the document
221 printlog "close the document"
226 '--------------------------------------------------------------------------------------
229 call sCloseAllToolbars
231 '/// Open a new document,
232 printlog "Open a new document,"
234 Kontext "DocumentWriter"
235 DocumentWriter.TypeKeys "tt_doc" , true
238 call hToolbarSelect("FormControls",true)
240 Kontext "FormControls"
245 '/// insert a list box
246 printlog "insert a list box"
247 call hDrawingWithSelection ( 50, 20, 60, 30
249 Kontext "FormControls"
250 ControlProperties.Click
252 '/// change the property DropDown to yes
253 printlog "change the propety multiline to yes"
254 fsetControlProperty("ComboBox","DropDown","2")
255 '/// check if the scrollbars property is enabled
256 printlog "check if the LineCount property is enabled"
257 if NOT LineCount.isEnabled then
258 warnlog "The LineCount doesn't gets enabled"
262 '/// change the propety multiline to no
263 printlog "change the propety multiline to no"
264 fsetControlProperty("ComboBox","DropDown","1")
265 '/// check if the scrollbars property is disabled
266 printlog "check if the LineCount property is disabled"
267 if LineCount.isEnabled then
268 warnlog "The LineCount is enabled"
271 Kontext "FormControls"
273 '/// close the controlproperty browser
274 Kontext "ControlPropertiesDialog"
275 ControlPropertiesDialog.close
276 '/// close the document
277 printlog "close the document"
282 '--------------------------------------------------------------------------------------
283 testcase tImageButton
285 call sCloseAllToolbars
287 '/// Open a new document,
288 printlog "Open a new document,"
290 Kontext "DocumentWriter"
291 DocumentWriter.TypeKeys "tt_doc" , true
294 call hToolbarSelect("MoreControls",true)
296 Kontext "MoreControls"
299 '/// insert an image control
300 printlog "insert an image control"
301 call hDrawingWithSelection ( 50, 20, 60, 30
303 call hToolbarSelect("FormControls",true)
304 Kontext "FormControls"
305 ControlProperties.Click
307 '/// change the property ButtonType to URL
308 fsetControlProperty("ImagesButton","ButtonType", "4")
309 '/// check if the URL property is enabled
310 if NOT URL.isEnabled then
311 warnlog "The URL fields doesn't gets enabled"
313 '/// add url to URLField
314 printlog "add url to URLField"
316 'fsetControlProperty("ImagesButton","URL", "www.sun.com")
317 fsetControlProperty("ImagesButton","URL", "http://www.sun.com")
318 Kontext "TabGeneralControl"
319 TabGeneralControl.typekeys("<RETURN>",true)
320 '/// check if the Frame property is enabled
321 printlog "check if the Frame property is enabled"
322 if NOT Frame.isEnabled then
323 warnlog "The Frame fields doesn't gets enabled"
326 '/// add graphicfile to GraphicField
327 fsetControlProperty("ImagesButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
328 '/// check if the GraphicsAlignment property is enabled
329 printlog "check if the Scale property is enabled"
330 if NOT Scale.isEnabled then
331 warnlog "The Scale doesn't gets enabled"
333 '/// close the controlproperty browser
334 Kontext "ControlPropertiesDialog"
335 ControlPropertiesDialog.close
340 '--------------------------------------------------------------------------------------
341 testcase tImageControl
343 call sCloseAllToolbars
345 '/// Open a new document,
346 printlog "Open a new document,"
348 Kontext "DocumentWriter"
349 DocumentWriter.TypeKeys "tt_doc" , true
352 call hToolbarSelect("MoreControls",true)
353 Kontext "MoreControls"
357 '/// insert an image control
358 printlog "insert an image control"
359 call hDrawingWithSelection ( 50, 20, 60, 30
361 call hToolbarSelect("FormControls",true)
362 Kontext "FormControls"
363 ControlProperties.Click
365 '/// add graphicfile to GraphicField
366 printlog "add graphicfile to GraphicField"
367 fsetControlProperty("ImagesButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
368 '/// check if the Scale property is enabled
369 printlog "check if the Scale property is enabled"
370 if NOT Scale.isEnabled then
371 warnlog "The Scale doesn't gets enabled"
373 '/// close the controlproperty browser
374 Kontext "ControlPropertiesDialog"
375 ControlPropertiesDialog.close
380 '--------------------------------------------------------------------------------------
383 call sCloseAllToolbars
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 Push Button
398 printlog "insert a Push Button"
399 call hDrawingWithSelection ( 50, 20, 60, 30
401 Kontext "FormControls"
405 Kontext "FormPropertiesDialog"
406 FormPropertiesTabControl.setPage TabGeneralForm
408 Kontext "TabGeneralForm"
409 '/// set encoding to Multipart
410 printlog "set encoding to Multipart"
412 '/// check if the SubmitMethod get enabled
413 printlog "check if the SubmitMethod get enabled"
414 if SubmitMethod.isEnabled then
415 warnlog "The SubmitMethod fields doesn't gets enabled"
417 '/// set encoding to URL
418 printlog "set encoding to URL"
420 '/// check if the SubmitMethod get disabled
421 printlog "check if the SubmitMethod get disabled"
422 if NOT SubmitMethod.isEnabled then
423 warnlog "The SubmitMethod fields doesn't gets disabled"
428 'URL.setText("www.sun.com")
429 URL.setText("http://www.sun.com")
430 TabGeneralForm.TypeKeys("<RETURN>")
431 '/// check if the frame property gets enabled
432 printlog "check if the frame property gets enabled"
433 if NOT Frame.isEnabled then
434 warnlog "The frame fields doesn't gets enabled"
437 Kontext "FormPropertiesDialog"
438 FormPropertiesTabControl.setPage TabDataForm
440 Kontext "TabDataForm"
441 '/// select first datasource
442 printlog "select first datasource"
445 '/// select SQL Command as Type
446 printlog "select SQL Command as Type"
449 '/// check if the SQL Design button gets enabled
450 printlog "check if the SQL Design button gets enabled"
451 if OpenQueryDesign.isenabled then
452 '/// open the query design with the button
453 printlog "open the query design with the button"
454 OpenQueryDesign.click
456 '/// check if the querydesign open
457 printlog "check if the querydesign open"
458 Kontext "QueryDesignTable"
459 if NOT QueryDesignTable.exists(3) then
460 warnlog "The Query Design doesn't open."
464 Kontext "QueryDesignTable"
465 QueryDesignTable.UseMenu
470 warnlog "the openQueryDesign button is not enabled"
472 Kontext "TabDataForm"
473 printlog "select table as Type"
476 Content.setText("biblio")
478 TabDataForm.TypeKeys "<RETURN>" , true
480 '/// close the FormProperty Browser
481 printlog "close the FormProperty Browser"
482 Kontext "ControlPropertiesDialog"
483 ControlPropertiesDialog.close
485 '/// open the form property browser
486 printlog "open the form property browser"
487 Kontext "FormControls"
491 Kontext "FormPropertiesDialog"
492 FormPropertiesTabControl.setPage TabDataForm
494 '/// click on the filter button
495 Kontext "TabDataForm"
496 FilterDLGButton.Click
497 '/// check if the filter dialog appear
498 Kontext "FilterDialog"
501 '/// click on the sort button
502 Kontext "TabDataForm"
504 '/// check if the sort dialog appear
508 '/// close the controlproperty browser
509 Kontext "ControlPropertiesDialog"
510 ControlPropertiesDialog.close