1<?xml version="1.0" encoding="UTF-8"?>
2<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_MailMerge" script:language="StarBasic">
3
4'*************************************************************************
5'
6'  Licensed to the Apache Software Foundation (ASF) under one
7'  or more contributor license agreements.  See the NOTICE file
8'  distributed with this work for additional information
9'  regarding copyright ownership.  The ASF licenses this file
10'  to you under the Apache License, Version 2.0 (the
11'  "License"); you may not use this file except in compliance
12'  with the License.  You may obtain a copy of the License at
13'
14'    http://www.apache.org/licenses/LICENSE-2.0
15'
16'  Unless required by applicable law or agreed to in writing,
17'  software distributed under the License is distributed on an
18'  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19'  KIND, either express or implied.  See the License for the
20'  specific language governing permissions and limitations
21'  under the License.
22'
23'*************************************************************************
24
25
26
27'*************************************************************************
28' This Interface/Service test depends on the following GLOBAL variables,
29' which must be specified in the object creation:
30
31'	Global cMailMerge_DocumentURL as String
32'   cMailMerge_DocumentURL must be a valid Document URL
33
34'*************************************************************************
35
36' Be sure that all variables are dimensioned:
37option explicit
38
39Sub RunTest()
40
41'*************************************************************************
42' INTERFACE:
43' com.sun.star.text.MailMerge
44'*************************************************************************
45On Error Goto ErrHndl
46    Dim bOK As Boolean
47
48    PropertyTester.TestProperty("DataSourceName")
49
50	Dim DataCommandTypes(2) as Integer
51	DataCommandTypes(0) = com.sun.star.sdb.CommandType.TABLE
52	DataCommandTypes(1) = com.sun.star.sdb.CommandType.QUERY
53	DataCommandTypes(2) = com.sun.star.sdb.CommandType.COMMAND
54    PropertyTester.TestProperty("CommandType", DataCommandTypes())
55
56    PropertyTester.TestProperty("Command")
57
58    PropertyTester.TestProperty("ResultSet")
59
60    PropertyTester.TestProperty("ActiveConnection")
61
62    PropertyTester.TestProperty("Selection", Array(Array(2,4), Array(1,3)))
63
64    PropertyTester.TestProperty("EscapeProcessing", )
65
66    PropertyTester.TestProperty("Filter")
67
68    PropertyTester.TestProperty("DocumentURL", Array(cMailMerge_DocumentURL))
69
70    PropertyTester.TestProperty("Model")
71
72    PropertyTester.TestProperty("OutputType")
73
74    PropertyTester.TestProperty("SinglePrintJobs")
75
76    PropertyTester.TestProperty("OutputURL", Array(ConvertToURL(utils.getUserPath())))
77
78    PropertyTester.TestProperty("FileNameFromColumn")
79
80    PropertyTester.TestProperty("FileNamePrefix")
81
82Exit Sub
83ErrHndl:
84    Test.Exception()
85    bOK = false
86    resume next
87End Sub
88
89</script:module>
90