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_format.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 FORMAT
38 '************************************************************************
40 ' #1 tFormatObjectProperties
41 ' #1 tFormatObjectPropertiesPieChart
42 ' #1 tFormatPositonAndSize
43 ' #1 tFormatArrangement
44 ' #1 tFormatTitleMaintitle
45 ' #1 tFormatTitleSubtitle
46 ' #1 tFormatTitleXAxistitle
47 ' #1 tFormatTitleYAxistitle
48 ' #1 tFormatTitleZAxistitle
49 ' #1 tFormatTitleAllTitles
53 ' #1 tFormatAxisSecondaryXAxis
54 ' #1 tFormatAxisSecondaryYAxis
55 ' #1 tFormatAxisAllAxes
57 '\************************************************************************
59 testcase tFormatObjectProperties
60 Dim iCountTabPg as integer
64 printlog "Load simple chart document"
65 if fLoadVerySimpleChartAndSaveLocal() > 0 then
66 warnlog "Loading test document seems to have failed -> Check this out!"
69 printlog "Select chart using navigator"
70 if fSelectFirstOLE = 0 then
71 printlog "Edit / Object / Edit"
73 printlog "Move to third object in Chart using TAB key (data series)"
74 Kontext "DocumentChart"
75 DocumentChart.TypeKeys "<TAB>" , 3
76 printlog "Invoke Format::ObjectProperties"
77 FormatObjectProperties
78 printlog "Select tab page Aligment"
80 iCountTabPg = Active.GetPageCount
81 if iCountTabPg <> 7 then
82 warnlog "Edit::Properties on a data series should have 7 tab pages but has " & iCountTabPg & "."
84 printlog "Edit::Properties on a data series has 7 tab pages."
86 Active.SetPage TabDataSeriesLabels
87 '/// Check if tab page series labels exists
88 Kontext "TabDataSeriesLabels"
89 call DialogTest ( TabDataSeriesLabels )
90 '/// Check if tab page data series options exists
92 Active.SetPage TabDataSeriesOptions
93 Kontext "TabDataSeriesOptions"
94 call DialogTest ( TabDataSeriesOptions )
95 '/// Close dialog with Cancel-button
96 TabDataSeriesOptions.Cancel
98 Kontext "DocumentCalc"
99 DocumentCalc.TypeKeys "<Escape>"
101 warnlog "It was not possible to select the chart object!"
106 '-------------------------------------------------------------------------
108 testcase tFormatObjectPropertiesPieChart
109 Dim iCountTabPg as integer
113 '///<u><b>Dialog test after invoking Format::Object Properties... on a pie chart</b></u>
114 '/// Load simple chart document
115 if fLoadVerySimpleChartAndSaveLocal() > 0 then
116 warnlog "Loading test document seems to have failed -> Check this out!"
119 '/// Select chart using navigator
120 if fSelectFirstOLE = 0 then
121 '/// Edit / Object / Edit
123 '/// Move to third object in Chart using TAB key (data series)
124 Kontext "DocumentChart"
125 '/// Format / Chart Type
126 if fInvokeChartTypeDialog() > 0 then
127 warnlog "Something went wrong trying to invoke the Chart Types dialog"
131 if fSetChartType("pie") > 0 then
132 warnlog "Something went wrong trying to set the Chart Type to 'Pie'"
136 if fCloseChartTypeDialogOK() > 0 then
137 warnlog "Something went wrong trying to leave the dialog with OK"
141 '/// Move to third object in Chart using TAB key (data series)
142 Kontext "DocumentChart"
143 DocumentChart.TypeKeys "<TAB>" , 3
144 '/// Invoke Format::ObjectProperties
145 FormatObjectProperties
146 '/// Select tab page Aligment
148 iCountTabPg = Active.GetPageCount
149 if iCountTabPg <> 7 then
150 warnlog "Edit::Properties on a data series of a pie chart should have 7 tab pages but has " & iCountTabPg & "."
152 printlog "Edit::Properties on a data series on a pie chart has 7 tab pages."
154 Active.SetPage TabChartPieOpetions
155 '/// Check if tab page Options exists
156 Kontext "TabChartPieOpetions"
157 call DialogTest ( TabChartPieOpetions )
158 '/// Close dialog with Cancel-button
159 TabChartPieOpetions.Cancel
161 Kontext "DocumentCalc"
162 DocumentCalc.TypeKeys "<ESCAPE>"
164 warnlog "It was not possible to select the chart object!"
169 '-------------------------------------------------------------------------------
171 testcase tFormatPositonAndSize
172 '///<u><b>Dialog test after invoking Format::PositionAndSize</b></u>
173 '/// Load simple chart document
174 if fLoadVerySimpleChartAndSaveLocal() > 0 then
175 warnlog "Loading test document seems to have failed -> Check this out!"
178 '/// Select chart using navigator
180 '/// Edit / Object / Edit
182 '/// Move to first object in Chart using TAB key
183 Kontext "DocumentChart"
184 DocumentChart.TypeKeys "<TAB>"
185 '/// Invoke Format::PositionAndSize
186 FormatPositionAndSizeChart
187 '/// Check if Position and Size dialog exists (single tab page)
188 Kontext "TabPositionAndSize"
189 call DialogTest ( TabPositionAndSize )
191 TabPositionAndSize.Cancel
193 Kontext "DocumentCalc"
194 DocumentCalc.TypeKeys "<Escape>"
198 '-------------------------------------------------------------------------------
200 testcase tFormatArrangement
201 dim sInputFile as string
203 sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange01.ods")
204 printlog "Open test document gtesttoolpath/chart2/required/input/ch_flexrange01.ods"
205 if fOpenTestDocumentAndInsertChart(sInputFile) then
207 printlog "Choose the Chart type 'bar' (should be the second in the top-down list)"
208 if fSetChartType( "bar" ) > 0 then
209 warnlog "Something went wrong setting chart type to BAR. Testcase aborted"
210 Kontext "ChartWizard"
215 Kontext "ChartWizard"
216 printlog "Press OK button"
218 Kontext "DocumentChart"
219 printlog "Type twice <TAB> to select a data series to enable the menu entry."
220 DocumentChart.TypeKeys "<TAB>", 2, TRUE
221 Kontext "DocumentCalc"
223 printlog "Select 'Format' entry in main menu"
224 hMenuSelectNr(5) ' FORMAT
225 printlog "Select 'Arrangement' entry in 'Format'-menu"
226 hMenuSelectNr(3) ' ARRANGEMENT
227 printlog "Select enabled 'Send Backward' entry."
229 Kontext "DocumentCalc"
231 printlog "Select 'Format' entry in main menu again"
232 hMenuSelectNr(5) ' FORMAT
233 printlog "Select 'Arrangement' entry in 'Format'-menu"
234 hMenuSelectNr(3) ' ARRANGEMENT
235 printlog "Select now enabled 'Bring Forward' entry."
237 printlog "Close document"
240 warnlog "It was not possible to open the test document."
244 '-------------------------------------------------------------------------------
246 testcase tFormatTitleMaintitle
247 '///<u><b>Dialog test after invoking Format::Title::MainTitle</b></u>
248 '/// Load simple chart document
249 if fLoadVerySimpleChartAndSaveLocal() > 0 then
250 warnlog "Loading test document seems to have failed -> Check this out!"
253 '/// Select chart using navigator
255 '/// Edit / Object / Edit
258 '/// Format / Title / Main title
260 '/// Goto tab page Borders
262 Active.SetPage TabFormatChartBorders
263 '/// Check if tab page Borders exists
264 Kontext "TabFormatChartBorders"
265 call DialogTest ( TabFormatChartBorders )
266 '/// Goto tab page Area
268 Active.SetPage TabArea
269 '/// Check if tab page Area exists
271 call DialogTest ( TabArea )
272 '/// Goto tab page Transparency
274 Active.SetPage TabTransparency
275 '/// Check if tab page Transparency exists
276 Kontext "TabTransparency"
277 call DialogTest ( TabTransparency )
278 '/// Goto tab page Characters
280 Active.SetPage TabFont
281 '/// Check if tab page Characters exists
283 call DialogTest ( TabFont )
284 '/// Goto tab page Font Effects
286 Active.SetPage TabFontEffects
287 '/// Check if tab page Font Effects exists
288 Kontext "TabFontEffects"
289 call DialogTest ( TabFontEffects )
290 '/// Goto tab page Alignment
292 Active.SetPage TabFormatChartTitleAlignment
293 '/// Check if tab page Alignment exists
294 Kontext "TabFormatChartTitleAlignment"
295 call DialogTest ( TabFormatChartTitleAlignment )
297 TabFormatChartTitleAlignment.Cancel
299 Kontext "DocumentCalc"
300 DocumentCalc.TypeKeys "<Escape>"
304 '-------------------------------------------------------------------------------
306 testcase tFormatTitleSubtitle
307 '///<u><b>Dialog test after invoking Format::Title::Subtitle</b></u>
308 '/// Load simple chart document
309 if fLoadVerySimpleChartAndSaveLocal() > 0 then
310 warnlog "Loading test document seems to have failed -> Check this out!"
313 '/// Select chart using navigator
315 '/// Edit / Object / Edit
319 if fInvokeTitlesDialog() > 0 then
320 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
324 Kontext "InsertTitleDialog"
326 if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then
327 warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)"
331 '/// Close Title dialog
332 if fCloseTitlesDialogOK() > 0 then
333 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
337 '/// Format / Title / Subtitle
339 '/// Goto tab page Area
341 Active.SetPage TabArea
342 '/// Check if tab page Area exists
344 call DialogTest ( TabArea )
345 '/// Goto tab page Characters
347 Active.SetPage TabFont
348 '/// Check if tab page Characters exists
350 call DialogTest ( TabFont )
351 '/// Goto tab page Borders
353 Active.SetPage TabFormatChartBorders
354 '/// Check if tab page Borders exists
355 Kontext "TabFormatChartBorders"
356 call DialogTest ( TabFormatChartBorders )
357 '/// Goto tab page Alignment
359 Active.SetPage TabFormatChartTitleAlignment
360 '/// Check if tab page Alignment exists
361 Kontext "TabFormatChartTitleAlignment"
362 call DialogTest ( TabFormatChartTitleAlignment )
363 '/// Goto tab page Transparency
365 Active.SetPage TabTransparency
366 '/// Check if tab page Transparency exists
367 Kontext "TabTransparency"
368 call DialogTest ( TabTransparency )
369 '/// Goto tab page Font Effects
371 Active.SetPage TabFontEffects
372 '/// Check if tab page Font Effects exists
373 Kontext "TabFontEffects"
374 call DialogTest ( TabFontEffects )
375 '/// Close dialog with Cancel
376 TabFontEffects.Cancel
381 '-------------------------------------------------------------------------------
383 testcase tFormatTitleXAxistitle
384 '///<u><b>Dialog test after invoking Format::Title::X Axis Title</b></u>
385 '/// Load simple chart document
386 if fLoadVerySimpleChartAndSaveLocal() > 0 then
387 warnlog "Loading test document seems to have failed -> Check this out!"
390 '/// Select chart using navigator
392 '/// Edit / Object / Edit
396 if fInvokeTitlesDialog() > 0 then
397 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
401 Kontext "InsertTitleDialog"
402 '/// Set X Axis Title
403 if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then
404 warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)"
408 '/// Close Title dialog
409 if fCloseTitlesDialogOK() > 0 then
410 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
414 '/// Format / Chart Type
415 if fInvokeChartTypeDialog() > 0 then
416 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
420 '/// Change Chart type to Column + Line
421 if fSetChartType( "column_line" ) > 0 then
422 warnlog "Something went wrong setting chart type to Column + Line -> Check this out! (Previous log may help you)"
426 '/// Close Chart Type dialog
427 if fCloseChartTypeDialogOK() > 0 then
428 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
432 '/// Format / Title / X Axis Title
434 '/// Goto tab page Font Effects
436 Active.SetPage TabFontEffects
437 '/// Check if tab page Font Effects exists
438 Kontext "TabFontEffects"
439 call DialogTest ( TabFontEffects )
440 '/// Goto tab page Transparency
442 Active.SetPage TabTransparency
443 '/// Check if tab page Transparency exists
444 Kontext "TabTransparency"
445 call DialogTest ( TabTransparency )
446 '/// Goto tab page Borders
448 Active.SetPage TabFormatChartBorders
449 '/// Check if tab page Borders exists
450 Kontext "TabFormatChartBorders"
451 call DialogTest ( TabFormatChartBorders )
452 '/// Goto tab page Alignment
454 Active.SetPage TabFormatChartTitleAlignment
455 '/// Check if tab page Alignment exists
456 Kontext "TabFormatChartTitleAlignment"
457 call DialogTest ( TabFormatChartTitleAlignment )
458 '/// Goto tab page Characters
460 Active.SetPage TabFont
461 '/// Check if tab page Characters exists
463 call DialogTest ( TabFont )
464 '/// Goto tab page Area
466 Active.SetPage TabArea
467 '/// Check if tab page Area exists
469 call DialogTest ( TabArea )
476 '-------------------------------------------------------------------------------
478 testcase tFormatTitleYAxistitle
479 '///<u><b>Dialog test after invoking Format::Title::Y Axis Title</b></u>
480 '/// Load simple chart document
481 if fLoadVerySimpleChartAndSaveLocal() > 0 then
482 warnlog "Loading test document seems to have failed -> Check this out!"
485 '/// Select chart using navigator
487 '/// Edit / Object / Edit
491 if fInvokeTitlesDialog() > 0 then
492 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
496 Kontext "InsertTitleDialog"
497 '/// Set Y Axis Title
498 if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then
499 warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
503 '/// Close Title dialog
504 if fCloseTitlesDialogOK() > 0 then
505 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
509 '/// Format / Chart Type
510 if fInvokeChartTypeDialog() > 0 then
511 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
515 '/// Change Chart type to STOCK
516 if fSetChartType( "stock" ) > 0 then
517 warnlog "Something went wrong setting chart type to STOCK -> Check this out! (Previous log may help you)"
521 '/// Close Chart Type dialog
522 if fCloseChartTypeDialogOK() > 0 then
523 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
527 '/// Format / Title / Y Axis Title
529 '/// Goto tab page Transparency
531 Active.SetPage TabTransparency
532 '/// Check if tab page Transparency exists
533 Kontext "TabTransparency"
534 call DialogTest ( TabTransparency )
535 '/// Goto tab page Alignment
537 Active.SetPage TabFormatChartTitleAlignment
538 '/// Check if tab page Alignment exists
539 Kontext "TabFormatChartTitleAlignment"
540 call DialogTest ( TabFormatChartTitleAlignment )
541 '/// Goto tab page Area
543 Active.SetPage TabArea
544 '/// Check if tab page Area exists
546 call DialogTest ( TabArea )
547 '/// Goto tab page Font Effects
549 Active.SetPage TabFontEffects
550 '/// Check if tab page Font Effects exists
551 Kontext "TabFontEffects"
552 call DialogTest ( TabFontEffects )
553 '/// Goto tab page Borders
555 Active.SetPage TabFormatChartBorders
556 '/// Check if tab page Borders exists
557 Kontext "TabFormatChartBorders"
558 call DialogTest ( TabFormatChartBorders )
559 '/// Goto tab page Characters
561 Active.SetPage TabFont
562 '/// Check if tab page Characters exists
564 call DialogTest ( TabFont )
571 '-------------------------------------------------------------------------------
573 testcase tFormatTitleZAxistitle
574 '///<u><b>Dialog test after invoking Format::Title::Z Axis Title</b></u>
575 '/// Load simple chart document
576 if fLoadVerySimpleChartAndSaveLocal() > 0 then
577 warnlog "Loading test document seems to have failed -> Check this out!"
580 '/// Select chart using navigator
582 '/// Edit / Object / Edit
585 '/// Convert chart to 3D (this will enable all controls in Title dialog)
586 if NOT fConvertChartTo3D() then
587 warnlog "Conversion of chart to 3D failed -> Quit testcase"
592 if fInvokeTitlesDialog() > 0 then
593 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
597 Kontext "InsertTitleDialog"
598 '/// Set Z Axis Title
599 if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then
600 warnlog "Something went wrong setting the Z Axis Title -> Check this out! (Previous log may help you)"
604 '/// Close Title dialog
605 if fCloseTitlesDialogOK() > 0 then
606 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
610 '/// Format / Chart Type
611 if fInvokeChartTypeDialog() > 0 then
612 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
616 '/// Change Chart type to BAR
617 if fSetChartType( "bar" ) > 0 then
618 warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)"
622 '/// Close Chart Type dialog
623 if fCloseChartTypeDialogOK() > 0 then
624 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
628 '/// Invoke Format::Title::Z Axis Title
630 '/// Goto tab page Alignment
632 Active.SetPage TabFormatChartTitleAlignment
633 '/// Check if tab page Alignment exists
634 Kontext "TabFormatChartTitleAlignment"
635 call DialogTest ( TabFormatChartTitleAlignment )
636 '/// Goto tab page Transparency
638 Active.SetPage TabTransparency
639 '/// Check if tab page Transparency exists
640 Kontext "TabTransparency"
641 call DialogTest ( TabTransparency )
642 '/// Goto tab page Font Effects
644 Active.SetPage TabFontEffects
645 '/// Check if tab page Font Effects exists
646 Kontext "TabFontEffects"
647 call DialogTest ( TabFontEffects )
648 '/// Goto tab page Area
650 Active.SetPage TabArea
651 '/// Check if tab page Area exists
653 call DialogTest ( TabArea )
654 '/// Goto tab page Characters
656 Active.SetPage TabFont
657 '/// Check if tab page Characters exists
659 call DialogTest ( TabFont )
660 '/// Goto tab page Borders
662 Active.SetPage TabFormatChartBorders
663 '/// Check if tab page Borders exists
664 Kontext "TabFormatChartBorders"
665 call DialogTest ( TabFormatChartBorders )
667 TabFormatChartBorders.Cancel
672 '-------------------------------------------------------------------------------
674 testcase tFormatTitleAllTitles
675 '///<u><b>Dialog test after invoking Format::Title::All Titles</b></u>
676 '/// Load simple chart document
677 if fLoadVerySimpleChartAndSaveLocal() > 0 then
678 warnlog "Loading test document seems to have failed -> Check this out!"
681 '/// Select chart using navigator
683 '/// Edit / Object / Edit
686 '/// Convert chart to 3D (this will enable all controls in Title dialog)
687 if NOT fConvertChartTo3D() then
688 warnlog "Conversion of chart to 3D failed -> Quit testcase"
693 if fInvokeTitlesDialog() > 0 then
694 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
698 Kontext "InsertTitleDialog"
699 '/// Set All Axis Title
700 if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then
701 warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)"
705 if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then
706 warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)"
710 if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then
711 warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
715 if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then
716 warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
720 '/// Close Title dialog
721 if fCloseTitlesDialogOK() > 0 then
722 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
726 '/// Format / Chart Type
727 if fInvokeChartTypeDialog() > 0 then
728 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
732 '/// Change Chart type to AREA
733 if fSetChartType( "area" ) > 0 then
734 warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)"
738 '/// Close Chart Type dialog
739 if fCloseChartTypeDialogOK() > 0 then
740 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
744 '/// Format / Title / All Titles
746 '/// Goto tab page Characters
748 Active.SetPage TabFont
749 '/// Check if tab page Characters exists
751 call DialogTest ( TabFont )
752 '/// Goto tab page Alignment
754 Active.SetPage TabFormatChartTitleAlignment
755 '/// Check if tab page Alignment exists
756 Kontext "TabFormatChartTitleAlignment"
757 call DialogTest ( TabFormatChartTitleAlignment )
758 '/// Goto tab page Font Effects
760 Active.SetPage TabFontEffects
761 '/// Check if tab page Font Effects exists
762 Kontext "TabFontEffects"
763 call DialogTest ( TabFontEffects )
764 '/// Goto tab page Area
766 Active.SetPage TabArea
767 '/// Check if tab page Area exists
769 call DialogTest ( TabArea )
770 '/// Goto tab page Borders
772 Active.SetPage TabFormatChartBorders
773 '/// Check if tab page Borders exists
774 Kontext "TabFormatChartBorders"
775 call DialogTest ( TabFormatChartBorders )
776 '/// Goto tab page Transparency
778 Active.SetPage TabTransparency
779 '/// Check if tab page Transparency exists
780 Kontext "TabTransparency"
781 call DialogTest ( TabTransparency )
783 TabTransparency.Cancel
785 Kontext "DocumentCalc"
786 DocumentCalc.TypeKeys "<Escape>"
790 '-------------------------------------------------------------------------------
792 testcase tFormatAxisXAxis
793 Dim iCountTabPg as integer
796 printlog "Load simple chart document"
797 if fLoadVerySimpleChartAndSaveLocal() > 0 then
798 warnlog "Loading test document seems to have failed -> Check this out!"
801 printlog "Select chart using navigator"
803 printlog "Edit / Object / Edit"
806 printlog "Format / Chart Type"
807 if fInvokeChartTypeDialog() > 0 then
808 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
812 printlog "Change Chart type to XY (to obtain more tabpages)"
813 if fSetChartType( "xy" ) > 0 then
814 warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)"
818 printlog "Close Chart Type dialog"
819 if fCloseChartTypeDialogOK() > 0 then
820 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
824 printlog "Invoke Format::Axis::X Axis"
826 printlog "Goto tab page Line"
828 iCountTabPg = Active.GetPageCount
829 if iCountTabPg <> 7 then
830 warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
832 printlog "Format::Axis::XAxis has 7 tab pages."
834 Active.SetPage TabFormatChartLine
835 printlog "Check if tab page Line exists"
836 Kontext "TabFormatChartLine"
837 call DialogTest ( TabFormatChartLine )
838 printlog "Goto tab page Characters"
840 Active.SetPage TabFont
841 printlog "Check if tab page Characters exists"
843 call DialogTest ( TabFont )
844 printlog "Goto tab page Font Effects"
846 Active.SetPage TabFontEffects
847 printlog "Check if tab page Font Effects exists"
848 Kontext "TabFontEffects"
849 call DialogTest ( TabFontEffects )
850 printlog "Goto tab page Label"
852 Active.SetPage TabChartAxisLabel
853 printlog "Check if tab page Label exists"
854 Kontext "TabChartAxisLabel"
855 call DialogTest ( TabChartAxisLabel )
856 printlog "Goto tab page Scale"
858 Active.SetPage TabChartAxisScale
859 printlog "Check if tab page Scale exists"
860 Kontext "TabChartAxisScale"
861 call DialogTest ( TabChartAxisScale )
863 Active.SetPage TabChartAxisPositioning
864 printlog "Check if tab page Positiong exists"
865 Kontext "TabChartAxisPositioning"
866 call DialogTest ( TabChartAxisPositioning )
867 printlog "Goto tab page Numbers"
869 Active.SetPage TabChartAxisNumbers
870 printlog "Check if tab page Numbers exists"
871 Kontext "TabChartAxisNumbers"
872 call DialogTest ( TabChartAxisNumbers )
873 printlog "Close dialog with cancel"
874 TabChartAxisNumbers.Cancel
875 printlog "File / Close"
879 '-------------------------------------------------------------
881 testcase tFormatAxisYAxis
882 Dim iCountTabPg as integer
883 Dim iCrossingEntries as integer
884 Dim iCategoryEntries as integer
885 Dim iPlaceLabels as integer
886 Dim iPlaceMarks as integer
894 printlog "Load simple chart document"
895 if fLoadVerySimpleChartAndSaveLocal() > 0 then
896 warnlog "Loading test document seems to have failed -> Check this out!"
899 printlog "Select chart using navigator"
901 printlog "Edit / Object / Edit"
904 printlog "Format / Chart Type"
905 if fInvokeChartTypeDialog() > 0 then
906 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
910 printlog "Change Chart type to BAR (to obtain more tabpages)"
911 if fSetChartType( "bar" ) > 0 then
912 warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)"
916 printlog "Close Chart Type dialog"
917 if fCloseChartTypeDialogOK() > 0 then
918 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
922 printlog "Invoke Format::Axis::Y Axis"
925 iCountTabPg = Active.GetPageCount
926 if iCountTabPg <> 7 then
927 warnlog "Format::Axis::YAxis should have 7 tab pages but has " & iCountTabPg & "."
929 printlog "Format::Axis::YAxis has 7 tab pages."
931 printlog "Goto tab page Characters"
932 Active.SetPage TabFont
933 printlog "Check if tab page Characters exists"
935 call DialogTest ( TabFont )
936 printlog "Goto tab page Line"
938 Active.SetPage TabFormatChartLine
939 printlog "Check if tab page Line exists"
940 Kontext "TabFormatChartLine"
941 call DialogTest ( TabFormatChartLine )
942 printlog "Goto tab page Label"
944 Active.SetPage TabChartAxisLabel
945 printlog "Check if tab page Label exists"
946 Kontext "TabChartAxisLabel"
947 call DialogTest ( TabChartAxisLabel )
948 printlog "Goto tab page Font Effects"
950 Active.SetPage TabFontEffects
951 printlog "Check if tab page Font Effects exists"
952 Kontext "TabFontEffects"
953 call DialogTest ( TabFontEffects )
954 printlog "Goto tab page Numbers"
956 Active.SetPage TabChartAxisNumbers
957 printlog "Check if tab page Numbers exists"
958 Kontext "TabChartAxisNumbers"
959 call DialogTest ( TabChartAxisNumbers )
960 printlog "Goto tab page Scale"
962 Active.SetPage TabChartAxisScale
963 printlog "Check if tab page Scale exists"
964 Kontext "TabChartAxisScale"
965 call DialogTest ( TabChartAxisScale )
966 printlog "Goto tab page Positioning"
968 Active.SetPage TabChartAxisPositioning
969 printlog "Check if tab page Positioning exists"
970 Kontext "TabChartAxisPositioning"
971 call DialogTest ( TabChartAxisPositioning )
972 iCrossingEntries = CrossOtherAxisAt.GetItemCount
973 if iCrossingEntries <> 3 then
974 warnlog "'Cross other axis at'-listbox sould have three entries but has " & iCrossingEntries & "."
976 printlog "'Cross other axis at'-listbox has three entries."
978 printlog "Check that the first entry in 'Cross other axis at'-listbox is selected."
979 if CrossOtherAxisAt.GetSelIndex <> 1 OR AxisAtCategory.IsVisible then
980 warnlog "The first entry in 'Cross other axis at'-listbox should be selected and the 'Category'-combobox should not be visible."
982 printlog "Select the third entry (Category) in 'Cross other axis at'-listbox"
983 CrossOtherAxisAt.Select(3)
984 if AxisAtCategory.IsVisible then
985 printlog "The 'Category'-combobox is visible."
986 iCategoryEntries = AxisAtCategory.GetItemCount
987 if iCategoryEntries = 2 then
988 printlog "The 'Category'-combobox should have two entries."
990 warnlog "The 'Category'-combobox should have two entries but has " & iCategoryEntries & "."
994 iPlaceLabels = PlaceLabels.GetItemCount
995 if iPlaceLabels <> 4 then
996 warnlog "'Place labels'-listbox should have four entries but has " & iPlaceLabels & "."
998 printlog "'Place labels'-listbox has four entries."
999 if PlaceMarks.IsEnabled then
1000 warnlog "'Place marks'-listbox should only enabled if 'Place labels'-listbox has been set to 4th entry."
1002 printlog "Select fourth entry in 'Place labels'-listbox."
1003 PlaceLabels.Select(4)
1004 if PlaceMarks.IsEnabled then
1005 printlog "'Place marks'-listbox is enabled if fourth entry of 'Place labels'-listbox has been selected."
1006 iPlaceMarks = PlaceMarks.GetItemCount
1007 if iPlaceMarks = 3 then
1008 printlog "'Place marks'-listbox has three entries."
1010 warnlog "'Place marks'-listbox has not three entries. It has " & iPlaceMarks & " entries."
1013 warnlog "'Place marks'-listbox is not enabled if fourth entry of 'Place labels'-listbox has been selected."
1017 Kontext "TabChartAxisPositioning"
1018 printlog "Leave dialog with Cancel."
1019 TabChartAxisPositioning.Cancel
1020 printlog "File / Close"
1024 '-------------------------------------------------------------
1026 testcase tFormatAxisZAxis
1027 '///<u><b>Dialog test after invoking Format::Axis::Z Axis</b></u>
1030 '/// Load simple chart document
1031 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1032 warnlog "Loading test document seems to have failed -> Check this out!"
1035 '/// Select chart using navigator
1036 call fSelectFirstOLE
1037 '/// Edit / Object / Edit
1040 '/// Format / Chart Type
1041 if fInvokeChartTypeDialog() > 0 then
1042 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
1046 '/// Change Chart type to AREA (to obtain more tabpages)
1047 if fSetChartType( "area" ) > 0 then
1048 warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)"
1052 '/// Close Chart Type dialog
1053 if fCloseChartTypeDialogOK() > 0 then
1054 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
1058 '/// Convert chart to 3D (this will enable the Z Axis)
1059 if NOT fConvertChartTo3D() then
1060 warnlog "Conversion of chart to 3D failed -> Quit testcase"
1065 '/// Invoke Format::Axis::Z Axis
1067 '/// Goto tab page Font Effects
1069 Active.SetPage TabFontEffects
1070 '/// Check if tab page Font Effects exists
1071 Kontext "TabFontEffects"
1072 call DialogTest ( TabFontEffects )
1074 '/// Goto tab page Characters
1076 Active.SetPage TabFont
1077 '/// Check if tab page Characters exists
1079 call DialogTest ( TabFont )
1081 '/// Goto tab page Label
1083 Active.SetPage TabChartAxisLabel
1084 '/// Check if tab page Label exists
1085 Kontext "TabChartAxisLabel"
1086 call DialogTest ( TabChartAxisLabel )
1088 '/// Goto tab page Line
1090 Active.SetPage TabFormatChartLine
1091 '/// Check if tab page Line exists
1092 Kontext "TabFormatChartLine"
1093 call DialogTest ( TabFormatChartLine )
1096 TabFormatChartLine.Cancel
1098 Kontext "DocumentCalc"
1099 DocumentCalc.TypeKeys "<Escape>"
1105 '-------------------------------------------------------------
1107 testcase tFormatAxisSecondaryXAxis
1108 Dim iCountTabPg as integer
1111 printlog "Load simple chart document"
1112 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1113 warnlog "Loading test document seems to have failed -> Check this out!"
1116 printlog "Select chart using navigator"
1117 call fSelectFirstOLE
1118 printlog "Edit / Object / Edit"
1121 printlog "Format / Chart Type"
1122 if fInvokeChartTypeDialog() > 0 then
1123 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
1127 printlog "Change Chart type to XY (to obtain more tabpages)"
1128 if fSetChartType( "xy" ) > 0 then
1129 warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)"
1133 printlog "Close Chart Type dialog"
1134 if fCloseChartTypeDialogOK() > 0 then
1135 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
1139 printlog "Invoke Insert::Axes"
1140 if fInvokeAxesDialog() > 0 then
1141 warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)"
1145 Kontext "InsertAxesDialog"
1146 printlog "Check Secondary X Axis Title"
1147 if fSetAxis( SecondaryXAxis , TRUE ) > 0 then
1148 warnlog "Something went wrong enabling the Secondary X Axis -> Check this out! (Previous log may help you)"
1152 printlog "Close Axes dialog"
1153 if fCloseAxesDialogOK() > 0 then
1154 warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)"
1158 printlog "Invoke Format::Axis::Secondary X Axis"
1159 FormatAxisSecondaryXAxis
1160 printlog "Goto tab page Line"
1162 iCountTabPg = Active.GetPageCount
1163 if iCountTabPg <> 7 then
1164 warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
1166 printlog "Format::Axis::XAxis has 7 tab pages."
1168 Active.SetPage TabFormatChartLine
1169 printlog "Check if tab page Line exists"
1170 Kontext "TabFormatChartLine"
1171 call DialogTest ( TabFormatChartLine )
1172 printlog "Goto tab page Characters"
1174 Active.SetPage TabFont
1175 printlog "Check if tab page Characters exists"
1177 call DialogTest ( TabFont )
1178 printlog "Goto tab page Font Effects"
1180 Active.SetPage TabFontEffects
1181 printlog "Check if tab page Font Effects exists"
1182 Kontext "TabFontEffects"
1183 call DialogTest ( TabFontEffects )
1184 printlog "Goto tab page Label"
1186 Active.SetPage TabChartAxisLabel
1187 printlog "Check if tab page Label exists"
1188 Kontext "TabChartAxisLabel"
1189 call DialogTest ( TabChartAxisLabel )
1190 printlog "Goto tab page Scale"
1192 Active.SetPage TabChartAxisScale
1193 printlog "Check if tab page Scale exists"
1194 Kontext "TabChartAxisScale"
1195 call DialogTest ( TabChartAxisScale )
1197 Active.SetPage TabChartAxisPositioning
1198 printlog "Check if tab page Positiong exists"
1199 Kontext "TabChartAxisPositioning"
1200 call DialogTest ( TabChartAxisPositioning )
1201 printlog "Goto tab page Numbers"
1203 Active.SetPage TabChartAxisNumbers
1204 printlog "Check if tab page Numbers exists"
1205 Kontext "TabChartAxisNumbers"
1206 call DialogTest ( TabChartAxisNumbers )
1207 printlog "Close dialog with cancel"
1208 TabChartAxisNumbers.Cancel
1209 printlog "File / Close"
1213 '-------------------------------------------------------------
1215 testcase tFormatAxisSecondaryYAxis
1216 Dim iCountTabPg as integer
1219 printlog "Load simple chart document"
1220 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1221 warnlog "Loading test document seems to have failed -> Check this out!"
1224 printlog "Select chart using navigator"
1225 call fSelectFirstOLE
1226 printlog "Edit / Object / Edit"
1229 printlog "Invoke Insert::Axes"
1230 if fInvokeAxesDialog() > 0 then
1231 warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)"
1235 Kontext "InsertAxesDialog"
1236 printlog "Check Secondary Y Axis"
1237 if fSetAxis( SecondaryYAxis , TRUE ) > 0 then
1238 warnlog "Something went wrong enabling the Secondary Y Axis -> Check this out! (Previous log may help you)"
1242 printlog "Leave Axes dialog with OK"
1243 if fCloseAxesDialogOK() > 0 then
1244 warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)"
1248 printlog "Invoke Format::Axis::Secondary Y Axis"
1249 FormatAxisSecondaryYAxis
1250 printlog "Goto tab page Line"
1252 iCountTabPg = Active.GetPageCount
1253 if iCountTabPg <> 7 then
1254 warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
1256 printlog "Format::Axis::XAxis has 7 tab pages."
1258 Active.SetPage TabFormatChartLine
1259 printlog "Check if tab page Line exists"
1260 Kontext "TabFormatChartLine"
1261 call DialogTest ( TabFormatChartLine )
1262 printlog "Goto tab page Characters"
1264 Active.SetPage TabFont
1265 printlog "Check if tab page Characters exists"
1267 call DialogTest ( TabFont )
1268 printlog "Goto tab page Font Effects"
1270 Active.SetPage TabFontEffects
1271 printlog "Check if tab page Font Effects exists"
1272 Kontext "TabFontEffects"
1273 call DialogTest ( TabFontEffects )
1274 printlog "Goto tab page Label"
1276 Active.SetPage TabChartAxisLabel
1277 printlog "Check if tab page Label exists"
1278 Kontext "TabChartAxisLabel"
1279 call DialogTest ( TabChartAxisLabel )
1280 printlog "Goto tab page Scale"
1282 Active.SetPage TabChartAxisScale
1283 printlog "Check if tab page Scale exists"
1284 Kontext "TabChartAxisScale"
1285 call DialogTest ( TabChartAxisScale )
1287 Active.SetPage TabChartAxisPositioning
1288 printlog "Check if tab page Positiong exists"
1289 Kontext "TabChartAxisPositioning"
1290 call DialogTest ( TabChartAxisPositioning )
1291 printlog "Goto tab page Numbers"
1293 Active.SetPage TabChartAxisNumbers
1294 printlog "Check if tab page Numbers exists"
1295 Kontext "TabChartAxisNumbers"
1296 call DialogTest ( TabChartAxisNumbers )
1297 printlog "Close dialog with cancel"
1298 TabChartAxisNumbers.Cancel
1299 printlog "File / Close"
1303 '-------------------------------------------------------------
1304 testcase tFormatAxisAllAxes
1305 '///<u><b>Dialog test after invoking Format::Axis::All Axes</b></u>
1308 '/// Load simple chart document
1309 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1310 warnlog "Loading test document seems to have failed -> Check this out!"
1313 '/// Select chart using navigator
1314 call fSelectFirstOLE
1315 '/// Edit / Object / Edit
1318 '/// Format / Chart Type
1319 if fInvokeChartTypeDialog() > 0 then
1320 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
1324 '/// Change Chart type to NET
1325 if fSetChartType( "net" ) > 0 then
1326 warnlog "Something went wrong setting chart type to NET -> Check this out! (Previous log may help you)"
1330 '/// Close Chart Type dialog
1331 if fCloseChartTypeDialogOK() > 0 then
1332 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
1336 '/// Invoke Format::Axis::All Axes
1338 '/// Goto tab page Characters
1340 Active.SetPage TabFont
1341 '/// Check if tab page Characters exists
1343 call DialogTest ( TabFont )
1345 '/// Goto tab page Font Effects
1347 Active.SetPage TabFontEffects
1348 '/// Check if tab page Font Effects exists
1349 Kontext "TabFontEffects"
1350 call DialogTest ( TabFontEffects )
1352 '/// Goto tab page Line
1354 Active.SetPage TabFormatChartLine
1355 '/// Check if tab page Line exists
1356 Kontext "TabFormatChartLine"
1357 call DialogTest ( TabFormatChartLine )
1359 '/// Goto tab page Label
1361 Active.SetPage TabChartAxisLabel
1362 '/// Check if tab page Label exists
1363 Kontext "TabChartAxisLabel"
1364 call DialogTest ( TabChartAxisLabel )
1367 TabChartAxisLabel.Cancel
1369 Kontext "DocumentCalc"
1370 DocumentCalc.TypeKeys "<Escape>"