blob: 86844b6564c0e92787d4343c08aa9818c96c1903 [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="table_XTableChart" 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
Sub RunTest()
'*************************************************************************
' INTERFACE:
' com.sun.star.table.XTableChart
'*************************************************************************
On Error Goto ErrHndl
Dim bOK As Boolean
Dim tAddr(0) As New com.sun.star.table.CellRangeAddress
Dim objAddr As Object
Test.StartMethod("getHasColumnHeaders()")
bOK = true
bOK = bOK AND NOT isNULL(oObj.getHasColumnHeaders())
Test.MethodTested("getHasColumnHeaders()", bOK)
Test.StartMethod("setHasColumnHeaders()")
bOK = true
oObj.setHasColumnHeaders(true)
bOK = bOK AND oObj.getHasColumnHeaders() = true
oObj.setHasColumnHeaders(false)
bOK = bOK AND oObj.getHasColumnHeaders() = false
Test.MethodTested("setHasColumnHeaders()", bOK)
Test.StartMethod("getHasRowHeaders()")
bOK = true
bOK = bOK AND NOT isNULL(oObj.getHasRowHeaders())
Test.MethodTested("getHasRowHeaders()", bOK)
Test.StartMethod("setHasRowHeaders()")
bOK = true
oObj.setHasRowHeaders(true)
bOK = bOK AND oObj.getHasRowHeaders()
oObj.setHasRowHeaders(false)
bOK = bOK AND oObj.getHasRowHeaders() = false
Test.MethodTested("setHasRowHeaders()", bOK)
Test.StartMethod("getRanges()")
bOK = true
bOK = bOK AND NOT isNULL(oObj.getRanges())
Test.MethodTested("getRanges()", bOK)
Test.StartMethod("setRanges()")
bOK = true
tAddr(0).Sheet = 0
tAddr(0).StartRow = 0
tAddr(0).StartColumn = 0
tAddr(0).EndRow = 3
tAddr(0).EndColumn = 3
oObj.setRanges(tAddr())
objAddr = oObj.getRanges()
bOK = bOK AND NOT isNULL(objAddr)
if bOK then
Out.Log("oChart.getRanges() returned array of " &amp; ubound(objAddr) + 1 &amp; " element(s)")
bOK = bOK AND (ubound(objAddr) &lt;&gt; -1)
end if
Test.MethodTested("setRanges()", bOK)
Exit Sub
ErrHndl:
Test.Exception()
bOK = false
resume next
End Sub
</script:module>