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="sch_AccArea" script:language="StarBasic"> 4 5 '************************************************************************* 6 ' 7 ' Licensed to the Apache Software Foundation (ASF) under one 8 ' or more contributor license agreements. See the NOTICE file 9 ' distributed with this work for additional information 10 ' regarding copyright ownership. The ASF licenses this file 11 ' to you under the Apache License, Version 2.0 (the 12 ' "License"); you may not use this file except in compliance 13 ' with the License. You may obtain a copy of the License at 14 ' 15 ' http://www.apache.org/licenses/LICENSE-2.0 16 ' 17 ' Unless required by applicable law or agreed to in writing, 18 ' software distributed under the License is distributed on an 19 ' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 ' KIND, either express or implied. See the License for the 21 ' specific language governing permissions and limitations 22 ' under the License. 23 ' 24 '************************************************************************* 25 26 27 28 29 30 ' Be sure that all variables are dimensioned: 31 option explicit 32 33 34 ' REQUIRED VARIABLES for interface/service tests: 35 36 ' com::sun::star::accessibility::XAccessibleEventBroadcaster#optional 37 ' needs the following Global variables: 38 39 40 Sub CreateObj() 41 42 '************************************************************************* 43 ' COMPONENT: 44 ' sch.AccArea 45 '************************************************************************* 46 On Error Goto ErrHndl 47 Dim xRoot As Object 48 Dim oWin As Object 49 Dim oChart as Object 50 51 oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) 52 53 wait(1000) 54 oWin = utils.at_getCurrentWindow(oDoc) 55 xRoot = utils.at_getAccessibleObject(oWin) 56 oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Area") 57 58 Exit Sub 59 ErrHndl: 60 Test.Exception() 61 End Sub 62 63 Sub fireEvent() 64 oObj.grabFocus() 65 End Sub 66 67 </script:module> 68