?prevdifflink? - 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="Tests" script:language="StarBasic">REM ***** BASIC *****
Option Explicit
' =====================================
Sub Init
BasicLibraries.loadLibrary( "HaExcelDev" )
End Sub
' =====================================
Sub Test_StringToRange_001
Dim str As String
Dim addr As Object
str = "$Folha2.$A$4:$C$10"
addr = StringToRange( ThisComponent, str )
End Sub
' =====================================
Sub Test_GetClasses_001
Dim oDoc As Object
oDoc = ThisComponent
classes = GetClasses( oDoc )
End Sub
' =====================================
Sub Test_GetRootClasses_001
Dim oDoc As Object
oDoc = ThisComponent
classes = GetRootClasses( oDoc )
End Sub
' =====================================
Sub Test_InstantiateCell_001
oDoc = ThisComponent
oSheet = oDoc.getCurrentController.getActiveSheet
oCell = oSheet.getCellByPosition( 0, 0 )
oDest = oSheet.getCellByPosition( 1, 0 )
InstantiateCell( oCell, oDest )
End Sub
' =====================================
' FIXME two forms with same name can be added
Sub Test_InstantiateExpansion_001
Dim oDoc As Object
Dim exp As String
Dim dataSheet As Integer
oDoc = ThisComponent
exp = "name,$Folha1.$A$7:$E$7,1"
dataSheet = 1
InstantiateExpansion( oDoc, exp, dataSheet )
End Sub
' =====================================
Sub Test_InstantiateClass_001
Dim oDoc As Object
Dim class As String
Dim dataSheet As Integer
oDoc = ThisComponent
class = "MyClass,$Folha1.$A$1:$F$7,0,0"
dataSheet = 1
InstantiateClass( oDoc, class, dataSheet )
End Sub
' =====================================
Sub Test_InstantiateModel_001
Dim oDoc As Object
Dim dataSheet As Integer
oDoc = ThisComponent
dataSheet = 1
InstantiateModel( oDoc, dataSheet )
End Sub
' =====================================
Sub Test_FormExists_001
Dim oDoc As Object
Dim oSheet As Object
Dim str As String
Dim result As Boolean
oDoc = ThisComponent
oSheet = oDoc.Sheets(0)
str = "MyForm"
result = FormExists(oDoc, oSheet, str)
If result Then
msgbox "Form '" & str & "' exists."
Else
msgbox "Form '" & str & "' does not exist."
End If
End Sub
' =====================================
</script:module>
Generated by GNU Enscript 1.6.5.90.
|