Update ooo320-m1
[ooovba.git] / qadevOOo / tests / java / ifc / presentation / _Presentation.java
blobf54a50b6d5108e14d52b6322d19250679e233d4d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _Presentation.java,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package ifc.presentation;
33 import lib.MultiPropertyTest;
34 import lib.Status;
35 import lib.StatusException;
37 import com.sun.star.presentation.XPresentation;
39 /**
40 * Testing <code>com.sun.star.presentation.Presentation</code>
41 * service properties :
42 * <ul>
43 * <li><code> AllowAnimations</code></li>
44 * <li><code> CustomShow</code></li>
45 * <li><code> FirstPage</code></li>
46 * <li><code> IsAlwaysOnTop</code></li>
47 * <li><code> IsAutomatic</code></li>
48 * <li><code> IsEndless</code></li>
49 * <li><code> IsFullScreen</code></li>
50 * <li><code> IsLivePresentation</code></li>
51 * <li><code> IsMouseVisible</code></li>
52 * <li><code> Pause</code></li>
53 * <li><code> StartWithNavigator</code></li>
54 * <li><code> UsePen</code></li>
55 * </ul> <p>
56 * This test needs the following object relations :
57 * <ul>
58 * <li> <code>'Presentation'</code> (of type <code>XPresentation</code>):
59 * for test of property <code>IsLivePresentation</code>
60 * presentation start needed </li>
61 * <ul> <p>
62 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
63 * @see com.sun.star.presentation.Presentation
64 * @see com.sun.star.presentation.XPresentation
66 public class _Presentation extends MultiPropertyTest {
68 public void _IsLivePresentation() {
69 XPresentation aPresentation = (XPresentation)
70 tEnv.getObjRelation("Presentation");
71 if (aPresentation == null) throw new StatusException(Status.failed
72 ("Relation 'Presentation' not found"));
74 aPresentation.start();
75 testProperty("IsLivePresentation");
78 protected PropertyTester CustomShowTester = new PropertyTester() {
79 protected Object getNewValue(String propName, Object oldValue)
80 throws java.lang.IllegalArgumentException {
81 if ( ((String)oldValue).equals("SecondPresentation") ) {
82 return new String("FirstPresentation");
83 } else {
84 return new String("SecondPresentation");
89 public void _CustomShow() {
90 testProperty("CustomShow", CustomShowTester);
92 } // finish class _Presentation