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' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8'
9' Copyright 2000, 2010 Oracle and/or its affiliates.
10'
11' OpenOffice.org - a multi-platform office productivity suite
12'
13' This file is part of OpenOffice.org.
14'
15' OpenOffice.org is free software: you can redistribute it and/or modify
16' it under the terms of the GNU Lesser General Public License version 3
17' only, as published by the Free Software Foundation.
18'
19' OpenOffice.org is distributed in the hope that it will be useful,
20' but WITHOUT ANY WARRANTY; without even the implied warranty of
21' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22' GNU Lesser General Public License version 3 for more details
23' (a copy is included in the LICENSE file that accompanied this code).
24'
25' You should have received a copy of the GNU Lesser General Public License
26' version 3 along with OpenOffice.org.  If not, see
27' <http://www.openoffice.org/license.html>
28' for a copy of the LGPLv3 License.
29'
30'*************************************************************************
31*****
32'*************************************************************************
33
34
35
36' Be sure that all variables are dimensioned:
37option explicit
38
39
40
41
42Sub RunTest()
43
44'*************************************************************************
45' INTERFACE:
46' com.sun.star.text.BaseFrameProperties
47'*************************************************************************
48On Error Goto ErrHndl
49    Dim bOK As Boolean
50
51	oObj.SizeProtected = false
52
53    PropertyTester.TestProperty("ShadowFormat")
54
55    Dim nPages(0 to 2) As Integer
56    nPages(0) = 1
57    nPages(1) = 3
58    nPages(2) = 1
59    PropertyTester.TestProperty("AnchorPageNo",nPages())
60
61    PropertyTester.TestProperty("BackColor")
62
63    PropertyTester.TestProperty("BackGraphicURL")
64
65    PropertyTester.TestProperty("BackGraphicFilter")
66
67    PropertyTester.TestProperty("BackGraphicLocation")
68
69    PropertyTester.TestProperty("LeftBorder")
70
71    PropertyTester.TestProperty("RightBorder")
72
73    PropertyTester.TestProperty("TopBorder")
74
75    PropertyTester.TestProperty("BottomBorder")
76
77    PropertyTester.TestProperty("BorderDistance")
78
79    PropertyTester.TestProperty("LeftBorderDistance")
80
81    PropertyTester.TestProperty("RightBorderDistance")
82
83    PropertyTester.TestProperty("TopBorderDistance")
84
85    PropertyTester.TestProperty("BottomBorderDistance")
86
87    PropertyTester.TestProperty("BackTransparent")
88
89    PropertyTester.TestProperty("ContentProtected")
90
91    PropertyTester.TestProperty("LeftMargin")
92
93    PropertyTester.TestProperty("RightMargin")
94
95    PropertyTester.TestProperty("TopMargin")
96
97    PropertyTester.TestProperty("BottomMargin")
98
99    Dim aRelative(2) As Integer
100    aRelative(0) = 10
101    aRelative(1) = 20
102    aRelative(2) = 0
103    PropertyTester.TestProperty("RelativeHeight", aRelative())
104
105    PropertyTester.TestProperty("RelativeWidth", aRelative())
106
107    PropertyTester.TestProperty("Height")
108
109    PropertyTester.TestProperty("Width")
110
111    PropertyTester.TestProperty("IsSyncWidthToHeight")
112
113    PropertyTester.TestProperty("IsSyncHeightToWidth")
114
115    Dim aHoriOrient(3) As Integer
116    aHoriOrient(0) = com.sun.star.text.HoriOrientation.RIGHT
117    aHoriOrient(1) = com.sun.star.text.HoriOrientation.CENTER
118    aHoriOrient(2) = com.sun.star.text.HoriOrientation.LEFT
119    aHoriOrient(3) = com.sun.star.text.HoriOrientation.NONE
120    PropertyTester.TestProperty("HoriOrient", aHoriOrient())
121
122    PropertyTester.TestProperty("HoriOrientPosition")
123
124    Dim aHoriRelations(3) As Integer
125    aHoriRelations(0) = com.sun.star.text.RelOrientation.FRAME
126    aHoriRelations(1) = com.sun.star.text.RelOrientation.CHAR
127    aHoriRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT
128    aHoriRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT
129
130    PropertyTester.TestProperty("HoriOrientRelation", aHoriRelations())
131
132    Dim aVertOrient(3) As Integer
133    aVertOrient(0) = com.sun.star.text.VertOrientation.TOP
134    aVertOrient(1) = com.sun.star.text.VertOrientation.CENTER
135    aVertOrient(2) = com.sun.star.text.VertOrientation.BOTTOM
136    aVertOrient(3) = com.sun.star.text.VertOrientation.NONE
137    PropertyTester.TestProperty("VertOrient", aVertOrient())
138
139    PropertyTester.TestProperty("VertOrientPosition", aVertOrient())
140
141    Dim aVertRelations(3) As Integer
142    aVertRelations(0) = com.sun.star.text.RelOrientation.FRAME
143    aVertRelations(1) = com.sun.star.text.RelOrientation.CHAR
144    aVertRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT
145    aVertRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT
146    PropertyTester.TestProperty("VertOrientRelation", aVertRelations())
147
148    PropertyTester.TestProperty("HyperLinkURL")
149
150    PropertyTester.TestProperty("HyperLinkTarget")
151
152    PropertyTester.TestProperty("HyperLinkName")
153
154    PropertyTester.TestProperty("Opaque")
155
156    PropertyTester.TestProperty("PageToggle")
157
158    PropertyTester.TestProperty("PositionProtected")
159
160    PropertyTester.TestProperty("Print")
161
162    PropertyTester.TestProperty("ServerMap")
163
164	oObj.SizeProtected = false
165    PropertyTester.TestProperty("Size")
166
167    PropertyTester.TestProperty("SizeProtected")
168
169	oObj.SizeProtected = false
170
171    PropertyTester.TestProperty("Surround")
172
173    PropertyTester.TestProperty("SurroundAnchorOnly")
174
175    PropertyTester.TestProperty("AnchorFrame")
176
177
178Exit Sub
179ErrHndl:
180    Test.Exception()
181    bOK = false
182    resume next
183End Sub
184</script:module>
185