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_lvl1_wizard.inc,v $
13 '* last change: $Author: obo $ $Date: 2008-07-22 10:36:56 $
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 wizard general functionality
38 '************************************************************************
40 ' #1 tCreateNew3DChart ' Create a new 3D chart and check the preserved values
41 ' #1 tCreateNewLineChart ' Create a new line chart and check the preserved values
43 '\************************************************************************
45 testcase tCreateNew3DChart
46 Dim sInputFile as STRING
47 Dim sOutputFile as STRING
48 Dim sControlString as STRING
49 Dim iChartVariant as integer
50 Dim iChartVariantText as string
53 sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" )
54 sOutputFile = convertpath ( gOfficePath & "user/work/tCreateNew3DChart.ods" )
56 printlog "Load test document TesttoolPath/chart2/optional/input/randomData.ods"
57 call hFileOpen(sInputFile)
59 printlog "Save document as OfficePath/user/work/tCreateNew3DChart.ods"
60 if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
61 warnlog "Saving test document localy failed -> Aborting"
65 printlog "Insert / Chart"
69 printlog "Choose the Chart type bar (should be the second in the top-down list)"
70 if fSetChartType( "bar" ) > 0 then
71 warnlog "Something went wrong setting chart type to BAR."
73 printlog "Select 2nd chart variant from left"
74 if fSetChartTypeVariant( 2 ) > 0 then
75 warnlog "Something went wrong setting chart type VARIANT."
77 printlog "Check 3D Look checkbox"
78 if fSetChartType3D( TRUE ) > 0 then
79 warnlog "Something went wrong setting 3D chart."
81 printlog "Change Chart type look to simple"
82 if fSetChartLook3D( "simple" ) > 0 then
83 warnlog "Something went wrong setting 3D look."
85 printlog "Change Chart shape to cone"
86 if fSetChartShape3D( "cone" ) > 0 then
87 warnlog "Something went wrong setting 3D shape."
89 printlog "Change to Data Range tab page by clicking the Next-button"
92 Kontext "TabChartTypeDataRange"
93 printlog "Set data range text box to $Sheet1.$A$2:$E$13"
94 if fSetTextBox ( DataRange , "$Sheet1.$A$2:$E$13" ) > 0 then
95 warnlog "Something went wrong setting Text."
97 printlog "Select data series in Rows radiobox"
98 if fSetRadioButton ( Rows ) > 0 then
99 warnlog "Something went wrong selecting 'Data Series in: Rows'."
101 printlog "Uncheck First row as label checkbox"
102 if fSetCheckBox ( FirstRowAsLabel , FALSE ) > 0 then
103 warnlog "Something went wrong unselecting 'First row as label'."
105 printlog "Change to Data Series tab page by clicking the Next-button"
106 Kontext "ChartWizard"
108 Kontext "TabChartTypeDataSeries"
109 printlog "Select last (12th) entry in Data Series list on the left"
110 if fSetListBoxByItem ( DataSeries , 12 ) > 0 then
111 warnlog "Something went wrong selecting 'Data Series' item no. 12."
113 printlog "Click on the add-button"
115 printlog "Set Range for Name text field to A17"
116 if fSetTextBox ( RangeFor , "A17" ) > 0 then
117 warnlog "Something went wrong setting Text."
119 printlog "Select 2nd entry in Data Ranges (Y-Values) list on the right"
120 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
121 warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
123 printlog "Set Range for Y-Values text field to B17:E17"
124 if fSetTextBox ( RangeFor , "B17:E17" ) > 0 then
125 warnlog "Something went wrong setting Text."
127 printlog "Change to Chart Elements tab-page by clicking the Next-button"
128 Kontext "ChartWizard"
130 Kontext "TabChartTypeChartElements"
131 printlog "Set 'Title' text box to MyTitle"
132 if fSetTextBox ( Title , "MyTitle" ) > 0 then
133 warnlog "Something went wrong setting Text."
135 printlog "Set 'Subtitle' text box to 1 2 3"
136 if fSetTextBox ( Subtitle , "1 2 3" ) > 0 then
137 warnlog "Something went wrong setting Text."
139 printlog "Set 'X Title' text box to Grått"
140 if fSetTextBox ( TitleXAxis , "Grått" ) > 0 then
141 warnlog "Something went wrong setting Text."
143 printlog "Set 'Y Title' text box to Gräulich"
144 if fSetTextBox ( TitleYAxis , "Gräulich" ) > 0 then
145 warnlog "Something went wrong setting Text."
147 printlog "Set 'Z Title' text box to 灰色"
148 if fSetTextBox ( TitleZAxis , "灰色" ) > 0 then
149 warnlog "Something went wrong setting Text."
151 printlog "Check X Axis-checkbox"
152 if fSetCheckBox ( GridLinesXAxis , TRUE ) > 0 then
153 warnlog "Something went wrong checking 'X Axis'."
155 printlog "Uncheck Y Axis-checkbox"
156 if fSetCheckBox ( GridLinesYAxis , FALSE ) > 0 then
157 warnlog "Something went wrong unchecking 'Y Axis'."
159 printlog "heck Z Axis-checkbox"
160 if fSetCheckBox ( GridLinesZAxis , TRUE ) > 0 then
161 warnlog "Something went wrong checking 'Z Axis'."
163 printlog "Select under Legend (on the right) the Left radio-button"
164 if fSetRadioButton ( PositionLeft ) > 0 then
165 warnlog "Something went wrong selecting 'Legend Display Left'."
167 printlog "Click the Finish-button"
168 Kontext "ChartWizard"
171 printlog "File / Save"
173 Kontext "DocumentCalc"
174 printlog "Press ESCAPE button (deselecting the OLE object)"
175 DocumentCalc.TypeKeys "<Escape>"
176 printlog "Close the document"
179 printlog "Open saved file again"
180 call hFileOpen(sOutputFile)
182 printlog "Select chart OLE using navigator"
184 printlog "Edit / Object / Edit to enter inplace mode of the chart"
185 printlog "(enabling the chart menus and editing possibilities)"
187 printlog "Format / Chart Type"
191 printlog "Check if chart type is 'bar'"
192 if ChooseType.GetSelIndex <> 2 Then
193 warnlog "Selected chart type (bar) wasn't preserved after save and reload."
195 printlog "Check that variant is 'stacked'"
196 iChartVariant = variant.GetSelIndex
197 iChartVariantText = variant.GetSelText(iChartVariant)
198 printlog "Check that the chart variant is 'Stacked' (2nd entry)"
199 if iChartVariant <> 2 then
200 warnlog "Instead of chart variant 'Stacked' (2) the variant " & iChartVariant & "(" & iChartVariantText & ") has been used - FAILED"
202 printlog "Check the the '3D Look' box is checked"
203 if NOT Look3D.IsChecked then
204 warnlog "Check box 3D (enabled) wasn't preserved after save and reload."
206 printlog "Check that 3D look is 'simple' (=default)"
207 if Scheme3D.GetSelIndex <> 1 then
208 warnlog "Default 3D Look ('simple') has not been preserved after save and reload."
210 printlog "Check that 3D shape 'cone' is selected"
211 if BarColumnShape.GetSelIndex <> 3 Then
212 warnlog "3D Shape CONE wasn't preserved after save and reload."
215 printlog "Leave dialog with CANCEL button."
217 printlog "Invoke Format / Data Ranges"
219 printlog "Goto tab-page Data Range"
220 printlog "Verify now the made settings in the 'Data Ranges' dialog:"
222 Active.SetPage TabFormatDataRangesDataRange
223 Kontext "TabFormatDataRangesDataRange"
224 if TabFormatDataRangesDataRange.Exists(2) then
225 printlog "Check substrings $A$2:$E$13 and $A$17:$E$17 in 'Data Range'"
226 sControlString = DataRange.GetText
227 if instr ( sControlString , "$A$2:$E$13" ) = 0 Then
228 warnlog "Data range wasn't correctly preserved after save and reload and does not caontain $A$2:$E$13."
230 if instr ( sControlString , "$A$17:$E$17" ) = 0 Then
231 warnlog "#i72241# - Data range wasn't correctly preserved after save and reload and does not contain $A$17:$E$17."
233 printlog "Check that radio button 'rows' is checked"
234 if NOT Rows.IsChecked then
235 warnlog "Radio Button ROWS (enabled) wasn't preserved after save and reload."
237 printlog "Check that radio button 'columns is unchecked."
238 if Columns.IsChecked then
239 warnlog "Radio Button COLUMNS (disabled) wasn't preserved after save and reload."
241 printlog "Check if 'First row as label' checkbox is unchecked"
242 if FirstRowAsLabel.IsChecked then
243 warnlog "Check box 'First row as label' (disabled) wasn't preserved after save and reload."
245 printlog "Check that 'First column as label' checkbox is checked."
246 if NOT FirstColumnAsLabel.IsChecked then
247 warnlog "#i72241# - Check box 'First column as label' (enabled) wasn't preserved after save and reload."
250 warnlog "Tab page 'Data Range' not visible!"
252 printlog "Go to tab page 'Data Series'"
254 Active.SetPage TabFormatDataRangesDataSeries
255 Kontext "TabFormatDataRangesDataSeries"
256 if TabFormatDataRangesDataSeries.Exists(2) then
257 printlog "Check if added range (13 in list on the left) was preserved."
258 if fSetListBoxByItem ( DataSeries , 13 ) > 0 then
259 warnlog "Selecting 13th item in Data Series seems to fail. Added range wasn't preserved."
261 printlog "Select 'Name'-entry in Data Ranges list on the right."
262 if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
263 warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
265 printlog "Check that the string $A$17 exists in range for 'Name'"
266 sControlString = RangeFor.GetText
267 printlog "'Range for name' is: " & sControlString
268 if instr ( sControlString , "$A$17" ) = 0 Then
269 warnlog "#i72241# - 'Range for name' wasn't correctly preserved after save and reload."
271 printlog "Select 'Y-Values' in Data Ranges list on the right."
272 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
273 warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
275 printlog "Check that the string $B$17:$E$17 is in range for 'Y-Values'"
276 sControlString = RangeFor.GetText
277 if instr ( sControlString , "$B$17:$E$17" ) = 0 Then
278 warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
284 printlog "Close the dialog with 'cancel'-button"
285 TabFormatDataRangesDataSeries.Cancel
287 warnlog "Tab page 'Data series' not visible!"
289 if fInvokeTitlesDialog() = 0 then
290 printlog "Insert / Title"
291 printlog "Verify now the made settings in the 'Titles' dialog:"
292 Kontext "InsertTitleDialog"
293 printlog "Check that 'Title' text field contains 'MyTitle'"
294 sControlString = MainTitle.GetText
295 if sControlString <> "MyTitle" then
296 warnlog "Title string 'MyTitle' wasn't preserved after save and reload."
298 printlog "Check that 'Subtitle'text field contains 1 2 3"
299 sControlString = SubTitle.GetText
300 if sControlString <> "1 2 3" then
301 warnlog "Subtitle string '1 2 3' wasn't preserved after save and reload."
303 printlog "Check that 'X Title' text field contains Grått"
304 sControlString = TitleXAxis.GetText
305 printlog "'X Title' is: " & sControlString
306 if sControlString <> "Grått" then
307 warnlog "X Title string 'Grått' wasn't preserved after save and reload."
309 printlog "Check that 'Y Title' text field contains 'Gräulich'"
310 sControlString = TitleYAxis.GetText
311 if sControlString <> "Gräulich" then
312 warnlog "Y Title string 'Gräulich' wasn't preserved after save and reload."
314 printlog "Check that 'Z Title' text field contains 灰色"
315 sControlString = TitleZAxis.GetText
316 printlog "'Z Title' is: " & sControlString
317 if sControlString <> "灰色" then
318 warnlog "Z Title string '灰色' wasn't preserved after save and reload."
320 printlog "Close the Title-dialog by pressing 'Cancel'-button"
321 InsertTitleDialog.Cancel
323 if fInvokeGridsDialog() = 0 then
324 printlog "Insert / Grid"
325 Kontext "InsertGridsDialog"
326 printlog "Check that 'Main Grid X Axis' checkbox is checked"
327 if NOT MainGridXaxis.IsChecked then
328 warnlog "Check box 'Gridlines X Axis' (checked) wasn't preserved after save and reload."
330 printlog "Check that 'Main Grid Y Axis' checkbox is checked"
331 if MainGridYaxis.IsChecked then
332 warnlog "Check box 'Gridlines Y Axis' (unchecked) wasn't preserved after save and reload."
334 printlog "Check that 'Main Grid Z Axis' checkbox is checked"
335 if NOT MainGridZaxis.IsChecked then
336 warnlog "Check box 'Gridlines Z Axis' (checked) wasn't preserved after save and reload."
338 printlog "Check that 'Minor Grid X Axis' checkbox is unchecked"
339 if MinorGridXaxis.IsChecked then
340 warnlog "Check box 'Minor Grid X Axis' (unchecked) wasn't preserved after save and reload."
342 printlog "Check that 'Minor Grid Y Axis' checkbox is unchecked"
343 if MinorGridYaxis.IsChecked then
344 warnlog "Check box 'Minor Grid Y Axis' (unchecked) wasn't preserved after save and reload."
346 printlog "Check that 'Minor Grid Z Axis' checkbox is unchecked"
347 if MinorGridZaxis.IsChecked then
348 warnlog "Check box 'Minor Grid Z Axis' (unchecked) wasn't preserved after save and reload."
350 printlog "Leave dialog with Cancel-button."
351 InsertGridsDialog.Cancel
353 if fInvokeLegendDialog() = 0 then
354 printlog "Insert / Legend"
355 Kontext "InsertLegendDialog"
356 printlog "Check that 'Legend Display' checkbox is checked"
357 if NOT Display.IsChecked then
358 warnlog "Check box 'Legend Display' (enabled) wasn't preserved after save and reload."
360 printlog "Check that 'Left' radio button is selected"
361 if NOT PositionLeft.IsChecked then
362 warnlog "Radio button 'Left' (enabled) wasn't preserved after save and reload."
364 printlog "Cancel InsertLegend-dialog"
365 Kontext "InsertLegendDialog"
366 InsertLegendDialog.Cancel
368 Kontext "DocumentCalc"
369 DocumentCalc.TypeKeys "<Escape>"
370 printlog "Close document"
374 '--------------------------------------------------------------------
376 testcase tCreateNewLineChart
377 dim sInputFile as STRING
378 dim sOutputFile as STRING
379 dim sControlString as STRING
380 sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" )
381 sOutputFile = convertpath ( gOfficepath & "user/work/tCreateNewLineChart.ods" )
382 printlog "File / Load TesttoolPath/chart2/optional/input/randomData.ods"
383 call hFileOpen(sInputFile)
385 printlog "Save document as Officepath/user/work/tCreateNewLineChart.ods"
386 if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
387 warnlog "Saving test document localy failed -> Aborting"
391 printlog "Insert / Chart"
393 printlog "Change Chart type to LINE (5th entry from the top)"
395 if NOT ChartType.Exists(5) then
396 warnlog "Chart Wizard was not visible. EXITING!"
399 printlog "Chart Wizard visible."
401 if fSetChartType ( "line" ) > 0 then
402 warnlog "Something went wrong setting chart type to LINE."
404 printlog "Select 3rd Change chart type variant (lines only)"
405 if fSetChartTypeVariant ( 3 ) > 0 then
406 warnlog "Something went wrong setting chart type to 3rd variant (lines only)."
408 printlog "Enable 'Stack Series' and select 'Percent'"
409 if fSetStackSeries ( "percent" ) > 0 then
410 warnlog "Something went wrong setting Stack Series to Percent."
412 '/// Enable 'Smooth Lines'
413 printlog "Enable 'Smooth Lines'"
414 if fSetSmoothLines ( TRUE ) > 0 then
415 warnlog "Something went wrong enabling Smooth Lines."
417 printlog "Invoke 'Smooth Lines' dialog"
418 if fInvokeSmoothLineProperties() > 0 then
419 warnlog "Something went wrong invoking Smooth Lines Dialog."
421 printlog "Check B-Spline"
423 printlog "Set Resolution to 33"
424 Resolution.SetText "33"
425 printlog "et Data Points Order to 5"
426 DataPointsOrder.SetText "5"
427 printlog "Close 'Smooth Lines' dialog"
428 if fCloseSmoothLinePropertiesOK() > 0 then
429 warnlog "Something went wrong closing Smooth Lines Dialog."
431 printlog "Change to Data Range tab-page"
432 Kontext "ChartWizard"
434 Kontext "TabChartTypeDataRange"
435 printlog "Set Data Range text box to $Sheet1.$A$1:$F$13;$Sheet1.$A$17:$F$17"
436 if fSetTextBox ( DataRange , "$Sheet1.$A$1:$F$13;$Sheet1.$A$17:$F$17" ) > 0 then
437 warnlog "Something went wrong setting Text."
439 printlog "Change to Data Series tab-page"
440 Kontext "ChartWizard"
442 Kontext "TabChartTypeDataSeries"
443 printlog "Select 3rd entry in Data Series"
444 if fSetListBoxByItem ( DataSeries , 3 ) > 0 then
445 warnlog "Something went wrong selecting 'Data Series' item No. 3."
447 printlog "Remove series labeled 'John'"
449 printlog "Select 4th entry in Data Series"
450 if fSetListBoxByItem ( DataSeries , 4 ) > 0 then
451 warnlog "Something went wrong selecting 'Data Series' item No. 4."
453 printlog "Select 2nd entry in Data Ranges"
454 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
455 warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
457 printlog "Set 'Range for Y-Values' text box to $Sheet1.$F$2:$F$13;$Sheet1.$D$17"
458 if fSetTextBox ( RangeFor , "$Sheet1.$F$2:$F$13;$Sheet1.$D$17" ) > 0 then
459 warnlog "Something went wrong setting Text."
461 printlog "Set 'Categories' text box to $Sheet1.$A$2:$A$13;$Sheet1.$A$1"
462 if fSetTextBox ( Categories , "$Sheet1.$A$2:$A$13;$Sheet1.$A$19" ) > 0 then
463 warnlog "Something went wrong setting Text."
465 printlog "Change to Chart Elements tab-page"
466 Kontext "ChartWizard"
468 Kontext "TabChartTypeChartElements"
469 printlog "Uncheck 'Y Axis'"
470 if fSetCheckBox ( GridLinesYAxis , FALSE ) > 0 then
471 warnlog "Something went wrong unselecting 'Y Axis'."
473 printlog "Uncheck 'Legend Display'"
474 if fSetCheckBox ( Display , FALSE ) > 0 then
475 warnlog "Something went wrong unselecting 'Legend Display'."
477 printlog "Create Chart by clicking Finish-button"
478 Kontext "ChartWizard"
481 printlog "File / Save"
483 Kontext "DocumentCalc"
484 printlog "Press twice <ESCAPE>-key"
485 DocumentCalc.TypeKeys "<Escape>" , 2
486 printlog "File / Close document"
489 printlog "Open saved file again"
490 call hFileOpen(sOutputFile)
492 printlog "Open the Navigator (F5)"
493 printlog "Select the first OLE object in the Navigator"
495 printlog "Edit / Object / Edit to enter Inplace Mode"
497 printlog "Format / Chart Type"
500 if ChartType.Exists(2) then
501 printlog "Check if chart type is LINE"
502 if ChooseType.GetSelIndex <> 5 then
503 warnlog "Selected chart type wasn't preserved after save and reload."
505 printlog "Check if chart variant is LINES ONLY (third variant in non-CTL versions from the left)"
506 if Variant.GetSelIndex <> 3 then
507 warnlog "Selected chart type variant wasn't preserved after save and reload."
509 printlog "Check if 'Stack Series' box is checked"
510 if NOT StackSeries.IsChecked then
511 warnlog "Check box 'Stack Series' (enabled) wasn't preserved after save and reload."
513 printlog "Check if 'Percent' radio button is checked"
514 if NOT Percent.IsChecked then
515 warnlog "Radio button box 'Percent' (enabled) wasn't preserved after save and reload."
517 printlog "Check if 'Smooth Lines' box is checked"
518 if NOT SmoothLines.IsChecked then
519 warnlog "Check box 'Smooth Lines' (enabled) wasn't preserved after save and reload."
521 printlog "Invoke 'Smooth Lines' dialog"
522 if fInvokeSmoothLineProperties() > 0 then
523 warnlog "Something went wrong invoking Smooth Lines dialog."
525 printlog "Check if 'B-Spline' radio button is checked"
526 if NOT BSpline.IsChecked then
527 warnlog "Radio button box 'B-Spline' (enabled) wasn't preserved after save and reload."
529 printlog "Check if 'Resolution' has value '33'"
530 if Resolution.GetText <> "33" then
531 warnlog "Value for Resolution '33' wasn't preserved after save and reload."
533 printlog "Check if 'Data Points Order' has value '5'"
534 if DataPointsOrder.GetText <> "5" then
535 warnlog "Value for Data Points Order '5' wasn't preserved after save and reload."
537 printlog "Close 'Smooth Lines' dialog"
538 if fCloseSmoothLinePropertiesOK() > 0 then
539 warnlog "Something went wrong closing Smooth Lines Dialog."
541 printlog "Leave Chart Type dialog with Cancel"
543 if ChartType.Exists(2) then
546 warnlog "ChartType dialog was not visible!?"
549 warnlog "Chart Type dialog was not up!"
551 printlog "Format / Data Ranges"
554 Active.SetPage TabChartTypeDataRange
555 Kontext "TabChartTypeDataRange"
556 if TabChartTypeDataRange.Exists(2) then
557 printlog "Check substrings '$A$2:$C$13', '$A$19', '$B$1:$C$13', '$E$1:$F$13' and '$B$17:$E$17' in Data Range"
558 sControlString = DataRange.GetText
559 printlog "Data Range is: " & sControlString
560 if instr ( sControlString , "$A$2:$C$13" ) = 0 Then
561 warnlog "Data range wasn't correctly preserved after save and reload: $A$2:$C$13"
563 if instr ( sControlString , "$A$19" ) = 0 Then
564 warnlog "Data range wasn't correctly preserved after save and reload: $A$19"
566 if instr ( sControlString , "$B$1:$C$13" ) = 0 Then
567 QAErrorlog "#i100780#Data range wasn't correctly preserved after save and reload: $B$1:$C$13"
569 if instr ( sControlString , "$E$1:$F$13" ) = 0 Then
570 warnlog "Data range wasn't correctly preserved after save and reload: $E$1:$F$13"
572 if instr ( sControlString , "$B$17:$E$17" ) = 0 Then
573 warnlog "Data range wasn't correctly preserved after save and reload: $B$17:$E$17"
575 printlog "Check if Radio Button ROWS is checked"
576 if Rows.IsChecked then
577 warnlog "Radio Button ROWS (disabled) wasn't preserved after save and reload."
579 printlog "Check if Radio Button COLUMNS is unchecked"
580 if NOT Columns.IsChecked then
581 warnlog "Radio Button COLUMNS (enabled) wasn't preserved after save and reload."
583 printlog "Check if 'First row as label' box is unchecked"
584 if NOT FirstRowAsLabel.IsChecked then
585 warnlog "Check box 'First row as label' (enabled) wasn't preserved after save and reload."
587 printlog "Check if 'First column as label' box is checked"
588 if NOT FirstColumnAsLabel.IsChecked then
589 warnlog "Check box 'First column as label' (enabled) wasn't preserved after save and reload."
592 warnlog "Tab page Data Range was not up!"
595 printlog "Switch to tab page Data Series"
597 Active.SetPage TabFormatDataRangesDataSeries
598 Kontext "TabChartTypeDataSeries"
599 if TabChartTypeDataSeries.Exists(2) then
600 printlog "Select 4th entry in Data Series"
601 if fSetListBoxByItem ( DataSeries , 4 ) > 0 then
602 warnlog "Selecting 4th item in Data Series failed. EXITING!"
603 TabChartTypeDataSeries.Cancel
607 printlog "Select Name in Data Ranges"
608 if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
609 warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
611 printlog "Check substring '$F$1' in Range for Name"
612 sControlString = RangeFor.GetText
613 printlog "'Range for name' is: " & sControlString
614 if instr ( sControlString , "$F$1" ) = 0 Then
615 warnlog "'Range for name' wasn't correctly preserved after save and reload."
617 printlog "Select Y-Values in Data Ranges"
618 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
619 warnlog "Something went wrong selecting 'Data Ranges' item No. 2. EXITING!"
620 TabChartTypeDataSeries.Cancel
624 printlog "Check substring '$F$2:$F$13' and '$D$17'in Range for Name"
625 sControlString = RangeFor.GetText
626 if instr ( sControlString , "$F$2:$F$13" ) = 0 Then
627 warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
629 if instr ( sControlString , "$D$17" ) = 0 Then
630 warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
632 printlog "Check substring '$A$2:$A$13' and '$A$19'in Categories"
633 sControlString = Categories.GetText
634 if instr ( sControlString , "$A$2:$A$13" ) = 0 Then
635 warnlog "'Categories' wasn't correctly preserved after save and reload."
637 if instr ( sControlString , "$A$19" ) = 0 Then
638 warnlog "'Categories' wasn't correctly preserved after save and reload."
640 printlog "Leave tab page data series with CANCEL"
641 TabChartTypeDataSeries.Cancel
643 warnlog "Tab page Data Series was not up!"
645 printlog "Insert / Title"
647 Kontext "InsertTitleDialog"
648 if InsertTitleDialog.Exists(2) then
649 printlog "Check if 'Title' text box is empty"
650 sControlString = MainTitle.GetText
651 if sControlString <> "" then
652 warnlog "Empty Title string wasn't preserved after save and reload."
654 printlog "Check if 'Subtitle' text box is empty"
655 sControlString = SubTitle.GetText
656 if sControlString <> "" then
657 warnlog "Empty Subtitle string wasn't preserved after save and reload."
659 printlog "Check if 'X Title' text box is empty"
660 sControlString = TitleXaxis.GetText
661 if sControlString <> "" then
662 warnlog "Empty X Title string wasn't preserved after save and reload."
664 printlog "Check if 'Y Title' text box is empty"
665 sControlString = TitleYaxis.GetText
666 if sControlString <> "" then
667 warnlog "Empty Y Title string wasn't preserved after save and reload."
669 printlog "Check if 'Z Title' text box is empty"
670 sControlString = TitleZaxis.GetText
671 if sControlString <> "" then
672 warnlog "Empty Z Title string wasn't preserved after save and reload."
674 printlog "Leaving Title dialog with Cancel"
675 InsertTitleDialog.Cancel
677 warnlog "Title dialog was not up!"
679 printlog "Insert / Grids"
680 If fInvokeGridsDialog = 0 then
681 Kontext "InsertGridsDialog"
682 printlog "Check if 'Gridlines X Axis' box is checked"
683 if MainGridXaxis.IsChecked then
684 warnlog "Check box 'Gridlines X Axis' (disabled) wasn't preserved after save and reload."
686 printlog "Check if 'Gridlines Y Axis' box is unchecked"
687 if MainGridYaxis.IsChecked then
688 warnlog "Check box 'Gridlines Y Axis' (disabled) wasn't preserved after save and reload."
690 printlog "Check if 'Gridlines Z Axis' box is checked"
691 if MainGridZaxis.IsEnabled then
692 warnlog "Check box 'Gridlines Z Axis' shouldn't be enabled after save and reload."
694 printlog "Leave dialog with CANCEL"
695 InsertGridsDialog.Cancel
697 warnlog "Insert Grids dialog was not up!"
699 printlog "Insert / Legend"
700 if fInvokeLegendDialog() = 0 then
701 printlog "Check if 'Legend Display' box is checked"
702 Kontext "InsertLegendDialog"
703 if Display.IsChecked then
704 warnlog "Check box 'Legend Display' (disabled) wasn't preserved after save and reload."
706 printlog "Leave dialog with CANCEL."
707 InsertLegendDialog.Cancel
709 warnlog "Insert Legend dialog was not up!"
711 printlog "Press ESCAPE button (deselecting the OLE object)"
712 Kontext "DocumentCalc"
713 DocumentCalc.TypeKeys "<Escape>"
714 printlog "Close document"
718 '--------------------------------------------------------------------
720 testcase tCreateNewBubbleChart
721 dim sInputFile as STRING
722 dim sOutputFile as STRING
723 dim sControlString as STRING
724 sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/BubbleChartData.ods" )
725 sOutputFile = convertpath ( gOfficepath & "user/work/tCreateNewBubbleChart.ods" )
726 printlog "File / Load TesttoolPath/chart2/optional/input/BubbleChartData.ods"
727 call hFileOpen(sInputFile)
729 printlog "Save document as Officepath/user/work/tCreateNewBubbleChart.ods"
730 if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
731 warnlog "Saving test document localy failed -> Aborting"
735 printlog "Insert / Chart"
737 printlog "Change Chart type to BUBBLE (7th entry from the top)"
739 if NOT ChartType.Exists(5) then
740 warnlog "Chart Wizard was not visible. EXITING!"
743 printlog "Chart Wizard visible."
745 if fSetChartType ( "bubble" ) > 0 then
746 warnlog "Something went wrong setting chart type to Bubble Chart."
748 printlog "Select 1st chart type variant (Bubble Chart)"
749 if fSetChartTypeVariant ( 1 ) > 0 then
750 warnlog "Something went wrong setting chart type to 1st variant (Bubble Chart)."
752 printlog "Change to Data Range tab-page"
753 Kontext "ChartWizard"
755 Kontext "TabChartTypeDataRange"
756 printlog "Set Data Range text box to $Sheet1.$A$2:$C$5;$Sheet1.$A$13:$C$16"
757 if fSetTextBox ( DataRange , "$Sheet1.$A$2:$C$5;$Sheet1.$A$13:$C$16" ) > 0 then
758 warnlog "Something went wrong setting Text."
760 printlog "Change to Data Series tab-page"
761 Kontext "ChartWizard"
763 Kontext "TabChartTypeDataSeries"
765 printlog "Select 1st entry in Data Series"
766 if fSetListBoxByItem ( DataSeries , 1 ) > 0 then
767 warnlog "Something went wrong selecting 'Data Series' item No. 1."
769 printlog "Select 1st entry in Data Ranges"
770 if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
771 warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
773 printlog "Set 'Range for Name' text box to $Sheet1.$C$1"
774 if fSetTextBox ( RangeFor , "$Sheet1.$C$1" ) > 0 then
775 warnlog "Something went wrong setting Text."
777 '### Bubble Sizes ###
778 printlog "Select 2nd entry in Data Ranges"
779 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
780 warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
782 printlog "Set 'Range for Bubble Sizes' text box to $Sheet1.$C$2:$C$5"
783 if fSetTextBox ( RangeFor , "$Sheet1.$C$2:$C$5" ) > 0 then
784 warnlog "Something went wrong setting Text."
787 printlog "Select 3rd entry in Data Ranges"
788 if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
789 warnlog "Something went wrong selecting 'Data Ranges' item No. 3."
791 printlog "Set 'X-Values' text box to $Sheet1.$A$2:$A$5"
792 if fSetTextBox ( RangeFor , "$Sheet1.$A$2:$A$5" ) > 0 then
793 warnlog "Something went wrong setting Text."
796 printlog "Select 4th entry in Data Ranges"
797 if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
798 warnlog "Something went wrong selecting 'Data Ranges' item No. 4."
800 printlog "Set 'Y-Values' text box to $Sheet1.$B$2:$B$5"
801 if fSetTextBox ( RangeFor , "$Sheet1.$B$2:$B$5" ) > 0 then
802 warnlog "Something went wrong setting Text."
804 printlog "Add data series"
807 printlog "Select 1st entry in Data Ranges"
808 if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
809 warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
811 printlog "Set 'Range for Name' text box to $Sheet1.$C$12"
812 if fSetTextBox ( RangeFor , "$Sheet1.$C$12" ) > 0 then
813 warnlog "Something went wrong setting Text."
815 '### Bubble Sizes ###
816 printlog "Select 2nd entry in Data Ranges"
817 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
818 warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
820 printlog "Set 'Range for Bubble Sizes' text box to $Sheet1.$C$13:$C$16"
821 if fSetTextBox ( RangeFor , "$Sheet1.$C$13:$C$16" ) > 0 then
822 warnlog "Something went wrong setting Text."
825 printlog "Select 3rd entry in Data Ranges"
826 if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
827 warnlog "Something went wrong selecting 'Data Ranges' item No. 3."
829 printlog "Set 'X-Values' text box to $Sheet1.$A$13:$A$16"
830 if fSetTextBox ( RangeFor , "$Sheet1.$A$13:$A$16" ) > 0 then
831 warnlog "Something went wrong setting Text."
834 printlog "Select 4th entry in Data Ranges"
835 if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
836 warnlog "Something went wrong selecting 'Data Ranges' item No. 4."
838 printlog "Set 'Y-Values' text box to $Sheet1.$B$13:$B$16"
839 if fSetTextBox ( RangeFor , "$Sheet1.$B$13:$B$16" ) > 0 then
840 warnlog "Something went wrong setting Text."
843 printlog "Change to Chart Elements tab-page"
844 Kontext "ChartWizard"
846 Kontext "TabChartTypeChartElements"
847 printlog "Uncheck 'Y Axis'"
848 if fSetCheckBox ( GridLinesYAxis , FALSE ) > 0 then
849 warnlog "Something went wrong unselecting 'Y Axis'."
851 printlog "Uncheck 'Legend Display'"
852 if fSetCheckBox ( Display , FALSE ) > 0 then
853 warnlog "Something went wrong unselecting 'Legend Display'."
855 printlog "Create Chart by clicking Finish-button"
856 Kontext "ChartWizard"
859 printlog "File / Save"
861 Kontext "DocumentCalc"
862 printlog "Press twice <ESCAPE>-key"
863 DocumentCalc.TypeKeys "<Escape>" , 2
864 printlog "File / Close document"
867 printlog "Open saved file again"
868 call hFileOpen(sOutputFile)
870 printlog "Open the Navigator (F5)"
871 printlog "Select the first OLE object in the Navigator"
873 printlog "Edit / Object / Edit to enter Inplace Mode"
875 printlog "Format / Chart Type"
878 if ChartType.Exists(2) then
879 printlog "Check if chart type is BUBBLE CHART"
880 if ChooseType.GetSelIndex <> 7 then
881 warnlog "Selected chart type wasn't preserved after save and reload."
883 printlog "Check if chart variant is BUBBLE CHART (1st variant in non-CTL versions from the left)"
884 if Variant.GetSelIndex <> 1 then
885 warnlog "Selected chart type variant wasn't preserved after save and reload."
887 printlog "Leave Chart Type dialog with Cancel"
889 if ChartType.Exists(2) then
892 warnlog "ChartType dialog was not visible!?"
895 warnlog "Chart Type dialog was not up!"
897 printlog "Format / Data Ranges"
900 Active.SetPage TabChartTypeDataRange
901 Kontext "TabChartTypeDataRange"
902 if TabChartTypeDataRange.Exists(2) then
903 printlog "Check substrings '$A$2:$C$5', '$C$1', '$B$13:$C$16', '$C$12' in Data Range"
904 sControlString = DataRange.GetText
905 printlog "Data Range is: " & sControlString
906 if instr ( sControlString , "$A$2:$C$5" ) = 0 Then
907 warnlog "Data range wasn't correctly preserved after save and reload: $A$2:$C$13"
909 if instr ( sControlString , "$C$1" ) = 0 Then
910 warnlog "Data range wasn't correctly preserved after save and reload: $A$19"
912 if instr ( sControlString , "$B$13:$C$16" ) = 0 Then
913 QAErrorlog "#i100780#Data range wasn't correctly preserved after save and reload: $B$13:$C$16"
915 if instr ( sControlString , "$C$12" ) = 0 Then
916 warnlog "Data range wasn't correctly preserved after save and reload: $E$1:$F$13"
918 printlog "Check if Radio Button ROWS is checked"
919 if Rows.IsChecked then
920 warnlog "Radio Button ROWS (disabled) wasn't preserved after save and reload."
922 printlog "Check if Radio Button COLUMNS is unchecked"
923 if NOT Columns.IsChecked then
924 warnlog "Radio Button COLUMNS (enabled) wasn't preserved after save and reload."
926 printlog "Check if 'First row as label' box is checked"
927 if NOT FirstRowAsLabel.IsChecked then
928 warnlog "Check box 'First row as label' (checked) wasn't preserved after save and reload."
930 printlog "Check if 'First column as label' box is not checked"
931 if FirstColumnAsLabel.IsChecked then
932 warnlog "Check box 'First column as label' (unchecked) wasn't preserved after save and reload."
935 warnlog "Tab page Data Range was not up!"
938 printlog "Switch to tab page Data Series"
940 Active.SetPage TabFormatDataRangesDataSeries
941 Kontext "TabChartTypeDataSeries"
942 if TabChartTypeDataSeries.Exists(2) then
943 printlog "Select 1st entry in Data Series"
944 if fSetListBoxByItem ( DataSeries , 1 ) > 0 then
945 warnlog "Selecting 1st item in Data Series failed. EXITING!"
946 TabChartTypeDataSeries.Cancel
950 printlog "Select Name in Data Ranges"
951 if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
952 warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
954 printlog "Check substring '$C$1' in Range for Name"
955 sControlString = RangeFor.GetText
956 printlog "'Range for name' is: " & sControlString
957 if instr ( sControlString , "$C$1" ) = 0 Then
958 warnlog "'Range for name' wasn't correctly preserved after save and reload."
961 printlog "Select Bubble Sizes in Data Ranges"
962 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
963 warnlog "Something went wrong selecting 'Data Ranges' item No. 2. EXITING!"
964 TabChartTypeDataSeries.Cancel
968 printlog "Check substring '$C$2:$C$5'in Range for Name"
969 sControlString = RangeFor.GetText
970 if instr ( sControlString , "$C$2:$C$5" ) = 0 Then
971 warnlog "'Range for Bubble Sizes' wasn't correctly preserved after save and reload."
974 printlog "Select X-Values in Data Ranges"
975 if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
976 warnlog "Something went wrong selecting 'Data Ranges' item No. 3. EXITING!"
977 TabChartTypeDataSeries.Cancel
981 printlog "Check substring '$A$2:$A$5' in Range for Name"
982 sControlString = RangeFor.GetText
983 if instr ( sControlString , "$A$2:$A$5" ) = 0 Then
984 warnlog "'Range for X-Values' wasn't correctly preserved after save and reload."
987 printlog "Select Y-Values in Data Ranges"
988 if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
989 warnlog "Something went wrong selecting 'Data Ranges' item No. 4. EXITING!"
990 TabChartTypeDataSeries.Cancel
994 printlog "Check substring '$B$2:$B$5' in Range for Name"
995 sControlString = RangeFor.GetText
996 if instr ( sControlString , "$B$2:$B$5" ) = 0 Then
997 warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
1000 printlog "Select 2nd entry in Data Series"
1001 if fSetListBoxByItem ( DataSeries , 2 ) > 0 then
1002 warnlog "Selecting 1st item in Data Series failed. EXITING!"
1003 TabChartTypeDataSeries.Cancel
1007 printlog "Select Name in Data Ranges"
1008 if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
1009 warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
1011 printlog "Check substring '$C$12' in Range for Name"
1012 sControlString = RangeFor.GetText
1013 printlog "'Range for name' is: " & sControlString
1014 if instr ( sControlString , "$C$12" ) = 0 Then
1015 warnlog "'Range for name' wasn't correctly preserved after save and reload."
1018 printlog "Select Bubble Sizes in Data Ranges"
1019 if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
1020 warnlog "Something went wrong selecting 'Data Ranges' item No. 2. EXITING!"
1021 TabChartTypeDataSeries.Cancel
1025 printlog "Check substring '$C$13:$C$16'in Range for Name"
1026 sControlString = RangeFor.GetText
1027 if instr ( sControlString , "$C$13:$C$16" ) = 0 Then
1028 warnlog "'Range for Bubble Sizes' wasn't correctly preserved after save and reload."
1031 printlog "Select X-Values in Data Ranges"
1032 if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
1033 warnlog "Something went wrong selecting 'Data Ranges' item No. 3. EXITING!"
1034 TabChartTypeDataSeries.Cancel
1038 printlog "Check substring '$A$13:$A$16' in Range for Name"
1039 sControlString = RangeFor.GetText
1040 if instr ( sControlString , "$A$13:$A$16" ) = 0 Then
1041 warnlog "'Range for X-Values' wasn't correctly preserved after save and reload."
1044 printlog "Select Y-Values in Data Ranges"
1045 if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
1046 warnlog "Something went wrong selecting 'Data Ranges' item No. 4. EXITING!"
1047 TabChartTypeDataSeries.Cancel
1051 printlog "Check substring '$B$13:$B$16' in Range for Name"
1052 sControlString = RangeFor.GetText
1053 if instr ( sControlString , "$B$13:$B$16" ) = 0 Then
1054 warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
1057 printlog "Leave tab page data series with CANCEL"
1058 TabChartTypeDataSeries.Cancel
1060 warnlog "Tab page Data Series was not up!"
1062 printlog "Insert / Title"
1064 Kontext "InsertTitleDialog"
1065 if InsertTitleDialog.Exists(2) then
1066 printlog "Check if 'Title' text box is empty"
1067 sControlString = MainTitle.GetText
1068 if sControlString <> "" then
1069 warnlog "Empty Title string wasn't preserved after save and reload."
1071 printlog "Check if 'Subtitle' text box is empty"
1072 sControlString = SubTitle.GetText
1073 if sControlString <> "" then
1074 warnlog "Empty Subtitle string wasn't preserved after save and reload."
1076 printlog "Check if 'X Title' text box is empty"
1077 sControlString = TitleXaxis.GetText
1078 if sControlString <> "" then
1079 warnlog "Empty X Title string wasn't preserved after save and reload."
1081 printlog "Check if 'Y Title' text box is empty"
1082 sControlString = TitleYaxis.GetText
1083 if sControlString <> "" then
1084 warnlog "Empty Y Title string wasn't preserved after save and reload."
1086 printlog "Check if 'Z Title' text box is empty"
1087 sControlString = TitleZaxis.GetText
1088 if sControlString <> "" then
1089 warnlog "Empty Z Title string wasn't preserved after save and reload."
1091 printlog "Leaving Title dialog with Cancel"
1092 InsertTitleDialog.Cancel
1094 warnlog "Title dialog was not up!"
1096 printlog "Insert / Grids"
1097 If fInvokeGridsDialog = 0 then
1098 Kontext "InsertGridsDialog"
1099 printlog "Check if 'Gridlines X Axis' box is checked"
1100 if MainGridXaxis.IsChecked then
1101 warnlog "Check box 'Gridlines X Axis' (disabled) wasn't preserved after save and reload."
1103 printlog "Check if 'Gridlines Y Axis' box is unchecked"
1104 if MainGridYaxis.IsChecked then
1105 warnlog "Check box 'Gridlines Y Axis' (disabled) wasn't preserved after save and reload."
1107 printlog "Check if 'Gridlines Z Axis' box is checked"
1108 if MainGridZaxis.IsEnabled then
1109 warnlog "Check box 'Gridlines Z Axis' shouldn't be enabled after save and reload."
1111 printlog "Leave dialog with CANCEL"
1112 InsertGridsDialog.Cancel
1114 warnlog "Insert Grids dialog was not up!"
1116 printlog "Insert / Legend"
1117 if fInvokeLegendDialog() = 0 then
1118 printlog "Check if 'Legend Display' box is checked"
1119 Kontext "InsertLegendDialog"
1120 if Display.IsChecked then
1121 warnlog "Check box 'Legend Display' (disabled) wasn't preserved after save and reload."
1123 printlog "Leave dialog with CANCEL."
1124 InsertLegendDialog.Cancel
1126 warnlog "Insert Legend dialog was not up!"
1128 printlog "Press ESCAPE button (deselecting the OLE object)"
1129 Kontext "DocumentCalc"
1130 DocumentCalc.TypeKeys "<Escape>"
1131 printlog "Close document"