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=
"awt_XDateField" script:
language=
"StarBasic">
6 '*************************************************************************
8 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
10 ' Copyright
2008 by Sun Microsystems, Inc.
12 ' OpenOffice.org - a multi-platform office productivity suite
14 ' $RCSfile: awt_XDateField.xba,v $
18 ' This file is part of OpenOffice.org.
20 ' OpenOffice.org is free software: you can redistribute it and/or modify
21 ' it under the terms of the GNU Lesser General Public License version
3
22 ' only, as published by the Free Software Foundation.
24 ' OpenOffice.org is distributed in the hope that it will be useful,
25 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
26 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ' GNU Lesser General Public License version
3 for more details
28 ' (a copy is included in the LICENSE file that accompanied this code).
30 ' You should have received a copy of the GNU Lesser General Public License
31 ' version
3 along with OpenOffice.org. If not, see
32 '
<http://www.openoffice.org/license.html
>
33 ' for a copy of the LGPLv3 License.
35 '*************************************************************************
36 '*************************************************************************
44 '*************************************************************************
46 ' com.sun.star.awt.XDateField
47 '*************************************************************************
52 Test.StartMethod(
"setDate()")
55 Test.StartMethod(
"getDate()")
56 bOK = bOK AND (oObj.getDate() =
5087)
57 Test.MethodTested(
"setDate()", bOK)
58 Test.MethodTested(
"getDate()", bOK)
60 Test.StartMethod(
"setMin()")
63 Test.StartMethod(
"getMin()")
64 bOK = bOK AND (oObj.getMin() =
4978)
65 Test.MethodTested(
"setMin()", bOK)
66 Test.MethodTested(
"getMin()", bOK)
68 Test.StartMethod(
"setMax()")
71 Test.StartMethod(
"getMax()")
72 bOK = bOK AND (oObj.getMax() =
27856)
73 Test.MethodTested(
"setMax()", bOK)
74 Test.MethodTested(
"getMax()", bOK)
76 Test.StartMethod(
"setFirst()")
79 Test.StartMethod(
"getFirst()")
80 bOK = bOK AND (oObj.getfirst() =
5118)
81 Test.MethodTested(
"setFirst()", bOK)
82 Test.MethodTested(
"getFirst()", bOK)
84 Test.StartMethod(
"setLast()")
87 Test.StartMethod(
"getLast()")
88 bOK = bOK AND (oObj.getLast() =
23450)
89 Test.MethodTested(
"setLast()", bOK)
90 Test.MethodTested(
"getLast()", bOK)
92 Test.StartMethod(
"setLongFormat()")
94 oObj.setLongFormat(true)
95 Test.StartMethod(
"isLongFormat()")
96 bOK = bOK AND oObj.isLongFormat()
97 oObj.setLongFormat(false)
98 bOK = bOK AND NOT oObj.isLongFormat()
99 Test.MethodTested(
"setLongFormat()", bOK)
100 Test.MethodTested(
"isLongFormat()", bOK)
102 Test.StartMethod(
"isEmpty()")
105 bOK = bOK AND NOT oObj.isEmpty()
106 Test.StartMethod(
"setEmpty()")
108 Test.MethodTested(
"setEmpty()", bOK)
109 Test.MethodTested(
"isEmpty()", bOK)
111 Test.StartMethod(
"setStrictFormat()")
113 oObj.setStrictFormat(true)
114 Test.StartMethod(
"isStrictFormat()")
115 bOK = bOK AND oObj.isStrictFormat()
116 oObj.setStrictFormat(false)
117 bOK = bOK AND NOT oObj.isStrictFormat()
118 Test.MethodTested(
"setStrictFormat()", bOK)
119 Test.MethodTested(
"isStrictFormat()", bOK)