blob: 77916f77646b90062c938a67e851520182ab7e8b [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="sc_ScIndexEnumeration_CellAnnotationsEnumeration" 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
' REQUIRED VARIABLES for interface/service tests:
Sub CreateObj()
'*************************************************************************
' COMPONENT:
' sc.ScIndexEnumeration_CellAnnotationsEnumeration
'*************************************************************************
On Error Goto ErrHndl
Dim oSheets as Object, oSheet as Object
Dim oAnnotations as Object
Dim oCell1 as Object, oCell2 as Object
Dim oAnno1 as Object, oAnno2 As Object
oDoc = utils.createDocument("scalc", cObjectName)
' get a sheet
oSheets = oDoc.getSheets()
oSheet = oSheets.getByIndex(0)
' filling cells with values...
oSheet.getCellByPosition(5, 5).setValue(15)
oSheet.getCellByPosition(1, 4).setValue(10)
oSheet.getCellByPosition(2, 0).setValue(-5.15)
Out.Log("Creating two annotations...")
oCell1 = oSheet.getCellByPosition(3, 5)
oAnno1 = oCell1.Annotation
oAnno1.setString("ScAnnotationsObj Anno 1")
oCell2 = oSheet.getCellByPosition(3, 6)
oAnno2 = oCell2.Annotation
oAnno2.setString("ScAnnotationsObj Anno 2")
' get annotations
oAnnotations = oSheet.getAnnotations()
oObj = oAnnotations.createEnumeration()
Exit Sub
ErrHndl:
Test.Exception()
End Sub
</script:module>