Update ooo320-m1
[ooovba.git] / qadevOOo / tests / java / ifc / text / _TextTable.java
blobdc3d07f2aaee0b9fcba3408c216ff846247343ed
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: _TextTable.java,v $
10 * $Revision: 1.5 $
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.text;
33 import lib.MultiPropertyTest;
35 /**
36 * Testing <code>com.sun.star.text.TextTable</code>
37 * service properties :
38 * <ul>
39 * <li><code> BreakType</code></li>
40 * <li><code> LeftMargin</code></li>
41 * <li><code> RightMargin</code></li>
42 * <li><code> HoriOrient</code></li>
43 * <li><code> KeepTogether</code></li>
44 * <li><code> Split</code></li>
45 * <li><code> PageNumberOffset</code></li>
46 * <li><code> PageDescName</code></li>
47 * <li><code> RelativeWidth</code></li>
48 * <li><code> IsWidthRelative</code></li>
49 * <li><code> RepeatHeadline</code></li>
50 * <li><code> ShadowFormat</code></li>
51 * <li><code> TopMargin</code></li>
52 * <li><code> BottomMargin</code></li>
53 * <li><code> BackTransparent</code></li>
54 * <li><code> Width</code></li>
55 * <li><code> ChartRowAsLabel</code></li>
56 * <li><code> ChartColumnAsLabel</code></li>
57 * <li><code> TableBorder</code></li>
58 * <li><code> TableColumnSeparators</code></li>
59 * <li><code> TableColumnRelativeSum</code></li>
60 * <li><code> BackColor</code></li>
61 * <li><code> BackGraphicURL</code></li>
62 * <li><code> BackGraphicFilter</code></li>
63 * <li><code> BackGraphicLocation</code></li>
64 * </ul> <p>
65 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
66 * @see com.sun.star.text.TextTable
68 public class _TextTable extends MultiPropertyTest {
70 /**
71 * This property accepts only restricted range of values.
72 * The property value is switched between '' and 'Standard'
73 * strings.
75 public void _PageDescName() {
76 testProperty("PageDescName", "Endnote", "Standard");
79 /**
80 * For setting this property, 'HoriOrient' property must be
81 * set to non-automatic.
83 public void _Width() {
84 Short align = new Short(com.sun.star.text.HoriOrientation.CENTER);
85 try {
86 oObj.setPropertyValue("HoriOrient",align);
88 catch (com.sun.star.lang.IllegalArgumentException ex) {}
89 catch (com.sun.star.lang.WrappedTargetException ex) {}
90 catch (com.sun.star.beans.PropertyVetoException ex) {}
91 catch (com.sun.star.beans.UnknownPropertyException ex) {}
93 testProperty("Width");
96 /**
97 * For setting this property, 'HoriOrient' property must be
98 * set to non-automatic.
100 public void _RelativeWidth() {
101 Short align = new Short(com.sun.star.text.HoriOrientation.CENTER);
102 try {
103 oObj.setPropertyValue("HoriOrient",align);
105 catch (com.sun.star.lang.IllegalArgumentException ex) {}
106 catch (com.sun.star.lang.WrappedTargetException ex) {}
107 catch (com.sun.star.beans.PropertyVetoException ex) {}
108 catch (com.sun.star.beans.UnknownPropertyException ex) {}
110 testProperty("RelativeWidth");
114 * Forces environment recreation.
116 protected void after() {
117 disposeEnvironment();
120 } // finish class _TextTable