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: fontworkgallery.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:14 $
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 : thorsten.bosbach@sun.com
36 '* short description : Resource test of font work gallery
38 '\************************************************************************
40 sub sFontworkGalleryUpdate
44 sApplication = array("WRITER","MASTERDOCUMENT","CALC","IMPRESS","DRAW")
46 ' for every application
47 a = uBound(sApplication())
49 gApplication = sApplication(i)
50 printlog "********** " + gApplication
51 tFontworkGalleryUpdate
55 testcase tFontworkGalleryUpdate
58 'i67024 - tbo sj Help-IDs missing on the windows items for FontworkAlignment and FontworkCharacterSpacing
59 'i66989 - tbo sj Fontwork Gallery control has no Help-ID
60 '/// close all applications, exept the backingwindow, to make sure the right toolbar is used by TestTool ///'
63 printlog "closing: " + j
66 '/// open new application window ///'
69 '/// if toolbar 'Drawing' is not visible, open it by View - Toolbars - Drawing ///'
71 if NOT Drawbar.exists then
72 hToolbarSelect("DRAWING",true)
73 printlog "opened drawing toolbar"
75 if Drawbar.exists then
76 '/// Click button 'Fontwork Gallery' on toolbar 'Drawing' ///'
79 Kontext "FontworkGallery"
80 '/// the dialog 'Fontwork Gallery' has to come up ///'
81 dialogtest(FontworkGallery)
82 '/// In the dialog 'Fontwork Gallery' type key <cursor right> ///'
83 FontworkGallery.typeKeys("<right>", true)
84 '/// In the dialog 'Fontwork Gallery' press and release right mouse button in the middle of the dialog ///'
85 FontworkGallery.mousedown(50,50)
86 FontworkGallery.mouseup(50,50)
87 '/// on the dialog 'Fontwork Gallery' press button OK ///'
90 '/// an Fontwork object will be inserted now ///'
92 '/// The toolbar 'Fontwork' has to come up///'
93 Kontext "FontworkObjectbar"
94 if FontworkObjectbar.exists then
95 '/// On the toolbar 'Fontwork' click the button 'Fontwork Gallery' ///'
97 '/// dialog 'Fontwork Gallery' has to come up ///'
98 Kontext "FontworkGallery"
99 dialogtest(FontworkGallery)
100 '/// close dialog 'Fontwork Gallery' by clicking CANCEL button ///'
101 FontworkGallery.cancel
103 Kontext "FontworkObjectbar"
104 '/// On the toolbar 'Fontwork' click the button 'Fontwork Shape' ///'
106 '/// toolbar 'Fontwork Shape' has to come up ///'
107 Kontext "FontworkShape"
108 '/// press button 'Plain Text' on toolbar 'Fontwork Shape' ///'
111 Kontext "FontworkObjectbar"
112 '/// On the toolbar 'Fontwork' click the button 'Fontwork Same Letter Heights' ///'
113 FontworkSameLetterHeights.click
116 Kontext "FontworkObjectbar"
117 '/// On the toolbar 'Fontwork' click the button 'Fontwork Alignment' ///'
118 FontworkAlignment.click
119 Kontext "FontworkAlignment"
120 if FontworkAlignment.exists(5) then
121 dialogtest(FontworkAlignment)
122 FontworkAlignment.close
124 printlog "beginning workaround lockup"
128 Kontext "FontworkObjectbar"
129 FontworkAlignment.click
130 Kontext "FontworkAlignment"
131 if FontworkAlignment.exists(5) then
132 dialogtest(FontworkAlignment)
133 FontworkAlignment.close
135 warnlog "FontworkAlignment dialog not visible"
139 Kontext "FontworkObjectbar"
140 '/// On the toolbar 'Fontwork' click the button 'Fontwork Character Spacing' ///'
141 FontworkCharacterSpacing.click
142 '/// toolbox 'Fontwork Character Spacing' has to come up ///'
143 Kontext "FontworkCharacterSpacing"
144 if FontworkCharacterSpacing.exists(5) then
145 'dialogtest(FontworkCharacterSpacing)
146 '/// try to select the entry 'Custom ...' with keys, since Help Ids are missing ///'
147 FontworkCharacterSpacing.typeKeys ("<down><down><down><down><down><return>")
148 '/// dialog 'Fontwork Character Spacing' has to come up ///'
149 Kontext "FontworkCharacterSpacingCustom"
150 if FontworkCharacterSpacingCustom.exists(5) then
151 dialogtest(FontworkCharacterSpacingCustom)
152 printlog value.getText
153 '/// close dialog 'Fontwork Character Spacing' ///'
154 FontworkCharacterSpacingCustom.close
156 printlog "dialog FontworkCharacterSpacingCustom didn't came up"
158 Kontext "FontworkCharacterSpacing"
159 if FontworkCharacterSpacing.exists(5) then
160 '/// close dialog 'Fontwork Character Spacing' ///'
161 FontworkCharacterSpacing.close
163 printlog "dialog FontworkCharacterSpacing was closed in another way"
166 warnlog "fontWork characterspacing drop down menu is not visible"
169 warnlog "fontWork toolbar is not visible"
172 warnlog "Draw toolbar is not visible"