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_animation.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42: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 : wolfram.garten@sun.com
36 '* short description :
38 '*********************************************************************
40 '\********************************************************************
42 ' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
43 ' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\grafix3.ras")
45 testcase tExtrasAnimation
46 Printlog "- Tools/Animation"
48 Call hNewDocument '/// New impress document ///'
50 InsertGraphicsFromFile '/// insert graphic file (sample.bmp) ///'
52 Kontext "GrafikEinfuegenDlg"
55 Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
59 Kontext "DocumentImpress"
60 DocumentImpress.MouseDoubleClick 90,90 '/// Deselect graphic ///'
62 InsertGraphicsFromFile
64 Kontext "GrafikEinfuegenDlg"
65 Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\grafix3.ras")
69 Opl_SD_EffekteZulassen
73 BildAufnehmen.Click '/// add selected picture 10 times into the animation ///'
76 if AnzahlBilder.GetText <> "10" Then '/// compare frame number in animation dialog ///'
77 WarnLog " - Adding graphics did not work"
79 PrintLog " Pictures added"
82 if AlleAufnehmen.IsEnabled Then WarnLog " - Add all should not be enabled, there is only 1 graphic selected" '/// test if Add all is eneabled (shouldn't be because of only 1 object selected) ///'
83 Kontext "DocumentImpress"
84 EditSelectAll '/// Select both pictures ///'
89 AlleAufnehmen.Click '/// Add all (5 times) ///'
92 if AnzahlBilder.GetText <> "20" Then '/// check if number of frames is now 20 ///'
93 WarnLog " - Adding pics did not work"
95 PrintLog " All pics added"
98 ErstesBild.Click '/// Click First Picture ///'
100 if AnzahlBilder.GetText <> "1" Then '/// Control if we are at frame 1 ///'
101 WarnLog " - Jump back to start did not work"
103 PrintLog " Jumped back to first picture"
106 LetztesBild.Click '/// Go to last picture ///'
108 if AnzahlBilder.GetText <> "20" Then '/// Control frame number ///'
109 WarnLog " - Jump to end did not work"
111 PrintLog " Jump to end did work"
114 Abspielen.Click '/// Play animation ///'
116 Kontext "DocumentImpress"
117 EditSelectAll '/// Select all in document ///'
118 DocumentImpress.TypeKeys "<DELETE>" '/// Delete content ///'
121 Erstellen.Click '/// /Create animation //'
124 Kontext "DocumentImpress"
126 EditCopy '/// Try to copy ccreated animation into clipboard ///'
127 PrintLog " animation created"
129 WarnLog " - Animation not created"
134 if AnimationsgruppeGruppenobjekt.IsChecked=True Then
136 AnzeigedauerProBild.SetText "1" '/// Try setting duration per frame ///'
137 WarnLog " - Edit field should be disabled"
139 PrintLog " Edit field not enabled because groupobject status is = " + AnimationsgruppeGruppenobjekt.IsChecked
144 AnimationsgruppeBitmapobjekt.Check '/// check animation group object ///'
146 AnzeigedauerProBild.SetText "3" '/// Set duration per frame to 3///'
147 SetClipboard AnzeigedauerProBild.GetText
148 AnzeigedauerProBild.More '/// Raise value for duration ///'
149 if AnzeigedauerProBild.GetText <> GetClipboardText Then
150 PrintLog " Time per pic could be edited"
152 WarnLog " - Time per pic could be edited"
156 Zaehler = AnzahlDurchlaeufe.GetItemCount
157 for i=1 to Zaehler '/// Change number of plays ///'
158 AnzahlDurchlaeufe.Select i
160 PrintLog " Number of loops checked"
164 ZaehlerAnpassung=Anpassung.GetItemCount '/// change ZaehlerAnpassung ///'
165 for i=1 to ZaehlerAnpassung
168 PrintLog " Loop count changed"
170 BildLoeschen.Click '/// Delete 1 frame ///'
171 if AnzahlBilder = "20" Then
172 WarnLog " - Delete pictures from animation did not work"
174 PrintLog " Picture No20 deleted"
177 AlleLoeschen.Click '/// Delete all frames ///'
183 if Abspielen.IsEnabled=true Then
184 WarnLog " - Not all pics could be deleted"
186 PrintLog " all pics deleted"
191 Call hCloseDocument '/// close document///'