summaryrefslogtreecommitdiff
path: root/testautomation/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/chart2')
-rw-r--r--testautomation/chart2/optional/ch2_chart_data_dlg_impress.bas56
-rw-r--r--testautomation/chart2/optional/ch2_flexible_source_range_selection.bas69
-rwxr-xr-xtestautomation/chart2/optional/ch2_losa_ods_to_ods.bas68
-rwxr-xr-xtestautomation/chart2/optional/ch2_losa_ods_to_ots.bas68
-rwxr-xr-xtestautomation/chart2/optional/ch2_losa_ods_to_sdc.bas67
-rwxr-xr-xtestautomation/chart2/optional/ch2_losa_ods_to_sxc.bas68
-rwxr-xr-xtestautomation/chart2/optional/ch2_losa_ods_to_xls.bas68
-rwxr-xr-xtestautomation/chart2/optional/ch2_losa_sxc_to_ods.bas68
-rwxr-xr-xtestautomation/chart2/optional/ch2_losa_sxc_to_sdc.bas68
-rwxr-xr-xtestautomation/chart2/optional/ch2_lvl1.bas57
-rwxr-xr-xtestautomation/chart2/optional/ch2_lvl1_wizard.bas66
-rw-r--r--testautomation/chart2/optional/ch2_xml_format.bas55
-rw-r--r--testautomation/chart2/optional/includes/ch2_datadialogue.inc328
-rw-r--r--testautomation/chart2/optional/includes/ch2_flexible_source_range_selection.inc797
-rw-r--r--testautomation/chart2/optional/includes/ch2_flexible_source_range_selection01.inc794
-rwxr-xr-xtestautomation/chart2/optional/includes/ch2_lvl1a.inc266
-rwxr-xr-xtestautomation/chart2/optional/includes/loadsave/ch2_losa.inc219
-rw-r--r--testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc243
-rwxr-xr-xtestautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard.inc1092
-rw-r--r--testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc124
-rw-r--r--testautomation/chart2/optional/input/BubbleChartData.odsbin0 -> 8000 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_areas_normal.odsbin0 -> 19980 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_areas_percent.odsbin0 -> 22854 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_areas_stacked.odsbin0 -> 20547 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_bars_normal.odsbin0 -> 22851 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_bars_percent.odsbin0 -> 23088 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_bars_stacked.odsbin0 -> 23782 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_columns_lines_and_columns.odsbin0 -> 24097 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_columns_lines_and_stacked_columns.odsbin0 -> 25212 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_columns_normal.odsbin0 -> 23151 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_columns_percent.odsbin0 -> 23058 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/2d_columns_stacked.odsbin0 -> 24970 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/3d_lines_deep.odsbin0 -> 35335 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/3d_pies_normal.odsbin0 -> 39008 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/areas_deep.odsbin0 -> 52064 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/areas_percent.odsbin0 -> 38468 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/areas_stacked.odsbin0 -> 42860 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_deep.odsbin0 -> 61483 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_cones.odsbin0 -> 66269 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_cones_deep.odsbin0 -> 110686 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_cones_percent.odsbin0 -> 110617 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_pyramids.odsbin0 -> 67118 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_pyramids_deep.odsbin0 -> 98383 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_pyramids_percent.odsbin0 -> 110239 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_pyramids_stacked.odsbin0 -> 85911 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_horizontal_stacked_cones.odsbin0 -> 88184 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_normal.odsbin0 -> 71033 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_percent.odsbin0 -> 66755 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_stacked.odsbin0 -> 60722 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_tube.odsbin0 -> 41905 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_tubes_deep.odsbin0 -> 59620 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_tubes_percent.odsbin0 -> 62875 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/bars_tubes_stacked.odsbin0 -> 50291 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cones.odsbin0 -> 50195 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cones_deep.odsbin0 -> 84795 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cones_percent.odsbin0 -> 90080 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cones_stacked.odsbin0 -> 88072 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cylinder.odsbin0 -> 53406 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cylinder_deep.odsbin0 -> 67403 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cylinder_percent.odsbin0 -> 86518 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_cylinder_stacked.odsbin0 -> 79786 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_deep.odsbin0 -> 50144 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_normal.odsbin0 -> 59819 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_percent.odsbin0 -> 60109 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_pyramids.odsbin0 -> 71749 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_pyramids_deep.odsbin0 -> 96324 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_pyramids_percent.odsbin0 -> 103938 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_pyramids_stacked.odsbin0 -> 104487 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/columns_stacked.odsbin0 -> 65360 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_b-spline.odsbin0 -> 25651 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_b-spline_with_symbols.odsbin0 -> 30305 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_cubic_spline.odsbin0 -> 25841 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_cubic_spline_with_symbols.odsbin0 -> 33585 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_normal.odsbin0 -> 19673 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_percent.odsbin0 -> 19326 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_percent_with_symbols.odsbin0 -> 23242 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_stacked.odsbin0 -> 20462 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_stacked_with_symbols.odsbin0 -> 24066 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/lines_symbols.odsbin0 -> 23002 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/net_normal.odsbin0 -> 19926 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/net_percent.odsbin0 -> 20031 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/net_percent_with_symbols.odsbin0 -> 24009 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/net_stacked.odsbin0 -> 20018 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/net_stacked_with_symbols.odsbin0 -> 24083 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/net_symbols.odsbin0 -> 23820 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/pies_normal.odsbin0 -> 20506 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/pies_offset1.odsbin0 -> 20195 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/pies_offset2.odsbin0 -> 20524 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/pies_rings.odsbin0 -> 27925 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/stockchart_type1.odsbin0 -> 19889 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/stockchart_type2.odsbin0 -> 21315 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/stockchart_type3.odsbin0 -> 22123 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/stockchart_type4.odsbin0 -> 23348 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/xy_chart_b-spline.odsbin0 -> 24219 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/xy_chart_b-spline_with_symbols.odsbin0 -> 27576 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/xy_chart_cubic_spline.odsbin0 -> 24489 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/xy_chart_cubic_spline_with_symbols.odsbin0 -> 27677 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/xy_chart_lines_only.odsbin0 -> 19266 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/xy_chart_lines_with_symbols.odsbin0 -> 22498 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/ods/xy_chart_symbols_only.odsbin0 -> 21517 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/randomData.odsbin0 -> 7713 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_areas_normal.sxcbin0 -> 11879 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_areas_percent.sxcbin0 -> 12137 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_areas_stacked.sxcbin0 -> 12547 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_bars_normal.sxcbin0 -> 13620 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_bars_percent.sxcbin0 -> 13373 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_bars_stacked.sxcbin0 -> 12325 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_columns_lines_and_columns.sxcbin0 -> 14033 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_columns_lines_and_stacked_columns.sxcbin0 -> 14458 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_columns_normal.sxcbin0 -> 13793 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_columns_percent.sxcbin0 -> 13675 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/2d_columns_stacked.sxcbin0 -> 14365 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/3d_lines_deep.sxcbin0 -> 18632 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/3d_pies_normal.sxcbin0 -> 20396 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/areas_deep.sxcbin0 -> 32742 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/areas_percent.sxcbin0 -> 21962 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/areas_stacked.sxcbin0 -> 23672 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_deep.sxcbin0 -> 39140 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_cones.sxcbin0 -> 34799 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_cones_deep.sxcbin0 -> 51450 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_cones_percent.sxcbin0 -> 48313 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_pyramids.sxcbin0 -> 32902 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_deep.sxcbin0 -> 48143 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_percent.sxcbin0 -> 47134 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_stacked.sxcbin0 -> 40866 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_horizontal_stacked_cones.sxcbin0 -> 41810 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_normal.sxcbin0 -> 34087 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_percent.sxcbin0 -> 35015 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_stacked.sxcbin0 -> 30564 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_tube.sxcbin0 -> 28453 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_tubes_deep.sxcbin0 -> 36522 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_tubes_percent.sxcbin0 -> 39245 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/bars_tubes_stacked.sxcbin0 -> 32849 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cones.sxcbin0 -> 27681 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cones_deep.sxcbin0 -> 41842 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cones_percent.sxcbin0 -> 44938 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cones_stacked.sxcbin0 -> 40843 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cylinder.sxcbin0 -> 28562 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cylinder_deep.sxcbin0 -> 34619 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cylinder_percent.sxcbin0 -> 42982 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_cylinder_stacked.sxcbin0 -> 44840 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_deep.sxcbin0 -> 32156 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_normal.sxcbin0 -> 37062 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_percent.sxcbin0 -> 37149 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_pyramids.sxcbin0 -> 38666 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_pyramids_deep.sxcbin0 -> 53341 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_pyramids_percent.sxcbin0 -> 55649 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_pyramids_stacked.sxcbin0 -> 53051 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/columns_stacked.sxcbin0 -> 32245 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_b-spline.sxcbin0 -> 19509 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_b-spline_with_symbols.sxcbin0 -> 22013 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_cubic_spline.sxcbin0 -> 19650 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_cubic_spline_with_symbols.sxcbin0 -> 22066 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_normal.sxcbin0 -> 17027 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_percent.sxcbin0 -> 16447 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_percent_with_symbols.sxcbin0 -> 18472 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_stacked.sxcbin0 -> 17579 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_stacked_with_symbols.sxcbin0 -> 19077 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/lines_symbols.sxcbin0 -> 18275 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/net_normal.sxcbin0 -> 16864 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/net_percent.sxcbin0 -> 16992 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/net_percent_with_symbols.sxcbin0 -> 19009 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/net_stacked.sxcbin0 -> 16947 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/net_stacked_with_symbols.sxcbin0 -> 19043 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/net_symbols.sxcbin0 -> 18861 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/pies_normal.sxcbin0 -> 25337 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/pies_offset1.sxcbin0 -> 16978 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/pies_offset2.sxcbin0 -> 17217 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/pies_rings.sxcbin0 -> 20869 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/stockchart_type1.sxcbin0 -> 16651 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/stockchart_type2.sxcbin0 -> 17371 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/stockchart_type3.sxcbin0 -> 17883 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/stockchart_type4.sxcbin0 -> 18534 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/xy_chart_b-spline.sxcbin0 -> 19090 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/xy_chart_b-spline_with_symbols.sxcbin0 -> 20759 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/xy_chart_cubic_spline.sxcbin0 -> 19391 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/xy_chart_cubic_spline_with_symbols.sxcbin0 -> 20911 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/xy_chart_lines_only.sxcbin0 -> 16609 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/xy_chart_lines_with_symbols.sxcbin0 -> 18325 bytes
-rwxr-xr-xtestautomation/chart2/optional/input/sxc/xy_chart_symbols_only.sxcbin0 -> 17630 bytes
-rwxr-xr-xtestautomation/chart2/required/ch2_updt_calc.bas152
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_file.inc404
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_format.inc1407
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_format1.inc829
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_insert.inc326
-rw-r--r--testautomation/chart2/required/includes/ch2_insert_ctl.inc488
-rw-r--r--testautomation/chart2/required/includes/ch2_menu.inc214
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_ole.inc137
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_toolbars.inc168
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_view.inc182
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_window.inc63
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_wizard.inc86
-rwxr-xr-xtestautomation/chart2/required/input/basetable.sdcbin0 -> 28672 bytes
-rwxr-xr-xtestautomation/chart2/required/input/basetable.sxcbin0 -> 5500 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange01.odsbin0 -> 98073 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange02.odsbin0 -> 6849 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange03.odsbin0 -> 32530 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange04.odsbin0 -> 20799 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange05.odtbin0 -> 7305 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange06.odtbin0 -> 7303 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange07.odtbin0 -> 13104 bytes
-rwxr-xr-xtestautomation/chart2/required/input/ch_flexrange08.odtbin0 -> 13280 bytes
-rwxr-xr-xtestautomation/chart2/required/input/spreadsheetFile.odsbin0 -> 6337 bytes
-rwxr-xr-xtestautomation/chart2/required/input/verySimpleChart.odsbin0 -> 10429 bytes
-rw-r--r--testautomation/chart2/tools/ch_tools_axes.inc193
-rw-r--r--testautomation/chart2/tools/ch_tools_chart_type.inc641
-rw-r--r--testautomation/chart2/tools/ch_tools_common.inc212
-rw-r--r--testautomation/chart2/tools/ch_tools_data_labels.inc369
-rw-r--r--testautomation/chart2/tools/ch_tools_grids.inc202
-rw-r--r--testautomation/chart2/tools/ch_tools_legend.inc241
-rw-r--r--testautomation/chart2/tools/ch_tools_select.inc136
-rw-r--r--testautomation/chart2/tools/ch_tools_statistics.inc429
-rw-r--r--testautomation/chart2/tools/ch_tools_tab_borders_lines.inc144
-rw-r--r--testautomation/chart2/tools/ch_tools_tab_pages.inc147
-rw-r--r--testautomation/chart2/tools/ch_tools_titles.inc189
215 files changed, 12000 insertions, 0 deletions
diff --git a/testautomation/chart2/optional/ch2_chart_data_dlg_impress.bas b/testautomation/chart2/optional/ch2_chart_data_dlg_impress.bas
new file mode 100644
index 000000000000..83ac7f78c3c9
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_chart_data_dlg_impress.bas
@@ -0,0 +1,56 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Resource Test for the Chart Data Dialogue in Impress.
+'*
+'\************************************************************************************************
+
+sub main
+ use "chart2\optional\includes\ch2_datadialogue.inc"
+
+ Call hStatusIn("Chart2", "ch2_chart_data_dlg_impress.bas")
+ printlog "--------------------------------------------"
+ printlog "C h a r t D a t a D i a l o g Updatetest"
+ printlog "--------------------------------------------"
+
+ printLog "----------- tChartDataDialogue -----------"
+ call tChartDataDialogueButtons
+ call tChartDataDialogueFieldsUndo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
+
diff --git a/testautomation/chart2/optional/ch2_flexible_source_range_selection.bas b/testautomation/chart2/optional/ch2_flexible_source_range_selection.bas
new file mode 100644
index 000000000000..6feedeb8004e
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_flexible_source_range_selection.bas
@@ -0,0 +1,69 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Updatetest for Flexible Source Range Selection
+'*
+'\***********************************************************************
+
+sub main
+
+ use "chart2\optional\includes\ch2_flexible_source_range_selection.inc"
+ use "chart2\optional\includes\ch2_flexible_source_range_selection01.inc"
+
+ Call hStatusIn("Chart2", "ch2_flexible_source_range_selection.bas")
+ printlog "----------------------------------------------"
+ printlog "Updatetest for Flexible Source Range Selection"
+ printlog "----------------------------------------------"
+ printlog "------------ Chart in Spreadsheet ------------"
+ gApplication = "CALC"
+ Call tDataRangeWizardCalc
+ Call tDataSeriesWizardCalc
+ Call tDataRangeDialogCalc
+ Call tDataSeriesDialogCalc
+ printlog "-------------- Chart in Writer ---------------"
+ gApplication = "WRITER"
+ Call tDataRangeWizardWriter
+ Call tDataSeriesWizardWriter
+ Call tDataRangeDialogWriter
+ Call tDataSeriesDialogWriter
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+
+ use "chart2\tools\ch_tools_common.inc"
+ use "chart2\tools\ch_tools_chart_type.inc"
+
+ Call GetUseFiles
+ gApplication = "CALC"
+end sub
diff --git a/testautomation/chart2/optional/ch2_losa_ods_to_ods.bas b/testautomation/chart2/optional/ch2_losa_ods_to_ods.bas
new file mode 100755
index 000000000000..ed1dce13adb5
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_losa_ods_to_ods.bas
@@ -0,0 +1,68 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load/Save test for chart files - Input: ODS, Output:ODS
+'*
+'\************************************************************************
+
+Global gsFileFormat as String
+Global gsDirectoryInSourcePath as String
+Global gsOutputFileCustomExtension as String
+
+sub main
+ gsFileFormat = "calc8"
+
+ 'Important for determination of input file source path
+ '-> gtesttoolpath & "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+ gsDirectoryInSourcePath = "ods"
+
+ 'Custom output file extension. Can be different to result from hGetFilternameExtension.
+ 'e.g. "_excel95.xls"
+ gsOutputFileCustomExtension = ".ods"
+
+ Printlog "--------------------------------------------------"
+ Printlog "--- Load charts in ODS - SaveAS ODS ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/tools/ch_tools_common.inc"
+ use "chart2/optional/includes/loadsave/ch2_losa.inc"
+
+ Call hStatusIn("Chart2", "ch2_losa_ods_to_ods.bas")
+ call subLoSaFromTo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "CALC"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/chart2/optional/ch2_losa_ods_to_ots.bas b/testautomation/chart2/optional/ch2_losa_ods_to_ots.bas
new file mode 100755
index 000000000000..8cc8ffe9835c
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_losa_ods_to_ots.bas
@@ -0,0 +1,68 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load/Save test for chart files - Input: ODS, Output: OTS
+'*
+'\************************************************************************
+
+Global gsFileFormat as String
+Global gsDirectoryInSourcePath as String
+Global gsOutputFileCustomExtension as String
+
+sub main
+ gsFileFormat = "calc8_template"
+
+ 'Important for determination of input file source path
+ '-> gtesttoolpath & "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+ gsDirectoryInSourcePath = "ods"
+
+ 'Custom output file extension. Can be different to result from hGetFilternameExtension.
+ 'e.g. "_excel95.xls"
+ gsOutputFileCustomExtension = ".ots"
+
+ Printlog "--------------------------------------------------"
+ Printlog "--- Load charts in ODS - SaveAS OTS ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/optional/includes/loadsave/ch2_losa.inc"
+ use "chart2/tools/ch_tools_common.inc"
+
+ Call hStatusIn("Chart2", "ch2_losa_ods_to_ots.bas")
+ call subLoSaFromTo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "CALC"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/chart2/optional/ch2_losa_ods_to_sdc.bas b/testautomation/chart2/optional/ch2_losa_ods_to_sdc.bas
new file mode 100755
index 000000000000..d61c6183086a
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_losa_ods_to_sdc.bas
@@ -0,0 +1,67 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load/Save test for chart files - Input: ODS, Output: SDC
+'*
+'\************************************************************************
+
+Global gsFileFormat as String
+Global gsDirectoryInSourcePath as String
+Global gsOutputFileCustomExtension as String
+
+sub main
+ gsFileFormat = "StarCalc 5.0"
+ 'Important for determination of input file source path
+ '-> gtesttoolpath & "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+ gsDirectoryInSourcePath = "ods"
+
+ 'Custom output file extension. Can be different to result from hGetFilternameExtension.
+ 'e.g. "_excel95.xls"
+ gsOutputFileCustomExtension = ".sdc"
+
+ Printlog "--------------------------------------------------"
+ Printlog "--- Load charts in ODS - SaveAS SDC ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/optional/includes/loadsave/ch2_losa.inc"
+ use "chart2/tools/ch_tools_common.inc"
+
+ Call hStatusIn("Chart2", "ch2_losa_ods_to_sdc.bas")
+ call subLoSaFromTo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "CALC"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/chart2/optional/ch2_losa_ods_to_sxc.bas b/testautomation/chart2/optional/ch2_losa_ods_to_sxc.bas
new file mode 100755
index 000000000000..00940a2ca37f
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_losa_ods_to_sxc.bas
@@ -0,0 +1,68 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load/Save test for chart files - Input: ODS, Output: SXC
+'*
+'\************************************************************************
+
+Global gsFileFormat as String
+Global gsDirectoryInSourcePath as String
+Global gsOutputFileCustomExtension as String
+
+sub main
+ gsFileFormat = "StarOffice XML (Calc)"
+
+ 'Important for determination of input file source path
+ '-> gtesttoolpath & "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+ gsDirectoryInSourcePath = "ods"
+
+ 'Custom output file extension. Can be different to result from hGetFilternameExtension.
+ 'e.g. "_excel95.xls"
+ gsOutputFileCustomExtension = ".sxc"
+
+ Printlog "--------------------------------------------------"
+ Printlog "--- Load charts in ODS - SaveAS SXC ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/optional/includes/loadsave/ch2_losa.inc"
+ use "chart2/tools/ch_tools_common.inc"
+
+ Call hStatusIn("Chart2", "ch2_losa_ods_to_sxc.bas")
+ Call subLoSaFromTo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "CALC"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/chart2/optional/ch2_losa_ods_to_xls.bas b/testautomation/chart2/optional/ch2_losa_ods_to_xls.bas
new file mode 100755
index 000000000000..3a8ca2916eec
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_losa_ods_to_xls.bas
@@ -0,0 +1,68 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load/Save test for chart files - Input: ODS, Output: XLS
+'*
+'\************************************************************************
+
+Global gsFileFormat as String
+Global gsDirectoryInSourcePath as String
+Global gsOutputFileCustomExtension as String
+
+sub main
+ gsFileFormat = "MS Excel 97"
+
+ 'Important for determination of input file source path
+ '-> gtesttoolpath & "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+ gsDirectoryInSourcePath = "ods"
+
+ 'Custom output file extension. Can be different to result from hGetFilternameExtension.
+ 'e.g. "_excel95.xls"
+ gsOutputFileCustomExtension = ".xls"
+
+ Printlog "--------------------------------------------------"
+ Printlog "--- Load charts in ODS - SaveAS XLS ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/optional/includes/loadsave/ch2_losa.inc"
+ use "chart2/tools/ch_tools_common.inc"
+
+ Call hStatusIn("Chart2", "ch2_losa_ods_to_xls.bas")
+ Call subLoSaFromTo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "CALC"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/chart2/optional/ch2_losa_sxc_to_ods.bas b/testautomation/chart2/optional/ch2_losa_sxc_to_ods.bas
new file mode 100755
index 000000000000..c662dfc52b3a
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_losa_sxc_to_ods.bas
@@ -0,0 +1,68 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load/Save test for chart files - Input: SXC, Output:ODS
+'*
+'\************************************************************************
+
+Global gsFileFormat as String
+Global gsDirectoryInSourcePath as String
+Global gsOutputFileCustomExtension as String
+
+sub main
+ gsFileFormat = "calc8"
+
+ 'Important for determination of input file source path
+ '-> gtesttoolpath & "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+ gsDirectoryInSourcePath = "sxc"
+
+ 'Custom output file extension. Can be different to result from hGetFilternameExtension.
+ 'e.g. "_excel95.xls"
+ gsOutputFileCustomExtension = ".ods"
+
+ Printlog "--------------------------------------------------"
+ Printlog "--- Load charts in SXC - SaveAS ODS ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/optional/includes/loadsave/ch2_losa.inc"
+ use "chart2/tools/ch_tools_common.inc"
+
+ Call hStatusIn("Chart2", "ch2_losa_sxc_to_ods.bas")
+ Call subLoSaFromTo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "CALC"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/chart2/optional/ch2_losa_sxc_to_sdc.bas b/testautomation/chart2/optional/ch2_losa_sxc_to_sdc.bas
new file mode 100755
index 000000000000..7c8e8726f580
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_losa_sxc_to_sdc.bas
@@ -0,0 +1,68 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load/Save test for chart files - Input: SXC, Output: SDC
+'*
+'\************************************************************************
+
+Global gsFileFormat as String
+Global gsDirectoryInSourcePath as String
+Global gsOutputFileCustomExtension as String
+
+sub main
+ gsFileFormat = "StarCalc 5.0"
+
+ 'Important for determination of input file source path
+ '-> gtesttoolpath & "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+ gsDirectoryInSourcePath = "sxc"
+
+ 'Custom output file extension. Can be different to result from hGetFilternameExtension.
+ 'e.g. "_excel95.xls"
+ gsOutputFileCustomExtension = ".sdc"
+
+ Printlog "--------------------------------------------------"
+ Printlog "--- Load charts in SXC - SaveAS SDC ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/optional/includes/loadsave/ch2_losa.inc"
+ use "chart2/tools/ch_tools_common.inc"
+
+ Call hStatusIn("Chart2", "ch2_losa_sxc_to_sdc.bas")
+ Call subLoSaFromTo
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "CALC"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/chart2/optional/ch2_lvl1.bas b/testautomation/chart2/optional/ch2_lvl1.bas
new file mode 100755
index 000000000000..9ae9f40ce301
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_lvl1.bas
@@ -0,0 +1,57 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart2 functional tests
+'*
+'\************************************************************************
+
+sub main
+ use "chart2\tools\ch_tools_common.inc"
+ use "chart2\tools\ch_tools_select.inc"
+ use "chart2\optional\includes\ch2_lvl1a.inc"
+
+ Call hStatusIn ( "Chart2", "ch2_lvl1.bas" )
+
+ Call ch2_lvl1a
+
+ Call hStatusOut
+
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_set_standard_controls.inc"
+ Call GetUseFiles
+ gApplication = "Calc"
+end sub
+
diff --git a/testautomation/chart2/optional/ch2_lvl1_wizard.bas b/testautomation/chart2/optional/ch2_lvl1_wizard.bas
new file mode 100755
index 000000000000..41811109e473
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_lvl1_wizard.bas
@@ -0,0 +1,66 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Level 1 functional test for Chart2 Wizard
+'*
+'\************************************************************************************************
+
+sub main
+ use "chart2\tools\ch_tools_common.inc"
+ use "chart2\tools\ch_tools_chart_type.inc"
+ use "chart2\tools\ch_tools_titles.inc"
+ use "chart2\tools\ch_tools_axes.inc"
+ use "chart2\tools\ch_tools_grids.inc"
+ use "chart2\tools\ch_tools_legend.inc"
+ use "chart2\tools\ch_tools_data_labels.inc"
+ use "chart2\tools\ch_tools_statistics.inc"
+ use "chart2\tools\ch_tools_tab_pages.inc"
+ use "chart2\tools\ch_tools_select.inc"
+ use "chart2\optional\includes\wizard\ch2_lvl1_wizard.inc"
+ use "chart2\optional\includes\wizard\ch2_lvl1_wizard2.inc"
+
+ Call hStatusIn ( "Chart2", "ch2_lvl1_wizard.bas" )
+ Call tCreateNew3DChart
+ Call tCreateNewLineChart
+ Call tCreateNewBubbleChart
+ Call tCreateNewFilledNetChart
+ Call hStatusOut
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_set_standard_controls.inc"
+ Call GetUseFiles
+ gApplication = "CALC"
+end sub
+
diff --git a/testautomation/chart2/optional/ch2_xml_format.bas b/testautomation/chart2/optional/ch2_xml_format.bas
new file mode 100644
index 000000000000..25f5d751b58f
--- /dev/null
+++ b/testautomation/chart2/optional/ch2_xml_format.bas
@@ -0,0 +1,55 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : General XML file format check
+'*
+'\***********************************************************************
+
+
+sub main
+ Printlog "--------------------------------------------------"
+ Printlog "--- Chart2 General XML file format check ---"
+ Printlog "--------------------------------------------------"
+
+ use "chart2/optional/includes/loadsave/ch2_xml_format.inc"
+ use "chart2/tools/ch_tools_common.inc"
+
+ Call hStatusIn("Chart2", "ch2_xml_format.bas")
+ call tCompareXMLFormatCreate
+ call tCompareXMLFormatLoad
+ Call hStatusOut
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global/system/includes/master.inc"
+ use "global/system/includes/gvariabl.inc"
+ call getusefiles
+end sub
diff --git a/testautomation/chart2/optional/includes/ch2_datadialogue.inc b/testautomation/chart2/optional/includes/ch2_datadialogue.inc
new file mode 100644
index 000000000000..1b723c1479b7
--- /dev/null
+++ b/testautomation/chart2/optional/includes/ch2_datadialogue.inc
@@ -0,0 +1,328 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : oliver.craemer@oracle.com
+'*
+'* short description : Resource-test for the Chart Data Dialogue.
+'*
+'*******************************************************************
+'*
+' #1 tChartDataDialogueButtons
+' #1 tChartDataDialogueFieldsUndo
+'*
+'\*******************************************************************
+
+testcase tChartDataDialogueButtons
+ '/// Create new impress document
+ printlog "Create new impress document"
+ call hNewDocument
+ Kontext "DocumentImpress"
+ '/// Insert a new Chart-object, via the Menu: 'Insert - Chart'.
+ Printlog " Insert a new Chart-object, via the Menu: 'Insert - Chart'."
+ InsertChart
+ WaitSlot()
+ Kontext "DocumentChart"
+ '/// Open context menu
+ printlog "Open context menu"
+ DocumentChart.OpenContextMenu
+ '/// Select the third entry
+ printlog "Select the third entry"
+ hMenuSelectNr (6)
+ sleep (1)
+ Kontext "Diagramdata"
+ call DialogTest ( Diagramdata )
+ '/// Check if the diagram data dialogue came up
+ printlog "Check if the diagram data dialogue came up"
+ if Diagramdata.Exists then
+ printlog " Diagramdata came up just as expected."
+ else
+ warnlog " Diagramdata didnt come up as expected."
+ call hCloseDocument
+ goto endsub
+ end if
+ '/// Check if the 'Insert Row'-button is enabled.
+ printlog "Check if the 'Insert Row'-button is enabled."
+ if InsertRow.isEnabled then
+ printlog " InsertRow was correctly enabled."
+ else
+ warnlog " InsertRow wasnt enabled, but should have been."
+ end if
+ '/// Check if the 'Swap Columns'-button is disabled.
+ printlog "Check if the 'Swap Columns'-button is disabled."
+ if SwapColumns.isEnabled then
+ warnlog " SwapColumns was enabled, but should have been disabled."
+ else
+ printlog " SwapColumns was correctly disabled."
+ end if
+ '/// Check if the 'Swap Rows'-button is enabled.
+ printlog "Check if the 'Swap Rows'-button is enabled."
+ if SwapRows.isEnabled then
+ printlog " SwapRows was correctly enabled."
+ else
+ warnlog " SwapRows wasnt enabled, but should have been."
+ end if
+ '/// Check if the 'Delete Row'-button is enabled.
+ printlog "Check if the 'Delete Row'-button is enabled."
+ if DeleteRow.isEnabled then
+ printlog " DeleteRow was correctly enabled."
+ else
+ warnlog " DeleteRow wasnt enabled, but should have been."
+ end if
+ '/// Check if the 'Delete Column'-button is enabled.
+ printlog "Check if the 'Delete Column'-button is enabled."
+ if DeleteColumn.isEnabled then
+ warnlog " DeleteColumn was enabled, but should have been disabled."
+ else
+ printlog " DeleteColumn was correctly disabled."
+ end if
+ printlog "Check if the 'Insert Text Column'-button is enabled."
+ if InsertTextColumn.isEnabled then
+ printlog " Insert Text Column was correctly enabled."
+ else
+ warnlog " Insert Text Column wasnt enabled, but should have been."
+ end if
+ '/// Press 'TAB' to enter the Data-fields, followed by 'SHIFT TAB' end up in the first field.
+ printlog "Press 'TAB' to enter the Data-fields, followed by 'SHIFT TAB' end up in the first field."
+ Kontext "Diagramdata"
+ Diagramdata.TypeKeys "<TAB>", true
+ Diagramdata.TypeKeys "<SHIFT TAB>", true
+ '/// Set the text in the marked field to '111'. Then move to the next field by pressing 'TAB'.
+ printlog " Set the text in the marked field to '111'. Then move to the next field by pressing 'TAB'."
+ Tables.TypeKeys "111", true
+ Diagramdata.TypeKeys "<TAB>", true
+ '/// Set the text in the marked field to '222'. Then move to the next field by pressing 'TAB'.
+ printlog " Set the text in the marked field to '222'. Then move to the next field by pressing 'TAB'."
+ Tables.TypeKeys "222", true
+ Diagramdata.TypeKeys "<TAB>", true
+ '/// Set the text in the marked field to '333'. Then move to the next field by pressing 'TAB'. ///'
+ printlog " Set the text in the marked field to '333'. Then move back to the first field by pressing 'SHIFT TAB' twice."
+ Tables.TypeKeys "333", true
+ 'Do one more TAB, then three DOWNs, and check that the SwapColumn and SwapRow Icons are disabled.
+ Tables.TypeKeys "<TAB>", true
+ Tables.TypeKeys "<DOWN>", 3, true
+ if SwapColumns.isEnabled then
+ warnlog " SwapColumns was enabled, but should have been disabled."
+ else
+ printlog " SwapColumns was correctly disabled."
+ end if
+ if SwapRows.isEnabled then
+ warnlog " SwapRows should have been disabled, but was enabled."
+ else
+ printlog " SwapRows was correctly disabled."
+ end if
+ '/// Return to the upper left corner.
+ printlog "Return to the upper left corner."
+ Tables.TypeKeys "<SHIFT TAB>", 3, true
+ Tables.TypeKeys "<UP>", 3, true
+ '/// Click the button 'Insert Row'.
+ printlog " Click the button 'Insert Row'."
+ InsertRow.Click
+ '/// Click the second button of the six in the upper left corner: Insert Column
+ printlog " Click the button 'Insert Column'."
+ InsertColumn.Click
+ '/// Check if a new Column got inserted. And if it's unnamed.
+ Tables.TypeKeys "<TAB>", true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard <> "" then
+ warnlog " Inserting a new column in the DataTable didn't seem to work."
+ endif
+ Diagramdata.TypeKeys "<TAB>", 5, true
+ if DataSeriesLabel.GetText <> "" then
+ warnlog " Error when inserting a new Column: the Label for the Column doesn't appear to be clear. Was:" +DataSeriesLabel.GetText
+ endif
+ Tables.TypeKeys "<TAB>", true
+ '/// Click the third button of the six in the upper left corner: 'Delete Row'. ///'
+ printlog " Click the button 'Delete Row'."
+ DeleteRow.Click
+ Tables.TypeKeys "<SHIFT TAB>", true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard <> "" then
+ warnlog " Inserting a new column in the DataTable didn't seem to work."
+ endif
+ '/// Press 'TAB' three times to enter the column we wish to delete. ///'
+ printlog " Press 'TAB' three times to enter the column we wish to delete."
+ Tables.TypeKeys "<TAB>", 3, true
+ '/// Click the button 'Delete Column'.
+ printlog " Click the button 'Delete Column'."
+ DeleteColumn.Click
+ '/// Check if the Column got deleted.
+ printlog " Check if the Column got deleted."
+ Tables.TypeKeys "<TAB>", 2, true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard <> "" then
+ warnlog " Error when deleting a Column."
+ end if
+ Tables.TypeKeys "<SHIFT TAB>", 3, true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard = "2,4" OR GetClipboard = "2.4" then
+ printlog " DeleteColumn worked as expected."
+ else
+ warnlog " Error when deleting a Column."
+ end if
+ '/// Click the button 'Swap Columns'.
+ printlog " Click the button 'Swap Columns'."
+ SwapColumns.Click
+ Tables.TypeKeys "<SHIFT TAB>", true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard = "8,8" OR GetClipboard = "8.8" then
+ printlog " SwapColumns worked as expected."
+ else
+ warnlog " Error when Swapping a Column."
+ end if
+ '/// Click the button 'Swap Rows'.
+ printlog " Click the button 'Swap Rows'."
+ SwapRows.Click
+ '/// Check the result
+ Tables.TypeKeys "<SHIFT TAB>", 4, true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard = "1,5" OR GetClipboard = "1.5" then
+ printlog " SwapRows worked as expected."
+ else
+ warnlog " Error when Swapping a Row."
+ end if
+ printlog "Insert a text column"
+ InsertTextColumn.Click
+ '/// Close the dialogue
+ printlog " Close the dialogue."
+ Diagramdata.Close
+ '/// End of test. Close the document.
+ printlog " End of test. Closing the document."
+ Call hCloseDocument
+endcase
+'
+'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+'
+testcase tChartDataDialogueFieldsUndo
+ printlog " tChartDataDialogueFieldsUndo starts"
+ Call hNewDocument
+ Kontext "DocumentImpress"
+ '/// Insert a new Chart-object, via the Menu: 'Insert - Chart'.
+ printlog " Insert a new Chart-object, via the Menu: 'Insert - Chart'."
+ InsertChart
+ WaitSlot()
+ Kontext "DocumentChart"
+ '/// Open context menu
+ printlog "Open context menu"
+ DocumentChart.OpenContextMenu
+ '/// Select third entry
+ printlog "Select third entry"
+ hMenuSelectNr (6)
+ sleep (1)
+ Kontext "Diagramdata"
+ call DialogTest ( Diagramdata )
+ '/// Check if the dialogue came up.
+ printlog "Check if the dialogue came up."
+ if Diagramdata.Exists then
+ printlog " Diagramdata came up just as expected."
+ else
+ warnlog " Diagramdata didnt come up as expected. Please contact the test-administrator."
+ call hCloseDocument
+ goto endsub
+ end if
+ '/// Type the word 'Great' in the Label-textfield (for the Column).
+ printlog " Typing the word 'Great' in the Label-textfield (for the Column), and checking that it remained changed after leaving the field."
+ DataSeriesLabel.SetText "Great"
+ '/// Press 'TAB', followed by 'SHIFT TAB'. To jump from and back to the field. (and deselect and select it again).
+ printlog " Press 'TAB', followed by 'SHIFT TAB'. To jump from and back to the field. (and deselect and select it again)"
+ Diagramdata.TypeKeys "<TAB>"
+ Diagramdata.TypeKeys "<SHIFT TAB>"
+ '/// Compare the written text with what the field now contains.
+ printlog " Compare the written text with what the field now contains."
+ if DataSeriesLabel.GetText <> "Great" then
+ warnlog " The field 'DataSeriesLabel' didn't get set. Should be 'Great', but was '" + DataSeriesLabel.GetText + "'."
+ endif
+ '/// Inside the Tables: Press the 'TAB'-key seven times.
+ printlog " Inside the Tables: Press the 'TAB'-key seven times."
+ Tables.TypeKeys "<TAB>", 7
+ '/// Inside the Tables: Check if you can type the numbers '774433', followed by 'TAB', and '774411'.
+ printlog " Inside the Tables: Check if you can type the numbers '774433', followed by 'TAB', and '774411'."
+ try
+ Tables.TypeKeys "774433", true
+ Tables.TypeKeys "<TAB>", true
+ Tables.TypeKeys "774411", true
+ Tables.TypeKeys "<SHIFT TAB>", true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard <> "774433" then
+ warnlog " Writing the value '774433' in the DataTable didn't seem to work."
+ endif
+ Tables.TypeKeys "<TAB>", true
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard <> "774411" then
+ warnlog " Writing the value '774411' in the DataTable didn't seem to work."
+ endif
+ catch
+ warnlog " Either we're not at the right position, or the Table-fields doesn't become editable onto selection."
+ endcatch
+ '/// Close the dialogue
+ printlog " Close the dialogue."
+ Diagramdata.Close
+ '/// Try if we can Undo the changes with 'Edit - Undo'.
+ printlog "Try if we can Undo the changes with 'Edit - Undo'."
+ Kontext "DocumentImpress"
+ DatabaseUndo
+ '/// And then we enter the dialogue again, to check if the values has returned to what they were before we changed them.
+ printlog "And then we enter the dialogue again, to check if the values has returned to what they were before we changed them."
+ '/// Followed by one press on "RETURN" / "ENTER" to enter the Chart-Data-dialogue ///'
+ printlog " Click the button 'Return', to enter the Chart-Data-dialogue."
+ DocumentImpress.TypeKeys "<RETURN>"
+ Kontext "DocumentChart"
+ '/// Open context menu
+ printlog "Open context menu"
+ DocumentChart.OpenContextMenu
+ '/// Select third entry
+ printlog "Select third entry"
+ hMenuSelectNr (6)
+ sleep (1)
+ Kontext "Diagramdata"
+ '/// Inside the Tables: Press the 'TAB'-key 14 times.
+ printlog " Inside the Tables: Press the 'TAB'-key 14 times."
+ Tables.TypeKeys "<TAB>", 14
+ '/// Inside the Tables: Check if the values has returned to what they were before changing them.
+ printlog " Inside the Tables: Check if the values has returned to what they were before changing them."
+ Tables.TypeKeys "<MOD1 C>", true
+ if GetClipboard <> "774433" then
+ if GetClipboard = "9,02" OR GetClipboard = "9.02" then
+ printlog " Edit-Undo worked fine."
+ else
+ warnlog " Edit-Undo didn't seem to work on the values in the Dialogue."
+ end if
+ else
+ warnlog " Edit-Undo didn't work on the values in the Dialogue."
+ end if
+ '/// Check if the Label we earlier named 'Great', now has changed back.
+ printlog " Check if the Label we earlier named 'Great', now has changed back."
+ if DataSeriesLabel.GetText = "Great" then
+ warnlog " The field 'DataSeriesLabel' didn't change back."
+ endif
+ '/// Close the dialogue
+ printlog " Close the dialogue."
+ Diagramdata.Close
+ '/// End of test. Close the document.
+ printlog " End of test. Closing the document."
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/chart2/optional/includes/ch2_flexible_source_range_selection.inc b/testautomation/chart2/optional/includes/ch2_flexible_source_range_selection.inc
new file mode 100644
index 000000000000..0151f5021b3e
--- /dev/null
+++ b/testautomation/chart2/optional/includes/ch2_flexible_source_range_selection.inc
@@ -0,0 +1,797 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Updatetest for Flexible Source Range Selection in spreadsheets
+'*
+'************************************************************************
+'*
+' #1 tDataRangeWizardCalc ' Updatetest for tabpage DataRange via chart wizard
+' #1 tDataSeriesWizardCalc ' Updatetest for tabpage DataSeries via chart wizard
+' #1 tDataRangeDialogCalc ' Updatetest for tabpage DataRange via data ranges dialog
+' #1 tDataSeriesDialogCalc ' Updatetest for tabpage DataSeries via data ranges dialog
+' #1 fOpenTestDocumentAndInsertChart ' Sub routine which is being used by two test cases
+'*
+'\***********************************************************************
+
+testcase tDataRangeWizardCalc
+ dim sDataRange as string
+ dim sInputFile as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange01.ods")
+ printlog "Open test document gtesttoolpath/chart2/required/input/ch_flexrange01.ods"
+ if fOpenTestDocumentAndInsertChart(sInputFile) then
+ Kontext "ChartType"
+ printlog "Choose the Chart type <i>bar</i> (should be the second in the top-down list)"
+ if fSetChartType( "bar" ) > 0 then
+ warnlog "Something went wrong setting chart type to BAR."
+ warnlog "Testcase aborted"
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Switch to tabpage Data Range"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataRange"
+ call DialogTest ( TabChartTypeDataRange )
+ printlog "Check that the data range in edit field has the value $ChartFlexRange.$B$3:$E$6"
+ Kontext "TabChartTypeDataRange"
+ sDataRange = DataRange.GetText
+ if sDataRange <> "$ChartFlexRange.$B$3:$E$6" then
+ warnlog "This is not the expected datarange, it is " & sDataRange & " but should be $ChartFlexRange.$B$3:$E$6"
+ else
+ printlog " Datarange is correct"
+ endif
+ printlog "Check if -Data series in rows- is enabled"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ printlog "Check if Data series in columns- is enabled and chosen"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ if Columns.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in columns is not checked"
+ endif
+ else
+ warnlog "Data series in columns is disabled"
+ endif
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ printlog "Check if -First column as label- is enabled and not checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ warnlog "First column as label is checked"
+ else
+ printlog " and not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ printlog "Press button Range Chooser"
+ SelectDataRange.Click
+ printlog "Enter invalid range $ChartFlexRange.$B$3:$E$0 and close Range Chooser"
+ Kontext "AcceptOrRejectChangesArea"
+ AreaEditField.SetText "$ChartFlexRange.$B$3:$E$0"
+ ShrinkButton.Click
+ printlog "Check if -Data series in rows- is disabled"
+ Kontext "TabChartTypeDataRange"
+ if NOT Rows.IsEnabled then
+ printlog " Data series in rows is disabled"
+ else
+ warnlog "Data series in rows is enabled, but should be disabled"
+ endif
+ printlog "Check if -Data series in columns- is disabled"
+ if NOT Columns.IsEnabled then
+ printlog " Data series in columns is disabled"
+ else
+ warnlog "Data series in columns is enabled, but should be disabled"
+ endif
+ printlog "Check if -First row as label- is disabled"
+ if NOT FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is disabled"
+ else
+ warnlog "First row as label is enabled, but should be disabled"
+ endif
+ printlog "Check if -First column as label- is disabled"
+ if NOT FirstColumnAsLabel.IsEnabled then
+ printlog " First Column as label is disabled"
+ else
+ warnlog "First Column as label is enabled, but should be disabled"
+ endif
+ printlog "Check if Back, Next and Finish does not work"
+ Kontext "ChartWizard"
+ GoBack.Click
+ Kontext "TabChartTypeDataRange"
+ if FirstColumnAsLabel.IsVisible then
+ printlog " Success: Back button does not work"
+ else
+ warnlog "Back button is not functionless"
+ Kontext "ChartWizard"
+ GoNext.Click
+ endif
+ printlog "Enter valid range $ChartFlexRange.$B$3:$E$6"
+ Kontext "TabChartTypeDataRange"
+ DataRange.SetText "$ChartFlexRange.$B$3:$E$6"
+ printlog "Check if -Data series in rows- is enabled"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ printlog "Check if -Data series in columns- is enabled and chosen"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ if Columns.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in columns is not checked"
+ endif
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ printlog "Check if -First column as label- is enabled and not checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ warnlog "First column as label is checked"
+ else
+ printlog " and not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ printlog "Press Cancel button"
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tDataSeriesWizardCalc
+ dim sInputFile as string
+ dim iDataSeries as integer
+ dim sDataRanges as string
+ dim sRangeFor as string
+ dim sCategories as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange02.ods")
+ printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange02.ods"
+ if fOpenTestDocumentAndInsertChart(sInputFile) then
+ Kontext "ChartType"
+ printlog "Choose the Chart type XY (SCATTER) (should be the second in the top-down list)"
+ if fSetChartType( "xy" ) > 0 then
+ warnlog "Something went wrong setting chart type to XY (SCATTER)."
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ Kontext "ChartWizard"
+ printlog "Click on Next button"
+ GoNext.Click
+ printlog "Click on Next button"
+ GoNext.Click
+ Kontext "TabChartTypeDataSeries"
+ if RangeFor.IsVisible then
+ printlog " Switching to tabpage was successfull"
+ else
+ warnlog "Switching to tabpage Data Series failed"
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ call DialogTest ( TabChartTypeDataSeries )
+ printlog "Check if the data series listbox is enabled and contains three entries"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 3 then
+ printlog " All 3 data series are available"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 3"
+ endif
+ printlog "Check if the ADD button is enabled and click the button"
+ if AddButton.IsEnabled then
+ printlog " ADD button is enabled"
+ AddButton.Click
+ else
+ warnlog "ADD button is not enabled"
+ endif
+ printlog "Check if there are now four entries in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 4 then
+ printlog " Adding a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 4"
+ endif
+ printlog "Check if the second data series was added below the highlighted one"
+ if DataSeries.GetSelIndex = 2 then
+ printlog " The new data series was inserted below the highlighted (first) one"
+ else
+ warnlog "The new dataseries was not inserted below the highlighted one"
+ endif
+ printlog "Check if the REMOVE button is enabled and click the button"
+ if RemoveButton.IsEnabled then
+ printlog " REMOVE button is enabled"
+ RemoveButton.Click
+ else
+ warnlog "REMOVE button is not enabled"
+ endif
+ printlog "Check if there are now 3 entries in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 3 then
+ printlog " Removing a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 3"
+ endif
+ printlog "Use UP button on last data series and verify that it it disabled on first entry"
+ DataSeries.Select(3)
+ if MoveUp.IsEnabled then
+ printlog " The MoveUp button is enabled"
+ printlog "Click on Move Up button twice."
+ MoveUp.Click
+ MoveUp.Click
+ else
+ warnlog "The MoveUp button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 1 then
+ printlog " Moving data series was successfull"
+ if MoveUp.IsEnabled then
+ warnlog "MoveUp button is not disabled on first entry"
+ else
+ printlog " and MoveUp button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ printlog "Use DOWN button and verify that it is disabled on last entry"
+ DataSeries.Select(1)
+ if MoveDown.IsEnabled then
+ printlog " The MoveDown button is enabled"
+ printlog "Click Move Down button twice"
+ MoveDown.Click
+ MoveDown.Click
+ else
+ warnlog "The MoveDown button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 3 then
+ printlog " Moving data series was successfull"
+ if MoveDown.IsEnabled then
+ warnlog "MoveDown button is not disabled on first entry"
+ else
+ printlog " and MoveDown button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ printlog "Select first entry in Data Ranges"
+ DataRanges.Select(1)
+ printlog "Verify that the range matches the one in edit field"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match: " & sDataRanges & sRangeFor
+ endif
+ printlog "Select second entry in Data Ranges"
+ DataRanges.Select(2)
+ printlog "Check that the range in the edit field has changed, too."
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match" & sDataRanges & sRangeFor
+ endif
+ printlog "Change the range in edit field"
+ RangeFor.SetText "$ChartFlexRange.$D$5:$D$6;$ChartFlexRange.$D$8"
+ printlog "Check that the range in Data Ranges has changed, too"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ if sDataRanges = "$ChartFlexRange.$D$5:$D$6;$ChartFlexRange.$D$8" then
+ printlog " The data range has also changed"
+ else
+ warnlog "The data range has not changed"
+ endif
+ printlog "Click on Range Chooser and change the range"
+ SelectRange.Click
+ Kontext "AcceptOrRejectChangesArea"
+ printlog "Enter $ChartFlexRange.$D$5:$D$6 in edit field"
+ AreaEditField.SetText "$ChartFlexRange.$D$5:$D$6"
+ printlog "Click on Shirnk button"
+ ShrinkButton.Click
+ printlog "Check if the range in Data ranges has changed"
+ Kontext "TabChartTypeDataSeries"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ if sDataRanges = "$ChartFlexRange.$D$5:$D$6" then
+ printlog " The data range has also changed"
+ else
+ warnlog "The data range has not changed"
+ endif
+ printlog "Edit range for Data Labels"
+ printlog "Set text $ChartFlexRange.$C$15:$C$16 in categories"
+ Categories.SetText "$ChartFlexRange.$C$15:$C$16"
+ sCategories = Categories.GetText
+ printlog "Validate the changes have not been modified"
+ if sCategories = "$ChartFlexRange.$C$15:$C$16" then
+ printlog " The range has been modified"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ printlog "Click on Range Chooser and change the range"
+ SelectCategories.Click
+ Kontext "AcceptOrRejectChangesArea"
+ printlog "Set text $ChartFlexRange.$C$5:$C$6 in the edit field"
+ AreaEditField.SetText "$ChartFlexRange.$C$5:$C$6"
+ printlog "Click on Shrink button"
+ ShrinkButton.Click
+ printlog "Verify that the range is taken"
+ Kontext "TabChartTypeDataSeries"
+ sCategories = Categories.GetText
+ if sCategories = "$ChartFlexRange.$C$5:$C$6" then
+ printlog " The range has been modified"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ printlog "Enter invalid range $ChartFlexRange.$C$5:$C$"
+ Categories.SetText "$ChartFlexRange.$C$5:$C$"
+ Kontext "ChartWizard"
+ printlog "Click on the Back button"
+ GoBack.Click
+ Kontext "TabChartTypeDataSeries"
+ if Categories.IsVisible then
+ printlog " Success: Back button is disabled"
+ else
+ warnlog "Back button is not functionless"
+ Kontext "ChartWizard"
+ GoNext.Click
+ endif
+ printlog "Enter $ChartFlexRange.$C$5:$C$6 - a valid range"
+ Categories.SetText "$ChartFlexRange.$C$5:$C$6"
+ printlog "Press Range Chooser"
+ SelectCategories.Click
+ printlog "Press <END>-key"
+ Kontext "AcceptOrRejectChangesArea"
+ AreaEditField.TypeKeys "<END>"
+ printlog "Enter a semicolon and the second range $ChartFlexRange.$C$8"
+ AreaEditField.TypeKeys ";$ChartFlexRange.$C$8"
+ printlog "Close Range Chooser"
+ ShrinkButton.Click
+ printlog "Verify that there is a multiple range"
+ Kontext "TabChartTypeDataSeries"
+ sCategories = Categories.GetText
+ if sCategories = "$ChartFlexRange.$C$5:$C$6;$ChartFlexRange.$C$8" then
+ printlog " The range has been modified to a multiple range"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ printlog "Press Cancel button"
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tDataRangeDialogCalc
+ dim sDataRange as string
+ dim sInputFile as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange03.ods" )
+ printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange03.ods"
+ if fOpenTestDocumentAndSelectDataRange(sInputFile) then
+ printlog "Check if the data range in edit field is $ChartFlexRange.$D$4:$G$6;$ChartFlexRange.$C$5:$G$6;$ChartFlexRange.$C$4"
+ Kontext "TabChartTypeDataRange"
+ sDataRange = DataRange.GetText
+ if sDataRange <> "$ChartFlexRange.$C$4:$G$6" then
+ warnlog "This is not the expected datarange, it is " & sDataRange & " but should be $ChartFlexRange.$C$4:$G$6"
+ else
+ printlog " Datarange is correct"
+ endif
+ printlog "Check if -Data series in columns- is enabled"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ else
+ warnlog "Data series in columns is disabled"
+ endif
+ printlog "Check if -Data series in columns- is enabled and chosen"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ if rows.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in rows is not checked"
+ endif
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ printlog "Check if -First column as label- is enabled and checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First column as label is not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ printlog "Press button Range Chooser"
+ SelectDataRange.Click
+ printlog "Enter $ChartFlexRange.$B$3:$E$0 in Range Chooser and close Range Chooser"
+ Kontext "AcceptOrRejectChangesArea"
+ AreaEditField.SetText "$ChartFlexRange.$B$3:$E$0"
+ ShrinkButton.Click
+ printlog "Check if -Data series in rows- is disabled"
+ Kontext "TabChartTypeDataRange"
+ if NOT Rows.IsEnabled then
+ printlog " Data series in rows is disabled"
+ else
+ warnlog "Data series in rows is enabled, but should be disabled"
+ endif
+ printlog "Check if -Data series in columns- is disabled"
+ if NOT Columns.IsEnabled then
+ printlog " Data series in columns is disabled"
+ else
+ warnlog "Data series in columns is enabled, but should be disabled"
+ endif
+ printlog "Check if -First row as label- is disabled"
+ if NOT FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is disabled"
+ else
+ warnlog "First row as label is enabled, but should be disabled"
+ endif
+ printlog "Check if -First column as label- is disabled"
+ if NOT FirstColumnAsLabel.IsEnabled then
+ printlog " First Column as label is disabled"
+ else
+ warnlog "First Column as label is enabled, but should be disabled"
+ endif
+ printlog "Check if OK button is disabled"
+ try
+ Kontext "TabChartTypeDataRange"
+ TabChartTypeDataRange.OK
+ warnlog "The OK button is not disabled"
+ goto endsub
+ catch
+ printlog " The OK button is disabled"
+ endcatch
+ printlog "Enter a valid range"
+ Kontext "TabChartTypeDataRange"
+ DataRange.SetText "$ChartFlexRange.$C$4:$G$6;$ChartFlexRange.$C$8:$G$8"
+ printlog "Check if -Data series in columns- is enabled"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ else
+ warnlog "Data series in columns is disabled"
+ endif
+ printlog "Check if -Data series in columns- is enabled and chosen"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ if rows.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in rows is not checked"
+ endif
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ printlog "Check if -First column as label- is enabled and checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First column as label is not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ printlog "Press Cancel button"
+ Kontext "TabChartTypeDataRange"
+ TabChartTypeDataRange.Cancel
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tDataSeriesDialogCalc
+ dim sInputFile as string
+ dim iDataSeries as integer
+ dim sDataRanges as string
+ dim sRangeFor as string
+ dim sCategories as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange04.ods")
+ printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange04.ods"
+ if fOpenTestDocumentAndSelectDataRange(sInputFile) then
+ Kontext
+ Active.SetPage TabChartTypeDataSeries
+ Kontext "TabChartTypeDataSeries"
+ printlog "Check if the data series listbox is enabled and contains one entry"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 1 then
+ printlog " One data serie is available"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 1"
+ endif
+ printlog "Check if the ADD button is enabled and click the button"
+ if AddButton.IsEnabled then
+ printlog " ADD button is enabled"
+ AddButton.Click
+ else
+ warnlog "ADD button is not enabled"
+ endif
+ printlog "Check if there are now two entries in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 2 then
+ printlog " Adding a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 2"
+ endif
+ printlog "Check if the new data series was added below the highlighted one"
+ if DataSeries.GetSelIndex = 2 then
+ printlog " The new data series was inserted below the highlighted (first) one"
+ else
+ warnlog "The new dataseries was not inserted below the highlighted one"
+ endif
+ printlog "Use UP button on last data series and verify that it it disabled on first entry"
+ DataSeries.Select(2)
+ if MoveUp.IsEnabled then
+ printlog " The MoveUp button is enabled"
+ MoveUp.Click
+ else
+ warnlog "The MoveUp button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 1 then
+ printlog " Moving data series was successfull"
+ if MoveUp.IsEnabled then
+ warnlog "MoveUp button is not disabled on first entry"
+ else
+ printlog " and MoveUp button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ printlog "Use DOWN button and verify that it is disabled on last entry"
+ DataSeries.Select(1)
+ if MoveDown.IsEnabled then
+ printlog " The MoveDown button is enabled"
+ MoveDown.Click
+ else
+ warnlog "The MoveDown button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 2 then
+ printlog " Moving data series was successfull"
+ if MoveDown.IsEnabled then
+ warnlog "MoveDown button is not disabled on first entry"
+ else
+ printlog " and MoveDown button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ printlog "Check if the REMOVE button is enabled and click the button"
+ if RemoveButton.IsEnabled then
+ printlog " REMOVE button is enabled"
+ RemoveButton.Click
+ else
+ warnlog "REMOVE button is not enabled"
+ endif
+ printlog "Check if there are now one entry in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 1 then
+ printlog " Removing a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 1"
+ endif
+ printlog "Select first entry in Data Ranges"
+ DataRanges.Select(1)
+ printlog "Verify that the range for NAME matches the one in edit field"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText(1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match: " & sDataRanges & sRangeFor
+ endif
+ printlog "Select second entry in Data Ranges"
+ DataRanges.Select(2)
+ printlog "Check that the range in the edit field has changed too"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText(1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match" & sDataRanges & sRangeFor
+ endif
+ printlog "Change the range in edit field"
+ RangeFor.SetText "$ChartFlexRange.$D$5:$D$10"
+ printlog "Check that the range in Data Ranges has changed too"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ if sDataRanges = "$ChartFlexRange.$D$5:$D$10" then
+ printlog " The data range has also changed"
+ else
+ warnlog "The data range has not changed"
+ endif
+ printlog "Click on Range Chooser and change the range"
+ SelectRange.Click
+ Kontext "AcceptOrRejectChangesArea"
+ AreaEditField.SetText "$ChartFlexRange.$D$5:$D$12"
+ ShrinkButton.Click
+ printlog "Check if the range in Data ranges has changed"
+ Kontext "TabChartTypeDataSeries"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ if sDataRanges = "$ChartFlexRange.$D$5:$D$12" then
+ printlog " The data range has also changed"
+ else
+ warnlog "The data range has not changed"
+ endif
+ printlog "Edit range for Categories"
+ Categories.SetText "$ChartFlexRange.$B$5:$B$10"
+ sCategories = Categories.GetText
+ if sCategories = "$ChartFlexRange.$B$5:$B$10" then
+ printlog " The range has been modified"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ printlog "Click on Range Chooser and change the range to $ChartFlexRange.$B$5:$B$12"
+ SelectCategories.Click
+ Kontext "AcceptOrRejectChangesArea"
+ AreaEditField.SetText "$ChartFlexRange.$B$5:$B$12"
+ ShrinkButton.Click
+ printlog "Verify that the range is taken"
+ Kontext "TabChartTypeDataSeries"
+ sCategories = Categories.GetText
+ if sCategories = "$ChartFlexRange.$B$5:$B$12" then
+ printlog " The range has been modified"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ printlog "Enter $ChartFlexRange.$B$5:$B$ as an invalid range"
+ Categories.SetText "$ChartFlexRange.$B$5:$B$"
+ printlog "Check that the OK button does not work"
+ try
+ Kontext "TabChartTypeDataSeries"
+ TabChartTypeDataSeries.OK
+ warnlog "The OK button is not disabled"
+ goto endsub
+ catch
+ printlog " The OK button is disabled"
+ endcatch
+ printlog "Enter as valid range $ChartFlexRange.$B$5:$B$12"
+ Kontext "TabChartTypeDataSeries"
+ Categories.SetText "$ChartFlexRange.$B$5:$B$12"
+ printlog "Press Range Chooser"
+ SelectCategories.Click
+ printlog "Move cursor to the end"
+ Kontext "AcceptOrRejectChangesArea"
+ AreaEditField.TypeKeys "<END>"
+ printlog "Enter a semicolon and the second range $ChartFlexRange.$B$14"
+ AreaEditField.TypeKeys ";$ChartFlexRange.$B$14"
+ printlog "Close Range Chooser"
+ ShrinkButton.Click
+ printlog "Verify that there is a multiple range"
+ Kontext "TabChartTypeDataSeries"
+ sCategories = Categories.GetText
+ if sCategories = "$ChartFlexRange.$B$5:$B$12;$ChartFlexRange.$B$14" then
+ printlog " The range has been modified to a multiple range"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ printlog "Press Cancel button"
+ Kontext "TabChartTypeDataSeries"
+ TabChartTypeDataSeries.Cancel
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+
diff --git a/testautomation/chart2/optional/includes/ch2_flexible_source_range_selection01.inc b/testautomation/chart2/optional/includes/ch2_flexible_source_range_selection01.inc
new file mode 100644
index 000000000000..ec2496ecb1f3
--- /dev/null
+++ b/testautomation/chart2/optional/includes/ch2_flexible_source_range_selection01.inc
@@ -0,0 +1,794 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Updatetest for Flexible Source Range Selection in Writer
+'*
+'************************************************************************
+'*
+' #1 tDataRangeWizardWriter ' Updatetest for tabpage DataRange via chart wizard
+' #1 tDataSeriesWizardWriter ' Updatetest for tabpage DataSeries via chart wizard
+' #1 tDataRangeDialogWriter ' Updatetest for tabpage DataRange via data ranges dialog
+' #1 tDataSeriesDialogWriter ' Updatetest for tabpage DataSeries via data ranges dialog
+' #1 fOpenWriterTestDocumentAndInsertChart ' Sub routine to load test documents
+'*
+'\***********************************************************************
+
+testcase tDataRangeWizardWriter
+ dim sDataRange as string
+ dim sInputFile as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange05.odt")
+ '///Open test document <i>gTestToolPath</i>/chart2/required/input/ch_flexrange05.odt
+ printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange05.odt"
+ if fOpenWriterTestDocumentAndInsertChart(sInputFile) then
+ '///Choose the Chart type <i>line</i> (should be the fifth in the top-down list)
+ printlog "Choose the Chart type line (should be the fifth in the top-down list)"
+ if fSetChartType( "line" ) > 0 then
+ warnlog "Something went wrong setting chart type to Line."
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ Kontext "ChartWizard"
+ '/// Click Next button
+ GoNext.Click
+ Kontext "TabChartTypeDataRange"
+ call DialogTest ( TabChartTypeDataRange )
+ '///Check data range in edit field value (ChartFlexRange.A1:E5)
+ printlog "Check data range in edit field value (ChartFlexRange.A1:E5)"
+ Kontext "TabChartTypeDataRange"
+ sDataRange = DataRange.GetText
+ if sDataRange <> "ChartFlexRange.A1:E5" then
+ warnlog "This is not the expected datarange, it is " & sDataRange & " but should be ChartFlexRange.A1:E5"
+ else
+ printlog " Datarange is correct"
+ endif
+ '///Check if -Data series in rows- is enabled
+ printlog "Check if -Data series in rows- is enabled"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ '///Check if -Data series in columns- is enabled and chosen
+ printlog "Check if -Data series in columns- is enabled and chosen"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ if Columns.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in columns is not checked"
+ endif
+ else
+ warnlog "Data series in columns is disabled"
+ endif
+ '///Check if -First row as label- is enabled and checked
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ '///Check if -First column as label- is enabled checked
+ printlog "Check if -First column as label- is enabled checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First column as label is not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ '///Enter invalid range ChartFlexRange.A1:E
+ printlog "Enter invalid range ChartFlexRange.A1:E"
+ DataRange.SetText "ChartFlexRange.A1:E"
+ '///Check if -Data series in rows- is disabled
+ printlog "Check if -Data series in rows- is disabled"
+ Kontext "TabChartTypeDataRange"
+ if NOT Rows.IsEnabled then
+ printlog " Data series in rows is disabled"
+ else
+ warnlog "Data series in rows is enabled, but should be disabled"
+ endif
+ '///Check if -Data series in columns- is disabled
+ printlog "Check if -Data series in columns- is disabled"
+ if NOT Columns.IsEnabled then
+ printlog " Data series in columns is disabled"
+ else
+ warnlog "Data series in columns is enabled, but should be disabled"
+ endif
+ '///Check if -First row as label- is disabled
+ printlog "Check if -First row as label- is disabled"
+ if NOT FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is disabled"
+ else
+ warnlog "First row as label is enabled, but should be disabled"
+ endif
+ '///Check if -First column as label- is disabled
+ printlog "Check if -First column as label- is disabled"
+ if NOT FirstColumnAsLabel.IsEnabled then
+ printlog " First Column as label is disabled"
+ else
+ warnlog "First Column as label is enabled, but should be disabled"
+ endif
+ '///Check that Back, Next and Finish does not work
+ printlog "Check that Back, Next and Finish does not work"
+ kontext "ChartWizard"
+ GoBack.Click
+ kontext "TabChartTypeDataRange"
+ if FirstColumnAsLabel.IsVisible then
+ printlog " Success: Back button does not work"
+ else
+ warnlog "Back button is not functionless"
+ Kontext "ChartWizard"
+ GoNext.Click
+ endif
+ '///Enter valid range ChartFlexRange.A1:E5
+ printlog "Enter valid range ChartFlexRange.A1:E5"
+ kontext "TabChartTypeDataRange"
+ DataRange.SetText "ChartFlexRange.A1:E5"
+ '///Check if -Data series in rows- is enabled
+ printlog "Check if -Data series in rows- is enabled"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ '///Check if -Data series in columns- has been enabled and chosen
+ printlog "Check if -Data series in columns- has been enabled and chosen"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ if Columns.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in columns is not checked"
+ endif
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ '///Check if -First row as label- is enabled and checked
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ '///Check if -First column as label- is enabled checked
+ printlog "Check if -First column as label- is enabled and checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First column as label is not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ '///Press Cancel button
+ printlog "Press Cancel button"
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ '///Close document
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tDataSeriesWizardWriter
+ dim sInputFile as string
+ dim iDataSeries as integer
+ dim sDataRanges as string
+ dim sRangeFor as string
+ dim sCategories as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange06.odt" )
+ '///Open test document gTestToolPath/chart2/required/input/ch_flexrange06.odt
+ printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange06.odt"
+ if fOpenWriterTestDocumentAndInsertChart(sInputFile) then
+ '///Choose the Chart type <i>area</i> (should be the fourth in the top-down list)
+ printlog "Choose the Chart type <i>area</i> (should be the fourth in the top-down list)"
+ Kontext "ChartType"
+ if fSetChartType( "area" ) > 0 then
+ warnlog "Something went wrong setting chart type to area."
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ Kontext "ChartWizard"
+ '/// Click Next button
+ GoNext.Click
+ '/// Click Next button
+ GoNext.Click
+ Kontext "TabChartTypeDataSeries"
+ if RangeFor.IsVisible then
+ printlog " Switching to tabpage was successfull"
+ else
+ warnlog "Switching to tabpage Data Series was not successfull"
+ goto endsub
+ endif
+ call DialogTest ( TabChartTypeDataSeries )
+ '///Check if the data series listbox is enabled and contains four entries
+ printlog "Check if the data series listbox is enabled and contains four entries"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 4 then
+ printlog " All 4 data series are available"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 4"
+ endif
+ '///Check if the ADD button is enabled and click the button
+ printlog "Check if the ADD button is enabled and click the button"
+ if AddButton.IsEnabled then
+ printlog " ADD button is enabled"
+ AddButton.Click
+ else
+ warnlog "ADD button is not enabled"
+ endif
+ '///Check if there are now five entries in the data series listbox
+ printlog "Check if there are now five entries in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 5 then
+ printlog " Adding a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 5"
+ endif
+ '///Check if the new data series was added below the highlighted one
+ printlog "Check if the new data series was added below the highlighted one"
+ if DataSeries.GetSelIndex = 2 then
+ printlog " The new data series was inserted below the highlighted (first) one"
+ else
+ warnlog "The new dataseries was not inserted below the highlighted one"
+ endif
+ '///Check if the REMOVE button is enabled and click the button
+ printlog "Check if the REMOVE button is enabled and click the button"
+ if RemoveButton.IsEnabled then
+ printlog " REMOVE button is enabled"
+ RemoveButton.Click
+ else
+ warnlog "REMOVE button is not enabled"
+ endif
+ '///Check if there are now four entries in the data series listbox
+ printlog "Check if there are now four entries in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 4 then
+ printlog " Removing a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 4"
+ endif
+ '/// Select third entry
+ printlog "Select third entry"
+ DataSeries.Select(3)
+ if MoveUp.IsEnabled then
+ printlog " The MoveUp button is enabled"
+ '/// The Move Up button should be enabled
+ printlog "The Move Up button should be enabled"
+ '/// Click the Move Up button twice
+ printlog "Click the Move Up button twice"
+ MoveUp.Click
+ MoveUp.Click
+ else
+ warnlog "The MoveUp button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 1 then
+ printlog " Moving data series was successfull"
+ if MoveUp.IsEnabled then
+ warnlog "MoveUp button is not disabled on first entry"
+ else
+ printlog " and MoveUp button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ '/// Select second entry
+ printlog "Select second entry"
+ DataSeries.Select(2)
+ if MoveDown.IsEnabled then
+ printlog " The MoveDown button is enabled"
+ '/// If Move Down button is enabled
+ printlog "If Move Down button is enabled"
+ '/// Click Move Down button twice
+ printlog "Click Move Down button twice"
+ MoveDown.Click
+ MoveDown.Click
+ else
+ warnlog "The MoveDown button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 4 then
+ printlog " Moving data series was successfull"
+ if MoveDown.IsEnabled then
+ warnlog "MoveDown button is not disabled on first entry"
+ else
+ printlog " and MoveDown button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ '///Select first entry in Data Ranges
+ printlog "Select first entry in Data Ranges"
+ DataRanges.Select(1)
+ '///Verify that the range matches the one in edit field
+ printlog "Verify that the range matches the one in edit field"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match: " & sDataRanges & sRangeFor
+ endif
+ '///Select second entry in Data Ranges
+ printlog "Select second entry in Data Ranges"
+ DataRanges.Select(2)
+ '///Check that the range in the edit field has changed, too
+ printlog "Check that the range in the edit field has changed, too"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match" & sDataRanges & sRangeFor
+ endif
+ '///Change the range in edit field
+ printlog "Change the range in edit field"
+ RangeFor.SetText "ChartFlexRange.B2:B4"
+ '///Check that the range in Data Ranges has changed, too
+ printlog "Check that the range in Data Ranges has changed, too"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ if sDataRanges = "ChartFlexRange.B2:B4" then
+ printlog " The data range has also changed"
+ else
+ warnlog "The data range has not changed"
+ endif
+ '/// Set ChartFlexRange.A2:A4 as range for categories
+ printlog "Set ChartFlexRange.A2:A4 as range for categories"
+ Categories.SetText "ChartFlexRange.A2:A4"
+ sCategories = Categories.GetText
+ if sCategories = "ChartFlexRange.A2:A4" then
+ printlog " The range has been modified"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ '///Enter invalid range ChartFlexRange.A2:A
+ printlog "Enter invalid range ChartFlexRange.A2:A"
+ Categories.SetText "ChartFlexRange.A2:A"
+ '///Check that the BACK button is disabled
+ printlog "Check that the BACK button does not work"
+ kontext "ChartWizard"
+ GoBack.Click
+ kontext "TabChartTypeDataSeries"
+ if Categories.IsVisible then
+ printlog " Success: Back button does not work"
+ else
+ warnlog "Back button is not functionless"
+ Kontext "ChartWizard"
+ GoNext.Click
+ endif
+ '///Enter valid range ChartFlexRange.A2:A5
+ printlog "Enter valid range ChartFlexRange.A2:A5"
+ Categories.SetText "ChartFlexRange.A2:A5"
+ '///Press Cancel button
+ printlog "Press Cancel button"
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ '///Close document
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tDataRangeDialogWriter
+ dim sDataRange as string
+ dim sInputFile as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange07.odt")
+ '///Open test document <i>gTestToolPath</i>/chart2/required/input/ch_flexrange07.odt
+ printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange07.odt"
+ if fOpenTestDocumentAndSelectDataRange(sInputFile) then
+ '///Check data range in edit field (ChartFlexRange.A2:A3;ChartFlexRange.B1:E3)
+ printlog "Check data range in edit field"
+ Kontext "TabChartTypeDataRange"
+ sDataRange = DataRange.GetText
+ if sDataRange <> "ChartFlexRange.A2:A3;ChartFlexRange.B1:E3" then
+ warnlog "This is not the expected datarange, it is " & sDataRange & " but should be ChartFlexRange.A2:A3;ChartFlexRange.B1:E3"
+ else
+ printlog " Datarange is correct"
+ endif
+ '///Check if -Data series in columns- is enabled and chosen
+ printlog "Check if -Data series in columns- is enabled and chosen"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ if Columns.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in columns is not checked"
+ endif
+ else
+ warnlog "Data series in columns is disabled"
+ endif
+ '///Check if -Data series in rows- is enabled
+ printlog "Check if -Data series in rows- is enabled"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ '///Check if -First row as label- is enabled and checked
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ '///Check if -First column as label- is enabled and checked
+ printlog "Check if -First column as label- is enabled and checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First column as label is not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ '///Enter invalid range ChartFlexRange.A1:E
+ printlog "Enter invalid range ChartFlexRange.A1:E"
+ DataRange.SetText "ChartFlexRange.A1:E"
+ '///Check that -Data series in rows- is disabled
+ printlog "Check that -Data series in rows- is disabled"
+ Kontext "TabChartTypeDataRange"
+ if NOT Rows.IsEnabled then
+ printlog " Data series in rows is disabled"
+ else
+ warnlog "Data series in rows is enabled, but should be disabled"
+ endif
+ '///Check that -Data series in columns- is disabled
+ printlog "Check that -Data series in columns- is disabled"
+ if NOT Columns.IsEnabled then
+ printlog " Data series in columns is disabled"
+ else
+ warnlog "Data series in columns is enabled, but should be disabled"
+ endif
+ '///Check if -First row as label- is disabled
+ printlog "Check if -First row as label- is disabled"
+ if NOT FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is disabled"
+ else
+ warnlog "First row as label is enabled, but should be disabled"
+ endif
+ '///Check if -First column as label- is disabled
+ printlog "Check if -First column as label- is disabled"
+ if NOT FirstColumnAsLabel.IsEnabled then
+ printlog " First Column as label is disabled"
+ else
+ warnlog "First Column as label is enabled, but should be disabled"
+ endif
+ '///Check that OK button is disabled
+ printlog "Check that OK button is disabled"
+ try
+ Kontext "TabChartTypeDataRange"
+ TabChartTypeDataRange.OK
+ warnlog "The OK button is not disabled"
+ goto endsub
+ catch
+ printlog " The OK button is disabled"
+ endcatch
+ '///Enter valid range ChartFlexRange.A1:E3
+ printlog "Enter valid range ChartFlexRange.A1:E3"
+ kontext "TabChartTypeDataRange"
+ DataRange.SetText "ChartFlexRange.A1:E3"
+ '///Check if -Data series in columns- is enabled and chosen
+ printlog "Check if -Data series in columns- is enabled and chosen"
+ if Columns.IsEnabled then
+ printlog " Data series in columns is enabled"
+ if Columns.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "Data series in columns is not checked"
+ endif
+ else
+ warnlog "Data series in columns is disabled"
+ endif
+ '///Check if -Data series in rows- is enabled
+ printlog "Check if -Data series in rows- is enabled"
+ if Rows.IsEnabled then
+ printlog " Data series in rows is enabled"
+ else
+ warnlog "Data series in rows is disabled"
+ endif
+ '///Check if -First row as label- is enabled and checked
+ printlog "Check if -First row as label- is enabled and checked"
+ if FirstRowAsLabel.IsEnabled then
+ printlog " First row as label is enabled"
+ if FirstRowAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First row as label is not checked"
+ endif
+ else
+ warnlog "First row as label is disabled"
+ endif
+ '///Check if -First column as label- is enabled and checked
+ printlog "Check if -First column as label- is enabled and checked"
+ if FirstColumnAsLabel.IsEnabled then
+ printlog " First column as label is enabled"
+ if FirstColumnAsLabel.IsChecked then
+ printlog " and checked"
+ else
+ warnlog "First column as label is not checked"
+ endif
+ else
+ warnlog "First column as label is disabled"
+ endif
+ '///Press Cancel button
+ printlog "Press Cancel button"
+ Kontext "TabChartTypeDataRange"
+ TabChartTypeDataRange.Cancel
+ '///Close document
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tDataSeriesDialogWriter
+ dim sInputFile as string
+ dim iDataSeries as integer
+ dim sDataRanges as string
+ dim sRangeFor as string
+ dim sCategories as string
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange08.odt")
+
+ '/// Open test document <i>gTestToolPath</i>/chart2/required/input/ch_flexrange08.odt
+ printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange08.odt"
+ if fOpenTestDocumentAndSelectDataRange(sInputFile) then
+ Kontext
+ '/// Switching to tab page Data Series
+ printlog "Switching to tab page Data Series"
+ active.SetPage TabChartTypeDataSeries
+ Kontext "TabChartTypeDataSeries"
+ call DialogTest ( TabChartTypeDataSeries )
+ '///Check if the data series listbox is enabled and contains four entries
+ printlog "Check if the data series listbox is enabled and contains four entries"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 4 then
+ printlog " One data serie is available"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of four"
+ endif
+ '///Check if the ADD button is enabled and click the button
+ printlog "Check if the ADD button is enabled and click the button"
+ if AddButton.IsEnabled then
+ printlog " ADD button is enabled"
+ AddButton.Click
+ else
+ warnlog "ADD button is not enabled"
+ endif
+ '///Check if there are now five entries in the data series listbox
+ printlog "Check if there are now five entries in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 5 then
+ printlog " Adding a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of five"
+ endif
+ '///Check if the new data series was added below the highlighted one
+ printlog "Check if the new data series was added below the highlighted one"
+ if DataSeries.GetSelIndex = 2 then
+ printlog " The new data series was inserted below the highlighted (first) one"
+ else
+ warnlog "The new dataseries was not inserted below the highlighted one"
+ endif
+ '///Check if the REMOVE button is enabled and click the button
+ printlog "Check if the REMOVE button is enabled and click the button"
+ if RemoveButton.IsEnabled then
+ printlog " REMOVE button is enabled"
+ RemoveButton.Click
+ else
+ warnlog "REMOVE button is not enabled"
+ endif
+ '///Check if there are now four entries in the data series listbox
+ printlog "Check if there are now four entries in the data series listbox"
+ iDataSeries = DataSeries.GetItemCount
+ if iDataSeries = 4 then
+ printlog " Removing a data series was successfull"
+ else
+ warnlog "There are " & iDataSeries & " data series instead of 4"
+ endif
+ '///Use UP button and verify that it it disabled on first entry
+ printlog "Use UP button and verify that it it disabled on first entry"
+ DataSeries.Select(2)
+ if MoveUp.IsEnabled then
+ printlog " The MoveUp button is enabled"
+ MoveUp.Click
+ else
+ warnlog "The MoveUp button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 1 then
+ printlog " Moving data series was successfull"
+ if MoveUp.IsEnabled then
+ warnlog "MoveUp button is not disabled on first entry"
+ else
+ printlog " and MoveUp button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ '///Use DOWN button thrice and verify that it is disabled on last entry
+ printlog "Use DOWN button thrice and verify that it is disabled on last entry"
+ DataSeries.Select(1)
+ if MoveDown.IsEnabled then
+ printlog " The MoveDown button is enabled"
+ MoveDown.Click
+ MoveDown.Click
+ MoveDown.Click
+ else
+ warnlog "The MoveDown button is disabled"
+ endif
+ if DataSeries.GetSelIndex = 4 then
+ printlog " Moving data series was successfull"
+ if MoveDown.IsEnabled then
+ warnlog "MoveDown button is not disabled on first entry"
+ else
+ printlog " and MoveDown button is disabled on first enty"
+ endif
+ else
+ warnlog "Moving data series was not successfull"
+ endif
+ '///Select first entry in Data Ranges
+ printlog "Select first entry in Data Ranges"
+ DataRanges.Select(1)
+ '///Verify that the range matches the one in edit field
+ printlog "Verify that the range matches the one in edit field"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match: " & sDataRanges & sRangeFor
+ endif
+ '///Select second entry in Data Ranges
+ printlog "Select second entry in Data Ranges"
+ DataRanges.Select(2)
+ '///Check that the range in the edit field has changed,too
+ printlog "Check that the range in the edit field has changed,too"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ sRangeFor = RangeFor.GetText
+ if sDataRanges = sRangeFor then
+ printlog " Both ranges are matching"
+ else
+ warnlog "The ranges does not match" & sDataRanges & sRangeFor
+ endif
+ '///Change the range in edit field to ChartFlexRange.B2:B3
+ printlog "Change the range in edit field to ChartFlexRange.B2:B3"
+ RangeFor.SetText "ChartFlexRange.B2:B3"
+ '///Check that the range in Data Ranges has changed, too
+ printlog "Check that the range in Data Ranges has changed, too"
+ 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13
+ 'Instead of 1,2 there must be 1,4 used becqause there are two invisible
+ 'label-columns in that treelist-box
+ sDataRanges = DataRanges.GetSelText (1,4)
+ if sDataRanges = "ChartFlexRange.B2:B3" then
+ printlog " The data range has also changed"
+ else
+ warnlog "The data range has not changed"
+ endif
+ '///Edit range for Categories (ChartFlexRange.A2:A3)
+ printlog "Edit range for Categories (ChartFlexRange.A2:A3)"
+ Categories.SetText "ChartFlexRange.A2:A3"
+ sCategories = Categories.GetText
+ if sCategories = "ChartFlexRange.A2:A3" then
+ printlog " The range has been modified"
+ else
+ warnlog "Modifiing the range was not successfull"
+ endif
+ '///Enter invalid range ChartFlexRange.A2:A
+ printlog "Enter invalid range ChartFlexRange.A2:A"
+ Categories.SetText "ChartFlexRange.A2:A"
+ '///Check that the OK button is disabled
+ printlog "Check that the OK button is disabled"
+ try
+ Kontext "TabChartTypeDataSeries"
+ TabChartTypeDataSeries.OK
+ warnlog "The OK button is not disabled"
+ goto endsub
+ catch
+ printlog " The OK button is disabled"
+ endcatch
+ '///Enter valid range ChartFlexRange.A2:A4
+ printlog "Enter valid range ChartFlexRange.A2:A4"
+ kontext "TabChartTypeDataSeries"
+ Categories.SetText "ChartFlexRange.A2:A4"
+ '///Press Cancel button
+ printlog "Press Cancel button"
+ Kontext "TabChartTypeDataSeries"
+ TabChartTypeDataSeries.Cancel
+ '///Close document
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+'
+'-------------------------------------------------------------------------
+'
+function fOpenWriterTestDocumentAndInsertChart(sInputFile as STRING) as BOOLEAN
+ fOpenWriterTestDocumentAndInsertChart = FALSE
+ call hFileOpen(sInputFile)
+ sleep(2)
+ Call sMakeReadOnlyDocumentEditable()
+ '///Menu Insert Object Chart to open chart wizard
+ printlog "Menu Insert Object Chart to open chart wizard"
+ InsertObjectChart
+ WaitSlot()
+ fOpenWriterTestDocumentAndInsertChart = TRUE
+end function
+
diff --git a/testautomation/chart2/optional/includes/ch2_lvl1a.inc b/testautomation/chart2/optional/includes/ch2_lvl1a.inc
new file mode 100755
index 000000000000..6da6e29ac72d
--- /dev/null
+++ b/testautomation/chart2/optional/includes/ch2_lvl1a.inc
@@ -0,0 +1,266 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart2 functional tests
+'*
+'\************************************************************************
+
+sub ch2_lvl1a
+
+ Call tPlotOptions
+ Call tChartShapes
+
+end sub
+
+
+testcase tPlotOptions
+
+ Dim sOutputFile as string
+ sOutputFile = convertpath(gOfficepath & "user\work\hiddenCells.ods")
+
+ gApplication = "CALC"
+
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog "Select chart using navigator"
+ if fSelectFirstOLE = -1 then
+ warnlog "It was not possible to select the chart object!"
+ Call hCloseDocument
+ goto endsub
+ endif
+
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ waitslot()
+ printlog "Select DataSeries A by toolbar selectorbox"
+ Kontext "DocumentChart"
+ call fChartSelectElement (8)
+
+ printlog "Invoke Format::ObjectProperties"
+ Kontext "Toolbar"
+ FormatSelection.Click
+
+ printlog "Select tab page Options"
+ Kontext
+ Active.SetPage TabDataSeriesOptions
+ Kontext "TabDataSeriesOptions"
+ printlog "activate checkbox 'Include values from hidden cells'"
+ try
+ IncludeHiddenCells.Check
+ catch
+ Warnlog "checkbox hidden or disabled"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ printlog "Close and reopen data series dialog - checkbox should be still activated"
+ TabDataSeriesOptions.Ok
+ Kontext "DocumentChart"
+ FormatSelection
+ printlog "Select tab page Options"
+ Kontext
+ Active.SetPage TabDataSeriesOptions
+ Kontext "TabDataSeriesOptions"
+ if Not IncludeHiddenCells.IsChecked then
+ Warnlog "After closing and reopening of Data-Series dialog the checkbox isn't checked anymore"
+ TabDataSeriesOptions.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ call hCloseDocument
+ goto endsub
+ endif
+
+ TabDataSeriesOptions.Ok
+
+ printlog "save and reopen file - checkbox still must be checked"
+ if NOT hFileSaveAsKill (sOutputFile) then
+ warnlog "Saving test document failed -> Aborting"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ call hCloseDocument
+ goto endsub
+ endif
+ Call hCloseDocument
+
+ Call hFileOpen(sOutputFile)
+ if fSelectFirstOLE = -1 then
+ warnlog "It was not possible to select the chart object!"
+ Call hCloseDocument
+ goto endsub
+ endif
+
+ EditObjectEdit
+ waitslot()
+ printlog "Select DataSeries A by toolbar selectorbox"
+ call fChartSelectElement (8)
+
+ printlog "Invoke Format::ObjectProperties"
+ Kontext "Toolbar"
+ FormatSelection.Click
+ Kontext
+ Active.SetPage TabDataSeriesOptions
+ Kontext "TabDataSeriesOptions"
+ if Not IncludeHiddenCells.IsChecked then
+ Warnlog "After closing and reopening of Data-Series dialog the checkbox isn't checked anymore"
+ TabDataSeriesOptions.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ call hCloseDocument
+ goto endsub
+ endif
+
+ '/// Close dialog with Cancel-button
+ TabDataSeriesOptions.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+
+ Call hCloseDocument
+endcase
+
+'
+'-------------------------------------------------------------------------
+'
+testcase tChartShapes
+
+ Dim sLocalFile as string
+ Dim sLocalFileXLS as string
+ Dim sFormatXLS as string
+ sLocalFile = convertpath(gOfficepath & "user\work\chartshapes.ods")
+ sLocalFileXLS = convertpath(gOfficepath & "user\work\chartshapes.xls")
+ sFormatXLS = "MS Excel 97"
+
+ gApplication = "CALC"
+
+ printlog " Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog " Select chart using navigator"
+ call fSelectFirstOLE
+ printlog " Invoke Edit::Object::Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog " Verify that the drawbar is visible"
+ Kontext "DrawBar"
+
+ qaerrorlog "#i107003# disabled because of bug in toolbars"
+ ' if Not DrawBar.Exists then
+ ' Call hToolbarSelect("Drawing", true)
+ ' endif
+
+ printlog " Insert a shape to the chart by <STRG-RETURN>"
+ Kontext "DocumentChart"
+ DocumentChart.TypeKeys "<F6>",4
+ Kontext "DrawBar"
+ sleep (1)
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<MOD1 RETURN>",TRUE
+ printlog " Rename inserted shape"
+ Kontext "DocumentChart"
+ sleep (1)
+ DocumentChart.OpenContextMenu
+ sleep (1)
+ hMenuSelectNr (6)
+ Kontext "NameDlgObject"
+ NameField.SetText "ChartShape1"
+ NameDlgObject.OK
+ printlog " Leave Chart"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Invoke Edit::Object::Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog " Check if shape is still there"
+ Kontext "DocumentChart"
+ DocumentChart.typekeys "<SHIFT TAB>"
+ Sleep (1)
+ Kontext "Toolbar"
+ if ChartElementSelector.GetSelText <> "ChartShape1" then
+ warnlog "Something is wrong with the shape"
+ endif
+ printlog " Leave Chart"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog " Save document with the default calc filter"
+ call hFileSaveAsKill ( sLocalFile )
+ printlog " Save document to xls"
+ if NOT hFileSaveAsWithFilterKill ( sLocalFileXLS , sFormatXLS ) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close document"
+ call hCloseDocument
+ printlog " Open document"
+ call hFileOpen ( sLocalFile )
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Invoke Edit::Object::Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog " Check if shape is still there"
+ Kontext "DocumentChart"
+ DocumentChart.typekeys "<SHIFT TAB>"
+ Sleep (1)
+ Kontext "Toolbar"
+ if ChartElementSelector.GetSelText <> "ChartShape1" then
+ warnlog "Something is wrong with the shape"
+ endif
+ printlog " Leave Chart"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog " Close document"
+ Call hCloseDocument
+ call hFileOpen ( sLocalFileXLS )
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Invoke Edit::Object::Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog " Check if shape is still there"
+ Kontext "DocumentChart"
+ DocumentChart.typekeys "<SHIFT TAB>"
+ Sleep (1)
+ Kontext "Toolbar"
+ if ChartElementSelector.GetSelText <> "ChartShape1" then
+ warnlog "Something is wrong with the shape"
+ endif
+ printlog " Leave Chart"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog " Close document"
+ Call hCloseDocument
+
+endcase
diff --git a/testautomation/chart2/optional/includes/loadsave/ch2_losa.inc b/testautomation/chart2/optional/includes/loadsave/ch2_losa.inc
new file mode 100755
index 000000000000..b530b0c2a364
--- /dev/null
+++ b/testautomation/chart2/optional/includes/loadsave/ch2_losa.inc
@@ -0,0 +1,219 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Load file of one Spreadsheet format and save to another
+'*
+'\******************************************************************************
+
+sub subLoSaFromTo
+
+ dim sSourcePath as string
+ dim lsInputFileList ( 500 ) as string
+ dim iFilesInList as integer
+ dim sCurrentFileInList as string
+ dim iMainIndex as integer
+
+ dim cRelativePath as string
+ cRelativePath = "chart2\optional\input\" & gsDirectoryInSourcePath &"\"
+
+ '///<u><b>Load/Save files with charts</b></u>
+ printLog Chr(13) + "--------- Save with filter: " & gsFileFormat & " ----------"
+ sSourcePath = convertPath ( gtesttoolpath & cRelativePath )
+
+ '///+<ul><li>Determine list of files to test (All files in 'chart2\loadsave\input\<gsDirectoryInSourcePath>\')</li>
+ GetAllFileList( sSourcePath , "*." & gsDirectoryInSourcePath , lsInputFileList() )
+ iFilesInList = ListCount( lsInputFileList() )
+ '///+<li>Run testcase 'tLoadSaveFromTo' for each file in list</li></ul>
+ for iMainIndex = 2 to iFilesInList
+
+ sCurrentFileInList = lsInputFileList( iMainIndex )
+ printlog "* * * * * * *"
+ printlog "Loop " & ( iMainIndex - 1 ) & " of " & ( iFilesInList - 1 )
+ printlog "Test document: " & sCurrentFileInList
+ call tLoadSaveFromTo ( sCurrentFileInList )
+
+ next iMainIndex
+
+end sub
+
+'*******************************************************************************
+
+function hLoSaEscape() as boolean
+
+ ' Fine grained function to send Escape-keystroke to a spreadsheet document
+
+ const MAX_TRIES = 12
+ dim iTry as integer
+
+ for iTry = 1 to MAX_TRIES
+
+ wait( 250 )
+
+ Kontext "DocumentCalc"
+ try
+ DocumentCalc.TypeKeys( "<ESCAPE>" )
+ hLoSaEscape() = true
+ exit for
+ catch
+ if ( iTry = MAX_TRIES ) then
+ warnlog( "hLoSaEscape(): Sending <ESCAPE> to document failed." )
+ hLoSaEscape() = false
+ endif
+ endcatch
+
+ next iTry
+
+end function
+
+'*******************************************************************************
+
+function hLoSaInplaceEditing() as boolean
+
+ ' Enter in-place editing mode
+
+ const RC_TIMEOUT = -1
+
+ Kontext "DocumentCalc"
+ printlog( "Enable in-place editing by slot <EditObjectEdit>" )
+ if ( hUseAsyncSlot( "EditObjectEdit" ) <> RC_TIMEOUT ) then
+
+ printlog( "Clicked menuitem: Format->Charttype" )
+ if ( hUseAsyncSlot( "FormatChartType" ) <> RC_TIMEOUT ) then
+
+ Kontext "ChartType"
+ if ChartType.exists(2) then
+
+ printlog( "Chart type dialog open, Chart object was found." )
+ Kontext "ChartType"
+ if ( hCloseDialog( ChartType, "cancel" ) ) then
+ printlog( "Chart type dialog closed successfully" )
+ hLoSaInplaceEditing() = true
+ else
+ warnlog( "hLoSaInplaceEditing(): Failed to close dialog <ChartType>" )
+ hLoSaInplaceEditing() = false
+ endif
+ else
+ warnlog( "hLoSaInplaceEditing(): Chart type dialog not open, please check the Chart object" )
+ hLoSaInplaceEditing() = false
+ endif
+
+ else
+ warnlog( "hLoSaInplaceEditing(): Failed to execute slot <FormatChartType>" )
+ hLoSaInplaceEditing() = false
+ endif
+ else
+ warnlog( "hLoSaInplaceEditing(): Failed to execute slot <EditObjectEdit>" )
+ hLoSaInplaceEditing() = false
+ endif
+
+end function
+
+'*******************************************************************************
+
+testcase tLoadSaveFromTo ( sCurrentFile as string )
+
+ printlog( "Load/Save files containing Chart OLE objects in multiple file-formats" )
+
+ dim sCurrentFileLength as integer
+ dim iCurrentPostionInFileName as integer
+ dim iLastPathSignePositon as integer : iLastPathSignePositon = 0
+ dim sExtractedFileName as string
+ dim sExtractedExtension as string
+ dim sTemporaryFile as string
+ dim sOutputFile as string
+ dim iIndex as integer
+
+ sCurrentFileLength = len ( sCurrentFile )
+
+ 'Remove path and extension from file name
+ do
+ iCurrentPostionInFileName = instr ( iCurrentPostionInFileName + 1 , sCurrentFile , gPathSigne )
+ if iCurrentPostionInFileName = 0 then
+ exit do
+ endif
+ iLastPathSignePositon = iCurrentPostionInFileName
+ loop
+
+ sExtractedFileName = right ( sCurrentFile , sCurrentFileLength - iLastPathSignePositon )
+ sCurrentFileLength = len ( sExtractedFileName )
+ sExtractedExtension = right ( sExtractedFileName , 4 )
+ sExtractedFileName = left ( sExtractedFileName , sCurrentFileLength - 4 )
+ sTemporaryFile = ( gOfficePath & ConvertPath("user\work\TemporaryFileToAvoidLocking" ) )
+ sOutputFile = ( gOfficePath & ConvertPath("user\work\" & sExtractedFileName & "_" & gsDirectoryInSourcePath & "_to" & gsOutputFileCustomExtension ) )
+
+ printlog( "Open file: " & sCurrentFile )
+ if ( not hFileOpen( sCurrentFile ) ) then
+ warnlog( "Unable to read file" )
+ goto endsub
+ endif
+
+ printlog( "Save file locally, overwriting existing" )
+ if ( not hFileSaveAsKill( sTemporaryFile & sExtractedExtension ) ) then
+ warnlog( "Unable to save file locally" )
+ goto endsub
+ endif
+
+ printlog( "Select the first OLE object via Navigator" )
+ call fSelectFirstOLE
+
+ printlog( "Enter in-place editing mode" )
+ hLoSaInplaceEditing()
+
+ printlog( "Type <Escape> to exit in-place editing mode" )
+ hLoSaEscape()
+
+ printlog( "Save file as " & sOutputFile & " using filter: " & gsFileFormat )
+ if ( not hFileSaveAsWithFilterKill ( sOutputFile , gsFileFormat ) ) then
+ warnlog( "Saving the document failed using filter: " & gsFileFormat )
+ goto endsub
+ endif
+
+ printlog( "Close the document" )
+ hCloseDocument()
+
+ printlog( "Reload document" )
+ if ( not hFileOpen(sOutputFile) ) then
+ warnlog( "Failed to reload document" )
+ goto endsub
+ endif
+
+ printlog( "Select the first (and only) OLE object" )
+ call fSelectFirstOLE
+
+ printlog( "Enter in-place editing mode" )
+ hLoSaInplaceEditing()
+
+ printlog( "Type <Escape> to exit in-place editing mode" )
+ hLoSaEscape()
+
+ printlog( "Close the document" )
+ call hCloseDocument()
+
+endcase
+
diff --git a/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc b/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
new file mode 100644
index 000000000000..ef61dc36e704
--- /dev/null
+++ b/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
@@ -0,0 +1,243 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Verify the Chart2 XML file format
+'*
+'************************************************************************
+'*
+' #1 tCompareXMLFormatCreate ' Verify Chart2 XML file format by using three characteristcs on new chart
+' #1 tCompareXMLFormatLoad ' Verify Chart2 XML file format by using three characteristcs on loaded chart
+'*
+'\***********************************************************************
+
+testcase tCompareXMLFormatCreate
+ '///+ Test purpose: Verify within three characteristics that there is really a chart
+
+ dim sOutputFile as string
+ dim sUnpackedStorageDir as string
+ dim sChartContentXML as string
+
+ gApplication = "WRITER"
+ sOutputFile = convertpath(gOfficepath & "user\work\Chart2_XML.odt")
+ sUnpackedStorageDir = (gOfficePath & ConvertPath("user\work\chart2_XML2"))
+ sChartContentXML = (gOfficePath & ConvertPath("user\work\chart2_XML2") & ConvertPath("\Object 1\content.xml"))
+
+ '/// File / New / Text
+ printlog " Open new Writer document"
+ call hNewDocument
+ '/// Insert chart with Insert / Object / Chart
+ printlog " Insert chart with Insert / Object / Chart"
+ InsertChart
+ '/// Save document to <i>gOfficepath</i>/user/work/Chart2_XML.odt
+ printlog " Save document to <i>gOfficepath</i>/user/work/Chart2_XML.odt"
+ if NOT hFileSaveAsKill (sOutputFile) then
+ warnlog "Saving test document failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "File saved successfully."
+ endif
+ '/// File / Close
+ call hCloseDocument
+ sleep(3)
+ printlog "File closed"
+ '/// Uncompress with <i>unzip</i> or <i>jar</i> the
+ '///+ <i>gOfficepath</i>/user/work/verySimpleChart.ods document
+ '///+ into <i>gOfficePath</i>/user/work/chart2_XML-directory
+ printlog "Unpack storage of test document."
+ UnpackStorage(sOutputFile, sUnpackedStorageDir)
+ printlog "Read the test documents DOM."
+ '/// Load the XML file <i>gOfficePath</i>/user/work/chart2_XML/Object 1/content.xml
+ '///+ in an XML editor
+ SAXReadFile(sChartContentXML)
+ printlog "Set the DOM pointer to document root"
+ printlog "|-/"
+ SAXSeekElement("/")
+ printlog " |-office:document-content"
+ '/// Open the element 'office:document-content'
+ SAXSeekElement("office:document-content")
+ printlog " |-office:body"
+ '/// Open the element 'office:body'
+ SAXSeekElement("office:body")
+ printlog " |-office:chart"
+ '/// Open the element 'office:chart'
+ SAXSeekElement("office:chart")
+ printlog " |-chart:chart"
+ '/// Open the element 'chart:chart'
+ SAXSeekElement("chart:chart")
+ '/// Get the attribute value for <i>chart:class</i>.
+ '///+ If it is 'chart:bar' the first characteristics validation has been
+ '///+ passed.
+ if SAXGetAttributeValue("chart:class") = "chart:bar" then
+ printlog "This is a bar chart as expected"
+ else
+ warnlog "This is no bar chart, it is a " & SaxGetAttributeValue("chart:class")
+ endif
+ printlog "Seek for chart:plot-area"
+ printlog " |-chart:plot-area"
+ '/// Open the element 'chart:plot-area'
+ SAXSeekElement("chart:plot-area")
+ '/// If the attribute value of 'chart:data-source-has-labels' is 'both'
+ '///+ the second characteristics validation has been passed.
+ if SAXGetAttributeValue("chart:data-source-has-labels") = "both" then
+ printlog "The label attribute for chart:plot-area is correct"
+ else
+ warnlog "The lable attribute is not both, it is " & SaxGetAttributeValue("chart:data-source-has-labels")
+ endif
+ printlog "Seek for chart:series"
+ printlog " |-chart:series"
+ '/// Open the element 'chart:series'
+ SAXSeekElement("chart:series")
+ '/// If the attribute valie of 'chart:values-cell-range-address' is local-table.$B$2:.$B$5''
+ '///+ the hird characteristics validation has been passed.
+ if SAXGetAttributeValue("chart:values-cell-range-address") = "local-table.$B$2:.$B$5" then
+ printlog "The cell range for chart:series is correct"
+ else
+ warnlog "The cell range is not local-table.$B$2:.$B$5, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
+ endif
+ ' DEBUG: printlog "I'm here: " & SAXGetElementName
+ '/// Close the XML editor.
+ SAXRelease
+endcase
+'
+'--------------------------------------------------------------------
+'
+testcase tCompareXMLFormatLoad
+ '///+ Test purpose: Verify within three characteristics that there is really a chart
+
+ dim sOutputFile as string
+ dim sUnpackedStorageDir as string
+ dim sChartContentXML as string
+
+ gApplication = "CALC"
+ sOutputFile = convertpath(gOfficepath & "user\work\verySimpleChart.ods")
+ sUnpackedStorageDir = (gOfficePath & ConvertPath("user\work\chart2_XML"))
+ sChartContentXML = (gOfficePath & ConvertPath("user\work\chart2_XML") & ConvertPath("\Object 1\content.xml"))
+
+ '/// File / Open / <i>gTestToolPath</i>/chart2/update/input/verySimpleChart.ods
+ '/// File / Save As / <i>gOfficepath</i>/user/work/verySimpleChart.ods
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document failed!"
+ goto endsub
+ else
+ printlog "Test document has successfully been loaded."
+ endif
+
+ '/// Select the chart object using the navigator
+ printlog "Select chart using navigator"
+ if fSelectFirstOLE = 0 then
+ printlog "Chart is selected"
+ else
+ warnlog "Chart could not be selected"
+ call hCloseDocument
+ goto endsub
+ endif
+
+ '/// Activate chart with Edit / Object / Edit
+ printlog "Activate chart by Edit / Object / Edit"
+ EditObjectEdit
+
+ 'Save document localy
+ Kontext "DocumentCalc"
+ '/// Press twice <ESCAPE> to leave the chart object
+ DocumentCalc.TypeKeys "<ESCAPE>" , 2 'Leave chart and unselect it
+ '/// Press <CTRL+HOME> to get to cell A1
+ DocumentCalc.TypeKeys "<MOD1 HOME>"
+ '/// Press <F9> to re-calculate the spreadsheet and the objects
+ DocumentCalc.TypeKeys "<F9>"
+ '/// Save the document again
+ if NOT hFileSave (sOutputFile) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "File with very simple chart saved successfully."
+ endif
+ '/// File / Close
+ call hCloseDocument
+ sleep(3)
+ printlog "File with very simple chart closed"
+ '/// Uncompress with <i>unzip</i> or <i>jar</i> the
+ '///+ <i>gOfficepath</i>/user/work/verySimpleChart.ods document
+ '///+ into <i>gOfficePath</i>/user/work/chart2_XML-directory
+ printlog "Unpack storage of test document."
+ UnpackStorage(sOutputFile, sUnpackedStorageDir)
+ printlog "Read the test documents DOM."
+ '/// Load the XML file <i>gOfficePath</i>/user/work/chart2_XML/Object 1/content.xml
+ '///+ in an XML editor
+ SAXReadFile(sChartContentXML)
+ printlog "Set the DOM pointer to document root"
+ printlog "|-/"
+ SAXSeekElement("/")
+ printlog " |-office:document-content"
+ '/// Open the element 'office:document-content'
+ SAXSeekElement("office:document-content")
+ printlog " |-office:body"
+ '/// Open the element 'office:body'
+ SAXSeekElement("office:body")
+ printlog " |-office:chart"
+ '/// Open the element 'office:chart'
+ SAXSeekElement("office:chart")
+ printlog " |-chart:chart"
+ '/// Open the element 'chart:chart'
+ SAXSeekElement("chart:chart")
+ '/// Get the attribute value for <i>chart:class</i>.
+ '///+ If it is 'chart:bar' the first characteristics validation has been
+ '///+ passed.
+ if SAXGetAttributeValue("chart:class") = "chart:bar" then
+ printlog "This is a bar chart as expected"
+ else
+ warnlog "This is no bar chart, it is a " & SaxGetAttributeValue("chart:class")
+ endif
+ printlog "Seek for chart:plot-area"
+ printlog " |-chart:plot-area"
+ '/// Open the element 'chart:plot-area'
+ SAXSeekElement("chart:plot-area")
+ '/// If the attribute value of 'table:cell-range-address' is 'Sheet1.A1:Sheet1.B2'
+ '///+ the second characteristics validation has been passed.
+ if SAXGetAttributeValue("table:cell-range-address") = "Sheet1.A1:Sheet1.B2" then
+ printlog "The cell range for chart:plot-area is correct"
+ else
+ warnlog "The cell range is not Sheet1.A1:Sheet1.B2, it is " & SaxGetAttributeValue("table:cell-range-address")
+ endif
+ printlog "Seek for chart:series"
+ printlog " |-chart:series"
+ '/// Open the element 'chart:series'
+ SAXSeekElement("chart:series")
+ '/// If the attribute valie of 'chart:values-cell-range-address' is Sheet1.A1:Sheet1.A2''
+ '///+ the hird characteristics validation has been passed.
+ if SAXGetAttributeValue("chart:values-cell-range-address") = "Sheet1.A1:Sheet1.A2" then
+ printlog "The cell range for chart:series is correct"
+ else
+ warnlog "The cell range is not Sheet1.A1:Sheet1.A2, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
+ endif
+ ' DEBUG: printlog "I'm here: " & SAXGetElementName
+ '/// Close the XML editor.
+ SAXRelease
+endcase
diff --git a/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard.inc b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard.inc
new file mode 100755
index 000000000000..f87f915ea7f4
--- /dev/null
+++ b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard.inc
@@ -0,0 +1,1092 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart wizard general functionality
+'*
+'************************************************************************
+'*
+' #1 tCreateNew3DChart ' Create a new 3D chart and check the preserved values
+' #1 tCreateNewLineChart ' Create a new line chart and check the preserved values
+'*
+'\************************************************************************
+
+testcase tCreateNew3DChart
+ Dim sInputFile as STRING
+ Dim sOutputFile as STRING
+ Dim sControlString as STRING
+ Dim iChartVariant as integer
+ Dim iChartVariantText as string
+
+
+ sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" )
+ sOutputFile = convertpath ( gOfficePath & "user/work/tCreateNew3DChart.ods" )
+
+ printlog "Load test document TesttoolPath/chart2/optional/input/randomData.ods"
+ call hFileOpen(sInputFile)
+ sleep(2)
+ printlog "Save document as OfficePath/user/work/tCreateNew3DChart.ods"
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Insert / Chart"
+ InsertChart
+ sleep(5)
+ Kontext "ChartType"
+ printlog "Choose the Chart type bar (should be the second in the top-down list)"
+ if fSetChartType( "bar" ) > 0 then
+ warnlog "Something went wrong setting chart type to BAR."
+ endif
+ printlog "Select 2nd chart variant from left"
+ if fSetChartTypeVariant( 2 ) > 0 then
+ warnlog "Something went wrong setting chart type VARIANT."
+ endif
+ printlog "Check 3D Look checkbox"
+ if fSetChartType3D( TRUE ) > 0 then
+ warnlog "Something went wrong setting 3D chart."
+ endif
+ printlog "Change Chart type look to simple"
+ if fSetChartLook3D( "simple" ) > 0 then
+ warnlog "Something went wrong setting 3D look."
+ endif
+ printlog "Change Chart shape to cone"
+ if fSetChartShape3D( "cone" ) > 0 then
+ warnlog "Something went wrong setting 3D shape."
+ endif
+ printlog "Change to Data Range tab page by clicking the Next-button"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataRange"
+ printlog "Set data range text box to $Sheet1.$A$2:$E$13"
+ if fSetTextBox ( DataRange , "$Sheet1.$A$2:$E$13" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Select data series in Rows radiobox"
+ if fSetRadioButton ( Rows ) > 0 then
+ warnlog "Something went wrong selecting 'Data Series in: Rows'."
+ endif
+ printlog "Uncheck First row as label checkbox"
+ if fSetCheckBox ( FirstRowAsLabel , FALSE ) > 0 then
+ warnlog "Something went wrong unselecting 'First row as label'."
+ endif
+ printlog "Change to Data Series tab page by clicking the Next-button"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataSeries"
+ printlog "Select last (12th) entry in Data Series list on the left"
+ if fSetListBoxByItem ( DataSeries , 12 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Series' item no. 12."
+ endif
+ printlog "Click on the add-button"
+ AddButton.Click
+ printlog "Set Range for Name text field to A17"
+ if fSetTextBox ( RangeFor , "A17" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Select 2nd entry in Data Ranges (Y-Values) list on the right"
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
+ endif
+ printlog "Set Range for Y-Values text field to B17:E17"
+ if fSetTextBox ( RangeFor , "B17:E17" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Change to Chart Elements tab-page by clicking the Next-button"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeChartElements"
+ printlog "Set 'Title' text box to MyTitle"
+ if fSetTextBox ( Title , "MyTitle" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Set 'Subtitle' text box to 1 2 3"
+ if fSetTextBox ( Subtitle , "1 2 3" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Set 'X Title' text box to Grått"
+ if fSetTextBox ( TitleXAxis , "Grått" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Set 'Y Title' text box to Gräulich"
+ if fSetTextBox ( TitleYAxis , "Gräulich" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Set 'Z Title' text box to 灰色"
+ if fSetTextBox ( TitleZAxis , "灰色" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Check X Axis-checkbox"
+ if fSetCheckBox ( GridLinesXAxis , TRUE ) > 0 then
+ warnlog "Something went wrong checking 'X Axis'."
+ endif
+ printlog "Uncheck Y Axis-checkbox"
+ if fSetCheckBox ( GridLinesYAxis , FALSE ) > 0 then
+ warnlog "Something went wrong unchecking 'Y Axis'."
+ endif
+ printlog "heck Z Axis-checkbox"
+ if fSetCheckBox ( GridLinesZAxis , TRUE ) > 0 then
+ warnlog "Something went wrong checking 'Z Axis'."
+ endif
+ printlog "Select under Legend (on the right) the Left radio-button"
+ if fSetRadioButton ( PositionLeft ) > 0 then
+ warnlog "Something went wrong selecting 'Legend Display Left'."
+ endif
+ printlog "Click the Finish-button"
+ Kontext "ChartWizard"
+ ChartWizard.OK
+ sleep(2)
+ printlog "File / Save"
+ FileSave
+ Kontext "DocumentCalc"
+ printlog "Press ESCAPE button (deselecting the OLE object)"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog "Close the document"
+ Call hCloseDocument
+ sleep(2)
+ printlog "Open saved file again"
+ call hFileOpen(sOutputFile)
+ sleep(2)
+ printlog "Select chart OLE using navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit to enter inplace mode of the chart"
+ printlog "(enabling the chart menus and editing possibilities)"
+ EditObjectEdit
+ printlog "Format / Chart Type"
+ FormatChartType
+ sleep(1)
+ Kontext "ChartType"
+ printlog "Check if chart type is 'bar'"
+ if ChooseType.GetSelIndex <> 2 Then
+ warnlog "Selected chart type (bar) wasn't preserved after save and reload."
+ endif
+ printlog "Check that variant is 'stacked'"
+ iChartVariant = variant.GetSelIndex
+ iChartVariantText = variant.GetSelText(iChartVariant)
+ printlog "Check that the chart variant is 'Stacked' (2nd entry)"
+ if iChartVariant <> 2 then
+ warnlog "Instead of chart variant 'Stacked' (2) the variant " & iChartVariant & "(" & iChartVariantText & ") has been used - FAILED"
+ end if
+ printlog "Check the the '3D Look' box is checked"
+ if NOT Look3D.IsChecked then
+ warnlog "Check box 3D (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 3D look is 'simple' (=default)"
+ if Scheme3D.GetSelIndex <> 1 then
+ qaerrorlog "#i112522# - Default 3D Look ('simple') has not been preserved after save and reload."
+ endif
+ printlog "Check that 3D shape 'cone' is selected"
+ if BarColumnShape.GetSelIndex <> 3 Then
+ warnlog "3D Shape CONE wasn't preserved after save and reload."
+ endif
+ Kontext "ChartType"
+ printlog "Leave dialog with CANCEL button."
+ ChartType.CANCEL
+ printlog "Invoke Format / Data Ranges"
+ FormatDataRanges
+ printlog "Goto tab-page Data Range"
+ printlog "Verify now the made settings in the 'Data Ranges' dialog:"
+ Kontext
+ Active.SetPage TabFormatDataRangesDataRange
+ Kontext "TabFormatDataRangesDataRange"
+ if TabFormatDataRangesDataRange.Exists(2) then
+ printlog "Check substrings $A$2:$E$13 and $A$17:$E$17 in 'Data Range'"
+ sControlString = DataRange.GetText
+ if instr ( sControlString , "$A$2:$E$13" ) = 0 Then
+ warnlog "Data range wasn't correctly preserved after save and reload and does not caontain $A$2:$E$13."
+ endif
+ if instr ( sControlString , "$A$17:$E$17" ) = 0 Then
+ warnlog "#i72241# - Data range wasn't correctly preserved after save and reload and does not contain $A$17:$E$17."
+ endif
+ printlog "Check that radio button 'rows' is checked"
+ if NOT Rows.IsChecked then
+ warnlog "Radio Button ROWS (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check that radio button 'columns is unchecked."
+ if Columns.IsChecked then
+ warnlog "Radio Button COLUMNS (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'First row as label' checkbox is unchecked"
+ if FirstRowAsLabel.IsChecked then
+ warnlog "Check box 'First row as label' (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'First column as label' checkbox is checked."
+ if NOT FirstColumnAsLabel.IsChecked then
+ warnlog "#i72241# - Check box 'First column as label' (enabled) wasn't preserved after save and reload."
+ endif
+ else
+ warnlog "Tab page 'Data Range' not visible!"
+ end if
+ printlog "Go to tab page 'Data Series'"
+ Kontext
+ Active.SetPage TabFormatDataRangesDataSeries
+ Kontext "TabFormatDataRangesDataSeries"
+ if TabFormatDataRangesDataSeries.Exists(2) then
+ printlog "Check if added range (13 in list on the left) was preserved."
+ if fSetListBoxByItem ( DataSeries , 13 ) > 0 then
+ warnlog "Selecting 13th item in Data Series seems to fail. Added range wasn't preserved."
+ else
+ printlog "Select 'Name'-entry in Data Ranges list on the right."
+ if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
+ else
+ printlog "Check that the string $A$17 exists in range for 'Name'"
+ sControlString = RangeFor.GetText
+ printlog "'Range for name' is: " & sControlString
+ if instr ( sControlString , "$A$17" ) = 0 Then
+ warnlog "#i72241# - 'Range for name' wasn't correctly preserved after save and reload."
+ else
+ printlog "Select 'Y-Values' in Data Ranges list on the right."
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
+ else
+ printlog "Check that the string $B$17:$E$17 is in range for 'Y-Values'"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$B$17:$E$17" ) = 0 Then
+ warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
+ endif
+ endif
+ endif
+ endif
+ endif
+ printlog "Close the dialog with 'cancel'-button"
+ TabFormatDataRangesDataSeries.Cancel
+ else
+ warnlog "Tab page 'Data series' not visible!"
+ end if
+ if fInvokeTitlesDialog() = 0 then
+ printlog "Insert / Title"
+ printlog "Verify now the made settings in the 'Titles' dialog:"
+ Kontext "InsertTitleDialog"
+ printlog "Check that 'Title' text field contains 'MyTitle'"
+ sControlString = MainTitle.GetText
+ if sControlString <> "MyTitle" then
+ warnlog "Title string 'MyTitle' wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Subtitle'text field contains 1 2 3"
+ sControlString = SubTitle.GetText
+ if sControlString <> "1 2 3" then
+ warnlog "Subtitle string '1 2 3' wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'X Title' text field contains Grått"
+ sControlString = TitleXAxis.GetText
+ printlog "'X Title' is: " & sControlString
+ if sControlString <> "Grått" then
+ warnlog "X Title string 'Grått' wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Y Title' text field contains 'Gräulich'"
+ sControlString = TitleYAxis.GetText
+ if sControlString <> "Gräulich" then
+ warnlog "Y Title string 'Gräulich' wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Z Title' text field contains 灰色"
+ sControlString = TitleZAxis.GetText
+ printlog "'Z Title' is: " & sControlString
+ if sControlString <> "灰色" then
+ warnlog "Z Title string '灰色' wasn't preserved after save and reload."
+ endif
+ printlog "Close the Title-dialog by pressing 'Cancel'-button"
+ InsertTitleDialog.Cancel
+ endif
+ if fInvokeGridsDialog() = 0 then
+ printlog "Insert / Grid"
+ Kontext "InsertGridsDialog"
+ printlog "Check that 'Main Grid X Axis' checkbox is checked"
+ if NOT MainGridXaxis.IsChecked then
+ warnlog "Check box 'Gridlines X Axis' (checked) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Main Grid Y Axis' checkbox is checked"
+ if MainGridYaxis.IsChecked then
+ warnlog "Check box 'Gridlines Y Axis' (unchecked) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Main Grid Z Axis' checkbox is checked"
+ if NOT MainGridZaxis.IsChecked then
+ warnlog "Check box 'Gridlines Z Axis' (checked) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Minor Grid X Axis' checkbox is unchecked"
+ if MinorGridXaxis.IsChecked then
+ warnlog "Check box 'Minor Grid X Axis' (unchecked) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Minor Grid Y Axis' checkbox is unchecked"
+ if MinorGridYaxis.IsChecked then
+ warnlog "Check box 'Minor Grid Y Axis' (unchecked) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Minor Grid Z Axis' checkbox is unchecked"
+ if MinorGridZaxis.IsChecked then
+ warnlog "Check box 'Minor Grid Z Axis' (unchecked) wasn't preserved after save and reload."
+ endif
+ printlog "Leave dialog with Cancel-button."
+ InsertGridsDialog.Cancel
+ endif
+ if fInvokeLegendDialog() = 0 then
+ printlog "Insert / Legend"
+ Kontext "InsertLegendDialog"
+ printlog "Check that 'Legend Display' checkbox is checked"
+ if NOT Display.IsChecked then
+ warnlog "Check box 'Legend Display' (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check that 'Left' radio button is selected"
+ if NOT PositionLeft.IsChecked then
+ warnlog "Radio button 'Left' (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Cancel InsertLegend-dialog"
+ Kontext "InsertLegendDialog"
+ InsertLegendDialog.Cancel
+ end if
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+'
+'--------------------------------------------------------------------
+'
+testcase tCreateNewLineChart
+ dim sInputFile as STRING
+ dim sOutputFile as STRING
+ dim sControlString as STRING
+ sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" )
+ sOutputFile = convertpath ( gOfficepath & "user/work/tCreateNewLineChart.ods" )
+ printlog "File / Load TesttoolPath/chart2/optional/input/randomData.ods"
+ call hFileOpen(sInputFile)
+ sleep(2)
+ printlog "Save document as Officepath/user/work/tCreateNewLineChart.ods"
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Insert / Chart"
+ InsertChart
+ printlog "Change Chart type to LINE (5th entry from the top)"
+ Kontext "ChartType"
+ if NOT ChartType.Exists(5) then
+ warnlog "Chart Wizard was not visible. EXITING!"
+ goto endsub
+ else
+ printlog "Chart Wizard visible."
+ end if
+ if fSetChartType ( "line" ) > 0 then
+ warnlog "Something went wrong setting chart type to LINE."
+ endif
+ printlog "Select 3rd Change chart type variant (lines only)"
+ if fSetChartTypeVariant ( 3 ) > 0 then
+ warnlog "Something went wrong setting chart type to 3rd variant (lines only)."
+ endif
+ printlog "Enable 'Stack Series' and select 'Percent'"
+ if fSetStackSeries ( "percent" ) > 0 then
+ warnlog "Something went wrong setting Stack Series to Percent."
+ endif
+ '/// Enable 'Smooth Lines'
+ printlog "Enable 'Smooth Lines'"
+ if fSetSmoothLines ( TRUE ) > 0 then
+ warnlog "Something went wrong enabling Smooth Lines."
+ endif
+ printlog "Invoke 'Smooth Lines' dialog"
+ if fInvokeSmoothLineProperties() > 0 then
+ warnlog "Something went wrong invoking Smooth Lines Dialog."
+ endif
+ printlog "Check B-Spline"
+ BSpline.check
+ printlog "Set Resolution to 33"
+ Resolution.SetText "33"
+ printlog "et Data Points Order to 5"
+ DataPointsOrder.SetText "5"
+ printlog "Close 'Smooth Lines' dialog"
+ if fCloseSmoothLinePropertiesOK() > 0 then
+ warnlog "Something went wrong closing Smooth Lines Dialog."
+ endif
+ printlog "Change to Data Range tab-page"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataRange"
+ printlog "Set Data Range text box to $Sheet1.$A$1:$F$13;$Sheet1.$A$17:$F$17"
+ if fSetTextBox ( DataRange , "$Sheet1.$A$1:$F$13;$Sheet1.$A$17:$F$17" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Change to Data Series tab-page"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataSeries"
+ printlog "Select 3rd entry in Data Series"
+ if fSetListBoxByItem ( DataSeries , 3 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Series' item No. 3."
+ endif
+ printlog "Remove series labeled 'John'"
+ RemoveButton.Click
+ printlog "Select 4th entry in Data Series"
+ if fSetListBoxByItem ( DataSeries , 4 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Series' item No. 4."
+ endif
+ printlog "Select 2nd entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
+ endif
+ printlog "Set 'Range for Y-Values' text box to $Sheet1.$F$2:$F$13;$Sheet1.$D$17"
+ if fSetTextBox ( RangeFor , "$Sheet1.$F$2:$F$13;$Sheet1.$D$17" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Set 'Categories' text box to $Sheet1.$A$2:$A$13;$Sheet1.$A$1"
+ if fSetTextBox ( Categories , "$Sheet1.$A$2:$A$13;$Sheet1.$A$19" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Change to Chart Elements tab-page"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeChartElements"
+ printlog "Uncheck 'Y Axis'"
+ if fSetCheckBox ( GridLinesYAxis , FALSE ) > 0 then
+ warnlog "Something went wrong unselecting 'Y Axis'."
+ endif
+ printlog "Uncheck 'Legend Display'"
+ if fSetCheckBox ( Display , FALSE ) > 0 then
+ warnlog "Something went wrong unselecting 'Legend Display'."
+ endif
+ printlog "Create Chart by clicking Finish-button"
+ Kontext "ChartWizard"
+ ChartWizard.OK
+ sleep(2)
+ printlog "File / Save"
+ FileSave
+ Kontext "DocumentCalc"
+ printlog "Press twice <ESCAPE>-key"
+ DocumentCalc.TypeKeys "<Escape>" , 2
+ printlog "File / Close document"
+ Call hCloseDocument
+ sleep(2)
+ printlog "Open saved file again"
+ call hFileOpen(sOutputFile)
+ sleep(2)
+ printlog "Open the Navigator (F5)"
+ printlog "Select the first OLE object in the Navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog "Format / Chart Type"
+ FormatChartType
+ Kontext "ChartType"
+ if ChartType.Exists(2) then
+ printlog "Check if chart type is LINE"
+ if ChooseType.GetSelIndex <> 5 then
+ warnlog "Selected chart type wasn't preserved after save and reload."
+ endif
+ printlog "Check if chart variant is LINES ONLY (third variant in non-CTL versions from the left)"
+ if Variant.GetSelIndex <> 3 then
+ warnlog "Selected chart type variant wasn't preserved after save and reload."
+ end if
+ printlog "Check if 'Stack Series' box is checked"
+ if NOT StackSeries.IsChecked then
+ warnlog "Check box 'Stack Series' (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Percent' radio button is checked"
+ if NOT Percent.IsChecked then
+ warnlog "Radio button box 'Percent' (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Smooth Lines' box is checked"
+ if NOT SmoothLines.IsChecked then
+ warnlog "Check box 'Smooth Lines' (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Invoke 'Smooth Lines' dialog"
+ if fInvokeSmoothLineProperties() > 0 then
+ warnlog "Something went wrong invoking Smooth Lines dialog."
+ endif
+ printlog "Check if 'B-Spline' radio button is checked"
+ if NOT BSpline.IsChecked then
+ warnlog "Radio button box 'B-Spline' (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Resolution' has value '33'"
+ if Resolution.GetText <> "33" then
+ warnlog "Value for Resolution '33' wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Data Points Order' has value '5'"
+ if DataPointsOrder.GetText <> "5" then
+ warnlog "Value for Data Points Order '5' wasn't preserved after save and reload."
+ endif
+ printlog "Close 'Smooth Lines' dialog"
+ if fCloseSmoothLinePropertiesOK() > 0 then
+ warnlog "Something went wrong closing Smooth Lines Dialog."
+ endif
+ printlog "Leave Chart Type dialog with Cancel"
+ Kontext "ChartType"
+ if ChartType.Exists(2) then
+ ChartType.Cancel
+ else
+ warnlog "ChartType dialog was not visible!?"
+ end if
+ else
+ warnlog "Chart Type dialog was not up!"
+ end if
+ printlog "Format / Data Ranges"
+ FormatDataRanges
+ printlog "Switch to tab page Data Series"
+ Kontext
+ Active.SetPage TabFormatDataRangesDataRange 'Due to bug #i77237# the tabpage has to be switched once before 'OK' or 'Cancel' can be used
+ Active.SetPage TabFormatDataRangesDataSeries
+ Kontext "TabChartTypeDataSeries"
+ if TabChartTypeDataSeries.Exists(2) then
+ printlog "Verify that there are 4 data series"
+ if DataSeries.GetItemCount <> 4 then
+ warnlog "There should be 4 dataseries, but there are " & DataSeries.GetItemCount
+ end if
+ printlog "Select 4th entry in Data Series"
+ if fSetListBoxByItem ( DataSeries , 4 ) > 0 then
+ warnlog "Selecting 4th item in Data Series failed. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Select Name in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
+ endif
+ printlog "Check substring '$F$1' in Range for Name"
+ sControlString = RangeFor.GetText
+ printlog "'Range for name' is: " & sControlString
+ if instr ( sControlString , "$F$1" ) = 0 Then
+ warnlog "'Range for name' wasn't correctly preserved after save and reload."
+ endif
+ printlog "Select Y-Values in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Check substring '$F$2:$F$13' and '$D$17'in Range for Name"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$F$2:$F$13" ) = 0 Then
+ warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
+ endif
+ if instr ( sControlString , "$D$17" ) = 0 Then
+ warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
+ endif
+ printlog "Check substring '$A$2:$A$13' and '$A$19'in Categories"
+ sControlString = Categories.GetText
+ if instr ( sControlString , "$A$2:$A$13" ) = 0 Then
+ warnlog "'Categories' wasn't correctly preserved after save and reload."
+ endif
+ if instr ( sControlString , "$A$19" ) = 0 Then
+ warnlog "'Categories' wasn't correctly preserved after save and reload."
+ endif
+ printlog "Leave tab page data series with CANCEL"
+ TabChartTypeDataSeries.Cancel
+ else
+ warnlog "Tab page Data Series was not up!"
+ end if
+ printlog "Insert / Title"
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ if InsertTitleDialog.Exists(2) then
+ printlog "Check if 'Title' text box is empty"
+ sControlString = MainTitle.GetText
+ if sControlString <> "" then
+ warnlog "Empty Title string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Subtitle' text box is empty"
+ sControlString = SubTitle.GetText
+ if sControlString <> "" then
+ warnlog "Empty Subtitle string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'X Title' text box is empty"
+ sControlString = TitleXaxis.GetText
+ if sControlString <> "" then
+ warnlog "Empty X Title string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Y Title' text box is empty"
+ sControlString = TitleYaxis.GetText
+ if sControlString <> "" then
+ warnlog "Empty Y Title string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Z Title' text box is empty"
+ sControlString = TitleZaxis.GetText
+ if sControlString <> "" then
+ warnlog "Empty Z Title string wasn't preserved after save and reload."
+ endif
+ printlog "Leaving Title dialog with Cancel"
+ InsertTitleDialog.Cancel
+ else
+ warnlog "Title dialog was not up!"
+ end if
+ printlog "Insert / Grids"
+ If fInvokeGridsDialog = 0 then
+ Kontext "InsertGridsDialog"
+ printlog "Check if 'Gridlines X Axis' box is checked"
+ if MainGridXaxis.IsChecked then
+ warnlog "Check box 'Gridlines X Axis' (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Gridlines Y Axis' box is unchecked"
+ if MainGridYaxis.IsChecked then
+ warnlog "Check box 'Gridlines Y Axis' (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Gridlines Z Axis' box is checked"
+ if MainGridZaxis.IsEnabled then
+ warnlog "Check box 'Gridlines Z Axis' shouldn't be enabled after save and reload."
+ endif
+ printlog "Leave dialog with CANCEL"
+ InsertGridsDialog.Cancel
+ else
+ warnlog "Insert Grids dialog was not up!"
+ end if
+ printlog "Insert / Legend"
+ if fInvokeLegendDialog() = 0 then
+ printlog "Check if 'Legend Display' box is checked"
+ Kontext "InsertLegendDialog"
+ if Display.IsChecked then
+ warnlog "Check box 'Legend Display' (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Leave dialog with CANCEL."
+ InsertLegendDialog.Cancel
+ else
+ warnlog "Insert Legend dialog was not up!"
+ end if
+ printlog "Press ESCAPE button (deselecting the OLE object)"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+'
+'--------------------------------------------------------------------
+'
+testcase tCreateNewBubbleChart
+ dim sInputFile as STRING
+ dim sOutputFile as STRING
+ dim sControlString as STRING
+ sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/BubbleChartData.ods" )
+ sOutputFile = convertpath ( gOfficepath & "user/work/tCreateNewBubbleChart.ods" )
+ printlog "File / Load TesttoolPath/chart2/optional/input/BubbleChartData.ods"
+ call hFileOpen(sInputFile)
+ sleep(2)
+ printlog "Save document as Officepath/user/work/tCreateNewBubbleChart.ods"
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Insert / Chart"
+ InsertChart
+ printlog "Change Chart type to BUBBLE (7th entry from the top)"
+ Kontext "ChartType"
+ if NOT ChartType.Exists(5) then
+ warnlog "Chart Wizard was not visible. EXITING!"
+ goto endsub
+ else
+ printlog "Chart Wizard visible."
+ end if
+ if fSetChartType ( "bubble" ) > 0 then
+ warnlog "Something went wrong setting chart type to Bubble Chart."
+ endif
+ printlog "Select 1st chart type variant (Bubble Chart)"
+ if fSetChartTypeVariant ( 1 ) > 0 then
+ warnlog "Something went wrong setting chart type to 1st variant (Bubble Chart)."
+ endif
+ printlog "Change to Data Range tab-page"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataRange"
+ printlog "Set Data Range text box to $Sheet1.$A$2:$C$5;$Sheet1.$A$13:$C$16"
+ if fSetTextBox ( DataRange , "$Sheet1.$A$2:$C$5;$Sheet1.$A$13:$C$16" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Change to Data Series tab-page"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataSeries"
+ '### Name ###
+ printlog "Select 1st entry in Data Series"
+ if fSetListBoxByItem ( DataSeries , 1 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Series' item No. 1."
+ endif
+ printlog "Select 1st entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
+ endif
+ printlog "Set 'Range for Name' text box to $Sheet1.$C$1"
+ if fSetTextBox ( RangeFor , "$Sheet1.$C$1" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ '### Bubble Sizes ###
+ printlog "Select 2nd entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
+ endif
+ printlog "Set 'Range for Bubble Sizes' text box to $Sheet1.$C$2:$C$5"
+ if fSetTextBox ( RangeFor , "$Sheet1.$C$2:$C$5" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ '### X-Values ###
+ printlog "Select 3rd entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 3."
+ endif
+ printlog "Set 'X-Values' text box to $Sheet1.$A$2:$A$5"
+ if fSetTextBox ( RangeFor , "$Sheet1.$A$2:$A$5" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ '### Y-Values ###
+ printlog "Select 4th entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 4."
+ endif
+ printlog "Set 'Y-Values' text box to $Sheet1.$B$2:$B$5"
+ if fSetTextBox ( RangeFor , "$Sheet1.$B$2:$B$5" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ printlog "Add data series"
+ AddButton.Click
+ '### Name ###
+ printlog "Select 1st entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
+ endif
+ printlog "Set 'Range for Name' text box to $Sheet1.$C$12"
+ if fSetTextBox ( RangeFor , "$Sheet1.$C$12" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ '### Bubble Sizes ###
+ printlog "Select 2nd entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2."
+ endif
+ printlog "Set 'Range for Bubble Sizes' text box to $Sheet1.$C$13:$C$16"
+ if fSetTextBox ( RangeFor , "$Sheet1.$C$13:$C$16" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ '### X-Values ###
+ printlog "Select 3rd entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 3."
+ endif
+ printlog "Set 'X-Values' text box to $Sheet1.$A$13:$A$16"
+ if fSetTextBox ( RangeFor , "$Sheet1.$A$13:$A$16" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+ '### Y-Values ###
+ printlog "Select 4th entry in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 4."
+ endif
+ printlog "Set 'Y-Values' text box to $Sheet1.$B$13:$B$16"
+ if fSetTextBox ( RangeFor , "$Sheet1.$B$13:$B$16" ) > 0 then
+ warnlog "Something went wrong setting Text."
+ endif
+
+ printlog "Change to Chart Elements tab-page"
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeChartElements"
+ printlog "Uncheck 'Y Axis'"
+ if fSetCheckBox ( GridLinesYAxis , FALSE ) > 0 then
+ warnlog "Something went wrong unselecting 'Y Axis'."
+ endif
+ printlog "Uncheck 'Legend Display'"
+ if fSetCheckBox ( Display , FALSE ) > 0 then
+ warnlog "Something went wrong unselecting 'Legend Display'."
+ endif
+ printlog "Create Chart by clicking Finish-button"
+ Kontext "ChartWizard"
+ ChartWizard.OK
+ sleep(2)
+ printlog "File / Save"
+ FileSave
+ Kontext "DocumentCalc"
+ printlog "Press twice <ESCAPE>-key"
+ DocumentCalc.TypeKeys "<Escape>" , 2
+ printlog "File / Close document"
+ Call hCloseDocument
+ sleep(2)
+ printlog "Open saved file again"
+ call hFileOpen(sOutputFile)
+ sleep(2)
+ printlog "Open the Navigator (F5)"
+ printlog "Select the first OLE object in the Navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog "Format / Chart Type"
+ FormatChartType
+ Kontext "ChartType"
+ if ChartType.Exists(2) then
+ printlog "Check if chart type is BUBBLE CHART"
+ if ChooseType.GetSelIndex <> 7 then
+ warnlog "Selected chart type wasn't preserved after save and reload."
+ endif
+ printlog "Check if chart variant is BUBBLE CHART (1st variant in non-CTL versions from the left)"
+ if Variant.GetSelIndex <> 1 then
+ warnlog "Selected chart type variant wasn't preserved after save and reload."
+ end if
+ printlog "Leave Chart Type dialog with Cancel"
+ Kontext "ChartType"
+ if ChartType.Exists(2) then
+ ChartType.Cancel
+ else
+ warnlog "ChartType dialog was not visible!?"
+ end if
+ else
+ warnlog "Chart Type dialog was not up!"
+ end if
+ printlog "Format / Data Ranges"
+ FormatDataRanges
+ Kontext
+ Active.SetPage TabChartTypeDataRange
+ Kontext "TabChartTypeDataRange"
+ if TabChartTypeDataRange.Exists(2) then
+ printlog "Check substrings '$A$2:$C$5', '$C$1', '$B$13:$C$16', '$C$12' in Data Range"
+ sControlString = DataRange.GetText
+ printlog "Data Range is: " & sControlString
+ if instr ( sControlString , "$A$2:$C$5" ) = 0 Then
+ warnlog "Data range wasn't correctly preserved after save and reload: $A$2:$C$13"
+ endif
+ if instr ( sControlString , "$C$1" ) = 0 Then
+ warnlog "Data range wasn't correctly preserved after save and reload: $A$19"
+ endif
+ if instr ( sControlString , "$B$13:$C$16" ) = 0 Then
+ QAErrorlog "#i100780#Data range wasn't correctly preserved after save and reload: $B$13:$C$16"
+ endif
+ if instr ( sControlString , "$C$12" ) = 0 Then
+ warnlog "Data range wasn't correctly preserved after save and reload: $E$1:$F$13"
+ endif
+ printlog "Check if Radio Button ROWS is checked"
+ if Rows.IsChecked then
+ warnlog "Radio Button ROWS (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if Radio Button COLUMNS is unchecked"
+ if NOT Columns.IsChecked then
+ warnlog "Radio Button COLUMNS (enabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'First row as label' box is checked"
+ if NOT FirstRowAsLabel.IsChecked then
+ warnlog "Check box 'First row as label' (checked) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'First column as label' box is not checked"
+ if FirstColumnAsLabel.IsChecked then
+ warnlog "Check box 'First column as label' (unchecked) wasn't preserved after save and reload."
+ endif
+ else
+ warnlog "Tab page Data Range was not up!"
+ FormatDataRanges
+ end if
+ printlog "Switch to tab page Data Series"
+ Kontext
+ Active.SetPage TabFormatDataRangesDataSeries
+ Kontext "TabChartTypeDataSeries"
+ if TabChartTypeDataSeries.Exists(2) then
+ printlog "Select 1st entry in Data Series"
+ if fSetListBoxByItem ( DataSeries , 1 ) > 0 then
+ warnlog "Selecting 1st item in Data Series failed. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Select Name in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
+ endif
+ printlog "Check substring '$C$1' in Range for Name"
+ sControlString = RangeFor.GetText
+ printlog "'Range for name' is: " & sControlString
+ if instr ( sControlString , "$C$1" ) = 0 Then
+ warnlog "'Range for name' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Select Bubble Sizes in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Check substring '$C$2:$C$5'in Range for Name"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$C$2:$C$5" ) = 0 Then
+ warnlog "'Range for Bubble Sizes' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Select X-Values in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 3. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Check substring '$A$2:$A$5' in Range for Name"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$A$2:$A$5" ) = 0 Then
+ warnlog "'Range for X-Values' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Select Y-Values in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 4. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Check substring '$B$2:$B$5' in Range for Name"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$B$2:$B$5" ) = 0 Then
+ warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Select 2nd entry in Data Series"
+ if fSetListBoxByItem ( DataSeries , 2 ) > 0 then
+ warnlog "Selecting 1st item in Data Series failed. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Select Name in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 1 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 1."
+ endif
+ printlog "Check substring '$C$12' in Range for Name"
+ sControlString = RangeFor.GetText
+ printlog "'Range for name' is: " & sControlString
+ if instr ( sControlString , "$C$12" ) = 0 Then
+ warnlog "'Range for name' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Select Bubble Sizes in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 2 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 2. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Check substring '$C$13:$C$16'in Range for Name"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$C$13:$C$16" ) = 0 Then
+ warnlog "'Range for Bubble Sizes' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Select X-Values in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 3 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 3. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Check substring '$A$13:$A$16' in Range for Name"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$A$13:$A$16" ) = 0 Then
+ warnlog "'Range for X-Values' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Select Y-Values in Data Ranges"
+ if fSetListBoxByItem ( DataRanges , 4 ) > 0 then
+ warnlog "Something went wrong selecting 'Data Ranges' item No. 4. EXITING!"
+ TabChartTypeDataSeries.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Check substring '$B$13:$B$16' in Range for Name"
+ sControlString = RangeFor.GetText
+ if instr ( sControlString , "$B$13:$B$16" ) = 0 Then
+ warnlog "'Range for Y-Values' wasn't correctly preserved after save and reload."
+ endif
+
+ printlog "Leave tab page data series with CANCEL"
+ TabChartTypeDataSeries.Cancel
+ else
+ warnlog "Tab page Data Series was not up!"
+ end if
+ printlog "Insert / Title"
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ if InsertTitleDialog.Exists(2) then
+ printlog "Check if 'Title' text box is empty"
+ sControlString = MainTitle.GetText
+ if sControlString <> "" then
+ warnlog "Empty Title string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Subtitle' text box is empty"
+ sControlString = SubTitle.GetText
+ if sControlString <> "" then
+ warnlog "Empty Subtitle string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'X Title' text box is empty"
+ sControlString = TitleXaxis.GetText
+ if sControlString <> "" then
+ warnlog "Empty X Title string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Y Title' text box is empty"
+ sControlString = TitleYaxis.GetText
+ if sControlString <> "" then
+ warnlog "Empty Y Title string wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Z Title' text box is empty"
+ sControlString = TitleZaxis.GetText
+ if sControlString <> "" then
+ warnlog "Empty Z Title string wasn't preserved after save and reload."
+ endif
+ printlog "Leaving Title dialog with Cancel"
+ InsertTitleDialog.Cancel
+ else
+ warnlog "Title dialog was not up!"
+ end if
+ printlog "Insert / Grids"
+ If fInvokeGridsDialog = 0 then
+ Kontext "InsertGridsDialog"
+ printlog "Check if 'Gridlines X Axis' box is checked"
+ if MainGridXaxis.IsChecked then
+ warnlog "Check box 'Gridlines X Axis' (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Gridlines Y Axis' box is unchecked"
+ if MainGridYaxis.IsChecked then
+ warnlog "Check box 'Gridlines Y Axis' (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Check if 'Gridlines Z Axis' box is checked"
+ if MainGridZaxis.IsEnabled then
+ warnlog "Check box 'Gridlines Z Axis' shouldn't be enabled after save and reload."
+ endif
+ printlog "Leave dialog with CANCEL"
+ InsertGridsDialog.Cancel
+ else
+ warnlog "Insert Grids dialog was not up!"
+ end if
+ printlog "Insert / Legend"
+ if fInvokeLegendDialog() = 0 then
+ printlog "Check if 'Legend Display' box is checked"
+ Kontext "InsertLegendDialog"
+ if Display.IsChecked then
+ warnlog "Check box 'Legend Display' (disabled) wasn't preserved after save and reload."
+ endif
+ printlog "Leave dialog with CANCEL."
+ InsertLegendDialog.Cancel
+ else
+ warnlog "Insert Legend dialog was not up!"
+ end if
+ printlog "Press ESCAPE button (deselecting the OLE object)"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+
diff --git a/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc
new file mode 100644
index 000000000000..a89e8fad80d8
--- /dev/null
+++ b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc
@@ -0,0 +1,124 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : New chart types
+'*
+'************************************************************************
+'*
+' #1 tCreateNewFilledNetChart ' Create a new filled netchart and check the preserved values
+'*
+'\************************************************************************
+
+testcase tCreateNewFilledNetChart
+ Dim sInputFile as STRING
+ Dim sOutputFile as STRING
+ Dim sControlString as STRING
+ Dim iChartVariant as integer
+ Dim iChartVariantText as string
+
+
+ sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" )
+ sOutputFile = convertpath ( gOfficePath & "user/work/tCreateNewFilledChart.ods" )
+
+
+ printlog "Load test document TesttoolPath/chart2/optional/input/randomData.ods"
+ call hFileOpen(sInputFile)
+ sleep(2)
+ printlog "Save document as OfficePath/user/work/tCreateNewFilledNetChart.ods"
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ printlog "Insert / Chart"
+ InsertChart
+ sleep(5)
+ Kontext "ChartType"
+ if NOT ChartType.Exists(5) then
+ warnlog "Chart Wizard was not visible. EXITING!"
+ goto endsub
+ else
+ printlog "Chart Wizard visible."
+ end if
+ printlog "Choose the Chart type net (should be the eights in the top-down list)"
+ if fSetChartType( "net" ) > 0 then
+ warnlog "Something went wrong setting chart type to BAR."
+ endif
+ printlog "Select 4th chart variant from left (filled)"
+ if fSetChartTypeVariant( 4 ) > 0 then
+ warnlog "Something went wrong setting chart type VARIANT."
+ endif
+ printlog "Create Chart by clicking Finish-button"
+ Kontext "ChartWizard"
+ ChartWizard.OK
+ sleep(2)
+ printlog "File / Save"
+ FileSave
+ Kontext "DocumentCalc"
+ printlog "Press twice <ESCAPE>-key"
+ DocumentCalc.TypeKeys "<Escape>" , 2
+ printlog "File / Close document"
+ Call hCloseDocument
+ sleep(2)
+ printlog "Open saved file again"
+ call hFileOpen(sOutputFile)
+ sleep(2)
+ printlog "Open the Navigator (F5)"
+ printlog "Select the first OLE object in the Navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog "Format / Chart Type"
+ FormatChartType
+ Kontext "ChartType"
+ if ChartType.Exists(2) then
+ printlog "Check if chart type is NET CHART"
+ if ChooseType.GetSelIndex <> 8 then
+ warnlog "Selected chart type wasn't preserved after save and reload."
+ endif
+ printlog "Check if chart variant is Filled Net CHART (4th variant in non-CTL versions from the left)"
+ if Variant.GetSelIndex <> 4 then
+ warnlog "Selected chart type variant wasn't preserved after save and reload."
+ end if
+ printlog "Leave Chart Type dialog with Cancel"
+ Kontext "ChartType"
+ if ChartType.Exists(2) then
+ ChartType.Cancel
+ else
+ warnlog "ChartType dialog was not visible!?"
+ end if
+ else
+ warnlog "Chart Type dialog was not up!"
+ end if
+ printlog "Press ESCAPE button (deselecting the OLE object)"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog "Close document"
+ Call hCloseDocument
+endcase
diff --git a/testautomation/chart2/optional/input/BubbleChartData.ods b/testautomation/chart2/optional/input/BubbleChartData.ods
new file mode 100644
index 000000000000..68110e16ff2e
--- /dev/null
+++ b/testautomation/chart2/optional/input/BubbleChartData.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_areas_normal.ods b/testautomation/chart2/optional/input/ods/2d_areas_normal.ods
new file mode 100755
index 000000000000..432d5edf3013
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_areas_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_areas_percent.ods b/testautomation/chart2/optional/input/ods/2d_areas_percent.ods
new file mode 100755
index 000000000000..6e4d8dd362f7
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_areas_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_areas_stacked.ods b/testautomation/chart2/optional/input/ods/2d_areas_stacked.ods
new file mode 100755
index 000000000000..ff47f9503829
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_areas_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_bars_normal.ods b/testautomation/chart2/optional/input/ods/2d_bars_normal.ods
new file mode 100755
index 000000000000..cd4d74737e4e
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_bars_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_bars_percent.ods b/testautomation/chart2/optional/input/ods/2d_bars_percent.ods
new file mode 100755
index 000000000000..0abeac786764
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_bars_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_bars_stacked.ods b/testautomation/chart2/optional/input/ods/2d_bars_stacked.ods
new file mode 100755
index 000000000000..865ce277e3de
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_bars_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_columns_lines_and_columns.ods b/testautomation/chart2/optional/input/ods/2d_columns_lines_and_columns.ods
new file mode 100755
index 000000000000..08c11fd62c3c
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_columns_lines_and_columns.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_columns_lines_and_stacked_columns.ods b/testautomation/chart2/optional/input/ods/2d_columns_lines_and_stacked_columns.ods
new file mode 100755
index 000000000000..43231f8b9277
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_columns_lines_and_stacked_columns.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_columns_normal.ods b/testautomation/chart2/optional/input/ods/2d_columns_normal.ods
new file mode 100755
index 000000000000..17c69191bb0d
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_columns_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_columns_percent.ods b/testautomation/chart2/optional/input/ods/2d_columns_percent.ods
new file mode 100755
index 000000000000..0e3d566095dc
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_columns_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/2d_columns_stacked.ods b/testautomation/chart2/optional/input/ods/2d_columns_stacked.ods
new file mode 100755
index 000000000000..aa336e6b5675
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/2d_columns_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/3d_lines_deep.ods b/testautomation/chart2/optional/input/ods/3d_lines_deep.ods
new file mode 100755
index 000000000000..935743967998
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/3d_lines_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/3d_pies_normal.ods b/testautomation/chart2/optional/input/ods/3d_pies_normal.ods
new file mode 100755
index 000000000000..e9744be8a22f
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/3d_pies_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/areas_deep.ods b/testautomation/chart2/optional/input/ods/areas_deep.ods
new file mode 100755
index 000000000000..1b46933caacb
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/areas_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/areas_percent.ods b/testautomation/chart2/optional/input/ods/areas_percent.ods
new file mode 100755
index 000000000000..1852aba1b34f
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/areas_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/areas_stacked.ods b/testautomation/chart2/optional/input/ods/areas_stacked.ods
new file mode 100755
index 000000000000..6fa37c09c281
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/areas_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_deep.ods b/testautomation/chart2/optional/input/ods/bars_deep.ods
new file mode 100755
index 000000000000..8c7f783085e8
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_cones.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_cones.ods
new file mode 100755
index 000000000000..1fa0961b3328
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_cones.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_cones_deep.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_cones_deep.ods
new file mode 100755
index 000000000000..15cacdd74eb5
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_cones_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_cones_percent.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_cones_percent.ods
new file mode 100755
index 000000000000..c541078f546a
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_cones_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids.ods
new file mode 100755
index 000000000000..b6e318cf64fa
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_deep.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_deep.ods
new file mode 100755
index 000000000000..2b803bef7d96
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_percent.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_percent.ods
new file mode 100755
index 000000000000..d6691f364e45
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_stacked.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_stacked.ods
new file mode 100755
index 000000000000..aa398472ae09
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_pyramids_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_horizontal_stacked_cones.ods b/testautomation/chart2/optional/input/ods/bars_horizontal_stacked_cones.ods
new file mode 100755
index 000000000000..30d4d212f305
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_horizontal_stacked_cones.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_normal.ods b/testautomation/chart2/optional/input/ods/bars_normal.ods
new file mode 100755
index 000000000000..ab347ca91d08
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_percent.ods b/testautomation/chart2/optional/input/ods/bars_percent.ods
new file mode 100755
index 000000000000..60e8bd419c46
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_stacked.ods b/testautomation/chart2/optional/input/ods/bars_stacked.ods
new file mode 100755
index 000000000000..07561d1ce18b
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_tube.ods b/testautomation/chart2/optional/input/ods/bars_tube.ods
new file mode 100755
index 000000000000..413c6a8b7877
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_tube.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_tubes_deep.ods b/testautomation/chart2/optional/input/ods/bars_tubes_deep.ods
new file mode 100755
index 000000000000..fa4e40a643d9
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_tubes_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_tubes_percent.ods b/testautomation/chart2/optional/input/ods/bars_tubes_percent.ods
new file mode 100755
index 000000000000..06f9ef3c6cf4
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_tubes_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/bars_tubes_stacked.ods b/testautomation/chart2/optional/input/ods/bars_tubes_stacked.ods
new file mode 100755
index 000000000000..9e1799d2fe21
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/bars_tubes_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cones.ods b/testautomation/chart2/optional/input/ods/columns_cones.ods
new file mode 100755
index 000000000000..244f4a64796d
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cones.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cones_deep.ods b/testautomation/chart2/optional/input/ods/columns_cones_deep.ods
new file mode 100755
index 000000000000..7d8590521be1
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cones_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cones_percent.ods b/testautomation/chart2/optional/input/ods/columns_cones_percent.ods
new file mode 100755
index 000000000000..4c9929d2e7c9
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cones_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cones_stacked.ods b/testautomation/chart2/optional/input/ods/columns_cones_stacked.ods
new file mode 100755
index 000000000000..52e0d8bc811a
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cones_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cylinder.ods b/testautomation/chart2/optional/input/ods/columns_cylinder.ods
new file mode 100755
index 000000000000..6f60dabc72f5
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cylinder.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cylinder_deep.ods b/testautomation/chart2/optional/input/ods/columns_cylinder_deep.ods
new file mode 100755
index 000000000000..6d05c3839e67
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cylinder_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cylinder_percent.ods b/testautomation/chart2/optional/input/ods/columns_cylinder_percent.ods
new file mode 100755
index 000000000000..0e6219083d0d
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cylinder_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_cylinder_stacked.ods b/testautomation/chart2/optional/input/ods/columns_cylinder_stacked.ods
new file mode 100755
index 000000000000..0ef322eeab81
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_cylinder_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_deep.ods b/testautomation/chart2/optional/input/ods/columns_deep.ods
new file mode 100755
index 000000000000..671adc2cd1bc
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_normal.ods b/testautomation/chart2/optional/input/ods/columns_normal.ods
new file mode 100755
index 000000000000..779f498f4cb4
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_percent.ods b/testautomation/chart2/optional/input/ods/columns_percent.ods
new file mode 100755
index 000000000000..0792da4ee2fe
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_pyramids.ods b/testautomation/chart2/optional/input/ods/columns_pyramids.ods
new file mode 100755
index 000000000000..ed7f0c9b100a
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_pyramids.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_pyramids_deep.ods b/testautomation/chart2/optional/input/ods/columns_pyramids_deep.ods
new file mode 100755
index 000000000000..8b645c0ef65f
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_pyramids_deep.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_pyramids_percent.ods b/testautomation/chart2/optional/input/ods/columns_pyramids_percent.ods
new file mode 100755
index 000000000000..227d767dbdb8
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_pyramids_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_pyramids_stacked.ods b/testautomation/chart2/optional/input/ods/columns_pyramids_stacked.ods
new file mode 100755
index 000000000000..21d805226a6c
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_pyramids_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/columns_stacked.ods b/testautomation/chart2/optional/input/ods/columns_stacked.ods
new file mode 100755
index 000000000000..1c1e4db7c567
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/columns_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_b-spline.ods b/testautomation/chart2/optional/input/ods/lines_b-spline.ods
new file mode 100755
index 000000000000..2464a7cd8991
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_b-spline.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_b-spline_with_symbols.ods b/testautomation/chart2/optional/input/ods/lines_b-spline_with_symbols.ods
new file mode 100755
index 000000000000..8b6eb5183b8f
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_b-spline_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_cubic_spline.ods b/testautomation/chart2/optional/input/ods/lines_cubic_spline.ods
new file mode 100755
index 000000000000..18225f287c6b
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_cubic_spline.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_cubic_spline_with_symbols.ods b/testautomation/chart2/optional/input/ods/lines_cubic_spline_with_symbols.ods
new file mode 100755
index 000000000000..af78f25b730f
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_cubic_spline_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_normal.ods b/testautomation/chart2/optional/input/ods/lines_normal.ods
new file mode 100755
index 000000000000..8d8bac6e26f6
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_percent.ods b/testautomation/chart2/optional/input/ods/lines_percent.ods
new file mode 100755
index 000000000000..442ff79a0c37
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_percent_with_symbols.ods b/testautomation/chart2/optional/input/ods/lines_percent_with_symbols.ods
new file mode 100755
index 000000000000..eba0abb625a6
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_percent_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_stacked.ods b/testautomation/chart2/optional/input/ods/lines_stacked.ods
new file mode 100755
index 000000000000..e56af744c592
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_stacked_with_symbols.ods b/testautomation/chart2/optional/input/ods/lines_stacked_with_symbols.ods
new file mode 100755
index 000000000000..bdb045617c8b
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_stacked_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/lines_symbols.ods b/testautomation/chart2/optional/input/ods/lines_symbols.ods
new file mode 100755
index 000000000000..63a1793c5695
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/lines_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/net_normal.ods b/testautomation/chart2/optional/input/ods/net_normal.ods
new file mode 100755
index 000000000000..51a93cceef3f
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/net_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/net_percent.ods b/testautomation/chart2/optional/input/ods/net_percent.ods
new file mode 100755
index 000000000000..66d9e5dac017
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/net_percent.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/net_percent_with_symbols.ods b/testautomation/chart2/optional/input/ods/net_percent_with_symbols.ods
new file mode 100755
index 000000000000..07d8eac46f8f
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/net_percent_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/net_stacked.ods b/testautomation/chart2/optional/input/ods/net_stacked.ods
new file mode 100755
index 000000000000..933d1590dfa9
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/net_stacked.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/net_stacked_with_symbols.ods b/testautomation/chart2/optional/input/ods/net_stacked_with_symbols.ods
new file mode 100755
index 000000000000..529d97f765c5
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/net_stacked_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/net_symbols.ods b/testautomation/chart2/optional/input/ods/net_symbols.ods
new file mode 100755
index 000000000000..47e2c2fcab37
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/net_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/pies_normal.ods b/testautomation/chart2/optional/input/ods/pies_normal.ods
new file mode 100755
index 000000000000..2019ca4de8fc
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/pies_normal.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/pies_offset1.ods b/testautomation/chart2/optional/input/ods/pies_offset1.ods
new file mode 100755
index 000000000000..7a413717b281
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/pies_offset1.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/pies_offset2.ods b/testautomation/chart2/optional/input/ods/pies_offset2.ods
new file mode 100755
index 000000000000..aa879680e962
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/pies_offset2.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/pies_rings.ods b/testautomation/chart2/optional/input/ods/pies_rings.ods
new file mode 100755
index 000000000000..4103e6826132
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/pies_rings.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/stockchart_type1.ods b/testautomation/chart2/optional/input/ods/stockchart_type1.ods
new file mode 100755
index 000000000000..c04cf3b26423
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/stockchart_type1.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/stockchart_type2.ods b/testautomation/chart2/optional/input/ods/stockchart_type2.ods
new file mode 100755
index 000000000000..17192c26a2d7
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/stockchart_type2.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/stockchart_type3.ods b/testautomation/chart2/optional/input/ods/stockchart_type3.ods
new file mode 100755
index 000000000000..d826155f2f65
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/stockchart_type3.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/stockchart_type4.ods b/testautomation/chart2/optional/input/ods/stockchart_type4.ods
new file mode 100755
index 000000000000..5e501519df84
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/stockchart_type4.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/xy_chart_b-spline.ods b/testautomation/chart2/optional/input/ods/xy_chart_b-spline.ods
new file mode 100755
index 000000000000..7a2164686578
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/xy_chart_b-spline.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/xy_chart_b-spline_with_symbols.ods b/testautomation/chart2/optional/input/ods/xy_chart_b-spline_with_symbols.ods
new file mode 100755
index 000000000000..99475516a4a0
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/xy_chart_b-spline_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/xy_chart_cubic_spline.ods b/testautomation/chart2/optional/input/ods/xy_chart_cubic_spline.ods
new file mode 100755
index 000000000000..a5acb4fc1c6b
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/xy_chart_cubic_spline.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/xy_chart_cubic_spline_with_symbols.ods b/testautomation/chart2/optional/input/ods/xy_chart_cubic_spline_with_symbols.ods
new file mode 100755
index 000000000000..4baec96aed0b
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/xy_chart_cubic_spline_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/xy_chart_lines_only.ods b/testautomation/chart2/optional/input/ods/xy_chart_lines_only.ods
new file mode 100755
index 000000000000..1011023b7aa4
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/xy_chart_lines_only.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/xy_chart_lines_with_symbols.ods b/testautomation/chart2/optional/input/ods/xy_chart_lines_with_symbols.ods
new file mode 100755
index 000000000000..78287f44f574
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/xy_chart_lines_with_symbols.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/ods/xy_chart_symbols_only.ods b/testautomation/chart2/optional/input/ods/xy_chart_symbols_only.ods
new file mode 100755
index 000000000000..f4db70209e4b
--- /dev/null
+++ b/testautomation/chart2/optional/input/ods/xy_chart_symbols_only.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/randomData.ods b/testautomation/chart2/optional/input/randomData.ods
new file mode 100755
index 000000000000..925a86f8a49b
--- /dev/null
+++ b/testautomation/chart2/optional/input/randomData.ods
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_areas_normal.sxc b/testautomation/chart2/optional/input/sxc/2d_areas_normal.sxc
new file mode 100755
index 000000000000..ab5dd29583ae
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_areas_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_areas_percent.sxc b/testautomation/chart2/optional/input/sxc/2d_areas_percent.sxc
new file mode 100755
index 000000000000..6916219fa143
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_areas_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_areas_stacked.sxc b/testautomation/chart2/optional/input/sxc/2d_areas_stacked.sxc
new file mode 100755
index 000000000000..e4fe98a1dee3
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_areas_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_bars_normal.sxc b/testautomation/chart2/optional/input/sxc/2d_bars_normal.sxc
new file mode 100755
index 000000000000..2369bd0e969e
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_bars_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_bars_percent.sxc b/testautomation/chart2/optional/input/sxc/2d_bars_percent.sxc
new file mode 100755
index 000000000000..c824832c859c
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_bars_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_bars_stacked.sxc b/testautomation/chart2/optional/input/sxc/2d_bars_stacked.sxc
new file mode 100755
index 000000000000..6b8d6086bce9
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_bars_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_columns_lines_and_columns.sxc b/testautomation/chart2/optional/input/sxc/2d_columns_lines_and_columns.sxc
new file mode 100755
index 000000000000..bf573430e041
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_columns_lines_and_columns.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_columns_lines_and_stacked_columns.sxc b/testautomation/chart2/optional/input/sxc/2d_columns_lines_and_stacked_columns.sxc
new file mode 100755
index 000000000000..4c77436af381
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_columns_lines_and_stacked_columns.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_columns_normal.sxc b/testautomation/chart2/optional/input/sxc/2d_columns_normal.sxc
new file mode 100755
index 000000000000..485938995250
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_columns_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_columns_percent.sxc b/testautomation/chart2/optional/input/sxc/2d_columns_percent.sxc
new file mode 100755
index 000000000000..4db5741102d6
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_columns_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/2d_columns_stacked.sxc b/testautomation/chart2/optional/input/sxc/2d_columns_stacked.sxc
new file mode 100755
index 000000000000..2a564bb25102
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/2d_columns_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/3d_lines_deep.sxc b/testautomation/chart2/optional/input/sxc/3d_lines_deep.sxc
new file mode 100755
index 000000000000..477ec0340dc8
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/3d_lines_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/3d_pies_normal.sxc b/testautomation/chart2/optional/input/sxc/3d_pies_normal.sxc
new file mode 100755
index 000000000000..77697ab3b28b
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/3d_pies_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/areas_deep.sxc b/testautomation/chart2/optional/input/sxc/areas_deep.sxc
new file mode 100755
index 000000000000..9e9d03add2b1
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/areas_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/areas_percent.sxc b/testautomation/chart2/optional/input/sxc/areas_percent.sxc
new file mode 100755
index 000000000000..907f6c65c1fb
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/areas_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/areas_stacked.sxc b/testautomation/chart2/optional/input/sxc/areas_stacked.sxc
new file mode 100755
index 000000000000..b6532d15b57e
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/areas_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_deep.sxc b/testautomation/chart2/optional/input/sxc/bars_deep.sxc
new file mode 100755
index 000000000000..f359777754ad
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_cones.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_cones.sxc
new file mode 100755
index 000000000000..da42284992a0
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_cones.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_cones_deep.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_cones_deep.sxc
new file mode 100755
index 000000000000..f1d8a29de3e2
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_cones_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_cones_percent.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_cones_percent.sxc
new file mode 100755
index 000000000000..cd7fa1504398
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_cones_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids.sxc
new file mode 100755
index 000000000000..1b893e632963
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_deep.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_deep.sxc
new file mode 100755
index 000000000000..a6bc1035d3a0
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_percent.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_percent.sxc
new file mode 100755
index 000000000000..49df7edfbbd9
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_stacked.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_stacked.sxc
new file mode 100755
index 000000000000..006914bc5f1b
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_pyramids_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_horizontal_stacked_cones.sxc b/testautomation/chart2/optional/input/sxc/bars_horizontal_stacked_cones.sxc
new file mode 100755
index 000000000000..340c5022a15f
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_horizontal_stacked_cones.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_normal.sxc b/testautomation/chart2/optional/input/sxc/bars_normal.sxc
new file mode 100755
index 000000000000..376dceb7e453
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_percent.sxc b/testautomation/chart2/optional/input/sxc/bars_percent.sxc
new file mode 100755
index 000000000000..23aa49beee9b
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_stacked.sxc b/testautomation/chart2/optional/input/sxc/bars_stacked.sxc
new file mode 100755
index 000000000000..65f51089bd5d
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_tube.sxc b/testautomation/chart2/optional/input/sxc/bars_tube.sxc
new file mode 100755
index 000000000000..597bcd4b78c2
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_tube.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_tubes_deep.sxc b/testautomation/chart2/optional/input/sxc/bars_tubes_deep.sxc
new file mode 100755
index 000000000000..99a57cfa8b3e
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_tubes_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_tubes_percent.sxc b/testautomation/chart2/optional/input/sxc/bars_tubes_percent.sxc
new file mode 100755
index 000000000000..9f380b773ade
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_tubes_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/bars_tubes_stacked.sxc b/testautomation/chart2/optional/input/sxc/bars_tubes_stacked.sxc
new file mode 100755
index 000000000000..785494e63b1b
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/bars_tubes_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cones.sxc b/testautomation/chart2/optional/input/sxc/columns_cones.sxc
new file mode 100755
index 000000000000..a9c30a8162ef
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cones.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cones_deep.sxc b/testautomation/chart2/optional/input/sxc/columns_cones_deep.sxc
new file mode 100755
index 000000000000..e7752e61313b
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cones_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cones_percent.sxc b/testautomation/chart2/optional/input/sxc/columns_cones_percent.sxc
new file mode 100755
index 000000000000..3b070374a1de
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cones_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cones_stacked.sxc b/testautomation/chart2/optional/input/sxc/columns_cones_stacked.sxc
new file mode 100755
index 000000000000..ed78861c0cdb
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cones_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cylinder.sxc b/testautomation/chart2/optional/input/sxc/columns_cylinder.sxc
new file mode 100755
index 000000000000..6c088275ba78
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cylinder.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cylinder_deep.sxc b/testautomation/chart2/optional/input/sxc/columns_cylinder_deep.sxc
new file mode 100755
index 000000000000..e5c686296111
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cylinder_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cylinder_percent.sxc b/testautomation/chart2/optional/input/sxc/columns_cylinder_percent.sxc
new file mode 100755
index 000000000000..69f60c5da039
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cylinder_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_cylinder_stacked.sxc b/testautomation/chart2/optional/input/sxc/columns_cylinder_stacked.sxc
new file mode 100755
index 000000000000..0e12cc60884e
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_cylinder_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_deep.sxc b/testautomation/chart2/optional/input/sxc/columns_deep.sxc
new file mode 100755
index 000000000000..ab5ca7786370
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_normal.sxc b/testautomation/chart2/optional/input/sxc/columns_normal.sxc
new file mode 100755
index 000000000000..16c290525b0f
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_percent.sxc b/testautomation/chart2/optional/input/sxc/columns_percent.sxc
new file mode 100755
index 000000000000..c1df514a8401
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_pyramids.sxc b/testautomation/chart2/optional/input/sxc/columns_pyramids.sxc
new file mode 100755
index 000000000000..74fb0626c34c
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_pyramids.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_pyramids_deep.sxc b/testautomation/chart2/optional/input/sxc/columns_pyramids_deep.sxc
new file mode 100755
index 000000000000..1e4b7d3d0894
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_pyramids_deep.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_pyramids_percent.sxc b/testautomation/chart2/optional/input/sxc/columns_pyramids_percent.sxc
new file mode 100755
index 000000000000..756328be651d
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_pyramids_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_pyramids_stacked.sxc b/testautomation/chart2/optional/input/sxc/columns_pyramids_stacked.sxc
new file mode 100755
index 000000000000..e63eca4c6dbc
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_pyramids_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/columns_stacked.sxc b/testautomation/chart2/optional/input/sxc/columns_stacked.sxc
new file mode 100755
index 000000000000..385bb61adf5c
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/columns_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_b-spline.sxc b/testautomation/chart2/optional/input/sxc/lines_b-spline.sxc
new file mode 100755
index 000000000000..9ae37f5f2710
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_b-spline.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_b-spline_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/lines_b-spline_with_symbols.sxc
new file mode 100755
index 000000000000..49b2aa51c7d3
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_b-spline_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_cubic_spline.sxc b/testautomation/chart2/optional/input/sxc/lines_cubic_spline.sxc
new file mode 100755
index 000000000000..6d644b8c9143
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_cubic_spline.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_cubic_spline_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/lines_cubic_spline_with_symbols.sxc
new file mode 100755
index 000000000000..a3e97a939aa3
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_cubic_spline_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_normal.sxc b/testautomation/chart2/optional/input/sxc/lines_normal.sxc
new file mode 100755
index 000000000000..f86c92c3930e
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_percent.sxc b/testautomation/chart2/optional/input/sxc/lines_percent.sxc
new file mode 100755
index 000000000000..b569c4386d48
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_percent_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/lines_percent_with_symbols.sxc
new file mode 100755
index 000000000000..0db3d31a87c2
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_percent_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_stacked.sxc b/testautomation/chart2/optional/input/sxc/lines_stacked.sxc
new file mode 100755
index 000000000000..9ee264e1a4a0
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_stacked_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/lines_stacked_with_symbols.sxc
new file mode 100755
index 000000000000..31f0e0b25e35
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_stacked_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/lines_symbols.sxc b/testautomation/chart2/optional/input/sxc/lines_symbols.sxc
new file mode 100755
index 000000000000..ed4cd005d3da
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/lines_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/net_normal.sxc b/testautomation/chart2/optional/input/sxc/net_normal.sxc
new file mode 100755
index 000000000000..b2c743bcc4a5
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/net_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/net_percent.sxc b/testautomation/chart2/optional/input/sxc/net_percent.sxc
new file mode 100755
index 000000000000..470bb6159fb7
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/net_percent.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/net_percent_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/net_percent_with_symbols.sxc
new file mode 100755
index 000000000000..531c2ba2bffc
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/net_percent_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/net_stacked.sxc b/testautomation/chart2/optional/input/sxc/net_stacked.sxc
new file mode 100755
index 000000000000..b9b394c96c26
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/net_stacked.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/net_stacked_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/net_stacked_with_symbols.sxc
new file mode 100755
index 000000000000..4452396dd5df
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/net_stacked_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/net_symbols.sxc b/testautomation/chart2/optional/input/sxc/net_symbols.sxc
new file mode 100755
index 000000000000..95b281278d68
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/net_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/pies_normal.sxc b/testautomation/chart2/optional/input/sxc/pies_normal.sxc
new file mode 100755
index 000000000000..8e4e16bcda57
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/pies_normal.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/pies_offset1.sxc b/testautomation/chart2/optional/input/sxc/pies_offset1.sxc
new file mode 100755
index 000000000000..f3aad332ff4e
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/pies_offset1.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/pies_offset2.sxc b/testautomation/chart2/optional/input/sxc/pies_offset2.sxc
new file mode 100755
index 000000000000..87a3e8aa8e21
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/pies_offset2.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/pies_rings.sxc b/testautomation/chart2/optional/input/sxc/pies_rings.sxc
new file mode 100755
index 000000000000..35f1a62b6105
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/pies_rings.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/stockchart_type1.sxc b/testautomation/chart2/optional/input/sxc/stockchart_type1.sxc
new file mode 100755
index 000000000000..3171dd3f27dd
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/stockchart_type1.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/stockchart_type2.sxc b/testautomation/chart2/optional/input/sxc/stockchart_type2.sxc
new file mode 100755
index 000000000000..fbb79d452749
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/stockchart_type2.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/stockchart_type3.sxc b/testautomation/chart2/optional/input/sxc/stockchart_type3.sxc
new file mode 100755
index 000000000000..27d23cce0264
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/stockchart_type3.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/stockchart_type4.sxc b/testautomation/chart2/optional/input/sxc/stockchart_type4.sxc
new file mode 100755
index 000000000000..d5ffa43c9f53
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/stockchart_type4.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/xy_chart_b-spline.sxc b/testautomation/chart2/optional/input/sxc/xy_chart_b-spline.sxc
new file mode 100755
index 000000000000..7f389fa11a21
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/xy_chart_b-spline.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/xy_chart_b-spline_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/xy_chart_b-spline_with_symbols.sxc
new file mode 100755
index 000000000000..fb371cd3a767
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/xy_chart_b-spline_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/xy_chart_cubic_spline.sxc b/testautomation/chart2/optional/input/sxc/xy_chart_cubic_spline.sxc
new file mode 100755
index 000000000000..cfcca1e86de2
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/xy_chart_cubic_spline.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/xy_chart_cubic_spline_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/xy_chart_cubic_spline_with_symbols.sxc
new file mode 100755
index 000000000000..a545222de37d
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/xy_chart_cubic_spline_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/xy_chart_lines_only.sxc b/testautomation/chart2/optional/input/sxc/xy_chart_lines_only.sxc
new file mode 100755
index 000000000000..73c0868ed3ad
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/xy_chart_lines_only.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/xy_chart_lines_with_symbols.sxc b/testautomation/chart2/optional/input/sxc/xy_chart_lines_with_symbols.sxc
new file mode 100755
index 000000000000..c6014942b630
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/xy_chart_lines_with_symbols.sxc
Binary files differ
diff --git a/testautomation/chart2/optional/input/sxc/xy_chart_symbols_only.sxc b/testautomation/chart2/optional/input/sxc/xy_chart_symbols_only.sxc
new file mode 100755
index 000000000000..de39abd4ed1b
--- /dev/null
+++ b/testautomation/chart2/optional/input/sxc/xy_chart_symbols_only.sxc
Binary files differ
diff --git a/testautomation/chart2/required/ch2_updt_calc.bas b/testautomation/chart2/required/ch2_updt_calc.bas
new file mode 100755
index 000000000000..02cc2c883269
--- /dev/null
+++ b/testautomation/chart2/required/ch2_updt_calc.bas
@@ -0,0 +1,152 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Resource Test for all chart specific menues
+'*
+'\************************************************************************************************
+
+sub main
+ use "chart2\tools\ch_tools_common.inc"
+ use "chart2\tools\ch_tools_chart_type.inc"
+ use "chart2\tools\ch_tools_titles.inc"
+ use "chart2\tools\ch_tools_axes.inc"
+ use "chart2\tools\ch_tools_grids.inc"
+ use "chart2\tools\ch_tools_legend.inc"
+ use "chart2\tools\ch_tools_data_labels.inc"
+ use "chart2\tools\ch_tools_statistics.inc"
+ use "chart2\tools\ch_tools_tab_pages.inc"
+ use "chart2\tools\ch_tools_select.inc"
+ use "chart2\required\includes\ch2_wizard.inc"
+ use "chart2\required\includes\ch2_file.inc"
+ use "chart2\required\includes\ch2_view.inc"
+ use "chart2\required\includes\ch2_insert_ctl.inc"
+ use "chart2\required\includes\ch2_insert.inc"
+ use "chart2\required\includes\ch2_format.inc"
+ use "chart2\required\includes\ch2_format1.inc"
+ use "chart2\required\includes\ch2_window.inc"
+ use "chart2\required\includes\ch2_toolbars.inc"
+ use "chart2\required\includes\ch2_menu.inc"
+ use "chart2\required\includes\ch2_ole.inc"
+
+ Call hStatusIn("Chart2", "ch2_updt_calc.bas")
+
+ printlog "----------------------------------------"
+ printlog "C h a r t 2 i n S p r e a d s h e e t"
+ printlog " U p d a t e t e s t"
+ printlog "----------------------------------------"
+ printLog Chr(13) + "----------- Chart2 Wizard ------------"
+ Call tCreateNewChart
+ printLog Chr(13) + "----------- Chart2 Menu ------------"
+ call tMainMenu
+ printLog Chr(13) + "---------- Chart2 File Menu ----------"
+ call tFileClose
+ call tFileSaveAsOTS
+ call tFileSaveAsSXC
+ call tFileSaveAsSTC
+ call tFileSaveAsXLS
+ call tFileSaveAsXLT
+ call tFileSaveAsSDC
+ call tFileSaveAsVOR
+ call tFileReload
+ printLog Chr(13) + "---------- Chart2 View Menu -----------"
+ Call tViewToolbars
+ Call tViewToolbarsCustomize
+ Call tViewFullScreen
+ printLog Chr(13) + "-------- Chart2 Insert Menu ----------"
+ call tInsertTitle
+ call tInsertAxes
+ call tInsertGrids
+ call tInsertLegend
+ call tInsertDataLabels
+ call tInsertTrendLines
+ call tInsertMeanValueLines
+ call tInsertYErrorBars
+ call tInsertSpecialCharacter
+ printLog Chr(13) + "-------- Chart2 CTL Features ----------"
+ call tTitleTextDirection
+ call tLegendTextDirection
+ call tXAxisTextDirection
+ call tDataSeriesTextDirection
+ call tEquationTextDirection
+ call tDataPointTextDirection
+ printlog Chr(13) + "--------- Chart2 Format Menu ---------"
+ call tFormatObjectProperties
+ call tFormatObjectPropertiesPieChart
+ call tFormatPositonAndSize
+ call tFormatArrangement
+ Call tFormatTitleMaintitle
+ Call tFormatTitleSubtitle
+ Call tFormatTitleXAxistitle
+ Call tFormatTitleYAxistitle
+ Call tFormatTitleZAxistitle
+ Call tFormatTitleAllTitles
+ Call tFormatAxisXAxis
+ Call tFormatAxisYAxis
+ Call tFormatAxisZAxis
+ Call tFormatAxisSecondaryXAxis
+ Call tFormatAxisSecondaryYAxis
+ Call tFormatAxisAllAxes
+ Call tFormatXAxisMainGrid
+ Call tFormatYAxisMainGrid
+ Call tFormatZAxisMainGrid
+ call tFormatXAxisMinorGrid
+ Call tFormatYAxisMinorGrid
+ Call tFormatAllAxesGrids
+ Call tFormatLegend
+ Call tFormatChartWall
+ Call tFormatChartFloor
+ Call tFormatChartArea
+ Call tFormatChartType
+ call tFormatDataRanges
+ Call tFormat3DView
+ printlog Chr(13) + "--------- Chart2 Window Menu ---------"
+ Call tWindowNewWindowAndClose
+ printLog Chr(13) + "---------- Chart2 Toolbars -----------"
+ Call tDrawBar
+ printLog Chr(13) + "--------- Chart2 as OLE object ---------"
+ Call tChartOLE("WRITER")
+ Call tChartOLE("CALC")
+ Call tChartOLE("IMPRESS")
+ Call tChartOLE("DRAW")
+ Call tChartOLE("HTML")
+ Call tChartOLE("MASTERDOCUMENT")
+ Call hStatusOut
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_set_standard_controls.inc"
+ use "global\tools\includes\optional\t_ole.inc"
+ Call GetUseFiles
+ gApplication = "CALC"
+end sub
diff --git a/testautomation/chart2/required/includes/ch2_file.inc b/testautomation/chart2/required/includes/ch2_file.inc
new file mode 100755
index 000000000000..f7166df9c82e
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_file.inc
@@ -0,0 +1,404 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - Menu FILE
+'*
+'************************************************************************
+'*
+' #1 tFileClose
+' #1 tFileSaveAsOTS
+' #1 tFileSaveAsSXC
+' #1 tFileSaveAsSTC
+' #1 tFileSaveAsXLS
+' #1 tFileSaveAsXLT
+' #1 tFileSaveAsSDC
+' #1 tFileSaveAsVOR
+' #1 tFileReload
+'*
+'\************************************************************************
+
+testcase tFileClose
+'///<u><b>Dialog test after invocation of File::Close</b></u
+ '/// Load new document
+ Call hNewDocument
+ '/// Insert default chart
+ InsertChart
+ sleep(2)
+ Kontext "ChartWizard"
+ '/// Leave wizard with OK
+ ChartWizard.OK
+ printlog "Left Chart wizard with OK"
+ sleep(2)
+ '/// File / Close
+ FileClose
+ printlog "File / Close executed"
+ Kontext
+ '/// MsgBox: Cancel
+ Active.Cancel
+ '/// File / Close
+ FileClose
+ '/// MsgBox: Save
+ Kontext
+ Active.Yes
+ '/// Check for File Save dialo
+ Kontext "SpeichernDlg"
+ '/// Cancel File Save dialog
+ SpeichernDlg.Cancel
+ '/// File / Close
+ FileClose
+ Kontext
+ '/// MsgBox: Discard
+ Active.No
+endcase
+'
+'-----------------------------------------------------------
+'
+testcase tFileSaveAsOTS
+'///<u><b>Save the test file as OpenDocument Spreadsheet Template (.ots)</b></u>
+ Dim sOutputFile as string
+
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.ots" )
+
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document failed!"
+ goto endsub
+ else
+ printlog "Test document successfully been loaded."
+ endif
+ '/// Select first OLE using the navigator
+ call fSelectFirstOLE
+ printlog "First OLE selected via navigator"
+ '/// Edit / Object / Edit to enter Inplace Mode
+ EditObjectEdit
+ printlog "Edit / Object / Edit"
+ '/// Convert chart to 3D (just to edit document)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ else
+ printlog "Conversation of chart to 3D was successful."
+ endif
+ '/// Unselect chart using Escape key
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8_template" ) then
+ warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Clsoing the Navigator
+ Kontext "NavigatorCalc"
+ if NavigatorCalc.Exists(1) then
+ NavigatorCalc.Close
+ QAErrorLog "Why did fSelectFirstOLE not close this dialog?"
+ endif
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFileSaveAsSXC
+'///<u><b>Save the test file as StarOffice 6.0/7 Spreadsheet (.sxc)</b></u>
+ Dim sOutputFile as string
+
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.sxc" )
+
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document failed!"
+ goto endsub
+ else
+ printlog "Loading test document was successful!"
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ printlog "First OLE selected via Navigator"
+ '/// Edit / Object / Edit to enter Inplace Mode
+ EditObjectEdit
+ printlog "Edit / Object / Edit"
+ '/// Convert chart to 3D (just to edit document)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Unselect chart using Escape key
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Save document as StarOffice 6.0/7 Spreadsheet (.sxc)
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "StarOffice XML (Calc)") then
+ warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFileSaveAsSTC
+'///<u><b>Save the test file as StarOffice 6.0/7 Spreadsheet Template (.stc)</b></u>
+ Dim sOutputFile as string
+
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.stc" )
+
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ else
+ printlog "Simple chart document successfully been loaded."
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ '/// Convert chart to 3D (just to edit document)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Unselect chart using Escape key
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Save document as StarOffice 6.0/7 Spreadsheet Template (.stc)
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc_StarOffice_XML_Calc_Template" ) then
+ warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFileSaveAsXLS
+'///<u><b>Save the test file as Microsoft Excel 97/2000/XP (.xls)</b></u>
+ Dim sOutputFile as string
+
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.xls" )
+
+ '/// Load simple chart document <i>Testtoolpath</i>/chart2/required/input/verySimpleChart.ods
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document failed!"
+ goto endsub
+ endif
+ '/// Edit / Navigator
+ '/// Select the first OLE object in the tree view of the Navigator
+ '/// Press <RETURN>
+ call fSelectFirstOLE
+ printlog "First OLE selected."
+ '/// Edit / Object / Edit to enter Inplace Mode
+ EditObjectEdit
+ printlog "Edit / Object / Edit executed."
+ '/// Format / Chart Type
+ '/// Check 3D checkbox
+ '/// Close Chart Type dialog
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ else
+ printlog "Chart type converted to 3D."
+ endif
+ '/// Unselect chart using Escape key
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Save document as Microsoft Excel 97/2000/XP (.xls)
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "MS Excel 97" ) then
+ warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFileSaveAsXLT
+'///<u><b>Save the test file as Microsoft Excel 97/2000/XP Template(.xlt)</b></u>
+ Dim sOutputFile as string
+
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.xlt" )
+
+ '/// Load simple chart document <i>Testtoolpath</i>/chart2/required/input/verySimpleChart.ods
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document failed!"
+ goto endsub
+ endif
+ '/// Edit / Navigator
+ '/// Select the first OLE object in the tree view of the Navigator
+ '/// Press <RETURN>
+ call fSelectFirstOLE
+ printlog "First OLE selected."
+ '/// Edit / Object / Edit to enter Inplace Mode
+ EditObjectEdit
+ printlog "Edit / Object / Edit executed."
+ '/// Format / Chart Type
+ '/// Check 3D checkbox
+ '/// Close Chart Type dialog
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ else
+ printlog "Chart type converted to 3D."
+ endif
+ '/// Unselect chart using Escape key
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Save document as Microsoft Excel 97/2000/XP Template(.xlt)
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "MS Excel 97 Vorlage/Template" ) then
+ warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFileSaveAsSDC
+'///<u><b>Save the test file as StarCalc 5.0 (.sdc)</b></u>
+ Dim sOutputFile as string
+
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.sdc" )
+
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Convert chart to 3D (just to edit document)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Unselect chart using Escape key
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Save document as StarCalc 5.0 (.sdc)
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "StarCalc 5.0" ) then
+ warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFileSaveAsVOR
+'///<u><b>Save the test file as StarCalc 5.0 Template(.vor)</b></u>
+ Dim sOutputFile as string
+
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.vor" )
+
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Convert chart to 3D (just to edit document)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Unselect chart using Escape key
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Save document as StarCalc 5.0 Template(.vor)
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "StarCalc 5.0 Vorlage/Template" ) then
+ warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFileReload
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Invoke Edit / Object / Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog "Convert chart to 3D (just to edit document)"
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Unselect chart using Escape key"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ sleep (2)
+ printlog "File / Reload"
+ FileReload
+ printlog "MsgBox 'Cancel all changes?' should be visible -> Commit OK"
+ Kontext
+ Active.Yes
+ sleep (2)
+ printlog "Close document ///"
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/chart2/required/includes/ch2_format.inc b/testautomation/chart2/required/includes/ch2_format.inc
new file mode 100755
index 000000000000..42048cbbb7de
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_format.inc
@@ -0,0 +1,1407 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - Menu FORMAT
+'*
+'************************************************************************
+'*
+' #1 tFormatObjectProperties
+' #1 tFormatObjectPropertiesPieChart
+' #1 tFormatPositonAndSize
+' #1 tFormatArrangement
+' #1 tFormatTitleMaintitle
+' #1 tFormatTitleSubtitle
+' #1 tFormatTitleXAxistitle
+' #1 tFormatTitleYAxistitle
+' #1 tFormatTitleZAxistitle
+' #1 tFormatTitleAllTitles
+' #1 tFormatAxisXAxis
+' #1 tFormatAxisYAxis
+' #1 tFormatAxisZAxis
+' #1 tFormatAxisSecondaryXAxis
+' #1 tFormatAxisSecondaryYAxis
+' #1 tFormatAxisAllAxes
+'*
+'\************************************************************************
+
+testcase tFormatObjectProperties
+ Dim iCountTabPg as integer
+
+ iCountTabPg = 0
+
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog "Select chart using navigator"
+ if fSelectFirstOLE = 0 then
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ printlog "Select DataSeries A by toolbar selectorbox"
+ call fChartSelectElement (8)
+ printlog "Open the properties dialog by using the FormatSelection button in the toolbar"
+ FormatSelection.Click
+ printlog "Select tab page Options"
+ Kontext
+ iCountTabPg = Active.GetPageCount
+ if iCountTabPg <> 4 then
+ warnlog "Edit::Properties on a data series should have 4 tab pages but has " & iCountTabPg & "."
+ else
+ printlog "Edit::Properties on a data series has 4 tab pages."
+ endif
+ Active.SetPage TabDataSeriesOptions
+ '/// Check if tab page data series options exists
+ Kontext "TabDataSeriesOptions"
+ call DialogTest ( TabDataSeriesOptions )
+ '/// Check if tab page area exists
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+ '/// Check if tab page transparency exists
+ Kontext
+ Active.SetPage TabTransparency
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+ '/// Check if tab page borders exists
+ Kontext
+ Active.SetPage TabFormatChartBorders
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+ '/// Close dialog with Cancel-button
+ TabFormatChartBorders.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ else
+ warnlog "It was not possible to select the chart object!"
+ endif
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tFormatObjectPropertiesPieChart
+ Dim iCountTabPg as integer
+
+ iCountTabPg = 0
+
+'///<u><b>Dialog test after invoking Format::Object Properties... on a pie chart</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ if fSelectFirstOLE = 0 then
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ '/// Move to third object in Chart using TAB key (data series)
+ Kontext "DocumentChart"
+ '/// Format / Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog"
+ Call hCloseDocument
+ goto endsub
+ endif
+ if fSetChartType("pie") > 0 then
+ warnlog "Something went wrong trying to set the Chart Type to 'Pie'"
+ Call hCloseDocument
+ goto endsub
+ endif
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to leave the dialog with OK"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Move to data series in Chart
+ call fChartSelectElement (5)
+ printlog "Open the properties dialog by using the FormatSelection button in the toolbar"
+ FormatSelection.Click
+ '/// Select tab page Aligment
+ Kontext
+ iCountTabPg = Active.GetPageCount
+ if iCountTabPg <> 4 then
+ warnlog "Edit::Properties on a data series of a pie chart should have 4 tab pages but has " & iCountTabPg & "."
+ else
+ printlog "Edit::Properties on a data series on a pie chart has 4 tab pages."
+ endif
+ Active.SetPage TabChartPieOptions
+ '/// Check if tab page Options exists
+ Kontext "TabChartPieOptions"
+ call DialogTest ( TabChartPieOptions )
+ '/// Close dialog with Cancel-button
+ TabChartPieOptions.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<ESCAPE>"
+ else
+ warnlog "It was not possible to select the chart object!"
+ endif
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatPositonAndSize
+'///<u><b>Dialog test after invoking Format::PositionAndSize</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ '/// Move to first object in Chart using TAB key
+ Kontext "DocumentChart"
+ DocumentChart.TypeKeys "<TAB>"
+ '/// Invoke Format::PositionAndSize
+ FormatPositionAndSizeChart
+ '/// Check if Position and Size dialog exists (single tab page)
+ Kontext "TabPositionAndSize"
+ call DialogTest ( TabPositionAndSize )
+ '/// Close dialog
+ TabPositionAndSize.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatArrangement
+ dim sInputFile as string
+ dim iLoop as integer
+ sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange01.ods")
+ printlog "Open test document gtesttoolpath/chart2/required/input/ch_flexrange01.ods"
+ if fOpenTestDocumentAndInsertChart(sInputFile) then
+ Kontext "ChartType"
+ printlog "Choose the Chart type 'bar' (should be the second in the top-down list)"
+ if fSetChartType( "bar" ) > 0 then
+ warnlog "Something went wrong setting chart type to BAR. Testcase aborted"
+ Kontext "ChartWizard"
+ ChartWizard.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ Kontext "ChartWizard"
+ printlog "Press OK button"
+ ChartWizard.OK
+ Kontext "DocumentChart"
+ printlog "Type twice <TAB> to select a data series to enable the menu entry."
+ DocumentChart.TypeKeys "<TAB>", 2, TRUE
+ Kontext "DocumentCalc"
+ DocumentCalc.UseMenu
+ printlog "Select 'Format' entry in main menu"
+ hMenuSelectNr(5) ' FORMAT
+ printlog "Select 'Arrangement' entry in 'Format'-menu"
+ hMenuSelectNr(3) ' ARRANGEMENT
+ printlog "Select enabled 'Send Backward' entry."
+ hMenuSelectNr(2)
+ Kontext "DocumentCalc"
+ DocumentCalc.UseMenu
+ printlog "Select 'Format' entry in main menu again"
+ hMenuSelectNr(5) ' FORMAT
+ printlog "Select 'Arrangement' entry in 'Format'-menu"
+ hMenuSelectNr(3) ' ARRANGEMENT
+ printlog "Select now enabled 'Bring Forward' entry."
+ hMenuSelectNr(1)
+ printlog "Close document"
+ Call hCloseDocument
+ else
+ warnlog "It was not possible to open the test document."
+ endif
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatTitleMaintitle
+'///<u><b>Dialog test after invoking Format::Title::MainTitle</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Format / Title / Main title
+ FormatTitleMainTitle
+ '/// Goto tab page Borders
+ Kontext
+ Active.SetPage TabFormatChartBorders
+ '/// Check if tab page Borders exists
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+ '/// Goto tab page Area
+ Kontext
+ Active.SetPage TabArea
+ '/// Check if tab page Area exists
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+ '/// Goto tab page Transparency
+ Kontext
+ Active.SetPage TabTransparency
+ '/// Check if tab page Transparency exists
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ '/// Goto tab page Alignment
+ Kontext
+ Active.SetPage TabFormatChartTitleAlignment
+ '/// Check if tab page Alignment exists
+ Kontext "TabFormatChartTitleAlignment"
+ call DialogTest ( TabFormatChartTitleAlignment )
+ '/// Close dialog
+ TabFormatChartTitleAlignment.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatTitleSubtitle
+'///<u><b>Dialog test after invoking Format::Title::Subtitle</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Insert / Title
+ if fInvokeTitlesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertTitleDialog"
+ '/// Set Subtitle
+ if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then
+ warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Title dialog
+ if fCloseTitlesDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Title / Subtitle
+ FormatTitleSubTitle
+ '/// Goto tab page Area
+ Kontext
+ Active.SetPage TabArea
+ '/// Check if tab page Area exists
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ '/// Goto tab page Borders
+ Kontext
+ Active.SetPage TabFormatChartBorders
+ '/// Check if tab page Borders exists
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+ '/// Goto tab page Alignment
+ Kontext
+ Active.SetPage TabFormatChartTitleAlignment
+ '/// Check if tab page Alignment exists
+ Kontext "TabFormatChartTitleAlignment"
+ call DialogTest ( TabFormatChartTitleAlignment )
+ '/// Goto tab page Transparency
+ Kontext
+ Active.SetPage TabTransparency
+ '/// Check if tab page Transparency exists
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ '/// Close dialog with Cancel
+ TabFontEffects.Cancel
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatTitleXAxistitle
+'///<u><b>Dialog test after invoking Format::Title::X Axis Title</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Insert / Title
+ if fInvokeTitlesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertTitleDialog"
+ '/// Set X Axis Title
+ if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then
+ warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Title dialog
+ if fCloseTitlesDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Change Chart type to Column + Line
+ if fSetChartType( "column_line" ) > 0 then
+ warnlog "Something went wrong setting chart type to Column + Line -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Chart Type dialog
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Title / X Axis Title
+ FormatTitleX_Axis
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ '/// Goto tab page Transparency
+ Kontext
+ Active.SetPage TabTransparency
+ '/// Check if tab page Transparency exists
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+ '/// Goto tab page Borders
+ Kontext
+ Active.SetPage TabFormatChartBorders
+ '/// Check if tab page Borders exists
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+ '/// Goto tab page Alignment
+ Kontext
+ Active.SetPage TabFormatChartTitleAlignment
+ '/// Check if tab page Alignment exists
+ Kontext "TabFormatChartTitleAlignment"
+ call DialogTest ( TabFormatChartTitleAlignment )
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ '/// Goto tab page Area
+ Kontext
+ Active.SetPage TabArea
+ '/// Check if tab page Area exists
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+ '/// Close dialog
+ TabArea.Cancel
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatTitleYAxistitle
+'///<u><b>Dialog test after invoking Format::Title::Y Axis Title</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Insert / Title
+ if fInvokeTitlesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertTitleDialog"
+ '/// Set Y Axis Title
+ if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then
+ warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Title dialog
+ if fCloseTitlesDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Change Chart type to STOCK
+ if fSetChartType( "stock" ) > 0 then
+ warnlog "Something went wrong setting chart type to STOCK -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Chart Type dialog
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Title / Y Axis Title
+ FormatTitleY_Axis
+ '/// Goto tab page Transparency
+ Kontext
+ Active.SetPage TabTransparency
+ '/// Check if tab page Transparency exists
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+ '/// Goto tab page Alignment
+ Kontext
+ Active.SetPage TabFormatChartTitleAlignment
+ '/// Check if tab page Alignment exists
+ Kontext "TabFormatChartTitleAlignment"
+ call DialogTest ( TabFormatChartTitleAlignment )
+ '/// Goto tab page Area
+ Kontext
+ Active.SetPage TabArea
+ '/// Check if tab page Area exists
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ '/// Goto tab page Borders
+ Kontext
+ Active.SetPage TabFormatChartBorders
+ '/// Check if tab page Borders exists
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ '/// Close dialog
+ TabFont.Cancel
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatTitleZAxistitle
+'///<u><b>Dialog test after invoking Format::Title::Z Axis Title</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Convert chart to 3D (this will enable all controls in Title dialog)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Insert / Title
+ if fInvokeTitlesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertTitleDialog"
+ '/// Set Z Axis Title
+ if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then
+ warnlog "Something went wrong setting the Z Axis Title -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Title dialog
+ if fCloseTitlesDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Change Chart type to BAR
+ if fSetChartType( "bar" ) > 0 then
+ warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Chart Type dialog
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Invoke Format::Title::Z Axis Title
+ FormatTitleZ_Axis
+ '/// Goto tab page Alignment
+ Kontext
+ Active.SetPage TabFormatChartTitleAlignment
+ '/// Check if tab page Alignment exists
+ Kontext "TabFormatChartTitleAlignment"
+ call DialogTest ( TabFormatChartTitleAlignment )
+ '/// Goto tab page Transparency
+ Kontext
+ Active.SetPage TabTransparency
+ '/// Check if tab page Transparency exists
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ '/// Goto tab page Area
+ Kontext
+ Active.SetPage TabArea
+ '/// Check if tab page Area exists
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ '/// Goto tab page Borders
+ Kontext
+ Active.SetPage TabFormatChartBorders
+ '/// Check if tab page Borders exists
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+ '/// Close dialog
+ TabFormatChartBorders.Cancel
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatTitleAllTitles
+'///<u><b>Dialog test after invoking Format::Title::All Titles</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Convert chart to 3D (this will enable all controls in Title dialog)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Insert / Title
+ if fInvokeTitlesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertTitleDialog"
+ '/// Set All Axis Title
+ if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then
+ warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then
+ warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then
+ warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then
+ warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Title dialog
+ if fCloseTitlesDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Change Chart type to AREA
+ if fSetChartType( "area" ) > 0 then
+ warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Chart Type dialog
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Format / Title / All Titles
+ FormatTitleAllTitles
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ '/// Goto tab page Alignment
+ Kontext
+ Active.SetPage TabFormatChartTitleAlignment
+ '/// Check if tab page Alignment exists
+ Kontext "TabFormatChartTitleAlignment"
+ call DialogTest ( TabFormatChartTitleAlignment )
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ '/// Goto tab page Area
+ Kontext
+ Active.SetPage TabArea
+ '/// Check if tab page Area exists
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+ '/// Goto tab page Borders
+ Kontext
+ Active.SetPage TabFormatChartBorders
+ '/// Check if tab page Borders exists
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+ '/// Goto tab page Transparency
+ Kontext
+ Active.SetPage TabTransparency
+ '/// Check if tab page Transparency exists
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+ '/// Close dialog
+ TabTransparency.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatAxisXAxis
+
+ Dim bAsianLanguage as boolean
+ Dim iCountTabPg as integer
+ iCountTabPg = 0
+
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ sleep(1)
+ printlog "Format / Chart Type"
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Change Chart type to XY (to obtain more tabpages)"
+ if fSetChartType( "xy" ) > 0 then
+ warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Close Chart Type dialog"
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Invoke Format::Axis::X Axis"
+ FormatAxisXAxis
+ printlog "Goto tab page Line"
+ Kontext
+ iCountTabPg = Active.GetPageCount
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "."
+ else
+ printlog "Format::Axis::XAxis has 8 tab pages."
+ endif
+ Active.SetPage TabFormatChartLine
+ printlog "Check if tab page Line exists"
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ printlog "Goto tab page Characters"
+ Kontext
+ Active.SetPage TabFont
+ printlog "Check if tab page Characters exists"
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ printlog "Goto tab page Font Effects"
+ Kontext
+ Active.SetPage TabFontEffects
+ printlog "Check if tab page Font Effects exists"
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ printlog "Goto tab page Label"
+ Kontext
+ Active.SetPage TabChartAxisLabel
+ printlog "Check if tab page Label exists"
+ Kontext "TabChartAxisLabel"
+ call DialogTest ( TabChartAxisLabel )
+ printlog "Goto tab page Scale"
+ Kontext
+ Active.SetPage TabChartAxisScale
+ printlog "Check if tab page Scale exists"
+ Kontext "TabChartAxisScale"
+ call DialogTest ( TabChartAxisScale )
+ Kontext
+ Active.SetPage TabChartAxisPositioning
+ printlog "Check if tab page Positiong exists"
+ Kontext "TabChartAxisPositioning"
+ call DialogTest ( TabChartAxisPositioning )
+ printlog "Goto tab page Numbers"
+ Kontext
+ Active.SetPage TabChartAxisNumbers
+ printlog "Check if tab page Numbers exists"
+ Kontext "TabChartAxisNumbers"
+ call DialogTest ( TabChartAxisNumbers )
+ printlog "Close dialog with cancel"
+ TabChartAxisNumbers.Cancel
+ printlog " Set support for CJK back to default (Tools – Options – Language Support)"
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFormatAxisYAxis
+
+ Dim bAsianLanguage as boolean
+ Dim iCountTabPg as integer
+ Dim iCrossingEntries as integer
+ Dim iCategoryEntries as integer
+ Dim iPlaceLabels as integer
+ Dim iPlaceMarks as integer
+
+ iCountTabPg = 0
+ iCrossingEntries = 0
+ iCategoryEntries = 0
+ iPlaceLabels = 0
+ iPlaceMarks = 0
+
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ sleep(1)
+ printlog "Format / Chart Type"
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Change Chart type to BAR (to obtain more tabpages)"
+ if fSetChartType( "bar" ) > 0 then
+ warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Close Chart Type dialog"
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Invoke Format::Axis::Y Axis"
+ FormatAxisYAxis
+ Kontext
+ iCountTabPg = Active.GetPageCount
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::YAxis should have 8 tab pages but has " & iCountTabPg & "."
+ else
+ printlog "Format::Axis::YAxis has 8 tab pages."
+ endif
+ printlog "Goto tab page Characters"
+ Active.SetPage TabFont
+ printlog "Check if tab page Characters exists"
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ printlog "Goto tab page Line"
+ Kontext
+ Active.SetPage TabFormatChartLine
+ printlog "Check if tab page Line exists"
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ printlog "Goto tab page Label"
+ Kontext
+ Active.SetPage TabChartAxisLabel
+ printlog "Check if tab page Label exists"
+ Kontext "TabChartAxisLabel"
+ call DialogTest ( TabChartAxisLabel )
+ printlog "Goto tab page Font Effects"
+ Kontext
+ Active.SetPage TabFontEffects
+ printlog "Check if tab page Font Effects exists"
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ printlog "Goto tab page Numbers"
+ Kontext
+ Active.SetPage TabChartAxisNumbers
+ printlog "Check if tab page Numbers exists"
+ Kontext "TabChartAxisNumbers"
+ call DialogTest ( TabChartAxisNumbers )
+ printlog "Goto tab page Scale"
+ Kontext
+ Active.SetPage TabChartAxisScale
+ printlog "Check if tab page Scale exists"
+ Kontext "TabChartAxisScale"
+ call DialogTest ( TabChartAxisScale )
+ printlog "Goto tab page Positioning"
+ Kontext
+ Active.SetPage TabChartAxisPositioning
+ printlog "Check if tab page Positioning exists"
+ Kontext "TabChartAxisPositioning"
+ call DialogTest ( TabChartAxisPositioning )
+ iCrossingEntries = CrossOtherAxisAt.GetItemCount
+ if iCrossingEntries <> 3 then
+ warnlog "'Cross other axis at'-listbox sould have three entries but has " & iCrossingEntries & "."
+ else
+ printlog "'Cross other axis at'-listbox has three entries."
+ endif
+ printlog "Check that the first entry in 'Cross other axis at'-listbox is selected."
+ if CrossOtherAxisAt.GetSelIndex <> 1 OR AxisAtCategory.IsVisible then
+ warnlog "The first entry in 'Cross other axis at'-listbox should be selected and the 'Category'-combobox should not be visible."
+ else
+ printlog "Select the third entry (Category) in 'Cross other axis at'-listbox"
+ CrossOtherAxisAt.Select(3)
+ if AxisAtCategory.IsVisible then
+ printlog "The 'Category'-combobox is visible."
+ iCategoryEntries = AxisAtCategory.GetItemCount
+ if iCategoryEntries = 2 then
+ printlog "The 'Category'-combobox should have two entries."
+ else
+ warnlog "The 'Category'-combobox should have two entries but has " & iCategoryEntries & "."
+ endif
+ endif
+ endif
+ iPlaceLabels = PlaceLabels.GetItemCount
+ if iPlaceLabels <> 4 then
+ warnlog "'Place labels'-listbox should have four entries but has " & iPlaceLabels & "."
+ else
+ printlog "'Place labels'-listbox has four entries."
+ if PlaceMarks.IsEnabled then
+ warnlog "'Place marks'-listbox should only enabled if 'Place labels'-listbox has been set to 4th entry."
+ else
+ printlog "Select fourth entry in 'Place labels'-listbox."
+ PlaceLabels.Select(4)
+ if PlaceMarks.IsEnabled then
+ printlog "'Place marks'-listbox is enabled if fourth entry of 'Place labels'-listbox has been selected."
+ iPlaceMarks = PlaceMarks.GetItemCount
+ if iPlaceMarks = 3 then
+ printlog "'Place marks'-listbox has three entries."
+ else
+ warnlog "'Place marks'-listbox has not three entries. It has " & iPlaceMarks & " entries."
+ endif
+ else
+ warnlog "'Place marks'-listbox is not enabled if fourth entry of 'Place labels'-listbox has been selected."
+ endif
+ endif
+ endif
+ Kontext "TabChartAxisPositioning"
+ printlog "Leave dialog with Cancel."
+ TabChartAxisPositioning.Cancel
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFormatAxisZAxis
+'///<u><b>Dialog test after invoking Format::Axis::Z Axis</b></u>
+
+
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Format / Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Change Chart type to AREA (to obtain more tabpages)
+ if fSetChartType( "area" ) > 0 then
+ warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Chart Type dialog
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Convert chart to 3D (this will enable the Z Axis)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+
+ '/// Invoke Format::Axis::Z Axis
+ FormatAxisZAxis
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+
+ '/// Goto tab page Label
+ Kontext
+ Active.SetPage TabChartAxisLabel
+ '/// Check if tab page Label exists
+ Kontext "TabChartAxisLabel"
+ call DialogTest ( TabChartAxisLabel )
+
+ '/// Goto tab page Line
+ Kontext
+ Active.SetPage TabFormatChartLine
+ '/// Check if tab page Line exists
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+
+ '/// Close dialog
+ TabFormatChartLine.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+
+
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFormatAxisSecondaryXAxis
+
+ Dim bAsianLanguage as boolean
+ Dim iCountTabPg as integer
+ iCountTabPg = 0
+
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ sleep(1)
+ printlog "Format / Chart Type"
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Change Chart type to XY (to obtain more tabpages)"
+ if fSetChartType( "xy" ) > 0 then
+ warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Close Chart Type dialog"
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Invoke Insert::Axes"
+ if fInvokeAxesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertAxesDialog"
+ printlog "Check Secondary X Axis Title"
+ if fSetAxis( SecondaryXAxis , TRUE ) > 0 then
+ warnlog "Something went wrong enabling the Secondary X Axis -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Close Axes dialog"
+ if fCloseAxesDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Invoke Format::Axis::Secondary X Axis"
+ FormatAxisSecondaryXAxis
+ printlog "Goto tab page Line"
+ Kontext
+ iCountTabPg = Active.GetPageCount
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "."
+ else
+ printlog "Format::Axis::XAxis has 8 tab pages."
+ endif
+ Active.SetPage TabFormatChartLine
+ printlog "Check if tab page Line exists"
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ printlog "Goto tab page Characters"
+ Kontext
+ Active.SetPage TabFont
+ printlog "Check if tab page Characters exists"
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ printlog "Goto tab page Font Effects"
+ Kontext
+ Active.SetPage TabFontEffects
+ printlog "Check if tab page Font Effects exists"
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ printlog "Goto tab page Label"
+ Kontext
+ Active.SetPage TabChartAxisLabel
+ printlog "Check if tab page Label exists"
+ Kontext "TabChartAxisLabel"
+ call DialogTest ( TabChartAxisLabel )
+ printlog "Goto tab page Scale"
+ Kontext
+ Active.SetPage TabChartAxisScale
+ printlog "Check if tab page Scale exists"
+ Kontext "TabChartAxisScale"
+ call DialogTest ( TabChartAxisScale )
+ Kontext
+ Active.SetPage TabChartAxisPositioning
+ printlog "Check if tab page Positiong exists"
+ Kontext "TabChartAxisPositioning"
+ call DialogTest ( TabChartAxisPositioning )
+ printlog "Goto tab page Numbers"
+ Kontext
+ Active.SetPage TabChartAxisNumbers
+ printlog "Check if tab page Numbers exists"
+ Kontext "TabChartAxisNumbers"
+ call DialogTest ( TabChartAxisNumbers )
+ printlog "Close dialog with cancel"
+ TabChartAxisNumbers.Cancel
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tFormatAxisSecondaryYAxis
+
+ Dim bAsianLanguage as boolean
+ Dim iCountTabPg as integer
+ iCountTabPg = 0
+
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ sleep(1)
+ printlog "Invoke Insert::Axes"
+ if fInvokeAxesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertAxesDialog"
+ printlog "Check Secondary Y Axis"
+ if fSetAxis( SecondaryYAxis , TRUE ) > 0 then
+ warnlog "Something went wrong enabling the Secondary Y Axis -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Leave Axes dialog with OK"
+ if fCloseAxesDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ printlog "Invoke Format::Axis::Secondary Y Axis"
+ FormatAxisSecondaryYAxis
+ printlog "Goto tab page Line"
+ Kontext
+ iCountTabPg = Active.GetPageCount
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "."
+ else
+ printlog "Format::Axis::XAxis has 8 tab pages."
+ endif
+ Active.SetPage TabFormatChartLine
+ printlog "Check if tab page Line exists"
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ printlog "Goto tab page Characters"
+ Kontext
+ Active.SetPage TabFont
+ printlog "Check if tab page Characters exists"
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+ printlog "Goto tab page Font Effects"
+ Kontext
+ Active.SetPage TabFontEffects
+ printlog "Check if tab page Font Effects exists"
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+ printlog "Goto tab page Label"
+ Kontext
+ Active.SetPage TabChartAxisLabel
+ printlog "Check if tab page Label exists"
+ Kontext "TabChartAxisLabel"
+ call DialogTest ( TabChartAxisLabel )
+ printlog "Goto tab page Scale"
+ Kontext
+ Active.SetPage TabChartAxisScale
+ printlog "Check if tab page Scale exists"
+ Kontext "TabChartAxisScale"
+ call DialogTest ( TabChartAxisScale )
+ Kontext
+ Active.SetPage TabChartAxisPositioning
+ printlog "Check if tab page Positiong exists"
+ Kontext "TabChartAxisPositioning"
+ call DialogTest ( TabChartAxisPositioning )
+ printlog "Goto tab page Numbers"
+ Kontext
+ Active.SetPage TabChartAxisNumbers
+ printlog "Check if tab page Numbers exists"
+ Kontext "TabChartAxisNumbers"
+ call DialogTest ( TabChartAxisNumbers )
+ printlog "Close dialog with cancel"
+ TabChartAxisNumbers.Cancel
+ printlog " Set support for CJK back to default (Tools – Options – Language Support)"
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------
+testcase tFormatAxisAllAxes
+'///<u><b>Dialog test after invoking Format::Axis::All Axes</b></u>
+
+
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ sleep(1)
+ '/// Format / Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Change Chart type to NET
+ if fSetChartType( "net" ) > 0 then
+ warnlog "Something went wrong setting chart type to NET -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Chart Type dialog
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Invoke Format::Axis::All Axes
+ FormatAxisAllAxes
+ '/// Goto tab page Characters
+ Kontext
+ Active.SetPage TabFont
+ '/// Check if tab page Characters exists
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+
+ '/// Goto tab page Font Effects
+ Kontext
+ Active.SetPage TabFontEffects
+ '/// Check if tab page Font Effects exists
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+
+ '/// Goto tab page Line
+ Kontext
+ Active.SetPage TabFormatChartLine
+ '/// Check if tab page Line exists
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+
+ '/// Goto tab page Label
+ Kontext
+ Active.SetPage TabChartAxisLabel
+ '/// Check if tab page Label exists
+ Kontext "TabChartAxisLabel"
+ call DialogTest ( TabChartAxisLabel )
+
+ '/// Close dialog
+ TabChartAxisLabel.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+
+
+endcase
+
diff --git a/testautomation/chart2/required/includes/ch2_format1.inc b/testautomation/chart2/required/includes/ch2_format1.inc
new file mode 100755
index 000000000000..dbe1de149c9c
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_format1.inc
@@ -0,0 +1,829 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Continue Chart resource test - Menu FORMAT
+'*
+'************************************************************************
+'*
+' #1 tFormatXAxisMainGrid
+' #1 tFormatYAxisMainGrid
+' #1 tFormatZAxisMainGrid
+' #1 tFormatXAxisMinorGrid
+' #1 tFormatYAxisMinorGrid
+' #1 tFormatZAxisMinorGrid
+' #1 tFormatAllAxesGrids
+' #1 tFormatLegend
+' #1 tFormatChartWall
+' #1 tFormatChartFloor
+' #1 tFormatChartArea
+' #1 tFormatChartType
+' #1 tFormatDataRanges
+' #1 tFormat3DView
+'*
+'\************************************************************************
+
+testcase tFormatXAxisMainGrid
+'///<u><b>Dialog test after invoking Format::Grid::X Axis Main Grid</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Type</li>
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type to STOCK</li>
+ if fSetChartType( "stock" ) > 0 then
+ warnlog "Something went wrong setting chart type to STOCK -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Chart Type dialog</li>
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Insert::Grids</li>
+ if fInvokeGridsDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertGridsDialog"
+ '///+<li>Check Main Grid X Axis</li>
+ if fSetGrid( MainGridXAxis , TRUE ) > 0 then
+ warnlog "Something went wrong enabling Main Grid X Axis -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Grids dialog</li>
+ if fCloseGridsDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::Grid::X Axis Main Grid</li>
+ FormatGridXAxisMainGrid
+ '///+<li>Check if tab-page Line exists</li>
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ '///+<li>Close dialog</li>
+ TabFormatChartLine.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatYAxisMainGrid
+'///<u><b>Dialog test after invoking Format::Grid::Y Axis Main Grid</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Type</li>
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type to AREA</li>
+ if fSetChartType( "area" ) > 0 then
+ warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Chart Type dialog</li>
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::Grid::Y Axis Main Grid</li>
+ FormatGridYAxisMainGrid
+ '///+<li>Check if tab-page Line exists</li>
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ '///+<li>Close dialog</li>
+ TabFormatChartLine.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatZAxisMainGrid
+'///<u><b>Dialog test after invoking Format::Grid::Z Axis Main Grid</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Type</li>
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type to LINE</li>
+ if fSetChartType( "line" ) > 0 then
+ warnlog "Something went wrong setting chart type to LINE -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type Variant to #4 (3D Variant)</li>
+ if fSetChartTypeVariant( 4 ) > 0 then
+ warnlog "Something went wrong selecting 4th chart type variant -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Chart Type dialog</li>
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Insert::Grids</li>
+ if fInvokeGridsDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertGridsDialog"
+ '///+<li>Check Main Grid Z Axis</li>
+ if fSetGrid( MainGridZAxis , TRUE ) > 0 then
+ warnlog "Something went wrong enabling Main Grid X Axis -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Grids dialog</li>
+ if fCloseGridsDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::Grid::Z Axis Main Grid</li>
+ FormatGridZAxisMainGrid
+ '///+<li>Check if tab-page Line exists</li>
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ '///+<li>Close dialog</li>
+ TabFormatChartLine.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatXAxisMinorGrid
+'///<u><b>Dialog test after invoking Format::Grid::X Axis Minor Grid</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ sleep(1)
+ '/// Invoke Format::Chart Type
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Change Chart type to xy chart
+ if fSetChartType( "xy" ) > 0 then
+ warnlog "Something went wrong setting chart type to xy chart -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Chart Type dialog
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Invoke Insert::Grids
+ if fInvokeGridsDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertGridsDialog"
+ '/// Check Minor Grid X Axis
+ if fSetGrid( MinorGridXAxis , TRUE ) > 0 then
+ warnlog "Something went wrong enabling Minor Grid Y Axis -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Close Grids dialog
+ if fCloseGridsDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Invoke Format::Grid::X Axis Minor Grid
+ FormatGridXAxisMinorGrid
+ '/// Check if tab-page Line exists
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ '/// Close dialog
+ TabFormatChartLine.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatYAxisMinorGrid
+'///<u><b>Dialog test after invoking Format::Grid::Y Axis Minor Grid</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Type</li>
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type to NET</li>
+ if fSetChartType( "net" ) > 0 then
+ warnlog "Something went wrong setting chart type to NET -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Chart Type dialog</li>
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Insert::Grids</li>
+ if fInvokeGridsDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertGridsDialog"
+ '///+<li>Check Minor Grid Y Axis</li>
+ if fSetGrid( MinorGridYAxis , TRUE ) > 0 then
+ warnlog "Something went wrong enabling Minor Grid Y Axis -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Grids dialog</li>
+ if fCloseGridsDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::Grid::Y Axis Minor Grid</li>
+ FormatGridYAxisMinorGrid
+ '///+<li>Check if tab-page Line exists</li>
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ '///+<li>Close dialog</li>
+ TabFormatChartLine.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'
+'-------------------------------------------------------------------------------
+'
+testcase tFormatAllAxesGrids
+'///<u><b>Dialog test after invoking Format::Grid::All Grids</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Type</li>
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type to XY</li>
+ if fSetChartType( "xy" ) > 0 then
+ warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type Variant to #4 (3D Variant)</li>
+ if fSetChartTypeVariant( 4 ) > 0 then
+ warnlog "Something went wrong selecting 4th chart type variant -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Chart Type dialog</li>
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::Grid::All Grids</li>
+ FormatGridAllAxisGrids
+ '///+<li>Check if tab-page Line exists</li>
+ Kontext "TabFormatChartLine"
+ call DialogTest ( TabFormatChartLine )
+ '///+<li>Close dialog</li>
+ TabFormatChartLine.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatLegend
+ '///<u><b>Dialog test after invoking Format::Legend</b></u>
+
+ '///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Type</li>
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Change Chart type to PIE</li>
+ if fSetChartType( "pie" ) > 0 then
+ warnlog "Something went wrong setting chart type to PIE -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close Chart Type dialog</li>
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::Legend</li>
+ FormatLegend
+ '///+<li>Goto tab-page Borders</li>
+ Kontext
+ active.SetPage TabFormatChartBorders
+ '///+<li>Check if tab-page Borders exists</li>
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+
+ '///+<li>Goto tab-page Area</li>
+ Kontext
+ active.SetPage TabArea
+ '///+<li>Check if tab-page Area exists</li>
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+
+ '///+<li>Goto tab-page Transparency</li>
+ Kontext
+ active.SetPage TabTransparency
+ '///+<li>Check if tab-page Transparency exists</li>
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+
+ '///+<li>Goto tab-page Characters</li>
+ Kontext
+ active.SetPage TabFont
+ '///+<li>Check if tab-page Characters exists</li>
+ Kontext "TabFont"
+ call DialogTest ( TabFont )
+
+ '///+<li>Goto tab-page Font Effects</li>
+ Kontext
+ active.SetPage TabFontEffects
+ '///+<li>Check if tab-page Font Effects exists</li>
+ Kontext "TabFontEffects"
+ call DialogTest ( TabFontEffects )
+
+ '///+<li>Goto tab-page Position</li>
+ Kontext
+ active.SetPage TabLegendPosition
+ '///+<li>Check if tab-page Alignment exists</li>
+ Kontext "TabLegendPosition"
+ call DialogTest ( TabLegendPosition )
+
+ if gAsianSup = true then
+ Kontext
+ Active.SetPage TabAsianTypography
+ Kontext "TabAsianTypography"
+ call DialogTest ( TabAsianTypography )
+ TabAsianTypography.Cancel
+ else
+ '///+<li>Close dialog</li>
+ TabLegendPosition.Cancel
+ endif
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+ '///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatChartWall
+'///<u><b>Dialog test after invoking Format::Chart Wall</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Wall</li>
+ FormatChartWall
+ '///+<li>Goto tab-page Borders</li>
+ Kontext
+ active.SetPage TabFormatChartBorders
+ '///+<li>Check if tab-page Borders exists</li>
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+
+ '///+<li>Goto tab-page Area</li>
+ Kontext
+ active.SetPage TabArea
+ '///+<li>Check if tab-page Area exists</li>
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+
+ '///+<li>Goto tab-page Transparency</li>
+ Kontext
+ active.SetPage TabTransparency
+ '///+<li>Check if tab-page Transparency exists</li>
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+
+ '///+<li>Close dialog</li>
+ TabTransparency.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatChartFloor
+'///<u><b>Dialog test after invoking Format::Chart Floor</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Convert chart to 3D (this will enable the Chart Floor)</li>
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::Chart Floor</li>
+ FormatChartFloor
+ '///+<li>Goto tab-page Area</li>
+ Kontext
+ active.SetPage TabArea
+ '///+<li>Check if tab-page Area exists</li>
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+
+ '///+<li>Goto tab-page Transparency</li>
+ Kontext
+ active.SetPage TabTransparency
+ '///+<li>Check if tab-page Transparency exists</li>
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+
+ '///+<li>Goto tab-page Borders</li>
+ Kontext
+ active.SetPage TabFormatChartBorders
+ '///+<li>Check if tab-page Borders exists</li>
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+
+ '///+<li>Close dialog</li>
+ TabFormatChartBorders.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatChartArea
+'///<u><b>Dialog test after invoking Format::Chart Area</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Area</li>
+ FormatChartArea
+ '///+<li>Goto tab-page Transparency</li>
+ Kontext
+ active.SetPage TabTransparency
+ '///+<li>Check if tab-page Transparency exists</li>
+ Kontext "TabTransparency"
+ call DialogTest ( TabTransparency )
+
+ '///+<li>Goto tab-page Borders</li>
+ Kontext
+ active.SetPage TabFormatChartBorders
+ '///+<li>Check if tab-page Borders exists</li>
+ Kontext "TabFormatChartBorders"
+ call DialogTest ( TabFormatChartBorders )
+
+ '///+<li>Goto tab-page Area</li>
+ Kontext
+ active.SetPage TabArea
+ '///+<li>Check if tab-page Area exists</li>
+ Kontext "TabArea"
+ call DialogTest ( TabArea )
+
+ '///+<li>Close dialog</li>
+ TabArea.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatChartType
+'///<u><b>Dialog test after invoking Format::Chart Type</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Chart Type</li>
+ FormatChartType
+ '///+<li>Check if Chart Type dialog exists</li>
+ Kontext "ChartType"
+ call DialogTest ( ChartType )
+ '///+<li>Change Chart type to LINE</li>
+ if fSetChartType( "line" ) > 0 then
+ warnlog "Something went wrong setting chart type to LINE -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Smooth Lines Properties</li>
+ if fInvokeSmoothLineProperties() > 0 then
+ warnlog "Something went wrong invoking Smooth Lines Properties -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Check if the Smooth Line Properties dialog exists</li>
+ Kontext "SmoothLineProperties"
+ call DialogTest ( SmoothLineProperties )
+ '///+<li>Close Smooth Lines Properties</li>
+ if fCloseSmoothLinePropertiesOK() > 0 then
+ warnlog "Something went wrong closing Smooth Lines Properties -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Close dialog</li>
+ Kontext "ChartType"
+ ChartType.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormatDataRanges
+'///<u><b>Dialog test after invoking Format::Data Ranges</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Invoke Format::Data Ranges</li>
+ FormatDataRanges
+ '///+<li>Goto tab-page Data Range</li>
+ Kontext
+ active.SetPage TabFormatDataRangesDataRange
+ '///+<li>Check if tab-page Data Range exists</li>
+ Kontext "TabFormatDataRangesDataRange"
+ call DialogTest ( TabFormatDataRangesDataRange )
+ qaErrorLog "Implode dialog using range select button when feature is implemented"
+
+ '///+<li>Goto tab-page Data Series</li>
+ Kontext
+ active.SetPage TabFormatDataRangesDataSeries
+ '///+<li>Check if tab-page Data Series exists</li>
+ Kontext "TabFormatDataRangesDataSeries"
+ call DialogTest ( TabFormatDataRangesDataSeries )
+ MoveDown.Click
+ qaErrorLog "Implode dialog using range select button when feature is implemented"
+
+ '///+<li>Close dialog</li>
+ TabFormatDataRangesDataSeries.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tFormat3DView
+'///<u><b>Dialog test after invoking Format::3D View</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(1)
+ '///+<li>Convert chart to 3D</li>
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke Format::3D View</li>
+ Format3DView
+ '///+<li>Goto tab-page Perspective</li>
+ Kontext
+ active.SetPage TabFormat3DViewGeometry
+ '///+<li>Check if tab-page Perspective exists</li>
+ Kontext "TabFormat3DViewGeometry"
+ call DialogTest ( TabFormat3DViewGeometry )
+
+ '///+<li>Goto tab-page Appearance</li>
+ Kontext
+ active.SetPage TabFormat3DViewAppearance
+ '///+<li>Check if tab-page Appearance exists</li>
+ Kontext "TabFormat3DViewAppearance"
+ call DialogTest ( TabFormat3DViewAppearance )
+
+ '///+<li>Goto tab-page Illumination</li>
+ Kontext
+ active.SetPage TabFormat3DViewIllumination
+ '///+<li>Check if tab-page Illumination exists</li>
+ Kontext "TabFormat3DViewIllumination"
+ call DialogTest ( TabFormat3DViewIllumination )
+ '///+<li>Click Color select button</li>
+ ColorSelect.Click
+ '///+<li>Check if Color dialog exists</li>
+ Kontext "FarbeDLG"
+ call DialogTest ( FarbeDLG )
+ '///+<li>Close dialog</li>
+ FarbeDLG.Cancel
+ Kontext "TabFormat3DViewIllumination"
+
+ '///+<li>Click Ambient Light select button</li>
+ AmbientLightSelect.Click
+ '///+<li>Check if Color dialog exists</li>
+ Kontext "FarbeDLG"
+ call DialogTest ( FarbeDLG )
+ '///+<li>Close dialog</li>
+ FarbeDLG.Cancel
+
+ '///+<li>Close dialog</li>
+ Kontext "TabFormat3DViewIllumination"
+ TabFormat3DViewIllumination.Cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+'
+
diff --git a/testautomation/chart2/required/includes/ch2_insert.inc b/testautomation/chart2/required/includes/ch2_insert.inc
new file mode 100755
index 000000000000..79923a8198c6
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_insert.inc
@@ -0,0 +1,326 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - Menu INSERT
+'*
+'************************************************************************
+'*
+' #1 tInsertTitle
+' #1 tInsertAxes
+' #1 tInsertGrids
+' #1 tInsertLegend
+' #1 tInsertDataLabels
+' #1 tInsertTrendLines
+' #1 tInsertMeanValueLines
+' #1 tInsertYErrorBars
+' #1 tInsertSpecialCharacter
+'*
+'\************************************************************************
+
+testcase tInsertTitle
+'///<u><b>Dialog test after invoking Insert::Title</b></u>
+ '/// Load simple chart document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Convert chart to 3D (this will enable all controls in Titles dialog)
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Invoke Insert::Titles
+ if fInvokeTitlesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke Titles dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Check existence of dialog
+ Kontext "InsertTitleDialog"
+ Call DialogTest ( InsertTitleDialog )
+ '/// Quit dialog using Cancel button
+ InsertTitleDialog.Cancel
+ '/// Close document
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tInsertAxes
+'///<u><b>Dialog test after invocation of Insert::Axes</b></u>
+ '/// Load simple test document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Invoke Insert::Axes
+ if fInvokeAxesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke Axes dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Check existence of dialog
+ Kontext "InsertAxesDialog"
+ Call DialogTest ( InsertAxesDialog )
+ '/// Quit dialog using Cancel button
+ InsertAxesDialog.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tInsertGrids
+'///<u><b>Dialog test after invocation of Insert::Grids</b></u>
+ '/// Load simple test document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Invoke Insert::Grids
+ if fInvokeGridsDialog() > 0 then
+ warnlog "Something went wrong trying to invoke Grids dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Check existence of dialog
+ Kontext "InsertGridsDialog"
+ Call DialogTest ( InsertGridsDialog )
+ '/// Quit dialog using Cancel button
+ InsertGridsDialog.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tInsertLegend
+'///<u><b>Dialog test after invocation of Insert::Legend</b></u>
+ '/// Load simple test document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Invoke Insert::Legend
+ if fInvokeLegendDialog() > 0 then
+ warnlog "Something went wrong trying to invoke Legend dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Check existence of dialog
+ Kontext "InsertLegendDialog"
+ Call DialogTest ( InsertLegendDialog )
+ '/// Quit dialog using Cancel button
+ InsertLegendDialog.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tInsertDataLabels
+'///<u><b>Dialog test after invocation of Insert::Data Labels</b></u>
+ '/// Load simple test document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Invoke Insert::Data Labels
+ if fInvokeDataLabelsDialog() > 0 then
+ warnlog "Something went wrong trying to invoke Labels dialog -> Check this out!"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Check 'Show Value' to enable all controls
+ Kontext "InsertLabelsDialog"
+ if fSetShowValue ( TRUE ) > 0 then
+ warnlog "Something went wrong trying to check 'Show Value' -> Check this out!"
+ endif
+ '/// Check existence of dialog
+ Call DialogTest ( InsertLabelsDialog )
+ '/// Quit dialog using Cancel button
+ InsertLabelsDialog.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tInsertTrendLines
+'///<u><b>Dialog test after invocation of Insert::TrendLines</b></u>
+ '/// Load simple test document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ Kontext "DocumentChart"
+ printlog "Insert TrendLines"
+ InsertTrendlines
+ '/// Check existence of dialog
+ Kontext "InsertTrendlinesDialog"
+ Call DialogTest ( InsertTrendlinesDialog )
+ '/// Quit dialog using Cancel button
+ InsertTrendlinesDialog.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tInsertMeanValueLines
+'///<u><b>Testing Insert::MeanValueLines</b></u>
+ '/// Load simple test document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Insert::MeanValueLines
+ if fInsertMeanValueLines() > 0 then
+ warnlog "Something went wrong trying to insert mean value lines -> Check this out!"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "DocumentChart"
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tInsertYErrorBars
+'///<u><b>Dialog test after invocation of Insert::YErrorBars</b></u>
+ '/// Load simple test document
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using navigator
+ call fSelectFirstOLE
+ '/// Invoke Edit::Object::Edit to enter Inplace Mode
+ EditObjectEdit
+ '/// Invoke Insert::TrendLines
+ if fInvokeInsertYErrorBarsDialog() > 0 then
+ warnlog "Something went wrong trying to invoke YErrorBars Lines dialog -> Check this out!"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '/// Check existence of dialog
+ Kontext "InsertYErrorBarsDLG"
+ Call DialogTest ( InsertYErrorBarsDLG )
+ '/// Quit dialog using Cancel button
+ InsertYErrorBarsDLG.Cancel
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Close document
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------
+'
+testcase tInsertSpecialCharacter
+ printlog "Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Invoke Edit::Object::Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog "Invoke Insert::Titles"
+ if fInvokeTitlesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke Titles dialog -> Check this out! (Previous log may help you)"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "InsertTitleDialog"
+ if fSetTitle(MainTitle , "Test title") = 0 then
+ Kontext "InsertTitleDialog"
+ InsertTitleDialog.OK
+ Kontext "DocumentChart"
+ printlog "Type <TAB> to select the title"
+ DocumentChart.TypeKeys "<TAB>" , TRUE
+ DocumentChart.UseMenu
+ printlog "Select menu 'Insert'"
+ hMenuSelectNr(4) 'INSERT
+ printlog "Select menu item 'Special Character'."
+ hMenuSelectNr(9) 'SPECIAL CHARACTER
+ printlog "Close the 'Insert Special Character'-dialog."
+ Kontext "Sonderzeichen"
+ Call Dialogtest( Sonderzeichen )
+ Sonderzeichen.CANCEL
+ else
+ warnlog "It was not possible to set the title. Test aborted!"
+ Kontext "InsertTitleDialog"
+ InsertTitleDialog.Cancel
+ endif
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/chart2/required/includes/ch2_insert_ctl.inc b/testautomation/chart2/required/includes/ch2_insert_ctl.inc
new file mode 100644
index 000000000000..d01f9f8eee5f
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_insert_ctl.inc
@@ -0,0 +1,488 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - CTL features
+'*
+'************************************************************************
+'*
+' #1 tTitleTextDirection
+' #1 tLegendTextDirection
+' #1 tXAxisTextDirection
+' #1 tDataSeriesTextDirection
+' #1 tEquationTextDirection
+' #1 tDataPointTextDirection
+' #0 sValidateTextDirection
+'*
+'\************************************************************************
+
+testcase tTitleTextDirection
+ Dim bCTLSupBefore as boolean
+
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ else
+ printlog "Load test document and save it local as ../user/work/verySimpleChart.ods"
+ endif
+ printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support"
+ bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE)
+ printlog "Select the first OLE object in the document."
+ call fSelectFirstOLE
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ Kontext "DocumentChart"
+ printlog "Select the Main Title by using the ChartElememtSelectorListBox in the toolbar (4th entry)"
+ call fChartSelectElement (4)
+ printlog "Open the properties dialog by using the FormatSelection button in the toolbar"
+ FormatSelection.Click
+ Kontext
+ printlog "Select the tab page Alignment"
+ Active.SetPage TabFormatChartTitleAlignment
+ Kontext "TabFormatChartTitleAlignment"
+ call DialogTest(TabFormatChartTitleAlignment)
+ sValidateTextDirection(TextDirection)
+ TabFormatChartTitleAlignment.Cancel
+ printlog "Leave the tab page dialog with Cancel"
+ if bCTLSupBefore <> gCTLSup then
+ Call ActiveDeactivateCTLSupport(bCTLSupBefore)
+ printlog "Reset the state of CTL support to the default before this test case has been executed"
+ endif
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tLegendTextDirection
+ Dim bCTLSupBefore as boolean
+
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ else
+ printlog "Load test document and save it local as ../user/work/verySimpleChart.ods"
+ endif
+ printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support"
+ bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE)
+ call fSelectFirstOLE
+ printlog "Select the first OLE object"
+ EditObjectEdit
+ printlog "Edit / Object Edit"
+ printlog "Format / Legend"
+ FormatLegend
+ Kontext
+ printlog "Select the tab page Position"
+ Active.SetPage TabLegendPosition
+ Kontext "TabLegendPosition"
+ call DialogTest(TabLegendPosition)
+ sValidateTextDirection(TextDirection)
+ TabLegendPosition.Cancel
+ if bCTLSupBefore <> gCTLSup then
+ Call ActiveDeactivateCTLSupport(bCTLSupBefore)
+ printlog "Reset the state of CTL support to the default before this test case has been executed"
+ endif
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tXAxisTextDirection
+ Dim bCTLSupBefore as boolean
+
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ else
+ printlog "Load test document and save it local as ../user/work/verySimpleChart.ods"
+ endif
+ printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support"
+ bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE)
+ printlog "Select the first OLE object"
+ call fSelectFirstOLE
+ printlog "Edit / Object Edit"
+ EditObjectEdit
+ printlog "Format / Axis / X Axis"
+ FormatAxisXAxis
+ Kontext
+ printlog "Select the tab page Label"
+ Active.SetPage TabChartAxisLabel
+ Kontext "TabChartAxisLabel"
+ call DialogTest(TabChartAxisLabel)
+ sValidateTextDirection(TextDirection)
+ TabChartAxisLabel.Cancel
+ printlog "Leave the tab dialog with Cancel"
+ if bCTLSupBefore <> gCTLSup then
+ Call ActiveDeactivateCTLSupport(bCTLSupBefore)
+ printlog "Reset the state of CTL support to the default before this test case has been executed"
+ endif
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tDataSeriesTextDirection
+ Dim bCTLSupBefore as boolean
+ Dim oControlToCheck as object
+ Dim oControlToCheck2 as object
+ Dim oControlToCheck3 as object
+ Dim iCombination as integer
+ Dim sText as string
+
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ else
+ printlog "Load test document and save it local as ../user/work/verySimpleChart.ods"
+ endif
+ printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support"
+ bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE)
+ call fSelectFirstOLE
+ printlog "Select the first OLE object"
+ printlog "Edit / Object Edit"
+ EditObjectEdit
+ printlog "Select DataSeries A by toolbar selectorbox"
+ call fChartSelectElement (8)
+ printlog "Insert DataLabels"
+ Kontext "DocumentChart"
+ InsertDataLabels
+ Kontext
+ Active.Setpage TabDataSeriesLabels
+ Kontext "TabDataSeriesLabels"
+ for iCombination = 1 to 7
+ select case iCombination
+ 'Check-box combinations with 1, 2 or 3 enabled check-boxes.
+ case 1 : oControlToCheck = ShowValue
+ sText = "Show value as number"
+ case 2 : oControlToCheck = AsPercentage
+ sText = "Show value as percentage"
+ case 3 : oControlToCheck = ShowLabelText
+ sText = "Show category"
+
+ case 4 : oControlToCheck = ShowValue
+ oControlToCheck2 = AsPercentage
+ sText = "Show value as number and Show value as percentage"
+ case 5 : oControlToCheck = ShowValue
+ oControlToCheck2 = ShowLabelText
+ sText = "Show value as number Show category"
+ case 6 : oControlToCheck2 = AsPercentage
+ oControlToCheck2 = ShowLabelText
+ sText = "Show value as percentage and Show category"
+
+ case 7 : oControlToCheck = ShowValue
+ oControlToCheck2 = AsPercentage
+ oControlToCheck3 = ShowLabelText
+ sText = "Show value as number and Show value as percentage and Show category"
+
+ case else : warnlog "Wrong combination entered. Exiting!"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ end select
+ 'One checked check-box
+ if iCombination > 0 AND iCombination < 4 then
+ if fSetCheckBox(oControlToCheck, TRUE) > 0 then
+ warnlog "Setting check-box '" & sText & "' failed. Exiting test case"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries."
+ sValidateTextDirection(TextDirection)
+ endif
+ endif
+ 'Two checked check-boxes
+ if iCombination > 3 AND iCombination < 7 then
+ if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 then
+ warnlog "Setting check-box '" & sText & "' failed. Exiting test case"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries."
+ sValidateTextDirection(TextDirection)
+ endif
+ if fSetCheckBox(oControlToCheck2, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ endif
+ 'Three checked check-boxes
+ if iCombination = 7 then
+ if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 AND fSetCheckBox(oControlToCheck3, TRUE) > 0 then
+ warnlog "Setting check-box '" & sText & "' failed. Exiting test case"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries."
+ sValidateTextDirection(TextDirection)
+ endif
+ if fSetCheckBox(oControlToCheck2, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ if fSetCheckBox(oControlToCheck3, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ end if
+ if fSetCheckBox(oControlToCheck, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataSeriesLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ next iCombination
+ TabDataSeriesLabels.Cancel
+ if bCTLSupBefore <> gCTLSup then
+ Call ActiveDeactivateCTLSupport(bCTLSupBefore)
+ printlog "Reset the state of CTL support to the default before this test case has been executed"
+ endif
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tEquationTextDirection
+ Dim bCTLSupBefore as boolean
+
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ else
+ printlog "Load test document and save it local as ../user/work/verySimpleChart.ods"
+ endif
+ printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support"
+ bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE)
+ printlog "Select the first OLE object"
+ call fSelectFirstOLE
+ printlog "Edit / Object Edit"
+ EditObjectEdit
+ printlog "Select DataSeries A by toolbar selectorbox"
+ call fChartSelectElement (8)
+ Kontext "DocumentChart"
+ if fInvokeTrendLinesDialog() > 0 then
+ warnlog "Something went wrong trying to invoke Trend Lines dialog -> Check this out!"
+ Call hCloseDocument
+ goto endsub
+ endif
+ Kontext "TabTrendLineType"
+ Call DialogTest(TabTrendLineType)
+ printlog "Select Linear radio-button"
+ Linear.Check
+ printlog "Check Show Equation check-box"
+ ShowEquation.Check
+ printlog "Leave the dialog with OK"
+ TabTrendLineType.OK
+ Kontext "DocumentChart"
+ printlog "Select Equation by toolbar selectorbox"
+ call fChartSelectElement (10)
+ printlog "Format / Object properties"
+ FormatSelection.Click
+ Kontext
+ printlog "Count the numbers of tab pages. It should be 7 in CTL mode."
+ if Active.GetPageCount <> 7 then
+ warnlog "The count of tab pages is not 7, it is " & Active.GetPageCount & "!"
+ endif
+ printlog "Select the Alignment tab page (only available in CTL mode!)"
+ Active.SetPage TabFormatChartTitleAlignment
+ Kontext "TabFormatChartTitleAlignment"
+ Call DialogTest(TabFormatChartTitleAlignment)
+ printlog "Check that the text direction list-box contains 3 entries."
+ sValidateTextDirection(TextDirection2)
+ printlog "Leave the dialog with cancel"
+ TabFormatChartTitleAlignment.Cancel
+ if bCTLSupBefore <> gCTLSup then
+ Call ActiveDeactivateCTLSupport(bCTLSupBefore)
+ printlog "Reset the state of CTL support to the default before this test case has been executed"
+ endif
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+testcase tDataPointTextDirection
+ Dim bCTLSupBefore as boolean
+ Dim oControlToCheck as object
+ Dim oControlToCheck2 as object
+ Dim oControlToCheck3 as object
+ Dim iCombination as integer
+ Dim sText as string
+
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ else
+ printlog "Load test document and save it local as ../user/work/verySimpleChart.ods"
+ endif
+ printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support"
+ bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE)
+ call fSelectFirstOLE
+ printlog "Select the first OLE object"
+ EditObjectEdit
+ printlog "Edit / Object Edit"
+ printlog "Select DataSeries A by toolbar selectorbox"
+ call fChartSelectElement (8)
+ Kontext "DocumentChart"
+ printlog "Press F3-key to enter the data series."
+ DocumentChart.TypeKeys "<F3>"
+ printlog "Insert / DataLabels"
+ InsertDataLabels
+ Kontext
+ Active.Setpage TabDataPointLabels
+ Kontext "TabDataPointLabels"
+ for iCombination = 1 to 7
+ select case iCombination
+ 'Check-box combinations with 1, 2 or 3 enabled check-boxes.
+ case 1 : oControlToCheck = ShowValue
+ sText = "Show value as number"
+ case 2 : oControlToCheck = AsPercentage
+ sText = "Show value as percentage"
+ case 3 : oControlToCheck = ShowLabelText
+ sText = "Show category"
+
+ case 4 : oControlToCheck = ShowValue
+ oControlToCheck2 = AsPercentage
+ sText = "Show value as number and Show value as percentage"
+ case 5 : oControlToCheck = ShowValue
+ oControlToCheck2 = ShowLabelText
+ sText = "Show value as number Show category"
+ case 6 : oControlToCheck2 = AsPercentage
+ oControlToCheck2 = ShowLabelText
+ sText = "Show value as percentage and Show category"
+
+ case 7 : oControlToCheck = ShowValue
+ oControlToCheck2 = AsPercentage
+ oControlToCheck3 = ShowLabelText
+ sText = "Show value as number and Show value as percentage and Show category"
+
+ case else : warnlog "Wrong combination entered. Exiting!"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ end select
+ 'One checked check-box
+ if iCombination > 0 AND iCombination < 4 then
+ if fSetCheckBox(oControlToCheck, TRUE) > 0 then
+ warnlog "Setting check-box '" & sText & "' failed. Exiting test case"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries."
+ sValidateTextDirection(TextDirection)
+ endif
+ endif
+ 'Two checked check-boxes
+ if iCombination > 3 AND iCombination < 7 then
+ if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 then
+ warnlog "Setting check-box '" & sText & "' failed. Exiting test case"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries."
+ sValidateTextDirection(TextDirection)
+ endif
+ if fSetCheckBox(oControlToCheck2, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ endif
+ 'Three checked check-boxes
+ if iCombination = 7 then
+ if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 AND fSetCheckBox(oControlToCheck3, TRUE) > 0 then
+ warnlog "Setting check-box '" & sText & "' failed. Exiting test case"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries."
+ sValidateTextDirection(TextDirection)
+ endif
+ if fSetCheckBox(oControlToCheck2, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ if fSetCheckBox(oControlToCheck3, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ end if
+ if fSetCheckBox(oControlToCheck, FALSE) > 0 then
+ warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case"
+ TabDataPointLabels.Cancel
+ call hCloseDocument
+ goto endsub
+ endif
+ next iCombination
+ TabDataPointLabels.Cancel
+ if bCTLSupBefore <> gCTLSup then
+ Call ActiveDeactivateCTLSupport(bCTLSupBefore)
+ printlog "Reset the state of CTL support to the default before this test case has been executed"
+ endif
+ printlog "File / Close"
+ Call hCloseDocument
+endcase
+'
+'-------------------------------------------------------------------------
+'
+sub sValidateTextDirection (oThisListtBox as OBJECT)
+ Dim iEntries as integer
+ iEntries = 0
+
+ if oThisListtBox.IsEnabled then
+ printlog "Get the count of the list-box entries."
+ iEntries = oThisListtBox.GetItemCount
+ if iEntries <> 3 then
+ warnlog "There are " & iEntries &" and not 3 entries in the text direction list-box!"
+ else
+ printlog "3 entries in the text direction list-box"
+ endif
+ else
+ warnlog "Text direction is not enabled!"
+ endif
+end sub
+
diff --git a/testautomation/chart2/required/includes/ch2_menu.inc b/testautomation/chart2/required/includes/ch2_menu.inc
new file mode 100644
index 000000000000..d7f5efbee3a5
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_menu.inc
@@ -0,0 +1,214 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Resource Test for chart2 main menus
+'*
+'**************************************************************************************************
+'*
+' #1 tMainMenu 'Checking the count of menu entries in each menu
+'*
+'\*************************************************************************************************
+
+testcase tMainMenu
+ dim iCount as integer ' the numbers of the items in the menu.
+
+ dim iMainMenuItemCount as integer
+ iMainMenuItemCount = 21 : if ( gPlatform = "osx" ) then iMainMenuItemCount = 20
+
+ dim iHelpMenuItemCount as integer
+ iHelpMenuItemCount = 5 : if ( gPlatform = "osx" ) then iHelpMenuItemCount = 4
+
+ dim iToolsMenuItemCount as integer
+ iToolsMenuItemCount = 4 : if ( gPlatform = "osx" ) then iToolsMenuItemCount = 3
+ 'Options entry is called Preferences and resides in application MacOS X menu
+
+ printlog "Close all document windows (File / Close)"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ printlog "File / New / Spreadsheet"
+ call hNewDocument
+
+ printlog "insert a Chart Object"
+ if fInsertOLE = FALSE then
+ warnlog "It was not possible to insert a chart as OLE."
+ Call hCloseDocument
+ else
+ Kontext "DocumentCalc"
+ DocumentCalc.UseMenu
+ printlog "check if there are 21 items in the FILE menu."
+ hMenuSelectNr(1) ' FILE
+ iCount = hMenuItemGetCount()
+ if (iCount <> iMainMenuItemCount ) then
+ warnlog "There should be 20 or 21 items in the file menu but there are " + iCount + " items."
+ end if
+ call hMenuClose() ' close the FILE menu
+
+ printlog "check if there are 12 items in the FILE/NEW menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(1) ' FILE
+ hMenuSelectNr(1) ' NEW
+ iCount = hMenuItemGetCount()
+ if (iCount <> 12) then
+ warnlog "There should 12 items in the FILE/NEW menu but there are " + iCount + " items."
+ end if
+ call hMenuClose() ' close the FILE menu
+
+ printlog "check if there are 8 items in the FILE/AUTOPILOT menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(1) ' FILE
+ hMenuSelectNr(4) ' AUTOPILOT
+ iCount = hMenuItemGetCount()
+ if (iCount <> 8) then
+ warnlog "There should 8 items in the FILE/AUTOPILOTS menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 5 items in the EDIT menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(2)
+ iCount = hMenuItemGetCount()
+ if (iCount <> 5) then
+ warnlog "There should 5 items in the edit menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 4 items in the VIEW menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(3)
+ iCount = hMenuItemGetCount()
+ if (iCount <> 4) then
+ warnlog "There should 4 items in the view menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 5 items in the VIEW/TOOLBAR menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(3) ' VIEW
+ hMenuSelectNr(1) ' TOOLBAR
+ iCount = hMenuItemGetCount()
+ if (iCount <> 5) then
+ warnlog "There should 5 items in the VIEW/TOOLBAR menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 9 items in the INSERT menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(4) 'INSERT
+ iCount = hMenuItemGetCount()
+ if (iCount <> 9) then
+ warnlog "There should 9 items in the INSERT menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 13 items in the FORMAT menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(5) ' FORMAT
+ iCount = hMenuItemGetCount()
+ if (iCount <> 13) then
+ warnlog "There should 13 items in the FORMAT menu but there are " + iCount + " items."
+ end if
+
+ printlog "check if there are 2 items in the FORMAT/ARRANGEMENT menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(5) ' FORMAT
+ hMenuSelectNr(3) ' ARRANGEMENT
+ iCount = hMenuItemGetCount()
+ if (iCount <> 2) then
+ warnlog "There should 2 items in the FORMAT/ARRANGEMENT menu but there are " + iCount + " items."
+ end if
+
+ printlog "check if there are 6 items in the FORMAT/AXIS menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(5) ' FORMAT
+ hMenuSelectNr(6) ' AXIS
+ iCount = hMenuItemGetCount()
+ if (iCount <> 6) then
+ warnlog "There should 6 items in the FORMAT/AXIS menu but there are " + iCount + " items."
+ end if
+
+ printlog "check if there are 7 items in the FORMAT/GRID menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(5) ' FORMAT
+ hMenuSelectNr(7) ' GRID
+ iCount = hMenuItemGetCount()
+ if (iCount <> 7) then
+ warnlog "There should 7 items in the FORMAT/GRID menu but there are " + iCount + " items."
+ end if
+
+ printlog "check if there are 6 items in the FORMAT/Title menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(5) ' FORMAT
+ hMenuSelectNr(4) ' TITLE
+ iCount = hMenuItemGetCount()
+ if (iCount <> 8) then
+ warnlog "There should 8 items in the FORMAT/Title menu but there are " + iCount + " items."
+ end if
+
+ printlog "check if there are " + iToolsMenuItemCount + " items in the TOOLS menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(6)
+ iCount = hMenuItemGetCount()
+ if (iCount <> iToolsMenuItemCount) then
+ warnlog "There should " + iToolsMenuItemCount + " items in the tools menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 4 items in the TOOLS/MACRO menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(6)
+ hMenuSelectNr(1)
+ iCount = hMenuItemGetCount()
+ if (iCount <> 4) then
+ warnlog "There should 4 items in the TOOLS/MACRO menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 5 items in the WINDOW menu."
+ DocumentCalc.UseMenu
+ hMenuSelectNr(7)
+ iCount = hMenuItemGetCount()
+ if (iCount <> 5) then
+ warnlog "There should 5 items in the WINDOW menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+
+ printlog "check if there are 5 or 6 items in the HELP menu. Depends on if it's a patched version"
+ DocumentCalc.UseMenu
+ hMenuSelectNr(8)
+ iCount = hMenuItemGetCount()
+ if (iCount <> ( iHelpMenuItemCount + 1 ) AND iCount <> iHelpMenuItemCount ) then
+ warnlog "There should 5 OR 6 items in the HELP menu but there are " + iCount + " items."
+ end if
+ call hMenuClose()
+ call hCloseDocument
+ end if
+endcase
+
+
diff --git a/testautomation/chart2/required/includes/ch2_ole.inc b/testautomation/chart2/required/includes/ch2_ole.inc
new file mode 100755
index 000000000000..6daf6545de41
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_ole.inc
@@ -0,0 +1,137 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - section FILE
+'*
+'************************************************************************
+'*
+' #1 tChartOLE
+'*
+'\************************************************************************
+
+testcase tChartOLE ( sCurrentApplication as STRING )
+'///<u><b>Chart as OLE in all applicable applications</b></u>
+ dim sOutputFile as STRING
+ dim bCommitDialog as boolean
+ dim bStatusOfAgent as boolean
+
+ bStatusOfAgent = FALSE
+
+ select case sCurrentApplication
+ case ("CALC") : bCommitDialog = TRUE
+ case else : bCommitDialog = FALSE
+ end select
+ printlog("Chart as OLE in " & sCurrentApplication)
+ gApplication = sCurrentApplication
+
+ '/// Open new document
+ Call hNewDocument
+ '/// Disabling the Help Agent if enabled.
+ ToolsOptions
+ hToolsOptions ( "StarOffice", "General" )
+ Kontext "TabSonstigesAllgemein"
+ if Aktivieren.IsChecked then
+ bStatusOfAgent = TRUE
+ printlog "HelpAgent was enabled. Disabling"
+ Aktivieren.Uncheck
+ else
+ printlog "HelpAgent wasn't enabled."
+ end if
+ Kontext "ToolsOptionsDlg"
+ ToolsOptionsDlg.OK
+ '/// Insert default chart
+ InsertChart
+ sleep(2)
+ if bCommitDialog then
+ Kontext "ChartWizard"
+ ChartWizard.OK
+ sleep(2)
+ endif
+ '/// Save file
+ select case ucase(sCurrentApplication)
+ case ("CALC") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".ods" )
+ case ("IMPRESS") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odp" )
+ case ("DRAW") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odg" )
+ case ("WRITER") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odt" )
+ case ("MASTERDOCUMENT") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odm" )
+ case ("HTML") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".html" )
+ case else : warnlog "The modul " & sCurrentApplication & " is not supported in this test case!"
+ Call hCloseDocument
+ goto endsub
+ end select
+ if hFileSaveAsKill(sOutputFile) then
+ printlog "OK, successfully saved the test document!"
+ else
+ warnlog "Saving the test document failed!"
+ endif
+ sleep(2)
+ '/// Leave implace mode in Spreadsheet, Draw and Impress ...
+ '/// ... and then select Chart OLE (Green handles)
+ select case ucase(sCurrentApplication)
+ case ("CALC") : Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call fSelectFirstOLE
+ case ("IMPRESS") : call gMouseclick (99,99)
+ call gMouseclick (50,50)
+ case ("DRAW") : call gMouseclick (99,99)
+ call gMouseclick (50,50)
+ case ("WRITER") : call gMouseclick (99,99)
+ call gMouseclick (50,50)
+ Call fSelectFirstOLE
+ case ("MASTERDOCUMENT") : call gMouseclick (99,99)
+ case ("HTML") : call gMouseclick (99,99)
+ call gMouseclick (50,50)
+ Call fSelectFirstOLE
+ case else : warnlog "The modul " & sCurrentApplication & " is not supported in this test case!"
+ Call hCloseDocument
+ goto endsub
+ end select
+ '/// Try if Edit::Object:Edit works for chart OLE
+ try
+ EditObjectEdit
+ sleep(2)
+ printlog "Edit::Object::Edit seems to work"
+ catch
+ warnlog "Edit::Object::Edit seems to fail."
+ endcatch
+
+ if bStatusOfAgent then
+ '/// Enabling the HelpAgent if it was enabled at the beginning.
+ ToolsOptions
+ hToolsOptions ( "StarOffice", "General" )
+ Kontext "TabSonstigesAllgemein"
+ Aktivieren.Check
+ Kontext "ToolsOptionsDlg"
+ ToolsOptionsDlg.OK
+ end if
+ '/// Close document
+ Call hCloseDocument
+ gApplication = "CALC"
+endcase
+
diff --git a/testautomation/chart2/required/includes/ch2_toolbars.inc b/testautomation/chart2/required/includes/ch2_toolbars.inc
new file mode 100755
index 000000000000..32eed54ee370
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_toolbars.inc
@@ -0,0 +1,168 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - section toolbars
+'*
+'************************************************************************
+'*
+' #1 tDrawBar
+'*
+'\************************************************************************
+
+testcase tDrawBar
+
+ printlog " Load simple chart document"
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ printlog " Select chart using navigator"
+ call fSelectFirstOLE
+ printlog " Invoke Edit::Object::Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog " Verify that the drawbar is visible"
+ Kontext "DrawBar"
+
+ qaerrorlog "#i107003# disabled because of bug in toolbars"
+' if Not DrawBar.Exists then
+' Call hToolbarSelect("Drawing", true)
+' endif
+
+ printlog " Check if all items on drawbar are available"
+ if DrawBar.GetItemCount <> 16 then
+ warnlog "There are " & DrawBar.GetItemCount & " instead of 16 items on drawbar"
+ endif
+ printlog " Click on every button on the Drawingbar"
+ Auswahl.click
+ Linie.click
+ LineArrowEnd.click
+ Rechteck.click
+ Ellipse.click
+ Freihand.click
+ Textobjekt.click
+ Legende.click
+ BasicShapes.click
+ SymbolShapes.click
+ BlockArrows.click
+ Flowcharts.click
+ Callouts.click
+ Stars.click
+ printlog " Open menubutton BasicShapes"
+ BasicShapes.TearOff
+ Kontext "BasicShapes"
+ printlog " Check that there are 25 BasicShapes"
+ if BasicShapes.GetItemCount <> 25 then
+ warnlog "There are " & BasicShapes.GetItemCount & " instead of 25 BasicShapes"
+ endif
+ BasicShapes.close
+ Kontext "DrawBar"
+ printlog " Open menubutton SymbolShapes"
+ SymbolShapes.TearOff
+ Kontext "SymbolShapes"
+ printlog " Check that there are 20 SymbolShapes"
+ if SymbolShapes.GetItemCount <> 20 then
+ warnlog "There are " & SymbolShapes.GetItemCount & " instead of 25 SymbolShapes"
+ endif
+ SymbolShapes.close
+ Kontext "DrawBar"
+ printlog " Open menubutton BlockArrows"
+ BlockArrows.TearOff
+ Kontext "ArrowShapes"
+ printlog " Check that there are 30 ArrowShapes"
+ if ArrowShapes.GetItemCount <> 30 then
+ warnlog "There are " & ArrowShapes.GetItemCount & " instead of 25 ArrowShapes"
+ endif
+ ArrowShapes.close
+ Kontext "DrawBar"
+ printlog " Open menubutton Flowcharts"
+ Flowcharts.TearOff
+ Kontext "Flowchart"
+ printlog " Check that there are 32 FlowChartShapes"
+ if Flowchart.GetItemCount <> 32 then
+ warnlog "There are " & Flowchart.GetItemCount & " instead of 32 Flowchartshapes"
+ endif
+ Flowchart.close
+ Kontext "DrawBar"
+ printlog " Open menubutton Callouts"
+ Callouts.TearOff
+ Kontext "Callouts"
+ printlog " Check that there are 7 Callouts"
+ if Callouts.GetItemCount <> 7 then
+ warnlog "There are " & Callouts.GetItemCount & " instead of 7 Callouts"
+ endif
+ Callouts.close
+ Kontext "DrawBar"
+ printlog " Open menubutton Stars"
+ Stars.TearOff
+ Kontext "Starshapes"
+ printlog " Check that there are 13 StarShapes"
+ if Starshapes.GetItemCount <> 13 then
+ warnlog "There are " & Starshapes.GetItemCount & " instead of 13 StarShapes"
+ endif
+ Starshapes.close
+ printlog " Insert a shape to the chart by <STRG-RETURN>"
+ Kontext "DrawBar"
+ sleep (1)
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<TAB>",TRUE
+ DrawBar.typekeys "<MOD1 RETURN>",TRUE
+ printlog " Rename inserted shape"
+ Kontext "DocumentChart"
+ DocumentChart.OpenContextMenu
+ sleep (1)
+ hMenuSelectNr (6)
+ sleep (1)
+ Kontext "NameDlgObject"
+ NameField.SetText "ChartShape1"
+ NameDlgObject.OK
+ printlog " Leave Chart"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ printlog "Invoke Edit::Object::Edit to enter Inplace Mode"
+ EditObjectEdit
+ printlog " Check if shape is still there"
+ Kontext "DocumentChart"
+ DocumentChart.typekeys "<SHIFT TAB>",TRUE
+ Sleep (1)
+ Kontext "Toolbar"
+ if ChartElementSelector.GetSelText <> "ChartShape1" then
+ warnlog "Something is wrong with the shape"
+ endif
+ printlog " Leave Chart"
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ printlog " Close document"
+ Call hCloseDocument
+
+endcase
+
diff --git a/testautomation/chart2/required/includes/ch2_view.inc b/testautomation/chart2/required/includes/ch2_view.inc
new file mode 100755
index 000000000000..39beac14839c
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_view.inc
@@ -0,0 +1,182 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - Menu VIEW
+'*
+'************************************************************************
+'*
+' #1 tViewToolbars
+' #1 tViewToolbarsCustomize
+' #1 tViewFullScreen
+'*
+'\************************************************************************
+
+testcase tViewToolbars
+ '///<u><b>Check invocation of View::Toolbars::*</b></u>
+ '/// Load simple chart document and save it in user's work dorectory
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '/// Select chart using the navigator
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ EditObjectEdit
+ '/// Convert chart to 3D
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ else
+ printlog "Converting chart into 3D was successful."
+ endif
+ Kontext "Standardbar"
+ if Standardbar.Exists then
+ '/// View / Toolbars / Standard
+ ViewToolbarsStandard
+ Kontext "Standardbar"
+ '/// Verifying that the toolbar 'Standard' is disabled
+ if Standardbar.Exists then
+ QAErrorLog "#i72537 - Disabling 'Standard' toolbar does not work."
+ Call hCloseDocument
+ goto endsub
+ else
+ '/// Enabling the toolbar again
+ ViewToolbarsStandard
+ end if
+ else
+ warnlog "'Standard' toolbar was not visible by default as expected!"
+ end if
+ Kontext "Toolbar"
+ if Toolbar.Exists then
+ '/// View / Toolbars / Formatting
+ ViewToolbarsTools
+ Kontext "Toolbar"
+ '/// Verifying that the toolbar 'Formatting' is disabled
+ if Toolbar.Exists then
+ QAErrorLog "#i72537 - Disabling 'Formatting' toolbar does not work."
+ Call hCloseDocument
+ goto endsub
+ else
+ '/// Enabling the toolbar again
+ ViewToolbarsTools
+ end if
+ else
+ warnlog "'Standard' toolbar was not visible by default as expected!"
+ end if
+ '/// Close document
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------
+
+testcase tViewToolbarsCustomize
+'///<u><b>Check Dialog after invocation of View::Toolbars::Customize</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ '///+<li>Invoke View::Toolbars::Customize</li>
+ ViewToolbarsCustomize
+ '///+<li>Change to Menus tab-page</li>
+ Kontext
+ Active.SetPage TabCustomizeMenu
+ '///+<li>Check existence of dialog</li>
+ Call DialogTest ( TabCustomizeMenu )
+ '///+<li>Change to Keyboard tab-page</li>
+ Kontext
+ Active.SetPage TabTastatur
+ '///+<li>Check existence of dialog</li>
+ Call DialogTest ( TabTastatur )
+ '///+<li>Change to Toolbars tab-page</li>
+ Kontext
+ Active.SetPage TabCustomizeToolbars
+ '///+<li>Check existence of dialog</li>
+ Call DialogTest ( TabCustomizeToolbars )
+ '///+<li>Change to Events tab-page</li>
+ Kontext
+ Active.SetPage TabCustomizeEvents
+ '///+<li>Check existence of dialog</li>
+ Call DialogTest ( TabCustomizeEvents )
+ '///+<li>Quit dialog</li>
+ TabCustomizeEvents.cancel
+ '///+<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'-------------------------------------------------------------
+testcase tViewFullScreen
+'///<u><b>Check invocation of View::Fullscren</b></u>
+
+'///<ul>
+ '///+<li>Load simple chart document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ '///+<li>Convert chart to 3D (this probably makes the test more risky)</li>
+ if NOT fConvertChartTo3D() then
+ warnlog "Conversion of chart to 3D failed -> Quit testcase"
+ Call hCloseDocument
+ goto endsub
+ endif
+ '///+<li>Invoke View::Fullscren</li>
+ ViewFullScreen
+ '///+<li>Quit fullscreen using CTRL+SHIFT+J</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Mod1 Shift J>"
+ sleep (2)
+ '///+<li>Enter fullscreen using CTRL+SHIFT+J</li>
+ DocumentCalc.TypeKeys "<Mod1 Shift J>"
+ '///+<li>Quit fullscreen using View::Fullscren</li>
+ ViewFullScreen
+ '///<li>Close document</li>
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ Call hCloseDocument
+'///</ul>
+
+endcase
+'
+'-----------------------------------------------------------
+'
diff --git a/testautomation/chart2/required/includes/ch2_window.inc b/testautomation/chart2/required/includes/ch2_window.inc
new file mode 100755
index 000000000000..407898e228d1
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_window.inc
@@ -0,0 +1,63 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart resource test - Menu WINDOW
+'*
+'************************************************************************
+'*
+' #1 tWindowNewWindowAndClose
+'*
+'\************************************************************************
+
+testcase tWindowNewWindowAndClose
+'///<u><b>Test Window::New Window and Window::Close Window</b></u>
+
+'///<ul>
+ '///+<li>Load simple test document</li>
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document seems to have failed -> Check this out!"
+ goto endsub
+ endif
+ '///+<li>Select chart using navigator</li>
+ call fSelectFirstOLE
+ '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li>
+ EditObjectEdit
+ sleep(2)
+ '///+<li>Invoke Window::New Window</li>
+ WindowNewWindow
+ '///+<li>Invoke Window::Close Window</li>
+ WindowCloseWindow
+
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '///+<li>Close document</li>///
+ Call hCloseDocument
+'///</ul>
+endcase
+
diff --git a/testautomation/chart2/required/includes/ch2_wizard.inc b/testautomation/chart2/required/includes/ch2_wizard.inc
new file mode 100755
index 000000000000..df97ba6bda43
--- /dev/null
+++ b/testautomation/chart2/required/includes/ch2_wizard.inc
@@ -0,0 +1,86 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Create new Chart using the Wizard
+'*
+'************************************************************************
+'*
+' #1 tCreateNewChart
+'*
+'\************************************************************************
+
+testcase tCreateNewChart
+'///<u><b>Test creation of new chart using the Chart Wizard</b></u>
+ dim sInputFile as string
+ dim sOutputFile as string
+ sInputFile = convertpath ( gtesttoolpath & "chart2/required/input/spreadsheetFile.ods" )
+ sOutputFile = convertpath ( gOfficepath & "user/work/spreadsheetFile.ods" )
+
+ '/// Load test document <i>gTesttoolPath</i>/chart2/required/input/spreadsheetFile.ods
+ call hFileOpen(sInputFile)
+ sleep(2)
+ '/// Save the document local <i>gOfficepath</i>user/work/spreadsheetFile[.ods]
+ if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ endif
+ '/// Insert / Chart
+ InsertChart
+ sleep(5)
+ Kontext "ChartWizard"
+ Call DialogTest ( ChartWizard )
+ '/// In the Chart wizard switch to the <i>Chart Type</i> page
+ Kontext "ChartType"
+ Call DialogTest ( ChartType )
+ '/// Switch to the <i>Data Range</i> page using <DOWN>-key
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataRange"
+ Call DialogTest ( TabChartTypeDataRange )
+ '/// Switch to the <i>Data Series</i> page using <i>Next >></i> button
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeDataSeries"
+ Call DialogTest ( TabChartTypeDataSeries )
+ '/// Switch to the <i>Chart Elements</i> page using <i>Next >></i> button
+ Kontext "ChartWizard"
+ GoNext.Click
+ Kontext "TabChartTypeChartElements"
+ Call DialogTest ( TabChartTypeChartElements )
+ '/// Create Chart using <i>Finish</i> button
+ Kontext "ChartWizard"
+ ChartWizard.OK
+ sleep(2)
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<Escape>"
+ '/// Close document
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/chart2/required/input/basetable.sdc b/testautomation/chart2/required/input/basetable.sdc
new file mode 100755
index 000000000000..82da646843d4
--- /dev/null
+++ b/testautomation/chart2/required/input/basetable.sdc
Binary files differ
diff --git a/testautomation/chart2/required/input/basetable.sxc b/testautomation/chart2/required/input/basetable.sxc
new file mode 100755
index 000000000000..cc42891cf6c6
--- /dev/null
+++ b/testautomation/chart2/required/input/basetable.sxc
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange01.ods b/testautomation/chart2/required/input/ch_flexrange01.ods
new file mode 100755
index 000000000000..71bb586bb925
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange01.ods
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange02.ods b/testautomation/chart2/required/input/ch_flexrange02.ods
new file mode 100755
index 000000000000..e0121839998d
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange02.ods
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange03.ods b/testautomation/chart2/required/input/ch_flexrange03.ods
new file mode 100755
index 000000000000..8c60082f143c
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange03.ods
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange04.ods b/testautomation/chart2/required/input/ch_flexrange04.ods
new file mode 100755
index 000000000000..57562d9ba8f6
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange04.ods
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange05.odt b/testautomation/chart2/required/input/ch_flexrange05.odt
new file mode 100755
index 000000000000..9c753580640e
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange05.odt
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange06.odt b/testautomation/chart2/required/input/ch_flexrange06.odt
new file mode 100755
index 000000000000..04d164a4754c
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange06.odt
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange07.odt b/testautomation/chart2/required/input/ch_flexrange07.odt
new file mode 100755
index 000000000000..03206d618ad4
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange07.odt
Binary files differ
diff --git a/testautomation/chart2/required/input/ch_flexrange08.odt b/testautomation/chart2/required/input/ch_flexrange08.odt
new file mode 100755
index 000000000000..cb02ee9efa2b
--- /dev/null
+++ b/testautomation/chart2/required/input/ch_flexrange08.odt
Binary files differ
diff --git a/testautomation/chart2/required/input/spreadsheetFile.ods b/testautomation/chart2/required/input/spreadsheetFile.ods
new file mode 100755
index 000000000000..904b55bb5535
--- /dev/null
+++ b/testautomation/chart2/required/input/spreadsheetFile.ods
Binary files differ
diff --git a/testautomation/chart2/required/input/verySimpleChart.ods b/testautomation/chart2/required/input/verySimpleChart.ods
new file mode 100755
index 000000000000..50cb116a1b4a
--- /dev/null
+++ b/testautomation/chart2/required/input/verySimpleChart.ods
Binary files differ
diff --git a/testautomation/chart2/tools/ch_tools_axes.inc b/testautomation/chart2/tools/ch_tools_axes.inc
new file mode 100644
index 000000000000..ef897fbc345f
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_axes.inc
@@ -0,0 +1,193 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Library for automation of the 'Insert::Axes...' dialog
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeAxesDialog
+' #1 fCloseAxesDialogOK
+' #1 fSetAxis
+'*
+'\************************************************************************************************
+
+' Return codes (for all functions):
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 to 9: A functional problem occured.
+' Error 11 to 19: Wrong marginal conditions end up in Failure, e.g. control not visible.
+' Note: Following errors can be used for negative testing.
+' Error 42: Wrong input. Probably only of interest during test development.
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' Attention:
+' Only error 42 and error 99 throw 'warnlogs'.
+' All other errors are silent.
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors <b>must</b> exclusivly be handled by the calling routine.
+'
+'--------------------------------------------------------------------
+'
+function fInvokeAxesDialog() as INTEGER
+ fInvokeAxesDialog = 99
+' Function to invoke the 'Insert::Axes...' dialog
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to invoke the dialog
+' 2 := Failure (Dialog not present after invocation)
+'99 := Unexpected error
+
+ printlog "** Invoking 'Insert::Axes...' in menu"
+ '/// Execute menu item 'Insert::Axes...'
+ try
+ InsertAxes
+ catch
+ qaErrorLog "Error 1: Invoking menu item 'Insert::Axes...' failed"
+ fInvokeAxesDialog = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext "InsertAxesDialog"
+ if InsertAxesDialog.exists(2) then
+ printlog ">> Axes dialog is visible now."
+ fInvokeAxesDialog = 0
+ else
+ qaErrorLog "Error 2: OOPS, calling the slot 'InsertAxes' didn't cause any problem ..."
+ qaErrorLog "..., BUT the dialog doesn't seem to be visible"
+ fInvokeAxesDialog = 2
+ endif
+
+ if fInvokeAxesDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseAxesDialogOK() as INTEGER
+ fCloseAxesDialogOK = 99
+' Function to close the Axes dialog using OK button
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the dialog
+' 2 := Failure (Dialog present after applying OK button)
+'15 := Dialog not present before closing
+'99 := Unexpected error
+ printlog "** Closing Axes dialog"
+ Kontext "InsertAxesDialog"
+ '/// Check existence of Axes dialog
+ if InsertAxesDialog.exists(2) then
+ printlog ">> Axes dialog is visible as expected."
+ else
+ ' Return Error 15 and quit if dialog not found
+ qaErrorLog "Error 15: OOPS, Axes dialog should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseAxesDialogOK = 15
+ exit function
+ endif
+ '/// Click OK button in Axes dialog
+ try
+ InsertAxesDialog.OK
+ catch
+ qaErrorLog "Error 1: Closing the Axes dialog seems to have a serious problem -> Check this out!"
+ fCloseAxesDialogOK = 1
+ exit function
+ endcatch
+ '/// Check that Axes dialog is not visible anymore
+ Kontext "InsertAxesDialog"
+ if InsertAxesDialog.exists(2) then
+ ' Return Error 2 if still present
+ qaErrorLog "Error 2: Axes dialog should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseAxesDialogOK = 2
+ else
+ printlog ">> Closing the Axes dialog seems to work as expected"
+ fCloseAxesDialogOK = 0
+ endif
+
+ if fCloseAxesDialogOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetAxis ( oAxis as OBJECT , bAxisCheck as BOOLEAN ) as INTEGER
+ fSetAxis = 99
+' Function to check-boxes in Axes dialog
+' Input:
+' OBJECT oAxis
+' Axis Indicator (Name of declaration): Major[XYZ]Axis, Secondary[XY]Axis are valid names
+' BOOLEAN bAxisCheck
+' TRUE := Check Axis
+' FALSE := Uncheck Axis
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to check axis
+' 2 := Axis was not set
+'12 := Check-box for desired axis is not enabled
+'99 := Unexpected error
+ printlog "** Setting axis"
+ '/// Check if desired axis check-box is enabled
+ if NOT oAxis.IsEnabled then
+ qaErrorLog "Error 12: Check-box for desired axis is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetAxis = 12
+ exit function
+ endif
+ '/// Try to (Un)Check desired axis
+ Kontext "InsertAxesDialog"
+ try
+ if bAxisCheck then
+ oAxis.Check
+ else
+ oAxis.UnCheck
+ endif
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Check axis seems to cause a serious problem -> Check this out!"
+ fSetAxis = 1
+ exit function
+ endcatch
+ '/// Verify (against input) if axis was checked
+ if oAxis.IsChecked = bAxisCheck then
+ fSetAxis = 0
+ printlog ">> Chech axis seems to work"
+ else
+ qaErrorLog "Error 2: Axis was not checked -> Check this out!"
+ fSetAxis = 2
+ endif
+
+ if fSetAxis = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_chart_type.inc b/testautomation/chart2/tools/ch_tools_chart_type.inc
new file mode 100644
index 000000000000..7cf0a1e7d61b
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_chart_type.inc
@@ -0,0 +1,641 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for chart type dialog
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeChartTypeDialog
+' #1 fCloseChartTypeDialogOK
+' #1 fSetChartType
+' #1 fSetChartTypeVariant
+' #1 fSetChartType3D
+' #1 fSetChartLook3D
+' #1 fSetChartShape3D
+' #1 fSetStackSeries
+' #1 fSetSmoothLines
+' #1 fInvokeSmoothLineProperties
+' #1 fCloseSmoothLinePropertiesOK
+'*
+'\************************************************************************************************
+
+' ch_tools_chart_type.inc - A library for automation of the Chart Type dialog
+' This Include contains a set of functions to modify the controls of the chart type dialog.
+' All functions are designed to return error-codes depending on the behaviour of the action applied.
+' Return codes:
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 TO 9: A functional problem occured.
+' Error 11 TO 19: Wrong marginal conditions end up in failure, e.g. control not visible.
+'
+' NOTE: Following errors can also be used for 'negative' testing.
+' Error 42: Wrong input. Probably only of interest during test development.
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' ATTENTION:
+' Only Errors 42 and 99 throw 'warnlogs'
+' All other errors are silent.
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors MUST exclusivly be handled by the calling routine!
+'
+'-------------------------------------------------------------------------
+'
+function fInvokeChartTypeDialog() as INTEGER
+ fInvokeChartTypeDialog = 99
+' Function to invoke the 'Format::Chart Type...' dialog
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to invoke the dialog
+' 2 := Failure (Dialog not present after invocation)
+' 99 := Unexpected error
+
+ printlog "** Invoking 'Format::Chart Type' in menu"
+ '/// Execute menu item 'Format::Chart type'
+ try
+ FormatChartType
+ catch
+ qaErrorLog "Error 1: Invoking menu item 'Format::Chart Type' failed"
+ fInvokeChartTypeDialog = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext "ChartType"
+ if ChartType.exists(2) then
+ printlog ">> 'Chart Type' dialog is visible now."
+ fInvokeChartTypeDialog = 0
+ else
+ qaErrorLog "Error 2: OOPS, calling the slot 'FormatChartType' didn't cause any problem ..."
+ qaErrorLog "..., BUT the dialog doesn't seem to be visible"
+ fInvokeChartTypeDialog = 2
+ endif
+
+ if fInvokeChartTypeDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseChartTypeDialogOK() as INTEGER
+ fCloseChartTypeDialogOK = 99
+' Function to close the 'Chart Type' dialog using OK button
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the dialog
+' 2 := Failure (Dialog present after applying OK button)
+' 15 := Dialog not present before closing
+' 99 := Unexpected error
+
+ printlog "** Closing 'Chart Type' dialog"
+ Kontext "ChartType"
+ '/// Check existence of Chart Type(Wizard) dialog
+ if ChartType.exists(2) then
+ printlog ">> 'Chart Type' dialog is visible as expected."
+ else
+ '-> Return Error 15 and quit if dialog not found
+ qaErrorLog "Error 15: OOPS, 'Chart Type' dialog should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseChartTypeDialogOK = 15
+ exit function
+ endif
+ try
+ '/// Click on OK
+ ChartType.OK
+ printlog "Chart Type dialog has been successfull closed with OK button."
+ catch
+ qaErrorLog "Error 1: Closing the 'Chart Type' dialog seems to have a serious problem -> Check this out!"
+ fCloseChartTypeDialogOK = 1
+ exit function
+ endcatch
+ '/// Check if the Chart Type(Wizard) dialog gone
+ if ChartType.Exists(2) then
+ '-> Return Error 2 if still present
+ qaErrorLog "Error 2: 'Chart Type' dialog should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseChartTypeDialogOK = 2
+ else
+ printlog ">> Closing the 'Chart Type' dialog seems to work as expected"
+ fCloseChartTypeDialogOK = 0
+ endif
+
+ if fCloseChartTypeDialogOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetChartType ( sChartType as STRING ) as INTEGER
+ 'Function to choose a chart type in 'Chart Type' dialog
+ fSetChartType = 99
+
+ ' Input: STRING sChartType (English UI name of chart type to select)
+ ' column
+ ' bar
+ ' pie
+ ' area
+ ' line
+ ' xy
+ ' bubble
+ ' net
+ ' stock
+ ' column_line
+ ' Output (Error-codes)
+ ' 0 = Sucess
+ ' 1 = Serious problem trying to select chart type
+ ' 2 = Failure (wrong chart type selected)
+ ' 42 = User error, unknown chart type
+ ' 99 = Unexpected error
+
+ dim iEntryInList as INTEGER
+
+ printlog "** Selecting the chart type"
+ ' Translate UI string to positon in control 'ChooseType'
+ select case lCase ( sChartType )
+ case "column" : iEntryInList = 1
+ case "bar" : iEntryInList = 2
+ case "pie" : iEntryInList = 3
+ case "area" : iEntryInList = 4
+ case "line" : iEntryInList = 5
+ case "xy" : iEntryInList = 6
+ case "bubble" : iEntryInList = 7
+ case "net" : iEntryInList = 8
+ case "stock" : iEntryInList = 9
+ case "column_line" : iEntryInList = 10
+ case else
+ fSetChartType = 42
+ warnlog "USER ERROR: Input doesn't match!"
+ exit function
+ end select
+ Kontext "ChartType"
+ '/// Select chart type
+ try
+ ChooseType.Select ( iEntryInList )
+ catch
+ qaErrorLog "Error 1: Selecting the chart type seems to cause a serious problem -> Check this out!"
+ fSetChartType = 1
+ exit function
+ endcatch
+ '/// Check if entry was selected
+ if ChooseType.GetSelText = ChooseType.GetItemText ( iEntryInList ) then
+ printlog ">> The desired chart type was selected."
+ fSetChartType = 0
+ else
+ ' Throw Error 2 if selection fails
+ qaErrorLog "Error 2: Selecting the desired chart type seems to fail -> Check this out!"
+ fSetChartType = 2
+ endif
+
+ if fSetChartType = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetChartTypeVariant ( iChartTypeVariant as INTEGER ) as INTEGER
+ ' Function to select the chart type variant
+ ' Input: INTEGER iChartTypeVariant (Position in variant control)
+ ' Posible Values are 1,2,3,4 (depending on the chart type)
+ ' Output (Error-codes)
+ ' 0 = Sucess
+ ' 1 = Serious problem while selecting the variant control
+ ' 42 = User error, input out of range
+ ' 99 = Unexpected error
+
+ fSetChartTypeVariant = 99
+
+ dim iMaximumVariant as INTEGER
+ dim iChartTpye as INTEGER
+
+ Kontext "ChartType"
+ ' Lookup valid input range for variant depending on chart type
+ iChartTpye = ChooseType.getSelIndex
+
+ select case iChartTpye
+ case 1, 2 :
+ if Look3D.isChecked then
+ iMaximumVariant = 4
+ else
+ iMaximumVariant = 3
+ endif
+ case 7 : iMaximumVariant = 1
+ case 4 : iMaximumVariant = 3
+ case 3, 5, 6, 8 ,9 : iMaximumVariant = 4
+ case 10 : iMaximumVariant = 2
+ end select
+
+ ' Check if input matches this range
+ if (iChartTypeVariant < 1) OR (iChartTypeVariant > iMaximumVariant) then
+ fSetChartTypeVariant = 42
+ warnlog "USER ERROR: Input doesn't match!"
+ exit function
+ endif
+
+ printlog " Selecting the chart type variant"
+ '/// Select the chart variant
+ Kontext "ChartType"
+ try
+ variant.typeKeys "<HOME>"
+ variant.typeKeys "<RIGHT>", (iChartTypeVariant - 1)
+ fSetChartTypeVariant = 0
+ printlog "Selecting the chart variant probably worked"
+ catch
+ ' Throw error 1 and quit on serious problem
+ QAErrorLog "Error 1: Selecting variant seems to cause a serious problem -> Check this out!"
+ fSetChartTypeVariant = 1
+ exit function
+ endcatch
+
+ if fSetChartTypeVariant = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetChartType3D ( bEnable3D as BOOLEAN ) as INTEGER
+ fSetChartType3D = 99
+' Function to select the 3D option
+' Input:
+' BOOLEAN bEnable3D:
+' Enable (TRUE) or Disable (FALSE) 3D chart.
+' Returns error-code:
+' 0 = Sucess
+' 1 = Serious problem while (de)selecting 3D check-box
+' 11 = 3D control not visible
+' 12 = 3D control not enabled
+' 99 = Unexpected error.
+ printlog "Selecting the chart 3D feature"
+ 'Check visibility of 3D check-box
+ Kontext "ChartType"
+ if NOT Look3D.isVisible then
+ QAErrorLog "Error 11: 3D check box has to be visible to check it."
+ fSetChartType3D = 11
+ exit function
+ endif
+ '/// Check if 3D check-box is enabled
+ if NOT Look3D.isEnabled then
+ qaErrorLog "Error 12: 3D check box has to be enabled to check it."
+ fSetChartType3D = 12
+ exit function
+ endif
+ '/// (Un)Check 3D check-box
+ try
+ if bEnable3D then
+ Look3D.Check
+ else
+ Look3D.unCheck
+ endif
+ fSetChartType3D = 0
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: (Un)Checking the 3D check box seems to cause a serious issue -> Check this out!"
+ fSetChartType3D = 1
+ exit function
+ endcatch
+
+ if fSetChartType3D = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetChartLook3D ( sSetLook as STRING ) as INTEGER
+ fSetChartLook3D = 99
+' Function to select the 3D look///
+' Input: STRING sSetLook (English UI name of 3D look)
+' simple
+' realistic
+' Returns error-code:
+' 0 = Sucess
+' 1 = Serious problem while selecting 3D look
+' 12 = 3D look not enabled
+' 42 = User error, input doesn't match
+' 99 = Unexpected error
+ dim iEntryInList as INTEGER
+ ' Translate SIMPLE or REALISTIC to item no. in list-box
+ select case lcase(sSetLook)
+ case "simple" : iEntryInList = 1
+ printlog "Selecting the chart 3D look 'simple' (default)"
+ case "realistic" : iEntryInList = 2
+ printlog "Selecting the chart 3D look 'realistic'"
+ case else
+ fSetChartLook3D = 42
+ warnlog "USER ERROR: Input doesn't match!"
+ exit function
+ end select
+ '/// Check if 3D look list-box is enabled
+ if NOT Scheme3D.isEnabled then
+ QAErrorLog "Error 12: 3D check box has to be checked to set 3D look ..."
+ QAErrorLog "... BUG or Script problem -> Check this out!"
+ fSetChartLook3D = 12
+ exit function
+ endif
+ '/// Select desired item in list-box
+ try
+ Scheme3D.Select ( iEntryInList )
+ fSetChartLook3D = 0
+ printlog "Selecting the chart 3D scheme seems to work."
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Selecting the 3D look seems to cause a serious issue -> Check this out!"
+ fSetChartLook3D = 1
+ exit function
+ endcatch
+
+ if fSetChartLook3D = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetChartShape3D ( sSetShape as STRING ) as INTEGER
+ fSetChartShape3D = 99
+' Function to select the 3D shape///
+' Input: STRING sSetShape (English UI name of shape)
+' box
+' cylinder
+' cone
+' pyramid
+' Returns (Error-codes):
+' 0 = Sucess
+' 1 = Serious problem while selecting 3D shape
+' 11 = 3D look not visible
+' 12 = 3D look not enabled
+' 42 = User error, input doesn't match
+' 99 = Unexpected error
+
+ dim iEntryInList as INTEGER
+ ' Translate shape UI name to item no. in list-box
+ select case lcase ( sSetShape )
+ case "box" : iEntryInList = 1
+ case "cylinder" : iEntryInList = 2
+ case "cone" : iEntryInList = 3
+ case "pyramid" : iEntryInList = 4
+ case else
+ fSetChartShape3D = 42
+ warnlog "USER ERROR: Input doesn't match!"
+ exit function
+ end select
+ printlog "Selecting the chart 3D shape"
+ '/// Check if shape list-box is visible
+ if NOT BarColumnShape.isVisible then
+ QAErrorLog "Error 11: List box has to be visible to select 3D shape ..."
+ fSetChartShape3D = 11
+ exit function
+ endif
+ '/// Check if shape list-box is enabled
+ if NOT BarColumnShape.isEnabled then
+ QAErrorLog "Error 12: List box has to be enabled to select 3D shape ..."
+ fSetChartShape3D = 12
+ exit function
+ endif
+ '/// Select desired entry in list-box
+ try
+ BarColumnShape.Select ( iEntryInList )
+ fSetChartShape3D = 0
+ printlog "Selecting the chart 3D shape seems to work."
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Selecting the 3D shape seems to cause a serious issue -> Check this out!"
+ fSetChartShape3D = 1
+ exit function
+ endcatch
+
+ if fSetChartShape3D = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetStackSeries ( sStackMode as STRING ) as INTEGER
+ fSetStackSeries = 99
+ ' Function to adjust data stacking feature///
+ ' Input:
+ ' STRING sStackMode:
+ ' Select stack mode using three controls
+ ' <i>disable - Uncheck 'Stack Series' check-box
+ ' <i>ontop - Check 'Stack Series' check-box and check 'On Top' radio button
+ ' <i>percent - Check 'Stack Series' check-box and check 'Percent' radio button
+ ' Returns error-code:
+ ' 0 := Sucess.
+ ' 1 := Serious problem while selecting stack mode.
+ ' 11 := 'Stack Series' not visible
+ ' 42 := User error, input doesn't match.
+ ' 99 := Unexpected error.
+
+ printlog ""
+ printlog "** Selecting the Stack Series Option"
+ '/// Check visibility of 'Stack Series'
+ if NOT StackSeries.isVisible then
+ qaErrorLog "Error 11: 'Stack Series' check-box has to be visible to set this feature"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetStackSeries = 11
+ exit function
+ endif
+ '/// Select desired control combination
+ try
+ select case lcase ( sStackMode )
+ case "disable"
+ StackSeries.Uncheck
+ case "ontop"
+ StackSeries.Check
+ OnTop.Check
+ case "percent"
+ StackSeries.Check
+ Percent.Check
+ case else
+ fSetStackSeries = 42
+ warnlog "USER ERROR: Input doesn't match!"
+ exit function
+ end select
+ fSetStackSeries = 0
+ printlog ">> Selecting the 'Stack Series' mode seems to work."
+ catch
+ ' Throw error 1 and quit on serious problem///
+ qaErrorLog "Error 1: Selecting the 'Stack Series' mode seems to cause a serious issue -> Check this out!"
+ fSetStackSeries = 1
+ exit function
+ endcatch
+
+ if fSetStackSeries = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+'
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetSmoothLines ( bEnableSmoothLines as BOOLEAN ) as INTEGER
+ fSetSmoothLines = 99
+ ' Function to adjust smooth lines feature
+ ' Input:
+ ' BOOLEAN bEnableSmoothLines:
+ ' Enable (TRUE), Disable (FALSE)'Smooth Lines'
+ ' Returns error-code:
+ ' 0 := Sucess.
+ ' 1 := Serious problem while Enabling/Disable 'Smooth Lines.
+ ' 11 := 'Smooth lines' not visible
+ ' 42 := User error, input doesn't match.
+ ' 99 := Unexpected error.
+
+ printlog ""
+ printlog "** Selecting the Smooth Lines Option"
+ '/// Check if 'Smooth Lines' check-box is visible
+ if NOT SmoothLines.isVisible then
+ qaErrorLog "Error 11: 'Smooth Lines' check-box has to be visible to set this feature"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetSmoothLines = 11
+ exit function
+ endif
+ '/// (Un)Check 'Smooth Lines' check-box
+ try
+ if bEnableSmoothLines then
+ SmoothLines.Check
+ else
+ SmoothLines.UnCheck
+ endif
+ fSetSmoothLines = 0
+ printlog ">> (Un)Selecting the 'Smooth Lines' seems to work."
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: (Un)Selecting 'Smooth Lines' seems to cause a serious issue -> Check this out!"
+ fSetSmoothLines = 1
+ exit function
+ endcatch
+
+ if fSetSmoothLines = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fInvokeSmoothLineProperties() as INTEGER
+ fInvokeSmoothLineProperties = 99
+' Click 'Smooth Lines' button to invoke 'Smooth Lines Properties' dialog///
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to invoke the dialog
+' 2 := Failure (Dialog not present after invocation)
+' 11 := 'Smooth Lines' button isn't visible
+' 99 := Unexpected error
+
+ printlog ""
+ printlog "** Set the Smooth Line Properties"
+ '/// Check if 'Smooth Lines' button is visible
+ if NOT SmoothLineProperties.isVisible then
+ qaErrorLog "Error 11: 'Smooth Lines Properties' button has to be visible to open the dialog ..."
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fInvokeSmoothLineProperties = 11
+ exit function
+ endif
+ '/// Click 'Smooth Lines' button
+ try
+ SmoothLineProperties.Click
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Opening 'Smooth Lines Properties' seems to cause a serious issue -> Check this out!"
+ fInvokeSmoothLineProperties = 1
+ exit function
+ endcatch
+ '/// Check if 'Smooth Lines Properties' dialog exists
+ Kontext "SmoothLineProperties"
+ if SmoothLineProperties.exists(1) then
+ printlog ">> OK, found 'Smooth Lines Properties' dialog"
+ fInvokeSmoothLineProperties = 0
+ else
+ ' Throw error 2 and quit if opening dialog failed
+ qaErrorLog "Error 2: Click 'Smooth Lines Properties' button seems to have no effect -> Check this out!"
+ fInvokeSmoothLineProperties = 2
+ exit function
+ endif
+
+ if fInvokeSmoothLineProperties = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseSmoothLinePropertiesOK() as INTEGER
+ fCloseSmoothLinePropertiesOK = 99
+' Function to close the 'Smooth Lines Properties' dialog using OK button///
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the dialog
+' 2 := Failure (Dialog present after applying OK button)
+' 3 := 'Smooth Lines' check-box isn't checked after closing the dialog
+' 99 := Unexpected error
+
+ printlog "** Closing the 'Smooth Line Properties' dialog"
+ '/// Closing the 'Smooth Line Properties' dialog using OK button
+ Kontext "SmoothLineProperties"
+ try
+ SmoothLineProperties.OK
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Closing the 'Smooth Line Properties' dialog seems to cause a serious issue -> Check this out!"
+ fCloseSmoothLinePropertiesOK = 1
+ exit function
+ endcatch
+ '/// Check if 'Smooth Lines Properties' dialog does not exist
+ Kontext "SmoothLineProperties"
+ if SmoothLineProperties.exists(1) then
+ ' Throw error 2 and quit if closing dialog failed
+ qaErrorLog "Error 2: Click 'Smooth Lines Properties' OK button seems to have no effect -> Check this out!"
+ fCloseSmoothLinePropertiesOK = 2
+ exit function
+ else
+ printlog ">> OK, closing the 'Smooth Line Properties' dialog seems to work"
+ endif
+ '/// Check if 'Smooth Lines' check-box is checked
+ Kontext "ChartType"
+ if SmoothLines.IsChecked then
+ printlog ">> OK, after adjusting 'Smooth Line Properties' dialog 'Smooth Lines' check-box should always be visible!"
+ fCloseSmoothLinePropertiesOK = 0
+ else
+ ' Throw error 3 'Smooth Lines' check-box is NOT checked
+ qaErrorLog "Error 3: After adjusting 'Smooth Line Properties' dialog the 'Smooth Lines' check-box should have been visible! -> Check this out!"
+ fCloseSmoothLinePropertiesOK = 3
+ endif
+
+ if fCloseSmoothLinePropertiesOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_common.inc b/testautomation/chart2/tools/ch_tools_common.inc
new file mode 100644
index 000000000000..f6d722fa2a25
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_common.inc
@@ -0,0 +1,212 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Chart2 Tool library
+'*
+'\************************************************************************************************
+
+sub fInsertOLE() as boolean
+
+ ' Insert an OLE object (the name is localized)
+ call GetOleDefaultNames()
+
+ '/// Insert / Object / OLE
+ InsertObjectOLEObject
+
+ Kontext "OLEObjektEinfuegen"
+ if ( OLEObjektEinfuegen.exists( 1 ) ) then
+
+ if ( Objekttyp.getItemcount() = 0 ) then
+
+ warnlog( "fInsertOLE(): There are no OLE-Objects in the <Objekttyp> listbox" )
+ OLEObjektEinfuegen.cancel()
+ fInsertOLE() = false
+
+ else
+
+ try
+ Objekttyp.Select gOLEChart
+ OLEObjektEinfuegen.ok()
+ sleep( 2 )
+ fInsertOLE() = true
+ catch
+ warnlog( "fInsertOLE(): Invalid OLE Object selected: " & gOLEChart )
+ OLEObjektEinfuegen.cancel()
+ fInsertOLE() = false
+ endcatch
+
+ endif
+
+ else
+ warnlog( "fInsertOLE(): Failed to open <Insert OLE object> dialog" )
+ fInsertOLE() = false
+ endif
+
+end sub
+'
+'--------------------------------------------------------------------
+'
+function fLoadVerySimpleChart() as INTEGER
+ fLoadVerySimpleChart = 99
+ 'Load file with a very simple chart
+ 'No Input
+ 'Returns error-code:
+ '+ 0 := Sucess
+ '+ 1 := Serious problem trying to load the document
+ '+99 := Unexpected error
+
+ dim sInputFile as string
+ sInputFile = convertpath( gtesttoolpath & "chart2/required/input/verySimpleChart.ods" )
+ '/// Load file <i>gTesttoolpath</i>/chart2/required/input/verySimpleChart.ods
+ try
+ call hFileOpen ( sInputFile )
+ printlog "File with very simple chart loaded"
+ fLoadVerySimpleChart = 0
+ catch
+ qaErrorLog "Loading file with very simple chart seems to fail"
+ fLoadVerySimpleChart = 1
+ endcatch
+end function
+'
+'--------------------------------------------------------------------
+'
+function fLoadVerySimpleChartAndSaveLocal() as INTEGER
+ fLoadVerySimpleChartAndSaveLocal = 99
+ 'Load file with a very simple chart and save it loacally
+ 'No Input
+ 'Returns error-code:
+ '+ 0 := Sucess
+ '+ 1 := Serious problem trying to load the document
+ '+ 2 := Serious problem trying to save the document
+
+ dim iCheckIsFileLoaded as INTEGER
+ dim sOutputFile as STRING
+ sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.ods" )
+ iCheckIsFileLoaded = fLoadVerySimpleChart()
+ if iCheckIsFileLoaded > 0 then
+ 'When loading fails pass error code to current function
+ fLoadVerySimpleChartAndSaveLocal = iCheckIsFileLoaded
+ exit function
+ else
+ printlog "File with very simple chart loaded successfully."
+ endif
+ '/// Save document local
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "<ESCAPE>"
+ DocumentCalc.TypeKeys "<MOD1 HOME>"
+ if NOT hFileSaveAsKill (sOutputFile) then
+ fLoadVerySimpleChartAndSaveLocal = 2
+ qaErrorLog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ exit function
+ else
+ printlog "File with very simple chart saved successfully."
+ endif
+ fLoadVerySimpleChartAndSaveLocal = 0
+end function
+'
+'--------------------------------------------------------------------
+'
+function fConvertChartTo3D() as BOOLEAN
+ fConvertChartTo3D = FALSE
+ 'Function to invoke the 'Insert::Titles...' dialog
+ 'No Input
+ 'Returns TRUE on success
+
+ '/// Invoke Format::Chart Type...
+ if fInvokeChartTypeDialog() > 0 then
+ warnlog "Invoking 'Format::Chart Type...' seems to cause an Error"
+ exit function
+ endif
+ '/// Check 3D box
+ if fSetChartType3D ( TRUE ) = 0 then
+ fConvertChartTo3D = TRUE
+ else
+ warnlog "Converting chart to 3D seems to cause an Error"
+ exit function
+ endif
+ '/// Close Chart Type dialog with OK
+ if fCloseChartTypeDialogOK() > 0 then
+ warnlog "Closing Chart Type dialog seems to cause an Error"
+ fConvertChartTo3D = FALSE
+ endif
+end function
+'
+'-------------------------------------------------------------------------
+'
+function fOpenTestDocumentAndSelectDataRange(sInputFile as string) as BOOLEAN
+ fOpenTestDocumentAndSelectDataRange = FALSE
+ call hFileOpen(sInputFile)
+ sleep(2)
+ Call sMakeReadOnlyDocumentEditable()
+ '/// Select chart using navigator
+ printlog "Select chart using navigator"
+ call fSelectFirstOLE
+ '/// Edit / Object / Edit
+ printlog "Edit / Object / Edit"
+ EditObjectEdit
+ '///Open FORMAT / DATA RANGES
+ printlog "Open FORMAT / DATA RANGES"
+ FormatDataRanges
+ WaitSlot()
+ '///Switch to tabpage Data Range
+ printlog "Switch to tabpage Data Range"
+ Kontext
+ 'Switching tabpages as workaround for #i77237#
+ Active.SetPage TabChartTypeDataSeries
+ QAErrorLog "#i77237#-Testtool can't access OK after switching tabpage"
+ Active.SetPage TabChartTypeDataRange
+ Kontext "TabChartTypeDataRange"
+ call DialogTest ( TabChartTypeDataRange )
+ fOpenTestDocumentAndSelectDataRange = TRUE
+end function
+'
+'-------------------------------------------------------------------------
+'
+function fOpenTestDocumentAndInsertChart(sInputFile as string) as BOOLEAN
+ fOpenTestDocumentAndInsertChart = FALSE
+ call hFileOpen(sInputFile)
+ sleep(2)
+ Call sMakeReadOnlyDocumentEditable()
+ Kontext "DocumentCalc"
+ printlog "Type <STRG+HOME>"
+ DocumentCalc.TypeKeys "<MOD1 HOME>"
+ printlog "Type twice <RIGHT> cursor key"
+ DocumentCalc.TypeKeys "<RIGHT>" , 2
+ printlog "Type thrice <DOWN> cursor key"
+ DocumentCalc.TypeKeys "<DOWN>" , 3
+ printlog "Menu Insert chart to open chart wizard"
+ InsertChart
+ try
+ WaitSlot()
+ fOpenTestDocumentAndInsertChart = TRUE
+ catch
+ fOpenTestDocumentAndInsertChart = FALSE
+ endcatch
+end function
diff --git a/testautomation/chart2/tools/ch_tools_data_labels.inc b/testautomation/chart2/tools/ch_tools_data_labels.inc
new file mode 100644
index 000000000000..879ddae59361
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_data_labels.inc
@@ -0,0 +1,369 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for Data Labels dialog
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeDataLabelsDialog
+' #1 fCloseDataLabelsDialogOK
+' #1 fSetShowValue
+' #1 fSetValueType
+' #1 fSetShowLabelText
+' #1 fSetShowLegendIconWithLabel
+'*
+'\************************************************************************************************
+
+'ch_tools_data_labels.inc - Library for automation of the 'Insert::Data Labels...' dialog
+'This Include contains a set of functions to modify the controls of the Data Labels dialog.
+'All functions are designed to return error-codes depending on the behaviour of the action applied.
+'Return codes:
+'Error 0: Success.
+'Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+'Error 2 TO 9: A functional problem occured.
+'Error 11 TO 19: Wrong marginal conditions end up in Failure, e.g. control not visible.
+'NOTE: This errors can also be used for 'negative' testing.
+'Error 42: Wrong input. Probably only of interest during test development .
+'Error 99: Unexpected behaviour - Shouldn't normally occur.
+'ATTENTION:
+'Only Errors 42 and 99 throw 'Warnlogs'.
+'All other errors are silent!
+'They only throw QAErrorlogs the give a hint what probably went wrong.
+'Expected Errors MUST exclusivly be handled by the calling routine!
+'
+'--------------------------------------------------------------------
+'
+function fInvokeDataLabelsDialog() as INTEGER
+ fInvokeDataLabelsDialog = 99
+'///<u><b>Function to invoke the 'Insert::Data Labels...' dialog</b></u>///
+'///No Input
+'///Returns error-code:
+'///+ 0 := Sucess
+'///+ 1 := Serious problem trying to invoke the dialog
+'///+ 2 := Failure (Dialog not present after invocation)
+'///+99 := Unexpected error
+
+'///<u><b>Step-by-Step</b></u>///
+'///<ul>
+ printlog ""
+ printlog "** Invoking 'Insert::Data Labels...' in menu"
+ '///+<li>Execute menu item 'Insert::Data Labels...'</li>///
+ try
+ InsertDataLabels
+ catch
+ qaErrorLog "Error 1: Invoking menu item 'Insert::Data Labels...' failed"
+ fInvokeDataLabelsDialog = 1
+ exit function
+ endcatch
+
+ '///+<li>Lookup if call was successful</li>///
+ Kontext "InsertLabelsDialog"
+ if InsertLabelsDialog.exists(2) then
+ printlog ">> Data Labels dialog is visible now."
+ fInvokeDataLabelsDialog = 0
+ else
+ qaErrorLog "Error 2: OOPS, calling the slot 'InsertDataLabels' didn't cause any problem ..."
+ qaErrorLog "..., BUT the dialog doesn't seem to be visible"
+ fInvokeDataLabelsDialog = 2
+ endif
+
+ if fInvokeDataLabelsDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+'///</ul>
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseDataLabelsDialogOK() as INTEGER
+ fCloseDataLabelsDialogOK = 99
+'///<u><b>Function to close the Data Labels dialog using OK button</b></u>///
+'///No Input
+'///Returns error-code:
+'///+ 0 := Sucess
+'///+ 1 := Serious problem trying to Close the dialog
+'///+ 2 := Failure (Dialog present after applying OK button)
+'///+15 := Dialog not present before closing
+'///+99 := Unexpected error
+
+'///<u><b>Step-by-Step</b></u>///
+'///<ul>
+ printlog " "
+ printlog "** Closing Data Labels dialog"
+ Kontext "InsertLabelsDialog"
+ '///+<li>Check existence of Data Labels dialog</li>///
+ if InsertLabelsDialog.exists(2) then
+ printlog ">> Data Labels dialog is visible as expected."
+ else
+ '///+<li>-> Return Error 15 and quit if dialog not found</li>///
+ qaErrorLog "Error 15: OOPS, Data Labels dialog should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseDataLabelsDialogOK = 15
+ exit function
+ endif
+ '///+<li>Click OK button in Data Labels dialog</li>///
+ try
+ InsertLabelsDialog.OK
+ catch
+ qaErrorLog "Error 1: Closing the Data Labels dialog seems to have a serious problem -> Check this out!"
+ fCloseDataLabelsDialogOK = 1
+ exit function
+ endcatch
+ '///+<li>Check existence of Data Labels dialog</li>///
+ Kontext "InsertLabelsDialog"
+ if InsertLabelsDialog.exists(2) then
+ '///+<li>-> Return Error 2 if still present</li>///
+ qaErrorLog "Error 2: Data Labels dialog should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseDataLabelsDialogOK = 2
+ else
+ printlog ">> Closing the Data Labels dialog seems to work as expected"
+ fCloseDataLabelsDialogOK = 0
+ endif
+
+ if fCloseDataLabelsDialogOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+'///</ul>
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetShowValue ( bShowValueCheck as BOOLEAN ) as INTEGER
+ fSetShowValue = 99
+'///<u><b>Function to check 'Show Value'</b></u>///
+'///<b>BOOLEAN bShowValueCheck</b>
+'///+TRUE := Check 'Show Value' - FALSE := Uncheck 'Show Value'
+'///<b>Returns error-code:</b>
+'///+ 0 := Sucess
+'///+ 1 := Serious problem trying to check 'Show Value'
+'///+ 2 := 'Show Value' was not set
+'///+12 := Check-box for 'Show Value' is not enabled
+'///+99 := Unexpected error
+
+'///<u><b>Step-by-Step</b></u>///
+'///<ul>
+ printlog ""
+ printlog "** Setting 'Show Value'"
+ '///+<li>Check if 'Show Value' is enabled</li>///
+ if NOT ShowValue.IsEnabled then
+ qaErrorLog "Error 12: Check-box for 'Show Value' is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetShowValue = 12
+ exit function
+ endif
+ '///+<li>Try to (Un)Check 'Show Value'</li>///
+ Kontext "InsertLabelsDialog"
+ try
+ if bShowValueCheck then
+ ShowValue.Check
+ else
+ ShowValue.UnCheck
+ endif
+ catch
+ '///+<li>Throw error 1 and quit on serious problem</li>///
+ qaErrorLog "Error 1: Check 'Show Value' seems to cause a serious problem -> Check this out!"
+ fSetShowValue = 1
+ exit function
+ endcatch
+ '///+<li>Verify (against input) if 'Show Value' was checked</li>///
+ if ShowValue.IsChecked = bShowValueCheck then
+ fSetShowValue = 0
+ printlog ">> Check 'Show Value' seems to work"
+ else
+ qaErrorLog "Error 2: 'Show Value' was not checked -> Check this out!"
+ fSetShowValue = 2
+ endif
+
+ if fSetShowValue = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+'///</ul>
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetValueType ( oValueType as OBJECT ) as INTEGER
+ fSetValueType = 99
+'///<u><b>Function to select Value Type</b></u>///
+'///Input:
+'///<b>OBJECT oValueType</b>
+'///+Declaration name of Radio-Button: <i>AsNumber</i> and <i>AsPercentage</i> are valid values
+'///<b>Returns error-code:</b>
+'///+ 0 := Sucess
+'///+ 1 := Serious problem trying to check Legend position radio-button
+'///+ 2 := Value type radio-button was not set
+'///+12 := Radio-Button for desired Value type is not enabled
+'///+99 := Unexpected error
+
+'///<u><b>Step-by-Step</b></u>///
+'///<ul>
+ printlog ""
+ printlog "** Setting Value type"
+ '///+<li>Check if Value type radio-button is enabled</li>///
+ Kontext "InsertLabelsDialog"
+ if NOT oValueType.IsEnabled then
+ qaErrorLog "Error 12: Radio-Button for desired Value type is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetValueType = 12
+ exit function
+ endif
+ '///+<li>Try to (Un)Check desired radio-button</li>///
+ Kontext "InsertLabelsDialog"
+ try
+ oValueType.Check
+ catch
+ '///+<li>Throw error 1 and quit on serious problem</li>///
+ qaErrorLog "Error 1: Check Value type radio-button seems to cause a serious problem -> Check this out!"
+ fSetValueType = 1
+ exit function
+ endcatch
+ '///+<li>Verify (against input) if Value type radio-button was checked</li>///
+ if oValueType.IsChecked then
+ fSetValueType = 0
+ printlog ">> Setting Value type radio-button seems to work"
+ else
+ qaErrorLog "Error 2: Desired Value type radio-button was not checked -> Check this out!"
+ fSetValueType = 2
+ endif
+
+ if fSetValueType = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+'///</ul>
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetShowLabelText ( bShowLabelTextCheck as BOOLEAN ) as INTEGER
+ fSetShowLabelText = 99
+'///<u><b>Function to check 'Show Label Text'</b></u>///
+'///<b>BOOLEAN bShowLabelTextCheck</b>
+'///+TRUE := Check 'Show Label Text' - FALSE := Uncheck 'Show Label Text'
+'///<b>Returns error-code:</b>
+'///+ 0 := Sucess
+'///+ 1 := Serious problem trying to check 'Show Label Text'
+'///+ 2 := 'Show Label Text' was not set
+'///+12 := Check-box for 'Show Label Text' is not enabled
+'///+99 := Unexpected error
+
+'///<u><b>Step-by-Step</b></u>///
+'///<ul>
+ printlog ""
+ printlog "** Setting 'Show Label Text'"
+ '///+<li>Check if 'Show Label Text' is enabled</li>///
+ if NOT ShowLabelText.IsEnabled then
+ qaErrorLog "Error 12: Check-box for 'Show Label Text' is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetShowLabelText = 12
+ exit function
+ endif
+ '///+<li>Try to (Un)Check 'Show Label Text'</li>///
+ Kontext "InsertLabelsDialog"
+ try
+ if bShowLabelTextCheck then
+ ShowLabelText.Check
+ else
+ ShowLabelText.UnCheck
+ endif
+ catch
+ '///+<li>Throw error 1 and quit on serious problem</li>///
+ qaErrorLog "Error 1: Check 'Show Label Text' seems to cause a serious problem -> Check this out!"
+ fSetShowLabelText = 1
+ exit function
+ endcatch
+ '///+<li>Verify (against input) if 'Show Label Text' was checked</li>///
+ if ShowLabelText.IsChecked = bShowlabelTextCheck then
+ fSetShowLabelText = 0
+ printlog ">> Check 'Show Label Text' seems to work"
+ else
+ qaErrorLog "Error 2: 'Show Label Text' was not checked -> Check this out!"
+ fSetShowLabelText = 2
+ endif
+
+ if fSetShowLabelText = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+'///</ul>
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetShowLegendIconWithLabel ( bShowLegendIconCheck as BOOLEAN ) as INTEGER
+ fSetShowLegendIconWithLabel = 99
+'///<u><b>Function to check 'Show Legend Icon With Label'</b></u>///
+'///<b>BOOLEAN bShowLegendIconCheck</b>
+'///+TRUE := Check 'Show Legend Icon With Label' - FALSE := Uncheck 'Show Legend Icon With Label'
+'///<b>Returns error-code:</b>
+'///+ 0 := Sucess
+'///+ 1 := Serious problem trying to check 'Show Legend Icon With Label'
+'///+ 2 := 'Show Legend Icon With Label' was not set
+'///+12 := Check-box for 'Show Legend Icon With Label' is not enabled
+'///+99 := Unexpected error
+
+'///<u><b>Step-by-Step</b></u>///
+'///<ul>
+ printlog ""
+ printlog "** Setting 'Show Legend Icon With Label'"
+ '///+<li>Check if 'Show Legend Icon With Label' is enabled</li>///
+ if NOT ShowLegendIconWithLabel.IsEnabled then
+ qaErrorLog "Error 12: Check-box for 'Show Legend Icon With Label' is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetShowLegendIconWithLabel = 12
+ exit function
+ endif
+ '///+<li>Try to (Un)Check 'Show Legend Icon With Label'</li>///
+ Kontext "InsertLabelsDialog"
+ try
+ if bShowLegendIconCheck then
+ ShowLegendIconWithLabel.Check
+ else
+ ShowLegendIconWithLabel.UnCheck
+ endif
+ catch
+ '///+<li>Throw error 1 and quit on serious problem</li>///
+ qaErrorLog "Error 1: Check 'Show Legend Icon With Label' seems to cause a serious problem -> Check this out!"
+ fSetShowLegendIconWithLabel = 1
+ exit function
+ endcatch
+ '///+<li>Verify (against input) if 'Show Legend Icon With Label' was checked</li>///
+ if ShowLegendIconWithLabel.IsChecked = bShowLegendIconCheck then
+ fSetShowLegendIconWithLabel = 0
+ printlog ">> Check 'Show Legend Icon With Label' seems to work"
+ else
+ qaErrorLog "Error 2: 'Show Legend Icon With Label' was not checked -> Check this out!"
+ fSetShowLegendIconWithLabel = 2
+ endif
+
+ if fSetShowLegendIconWithLabel = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+'///</ul>
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_grids.inc b/testautomation/chart2/tools/ch_tools_grids.inc
new file mode 100644
index 000000000000..d909ef7426e1
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_grids.inc
@@ -0,0 +1,202 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for Grids dialog
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeGridsDialog
+' #1 fCloseGridsDialogOK
+' #1 fSetGrid
+'*
+'\************************************************************************************************
+
+' ch_tools_grids.inc - Library for automation of the 'Insert::Grids...' dialog
+' This Include contains a set of functions to modify the controls of the Grids dialog.
+' All functions are designed to return error-codes depending on the behaviour of the action applied.
+' Return codes:
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 TO 9: A functional problem occured.
+' Error 11 TO 19: Wrong marginal conditions end up in Failure, e.g. control not visible.
+' NOTE: This errors can also be used for 'negative' testing.
+' Error 42: Wrong input. Probably only of interest during test development .
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' ATTENTION:
+' Only Errors 42 and 99 throw 'warnlogs'.
+' All other errors are silent.
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors MUST exclusivly be handled by the calling routine.
+'
+'--------------------------------------------------------------------
+'
+function fInvokeGridsDialog() as INTEGER
+ fInvokeGridsDialog = 99
+' Function to invoke the 'Insert / Grids...' dialog
+' Returns (Error codes):
+' 0 = Sucess
+' 1 = Serious problem trying to invoke the dialog
+' 2 = Failure (Dialog not present after invocation)
+'99 = Unexpected error
+ printlog "Invoking 'Insert::Grids...' in menu"
+ '/// Execute menu item 'Insert::Grids...'
+ try
+ InsertGrids
+ catch
+ QAErrorLog "Error 1: Invoking menu item 'Insert::Grids...' failed"
+ fInvokeGridsDialog = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext "InsertGridsDialog"
+ if InsertGridsDialog.exists(2) then
+ printlog ">> Grids dialog is visible now."
+ fInvokeGridsDialog = 0
+ else
+ qaErrorLog "Error 2: The slot 'InsertGrids' has been executed but the dialog is not visible"
+ fInvokeGridsDialog = 2
+ endif
+
+ if fInvokeGridsDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseGridsDialogOK() as INTEGER
+ fCloseGridsDialogOK = 99
+' Function to close the Grids dialog using OK button
+' No Input
+' Returns error-codes:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the dialog
+' 2 := Failure (Dialog present after applying OK button)
+'15 := Dialog not present before closing
+'99 := Unexpected error
+ printlog "** Closing Grids dialog"
+ Kontext "InsertGridsDialog"
+ '/// Check existence of Grids dialog
+ if InsertGridsDialog.exists(2) then
+ printlog ">> Grids dialog is visible as expected."
+ else
+ 'Return Error 15 and quit if dialog not found
+ qaErrorLog "Error 15: OOPS, Grids dialog should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseGridsDialogOK = 15
+ exit function
+ endif
+ '/// Click OK button in Grids dialog
+ try
+ InsertGridsDialog.OK
+ catch
+ qaErrorLog "Error 1: Closing the Grids dialog seems to have a serious problem -> Check this out!"
+ fCloseGridsDialogOK = 1
+ exit function
+ endcatch
+ '/// Check that Grids dialog is not available anymore
+ Kontext "InsertGridsDialog"
+ if InsertGridsDialog.exists(2) then
+ 'Return Error 2 if still present
+ qaErrorLog "Error 2: Grids dialog should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseGridsDialogOK = 2
+ else
+ printlog ">> Closing the Grids dialog seems to work as expected"
+ fCloseGridsDialogOK = 0
+ endif
+
+ if fCloseGridsDialogOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetGrid ( oGrid as OBJECT , bGridCheck as BOOLEAN ) as INTEGER
+ fSetGrid = 99
+' Function to check-boxes in Grids dialog
+' Input:
+' OBJECT oGrid
+' Grid Indicator (Name of declaration): MainGrid[XYZ]Axis, MinorGrid[XYZ]Axis< are valid name
+' BOOLEAN bGridCheck
+' TRUE := Check Grid
+' FALSE := Uncheck Grid
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to check grid
+' 2 := Grid was not set
+'11 := Check-box for desired grid is not visible
+'12 := Check-box for desired grid is not enabled
+'99 := Unexpected error
+ printlog "** Setting Grid"
+ Kontext "InsertGridsDialog"
+ '/// Check if desired grid check-box is visible
+ if NOT oGrid.IsVisible then
+ qaErrorLog "Error 11: Check-box for desired grid is not visible"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetGrid = 11
+ exit function
+ endif
+ '/// Check if desired grid check-box is enabled
+ if NOT oGrid.IsEnabled then
+ qaErrorLog "Error 12: Check-box for desired grid is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetGrid = 12
+ exit function
+ endif
+ '/// Try to (Un)Check desired Grid
+ Kontext "InsertGridsDialog"
+ try
+ if bGridCheck then
+ oGrid.Check
+ else
+ oGrid.UnCheck
+ endif
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Check grid seems to cause a serious problem -> Check this out!"
+ fSetGrid = 1
+ exit function
+ endcatch
+ '/// Verify (against input) if grid was checked
+ if oGrid.IsChecked = bGridCheck then
+ fSetGrid = 0
+ printlog ">> Setting grid seems to work"
+ else
+ qaErrorLog "Error 2: Grid was not checked -> Check this out!"
+ fSetGrid = 2
+ endif
+
+ if fSetGrid = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_legend.inc b/testautomation/chart2/tools/ch_tools_legend.inc
new file mode 100644
index 000000000000..9c16c71d1af7
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_legend.inc
@@ -0,0 +1,241 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for Legend dialog
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeLegendDialog
+' #1 fCloseLegendDialogOK
+' #1 fSetDisplayLegend
+' #1 fSetLegendPosition
+'*
+'\************************************************************************************************
+
+' ch_tools_legend.inc - A library for automation of the 'Insert/Legend...' dialog
+' This Include contains a set of functions to modify the controls of the Legend dialog.
+' All functions are designed to return error-codes depending on the behaviour of the action applied.
+' Return codes:
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 TO 9: A functional problem occured.
+' Error 11 TO 19: Wrong marginal conditions end up in failture, e.g. control not visible.
+' NOTE: This errors can also be used for 'negative' testing.
+' Error 42: Wrong input. Probably only of interest during test development .
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' ATTENTION:
+' Only Errors 42 and 99 throw 'warnlogs'.
+' All other errors are silent.
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors MUST exclusivly be handled by the calling routine.
+'
+'--------------------------------------------------------------------
+'
+function fInvokeLegendDialog() as INTEGER
+ fInvokeLegendDialog = 99
+' Function to invoke the 'Insert/Legend...' dialog
+' Return (Error codes):
+' 0 = Sucess
+' 1 = Serious problem trying to invoke the dialog
+' 2 = Failure (Dialog not present after invocation)
+' 99 = Unexpected error
+ printlog "Invoking 'Insert/Legend...' in menu"
+ '/// Execute menu item 'Insert/Legend...'
+ try
+ InsertLegend
+ catch
+ qaErrorLog "Error 1: Invoking menu item 'Insert/Legend...' failed"
+ fInvokeLegendDialog = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext "InsertLegendDialog"
+ if InsertLegendDialog.exists(2) then
+ printlog ">> Legend dialog is visible now."
+ fInvokeLegendDialog = 0
+ else
+ QAErrorLog "Error 2: The slot 'InsertLegend' has been executed but the dialog is not visible"
+ fInvokeLegendDialog = 2
+ endif
+
+ if fInvokeLegendDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseLegendDialogOK() as INTEGER
+ fCloseLegendDialogOK = 99
+' Function to close the Legend dialog using OK button
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the dialog
+' 2 := Failure (Dialog present after applying OK button)
+'15 := Dialog not present before closing
+'99 := Unexpected error
+ printlog "** Closing Legend dialog"
+ Kontext "InsertLegendDialog"
+ '/// Check existence of Legend dialog
+ if InsertLegendDialog.exists(2) then
+ printlog ">> Legend dialog is visible as expected."
+ else
+ ' Return Error 15 and quit if dialog not found
+ qaErrorLog "Error 15: OOPS, Legend dialog should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseLegendDialogOK = 15
+ exit function
+ endif
+ '/// Click OK button in Legend dialog
+ try
+ InsertLegendDialog.OK
+ catch
+ qaErrorLog "Error 1: Closing the Legend dialog seems to have a serious problem -> Check this out!"
+ fCloseLegendDialogOK = 1
+ exit function
+ endcatch
+ '///+ Check that the Legend dialog is not available any longer
+ Kontext "InsertLegendDialog"
+ if InsertLegendDialog.exists(2) then
+ ' Return Error 2 if still present
+ qaErrorLog "Error 2: Legend dialog should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseLegendDialogOK = 2
+ else
+ printlog ">> Closing the Legend dialog seems to work as expected"
+ fCloseLegendDialogOK = 0
+ endif
+
+ if fCloseLegendDialogOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetDisplayLegend ( bDisplayLegend as BOOLEAN ) as INTEGER
+ fSetDisplayLegend = 99
+' Function to [en|dis]able visibility of chart legend
+' Input:
+' BOOLEAN bDisplayLegend
+' TRUE := Check 'Dislay (legend)'
+' FALSE := Uncheck 'Dislay (legend)'
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to check grid
+' 2 := 'Dislay (legend)' was not set
+'11 := 'Dislay (legend)' Check-box is not visible
+'99 := Unexpected error
+ printlog "** Setting Display Legend"
+ '/// Check if 'Dislay (legend)' check-box is visible
+ Kontext "InsertLegendDialog"
+ if NOT Display.IsVisible then
+ qaErrorLog "Error 11: Check-box for 'Dislay (legend)' is not visible"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetDisplayLegend = 11
+ exit function
+ endif
+ '/// Try to (Un)Check 'Dislay (legend)'
+ Kontext "InsertLegendDialog"
+ try
+ if bDisplayLegend then
+ Display.Check
+ else
+ Display.UnCheck
+ endif
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Check 'Dislay (legend)' seems to cause a serious problem -> Check this out!"
+ fSetDisplayLegend = 1
+ exit function
+ endcatch
+ '/// Verify (against input) if check-box was checked
+ if Display.IsChecked = bDisplayLegend then
+ fSetDisplayLegend = 0
+ printlog ">> Setting 'Dislay (legend)' seems to work"
+ else
+ qaErrorLog "Error 2: 'Dislay (legend)' was not checked -> Check this out!"
+ fSetDisplayLegend = 2
+ endif
+
+ if fSetDisplayLegend = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetLegendPosition ( oPosition as OBJECT ) as INTEGER
+ fSetLegendPosition = 99
+' Function to select Legend position
+' Input:
+' OBJECT oPosition
+' Declaration name of Radio-Button: Position[Left|Right|Top|Bottom] are valid values
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to check Legend position radio-button
+' 2 := Legend position radio-button was not set
+'12 := Radio-Button for desired position is not enabled
+'42 := User error, input doesn't match.
+'99 := Unexpected error
+ printlog "** Setting Legend position"
+ '/// Check if Legend position radio-button is enabled
+ Kontext "InsertLegendDialog"
+ if NOT oPosition.IsEnabled then
+ qaErrorLog "Error 12: Radio-Button for desired position is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetLegendPosition = 12
+ exit function
+ endif
+ '/// Try to (Un)Check desired radio-button
+ Kontext "InsertLegendDialog"
+ try
+ oPosition.Check
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Check Legend position radio-button seems to cause a serious problem -> Check this out!"
+ fSetLegendPosition = 1
+ exit function
+ endcatch
+ '/// Verify (against input) if Legend position radio-button was checked
+ if oPosition.IsChecked then
+ fSetLegendPosition = 0
+ printlog ">> Setting Legend position radio-button seems to work"
+ else
+ qaErrorLog "Error 2: Desires Legend position radio-button was not checked -> Check this out!"
+ fSetLegendPosition = 2
+ endif
+
+ if fSetLegendPosition = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_select.inc b/testautomation/chart2/tools/ch_tools_select.inc
new file mode 100644
index 000000000000..8df51c8d9279
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_select.inc
@@ -0,0 +1,136 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : selecting charts
+'*
+'**************************************************************************************************
+'*
+' #1 fSelectChartByNumber
+' #1 fCalcSelectSheet
+' #1 fChartSelectElement
+'*
+'\************************************************************************************************
+
+function fSelectChartByNumber ( iObjectPosition as INTEGER )
+ ' Select any Chart in document
+ ' INTEGER: iObjectPosition - Position of object (>=1) within OLE objects
+ ' NOTE: You're moving within a treelistbox which is quite messy to handle.
+ ' In case 'iObjectPosition' is larger than the real number of objects in category you're end up in another categories.
+ ' WITHOUT ANY WARNING!
+ ' RETURNS: BOOLEAN (success)
+ dim bNavigatorWasVisible as boolean
+ bNavigatorWasVisible = FALSE
+ dim iIndex
+ dim iCategoryPosition as INTEGER
+ iCategoryPosition = 6
+
+ fSelectChartByNumber = FALSE
+
+ '/// Check if Navigator is visible
+ Kontext "NavigatorCalc"
+ if NavigatorCalc.exists (3) then
+ bNavigatorWasVisible = TRUE
+ else
+ '/// Invoke navigator if not visible
+ ViewNavigator
+ end if
+
+ try
+ Kontext "NavigatorCalc"
+ '/// Go to Top in Navigator
+ liste.TypeKeys "<HOME>"
+ '/// Travel top to bottom through all categories
+ for iIndex = 1 to 6
+ '/// Make sure all elements in category are hidden, apply '-' key
+ liste.TypeKeys "-<DOWN>"
+ next iIndex
+ '/// Select desired category OLE
+ liste.select ( iCategoryPosition )
+ '/// Unfold elements of selected category
+ liste.TypeKeys "+"
+ '/// Select desired position within category
+ liste.select ( iCategoryPosition + iObjectPosition )
+ '/// Hit 'RETURN' key to select element in document
+ liste.TypeKeys "<RETURN>"
+ '/// Return 'TRUE' for 'fNavigatorSelectObject'
+ fSelectChartByNumber = TRUE
+ catch
+ warnlog "Selecting the desired object failed. Perhaps your input wasn't valid"
+ endcatch
+ '/// Close navigator if it wasn't visible before entering this function
+ if bNavigatorWasVisible = TRUE then
+ printlog "Leaving navigator open as initially found"
+ else
+ ViewNavigator
+ printlog "Closing navigator as initially found"
+ end if
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCalcSelectSheet ( sSelectThisSheet ) as boolean
+ ' Select a sheet by name (STRING) or number (INTEGER)
+ ' RETURNS: boolean (success)
+ fCalcSelectSheet = FALSE
+ try
+ Kontext "DocumentCalc"
+ '/// Invoke Edit::Sheet::Select
+ EditSheetSelect
+ Kontext "SelectSheets"
+ '/// Select sheet no. or sheet name in listbox
+ SheetSelectionBox.Select ( sSelectThisSheet )
+ '/// OK
+ SelectSheets.OK
+ '/// Return true
+ fCalcSelectSheet = TRUE
+ catch
+ warnlog "Something went wrong while selecting a sheet by name"
+ '/// In case of Failure lookup 'Select sheets' dialog andd close it if exists
+ Kontext "SelectSheets"
+ if SelectSheets.exists(2) then
+ SelectSheets.Cancel
+ endif
+ endcatch
+end function
+'
+'--------------------------------------------------------------------
+'
+function fChartSelectElement ( iObjectPosition as INTEGER ) as boolean
+ ' Select a chartelement by using the ChartElementSelectorListBox in the Toolbar
+ ' RETURNS: boolean (success)
+ fChartSelectElement = FALSE
+ try
+ Kontext "Toolbar"
+ sleep (2)
+ ChartElementSelector.Select (iObjectPosition)
+ fChartSelectElement = TRUE
+ catch
+ warnlog "Something went wrong while selecting a chartelement"
+ endcatch
+end function
diff --git a/testautomation/chart2/tools/ch_tools_statistics.inc b/testautomation/chart2/tools/ch_tools_statistics.inc
new file mode 100644
index 000000000000..59bd74496113
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_statistics.inc
@@ -0,0 +1,429 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for Statistics dialog
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeTrendlinesDialog
+' #1 fInvokeInsertYErrorBarsDialog
+' #1 fInsertMeanValueLines
+' #1 fSetErrorCategory
+' #1 fSetErrorValue
+' #1 fSetErrorIndicatorItem
+' #1 fSetRegressionCurvesItem
+'*
+'\************************************************************************************************
+
+' ch_tools_statistics.inc - Library for automation of the 'Insert::Statistics...' dialog
+' This Include contains a set of functions to modify the controls of the Statistics dialog.
+' All functions are designed to return error-codes depending on the behaviour of the action applied.
+' Return codes:
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 TO 9: A functional problem occured.
+' Error 11 TO 19: Wrong marginal conditions end up in failture, e.g. control not visible.
+' NOTE: This errors can also be used for 'negative' testing.
+' Error 42: Wrong input. Probably only of interest during test development.
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' ATTENTION:
+' Only Errors 42 and 99 throw 'warnlogs'.
+' All other errors are silent.
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors MUST exclusivly be handled by the calling routine.
+'
+'--------------------------------------------------------------------
+'
+function fInvokeTrendlinesDialog() as INTEGER
+ fInvokeTrendlinesDialog = 99
+' Function to invoke the 'Insert::Statistics...' dialog
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to invoke the dialog
+' 2 := Failure (Dialog not present after invocation)
+'99 := Unexpected error
+
+ printlog "** Invoking 'Insert::Trendlines...' in menu"
+ '/// Execute menu item 'Insert::Trendlines...'
+ try
+ InsertTrendlines
+ catch
+ qaErrorLog "Error 1: Invoking menu item 'Insert::Trendlines...' failed"
+ fInvokeTrendlinesDialog = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext
+ active.SetPage (TabTrendLineType)
+ Kontext "TabTrendLineType"
+ if TabTrendLineType.exists(2) then
+ printlog ">> Trend lines dialog is visible now."
+ fInvokeTrendlinesDialog = 0
+ else
+ qaErrorLog "Error 2: OOPS, calling the slot '.uno:InsertTrendlines' didn't cause any problem ..."
+ qaErrorLog "..., BUT the dialog doesn't seem to be visible"
+ fInvokeTrendlinesDialog = 2
+ endif
+
+ if fInvokeTrendlinesDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fInvokeInsertYErrorBarsDialog() as INTEGER
+ fInvokeInsertYErrorBarsDialog = 99
+' Function to invoke the 'Insert::InsertYErrorBars...' dialog
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to invoke the dialog
+' 2 := Failure (Dialog not present after invocation)
+'99 := Unexpected error
+ printlog "** Invoking 'Insert::InsertYErrorBars...' in menu"
+ '/// Execute menu item 'Insert::InsertYErrorBars...'
+ try
+ InsertYErrorBars
+ catch
+ qaErrorLog "Error 1: Invoking menu item 'Insert::YErrorBars...' failed"
+ fInvokeInsertYErrorBarsDialog = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext "InsertYErrorBarsDLG"
+ if InsertYErrorBarsDLG.exists(2) then
+ printlog ">> InsertYErrorBars dialog is visible now."
+ fInvokeInsertYErrorBarsDialog = 0
+ else
+ qaErrorLog "Error 2: OOPS, calling the slot '.uno:InsertYErrorBars' didn't cause any problem ..."
+ qaErrorLog "..., BUT the dialog doesn't seem to be visible"
+ fInvokeInsertYErrorBarsDialog = 2
+ endif
+
+ if fInvokeInsertYErrorBarsDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'-------------------------------------------------------------------------
+'
+function fInsertMeanValueLines() as INTEGER
+ fInsertMeanValueLines = 99
+' Function to insert mean value lines in an activated chart object
+' Input:
+ QAErrorLog "#i86055#-Insert/ Mean Value Lines needs a check box in sub-menu to remove all lines with once click"
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to execute the command
+' 2 := Serious problem trying to check if the line has been inserted
+' 3 := Uncorrect selected object
+' 4 := Format Line-dialog did not occour
+'99 := Unexpected error
+
+ printlog "** Executing 'Insert::MeanValueLines...' in menu"
+ '/// Execute menu item 'Insert::MeanValueLines...'
+ try
+ InsertMeanValueLines
+ catch
+ qaErrorLog "Error 1: Executing menu item 'Insert::MeanValueLines...' failed"
+ fInsertMeanValueLines = 1
+ exit function
+ endcatch
+
+ Kontext "DocumentChart"
+ '/// Type three times TAB-key to select the first data series
+ DocumentChart.TypeKeys "<TAB>" , 3
+ '/// Type F3-function key to select the mean value line of that data series
+ DocumentChart.TypeKeys "<F3>"
+ '/// Open the context menu
+ DocumentChart.OpenContextMenu TRUE
+ if hMenuItemGetCount = 6 then
+ '/// Select the first entry (properties)
+ hMenuSelectNr (1)
+ else
+ qaErrorLog "Error 2: Opening context menu on inserted mean value line failed!"
+ fInsertMeanValueLines = 2
+ exit function
+ endif
+ Kontext
+ '/// There should be one tab page (chart line)
+ Active.SetPage TabFormatChartLine
+ if Active.GetPageCount <> 1 then
+ qaErrorLog "Error 3: Incorrect selected object!"
+ fInsertMeanValueLines = 3
+ Active.Cancel
+ exit function
+ endif
+ Kontext "TabFormatChartLine"
+ if TabFormatChartLine.Exists(1) then
+ fInsertMeanValueLines = 0
+ '/// Leave the dialog with CANCEL
+ TabFormatChartLine.CANCEL
+ printlog ">> Inserting 'Mean Value Lines' seems to work"
+ else
+ qaErrorLog "Error 4: Format Line-dialog did not occour!"
+ fInsertMeanValueLines = 4
+ exit function
+ end if
+ if fInsertMeanValueLines = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetErrorCategory ( oErrorCategory as OBJECT ) as INTEGER
+ fSetErrorCategory = 99
+' Function to select 'Error Category'
+' Input:
+' OBJECT oErrorCategory
+' Declaration name of Radio-Button (valid values):
+' - NoFunction
+' - Variance<
+' - StandardDeviation
+' - Percentage
+' - ErrorMargin
+' - ConstantValue
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to check 'Error Category' radio-button
+' 2 := 'Error Category' radio-button was not set
+'12 := Radio-Button for desired 'Error Category' is not enabled
+'42 := User error, input doesn't match.
+'99 := Unexpected error
+ printlog "** Setting 'Error Category'"
+ '/// Check if desired 'Error Category' radio-button is enabled
+ Kontext "InsertStatisticsDialog"
+ if NOT oErrorCategory.IsEnabled then
+ qaErrorLog "Error 12: Radio-Button for desired 'Error Category' is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetErrorCategory = 12
+ exit function
+ endif
+ '/// Try to check desired 'Error Category'
+ Kontext "InsertStatisticsDialog"
+ try
+ oErrorCategory.Check
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Check 'Error Category' radio-button seems to cause a serious problem -> Check this out!"
+ fSetErrorCategory = 1
+ exit function
+ endcatch
+ '/// Verify (against input) if 'Error Category' radio-button was checked
+ if oErrorCategory.IsChecked then
+ fSetErrorCategory = 0
+ printlog ">> Setting 'Error Category' radio-button seems to work"
+ else
+ qaErrorLog "Error 2: Desires 'Error Category' radio-button was not checked -> Check this out!"
+ fSetErrorCategory = 2
+ endif
+
+ if fSetErrorCategory = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetErrorValue ( oErrorValue as OBJECT , _
+ sErrorValue as STRING , _
+ OPTIONAL bCheckResult as BOOLEAN , _
+ OPTIONAL sExpectedValue as STRING ) as INTEGER
+ fSetErrorValue = 99
+' Function to set 'Error Value'
+' Input:
+' OBJECT oErrorValue
+' Declaration name of Spin-Field (valid values):
+' - PercentageValue
+' - ErrorMarginValue
+' - ConstantValuePlus
+' - ConstantValueMinus
+' - STRING (numeric) sErrorValue
+' - Value to assign to Spin-Field
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to check 'Error Value' Spin-Field
+' 2 := 'Error Value' Spin-Field was not set
+'12 := Spin-Field for desired 'Error Value' is not enabled
+'42 := User error, input doesn't match.
+'99 := Unexpected error
+ if isMissing ( bCheckResult ) then
+ bCheckResult = FALSE
+ endif
+ if isMissing ( sExpectedValue ) then
+ sExpectedValue = sErrorValue
+ endif
+ printlog ""
+ printlog "** Setting 'Error Value'"
+ '/// Check if desired 'Error Value' Spin-Field is enabled
+ Kontext "InsertStatisticsDialog"
+ if NOT oErrorValue.IsEnabled then
+ qaErrorLog "Error 12: Spin-Field for desired 'Error Value' is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetErrorValue = 12
+ exit function
+ endif
+ '/// Try to set desired 'Error Value'
+ Kontext "InsertStatisticsDialog"
+ try
+ oErrorValue.setText ( sErrorValue )
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Setting 'Error Value' Spin-Field seems to cause a serious problem -> Check this out!"
+ fSetErrorValue = 1
+ exit function
+ endcatch
+ '/// Verify (against input) if 'Error Value' Spin-Field was set correctly
+ if bCheckResult then
+ if oErrorValue.getText = sExpectedValue then
+ fSetErrorValue = 0
+ printlog ">> Setting 'Error Value' Spin-Field seems to work"
+ else
+ qaErrorLog "Error 2: Desires 'Error Value' Spin-Field was not set correctly (value out of range?) -> Check this out!"
+ qaErrorLog "Expected result: " & sExpectedValue
+ qaErrorLog "Obtained result: " & oErrorValue.getText
+ fSetErrorValue = 2
+ endif
+ else
+ fSetErrorValue = 0
+ qaErrorLog "!! Skipped verification of result"
+ endif
+
+ if fSetErrorValue = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetErrorIndicatorItem ( iErrorIndicatorNumber as INTEGER ) as INTEGER
+ fSetErrorIndicatorItem = 99
+' Function to select the 'Error Indicator' item
+' Input:
+' INTEGER iErrorIndicatorNumber:
+' Position in 'Error Indicator' control.
+' Posible Values are 1 to 4
+' NOTE: Currently the 'Error Indicator' control can only be addressed using 'typekeys'.
+' -> No 100% proof verification of success possible!
+' Returns error-code:
+' 0 := Sucess.
+' 1 := Serious problem while selecting the variant control.
+'11 := 'Error Indicator' is not visible
+'42 := User error, input out of range.
+'99 := Unexpected error.
+ '/// Check if 'Error Indicator' is visible
+ Kontext "InsertStatisticsDialog"
+ if NOT ErrorIndicator.IsVisible then
+ qaErrorLog "Error 11: 'Error Indicator' is not visible"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetErrorIndicatorItem = 11
+ exit function
+ endif
+ '/// Lookup valid input value for 'Error Indicator Item'
+ if ( iErrorIndicatorNumber < 1 ) OR ( iErrorIndicatorNumber > 4 ) then
+ fSetErrorIndicatorItem = 42
+ warnlog "USER ERROR: Input doesn't match!"
+ exit function
+ endif
+ printlog "** Selecting the 'Error Indicator'"
+ '/// Select the desired entry number
+ Kontext "InsertStatisticsDialog"
+ try
+ ErrorIndicator.typeKeys "<HOME>"
+ ErrorIndicator.typeKeys "<RIGHT>", ( iErrorIndicatorNumber - 1 )
+ fSetErrorIndicatorItem = 0
+ printlog ">> Selecting the 'Error Indicator' probably worked"
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Selecting 'Error Indicator' seems to cause a serious problem -> Check this out!"
+ fSetErrorIndicatorItem = 1
+ exit function
+ endcatch
+
+ if fSetErrorIndicatorItem = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetRegressionCurvesItem ( iRegressionCurveNumber as INTEGER ) as INTEGER
+ fSetRegressionCurvesItem = 99
+' Function to select the 'Regression Curves' item
+' Input:
+' INTEGER iRegressionCurveNumber:
+' Position in 'Regression Curves' control.
+' Posible Values are 1 to 5
+' NOTE: Currently the 'Regression Curves' control can only be addressed using 'typekeys'.
+' -> No 100% proof verification of success possible!
+' Returns error-code:
+' 0 := Sucess.
+' 1 := Serious problem while selecting the variant control.
+'11 := 'Regression Curves' is not visible
+'42 := User error, input out of range.
+'99 := Unexpected error.
+ ' Check if 'Regression Curves' is visible
+ Kontext "InsertStatisticsDialog"
+ if NOT RegressionCurves.IsVisible then
+ qaErrorLog "Error 11: 'Regression Curves' is not visible"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetRegressionCurvesItem = 11
+ exit function
+ endif
+ '/// Lookup valid input value for 'Regression Curves Item'
+ if ( iRegressionCurveNumber < 1 ) OR ( iRegressionCurveNumber > 5 ) then
+ fSetRegressionCurvesItem = 42
+ warnlog "USER ERROR: Input doesn't match!"
+ exit function
+ endif
+ printlog "** Selecting the 'Regression Curves'"
+ '/// Select the desired entry number
+ Kontext "InsertStatisticsDialog"
+ try
+ RegressionCurves.typeKeys "<HOME>"
+ RegressionCurves.typeKeys "<RIGHT>", ( iRegressionCurveNumber - 1 )
+ fSetRegressionCurvesItem = 0
+ printlog ">> Selecting the 'Regression Curves' probably worked"
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Selecting 'Regression Curves' seems to cause a serious problem -> Check this out!"
+ fSetRegressionCurvesItem = 1
+ exit function
+ endcatch
+
+ if fSetRegressionCurvesItem = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_tab_borders_lines.inc b/testautomation/chart2/tools/ch_tools_tab_borders_lines.inc
new file mode 100644
index 000000000000..4d9847615782
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_tab_borders_lines.inc
@@ -0,0 +1,144 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for Borders and Lines tab-page
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeTabLine
+' #1 fCloseTabLineOK
+'*
+'\************************************************************************************************
+
+' ch_tools_tab_borders_lines.inc - A library for automation of tab-pages Borders and Lines
+' NOTE: Internal both tab-pages are identical
+' This Include contains a set of functions to modify the controls of these tab-pages.
+' All functions are designed to return error-codes depending on the behaviour of the action applied.
+' Return codes:
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 TO 9: A functional problem occured.
+' Error 11 TO 19: Wrong marginal conditions end up in Failure, e.g. control not visible.
+' NOTE: This errors can also be used for 'negative' testing.
+' Error 42: Wrong input. Probably only of interest during test development .
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' ATTENTION:
+' Only Errors 42 and 99 throw 'warnlogs'.
+' All other errors are silent.
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors MUST exclusivly be handled by the calling routine.
+'
+'--------------------------------------------------------------------
+'
+function fInvokeTabLine() as INTEGER
+ fInvokeTabLine = 99
+' Function to invoke the Borders or Line tab page in several dialogs
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to invoke the page
+' 2 := Failure (Page not present after invocation)
+'99 := Unexpected error
+
+ printlog "** Invoking 'Line' or 'Borders' tab page"
+ '/// Try to change to 'Line' or 'Borders' tab page
+ Kontext
+ try
+ active.setPage TabFormatChartLine
+ catch
+ qaErrorLog "Error 1: Invoking tab page 'Line' or 'Borders' failed"
+ fInvokeTabLine = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext "TabFormatChartLine"
+ if TabFormatChartLine.exists(2) then
+ printlog ">> Tab page 'Line' or 'Borders' is visible now."
+ fInvokeTabLine = 0
+ else
+ qaErrorLog "Error 2: OOPS, calling Tab page 'Line' or 'Borders' didn't cause any problem ..."
+ qaErrorLog "..., BUT the page doesn't seem to be visible"
+ fInvokeTabLine = 2
+ endif
+
+ if fInvokeTabLine = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseTabLineOK() as INTEGER
+ fCloseTabLineOK = 99
+' Function to close a dialog using OK button while tab page 'Line' or 'Borders' is visible
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the page
+' 2 := Failure (Page present after applying OK button)
+'15 := Page not present before closing
+'99 := Unexpected error
+ printlog "** Closing 'Line' or 'Borders' tab page"
+ Kontext "TabFormatChartLine"
+ '/// Check existence of 'Line' or 'Borders' tab page
+ if TabFormatChartLine.exists(2) then
+ printlog ">> 'Line' or 'Borders' tab page is visible as expected."
+ else
+ ' Return Error 15 and quit if page not found
+ qaErrorLog "Error 15: OOPS,'Line' or 'Borders' tab page should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseTabLineOK = 15
+ exit function
+ endif
+ '/// Click OK button in 'Line' or 'Borders' tab page
+ try
+ TabFormatChartLine.OK
+ catch
+ qaErrorLog "Error 1: Closing the 'Line' or 'Borders' tab page seems to have a serious problem -> Check this out!"
+ fCloseTabLineOK = 1
+ exit function
+ endcatch
+ '/// Check that the 'Line' or 'Borders' tab page is not available anymore.
+ Kontext "TabFormatChartLine"
+ if TabFormatChartLine.exists(2) then
+ ' Return Error 2 if still present
+ qaErrorLog "Error 2: 'Line' or 'Borders' tab page should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseTabLineOK = 2
+ else
+ printlog ">> Closing 'Line' or 'Borders' tab page seems to work as expected"
+ fCloseTabLineOK = 0
+ endif
+
+ if fCloseTabLineOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_tab_pages.inc b/testautomation/chart2/tools/ch_tools_tab_pages.inc
new file mode 100644
index 000000000000..63d88d35c3ff
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_tab_pages.inc
@@ -0,0 +1,147 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for Borders and Lines tab-page
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeTabPage
+' #1 fCloseTabLineOK
+'*
+'\************************************************************************************************
+
+' ch_tools_tab_pages.inc - Library for automation of tab pages
+' This Include contains a functions to handle tab-pages.
+' All functions are designed to return error-codes depending on the behaviour of the action applied.
+' Return codes:
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 TO 9: A functional problem occured.
+' Error 11 TO 19: Wrong marginal conditions end up in Failure, e.g. control not visible.
+' NOTE: This errors can also be used for 'negative' testing.
+' Error 42: Wrong input. Probably only of interest during test development .
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' ATTENTION:
+' Only Errors 42 and 99 throw 'warnlogs'.
+' All other errors are silent.
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors MUST exclusivly be handled by the calling routine.
+'
+'--------------------------------------------------------------------
+'
+function fInvokeTabPage( oThisPage as OBJECT ) as INTEGER
+ fInvokeTabPage = 99
+' Function to invoke a tab page
+' Input:
+' OBJECT oThisPage
+' Tab page name in declaration
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to invoke the page
+' 2 := Failure (Page not present after invocation)
+'99 := Unexpected error
+
+ printlog "** Invoking tab page"
+ '/// Try to invoke tab page
+ Kontext
+ try
+ active.setPage oThisPage
+ catch
+ qaErrorLog "Error 1: Invoking tab page failed"
+ fInvokeTabPage = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successful
+ Kontext oThisPage
+ if oThisPage.exists(2) then
+ printlog ">> Tab page is visible now."
+ fInvokeTabPage = 0
+ else
+ qaErrorLog "Error 2: OOPS, calling Tab page cause any problem ..."
+ qaErrorLog "..., BUT the page doesn't seem to be visible"
+ fInvokeTabPage = 2
+ endif
+
+ if fInvokeTabPage = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseTabPage( oThisPage as OBJECT ) as INTEGER
+ fCloseTabPage = 99
+' Function to close a tab page dialog using OK button
+' Input:
+' OBJECT oThisPage
+' Tab page name in declaration
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the page
+' 2 := Failure (Page present after applying OK button)
+'15 := Page not present before closing
+'99 := Unexpected error
+ printlog "** Closing tab page"
+ Kontext oThisPage
+ '/// Check existence of tab page
+ if oThisPage.exists(2) then
+ printlog ">> Tab page is visible as expected."
+ else
+ ' Return Error 15 and quit if page not found
+ qaErrorLog "Error 15: OOPS, tab page should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseTabPage = 15
+ exit function
+ endif
+ '/// Click OK button in tab page
+ try
+ oThisPage.OK
+ catch
+ qaErrorLog "Error 1: Closing tab page seems to have a serious problem -> Check this out!"
+ fCloseTabPage = 1
+ exit function
+ endcatch
+ '/// Check that of tab page has been gone
+ Kontext oThisPage
+ if oThisPage.exists(2) then
+ ' Return Error 2 if still present
+ qaErrorLog "Error 2: Tab page should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseTabPage = 2
+ else
+ printlog ">> Tab page seems to work as expected"
+ fCloseTabPage = 0
+ endif
+
+ if fCloseTabPage = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+
diff --git a/testautomation/chart2/tools/ch_tools_titles.inc b/testautomation/chart2/tools/ch_tools_titles.inc
new file mode 100644
index 000000000000..c3b64a6fa8f7
--- /dev/null
+++ b/testautomation/chart2/tools/ch_tools_titles.inc
@@ -0,0 +1,189 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : oliver.craemer@oracle.com
+'*
+'* short description : Tool library for Titles dialog
+'*
+'**************************************************************************************************
+'*
+' #1 fInvokeTitlesDialog
+' #1 fCloseTitlesDialogOK
+' #1 fSetTitle
+'*
+'\************************************************************************************************
+
+' ch_tools_titles.inc - A library for automation of the 'Insert::Titles...' dialog
+' This Include contains a set of functions to modify the controls of the Titles dialog.
+' All functions are designed to return error-codes depending on the behaviour of the action applied.
+' Return codes:
+' Error 0: Success.
+' Error 1: The basic action beeing applied caused a serious problem, e.g. a crash.
+' Error 2 TO 9: A functional problem occured.
+' Error 11 TO 19: Wrong marginal conditions end up in Failure, e.g. control not visible.
+' NOTE: This errors can also be used for 'negative' testing.
+' Error 42: Wrong input. Probably only of interest during test development .
+' Error 99: Unexpected behaviour - Shouldn't normally occur.
+' ATTENTION:
+' Only Errors 42 and 99 throw 'Warnlogs'.
+' All other errors are silent!
+' They only throw QAErrorlogs the give a hint what probably went wrong.
+' Expected Errors MUST exclusivly be handled by the calling routine!
+'
+'--------------------------------------------------------------------
+'
+function fInvokeTitlesDialog() as INTEGER
+ fInvokeTitlesDialog = 99
+' Function to invoke the 'Insert::Titles...' dialog
+' Return (Error codes):
+' 0 = Sucess
+' 1 = Serious problem trying to invoke the dialog
+' 2 = Failure (Dialog not present after invocation)
+'99 = Unexpected error
+ printlog "Invoking 'Insert::Titles...' in menu"
+ '/// Execute menu item 'Insert::Titles...'
+ try
+ InsertTitle
+ catch
+ qaErrorLog "Error 1: Invoking menu item 'Insert::Titles...' failed"
+ fInvokeTitlesDialog = 1
+ exit function
+ endcatch
+
+ '/// Lookup if call was successfull
+ Kontext "InsertTitleDialog"
+ if InsertTitleDialog.exists(2) then
+ printlog "Titles dialog is visible now."
+ fInvokeTitlesDialog = 0
+ else
+ qaErrorLog "Error 2: 'InsertTitles' has been executed but the dialog is not visible"
+ fInvokeTitlesDialog = 2
+ endif
+
+ if fInvokeTitlesDialog = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fCloseTitlesDialogOK() as INTEGER
+ fCloseTitlesDialogOK = 99
+' Function to close the Titles dialog using OK button
+' No Input
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to Close the dialog
+' 2 := Failure (Dialog present after applying OK button)
+'15 := Dialog not present before closing
+'99 := Unexpected error
+
+printlog "** Closing Titles dialog"
+ Kontext "InsertTitleDialog"
+ '/// Check existence of Titles dialog
+ if InsertTitleDialog.exists(2) then
+ printlog ">> Titles dialog is visible as expected."
+ else
+ ' Return Error 15 and quit if dialog not found
+ qaErrorLog "Error 15: OOPS, Titles dialog should be visible ..."
+ qaErrorLog "... this is a BUG or a scripting error -> Check this out!"
+ fCloseTitlesDialogOK = 15
+ exit function
+ endif
+ '/// Click OK button in Titles dialog
+ try
+ InsertTitleDialog.OK
+ catch
+ qaErrorLog "Error 1: Closing the Titles dialog seems to have a serious problem -> Check this out!"
+ fCloseTitlesDialogOK = 1
+ exit function
+ endcatch
+ '/// Check that Titles dialog not existing anymore
+ Kontext "InsertTitleDialog"
+ if InsertTitleDialog.exists(2) then
+ ' Return Error 2 if still present
+ qaErrorLog "Error 2: Titles dialog should be invisible now ..."
+ qaErrorLog "... closing the dialog doesn't seem to work -> Check this out!"
+ fCloseTitlesDialogOK = 2
+ else
+ printlog ">> Closing the Titles dialog seems to work as expected"
+ fCloseTitlesDialogOK = 0
+ endif
+
+ if fCloseTitlesDialogOK = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+'
+'--------------------------------------------------------------------
+'
+function fSetTitle ( oTitle as OBJECT , sTitleString as STRING ) as INTEGER
+ fSetTitle = 99
+' Function to set strings in Titles dialog
+' Input: OBJECT oTitle
+' Title Indicator (Name of declaration):
+' MainTitle, SubTitle, TitleXaxis, TitleYaxis, TitleZaxis are valid names
+' STRING sTitleString
+' Text to set on 'oTitle'
+' Returns error-code:
+' 0 := Sucess
+' 1 := Serious problem trying to set title
+' 2 := Title was not set
+'12 := Text-box for desired title is not enabled
+'99 := Unexpected error
+ printlog "** Setting title"
+ '/// Check if desired title text-box is enabled
+ if NOT oTitle.IsEnabled then
+ qaErrorLog "Error 12: Text-box for desired title is not enabled"
+ qaErrorLog "... BUG or Script problem -> Check this out!"
+ fSetTitle = 12
+ exit function
+ endif
+ '/// Put the text in desired title field
+ Kontext "InsertTitleDialog"
+ try
+ oTitle.setText ( sTitleString )
+ catch
+ ' Throw error 1 and quit on serious problem
+ qaErrorLog "Error 1: Set text on title seems to cause a serious problem -> Check this out!"
+ fSetTitle = 1
+ exit function
+ endcatch
+ '/// Verify (against input) if title was set correctly
+ if oTitle.getText = sTitleString then
+ fSetTitle = 0
+ printlog ">> Setting title seems to work"
+ else
+ qaErrorLog "Error 2: Title was not set -> Check this out!"
+ fSetTitle = 2
+ endif
+
+ if fSetTitle = 99 then
+ warnlog "Error 99: Something unexpected happened!!"
+ endif
+end function
+