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: i_us2_present.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $
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 : wolfram.garten@sun.com
36 '* short description : Impress User-Scenario: Beginner makes presentation.
38 '***************************************************************************
41 '\**************************************************************************
45 dim Result1, Result2 as integer
46 dim iPictures as integer
47 dim PresentationFile1 as string
48 PresentationFile1 = (ConvertPath (gOfficePath + "user\work\PwrPres1.odp"))
49 kontext "DocumentImpress"
50 printlog "New - Wizard - Presentation."
51 FileAutopilotPresentation
52 printlog "Called File-Autopilot-Presentation."
53 printlog "Create from Template"
54 kontext "AutoPilotPraesentation1"
56 'This part is for language-indepencancy
58 TemplateRegion.Select (1)
59 printlog "Choose a Presentation"
60 TemplateList.Select (2)
62 TemplateRegion.Select (1)
63 if TemplateList.GetItemCount < 40 then
64 TemplateRegion.Select (2)
65 if TemplateList.GetItemCount < 40 then
66 TemplateRegion.Select (3)
67 if TemplateList.GetItemCount < 40 then
68 Warnlog " No Templates selectable in the wizard. Please check."
73 printlog "Choose a Presentation"
74 TemplateList.Select (4)
83 printlog " Switched to the second Wizard-page."
85 printlog "Presentations"
86 kontext "AutoPilotPraesentation2"
87 printlog "Output: Screen"
88 if gOOO = TRUE then 'OpenOffice.org
90 if Backgroundchoice.GetItemCount < 2 then
92 if Backgroundchoice.GetItemCount = 0 then
93 Warnlog " No Backgrounds selectable in the wizard. Please check."
97 Backgroundchoice.Select (2)
100 if Backgroundchoice.GetItemCount < 10 then
101 Background.Select (2)
102 if Backgroundchoice.GetItemCount < 10 then
103 Background.Select (3)
104 if Backgroundchoice.GetItemCount < 10 then
105 Warnlog " No Backgrounds selectable in the wizard. Please check."
110 Backgroundchoice.Select (5)
116 printlog " Switched to the third Wizard-page."
118 kontext "AutoPilotPraesentation3"
119 printlog "Random Effect. Random Speed. Click through every choice."
124 Timebutton.SetText "00:00:15"
125 Break.SetText "00:00:20"
130 printlog " Switched to the fourth Wizard-page."
132 kontext "AutoPilotPraesentation4"
133 printlog "Fill in some company-name-subject-text"
134 AddName.SetText "Lala1"
135 AddTopic.SetText "Lala2"
136 Askinformation.SetText "Lala3"
139 printlog " Switched to the fifth Wizard-page."
141 kontext "AutoPilotPraesentation5"
145 AutoPilotPraesentation5.OK
148 printlog " Pressed 'Create'."
149 printlog "Add a Slide via Insert - Slide."
150 Kontext "DocumentImpress"
151 hTypeKeys "What we will talk about"
153 Kontext "DocumentImpress"
154 DocumentImpress.UseMenu
160 SlidesControl.TypeKeys "<HOME><RETURN>"
161 kontext "DocumentImpress"
162 DocumentImpress.TypeKeys "<TAB>Text we just wrote..."
163 printlog "Switch to the second slide."
165 SlidesControl.TypeKeys "<DOWN><RETURN>"
166 SlidesControl.TypeKeys "<RETURN>"
167 kontext "DocumentImpress"
168 printlog "Insert three lines with text, all with different formatting."
169 call hTextrahmenErstellen ("First line with text",20,50,70,50)
170 call hTextrahmenErstellen ("Second line with text",20,60,70,60)
171 call hTextrahmenErstellen ("Third line with text",20,70,70,70)
172 printlog "Go down to the eleventh slide."
174 SlidesControl.TypeKeys "<HOME>"
175 SlidesControl.TypeKeys "<PAGEDOWN>", 10
176 SlidesControl.TypeKeys "<RETURN>"
177 printlog "Insert Smiley, + two circles around the eyes, + two new pupils,"
178 printlog "placed at some interesteing place inside the circles."
182 kontext "SymbolShapes"
183 SymbolShapesSmiley.Click
185 kontext "DrawingObjectbar"
186 AreaFilling.TypeKeys "<HOME>"
187 AreaFilling.TypeKeys "<DOWN>", 10
188 printlog "Select (11) 'Lime-Green"
189 AreaFilling.TypeKeys "<RETURN>"
191 gMouseMove (53,50,90,80)
194 kontext "SymbolShapes"
196 Kontext "DocumentImpress"
197 gMouseMove (60,43,70,65)
201 gMouseMove (65,57,69,63)
205 gMouseMove (70,50,82,65)
209 gMouseMove (77,57,80,63)
213 printlog "Insert new slide."
215 printlog "get to the last slide."
216 SlidesControl.TypeKeys "<PAGEDOWN>", 15
217 SlidesControl.TypeKeys "<RETURN>"
218 printlog "Delete the two fields the stylist has."
219 kontext "DocumentImpress"
222 DocumentImpress.TypeKeys "<DELETE>"
223 printlog "Insert-Picture-From File. (some crazy picture which fits the theme)"
224 InsertGraphicsFromFile
225 Kontext "GrafikEinfuegenDlg"
226 printlog "Open graphic"
227 Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\ball.eps")
230 printlog "Add a text above the picture. 'There is movement..."
231 call hTextrahmenErstellen ("There is movement...",20,20,70,30)
233 printlog "Add a new slide."
235 printlog " Inserted new slide."
236 kontext "DocumentImpress"
238 DocumentImpress.TypeKeys "<DELETE>"
239 printlog "Bla bla about everything..."
240 call hTextrahmenErstellen ("Bla bla about everything...",20,20,70,30)
242 printlog "Add a new slide."
244 printlog " Inserted new slide."
245 kontext "DocumentImpress"
247 DocumentImpress.TypeKeys "<DELETE>"
248 printlog "Write text: Q & A"
249 call hTextrahmenErstellen ("Q & A",20,20,70,30)
250 DocumentImpress.TypeKeys "<SHIFT HOME>"
253 printlog "Add a new slide."
255 kontext "DocumentImpress"
257 DocumentImpress.TypeKeys "<DELETE>"
258 printlog "Thanks for listening, time for coffee... (ending)"
259 call hTextrahmenErstellen ("Class dismissed...",20,20,70,30)
261 printlog "Save Document"
262 call hFileSaveAsKill (PresentationFile1)
263 printlog "OK saved at ", PresentationFile1
266 printlog "Close Document"
270 '------------------------------------------------------------------------------
273 qaerrorlog "not yet ready."
275 dim Result1, Result2 as integer
276 dim iPictures as integer
277 dim PresentationFile1, PresentationFile2, PresentationFileToBeLoaded as string
278 PresentationFile1 = (ConvertPath (gTesttoolPath + "graphics\required\input\rightfont.odp"))
279 PresentationFile2 = (ConvertPath (gOfficePath + "user\work\xxxxxx9.odp"))
280 kontext "DocumentImpress"
281 printlog "New - Wizard - Presentation"
282 FileAutopilotPresentation
283 printlog " Called File-Autopilot-Presentation."
284 printlog "Create from Template"
285 kontext "AutoPilotPraesentation1"
286 EmptyPresentation.Check
287 AutoPilotPraesentation1.TypeKeys "<DOWN>"
289 AutoPilotPraesentation1.TypeKeys "<DOWN>"
290 if Existingpresentation.IsChecked(5) then
291 printlog " Pressing down worked fine"
293 warnlog " Pressing down didnt work as expected."
295 printlog "Click the Open-button"
297 printlog "Check if the Open-dialogue is there"
298 kontext "GeneralFileDialog"
299 if GeneralFileDialog.Exists(10) = FALSE then
300 warnlog " Open-file-dialogue didnt show up."
302 GeneralFileDialog.Cancel
305 kontext "AutoPilotPraesentation1"
306 AutoPilotPraesentation1.TypeKeys "<SHIFT TAB>"
307 AutoPilotPraesentation1.TypeKeys "<UP>"
308 AutoPilotPraesentation1.TypeKeys "<DOWN>"
309 AutoPilotPraesentation1.TypeKeys "<TAB><TAB>"
311 Existinglist.TypeKeys "<HOME>"
313 Existinglist.TypeKeys "<DOWN>"
315 if Existinglist.GetSelText = "" then
316 Warnlog " No entries in the recently-opened-files-list. Check if it's correct."
318 PresentationFileToBeLoaded = Existinglist.GetSelText
319 AutoPilotPraesentation1.OK
322 kontext "DocumentImpress"
323 if DocumentImpress.Exists(10) = FALSE then
324 if DocumentImpress.StatusIsProgress = FALSE then
326 if DocumentImpress.StatusIsProgress then
327 warnlog " Took over 20 seconds to load the document Document: " + PresentationFileToBeLoaded + ". Stalled?"
332 printlog " Document " + PresentationFileToBeLoaded + " seemed to have been loaded correctly."
335 if DocumentImpress.StatusIsProgress then
338 printlog "Save Document"
339 call hFileSaveAsKill (PresentationFile2)
340 printlog "OK saved at ", PresentationFile2
343 printlog "Close Document"