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 Kontext "DocumentChart"
224 printlog "Insert TrendLines"
226 '/// Check existence of dialog
227 Kontext "InsertTrendlinesDialog"
228 Call DialogTest ( InsertTrendlinesDialog )
229 '/// Quit dialog using Cancel button
230 InsertTrendlinesDialog.Cancel
231 Kontext "DocumentCalc"
232 DocumentCalc.TypeKeys "<Escape>"
237 '-------------------------------------------------------------------------
239 testcase tInsertMeanValueLines
240 '///<u><b>Testing Insert::MeanValueLines</b></u>
241 '/// Load simple test document
242 if fLoadVerySimpleChartAndSaveLocal() > 0 then
243 warnlog "Loading test document seems to have failed -> Check this out!"
246 '/// Select chart using navigator
248 '/// Invoke Edit::Object::Edit to enter Inplace Mode
250 '/// Insert::MeanValueLines
251 if fInsertMeanValueLines() > 0 then
252 warnlog "Something went wrong trying to insert mean value lines -> Check this out!"
256 Kontext "DocumentChart"
261 '-------------------------------------------------------------------------
263 testcase tInsertYErrorBars
264 '///<u><b>Dialog test after invocation of Insert::YErrorBars</b></u>
265 '/// Load simple test document
266 if fLoadVerySimpleChartAndSaveLocal() > 0 then
267 warnlog "Loading test document seems to have failed -> Check this out!"
270 '/// Select chart using navigator
272 '/// Invoke Edit::Object::Edit to enter Inplace Mode
274 '/// Invoke Insert::TrendLines
275 if fInvokeInsertYErrorBarsDialog() > 0 then
276 warnlog "Something went wrong trying to invoke YErrorBars Lines dialog -> Check this out!"
280 '/// Check existence of dialog
281 Kontext "InsertYErrorBarsDLG"
282 Call DialogTest ( InsertYErrorBarsDLG )
283 '/// Quit dialog using Cancel button
284 InsertYErrorBarsDLG.Cancel
285 Kontext "DocumentCalc"
286 DocumentCalc.TypeKeys "<Escape>"
291 '-------------------------------------------------------------
293 testcase tInsertSpecialCharacter
294 printlog "Load simple chart document"
295 if fLoadVerySimpleChartAndSaveLocal() > 0 then
296 warnlog "Loading test document seems to have failed -> Check this out!"
299 printlog "Select chart using navigator"
301 printlog "Invoke Edit::Object::Edit to enter Inplace Mode"
303 printlog "Invoke Insert::Titles"
304 if fInvokeTitlesDialog() > 0 then
305 warnlog "Something went wrong trying to invoke Titles dialog -> Check this out! (Previous log may help you)"
309 Kontext "InsertTitleDialog"
310 if fSetTitle(MainTitle , "Test title") = 0 then
311 Kontext "InsertTitleDialog"
313 Kontext "DocumentChart"
314 printlog "Type <TAB> to select the title"
315 DocumentChart.TypeKeys "<TAB>" , TRUE
316 DocumentChart.UseMenu
317 printlog "Select menu 'Insert'"
318 hMenuSelectNr(4) 'INSERT
319 printlog "Select menu item 'Special Character'."
320 hMenuSelectNr(9) 'SPECIAL CHARACTER
321 printlog "Close the 'Insert Special Character'-dialog."
322 Kontext "Sonderzeichen"
323 Call Dialogtest( Sonderzeichen )
326 warnlog "It was not possible to set the title. Test aborted!"
327 Kontext "InsertTitleDialog"
328 InsertTitleDialog.Cancel