1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_TableAutoFormatField" script:language="StarBasic">
4
5
6'*************************************************************************
7'
8'  Licensed to the Apache Software Foundation (ASF) under one
9'  or more contributor license agreements.  See the NOTICE file
10'  distributed with this work for additional information
11'  regarding copyright ownership.  The ASF licenses this file
12'  to you under the Apache License, Version 2.0 (the
13'  "License"); you may not use this file except in compliance
14'  with the License.  You may obtain a copy of the License at
15'
16'    http://www.apache.org/licenses/LICENSE-2.0
17'
18'  Unless required by applicable law or agreed to in writing,
19'  software distributed under the License is distributed on an
20'  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21'  KIND, either express or implied.  See the License for the
22'  specific language governing permissions and limitations
23'  under the License.
24'
25'*************************************************************************
26
27
28
29
30
31
32
33Sub RunTest()
34
35'*************************************************************************
36' SERVICE:
37' com.sun.star.sheet.TableAutoFormatField
38'*************************************************************************
39On Error Goto ErrHndl
40    Dim bOK As Boolean
41
42
43    PropertyTester.TestProperty("CharFontName")
44
45    Dim aHeightArray(3) As Double
46    aHeightArray(0) = 10
47    aHeightArray(1) = 20.1
48    aHeightArray(2) = 25.2
49    aHeightArray(3) = 30.3
50    PropertyTester.TestProperty("CharHeight",aHeightArray())
51
52    Dim aWeightArray(9) As Integer
53    with com.sun.star.awt.FontWeight
54        aWeightArray(0) = .DONTKNOW
55        aWeightArray(1) = .THIN
56        aWeightArray(2) = .ULTRALIGHT
57        aWeightArray(3) = .LIGHT
58        aWeightArray(4) = .SEMILIGHT
59        aWeightArray(5) = .NORMAL
60        aWeightArray(6) = .SEMIBOLD
61        aWeightArray(7) = .BOLD
62        aWeightArray(8) = .ULTRABOLD
63        aWeightArray(9) = .BLACK
64    end with
65    PropertyTester.TestProperty("CharWeight", aWeightArray())
66
67    PropertyTester.TestProperty("CharPosture")
68
69    PropertyTester.TestProperty("CharUnderline")
70
71    PropertyTester.TestProperty("CharCrossedOut")
72
73    PropertyTester.TestProperty("CharContoured")
74
75    PropertyTester.TestProperty("CharShadowed")
76
77    PropertyTester.TestProperty("CharColor")
78
79' ### The following property was not found in correspond IDL file! ###
80    PropertyTester.TestProperty("CharLocale")
81
82    PropertyTester.TestProperty("CellBackColor")
83
84    PropertyTester.TestProperty("IsCellBackgroundTransparent")
85
86    PropertyTester.TestProperty("ShadowFormat")
87
88    PropertyTester.TestProperty("ParaRightMargin")
89
90    PropertyTester.TestProperty("ParaLeftMargin")
91
92    PropertyTester.TestProperty("ParaBottomMargin")
93
94    PropertyTester.TestProperty("ParaTopMargin")
95
96    PropertyTester.TestProperty("RotateReference")
97
98    PropertyTester.TestProperty("RotateAngle")
99
100    PropertyTester.TestProperty("Orientation")
101
102    PropertyTester.TestProperty("IsTextWrapped")
103
104    PropertyTester.TestProperty("VertJustify")
105
106    PropertyTester.TestProperty("HoriJustify")
107
108    PropertyTester.TestProperty("CharPostureComplex")
109
110    PropertyTester.TestProperty("CharPostureAsian")
111
112    PropertyTester.TestProperty("CharWeightComplex", aWeightArray())
113
114    PropertyTester.TestProperty("CharWeightAsian", aWeightArray())
115
116    PropertyTester.TestProperty("CharHeightComplex", aHeightArray())
117
118    PropertyTester.TestProperty("CharHeightAsian", aHeightArray())
119
120    PropertyTester.TestProperty("CharFontPitchComplex")
121
122    PropertyTester.TestProperty("CharFontPitchAsian")
123
124    PropertyTester.TestProperty("CharFontPitch")
125
126    PropertyTester.TestProperty("CharFontFamilyComplex")
127
128    PropertyTester.TestProperty("CharFontFamilyAsian")
129
130    PropertyTester.TestProperty("CharFontFamily")
131
132    PropertyTester.TestProperty("CharFontCharSetComplex")
133
134    PropertyTester.TestProperty("CharFontCharSetAsian")
135
136    PropertyTester.TestProperty("CharFontCharSet")
137
138    PropertyTester.TestProperty("CharFontStyleNameComplex")
139
140    PropertyTester.TestProperty("CharFontStyleNameAsian")
141
142    PropertyTester.TestProperty("CharFontStyleName")
143
144    PropertyTester.TestProperty("CharFontNameComplex")
145
146    PropertyTester.TestProperty("CharFontNameAsian")
147
148
149'
150    PropertyTester.TestProperty("TableBorder")
151
152Exit Sub
153ErrHndl:
154    Test.Exception()
155    bOK = false
156    resume next
157End Sub
158</script:module>
159