2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 import lib
.MultiPropertyTest
;
23 import com
.sun
.star
.lang
.Locale
;
26 * Testing <code>com.sun.star.sheet.TableAutoFormatField</code>
27 * service properties :
29 * <li><code> CharFontName</code></li>
30 * <li><code> CharHeight</code></li>
31 * <li><code> CharWeight</code></li>
32 * <li><code> CharPosture</code></li>
33 * <li><code> CharUnderline</code></li>
34 * <li><code> CharCrossedOut</code></li>
35 * <li><code> CharContoured</code></li>
36 * <li><code> CharShadowed</code></li>
37 * <li><code> CharColor</code></li>
38 * <li><code> CharLocale</code></li>
39 * <li><code> CellBackColor</code></li>
40 * <li><code> IsCellBackgroundTransparent</code></li>
41 * <li><code> ShadowFormat</code></li>
42 * <li><code> ParaRightMargin </code></li>
43 * <li><code> ParaLeftMargin </code></li>
44 * <li><code> ParaBottomMargin </code></li>
45 * <li><code> ParaTopMargin </code></li>
46 * <li><code> RotateReference </code></li>
47 * <li><code> RotateAngle </code></li>
48 * <li><code> Orientation </code></li>
49 * <li><code> IsTextWrapped </code></li>
50 * <li><code> VertJustify </code></li>
51 * <li><code> HoriJustify </code></li>
52 * <li><code> CharPostureComplex </code></li>
53 * <li><code> CharPostureAsian </code></li>
54 * <li><code> CharWeightComplex </code></li>
55 * <li><code> CharWeightAsian </code></li>
56 * <li><code> CharHeightComplex </code></li>
57 * <li><code> CharHeightAsian </code></li>
58 * <li><code> CharFontPitchComplex </code></li>
59 * <li><code> CharFontPitchAsian </code></li>
60 * <li><code> CharFontPitch </code></li>
61 * <li><code> CharFontFamilyComplex </code></li>
62 * <li><code> CharFontFamilyAsian </code></li>
63 * <li><code> CharFontFamily </code></li>
64 * <li><code> CharFontCharSetComplex </code></li>
65 * <li><code> CharFontCharSetAsian </code></li>
66 * <li><code> CharFontCharSet </code></li>
67 * <li><code> CharFontStyleNameComplex </code></li>
68 * <li><code> CharFontStyleNameAsian </code></li>
69 * <li><code> CharFontStyleName </code></li>
70 * <li><code> CharFontNameComplex </code></li>
71 * <li><code> CharFontNameAsian </code></li>
73 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
74 * @see com.sun.star.sheet.TableAutoFormatField
76 public class _TableAutoFormatField
extends MultiPropertyTest
{
79 * Only some values can be used (which identify font name).
80 * In this property value is changed from 'Times New Roman'
81 * to 'Courier' and vise versa.
83 public void _CharFontName() {
84 testProperty("CharFontName", new PropertyTester() {
86 protected Object
getNewValue(String p
, Object old
) {
87 return "Courier".equals(old
) ?
"Times New Roman" : "Courier" ;
93 * Locale values are predefined and can't be chaged arbitrary.
94 * In this property value is changed from ('de', 'DE', '')
95 * to ('es', 'ES', '') and vise versa.
97 public void _CharLocale() {
98 testProperty("CharLocale", new PropertyTester() {
100 protected Object
getNewValue(String p
, Object old
) {
101 return old
== null || ((Locale
)old
).Language
.equals( "de" ) ?
102 new Locale("es", "ES", "") : new Locale("de", "DE", "") ;
108 * This property can be void, so if old value is <code> null </code>
109 * new value must be specified.
111 public void _ShadowFormat() {
112 testProperty("ShadowFormat", new PropertyTester() {
114 protected Object
getNewValue(String p
, Object old
) {
115 return old
== null ?
new com
.sun
.star
.table
.ShadowFormat() :
116 super.getNewValue(p
, old
) ;
121 } //finish class _TableAutoFormatField