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="sc_ScIndexEnumeration_LabelRangesEnumeration" 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 
37 Sub CreateObj()
38 
39 '*************************************************************************
40 ' COMPONENT:
41 ' sc.ScIndexEnumeration_LabelRangesEnumeration
42 '*************************************************************************
43 On Error Goto ErrHndl
44     Dim bOK As Boolean
45     Dim RangeAddress1 As New com.sun.star.table.CellRangeAddress
46     Dim RangeAddress2 As New com.sun.star.table.CellRangeAddress
47     Dim oRanges As Object
48 
49     bOK = true
50     oDoc = utils.createDocument("scalc", cObjectName)
51 
52     oRanges = oDoc.getPropertyValue("ColumnLabelRanges")
53     RangeAddress1.Sheet = 0
54     RangeAddress1.StartColumn = 1
55     RangeAddress1.StartRow = 1
56     RangeAddress1.EndColumn = 2
57     RangeAddress1.EndRow = 2
58 
59     RangeAddress2.Sheet = 0
60     RangeAddress2.StartColumn = 5
61     RangeAddress2.StartRow = 5
62     RangeAddress2.EndColumn = 6
63     RangeAddress2.EndRow = 7
64 
65     oRanges.addNew(RangeAddress1, RangeAddress2)
66 
67     oObj = oRanges.createEnumeration()
68 
69 Exit Sub
70 ErrHndl:
71     Test.Exception()
72 End Sub
73 </script:module>
74