1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: rpt_Formating.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 07:43:42 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : marc.neumann@sun.com
36 '* short description : Formating
38 '\***********************************************************************************
41 printlog "------------------ rpt_Formating.inc ---------------------"
43 call tConditionalFormating
47 '-------------------------------------------------------------------------
48 '-------------------------------------------------------------------------
49 '-------------------------------------------------------------------------
50 testcase tConditionalFormating
54 '/// open Bibliography database
55 printlog "open Bibliography database"
56 call fOpenDataBase(gOfficePath + ConvertPath("user/database/biblio.odb"))
58 '/// open the report designer
59 printlog "open the report designer"
60 call fOpenNewReportDesign
64 '/// insert a data control
65 printlog "insert a data control"
66 Kontext "FormControls"
70 Kontext "ReportDesign"
71 ReportDesign.MouseDown ( 30, 50 )
72 ReportDesign.MouseMove ( 40, 60 )
73 ReportDesign.MouseUp ( 40, 60 )
76 '/// open the conditional formating dialog via the menu
77 printlog "open the conditional formating dialog via the menu"
78 Kontext "ReportDesign"
83 '/// check if there is one condition
84 printlog "check if there is one condition"
86 '/// add 2 more conditions and check if the dialog grows
87 printlog "add 2 more conditions and check if the dialog grows"
89 '/// add one more condition and check if the scrollbar gets enabled
90 printlog "add one more condition and check if the scrollbar gets enabled"
92 '/// check if the right condition is displayed
93 printlog "check if the right condition is displayed"
95 '/// remove the second condition and check if the scrollbar gets disabled
96 printlog "remove the second condition and check if the scrollbar gets disabled"
98 '/// remove 2 conditions and check if the dialog skrink
99 printlog "remove 2 conditions and check if the dialog skrink"
101 '/// close the Conditional Formating Dialog
102 printlog "close the Conditional Formating Dialog"
103 Kontext "ConditionalFormating"
104 ConditionalFormating.OK
106 '/// close the report designer
107 printlog "close the report designer"
108 call fCloseReportDesign
110 '/// close the database
111 printlog "close the database"
115 '-------------------------------------------------------------------------
116 testcase tGrowAndShrink
118 dim iCount as Integer
119 dim iSizeY as Integer
121 '/// open Bibliography database
122 printlog "open Bibliography database"
123 call fOpenDataBase(gOfficePath + ConvertPath("user/database/biblio.odb"))
125 '/// open the report designer
126 printlog "open the report designer"
127 call fOpenNewReportDesign
131 '/// insert a data control
132 printlog "insert a data control"
133 Kontext "FormControls"
137 Kontext "ReportDesign"
138 ReportDesign.MouseDown ( 30, 50 )
139 ReportDesign.MouseMove ( 40, 60 )
140 ReportDesign.MouseUp ( 40, 60 )
143 '/// open the conditional formating dialog via the menu
144 printlog "open the conditional formating dialog via the menu"
145 Kontext "ReportDesign"
152 '/// add 1 more conditions and check if the dialog grows
153 printlog "add 1 more conditions and check if the dialog grows"
155 Kontext "ConditionalFormating"
157 iSizeY = ConditionalFormating.getSizeY()
158 ' add one more condition
159 ConditionalFormating.TypeKeys("<TAB>",true)
160 ConditionalFormating.TypeKeys("<TAB>",true)
161 ConditionalFormating.TypeKeys("<TAB>",true)
162 ConditionalFormating.TypeKeys("<RETURN>",true)
163 'compare the both height
164 if (iSizeY >= ConditionalFormating.getSizeY()) then
165 warnlog "the dialog doesn't grow"
168 '/// remove 1 conditions and check if the dialog skrink
169 printlog "remove 1 conditions and check if the dialog skrink"
170 Kontext "ConditionalFormating"
172 iSizeY = ConditionalFormating.getSizeY()
173 ' add one more condition
174 ConditionalFormating.TypeKeys("<TAB>",true)
175 ConditionalFormating.TypeKeys("<TAB>",true)
176 ConditionalFormating.TypeKeys("<TAB>",true)
177 ConditionalFormating.TypeKeys("<TAB>",true)
178 ConditionalFormating.TypeKeys("<TAB>",true)
179 ConditionalFormating.TypeKeys("<RETURN>",true)
180 'compare the both height
181 if (iSizeY <= ConditionalFormating.getSizeY()) then
182 warnlog "the dialog doesn't shrink"
185 ConditionalFormating.Close()
187 '/// add one more condition and check if the scrollbar gets enabled
188 printlog "add one more condition and check if the scrollbar gets enabled"
190 '/// check if the right condition is displayed
191 printlog "check if the right condition is displayed"
193 '/// remove the second condition and check if the scrollbar gets disabled
194 printlog "remove the second condition and check if the scrollbar gets disabled"
198 '/// close the report designer
199 printlog "close the report designer"
200 call fCloseReportDesign
202 '/// close the database
203 printlog "close the database"
207 '-------------------------------------------------------------------------