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: ch2_insert.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $
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 : oliver.craemer@sun.com
36 '* short description : Chart resource test - Menu INSERT
38 '************************************************************************
44 ' #1 tInsertDataLabels
45 ' #1 tInsertTrendLines
46 ' #1 tInsertMeanValueLines
47 ' #1 tInsertYErrorBars
48 ' #1 tInsertSpecialCharacter
50 '\************************************************************************
53 '///<u><b>Dialog test after invoking Insert::Title</b></u>
54 '/// Load simple chart document
55 if fLoadVerySimpleChartAndSaveLocal() > 0 then
56 warnlog "Loading test document seems to have failed -> Check this out!"
59 '/// Select chart using navigator
61 '/// Invoke Edit::Object::Edit to enter Inplace Mode
63 '/// Convert chart to 3D (this will enable all controls in Titles dialog)
64 if NOT fConvertChartTo3D() then
65 warnlog "Conversion of chart to 3D failed -> Quit testcase"
69 '/// Invoke Insert::Titles
70 if fInvokeTitlesDialog() > 0 then
71 warnlog "Something went wrong trying to invoke Titles dialog -> Check this out! (Previous log may help you)"
75 '/// Check existence of dialog
76 Kontext "InsertTitleDialog"
77 Call DialogTest ( InsertTitleDialog )
78 '/// Quit dialog using Cancel button
79 InsertTitleDialog.Cancel
81 Kontext "DocumentCalc"
82 DocumentCalc.TypeKeys "<Escape>"
86 '-------------------------------------------------------------------------
89 '///<u><b>Dialog test after invocation of Insert::Axes</b></u>
90 '/// Load simple test document
91 if fLoadVerySimpleChartAndSaveLocal() > 0 then
92 warnlog "Loading test document seems to have failed -> Check this out!"
95 '/// Select chart using navigator
97 '/// Invoke Edit::Object::Edit to enter Inplace Mode
99 '/// Invoke Insert::Axes
100 if fInvokeAxesDialog() > 0 then
101 warnlog "Something went wrong trying to invoke Axes dialog -> Check this out! (Previous log may help you)"
105 '/// Check existence of dialog
106 Kontext "InsertAxesDialog"
107 Call DialogTest ( InsertAxesDialog )
108 '/// Quit dialog using Cancel button
109 InsertAxesDialog.Cancel
110 Kontext "DocumentCalc"
111 DocumentCalc.TypeKeys "<Escape>"
116 '-------------------------------------------------------------------------
118 testcase tInsertGrids
119 '///<u><b>Dialog test after invocation of Insert::Grids</b></u>
120 '/// Load simple test document
121 if fLoadVerySimpleChartAndSaveLocal() > 0 then
122 warnlog "Loading test document seems to have failed -> Check this out!"
125 '/// Select chart using navigator
127 '/// Invoke Edit::Object::Edit to enter Inplace Mode
129 '/// Invoke Insert::Grids
130 if fInvokeGridsDialog() > 0 then
131 warnlog "Something went wrong trying to invoke Grids dialog -> Check this out! (Previous log may help you)"
135 '/// Check existence of dialog
136 Kontext "InsertGridsDialog"
137 Call DialogTest ( InsertGridsDialog )
138 '/// Quit dialog using Cancel button
139 InsertGridsDialog.Cancel
140 Kontext "DocumentCalc"
141 DocumentCalc.TypeKeys "<Escape>"
146 '-------------------------------------------------------------------------
148 testcase tInsertLegend
149 '///<u><b>Dialog test after invocation of Insert::Legend</b></u>
150 '/// Load simple test document
151 if fLoadVerySimpleChartAndSaveLocal() > 0 then
152 warnlog "Loading test document seems to have failed -> Check this out!"
155 '/// Select chart using navigator
157 '/// Invoke Edit::Object::Edit to enter Inplace Mode
159 '/// Invoke Insert::Legend
160 if fInvokeLegendDialog() > 0 then
161 warnlog "Something went wrong trying to invoke Legend dialog -> Check this out! (Previous log may help you)"
165 '/// Check existence of dialog
166 Kontext "InsertLegendDialog"
167 Call DialogTest ( InsertLegendDialog )
168 '/// Quit dialog using Cancel button
169 InsertLegendDialog.Cancel
170 Kontext "DocumentCalc"
171 DocumentCalc.TypeKeys "<Escape>"
176 '-------------------------------------------------------------------------
178 testcase tInsertDataLabels
179 '///<u><b>Dialog test after invocation of Insert::Data Labels</b></u>
180 '/// Load simple test document
181 if fLoadVerySimpleChartAndSaveLocal() > 0 then
182 warnlog "Loading test document seems to have failed -> Check this out!"
185 '/// Select chart using navigator
187 '/// Invoke Edit::Object::Edit to enter Inplace Mode
189 '/// Invoke Insert::Data Labels
190 if fInvokeDataLabelsDialog() > 0 then
191 warnlog "Something went wrong trying to invoke Labels dialog -> Check this out!"
195 '/// Check 'Show Value' to enable all controls
196 Kontext "InsertLabelsDialog"
197 if fSetShowValue ( TRUE ) > 0 then
198 warnlog "Something went wrong trying to check 'Show Value' -> Check this out!"
200 '/// Check existence of dialog
201 Call DialogTest ( InsertLabelsDialog )
202 '/// Quit dialog using Cancel button
203 InsertLabelsDialog.Cancel
204 Kontext "DocumentCalc"
205 DocumentCalc.TypeKeys "<Escape>"
210 '-------------------------------------------------------------------------
212 testcase tInsertTrendLines
213 '///<u><b>Dialog test after invocation of Insert::TrendLines</b></u>
214 '/// Load simple test document
215 if fLoadVerySimpleChartAndSaveLocal() > 0 then
216 warnlog "Loading test document seems to have failed -> Check this out!"
219 '/// Select chart using navigator
221 '/// Invoke Edit::Object::Edit to enter Inplace Mode
223 '/// Invoke Insert::TrendLines
224 if fInvokeTrendLinesDialog() > 0 then
225 warnlog "Something went wrong trying to invoke Trend Lines dialog -> Check this out!"
229 '/// Check existence of dialog
230 Kontext "InsertTrendlinesDialog"
231 Call DialogTest ( InsertTrendlinesDialog )
232 '/// Quit dialog using Cancel button
233 InsertTrendlinesDialog.Cancel
234 Kontext "DocumentCalc"
235 DocumentCalc.TypeKeys "<Escape>"
240 '-------------------------------------------------------------------------
242 testcase tInsertMeanValueLines
243 '///<u><b>Testing Insert::MeanValueLines</b></u>
244 '/// Load simple test document
245 if fLoadVerySimpleChartAndSaveLocal() > 0 then
246 warnlog "Loading test document seems to have failed -> Check this out!"
249 '/// Select chart using navigator
251 '/// Invoke Edit::Object::Edit to enter Inplace Mode
253 '/// Insert::MeanValueLines
254 if fInsertMeanValueLines() > 0 then
255 warnlog "Something went wrong trying to insert mean value lines -> Check this out!"
259 Kontext "DocumentChart"
264 '-------------------------------------------------------------------------
266 testcase tInsertYErrorBars
267 '///<u><b>Dialog test after invocation of Insert::YErrorBars</b></u>
268 '/// Load simple test document
269 if fLoadVerySimpleChartAndSaveLocal() > 0 then
270 warnlog "Loading test document seems to have failed -> Check this out!"
273 '/// Select chart using navigator
275 '/// Invoke Edit::Object::Edit to enter Inplace Mode
277 '/// Invoke Insert::TrendLines
278 if fInvokeInsertYErrorBarsDialog() > 0 then
279 warnlog "Something went wrong trying to invoke YErrorBars Lines dialog -> Check this out!"
283 '/// Check existence of dialog
284 Kontext "InsertYErrorBarsDLG"
285 Call DialogTest ( InsertYErrorBarsDLG )
286 '/// Quit dialog using Cancel button
287 InsertYErrorBarsDLG.Cancel
288 Kontext "DocumentCalc"
289 DocumentCalc.TypeKeys "<Escape>"
294 '-------------------------------------------------------------
296 testcase tInsertSpecialCharacter
297 printlog "Load simple chart document"
298 if fLoadVerySimpleChartAndSaveLocal() > 0 then
299 warnlog "Loading test document seems to have failed -> Check this out!"
302 printlog "Select chart using navigator"
304 printlog "Invoke Edit::Object::Edit to enter Inplace Mode"
306 printlog "Invoke Insert::Titles"
307 if fInvokeTitlesDialog() > 0 then
308 warnlog "Something went wrong trying to invoke Titles dialog -> Check this out! (Previous log may help you)"
312 Kontext "InsertTitleDialog"
313 if fSetTitle(MainTitle , "Test title") = 0 then
314 Kontext "InsertTitleDialog"
316 Kontext "DocumentChart"
317 printlog "Type <TAB> to select the title"
318 DocumentChart.TypeKeys "<TAB>" , TRUE
319 DocumentChart.UseMenu
320 printlog "Select menu 'Insert'"
321 hMenuSelectNr(4) 'INSERT
322 printlog "Select menu item 'Special Character'."
323 hMenuSelectNr(9) 'SPECIAL CHARACTER
324 printlog "Close the 'Insert Special Character'-dialog."
325 Kontext "Sonderzeichen"
326 Call Dialogtest( Sonderzeichen )
329 warnlog "It was not possible to set the title. Test aborted!"
330 Kontext "InsertTitleDialog"
331 InsertTitleDialog.Cancel