blob: 23f7168582127b74c68c61b627135d6fcfff9116 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="awt_XTabController" script:language="StarBasic">
'*************************************************************************
'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
' regarding copyright ownership. The ASF licenses this file
' to you under the Apache License, Version 2.0 (the
' "License"); you may not use this file except in compliance
' with the License. You may obtain a copy of the License at
'
' http://www.apache.org/licenses/LICENSE-2.0
'
' Unless required by applicable law or agreed to in writing,
' software distributed under the License is distributed on an
' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
'
'*************************************************************************
' Be sure that all variables are dimensioned:
option explicit
'*************************************************************************
' This Interface/Service test depends on the following GLOBAL variables,
' which must be specified in the object creation:
' Global oXTabControllerModel as Object
' Global oXTabControllerContainer as Object
' Global bHasNoModel as Boolean
'*************************************************************************
Sub RunTest()
'*************************************************************************
' INTERFACE:
' com.sun.star.awt.XTabController
'*************************************************************************
On Error Goto ErrHndl
Dim bOK As Boolean
Dim vControls As Variant
Dim n As Integer
Out.Log("This interface is DEPRECATED !!!")
Out.Log("All test results are OK now")
Test.StartMethod("setModel()")
Test.StartMethod("getModel()")
oObj.setModel(oXTabControllerModel)
bOK = (bHasNoModel = True) or hasUnoInterfaces(oObj.getModel(), "com.sun.star.awt.XTabControllerModel")
Test.MethodTested("setModel()", true)
Test.MethodTested("getModel()", bOK)
Test.StartMethod("setContainer()")
Test.StartMethod("getContainer()")
oObj.setContainer(oXTabControllerContainer)
bOK = hasUnoInterfaces(oObj.getContainer(), "com.sun.star.awt.XControlContainer")
Test.MethodTested("setContainer()", true)
Test.MethodTested("getContainer()", bOK)
Test.StartMethod("getControls()")
bOK = true
vControls = oObj.getcontrols()
For n = uBound(vControls) To lBound(vControls)
bOK = bOK AND hasUnoInterfaces(vControls(n), "com.sun.star.awt.XControl")
Next
Test.MethodTested("getControls()", true)
Test.StartMethod("autoTabOrder()")
oObj.autoTabOrder()
bOK = true
Test.MethodTested("autoTabOrder()", true)
Test.StartMethod("activateTabOrder()")
oObj.activateTabOrder()
bOK = true
Test.MethodTested("activateTabOrder()", true)
Test.StartMethod("activateFirst()")
oObj.activateFirst()
bOK = true
Test.MethodTested("activateFirst()", true)
Test.StartMethod("activateLast()")
oObj.activateLast()
bOK = true
Test.MethodTested("activateLast()", true)
Exit Sub
ErrHndl:
Test.Exception()
bOK = false
resume next
End Sub
</script:module>