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="text_BaseFrameProperties" script:language="StarBasic">
4
5'*************************************************************************
6'
7'  Licensed to the Apache Software Foundation (ASF) under one
8'  or more contributor license agreements.  See the NOTICE file
9'  distributed with this work for additional information
10'  regarding copyright ownership.  The ASF licenses this file
11'  to you under the Apache License, Version 2.0 (the
12'  "License"); you may not use this file except in compliance
13'  with the License.  You may obtain a copy of the License at
14'
15'    http://www.apache.org/licenses/LICENSE-2.0
16'
17'  Unless required by applicable law or agreed to in writing,
18'  software distributed under the License is distributed on an
19'  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20'  KIND, either express or implied.  See the License for the
21'  specific language governing permissions and limitations
22'  under the License.
23'
24'*************************************************************************
25
26
27
28
29
30' Be sure that all variables are dimensioned:
31option explicit
32
33
34
35
36Sub RunTest()
37
38'*************************************************************************
39' INTERFACE:
40' com.sun.star.text.BaseFrameProperties
41'*************************************************************************
42On Error Goto ErrHndl
43    Dim bOK As Boolean
44
45	oObj.SizeProtected = false
46
47    PropertyTester.TestProperty("ShadowFormat")
48
49    Dim nPages(0 to 2) As Integer
50    nPages(0) = 1
51    nPages(1) = 3
52    nPages(2) = 1
53    PropertyTester.TestProperty("AnchorPageNo",nPages())
54
55    PropertyTester.TestProperty("BackColor")
56
57    PropertyTester.TestProperty("BackGraphicURL")
58
59    PropertyTester.TestProperty("BackGraphicFilter")
60
61    PropertyTester.TestProperty("BackGraphicLocation")
62
63    PropertyTester.TestProperty("LeftBorder")
64
65    PropertyTester.TestProperty("RightBorder")
66
67    PropertyTester.TestProperty("TopBorder")
68
69    PropertyTester.TestProperty("BottomBorder")
70
71    PropertyTester.TestProperty("BorderDistance")
72
73    PropertyTester.TestProperty("LeftBorderDistance")
74
75    PropertyTester.TestProperty("RightBorderDistance")
76
77    PropertyTester.TestProperty("TopBorderDistance")
78
79    PropertyTester.TestProperty("BottomBorderDistance")
80
81    PropertyTester.TestProperty("BackTransparent")
82
83    PropertyTester.TestProperty("ContentProtected")
84
85    PropertyTester.TestProperty("LeftMargin")
86
87    PropertyTester.TestProperty("RightMargin")
88
89    PropertyTester.TestProperty("TopMargin")
90
91    PropertyTester.TestProperty("BottomMargin")
92
93    Dim aRelative(2) As Integer
94    aRelative(0) = 10
95    aRelative(1) = 20
96    aRelative(2) = 0
97    PropertyTester.TestProperty("RelativeHeight", aRelative())
98
99    PropertyTester.TestProperty("RelativeWidth", aRelative())
100
101    PropertyTester.TestProperty("Height")
102
103    PropertyTester.TestProperty("Width")
104
105    PropertyTester.TestProperty("IsSyncWidthToHeight")
106
107    PropertyTester.TestProperty("IsSyncHeightToWidth")
108
109    Dim aHoriOrient(3) As Integer
110    aHoriOrient(0) = com.sun.star.text.HoriOrientation.RIGHT
111    aHoriOrient(1) = com.sun.star.text.HoriOrientation.CENTER
112    aHoriOrient(2) = com.sun.star.text.HoriOrientation.LEFT
113    aHoriOrient(3) = com.sun.star.text.HoriOrientation.NONE
114    PropertyTester.TestProperty("HoriOrient", aHoriOrient())
115
116    PropertyTester.TestProperty("HoriOrientPosition")
117
118    Dim aHoriRelations(3) As Integer
119    aHoriRelations(0) = com.sun.star.text.RelOrientation.FRAME
120    aHoriRelations(1) = com.sun.star.text.RelOrientation.CHAR
121    aHoriRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT
122    aHoriRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT
123
124    PropertyTester.TestProperty("HoriOrientRelation", aHoriRelations())
125
126    Dim aVertOrient(3) As Integer
127    aVertOrient(0) = com.sun.star.text.VertOrientation.TOP
128    aVertOrient(1) = com.sun.star.text.VertOrientation.CENTER
129    aVertOrient(2) = com.sun.star.text.VertOrientation.BOTTOM
130    aVertOrient(3) = com.sun.star.text.VertOrientation.NONE
131    PropertyTester.TestProperty("VertOrient", aVertOrient())
132
133    PropertyTester.TestProperty("VertOrientPosition", aVertOrient())
134
135    Dim aVertRelations(3) As Integer
136    aVertRelations(0) = com.sun.star.text.RelOrientation.FRAME
137    aVertRelations(1) = com.sun.star.text.RelOrientation.CHAR
138    aVertRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT
139    aVertRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT
140    PropertyTester.TestProperty("VertOrientRelation", aVertRelations())
141
142    PropertyTester.TestProperty("HyperLinkURL")
143
144    PropertyTester.TestProperty("HyperLinkTarget")
145
146    PropertyTester.TestProperty("HyperLinkName")
147
148    PropertyTester.TestProperty("Opaque")
149
150    PropertyTester.TestProperty("PageToggle")
151
152    PropertyTester.TestProperty("PositionProtected")
153
154    PropertyTester.TestProperty("Print")
155
156    PropertyTester.TestProperty("ServerMap")
157
158	oObj.SizeProtected = false
159    PropertyTester.TestProperty("Size")
160
161    PropertyTester.TestProperty("SizeProtected")
162
163	oObj.SizeProtected = false
164
165    PropertyTester.TestProperty("Surround")
166
167    PropertyTester.TestProperty("SurroundAnchorOnly")
168
169    PropertyTester.TestProperty("AnchorFrame")
170
171
172Exit Sub
173ErrHndl:
174    Test.Exception()
175    bOK = false
176    resume next
177End Sub
178</script:module>
179