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_flexible_source_range_selection01.inc,v $
13 '* last change: $Author: obo $ $Date: 2008-07-21 12:07:53 $
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 : Updatetest for Flexible Source Range Selection in Writer
38 '************************************************************************
40 ' #1 tDataRangeWizardWriter ' Updatetest for tabpage DataRange via chart wizard
41 ' #1 tDataSeriesWizardWriter ' Updatetest for tabpage DataSeries via chart wizard
42 ' #1 tDataRangeDialogWriter ' Updatetest for tabpage DataRange via data ranges dialog
43 ' #1 tDataSeriesDialogWriter ' Updatetest for tabpage DataSeries via data ranges dialog
44 ' #1 fOpenWriterTestDocumentAndInsertChart ' Sub routine to load test documents
46 '\***********************************************************************
48 testcase tDataRangeWizardWriter
49 dim sDataRange as string
50 dim sInputFile as string
51 sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange05.odt")
52 '///Open test document <i>gTestToolPath</i>/chart2/required/input/ch_flexrange05.odt
53 printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange05.odt"
54 if fOpenWriterTestDocumentAndInsertChart(sInputFile) then
55 '///Choose the Chart type <i>line</i> (should be the fifth in the top-down list)
56 printlog "Choose the Chart type line (should be the fifth in the top-down list)"
57 if fSetChartType( "line" ) > 0 then
58 warnlog "Something went wrong setting chart type to Line."
65 '/// Click Next button
67 Kontext "TabChartTypeDataRange"
68 call DialogTest ( TabChartTypeDataRange )
69 '///Check data range in edit field value (ChartFlexRange.A1:E5)
70 printlog "Check data range in edit field value (ChartFlexRange.A1:E5)"
71 Kontext "TabChartTypeDataRange"
72 sDataRange = DataRange.GetText
73 if sDataRange <> "ChartFlexRange.A1:E5" then
74 warnlog "This is not the expected datarange, it is " & sDataRange & " but should be ChartFlexRange.A1:E5"
76 printlog " Datarange is correct"
78 '///Check if -Data series in rows- is enabled
79 printlog "Check if -Data series in rows- is enabled"
80 if Rows.IsEnabled then
81 printlog " Data series in rows is enabled"
83 warnlog "Data series in rows is disabled"
85 '///Check if -Data series in columns- is enabled and chosen
86 printlog "Check if -Data series in columns- is enabled and chosen"
87 if Columns.IsEnabled then
88 printlog " Data series in columns is enabled"
89 if Columns.IsChecked then
90 printlog " and checked"
92 warnlog "Data series in columns is not checked"
95 warnlog "Data series in columns is disabled"
97 '///Check if -First row as label- is enabled and checked
98 printlog "Check if -First row as label- is enabled and checked"
99 if FirstRowAsLabel.IsEnabled then
100 printlog " First row as label is enabled"
101 if FirstRowAsLabel.IsChecked then
102 printlog " and checked"
104 warnlog "First row as label is not checked"
107 warnlog "First row as label is disabled"
109 '///Check if -First column as label- is enabled checked
110 printlog "Check if -First column as label- is enabled checked"
111 if FirstColumnAsLabel.IsEnabled then
112 printlog " First column as label is enabled"
113 if FirstColumnAsLabel.IsChecked then
114 printlog " and checked"
116 warnlog "First column as label is not checked"
119 warnlog "First column as label is disabled"
121 '///Enter invalid range ChartFlexRange.A1:E
122 printlog "Enter invalid range ChartFlexRange.A1:E"
123 DataRange.SetText "ChartFlexRange.A1:E"
124 '///Check if -Data series in rows- is disabled
125 printlog "Check if -Data series in rows- is disabled"
126 Kontext "TabChartTypeDataRange"
127 if NOT Rows.IsEnabled then
128 printlog " Data series in rows is disabled"
130 warnlog "Data series in rows is enabled, but should be disabled"
132 '///Check if -Data series in columns- is disabled
133 printlog "Check if -Data series in columns- is disabled"
134 if NOT Columns.IsEnabled then
135 printlog " Data series in columns is disabled"
137 warnlog "Data series in columns is enabled, but should be disabled"
139 '///Check if -First row as label- is disabled
140 printlog "Check if -First row as label- is disabled"
141 if NOT FirstRowAsLabel.IsEnabled then
142 printlog " First row as label is disabled"
144 warnlog "First row as label is enabled, but should be disabled"
146 '///Check if -First column as label- is disabled
147 printlog "Check if -First column as label- is disabled"
148 if NOT FirstColumnAsLabel.IsEnabled then
149 printlog " First Column as label is disabled"
151 warnlog "First Column as label is enabled, but should be disabled"
153 '///Check that Back, Next and Finish does not work
154 printlog "Check that Back, Next and Finish does not work"
155 kontext "ChartWizard"
157 kontext "TabChartTypeDataRange"
158 if FirstColumnAsLabel.IsVisible then
159 printlog " Success: Back button does not work"
161 warnlog "Back button is not functionless"
162 Kontext "ChartWizard"
165 '///Enter valid range ChartFlexRange.A1:E5
166 printlog "Enter valid range ChartFlexRange.A1:E5"
167 kontext "TabChartTypeDataRange"
168 DataRange.SetText "ChartFlexRange.A1:E5"
169 '///Check if -Data series in rows- is enabled
170 printlog "Check if -Data series in rows- is enabled"
171 if Rows.IsEnabled then
172 printlog " Data series in rows is enabled"
174 warnlog "Data series in rows is disabled"
176 '///Check if -Data series in columns- has been enabled and chosen
177 printlog "Check if -Data series in columns- has been enabled and chosen"
178 if Columns.IsEnabled then
179 printlog " Data series in columns is enabled"
180 if Columns.IsChecked then
181 printlog " and checked"
183 warnlog "Data series in columns is not checked"
186 warnlog "Data series in rows is disabled"
188 '///Check if -First row as label- is enabled and checked
189 printlog "Check if -First row as label- is enabled and checked"
190 if FirstRowAsLabel.IsEnabled then
191 printlog " First row as label is enabled"
192 if FirstRowAsLabel.IsChecked then
193 printlog " and checked"
195 warnlog "First row as label is not checked"
198 warnlog "First row as label is disabled"
200 '///Check if -First column as label- is enabled checked
201 printlog "Check if -First column as label- is enabled and checked"
202 if FirstColumnAsLabel.IsEnabled then
203 printlog " First column as label is enabled"
204 if FirstColumnAsLabel.IsChecked then
205 printlog " and checked"
207 warnlog "First column as label is not checked"
210 warnlog "First column as label is disabled"
212 '///Press Cancel button
213 printlog "Press Cancel button"
214 Kontext "ChartWizard"
217 printlog "Close document"
220 warnlog "It was not possible to open the test document."
224 '-------------------------------------------------------------------------
226 testcase tDataSeriesWizardWriter
227 dim sInputFile as string
228 dim iDataSeries as integer
229 dim sDataRanges as string
230 dim sRangeFor as string
231 dim sCategories as string
232 sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange06.odt" )
233 '///Open test document gTestToolPath/chart2/required/input/ch_flexrange06.odt
234 printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange06.odt"
235 if fOpenWriterTestDocumentAndInsertChart(sInputFile) then
236 '///Choose the Chart type <i>area</i> (should be the fourth in the top-down list)
237 printlog "Choose the Chart type <i>area</i> (should be the fourth in the top-down list)"
239 if fSetChartType( "area" ) > 0 then
240 warnlog "Something went wrong setting chart type to area."
241 Kontext "ChartWizard"
246 Kontext "ChartWizard"
247 '/// Click Next button
249 '/// Click Next button
251 Kontext "TabChartTypeDataSeries"
252 if RangeFor.IsVisible then
253 printlog " Switching to tabpage was successfull"
255 warnlog "Switching to tabpage Data Series was not successfull"
258 call DialogTest ( TabChartTypeDataSeries )
259 '///Check if the data series listbox is enabled and contains four entries
260 printlog "Check if the data series listbox is enabled and contains four entries"
261 iDataSeries = DataSeries.GetItemCount
262 if iDataSeries = 4 then
263 printlog " All 4 data series are available"
265 warnlog "There are " & iDataSeries & " data series instead of 4"
267 '///Check if the ADD button is enabled and click the button
268 printlog "Check if the ADD button is enabled and click the button"
269 if AddButton.IsEnabled then
270 printlog " ADD button is enabled"
273 warnlog "ADD button is not enabled"
275 '///Check if there are now five entries in the data series listbox
276 printlog "Check if there are now five entries in the data series listbox"
277 iDataSeries = DataSeries.GetItemCount
278 if iDataSeries = 5 then
279 printlog " Adding a data series was successfull"
281 warnlog "There are " & iDataSeries & " data series instead of 5"
283 '///Check if the new data series was added below the highlighted one
284 printlog "Check if the new data series was added below the highlighted one"
285 if DataSeries.GetSelIndex = 2 then
286 printlog " The new data series was inserted below the highlighted (first) one"
288 warnlog "The new dataseries was not inserted below the highlighted one"
290 '///Check if the REMOVE button is enabled and click the button
291 printlog "Check if the REMOVE button is enabled and click the button"
292 if RemoveButton.IsEnabled then
293 printlog " REMOVE button is enabled"
296 warnlog "REMOVE button is not enabled"
298 '///Check if there are now four entries in the data series listbox
299 printlog "Check if there are now four entries in the data series listbox"
300 iDataSeries = DataSeries.GetItemCount
301 if iDataSeries = 4 then
302 printlog " Removing a data series was successfull"
304 warnlog "There are " & iDataSeries & " data series instead of 4"
306 '/// Select third entry
307 printlog "Select third entry"
309 if MoveUp.IsEnabled then
310 printlog " The MoveUp button is enabled"
311 '/// The Move Up button should be enabled
312 printlog "The Move Up button should be enabled"
313 '/// Click the Move Up button twice
314 printlog "Click the Move Up button twice"
318 warnlog "The MoveUp button is disabled"
320 if DataSeries.GetSelIndex = 1 then
321 printlog " Moving data series was successfull"
322 if MoveUp.IsEnabled then
323 warnlog "MoveUp button is not disabled on first entry"
325 printlog " and MoveUp button is disabled on first enty"
328 warnlog "Moving data series was not successfull"
330 '/// Select second entry
331 printlog "Select second entry"
333 if MoveDown.IsEnabled then
334 printlog " The MoveDown button is enabled"
335 '/// If Move Down button is enabled
336 printlog "If Move Down button is enabled"
337 '/// Click Move Down button twice
338 printlog "Click Move Down button twice"
342 warnlog "The MoveDown button is disabled"
344 if DataSeries.GetSelIndex = 4 then
345 printlog " Moving data series was successfull"
346 if MoveDown.IsEnabled then
347 warnlog "MoveDown button is not disabled on first entry"
349 printlog " and MoveDown button is disabled on first enty"
352 warnlog "Moving data series was not successfull"
354 '///Select first entry in Data Ranges
355 printlog "Select first entry in Data Ranges"
357 '///Verify that the range matches the one in edit field
358 printlog "Verify that the range matches the one in edit field"
359 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
360 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
361 'label-columns in that treelist-box
362 sDataRanges = DataRanges.GetSelText (1,4)
363 sRangeFor = RangeFor.GetText
364 if sDataRanges = sRangeFor then
365 printlog " Both ranges are matching"
367 warnlog "The ranges does not match: " & sDataRanges & sRangeFor
369 '///Select second entry in Data Ranges
370 printlog "Select second entry in Data Ranges"
372 '///Check that the range in the edit field has changed, too
373 printlog "Check that the range in the edit field has changed, too"
374 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
375 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
376 'label-columns in that treelist-box
377 sDataRanges = DataRanges.GetSelText (1,4)
378 sRangeFor = RangeFor.GetText
379 if sDataRanges = sRangeFor then
380 printlog " Both ranges are matching"
382 warnlog "The ranges does not match" & sDataRanges & sRangeFor
384 '///Change the range in edit field
385 printlog "Change the range in edit field"
386 RangeFor.SetText "ChartFlexRange.B2:B4"
387 '///Check that the range in Data Ranges has changed, too
388 printlog "Check that the range in Data Ranges has changed, too"
389 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
390 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
391 'label-columns in that treelist-box
392 sDataRanges = DataRanges.GetSelText (1,4)
393 if sDataRanges = "ChartFlexRange.B2:B4" then
394 printlog " The data range has also changed"
396 warnlog "The data range has not changed"
398 '/// Set ChartFlexRange.A2:A4 as range for categories
399 printlog "Set ChartFlexRange.A2:A4 as range for categories"
400 Categories.SetText "ChartFlexRange.A2:A4"
401 sCategories = Categories.GetText
402 if sCategories = "ChartFlexRange.A2:A4" then
403 printlog " The range has been modified"
405 warnlog "Modifiing the range was not successfull"
407 '///Enter invalid range ChartFlexRange.A2:A
408 printlog "Enter invalid range ChartFlexRange.A2:A"
409 Categories.SetText "ChartFlexRange.A2:A"
410 '///Check that the BACK button is disabled
411 printlog "Check that the BACK button does not work"
412 kontext "ChartWizard"
414 kontext "TabChartTypeDataSeries"
415 if Categories.IsVisible then
416 printlog " Success: Back button does not work"
418 warnlog "Back button is not functionless"
419 Kontext "ChartWizard"
422 '///Enter valid range ChartFlexRange.A2:A5
423 printlog "Enter valid range ChartFlexRange.A2:A5"
424 Categories.SetText "ChartFlexRange.A2:A5"
425 '///Press Cancel button
426 printlog "Press Cancel button"
427 Kontext "ChartWizard"
430 printlog "Close document"
433 warnlog "It was not possible to open the test document."
437 '-------------------------------------------------------------------------
439 testcase tDataRangeDialogWriter
440 dim sDataRange as string
441 dim sInputFile as string
442 sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange07.odt")
443 '///Open test document <i>gTestToolPath</i>/chart2/required/input/ch_flexrange07.odt
444 printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange07.odt"
445 if fOpenTestDocumentAndSelectDataRange(sInputFile) then
446 '///Check data range in edit field (ChartFlexRange.A2:A3;ChartFlexRange.B1:E3)
447 printlog "Check data range in edit field"
448 Kontext "TabChartTypeDataRange"
449 sDataRange = DataRange.GetText
450 if sDataRange <> "ChartFlexRange.A2:A3;ChartFlexRange.B1:E3" then
451 warnlog "This is not the expected datarange, it is " & sDataRange & " but should be ChartFlexRange.A2:A3;ChartFlexRange.B1:E3"
453 printlog " Datarange is correct"
455 '///Check if -Data series in columns- is enabled and chosen
456 printlog "Check if -Data series in columns- is enabled and chosen"
457 if Columns.IsEnabled then
458 printlog " Data series in columns is enabled"
459 if Columns.IsChecked then
460 printlog " and checked"
462 warnlog "Data series in columns is not checked"
465 warnlog "Data series in columns is disabled"
467 '///Check if -Data series in rows- is enabled
468 printlog "Check if -Data series in rows- is enabled"
469 if Rows.IsEnabled then
470 printlog " Data series in rows is enabled"
472 warnlog "Data series in rows is disabled"
474 '///Check if -First row as label- is enabled and checked
475 printlog "Check if -First row as label- is enabled and checked"
476 if FirstRowAsLabel.IsEnabled then
477 printlog " First row as label is enabled"
478 if FirstRowAsLabel.IsChecked then
479 printlog " and checked"
481 warnlog "First row as label is not checked"
484 warnlog "First row as label is disabled"
486 '///Check if -First column as label- is enabled and checked
487 printlog "Check if -First column as label- is enabled and checked"
488 if FirstColumnAsLabel.IsEnabled then
489 printlog " First column as label is enabled"
490 if FirstColumnAsLabel.IsChecked then
491 printlog " and checked"
493 warnlog "First column as label is not checked"
496 warnlog "First column as label is disabled"
498 '///Enter invalid range ChartFlexRange.A1:E
499 printlog "Enter invalid range ChartFlexRange.A1:E"
500 DataRange.SetText "ChartFlexRange.A1:E"
501 '///Check that -Data series in rows- is disabled
502 printlog "Check that -Data series in rows- is disabled"
503 Kontext "TabChartTypeDataRange"
504 if NOT Rows.IsEnabled then
505 printlog " Data series in rows is disabled"
507 warnlog "Data series in rows is enabled, but should be disabled"
509 '///Check that -Data series in columns- is disabled
510 printlog "Check that -Data series in columns- is disabled"
511 if NOT Columns.IsEnabled then
512 printlog " Data series in columns is disabled"
514 warnlog "Data series in columns is enabled, but should be disabled"
516 '///Check if -First row as label- is disabled
517 printlog "Check if -First row as label- is disabled"
518 if NOT FirstRowAsLabel.IsEnabled then
519 printlog " First row as label is disabled"
521 warnlog "First row as label is enabled, but should be disabled"
523 '///Check if -First column as label- is disabled
524 printlog "Check if -First column as label- is disabled"
525 if NOT FirstColumnAsLabel.IsEnabled then
526 printlog " First Column as label is disabled"
528 warnlog "First Column as label is enabled, but should be disabled"
530 '///Check that OK button is disabled
531 printlog "Check that OK button is disabled"
533 Kontext "TabChartTypeDataRange"
534 TabChartTypeDataRange.OK
535 warnlog "The OK button is not disabled"
538 printlog " The OK button is disabled"
540 '///Enter valid range ChartFlexRange.A1:E3
541 printlog "Enter valid range ChartFlexRange.A1:E3"
542 kontext "TabChartTypeDataRange"
543 DataRange.SetText "ChartFlexRange.A1:E3"
544 '///Check if -Data series in columns- is enabled and chosen
545 printlog "Check if -Data series in columns- is enabled and chosen"
546 if Columns.IsEnabled then
547 printlog " Data series in columns is enabled"
548 if Columns.IsChecked then
549 printlog " and checked"
551 warnlog "Data series in columns is not checked"
554 warnlog "Data series in columns is disabled"
556 '///Check if -Data series in rows- is enabled
557 printlog "Check if -Data series in rows- is enabled"
558 if Rows.IsEnabled then
559 printlog " Data series in rows is enabled"
561 warnlog "Data series in rows is disabled"
563 '///Check if -First row as label- is enabled and checked
564 printlog "Check if -First row as label- is enabled and checked"
565 if FirstRowAsLabel.IsEnabled then
566 printlog " First row as label is enabled"
567 if FirstRowAsLabel.IsChecked then
568 printlog " and checked"
570 warnlog "First row as label is not checked"
573 warnlog "First row as label is disabled"
575 '///Check if -First column as label- is enabled and checked
576 printlog "Check if -First column as label- is enabled and checked"
577 if FirstColumnAsLabel.IsEnabled then
578 printlog " First column as label is enabled"
579 if FirstColumnAsLabel.IsChecked then
580 printlog " and checked"
582 warnlog "First column as label is not checked"
585 warnlog "First column as label is disabled"
587 '///Press Cancel button
588 printlog "Press Cancel button"
589 Kontext "TabChartTypeDataRange"
590 TabChartTypeDataRange.Cancel
592 printlog "Close document"
595 warnlog "It was not possible to open the test document."
599 '-------------------------------------------------------------------------
601 testcase tDataSeriesDialogWriter
602 dim sInputFile as string
603 dim iDataSeries as integer
604 dim sDataRanges as string
605 dim sRangeFor as string
606 dim sCategories as string
607 sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange08.odt")
609 '/// Open test document <i>gTestToolPath</i>/chart2/required/input/ch_flexrange08.odt
610 printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange08.odt"
611 if fOpenTestDocumentAndSelectDataRange(sInputFile) then
613 '/// Switching to tab page Data Series
614 printlog "Switching to tab page Data Series"
615 active.SetPage TabChartTypeDataSeries
616 Kontext "TabChartTypeDataSeries"
617 call DialogTest ( TabChartTypeDataSeries )
618 '///Check if the data series listbox is enabled and contains four entries
619 printlog "Check if the data series listbox is enabled and contains four entries"
620 iDataSeries = DataSeries.GetItemCount
621 if iDataSeries = 4 then
622 printlog " One data serie is available"
624 warnlog "There are " & iDataSeries & " data series instead of four"
626 '///Check if the ADD button is enabled and click the button
627 printlog "Check if the ADD button is enabled and click the button"
628 if AddButton.IsEnabled then
629 printlog " ADD button is enabled"
632 warnlog "ADD button is not enabled"
634 '///Check if there are now five entries in the data series listbox
635 printlog "Check if there are now five entries in the data series listbox"
636 iDataSeries = DataSeries.GetItemCount
637 if iDataSeries = 5 then
638 printlog " Adding a data series was successfull"
640 warnlog "There are " & iDataSeries & " data series instead of five"
642 '///Check if the new data series was added below the highlighted one
643 printlog "Check if the new data series was added below the highlighted one"
644 if DataSeries.GetSelIndex = 2 then
645 printlog " The new data series was inserted below the highlighted (first) one"
647 warnlog "The new dataseries was not inserted below the highlighted one"
649 '///Check if the REMOVE button is enabled and click the button
650 printlog "Check if the REMOVE button is enabled and click the button"
651 if RemoveButton.IsEnabled then
652 printlog " REMOVE button is enabled"
655 warnlog "REMOVE button is not enabled"
657 '///Check if there are now four entries in the data series listbox
658 printlog "Check if there are now four entries in the data series listbox"
659 iDataSeries = DataSeries.GetItemCount
660 if iDataSeries = 4 then
661 printlog " Removing a data series was successfull"
663 warnlog "There are " & iDataSeries & " data series instead of 4"
665 '///Use UP button and verify that it it disabled on first entry
666 printlog "Use UP button and verify that it it disabled on first entry"
668 if MoveUp.IsEnabled then
669 printlog " The MoveUp button is enabled"
672 warnlog "The MoveUp button is disabled"
674 if DataSeries.GetSelIndex = 1 then
675 printlog " Moving data series was successfull"
676 if MoveUp.IsEnabled then
677 warnlog "MoveUp button is not disabled on first entry"
679 printlog " and MoveUp button is disabled on first enty"
682 warnlog "Moving data series was not successfull"
684 '///Use DOWN button thrice and verify that it is disabled on last entry
685 printlog "Use DOWN button thrice and verify that it is disabled on last entry"
687 if MoveDown.IsEnabled then
688 printlog " The MoveDown button is enabled"
693 warnlog "The MoveDown button is disabled"
695 if DataSeries.GetSelIndex = 4 then
696 printlog " Moving data series was successfull"
697 if MoveDown.IsEnabled then
698 warnlog "MoveDown button is not disabled on first entry"
700 printlog " and MoveDown button is disabled on first enty"
703 warnlog "Moving data series was not successfull"
705 '///Select first entry in Data Ranges
706 printlog "Select first entry in Data Ranges"
708 '///Verify that the range matches the one in edit field
709 printlog "Verify that the range matches the one in edit field"
710 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
711 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
712 'label-columns in that treelist-box
713 sDataRanges = DataRanges.GetSelText (1,4)
714 sRangeFor = RangeFor.GetText
715 if sDataRanges = sRangeFor then
716 printlog " Both ranges are matching"
718 warnlog "The ranges does not match: " & sDataRanges & sRangeFor
720 '///Select second entry in Data Ranges
721 printlog "Select second entry in Data Ranges"
723 '///Check that the range in the edit field has changed,too
724 printlog "Check that the range in the edit field has changed,too"
725 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
726 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
727 'label-columns in that treelist-box
728 sDataRanges = DataRanges.GetSelText (1,4)
729 sRangeFor = RangeFor.GetText
730 if sDataRanges = sRangeFor then
731 printlog " Both ranges are matching"
733 warnlog "The ranges does not match" & sDataRanges & sRangeFor
735 '///Change the range in edit field to ChartFlexRange.B2:B3
736 printlog "Change the range in edit field to ChartFlexRange.B2:B3"
737 RangeFor.SetText "ChartFlexRange.B2:B3"
738 '///Check that the range in Data Ranges has changed, too
739 printlog "Check that the range in Data Ranges has changed, too"
740 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
741 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
742 'label-columns in that treelist-box
743 sDataRanges = DataRanges.GetSelText (1,4)
744 if sDataRanges = "ChartFlexRange.B2:B3" then
745 printlog " The data range has also changed"
747 warnlog "The data range has not changed"
749 '///Edit range for Categories (ChartFlexRange.A2:A3)
750 printlog "Edit range for Categories (ChartFlexRange.A2:A3)"
751 Categories.SetText "ChartFlexRange.A2:A3"
752 sCategories = Categories.GetText
753 if sCategories = "ChartFlexRange.A2:A3" then
754 printlog " The range has been modified"
756 warnlog "Modifiing the range was not successfull"
758 '///Enter invalid range ChartFlexRange.A2:A
759 printlog "Enter invalid range ChartFlexRange.A2:A"
760 Categories.SetText "ChartFlexRange.A2:A"
761 '///Check that the OK button is disabled
762 printlog "Check that the OK button is disabled"
764 Kontext "TabChartTypeDataSeries"
765 TabChartTypeDataSeries.OK
766 warnlog "The OK button is not disabled"
769 printlog " The OK button is disabled"
771 '///Enter valid range ChartFlexRange.A2:A4
772 printlog "Enter valid range ChartFlexRange.A2:A4"
773 kontext "TabChartTypeDataSeries"
774 Categories.SetText "ChartFlexRange.A2:A4"
775 '///Press Cancel button
776 printlog "Press Cancel button"
777 Kontext "TabChartTypeDataSeries"
778 TabChartTypeDataSeries.Cancel
780 printlog "Close document"
783 warnlog "It was not possible to open the test document."
787 '-------------------------------------------------------------------------
789 function fOpenWriterTestDocumentAndInsertChart(sInputFile as STRING) as BOOLEAN
790 fOpenWriterTestDocumentAndInsertChart = FALSE
791 call hFileOpen(sInputFile)
793 Call sMakeReadOnlyDocumentEditable()
794 '///Menu Insert Object Chart to open chart wizard
795 printlog "Menu Insert Object Chart to open chart wizard"
798 fOpenWriterTestDocumentAndInsertChart = TRUE