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="accessibility_XAccessibleExtendedComponent" 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' Be sure that all variables are dimensioned: 32option explicit 33 34 35 36 37Sub RunTest() 38 39'************************************************************************* 40' INTERFACE: 41' com.sun.star.accessibility.XAccessibleExtendedComponent 42'************************************************************************* 43On Error Goto ErrHndl 44 Dim bOK As Boolean 45 46 Test.StartMethod("getFont()") 47 Dim font As Variant 48 Dim fDescr As new com.sun.star.awt.FontDescriptor 49 bOK = true 50 font = oObj.getFont() 51 if NOT isNull(font) then 52 fDescr = font.getFontDescriptor() 53 Out.Log("Font: "+fDescr.Name) 54 else 55 Out.Log("Font: null") 56 End If 57 Test.MethodTested("getFont()",bOK) 58 59 Test.StartMethod("getTitledBorderText()") 60 Dim tbText As String 61 bOK = true 62 tbText = oObj.getTitledBorderText() 63 Out.Log("TitledBorderText: "+tbText) 64 bOK = bOK AND NOT isNull(tbText) 65 Test.MethodTested("getTitledBorderText()",bOK) 66 67 Test.StartMethod("getToolTipText()") 68 Dim ttText As String 69 bOK = true 70 ttText = oObj.getToolTipText() 71 Out.Log("TitledBorderText: "+ttText) 72 bOK = bOK AND NOT isNull(ttText) 73 Test.MethodTested("getToolTipText()",bOK) 74 75Exit Sub 76ErrHndl: 77 Test.Exception() 78 bOK = false 79 resume next 80End Sub 81</script:module> 82