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' Be sure that all variables are dimensioned:
36option explicit
37
38
39
40
41Sub RunTest()
42
43'*************************************************************************
44' INTERFACE:
45' com.sun.star.text.BaseFrameProperties
46'*************************************************************************
47On Error Goto ErrHndl
48    Dim bOK As Boolean
49
50	oObj.SizeProtected = false
51
52    PropertyTester.TestProperty("ShadowFormat")
53
54    Dim nPages(0 to 2) As Integer
55    nPages(0) = 1
56    nPages(1) = 3
57    nPages(2) = 1
58    PropertyTester.TestProperty("AnchorPageNo",nPages())
59
60    PropertyTester.TestProperty("BackColor")
61
62    PropertyTester.TestProperty("BackGraphicURL")
63
64    PropertyTester.TestProperty("BackGraphicFilter")
65
66    PropertyTester.TestProperty("BackGraphicLocation")
67
68    PropertyTester.TestProperty("LeftBorder")
69
70    PropertyTester.TestProperty("RightBorder")
71
72    PropertyTester.TestProperty("TopBorder")
73
74    PropertyTester.TestProperty("BottomBorder")
75
76    PropertyTester.TestProperty("BorderDistance")
77
78    PropertyTester.TestProperty("LeftBorderDistance")
79
80    PropertyTester.TestProperty("RightBorderDistance")
81
82    PropertyTester.TestProperty("TopBorderDistance")
83
84    PropertyTester.TestProperty("BottomBorderDistance")
85
86    PropertyTester.TestProperty("BackTransparent")
87
88    PropertyTester.TestProperty("ContentProtected")
89
90    PropertyTester.TestProperty("LeftMargin")
91
92    PropertyTester.TestProperty("RightMargin")
93
94    PropertyTester.TestProperty("TopMargin")
95
96    PropertyTester.TestProperty("BottomMargin")
97
98    Dim aRelative(2) As Integer
99    aRelative(0) = 10
100    aRelative(1) = 20
101    aRelative(2) = 0
102    PropertyTester.TestProperty("RelativeHeight", aRelative())
103
104    PropertyTester.TestProperty("RelativeWidth", aRelative())
105
106    PropertyTester.TestProperty("Height")
107
108    PropertyTester.TestProperty("Width")
109
110    PropertyTester.TestProperty("IsSyncWidthToHeight")
111
112    PropertyTester.TestProperty("IsSyncHeightToWidth")
113
114    Dim aHoriOrient(3) As Integer
115    aHoriOrient(0) = com.sun.star.text.HoriOrientation.RIGHT
116    aHoriOrient(1) = com.sun.star.text.HoriOrientation.CENTER
117    aHoriOrient(2) = com.sun.star.text.HoriOrientation.LEFT
118    aHoriOrient(3) = com.sun.star.text.HoriOrientation.NONE
119    PropertyTester.TestProperty("HoriOrient", aHoriOrient())
120
121    PropertyTester.TestProperty("HoriOrientPosition")
122
123    Dim aHoriRelations(3) As Integer
124    aHoriRelations(0) = com.sun.star.text.RelOrientation.FRAME
125    aHoriRelations(1) = com.sun.star.text.RelOrientation.CHAR
126    aHoriRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT
127    aHoriRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT
128
129    PropertyTester.TestProperty("HoriOrientRelation", aHoriRelations())
130
131    Dim aVertOrient(3) As Integer
132    aVertOrient(0) = com.sun.star.text.VertOrientation.TOP
133    aVertOrient(1) = com.sun.star.text.VertOrientation.CENTER
134    aVertOrient(2) = com.sun.star.text.VertOrientation.BOTTOM
135    aVertOrient(3) = com.sun.star.text.VertOrientation.NONE
136    PropertyTester.TestProperty("VertOrient", aVertOrient())
137
138    PropertyTester.TestProperty("VertOrientPosition", aVertOrient())
139
140    Dim aVertRelations(3) As Integer
141    aVertRelations(0) = com.sun.star.text.RelOrientation.FRAME
142    aVertRelations(1) = com.sun.star.text.RelOrientation.CHAR
143    aVertRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT
144    aVertRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT
145    PropertyTester.TestProperty("VertOrientRelation", aVertRelations())
146
147    PropertyTester.TestProperty("HyperLinkURL")
148
149    PropertyTester.TestProperty("HyperLinkTarget")
150
151    PropertyTester.TestProperty("HyperLinkName")
152
153    PropertyTester.TestProperty("Opaque")
154
155    PropertyTester.TestProperty("PageToggle")
156
157    PropertyTester.TestProperty("PositionProtected")
158
159    PropertyTester.TestProperty("Print")
160
161    PropertyTester.TestProperty("ServerMap")
162
163	oObj.SizeProtected = false
164    PropertyTester.TestProperty("Size")
165
166    PropertyTester.TestProperty("SizeProtected")
167
168	oObj.SizeProtected = false
169
170    PropertyTester.TestProperty("Surround")
171
172    PropertyTester.TestProperty("SurroundAnchorOnly")
173
174    PropertyTester.TestProperty("AnchorFrame")
175
176
177Exit Sub
178ErrHndl:
179    Test.Exception()
180    bOK = false
181    resume next
182End Sub
183</script:module>
184