Update ooo320-m1
[ooovba.git] / qadevOOo / tests / java / ifc / sheet / _TableAutoFormatField.java
blob877cb0eb0956acf5946777d2fa156123510d2747
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: _TableAutoFormatField.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.sheet;
33 import lib.MultiPropertyTest;
35 import com.sun.star.lang.Locale;
37 /**
38 * Testing <code>com.sun.star.sheet.TableAutoFormatField</code>
39 * service properties :
40 * <ul>
41 * <li><code> CharFontName</code></li>
42 * <li><code> CharHeight</code></li>
43 * <li><code> CharWeight</code></li>
44 * <li><code> CharPosture</code></li>
45 * <li><code> CharUnderline</code></li>
46 * <li><code> CharCrossedOut</code></li>
47 * <li><code> CharContoured</code></li>
48 * <li><code> CharShadowed</code></li>
49 * <li><code> CharColor</code></li>
50 * <li><code> CharLocale</code></li>
51 * <li><code> CellBackColor</code></li>
52 * <li><code> IsCellBackgroundTransparent</code></li>
53 * <li><code> ShadowFormat</code></li>
54 * <li><code> ParaRightMargin </code></li>
55 * <li><code> ParaLeftMargin </code></li>
56 * <li><code> ParaBottomMargin </code></li>
57 * <li><code> ParaTopMargin </code></li>
58 * <li><code> RotateReference </code></li>
59 * <li><code> RotateAngle </code></li>
60 * <li><code> Orientation </code></li>
61 * <li><code> IsTextWrapped </code></li>
62 * <li><code> VertJustify </code></li>
63 * <li><code> HoriJustify </code></li>
64 * <li><code> CharPostureComplex </code></li>
65 * <li><code> CharPostureAsian </code></li>
66 * <li><code> CharWeightComplex </code></li>
67 * <li><code> CharWeightAsian </code></li>
68 * <li><code> CharHeightComplex </code></li>
69 * <li><code> CharHeightAsian </code></li>
70 * <li><code> CharFontPitchComplex </code></li>
71 * <li><code> CharFontPitchAsian </code></li>
72 * <li><code> CharFontPitch </code></li>
73 * <li><code> CharFontFamilyComplex </code></li>
74 * <li><code> CharFontFamilyAsian </code></li>
75 * <li><code> CharFontFamily </code></li>
76 * <li><code> CharFontCharSetComplex </code></li>
77 * <li><code> CharFontCharSetAsian </code></li>
78 * <li><code> CharFontCharSet </code></li>
79 * <li><code> CharFontStyleNameComplex </code></li>
80 * <li><code> CharFontStyleNameAsian </code></li>
81 * <li><code> CharFontStyleName </code></li>
82 * <li><code> CharFontNameComplex </code></li>
83 * <li><code> CharFontNameAsian </code></li>
84 * </ul> <p>
85 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
86 * @see com.sun.star.sheet.TableAutoFormatField
88 public class _TableAutoFormatField extends MultiPropertyTest {
90 /**
91 * Only some values can be used (which identify font name).
92 * In this property value is changed from 'Times New Roman'
93 * to 'Courier' and vise versa.
95 public void _CharFontName() {
96 testProperty("CharFontName", new PropertyTester() {
97 protected Object getNewValue(String p, Object old) {
98 return "Courier".equals(old) ? "Times New Roman" : "Courier" ;
100 }) ;
104 * Locale values are predefined and can't be chaged arbitrary.
105 * In this property value is changed from ('de', 'DE', '')
106 * to ('es', 'ES', '') and vise versa.
108 public void _CharLocale() {
109 testProperty("CharLocale", new PropertyTester() {
110 protected Object getNewValue(String p, Object old) {
111 return old == null || ((Locale)old).Language == "de" ?
112 new Locale("es", "ES", "") : new Locale("de", "DE", "") ;
114 }) ;
118 * This property can be void, so if old value is <code> null </code>
119 * new value must be specified.
121 public void _ShadowFormat() {
122 testProperty("ShadowFormat", new PropertyTester() {
123 protected Object getNewValue(String p, Object old) {
124 return old == null ? new com.sun.star.table.ShadowFormat() :
125 super.getNewValue(p, old) ;
127 }) ;
130 } //finish class _TableAutoFormatField