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_CellProperties" 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.text.CellProperties 38'************************************************************************* 39On Error Goto ErrHndl 40 Dim bOK As Boolean 41 42 43 PropertyTester.TestProperty("BackColor") 44 45 PropertyTester.TestProperty("BackGraphicURL") 46 47 PropertyTester.TestProperty("BackGraphicFilter") 48 49 PropertyTester.TestProperty("BackGraphicLocation") 50 51 PropertyTester.TestProperty("NumberFormat") 52 53 PropertyTester.TestProperty("BackTransparent") 54 55 PropertyTester.TestProperty("LeftBorder") 56 57 PropertyTester.TestProperty("RightBorder") 58 59 PropertyTester.TestProperty("TopBorder") 60 61 PropertyTester.TestProperty("BottomBorder") 62 63 PropertyTester.TestProperty("LeftBorderDistance") 64 65 PropertyTester.TestProperty("RightBorderDistance") 66 67 PropertyTester.TestProperty("TopBorderDistance") 68 69 PropertyTester.TestProperty("BottomBorderDistance") 70 71 PropertyTester.TestProperty("UserDefinedAttributes") 72 73 PropertyTester.TestProperty("TextSection") 74 75 Dim myParams(2) As Boolean 76 myParams(0) = true 77 myParams(1) = false 78 myParams(1) = false 79 PropertyTester.TestProperty("IsProtected", myParams()) 80 81 PropertyTester.TestProperty("CellName") 82 83 84 Dim orient(9) as Integer 85 orient(0) = com.sun.star.text.VertOrientation.NONE 86 orient(1) = com.sun.star.text.VertOrientation.TOP 87 orient(2) = com.sun.star.text.VertOrientation.CENTER 88 orient(3) = com.sun.star.text.VertOrientation.BOTTOM 89 orient(4) = com.sun.star.text.VertOrientation.CHAR_TOP 90 orient(5) = com.sun.star.text.VertOrientation.CHAR_CENTER 91 orient(6) = com.sun.star.text.VertOrientation.CHAR_BOTTOM 92 orient(7) = com.sun.star.text.VertOrientation.LINE_TOP 93 orient(8) = com.sun.star.text.VertOrientation.LINE_CENTER 94 orient(9) = com.sun.star.text.VertOrientation.LINE_BOTTOM 95 96 PropertyTester.TestProperty("VertOrient", orient()) 97 98Exit Sub 99ErrHndl: 100 Test.Exception() 101 bOK = false 102 resume next 103End Sub 104</script:module> 105