merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / basic / ifc / util / XCloneable / util_XCloneable.xba
blob63cce82634c4e7ee93b59a32d9659fb22ec7fe73
1 <?xml version="1.0" encoding="UTF-8"?>
2 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XCloneable" script:language="StarBasic">
4 '*************************************************************************
6 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 '
8 ' Copyright 2008 by Sun Microsystems, Inc.
10 ' OpenOffice.org - a multi-platform office productivity suite
12 ' $RCSfile: util_XCloneable.xba,v $
14 ' $Revision: 1.4 $
16 ' This file is part of OpenOffice.org.
18 ' OpenOffice.org is free software: you can redistribute it and/or modify
19 ' it under the terms of the GNU Lesser General Public License version 3
20 ' only, as published by the Free Software Foundation.
22 ' OpenOffice.org is distributed in the hope that it will be useful,
23 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
24 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ' GNU Lesser General Public License version 3 for more details
26 ' (a copy is included in the LICENSE file that accompanied this code).
28 ' You should have received a copy of the GNU Lesser General Public License
29 ' version 3 along with OpenOffice.org. If not, see
30 ' <http://www.openoffice.org/license.html>
31 ' for a copy of the LGPLv3 License.
33 '*************************************************************************
34 '*************************************************************************
36 '*************************************************************************
37 ' This Interface/Service test depends on the following GLOBAL variables,
38 ' which must be specified in the object creation:
40 ' NONE
42 '*************************************************************************
44 ' Be sure that all variables are dimensioned:
45 option explicit
47 Sub RunTest()
49 '*************************************************************************
50 ' INTERFACE:
51 ' com.sun.star.util.XCloneable
52 '*************************************************************************
53 On Error Goto ErrHndl
54 Dim bOK As Boolean
55 Dim oClone as Object
58 Test.StartMethod("createClone()")
59 bOK = TRUE
60 oClone = oObj.createClone()
61 bOK = bOK AND hasUnoInterfaces(oClone, "com.sun.star.util.XCloneable")
62 Test.MethodTested("createClone()", bOK)
64 Exit Sub
65 ErrHndl:
66 Test.Exception()
67 bOK = false
68 resume next
69 End Sub
70 </script:module>