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 "Select DataSeries A by toolbar selectorbox"
74 call fChartSelectElement (8)
75 printlog "Open the properties dialog by using the FormatSelection button in the toolbar"
77 printlog "Select tab page Options"
79 iCountTabPg = Active.GetPageCount
80 if iCountTabPg <> 4 then
81 warnlog "Edit::Properties on a data series should have 4 tab pages but has " & iCountTabPg & "."
83 printlog "Edit::Properties on a data series has 4 tab pages."
85 Active.SetPage TabDataSeriesOptions
86 '/// Check if tab page data series options exists
87 Kontext "TabDataSeriesOptions"
88 call DialogTest ( TabDataSeriesOptions )
89 '/// Check if tab page area exists
91 Active.SetPage TabArea
93 call DialogTest ( TabArea )
94 '/// Check if tab page transparency exists
96 Active.SetPage TabTransparency
97 Kontext "TabTransparency"
98 call DialogTest ( TabTransparency )
99 '/// Check if tab page borders exists
101 Active.SetPage TabFormatChartBorders
102 Kontext "TabFormatChartBorders"
103 call DialogTest ( TabFormatChartBorders )
104 '/// Close dialog with Cancel-button
105 TabFormatChartBorders.Cancel
107 Kontext "DocumentCalc"
108 DocumentCalc.TypeKeys "<Escape>"
110 warnlog "It was not possible to select the chart object!"
115 '-------------------------------------------------------------------------
117 testcase tFormatObjectPropertiesPieChart
118 Dim iCountTabPg as integer
122 '///<u><b>Dialog test after invoking Format::Object Properties... on a pie chart</b></u>
123 '/// Load simple chart document
124 if fLoadVerySimpleChartAndSaveLocal() > 0 then
125 warnlog "Loading test document seems to have failed -> Check this out!"
128 '/// Select chart using navigator
129 if fSelectFirstOLE = 0 then
130 '/// Edit / Object / Edit
132 '/// Move to third object in Chart using TAB key (data series)
133 Kontext "DocumentChart"
134 '/// Format / Chart Type
135 if fInvokeChartTypeDialog() > 0 then
136 warnlog "Something went wrong trying to invoke the Chart Types dialog"
140 if fSetChartType("pie") > 0 then
141 warnlog "Something went wrong trying to set the Chart Type to 'Pie'"
145 if fCloseChartTypeDialogOK() > 0 then
146 warnlog "Something went wrong trying to leave the dialog with OK"
150 '/// Move to data series in Chart
151 call fChartSelectElement (5)
152 printlog "Open the properties dialog by using the FormatSelection button in the toolbar"
153 FormatSelection.Click
154 '/// Select tab page Aligment
156 iCountTabPg = Active.GetPageCount
157 if iCountTabPg <> 4 then
158 warnlog "Edit::Properties on a data series of a pie chart should have 4 tab pages but has " & iCountTabPg & "."
160 printlog "Edit::Properties on a data series on a pie chart has 4 tab pages."
162 Active.SetPage TabChartPieOptions
163 '/// Check if tab page Options exists
164 Kontext "TabChartPieOptions"
165 call DialogTest ( TabChartPieOptions )
166 '/// Close dialog with Cancel-button
167 TabChartPieOptions.Cancel
169 Kontext "DocumentCalc"
170 DocumentCalc.TypeKeys "<ESCAPE>"
172 warnlog "It was not possible to select the chart object!"
177 '-------------------------------------------------------------------------------
179 testcase tFormatPositonAndSize
180 '///<u><b>Dialog test after invoking Format::PositionAndSize</b></u>
181 '/// Load simple chart document
182 if fLoadVerySimpleChartAndSaveLocal() > 0 then
183 warnlog "Loading test document seems to have failed -> Check this out!"
186 '/// Select chart using navigator
188 '/// Edit / Object / Edit
190 '/// Move to first object in Chart using TAB key
191 Kontext "DocumentChart"
192 DocumentChart.TypeKeys "<TAB>"
193 '/// Invoke Format::PositionAndSize
194 FormatPositionAndSizeChart
195 '/// Check if Position and Size dialog exists (single tab page)
196 Kontext "TabPositionAndSize"
197 call DialogTest ( TabPositionAndSize )
199 TabPositionAndSize.Cancel
201 Kontext "DocumentCalc"
202 DocumentCalc.TypeKeys "<Escape>"
206 '-------------------------------------------------------------------------------
208 testcase tFormatArrangement
209 dim sInputFile as string
211 sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange01.ods")
212 printlog "Open test document gtesttoolpath/chart2/required/input/ch_flexrange01.ods"
213 if fOpenTestDocumentAndInsertChart(sInputFile) then
215 printlog "Choose the Chart type 'bar' (should be the second in the top-down list)"
216 if fSetChartType( "bar" ) > 0 then
217 warnlog "Something went wrong setting chart type to BAR. Testcase aborted"
218 Kontext "ChartWizard"
223 Kontext "ChartWizard"
224 printlog "Press OK button"
226 Kontext "DocumentChart"
227 printlog "Type twice <TAB> to select a data series to enable the menu entry."
228 DocumentChart.TypeKeys "<TAB>", 2, TRUE
229 Kontext "DocumentCalc"
231 printlog "Select 'Format' entry in main menu"
232 hMenuSelectNr(5) ' FORMAT
233 printlog "Select 'Arrangement' entry in 'Format'-menu"
234 hMenuSelectNr(3) ' ARRANGEMENT
235 printlog "Select enabled 'Send Backward' entry."
237 Kontext "DocumentCalc"
239 printlog "Select 'Format' entry in main menu again"
240 hMenuSelectNr(5) ' FORMAT
241 printlog "Select 'Arrangement' entry in 'Format'-menu"
242 hMenuSelectNr(3) ' ARRANGEMENT
243 printlog "Select now enabled 'Bring Forward' entry."
245 printlog "Close document"
248 warnlog "It was not possible to open the test document."
252 '-------------------------------------------------------------------------------
254 testcase tFormatTitleMaintitle
255 '///<u><b>Dialog test after invoking Format::Title::MainTitle</b></u>
256 '/// Load simple chart document
257 if fLoadVerySimpleChartAndSaveLocal() > 0 then
258 warnlog "Loading test document seems to have failed -> Check this out!"
261 '/// Select chart using navigator
263 '/// Edit / Object / Edit
266 '/// Format / Title / Main title
268 '/// Goto tab page Borders
270 Active.SetPage TabFormatChartBorders
271 '/// Check if tab page Borders exists
272 Kontext "TabFormatChartBorders"
273 call DialogTest ( TabFormatChartBorders )
274 '/// Goto tab page Area
276 Active.SetPage TabArea
277 '/// Check if tab page Area exists
279 call DialogTest ( TabArea )
280 '/// Goto tab page Transparency
282 Active.SetPage TabTransparency
283 '/// Check if tab page Transparency exists
284 Kontext "TabTransparency"
285 call DialogTest ( TabTransparency )
286 '/// Goto tab page Characters
288 Active.SetPage TabFont
289 '/// Check if tab page Characters exists
291 call DialogTest ( TabFont )
292 '/// Goto tab page Font Effects
294 Active.SetPage TabFontEffects
295 '/// Check if tab page Font Effects exists
296 Kontext "TabFontEffects"
297 call DialogTest ( TabFontEffects )
298 '/// Goto tab page Alignment
300 Active.SetPage TabFormatChartTitleAlignment
301 '/// Check if tab page Alignment exists
302 Kontext "TabFormatChartTitleAlignment"
303 call DialogTest ( TabFormatChartTitleAlignment )
305 TabFormatChartTitleAlignment.Cancel
307 Kontext "DocumentCalc"
308 DocumentCalc.TypeKeys "<Escape>"
312 '-------------------------------------------------------------------------------
314 testcase tFormatTitleSubtitle
315 '///<u><b>Dialog test after invoking Format::Title::Subtitle</b></u>
316 '/// Load simple chart document
317 if fLoadVerySimpleChartAndSaveLocal() > 0 then
318 warnlog "Loading test document seems to have failed -> Check this out!"
321 '/// Select chart using navigator
323 '/// Edit / Object / Edit
327 if fInvokeTitlesDialog() > 0 then
328 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
332 Kontext "InsertTitleDialog"
334 if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then
335 warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)"
339 '/// Close Title dialog
340 if fCloseTitlesDialogOK() > 0 then
341 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
345 '/// Format / Title / Subtitle
347 '/// Goto tab page Area
349 Active.SetPage TabArea
350 '/// Check if tab page Area exists
352 call DialogTest ( TabArea )
353 '/// Goto tab page Characters
355 Active.SetPage TabFont
356 '/// Check if tab page Characters exists
358 call DialogTest ( TabFont )
359 '/// Goto tab page Borders
361 Active.SetPage TabFormatChartBorders
362 '/// Check if tab page Borders exists
363 Kontext "TabFormatChartBorders"
364 call DialogTest ( TabFormatChartBorders )
365 '/// Goto tab page Alignment
367 Active.SetPage TabFormatChartTitleAlignment
368 '/// Check if tab page Alignment exists
369 Kontext "TabFormatChartTitleAlignment"
370 call DialogTest ( TabFormatChartTitleAlignment )
371 '/// Goto tab page Transparency
373 Active.SetPage TabTransparency
374 '/// Check if tab page Transparency exists
375 Kontext "TabTransparency"
376 call DialogTest ( TabTransparency )
377 '/// Goto tab page Font Effects
379 Active.SetPage TabFontEffects
380 '/// Check if tab page Font Effects exists
381 Kontext "TabFontEffects"
382 call DialogTest ( TabFontEffects )
383 '/// Close dialog with Cancel
384 TabFontEffects.Cancel
389 '-------------------------------------------------------------------------------
391 testcase tFormatTitleXAxistitle
392 '///<u><b>Dialog test after invoking Format::Title::X Axis Title</b></u>
393 '/// Load simple chart document
394 if fLoadVerySimpleChartAndSaveLocal() > 0 then
395 warnlog "Loading test document seems to have failed -> Check this out!"
398 '/// Select chart using navigator
400 '/// Edit / Object / Edit
404 if fInvokeTitlesDialog() > 0 then
405 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
409 Kontext "InsertTitleDialog"
410 '/// Set X Axis Title
411 if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then
412 warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)"
416 '/// Close Title dialog
417 if fCloseTitlesDialogOK() > 0 then
418 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
422 '/// Format / Chart Type
423 if fInvokeChartTypeDialog() > 0 then
424 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
428 '/// Change Chart type to Column + Line
429 if fSetChartType( "column_line" ) > 0 then
430 warnlog "Something went wrong setting chart type to Column + Line -> Check this out! (Previous log may help you)"
434 '/// Close Chart Type dialog
435 if fCloseChartTypeDialogOK() > 0 then
436 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
440 '/// Format / Title / X Axis Title
442 '/// Goto tab page Font Effects
444 Active.SetPage TabFontEffects
445 '/// Check if tab page Font Effects exists
446 Kontext "TabFontEffects"
447 call DialogTest ( TabFontEffects )
448 '/// Goto tab page Transparency
450 Active.SetPage TabTransparency
451 '/// Check if tab page Transparency exists
452 Kontext "TabTransparency"
453 call DialogTest ( TabTransparency )
454 '/// Goto tab page Borders
456 Active.SetPage TabFormatChartBorders
457 '/// Check if tab page Borders exists
458 Kontext "TabFormatChartBorders"
459 call DialogTest ( TabFormatChartBorders )
460 '/// Goto tab page Alignment
462 Active.SetPage TabFormatChartTitleAlignment
463 '/// Check if tab page Alignment exists
464 Kontext "TabFormatChartTitleAlignment"
465 call DialogTest ( TabFormatChartTitleAlignment )
466 '/// Goto tab page Characters
468 Active.SetPage TabFont
469 '/// Check if tab page Characters exists
471 call DialogTest ( TabFont )
472 '/// Goto tab page Area
474 Active.SetPage TabArea
475 '/// Check if tab page Area exists
477 call DialogTest ( TabArea )
484 '-------------------------------------------------------------------------------
486 testcase tFormatTitleYAxistitle
487 '///<u><b>Dialog test after invoking Format::Title::Y Axis Title</b></u>
488 '/// Load simple chart document
489 if fLoadVerySimpleChartAndSaveLocal() > 0 then
490 warnlog "Loading test document seems to have failed -> Check this out!"
493 '/// Select chart using navigator
495 '/// Edit / Object / Edit
499 if fInvokeTitlesDialog() > 0 then
500 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
504 Kontext "InsertTitleDialog"
505 '/// Set Y Axis Title
506 if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then
507 warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
511 '/// Close Title dialog
512 if fCloseTitlesDialogOK() > 0 then
513 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
517 '/// Format / Chart Type
518 if fInvokeChartTypeDialog() > 0 then
519 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
523 '/// Change Chart type to STOCK
524 if fSetChartType( "stock" ) > 0 then
525 warnlog "Something went wrong setting chart type to STOCK -> Check this out! (Previous log may help you)"
529 '/// Close Chart Type dialog
530 if fCloseChartTypeDialogOK() > 0 then
531 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
535 '/// Format / Title / Y Axis Title
537 '/// Goto tab page Transparency
539 Active.SetPage TabTransparency
540 '/// Check if tab page Transparency exists
541 Kontext "TabTransparency"
542 call DialogTest ( TabTransparency )
543 '/// Goto tab page Alignment
545 Active.SetPage TabFormatChartTitleAlignment
546 '/// Check if tab page Alignment exists
547 Kontext "TabFormatChartTitleAlignment"
548 call DialogTest ( TabFormatChartTitleAlignment )
549 '/// Goto tab page Area
551 Active.SetPage TabArea
552 '/// Check if tab page Area exists
554 call DialogTest ( TabArea )
555 '/// Goto tab page Font Effects
557 Active.SetPage TabFontEffects
558 '/// Check if tab page Font Effects exists
559 Kontext "TabFontEffects"
560 call DialogTest ( TabFontEffects )
561 '/// Goto tab page Borders
563 Active.SetPage TabFormatChartBorders
564 '/// Check if tab page Borders exists
565 Kontext "TabFormatChartBorders"
566 call DialogTest ( TabFormatChartBorders )
567 '/// Goto tab page Characters
569 Active.SetPage TabFont
570 '/// Check if tab page Characters exists
572 call DialogTest ( TabFont )
579 '-------------------------------------------------------------------------------
581 testcase tFormatTitleZAxistitle
582 '///<u><b>Dialog test after invoking Format::Title::Z Axis Title</b></u>
583 '/// Load simple chart document
584 if fLoadVerySimpleChartAndSaveLocal() > 0 then
585 warnlog "Loading test document seems to have failed -> Check this out!"
588 '/// Select chart using navigator
590 '/// Edit / Object / Edit
593 '/// Convert chart to 3D (this will enable all controls in Title dialog)
594 if NOT fConvertChartTo3D() then
595 warnlog "Conversion of chart to 3D failed -> Quit testcase"
600 if fInvokeTitlesDialog() > 0 then
601 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
605 Kontext "InsertTitleDialog"
606 '/// Set Z Axis Title
607 if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then
608 warnlog "Something went wrong setting the Z Axis Title -> Check this out! (Previous log may help you)"
612 '/// Close Title dialog
613 if fCloseTitlesDialogOK() > 0 then
614 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
618 '/// Format / Chart Type
619 if fInvokeChartTypeDialog() > 0 then
620 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
624 '/// Change Chart type to BAR
625 if fSetChartType( "bar" ) > 0 then
626 warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)"
630 '/// Close Chart Type dialog
631 if fCloseChartTypeDialogOK() > 0 then
632 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
636 '/// Invoke Format::Title::Z Axis Title
638 '/// Goto tab page Alignment
640 Active.SetPage TabFormatChartTitleAlignment
641 '/// Check if tab page Alignment exists
642 Kontext "TabFormatChartTitleAlignment"
643 call DialogTest ( TabFormatChartTitleAlignment )
644 '/// Goto tab page Transparency
646 Active.SetPage TabTransparency
647 '/// Check if tab page Transparency exists
648 Kontext "TabTransparency"
649 call DialogTest ( TabTransparency )
650 '/// Goto tab page Font Effects
652 Active.SetPage TabFontEffects
653 '/// Check if tab page Font Effects exists
654 Kontext "TabFontEffects"
655 call DialogTest ( TabFontEffects )
656 '/// Goto tab page Area
658 Active.SetPage TabArea
659 '/// Check if tab page Area exists
661 call DialogTest ( TabArea )
662 '/// Goto tab page Characters
664 Active.SetPage TabFont
665 '/// Check if tab page Characters exists
667 call DialogTest ( TabFont )
668 '/// Goto tab page Borders
670 Active.SetPage TabFormatChartBorders
671 '/// Check if tab page Borders exists
672 Kontext "TabFormatChartBorders"
673 call DialogTest ( TabFormatChartBorders )
675 TabFormatChartBorders.Cancel
680 '-------------------------------------------------------------------------------
682 testcase tFormatTitleAllTitles
683 '///<u><b>Dialog test after invoking Format::Title::All Titles</b></u>
684 '/// Load simple chart document
685 if fLoadVerySimpleChartAndSaveLocal() > 0 then
686 warnlog "Loading test document seems to have failed -> Check this out!"
689 '/// Select chart using navigator
691 '/// Edit / Object / Edit
694 '/// Convert chart to 3D (this will enable all controls in Title dialog)
695 if NOT fConvertChartTo3D() then
696 warnlog "Conversion of chart to 3D failed -> Quit testcase"
701 if fInvokeTitlesDialog() > 0 then
702 warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
706 Kontext "InsertTitleDialog"
707 '/// Set All Axis Title
708 if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then
709 warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)"
713 if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then
714 warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)"
718 if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then
719 warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
723 if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then
724 warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
728 '/// Close Title dialog
729 if fCloseTitlesDialogOK() > 0 then
730 warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
734 '/// Format / Chart Type
735 if fInvokeChartTypeDialog() > 0 then
736 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
740 '/// Change Chart type to AREA
741 if fSetChartType( "area" ) > 0 then
742 warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)"
746 '/// Close Chart Type dialog
747 if fCloseChartTypeDialogOK() > 0 then
748 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
752 '/// Format / Title / All Titles
754 '/// Goto tab page Characters
756 Active.SetPage TabFont
757 '/// Check if tab page Characters exists
759 call DialogTest ( TabFont )
760 '/// Goto tab page Alignment
762 Active.SetPage TabFormatChartTitleAlignment
763 '/// Check if tab page Alignment exists
764 Kontext "TabFormatChartTitleAlignment"
765 call DialogTest ( TabFormatChartTitleAlignment )
766 '/// Goto tab page Font Effects
768 Active.SetPage TabFontEffects
769 '/// Check if tab page Font Effects exists
770 Kontext "TabFontEffects"
771 call DialogTest ( TabFontEffects )
772 '/// Goto tab page Area
774 Active.SetPage TabArea
775 '/// Check if tab page Area exists
777 call DialogTest ( TabArea )
778 '/// Goto tab page Borders
780 Active.SetPage TabFormatChartBorders
781 '/// Check if tab page Borders exists
782 Kontext "TabFormatChartBorders"
783 call DialogTest ( TabFormatChartBorders )
784 '/// Goto tab page Transparency
786 Active.SetPage TabTransparency
787 '/// Check if tab page Transparency exists
788 Kontext "TabTransparency"
789 call DialogTest ( TabTransparency )
791 TabTransparency.Cancel
793 Kontext "DocumentCalc"
794 DocumentCalc.TypeKeys "<Escape>"
798 '-------------------------------------------------------------------------------
800 testcase tFormatAxisXAxis
801 Dim iCountTabPg as integer
804 printlog "Load simple chart document"
805 if fLoadVerySimpleChartAndSaveLocal() > 0 then
806 warnlog "Loading test document seems to have failed -> Check this out!"
809 printlog "Select chart using navigator"
811 printlog "Edit / Object / Edit"
814 printlog "Format / Chart Type"
815 if fInvokeChartTypeDialog() > 0 then
816 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
820 printlog "Change Chart type to XY (to obtain more tabpages)"
821 if fSetChartType( "xy" ) > 0 then
822 warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)"
826 printlog "Close Chart Type dialog"
827 if fCloseChartTypeDialogOK() > 0 then
828 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
832 printlog "Invoke Format::Axis::X Axis"
834 printlog "Goto tab page Line"
836 iCountTabPg = Active.GetPageCount
837 if iCountTabPg <> 7 then
838 warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
840 printlog "Format::Axis::XAxis has 7 tab pages."
842 Active.SetPage TabFormatChartLine
843 printlog "Check if tab page Line exists"
844 Kontext "TabFormatChartLine"
845 call DialogTest ( TabFormatChartLine )
846 printlog "Goto tab page Characters"
848 Active.SetPage TabFont
849 printlog "Check if tab page Characters exists"
851 call DialogTest ( TabFont )
852 printlog "Goto tab page Font Effects"
854 Active.SetPage TabFontEffects
855 printlog "Check if tab page Font Effects exists"
856 Kontext "TabFontEffects"
857 call DialogTest ( TabFontEffects )
858 printlog "Goto tab page Label"
860 Active.SetPage TabChartAxisLabel
861 printlog "Check if tab page Label exists"
862 Kontext "TabChartAxisLabel"
863 call DialogTest ( TabChartAxisLabel )
864 printlog "Goto tab page Scale"
866 Active.SetPage TabChartAxisScale
867 printlog "Check if tab page Scale exists"
868 Kontext "TabChartAxisScale"
869 call DialogTest ( TabChartAxisScale )
871 Active.SetPage TabChartAxisPositioning
872 printlog "Check if tab page Positiong exists"
873 Kontext "TabChartAxisPositioning"
874 call DialogTest ( TabChartAxisPositioning )
875 printlog "Goto tab page Numbers"
877 Active.SetPage TabChartAxisNumbers
878 printlog "Check if tab page Numbers exists"
879 Kontext "TabChartAxisNumbers"
880 call DialogTest ( TabChartAxisNumbers )
881 printlog "Close dialog with cancel"
882 TabChartAxisNumbers.Cancel
883 printlog "File / Close"
887 '-------------------------------------------------------------
889 testcase tFormatAxisYAxis
890 Dim iCountTabPg as integer
891 Dim iCrossingEntries as integer
892 Dim iCategoryEntries as integer
893 Dim iPlaceLabels as integer
894 Dim iPlaceMarks as integer
902 printlog "Load simple chart document"
903 if fLoadVerySimpleChartAndSaveLocal() > 0 then
904 warnlog "Loading test document seems to have failed -> Check this out!"
907 printlog "Select chart using navigator"
909 printlog "Edit / Object / Edit"
912 printlog "Format / Chart Type"
913 if fInvokeChartTypeDialog() > 0 then
914 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
918 printlog "Change Chart type to BAR (to obtain more tabpages)"
919 if fSetChartType( "bar" ) > 0 then
920 warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)"
924 printlog "Close Chart Type dialog"
925 if fCloseChartTypeDialogOK() > 0 then
926 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
930 printlog "Invoke Format::Axis::Y Axis"
933 iCountTabPg = Active.GetPageCount
934 if iCountTabPg <> 7 then
935 warnlog "Format::Axis::YAxis should have 7 tab pages but has " & iCountTabPg & "."
937 printlog "Format::Axis::YAxis has 7 tab pages."
939 printlog "Goto tab page Characters"
940 Active.SetPage TabFont
941 printlog "Check if tab page Characters exists"
943 call DialogTest ( TabFont )
944 printlog "Goto tab page Line"
946 Active.SetPage TabFormatChartLine
947 printlog "Check if tab page Line exists"
948 Kontext "TabFormatChartLine"
949 call DialogTest ( TabFormatChartLine )
950 printlog "Goto tab page Label"
952 Active.SetPage TabChartAxisLabel
953 printlog "Check if tab page Label exists"
954 Kontext "TabChartAxisLabel"
955 call DialogTest ( TabChartAxisLabel )
956 printlog "Goto tab page Font Effects"
958 Active.SetPage TabFontEffects
959 printlog "Check if tab page Font Effects exists"
960 Kontext "TabFontEffects"
961 call DialogTest ( TabFontEffects )
962 printlog "Goto tab page Numbers"
964 Active.SetPage TabChartAxisNumbers
965 printlog "Check if tab page Numbers exists"
966 Kontext "TabChartAxisNumbers"
967 call DialogTest ( TabChartAxisNumbers )
968 printlog "Goto tab page Scale"
970 Active.SetPage TabChartAxisScale
971 printlog "Check if tab page Scale exists"
972 Kontext "TabChartAxisScale"
973 call DialogTest ( TabChartAxisScale )
974 printlog "Goto tab page Positioning"
976 Active.SetPage TabChartAxisPositioning
977 printlog "Check if tab page Positioning exists"
978 Kontext "TabChartAxisPositioning"
979 call DialogTest ( TabChartAxisPositioning )
980 iCrossingEntries = CrossOtherAxisAt.GetItemCount
981 if iCrossingEntries <> 3 then
982 warnlog "'Cross other axis at'-listbox sould have three entries but has " & iCrossingEntries & "."
984 printlog "'Cross other axis at'-listbox has three entries."
986 printlog "Check that the first entry in 'Cross other axis at'-listbox is selected."
987 if CrossOtherAxisAt.GetSelIndex <> 1 OR AxisAtCategory.IsVisible then
988 warnlog "The first entry in 'Cross other axis at'-listbox should be selected and the 'Category'-combobox should not be visible."
990 printlog "Select the third entry (Category) in 'Cross other axis at'-listbox"
991 CrossOtherAxisAt.Select(3)
992 if AxisAtCategory.IsVisible then
993 printlog "The 'Category'-combobox is visible."
994 iCategoryEntries = AxisAtCategory.GetItemCount
995 if iCategoryEntries = 2 then
996 printlog "The 'Category'-combobox should have two entries."
998 warnlog "The 'Category'-combobox should have two entries but has " & iCategoryEntries & "."
1002 iPlaceLabels = PlaceLabels.GetItemCount
1003 if iPlaceLabels <> 4 then
1004 warnlog "'Place labels'-listbox should have four entries but has " & iPlaceLabels & "."
1006 printlog "'Place labels'-listbox has four entries."
1007 if PlaceMarks.IsEnabled then
1008 warnlog "'Place marks'-listbox should only enabled if 'Place labels'-listbox has been set to 4th entry."
1010 printlog "Select fourth entry in 'Place labels'-listbox."
1011 PlaceLabels.Select(4)
1012 if PlaceMarks.IsEnabled then
1013 printlog "'Place marks'-listbox is enabled if fourth entry of 'Place labels'-listbox has been selected."
1014 iPlaceMarks = PlaceMarks.GetItemCount
1015 if iPlaceMarks = 3 then
1016 printlog "'Place marks'-listbox has three entries."
1018 warnlog "'Place marks'-listbox has not three entries. It has " & iPlaceMarks & " entries."
1021 warnlog "'Place marks'-listbox is not enabled if fourth entry of 'Place labels'-listbox has been selected."
1025 Kontext "TabChartAxisPositioning"
1026 printlog "Leave dialog with Cancel."
1027 TabChartAxisPositioning.Cancel
1028 printlog "File / Close"
1032 '-------------------------------------------------------------
1034 testcase tFormatAxisZAxis
1035 '///<u><b>Dialog test after invoking Format::Axis::Z Axis</b></u>
1038 '/// Load simple chart document
1039 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1040 warnlog "Loading test document seems to have failed -> Check this out!"
1043 '/// Select chart using navigator
1044 call fSelectFirstOLE
1045 '/// Edit / Object / Edit
1048 '/// Format / Chart Type
1049 if fInvokeChartTypeDialog() > 0 then
1050 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
1054 '/// Change Chart type to AREA (to obtain more tabpages)
1055 if fSetChartType( "area" ) > 0 then
1056 warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)"
1060 '/// Close Chart Type dialog
1061 if fCloseChartTypeDialogOK() > 0 then
1062 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
1066 '/// Convert chart to 3D (this will enable the Z Axis)
1067 if NOT fConvertChartTo3D() then
1068 warnlog "Conversion of chart to 3D failed -> Quit testcase"
1073 '/// Invoke Format::Axis::Z Axis
1075 '/// Goto tab page Font Effects
1077 Active.SetPage TabFontEffects
1078 '/// Check if tab page Font Effects exists
1079 Kontext "TabFontEffects"
1080 call DialogTest ( TabFontEffects )
1082 '/// Goto tab page Characters
1084 Active.SetPage TabFont
1085 '/// Check if tab page Characters exists
1087 call DialogTest ( TabFont )
1089 '/// Goto tab page Label
1091 Active.SetPage TabChartAxisLabel
1092 '/// Check if tab page Label exists
1093 Kontext "TabChartAxisLabel"
1094 call DialogTest ( TabChartAxisLabel )
1096 '/// Goto tab page Line
1098 Active.SetPage TabFormatChartLine
1099 '/// Check if tab page Line exists
1100 Kontext "TabFormatChartLine"
1101 call DialogTest ( TabFormatChartLine )
1104 TabFormatChartLine.Cancel
1106 Kontext "DocumentCalc"
1107 DocumentCalc.TypeKeys "<Escape>"
1113 '-------------------------------------------------------------
1115 testcase tFormatAxisSecondaryXAxis
1116 Dim iCountTabPg as integer
1119 printlog "Load simple chart document"
1120 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1121 warnlog "Loading test document seems to have failed -> Check this out!"
1124 printlog "Select chart using navigator"
1125 call fSelectFirstOLE
1126 printlog "Edit / Object / Edit"
1129 printlog "Format / Chart Type"
1130 if fInvokeChartTypeDialog() > 0 then
1131 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
1135 printlog "Change Chart type to XY (to obtain more tabpages)"
1136 if fSetChartType( "xy" ) > 0 then
1137 warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)"
1141 printlog "Close Chart Type dialog"
1142 if fCloseChartTypeDialogOK() > 0 then
1143 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
1147 printlog "Invoke Insert::Axes"
1148 if fInvokeAxesDialog() > 0 then
1149 warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)"
1153 Kontext "InsertAxesDialog"
1154 printlog "Check Secondary X Axis Title"
1155 if fSetAxis( SecondaryXAxis , TRUE ) > 0 then
1156 warnlog "Something went wrong enabling the Secondary X Axis -> Check this out! (Previous log may help you)"
1160 printlog "Close Axes dialog"
1161 if fCloseAxesDialogOK() > 0 then
1162 warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)"
1166 printlog "Invoke Format::Axis::Secondary X Axis"
1167 FormatAxisSecondaryXAxis
1168 printlog "Goto tab page Line"
1170 iCountTabPg = Active.GetPageCount
1171 if iCountTabPg <> 7 then
1172 warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
1174 printlog "Format::Axis::XAxis has 7 tab pages."
1176 Active.SetPage TabFormatChartLine
1177 printlog "Check if tab page Line exists"
1178 Kontext "TabFormatChartLine"
1179 call DialogTest ( TabFormatChartLine )
1180 printlog "Goto tab page Characters"
1182 Active.SetPage TabFont
1183 printlog "Check if tab page Characters exists"
1185 call DialogTest ( TabFont )
1186 printlog "Goto tab page Font Effects"
1188 Active.SetPage TabFontEffects
1189 printlog "Check if tab page Font Effects exists"
1190 Kontext "TabFontEffects"
1191 call DialogTest ( TabFontEffects )
1192 printlog "Goto tab page Label"
1194 Active.SetPage TabChartAxisLabel
1195 printlog "Check if tab page Label exists"
1196 Kontext "TabChartAxisLabel"
1197 call DialogTest ( TabChartAxisLabel )
1198 printlog "Goto tab page Scale"
1200 Active.SetPage TabChartAxisScale
1201 printlog "Check if tab page Scale exists"
1202 Kontext "TabChartAxisScale"
1203 call DialogTest ( TabChartAxisScale )
1205 Active.SetPage TabChartAxisPositioning
1206 printlog "Check if tab page Positiong exists"
1207 Kontext "TabChartAxisPositioning"
1208 call DialogTest ( TabChartAxisPositioning )
1209 printlog "Goto tab page Numbers"
1211 Active.SetPage TabChartAxisNumbers
1212 printlog "Check if tab page Numbers exists"
1213 Kontext "TabChartAxisNumbers"
1214 call DialogTest ( TabChartAxisNumbers )
1215 printlog "Close dialog with cancel"
1216 TabChartAxisNumbers.Cancel
1217 printlog "File / Close"
1221 '-------------------------------------------------------------
1223 testcase tFormatAxisSecondaryYAxis
1224 Dim iCountTabPg as integer
1227 printlog "Load simple chart document"
1228 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1229 warnlog "Loading test document seems to have failed -> Check this out!"
1232 printlog "Select chart using navigator"
1233 call fSelectFirstOLE
1234 printlog "Edit / Object / Edit"
1237 printlog "Invoke Insert::Axes"
1238 if fInvokeAxesDialog() > 0 then
1239 warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)"
1243 Kontext "InsertAxesDialog"
1244 printlog "Check Secondary Y Axis"
1245 if fSetAxis( SecondaryYAxis , TRUE ) > 0 then
1246 warnlog "Something went wrong enabling the Secondary Y Axis -> Check this out! (Previous log may help you)"
1250 printlog "Leave Axes dialog with OK"
1251 if fCloseAxesDialogOK() > 0 then
1252 warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)"
1256 printlog "Invoke Format::Axis::Secondary Y Axis"
1257 FormatAxisSecondaryYAxis
1258 printlog "Goto tab page Line"
1260 iCountTabPg = Active.GetPageCount
1261 if iCountTabPg <> 7 then
1262 warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
1264 printlog "Format::Axis::XAxis has 7 tab pages."
1266 Active.SetPage TabFormatChartLine
1267 printlog "Check if tab page Line exists"
1268 Kontext "TabFormatChartLine"
1269 call DialogTest ( TabFormatChartLine )
1270 printlog "Goto tab page Characters"
1272 Active.SetPage TabFont
1273 printlog "Check if tab page Characters exists"
1275 call DialogTest ( TabFont )
1276 printlog "Goto tab page Font Effects"
1278 Active.SetPage TabFontEffects
1279 printlog "Check if tab page Font Effects exists"
1280 Kontext "TabFontEffects"
1281 call DialogTest ( TabFontEffects )
1282 printlog "Goto tab page Label"
1284 Active.SetPage TabChartAxisLabel
1285 printlog "Check if tab page Label exists"
1286 Kontext "TabChartAxisLabel"
1287 call DialogTest ( TabChartAxisLabel )
1288 printlog "Goto tab page Scale"
1290 Active.SetPage TabChartAxisScale
1291 printlog "Check if tab page Scale exists"
1292 Kontext "TabChartAxisScale"
1293 call DialogTest ( TabChartAxisScale )
1295 Active.SetPage TabChartAxisPositioning
1296 printlog "Check if tab page Positiong exists"
1297 Kontext "TabChartAxisPositioning"
1298 call DialogTest ( TabChartAxisPositioning )
1299 printlog "Goto tab page Numbers"
1301 Active.SetPage TabChartAxisNumbers
1302 printlog "Check if tab page Numbers exists"
1303 Kontext "TabChartAxisNumbers"
1304 call DialogTest ( TabChartAxisNumbers )
1305 printlog "Close dialog with cancel"
1306 TabChartAxisNumbers.Cancel
1307 printlog "File / Close"
1311 '-------------------------------------------------------------
1312 testcase tFormatAxisAllAxes
1313 '///<u><b>Dialog test after invoking Format::Axis::All Axes</b></u>
1316 '/// Load simple chart document
1317 if fLoadVerySimpleChartAndSaveLocal() > 0 then
1318 warnlog "Loading test document seems to have failed -> Check this out!"
1321 '/// Select chart using navigator
1322 call fSelectFirstOLE
1323 '/// Edit / Object / Edit
1326 '/// Format / Chart Type
1327 if fInvokeChartTypeDialog() > 0 then
1328 warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
1332 '/// Change Chart type to NET
1333 if fSetChartType( "net" ) > 0 then
1334 warnlog "Something went wrong setting chart type to NET -> Check this out! (Previous log may help you)"
1338 '/// Close Chart Type dialog
1339 if fCloseChartTypeDialogOK() > 0 then
1340 warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
1344 '/// Invoke Format::Axis::All Axes
1346 '/// Goto tab page Characters
1348 Active.SetPage TabFont
1349 '/// Check if tab page Characters exists
1351 call DialogTest ( TabFont )
1353 '/// Goto tab page Font Effects
1355 Active.SetPage TabFontEffects
1356 '/// Check if tab page Font Effects exists
1357 Kontext "TabFontEffects"
1358 call DialogTest ( TabFontEffects )
1360 '/// Goto tab page Line
1362 Active.SetPage TabFormatChartLine
1363 '/// Check if tab page Line exists
1364 Kontext "TabFormatChartLine"
1365 call DialogTest ( TabFormatChartLine )
1367 '/// Goto tab page Label
1369 Active.SetPage TabChartAxisLabel
1370 '/// Check if tab page Label exists
1371 Kontext "TabChartAxisLabel"
1372 call DialogTest ( TabChartAxisLabel )
1375 TabChartAxisLabel.Cancel
1377 Kontext "DocumentCalc"
1378 DocumentCalc.TypeKeys "<Escape>"