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: options.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 : Tests the Presentation-Engines effects
38 '*******************************************************************
40 ' #1 tiPEngineOptionsTest
41 ' #1 tiPEngineOptionsTest2
43 '\*******************************************************************
45 function tiPEngineOptionsTest
46 dim filedialogue as boolean
47 dim lala, optsound, os, oa, odc, ota, ets, etspeed, etrep, etshap, etgt as integer
50 ' if (NOT bError) then
51 '/// CLick on button '...' (Options) ///'
54 if TabEffect.Exists(5) then
55 optsound = Sound.GetItemCount
56 for os = 1 to optsound
59 if OeffnenDlg.Exists (5) then
65 ' if play.isEnabled then
69 ' warnlog Sound.GetSelText + " wasn't played correctly."
74 if AfterAnimation.isEnabled AND AfterAnimation.isVisible then
75 for oa = 1 to AfterAnimation.GetItemCount
76 AfterAnimation.Select oa
77 if DimColor.isEnabled then
78 for odc = 1 to DimColor.GetItemCount
82 if DelayBetweenCharacters.isEnabled then
83 for odc = 1 to DelayBetweenCharacters.GetItemCount
84 DelayBetweenCharacters.Select odc
89 if DelayBetweenCharacters.isEnabled then
90 for odc = 1 to DelayBetweenCharacters.GetItemCount
91 DelayBetweenCharacters.Select odc
95 for ota = 1 to TextAnimation.GetItemCount
96 TextAnimation.Select ota
98 '/// switch to TabPage 'Timing' ///'
100 Active.SetPage TabTiming
102 if TabTiming.Exists(5) then
103 for ets = 1 to TimingStart.GetItemCount
104 TimingStart.Select ets
106 if Delay.isVisible AND Delay.isEnabled then
109 Warnlog "Delay in Effect Options were not to be found."
111 if Speed.isVisible AND Speed.isEnabled then
112 for etspeed = 1 to Speed.GetItemCount
116 printlog " No Speed-entry for this effect."
118 if Repeat.isVisible AND Repeat.isEnabled then
119 for etrep = 1 to Speed.GetItemCount
123 Printlog "Repeat in Effect Options were not to be found."
127 TriggerAnimate.IsChecked
128 TriggerStart.IsChecked
129 if Shape.isVisible AND Shape.isEnabled then
130 for etshap = 1 to Shape.GetItemCount
134 Warnlog "Shape in Effect Options were not to be found."
137 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
139 '/// switch to TabPage 'Timing' ///'
141 active.setPage TabTextAnimation
142 kontext "TabTextAnimation"
143 if TabTextAnimation.Exists(5) then
144 lala = GroupText.GetItemCount
146 GroupText.Select etgt
147 if AutomaticallyAfter.IsEnabled then
148 AutomaticallyAfter.Check
149 AutomaticallyAfter.TypeKeys "<UP>"
151 if AnimateAttachedShape.IsEnabled then
152 AnimateAttachedShape.Check
153 if AnimateAttachedShape.IsChecked = FALSE then
154 Warnlog "AnimateAttachedShape should have been checked"
157 if InreverseOrder.IsEnabled then
159 if InreverseOrder.IsChecked = FALSE then
160 Warnlog "InreverseOrder should have been checked"
164 TabTextAnimation.Cancel
166 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
169 warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
176 function optionstest2
177 dim filedialogue as boolean
178 dim lala, optsound, os, oa, odc, ota, ets, etspeed, etrep, etshap, etgt as integer
183 if TabEffect.Exists(5) then
185 AfterAnimation.Select 2
186 if DimColor.isEnabled then
189 Warnlog "DimColor should have been enabled"
191 TextAnimation.Select 3
192 if DelayBetweenCharacters.isEnabled then
193 DelayBetweenCharacters.More 5
195 Warnlog "DelayBetweenCharacters should have been enabled"
197 '/// switch to TabPage 'Timing' ///'
199 Active.SetPage TabTiming
201 if TabTiming.Exists(5) then
203 if Delay.isVisible AND Delay.isEnabled then
206 Warnlog "Delay in Effect Options were not to be found."
208 if Speed.isVisible AND Speed.isEnabled then
211 Printlog "Speed in Effect Options were not to be found."
213 if Repeat.isVisible AND Repeat.isEnabled then
214 for etrep = 1 to Speed.GetItemCount
218 Warnlog "Repeat in Effect Options were not to be found."
220 if Rewind.isVisible AND Rewind.isEnabled then
223 Printlog "Rewind in Effect Options were not to be found."
225 if Rewind.isVisible AND Rewind.isEnabled then
229 Warnlog "Rewind in Effect Options were not to be found."
231 TriggerAnimate.IsChecked
232 TriggerStart.IsChecked
233 if Shape.isVisible AND Shape.isEnabled then
234 for etshap = 1 to Shape.GetItemCount
238 Warnlog "Shape in Effect Options were not to be found."
241 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
243 '/// switch to TabPage 'Timing' ///'
245 active.setPage TabTextAnimation
246 kontext "TabTextAnimation"
247 if TabTextAnimation.Exists(5) then
248 lala = GroupText.GetItemCount
250 GroupText.Select etgt
251 if AutomaticallyAfter.IsEnabled then
252 AutomaticallyAfter.Check
253 AutomaticallyAfter.TypeKeys "<UP>"
255 if AnimateAttachedShape.IsEnabled then
256 AnimateAttachedShape.Check
257 if AnimateAttachedShape.IsChecked = FALSE then
258 Warnlog "AnimateAttachedShape should have been checked"
261 if InreverseOrder.IsEnabled then
263 if InreverseOrder.IsChecked = FALSE then
264 Warnlog "InreverseOrder should have been checked"
268 TabTextAnimation.Cancel
270 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
273 warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."