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