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