From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- chart2/qa/TestCaseOldAPI.java | 957 +++++++ chart2/qa/data.chd | 14 + chart2/qa/extras/PivotChartTest.cxx | 986 +++++++ chart2/qa/extras/chart2_trendcalculators.cxx | 209 ++ chart2/qa/extras/chart2dump/chart2dump.cxx | 1147 ++++++++ .../chart2dump/data/axis_special_positioning.odp | Bin 0 -> 25153 bytes .../data/chartwall_auto_adjust_with_titles.ods | Bin 0 -> 24943 bytes .../data/chartwall_auto_adjust_without_titles.ods | Bin 0 -> 25090 bytes .../data/chartwall_custom_positioning.ods | Bin 0 -> 29351 bytes .../chart2dump/data/column_chart_small_spacing.ods | Bin 0 -> 29333 bytes .../chart2dump/data/custom_legend_position.odp | Bin 0 -> 16422 bytes .../chart2dump/data/default_formated_axis.odp | Bin 0 -> 26218 bytes chart2/qa/extras/chart2dump/data/donut_chart.ods | Bin 0 -> 24630 bytes .../extras/chart2dump/data/exploded_pie_chart.ods | Bin 0 -> 26180 bytes .../chart2dump/data/formated_axis_labels.odp | Bin 0 -> 15328 bytes .../extras/chart2dump/data/formated_axis_lines.odp | Bin 0 -> 24305 bytes .../extras/chart2dump/data/formated_grid_line.ods | Bin 0 -> 30275 bytes .../qa/extras/chart2dump/data/horizontal_grid.ods | Bin 0 -> 30942 bytes .../qa/extras/chart2dump/data/legend_on_bottom.odp | Bin 0 -> 16526 bytes .../extras/chart2dump/data/legend_on_left_side.odp | Bin 0 -> 16235 bytes .../chart2dump/data/legend_on_right_side.odp | Bin 0 -> 14176 bytes chart2/qa/extras/chart2dump/data/legend_on_top.odp | Bin 0 -> 16410 bytes .../extras/chart2dump/data/many_legend_entries.odp | Bin 0 -> 20961 bytes .../extras/chart2dump/data/minimal_legend_test.odp | Bin 0 -> 18253 bytes chart2/qa/extras/chart2dump/data/minor_grid.ods | Bin 0 -> 30004 bytes .../extras/chart2dump/data/multiple_categories.odp | Bin 0 -> 21476 bytes .../extras/chart2dump/data/multiple_categories.ods | Bin 0 -> 35766 bytes .../extras/chart2dump/data/normal_area_chart.ods | Bin 0 -> 29023 bytes .../qa/extras/chart2dump/data/normal_bar_chart.ods | Bin 0 -> 31385 bytes .../extras/chart2dump/data/normal_column_chart.ods | Bin 0 -> 29326 bytes .../data/normal_line_chart_lines_and_points.ods | Bin 0 -> 29690 bytes .../data/normal_line_chart_lines_only.ods | Bin 0 -> 29596 bytes .../data/normal_line_chart_points_only.ods | Bin 0 -> 29686 bytes .../qa/extras/chart2dump/data/normal_pie_chart.ods | Bin 0 -> 26374 bytes .../chart2dump/data/percent_stacked_area_chart.ods | Bin 0 -> 31559 bytes .../chart2dump/data/percent_stacked_bar_chart.ods | Bin 0 -> 29672 bytes .../data/percent_stacked_column_chart.odp | Bin 0 -> 23155 bytes .../data/percent_stacked_column_chart.ods | Bin 0 -> 31177 bytes ...percent_stacked_line_chart_lines_and_points.ods | Bin 0 -> 23971 bytes .../data/percent_stacked_line_chart_lines_only.ods | Bin 0 -> 23869 bytes .../percent_stacked_line_chart_points_only.ods | Bin 0 -> 23751 bytes .../chart2dump/data/pie_chart_many_slices.ods | Bin 0 -> 16351 bytes .../chart2dump/data/pivotchart_data_button.ods | Bin 0 -> 18366 bytes .../extras/chart2dump/data/rotated_axis_labels.odp | Bin 0 -> 24098 bytes .../extras/chart2dump/data/rotated_pie_chart.ods | Bin 0 -> 26286 bytes .../data/scatter_chart_lines_and_points.ods | Bin 0 -> 23728 bytes .../chart2dump/data/scatter_chart_lines_only.ods | Bin 0 -> 23540 bytes .../chart2dump/data/scatter_chart_points_only.ods | Bin 0 -> 23520 bytes chart2/qa/extras/chart2dump/data/simple_chart.ods | Bin 0 -> 29601 bytes .../extras/chart2dump/data/stacked_area_chart.ods | Bin 0 -> 30199 bytes .../extras/chart2dump/data/stacked_bar_chart.ods | Bin 0 -> 29285 bytes .../chart2dump/data/stacked_column_chart.ods | Bin 0 -> 29893 bytes .../data/stacked_line_chart_lines_and_points.ods | Bin 0 -> 23638 bytes .../data/stacked_line_chart_lines_only.ods | Bin 0 -> 23312 bytes .../data/stacked_line_chart_points_only.ods | Bin 0 -> 23484 bytes chart2/qa/extras/chart2dump/data/tdf118150.xlsx | Bin 0 -> 14212 bytes chart2/qa/extras/chart2dump/data/vertical_grid.ods | Bin 0 -> 31470 bytes .../reference/areacharttest/normal_area_chart.txt | 62 + .../areacharttest/percent_stacked_area_chart.txt | 62 + .../reference/areacharttest/stacked_area_chart.txt | 62 + .../axisgeometrytest/axis_special_positioning.txt | 38 + .../axisgeometrytest/default_formated_axis.txt | 38 + .../axisgeometrytest/formated_axis_lines.txt | 38 + .../axisgeometrytest/rotated_axis_labels.txt | 38 + .../axislabeltest/default_formated_axis.txt | 96 + .../axislabeltest/formated_axis_labels.txt | 96 + .../axislabeltest/percent_stacked_column_chart.txt | 96 + .../axislabeltest/rotated_axis_labels.txt | 60 + .../reference/axislabeltest/tdf118150.txt | 216 ++ .../chartdatatest/multiple_categories.txt | 70 + .../reference/chartdatatest/simple_chart.txt | 50 + .../chartwall_auto_adjust_with_titles.txt | 10 + .../chartwall_auto_adjust_without_titles.txt | 10 + .../chartwalltest/chartwall_custom_positioning.txt | 10 + .../reference/chartwalltest/formated_chartwall.txt | 10 + .../column_chart_small_spacing.txt | 162 ++ .../columnbarcharttest/normal_bar_chart.txt | 162 ++ .../columnbarcharttest/normal_column_chart.txt | 162 ++ .../percent_stacked_bar_chart.txt | 162 ++ .../percent_stacked_column_chart.txt | 162 ++ .../columnbarcharttest/stacked_bar_chart.txt | 162 ++ .../columnbarcharttest/stacked_column_chart.txt | 162 ++ .../reference/gridtest/formated_grid_line.txt | 17 + .../reference/gridtest/horizontal_grid.txt | 17 + .../chart2dump/reference/gridtest/minor_grid.txt | 68 + .../reference/gridtest/vertical_grid.txt | 17 + .../legendtest/custom_legend_position.txt | 50 + .../reference/legendtest/legend_on_bottom.txt | 50 + .../reference/legendtest/legend_on_left_side.txt | 50 + .../reference/legendtest/legend_on_right_side.txt | 18 + .../reference/legendtest/legend_on_top.txt | 50 + .../reference/legendtest/many_legend_entries.txt | 182 ++ .../reference/legendtest/minimal_legend_test.txt | 14 + .../reference/legendtest/multiple_categories.txt | 66 + .../reference/piecharttest/donut_chart.txt | 194 ++ .../reference/piecharttest/exploded_pie_chart.txt | 50 + .../reference/piecharttest/normal_pie_chart.txt | 50 + .../piecharttest/pie_chart_many_slices.txt | 275 ++ .../reference/piecharttest/rotated_pie_chart.txt | 50 + .../pivotchart_data_button.txt | 2 + .../normal_line_chart_lines_and_points.txt | 250 ++ .../normal_line_chart_lines_only.txt | 58 + .../normal_line_chart_points_only.txt | 198 ++ ...percent_stacked_line_chart_lines_and_points.txt | 310 +++ .../percent_stacked_line_chart_lines_only.txt | 58 + .../percent_stacked_line_chart_points_only.txt | 258 ++ .../scatter_chart_lines_and_points.txt | 310 +++ .../scatter_chart_lines_only.txt | 58 + .../scatter_chart_points_only.txt | 258 ++ .../stacked_line_chart_lines_and_points.txt | 310 +++ .../stacked_line_chart_lines_only.txt | 58 + .../stacked_line_chart_points_only.txt | 258 ++ chart2/qa/extras/chart2export.cxx | 2834 ++++++++++++++++++++ chart2/qa/extras/chart2geometry.cxx | 242 ++ chart2/qa/extras/chart2import.cxx | 2603 ++++++++++++++++++ chart2/qa/extras/charttest.hxx | 614 +++++ chart2/qa/extras/data/doc/chart.doc | Bin 0 -> 15872 bytes chart2/qa/extras/data/docx/3d-bar-label.docx | Bin 0 -> 24163 bytes .../qa/extras/data/docx/Bar_horizontal_cone.docx | Bin 0 -> 18237 bytes chart2/qa/extras/data/docx/DisplayUnits.docx | Bin 0 -> 18137 bytes chart2/qa/extras/data/docx/FDO74430.docx | Bin 0 -> 19199 bytes chart2/qa/extras/data/docx/FDO75975.docx | Bin 0 -> 18257 bytes chart2/qa/extras/data/docx/MSO_axis_position.docx | Bin 0 -> 41444 bytes chart2/qa/extras/data/docx/PieChartDataLabels.docx | Bin 0 -> 120403 bytes chart2/qa/extras/data/docx/UpDownBars.docx | Bin 0 -> 24198 bytes chart2/qa/extras/data/docx/area-chart-labels.docx | Bin 0 -> 24123 bytes chart2/qa/extras/data/docx/bar-chart-labels.docx | Bin 0 -> 24357 bytes chart2/qa/extras/data/docx/barChartRotation.docx | Bin 0 -> 24220 bytes chart2/qa/extras/data/docx/bubblechart.docx | Bin 0 -> 17740 bytes chart2/qa/extras/data/docx/chart.docx | Bin 0 -> 17749 bytes .../data/docx/clustered-bar-chart-labels.docx | Bin 0 -> 22977 bytes chart2/qa/extras/data/docx/data-label-borders.docx | Bin 0 -> 34843 bytes .../data/docx/data_point_inherited_color.docx | Bin 0 -> 5426 bytes .../qa/extras/data/docx/doughnut-chart-labels.docx | Bin 0 -> 23902 bytes chart2/qa/extras/data/docx/doughnutChart.docx | Bin 0 -> 17486 bytes .../extras/data/docx/fdo74115_WallBitmapFill.docx | Bin 0 -> 34418 bytes .../data/docx/fdo74115_WallGradientFill.docx | Bin 0 -> 17942 bytes .../docx/fdo78290_Combination_Chart_Marker_x.docx | Bin 0 -> 24245 bytes .../data/docx/fdo78290_Line_Chart_Marker_x.docx | Bin 0 -> 24041 bytes .../data/docx/fdo78290_Scatter_Chart_Marker_x.docx | Bin 0 -> 23747 bytes chart2/qa/extras/data/docx/fdo83058_dlblPos.docx | Bin 0 -> 35931 bytes .../docx/line-chart-label-default-placement.docx | Bin 0 -> 17824 bytes chart2/qa/extras/data/docx/pieChartRotation.docx | Bin 0 -> 23528 bytes .../data/docx/piechart_deleted_legend_entry.docx | Bin 0 -> 27165 bytes chart2/qa/extras/data/docx/radar-chart-labels.docx | Bin 0 -> 24223 bytes .../data/docx/scatter-chart-text-x-values.docx | Bin 0 -> 23974 bytes chart2/qa/extras/data/docx/tdf121744.docx | Bin 0 -> 25221 bytes chart2/qa/extras/data/docx/tdf123206.docx | Bin 0 -> 24223 bytes chart2/qa/extras/data/docx/tdf124083.docx | Bin 0 -> 25793 bytes chart2/qa/extras/data/docx/tdf124243.docx | Bin 0 -> 25872 bytes chart2/qa/extras/data/docx/tdf125337.docx | Bin 0 -> 25063 bytes chart2/qa/extras/data/docx/tdf128794.docx | Bin 0 -> 31616 bytes chart2/qa/extras/data/docx/tdf132174.docx | Bin 0 -> 13865 bytes chart2/qa/extras/data/docx/tdf133632.docx | Bin 0 -> 26280 bytes chart2/qa/extras/data/docx/tdf136650.docx | Bin 0 -> 25543 bytes chart2/qa/extras/data/docx/tdf91250.docx | Bin 0 -> 25895 bytes chart2/qa/extras/data/docx/testAreaChartLoad.docx | Bin 0 -> 23962 bytes .../qa/extras/data/docx/testAxisTitlePosition.docx | Bin 0 -> 26274 bytes chart2/qa/extras/data/docx/testBarChart.docx | Bin 0 -> 23955 bytes .../data/docx/testBarChartDataPointPropDOCX.docx | Bin 0 -> 25590 bytes chart2/qa/extras/data/docx/testChartDataTable.docx | Bin 0 -> 18084 bytes .../docx/testChartTitlePropertiesBitmapFill.docx | Bin 0 -> 47851 bytes .../docx/testChartTitlePropertiesColorFill.docx | Bin 0 -> 5549 bytes .../docx/testChartTitlePropertiesGradientFill.docx | Bin 0 -> 5595 bytes .../docx/testColorGradientWithTransparancy.docx | Bin 0 -> 25872 bytes .../qa/extras/data/docx/testCustomlabeltext.docx | Bin 0 -> 26031 bytes chart2/qa/extras/data/docx/testLabelSeparator.docx | Bin 0 -> 25333 bytes .../data/docx/testMultilevelCategoryAxis.docx | Bin 0 -> 5890 bytes chart2/qa/extras/data/docx/testMultipleChart.docx | Bin 0 -> 47534 bytes .../data/docx/testMultiplechartembeddings.docx | Bin 0 -> 47534 bytes chart2/qa/extras/data/docx/testSeriesIdxOrder.docx | Bin 0 -> 25941 bytes .../extras/data/docx/testSimpleCategoryAxis.docx | Bin 0 -> 31629 bytes chart2/qa/extras/data/docx/testStockChart.docx | Bin 0 -> 19894 bytes chart2/qa/extras/data/docx/testTdf108110.docx | Bin 0 -> 25892 bytes chart2/qa/extras/data/docx/testTdf114179.docx | Bin 0 -> 5839 bytes chart2/qa/extras/data/docx/testTdf122226.docx | Bin 0 -> 19648 bytes .../data/docx/testchartoleobjectembeddings.docx | Bin 0 -> 2041727 bytes .../qa/extras/data/fods/stacked-column-chart.fods | 861 ++++++ chart2/qa/extras/data/odp/chart.odp | Bin 0 -> 14747 bytes .../qa/extras/data/odp/ellipticalGradientFill.odp | Bin 0 -> 17071 bytes chart2/qa/extras/data/odp/tdf119029.odp | Bin 0 -> 13643 bytes chart2/qa/extras/data/odp/tdf121189.odp | Bin 0 -> 16945 bytes chart2/qa/extras/data/odp/tdf123206.odp | Bin 0 -> 19589 bytes chart2/qa/extras/data/ods/ErrorBarRange.ods | Bin 0 -> 17937 bytes chart2/qa/extras/data/ods/PivotChartRoundTrip.ods | Bin 0 -> 21988 bytes chart2/qa/extras/data/ods/PivotTableExample.ods | Bin 0 -> 17183 bytes .../qa/extras/data/ods/axis-numformats-linked.ods | Bin 0 -> 26944 bytes chart2/qa/extras/data/ods/axis_number_format.ods | Bin 0 -> 12662 bytes chart2/qa/extras/data/ods/chart.ods | Bin 0 -> 12599 bytes .../data/ods/combined_chart_secondary_axis.ods | Bin 0 -> 16334 bytes chart2/qa/extras/data/ods/error_bar.ods | Bin 0 -> 13724 bytes chart2/qa/extras/data/ods/error_bar_properties.ods | Bin 0 -> 17387 bytes chart2/qa/extras/data/ods/error_bar_range.ods | Bin 0 -> 13490 bytes chart2/qa/extras/data/ods/fdo60083.ods | Bin 0 -> 14538 bytes chart2/qa/extras/data/ods/labelString.ods | Bin 0 -> 17401 bytes chart2/qa/extras/data/ods/legend_overlay.ods | Bin 0 -> 12314 bytes chart2/qa/extras/data/ods/multilevelcat.ods | Bin 0 -> 13559 bytes chart2/qa/extras/data/ods/multiple_axis.ods | Bin 0 -> 12864 bytes chart2/qa/extras/data/ods/pie_chart_100_and_0.ods | Bin 0 -> 11354 bytes chart2/qa/extras/data/ods/secondary_axis.ods | Bin 0 -> 16783 bytes chart2/qa/extras/data/ods/smoothedLines.ods | Bin 0 -> 16115 bytes chart2/qa/extras/data/ods/stepped_lines.ods | Bin 0 -> 76168 bytes chart2/qa/extras/data/ods/tdf108021.ods | Bin 0 -> 16728 bytes chart2/qa/extras/data/ods/tdf123774.ods | Bin 0 -> 16140 bytes chart2/qa/extras/data/ods/tdf128432.ods | Bin 0 -> 13755 bytes chart2/qa/extras/data/ods/tdf131115.ods | Bin 0 -> 13814 bytes chart2/qa/extras/data/ods/tdf131979.ods | Bin 0 -> 11510 bytes chart2/qa/extras/data/ods/tdf132076.ods | Bin 0 -> 16138 bytes chart2/qa/extras/data/ods/tdf59857.ods | Bin 0 -> 33209 bytes chart2/qa/extras/data/ods/tdf64224.ods | Bin 0 -> 33209 bytes chart2/qa/extras/data/ods/tdf86624.ods | Bin 0 -> 14461 bytes .../extras/data/ods/testChartMainWithSubTitle.ods | Bin 0 -> 12317 bytes chart2/qa/extras/data/ods/testChartSubTitle.ods | Bin 0 -> 12598 bytes .../data/ods/testColorGradientWithTransparancy.ods | Bin 0 -> 17224 bytes chart2/qa/extras/data/ods/test_CrossBetween.ods | Bin 0 -> 12365 bytes chart2/qa/extras/data/ods/trend_calculators.ods | Bin 0 -> 45107 bytes chart2/qa/extras/data/ods/trendline.ods | Bin 0 -> 17563 bytes chart2/qa/extras/data/odt/axis-position.odt | Bin 0 -> 21224 bytes chart2/qa/extras/data/odt/chart.odt | Bin 0 -> 13470 bytes chart2/qa/extras/data/odt/multilevelcat.odt | Bin 0 -> 13942 bytes chart2/qa/extras/data/odt/scatter-plot-labels.odt | Bin 0 -> 13454 bytes chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt | Bin 0 -> 16810 bytes chart2/qa/extras/data/odt/tdf108022.odt | Bin 0 -> 23191 bytes chart2/qa/extras/data/odt/tdf114657.odt | Bin 0 -> 12890 bytes chart2/qa/extras/data/odt/tdf128733.odt | Bin 0 -> 13708 bytes chart2/qa/extras/data/odt/tdf131143.odt | Bin 0 -> 13970 bytes .../extras/data/odt/testPieChartWallLineStyle.odt | Bin 0 -> 16427 bytes chart2/qa/extras/data/ppt/chart.ppt | Bin 0 -> 76800 bytes chart2/qa/extras/data/pptx/bnc864396.pptx | Bin 0 -> 41580 bytes chart2/qa/extras/data/pptx/bnc882383.pptx | Bin 0 -> 43962 bytes chart2/qa/extras/data/pptx/bnc889755.pptx | Bin 0 -> 34771 bytes chart2/qa/extras/data/pptx/chart.pptx | Bin 0 -> 33393 bytes .../data/pptx/percentage-number-formats.pptx | Bin 0 -> 58872 bytes chart2/qa/extras/data/pptx/sparse-chart.pptx | Bin 0 -> 57398 bytes .../data/pptx/stacked-bar-chart-hidden-series.pptx | Bin 0 -> 54370 bytes .../data/pptx/stacked-non-stacked-mix-y-axis.pptx | Bin 0 -> 86216 bytes chart2/qa/extras/data/pptx/tdf105517.pptx | Bin 0 -> 37194 bytes chart2/qa/extras/data/pptx/tdf106217.pptx | Bin 0 -> 47976 bytes chart2/qa/extras/data/pptx/tdf115107-2.pptx | Bin 0 -> 50519 bytes chart2/qa/extras/data/pptx/tdf115107.pptx | Bin 0 -> 50726 bytes chart2/qa/extras/data/pptx/tdf115859.pptx | Bin 0 -> 49120 bytes chart2/qa/extras/data/pptx/tdf116163.pptx | Bin 0 -> 47591 bytes chart2/qa/extras/data/pptx/tdf121205.pptx | Bin 0 -> 42922 bytes chart2/qa/extras/data/pptx/tdf122765.pptx | Bin 0 -> 47625 bytes chart2/qa/extras/data/pptx/tdf125444.pptx | Bin 0 -> 34078 bytes chart2/qa/extras/data/pptx/tdf127393.pptx | Bin 0 -> 64536 bytes chart2/qa/extras/data/pptx/tdf48041.pptx | Bin 0 -> 23937 bytes .../pptx/testChartTitlePropertiesBitmapFill.pptx | Bin 0 -> 50865 bytes .../pptx/testChartTitlePropertiesColorFill.pptx | Bin 0 -> 47424 bytes .../pptx/testChartTitlePropertiesGradientFill.pptx | Bin 0 -> 47473 bytes .../qa/extras/data/xls/axis_sourceformatting.xls | Bin 0 -> 7168 bytes chart2/qa/extras/data/xls/chart.xls | Bin 0 -> 7168 bytes chart2/qa/extras/data/xls/piechart_outside.xls | Bin 0 -> 60928 bytes .../extras/data/xls/source_number_format_axis.xls | Bin 0 -> 7168 bytes .../data/xlsx/add_series_secondary_axis.xlsx | Bin 0 -> 20217 bytes .../qa/extras/data/xlsx/auto_marker_excel10.xlsx | Bin 0 -> 16250 bytes chart2/qa/extras/data/xlsx/autotitledel_2007.xlsx | Bin 0 -> 10455 bytes chart2/qa/extras/data/xlsx/autotitledel_2013.xlsx | Bin 0 -> 13222 bytes .../qa/extras/data/xlsx/axis-label-rotation.xlsx | Bin 0 -> 13698 bytes .../data/xlsx/axis_character_properties.xlsx | Bin 0 -> 10381 bytes .../data/xlsx/axis_title_default_rotation.xlsx | Bin 0 -> 11868 bytes chart2/qa/extras/data/xlsx/axis_title_rotated.xlsx | Bin 0 -> 11579 bytes .../qa/extras/data/xlsx/axis_title_rotation.xlsx | Bin 0 -> 13057 bytes chart2/qa/extras/data/xlsx/bar_chart_simple.xlsx | Bin 0 -> 12966 bytes chart2/qa/extras/data/xlsx/barchart_outend.xlsx | Bin 0 -> 15277 bytes .../qa/extras/data/xlsx/bubble_chart_simple.xlsx | Bin 0 -> 13010 bytes .../data/xlsx/chart-area-style-background.xlsx | Bin 0 -> 13796 bytes .../extras/data/xlsx/chart-area-style-border.xlsx | Bin 0 -> 12006 bytes .../qa/extras/data/xlsx/chart-auto-background.xlsx | Bin 0 -> 11310 bytes chart2/qa/extras/data/xlsx/chart-hatch-fill.xlsx | Bin 0 -> 11579 bytes .../extras/data/xlsx/chart-text-can-overlap.xlsx | Bin 0 -> 13368 bytes chart2/qa/extras/data/xlsx/chart.xlsx | Bin 0 -> 7055 bytes .../extras/data/xlsx/chart_label_text_break.xlsx | Bin 0 -> 13940 bytes chart2/qa/extras/data/xlsx/chart_pie2007.xlsx | Bin 0 -> 11299 bytes chart2/qa/extras/data/xlsx/chart_title.xlsx | Bin 0 -> 13085 bytes .../data/xlsx/combined_chart_secondary_axis.xlsx | Bin 0 -> 15304 bytes chart2/qa/extras/data/xlsx/data_label.xlsx | Bin 0 -> 13057 bytes .../qa/extras/data/xlsx/deleted_data_labels.xlsx | Bin 0 -> 7536 bytes .../qa/extras/data/xlsx/deleted_legend_entry.xlsx | Bin 0 -> 14346 bytes .../qa/extras/data/xlsx/deleted_legend_entry2.xlsx | Bin 0 -> 20060 bytes chart2/qa/extras/data/xlsx/dispBlanksAs_2007.xlsx | Bin 0 -> 10520 bytes chart2/qa/extras/data/xlsx/dispBlanksAs_2013.xlsx | Bin 0 -> 13430 bytes chart2/qa/extras/data/xlsx/external_str_ref.xlsx | Bin 0 -> 23847 bytes chart2/qa/extras/data/xlsx/fdo54361-1.xlsx | Bin 0 -> 11106 bytes chart2/qa/extras/data/xlsx/fdo54361.xlsx | Bin 0 -> 10273 bytes chart2/qa/extras/data/xlsx/fdo70609.xlsx | Bin 0 -> 13654 bytes chart2/qa/extras/data/xlsx/fdo78080.xlsx | Bin 0 -> 7020 bytes chart2/qa/extras/data/xlsx/gapWidth.xlsx | Bin 0 -> 18668 bytes chart2/qa/extras/data/xlsx/hidden_cells.xlsx | Bin 0 -> 11215 bytes .../qa/extras/data/xlsx/legend_manual_layout.xlsx | Bin 0 -> 13145 bytes chart2/qa/extras/data/xlsx/majorTickMark.xlsx | Bin 0 -> 11223 bytes chart2/qa/extras/data/xlsx/markerColor.xlsx | Bin 0 -> 12999 bytes chart2/qa/extras/data/xlsx/minorTickMark.xlsx | Bin 0 -> 11256 bytes chart2/qa/extras/data/xlsx/no_marker.xlsx | Bin 0 -> 13006 bytes chart2/qa/extras/data/xlsx/number-formats.xlsx | Bin 0 -> 12638 bytes .../data/xlsx/pie_chart_datapoint_explosion.xlsx | Bin 0 -> 19237 bytes chart2/qa/extras/data/xlsx/piechart_outside.xlsx | Bin 0 -> 15473 bytes chart2/qa/extras/data/xlsx/plotVisOnly.xlsx | Bin 0 -> 11206 bytes .../extras/data/xlsx/plot_area_manual_layout.xlsx | Bin 0 -> 13142 bytes chart2/qa/extras/data/xlsx/rAngAx.xlsx | Bin 0 -> 11364 bytes .../secondary_axis_title_default_rotation.xlsx | Bin 0 -> 11529 bytes chart2/qa/extras/data/xlsx/smoothed_series.xlsx | Bin 0 -> 12836 bytes .../qa/extras/data/xlsx/smoothed_series2007.xlsx | Bin 0 -> 12351 bytes chart2/qa/extras/data/xlsx/strict_chart.xlsx | Bin 0 -> 12779 bytes chart2/qa/extras/data/xlsx/tdf100084.xlsx | Bin 0 -> 10070 bytes chart2/qa/extras/data/xlsx/tdf108107.xlsx | Bin 0 -> 14277 bytes chart2/qa/extras/data/xlsx/tdf111173.xlsx | Bin 0 -> 16013 bytes chart2/qa/extras/data/xlsx/tdf111824.xlsx | Bin 0 -> 15235 bytes chart2/qa/extras/data/xlsx/tdf114139.xlsx | Bin 0 -> 18794 bytes chart2/qa/extras/data/xlsx/tdf115012.xlsx | Bin 0 -> 13729 bytes .../xlsx/tdf119138-missing-autotitledeleted.xlsx | Bin 0 -> 8424 bytes chart2/qa/extras/data/xlsx/tdf122031.xlsx | Bin 0 -> 13229 bytes chart2/qa/extras/data/xlsx/tdf122915.xlsx | Bin 0 -> 14310 bytes chart2/qa/extras/data/xlsx/tdf124817.xlsx | Bin 0 -> 20868 bytes chart2/qa/extras/data/xlsx/tdf126033.xlsx | Bin 0 -> 20012 bytes chart2/qa/extras/data/xlsx/tdf126115.xlsx | Bin 0 -> 20173 bytes chart2/qa/extras/data/xlsx/tdf127777.xlsx | Bin 0 -> 14421 bytes chart2/qa/extras/data/xlsx/tdf128619.xlsx | Bin 0 -> 13658 bytes chart2/qa/extras/data/xlsx/tdf128627.xlsx | Bin 0 -> 14307 bytes chart2/qa/extras/data/xlsx/tdf128633.xlsx | Bin 0 -> 15018 bytes chart2/qa/extras/data/xlsx/tdf128634.xlsx | Bin 0 -> 14185 bytes chart2/qa/extras/data/xlsx/tdf128732.xlsx | Bin 0 -> 7511 bytes chart2/qa/extras/data/xlsx/tdf130657.xlsx | Bin 0 -> 7468 bytes chart2/qa/extras/data/xlsx/tdf130986.xlsx | Bin 0 -> 15393 bytes chart2/qa/extras/data/xlsx/tdf132076.xlsx | Bin 0 -> 14632 bytes .../qa/extras/data/xlsx/tdf133190_tdf133191.xlsx | Bin 0 -> 12142 bytes chart2/qa/extras/data/xlsx/tdf133376.xlsx | Bin 0 -> 12736 bytes chart2/qa/extras/data/xlsx/tdf134225.xlsx | Bin 0 -> 13956 bytes .../qa/extras/data/xlsx/tdf135184RoundLineCap.xlsx | Bin 0 -> 25538 bytes .../extras/data/xlsx/tdf135184RoundLineCap2.xlsx | Bin 0 -> 21937 bytes chart2/qa/extras/data/xlsx/tdf136267.xlsx | Bin 0 -> 31986 bytes chart2/qa/extras/data/xlsx/tdf90876.xlsx | Bin 0 -> 12736 bytes chart2/qa/extras/data/xlsx/tdfPieNumFormat.xlsx | Bin 0 -> 13917 bytes .../qa/extras/data/xlsx/test3DAreaChartZAxis.xlsx | Bin 0 -> 15501 bytes .../qa/extras/data/xlsx/testAutoTitleDeleted.xlsx | Bin 0 -> 15097 bytes .../data/xlsx/testBarChartDataPointPropXLSX.xlsx | Bin 0 -> 14007 bytes .../xlsx/testChartTitlePropertiesBitmapFill.xlsx | Bin 0 -> 49790 bytes .../xlsx/testChartTitlePropertiesColorFill.xlsx | Bin 0 -> 11515 bytes .../xlsx/testChartTitlePropertiesGradientFill.xlsx | Bin 0 -> 7542 bytes .../qa/extras/data/xlsx/testCombinedChartAxis.xlsx | Bin 0 -> 20857 bytes .../extras/data/xlsx/testCustomPosDataLabels.xlsx | Bin 0 -> 14332 bytes .../data/xlsx/testDataPointLabelCustomPos.xlsx | Bin 0 -> 15069 bytes .../xlsx/testDataseriesOverlapStackedChart.xlsx | Bin 0 -> 11007 bytes chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx | Bin 0 -> 14559 bytes chart2/qa/extras/data/xlsx/testTdf130032.xlsx | Bin 0 -> 14208 bytes chart2/qa/extras/data/xlsx/testTdf90749.xlsx | Bin 0 -> 14505 bytes .../data/xlsx/title_character_properties.xlsx | Bin 0 -> 10355 bytes .../qa/extras/data/xlsx/title_manual_layout.xlsx | Bin 0 -> 13160 bytes chart2/qa/extras/data/xlsx/trendline.xlsx | Bin 0 -> 13397 bytes chart2/qa/extras/data/xlsx/trendline2007.xlsx | Bin 0 -> 12514 bytes chart2/qa/extras/data/xlsx/vary_color.xlsx | Bin 0 -> 13935 bytes chart2/qa/extras/data/xlsx/vary_color2007.xlsx | Bin 0 -> 13142 bytes .../qa/extras/data/xlsx/xAxisLabelsRotation.xlsx | Bin 0 -> 13601 bytes chart2/qa/extras/xshape/chart2xshape.cxx | 253 ++ chart2/qa/extras/xshape/data/ods/fdo75075.ods | Bin 0 -> 15763 bytes .../xshape/data/ods/property-mapping-bar.ods | Bin 0 -> 15481 bytes .../xshape/data/ods/tdf76649_TrendLineBug.ods | Bin 0 -> 12060 bytes chart2/qa/extras/xshape/data/ods/tdf90839-4.ods | Bin 0 -> 19789 bytes .../data/pptx/tdf88154_LabelRotatedLayout.pptx | Bin 0 -> 34771 bytes .../qa/extras/xshape/data/reference/fdo75075.xml | 1692 ++++++++++++ .../xshape/data/reference/property-mapping-bar.xml | 1164 ++++++++ .../qa/extras/xshape/data/reference/tdf90839-1.xml | 336 +++ .../qa/extras/xshape/data/reference/tdf90839-2.xml | 336 +++ .../qa/extras/xshape/data/reference/tdf90839-3.xml | 336 +++ .../qa/extras/xshape/data/reference/tdf90839-4.xml | 336 +++ chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx | Bin 0 -> 13209 bytes chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx | Bin 0 -> 12601 bytes chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx | Bin 0 -> 13312 bytes chart2/qa/unit/chart2-dialogs-test.cxx | 61 + chart2/qa/unit/common_functor_test.cxx | 90 + chart2/qa/unit/data/chart2-dialogs-test.txt | 69 + chart2/qa/unit/data/ods/testChart.ods | Bin 0 -> 11156 bytes chart2/qa/unit/data/reference/testChart.xml | 1216 +++++++++ chart2/qa/unit/data/tolerance.xml | 7 + chart2/qa/unoapi/knownissues.xcl | 58 + chart2/qa/unoapi/sch.sce | 42 + .../qa/unoapi/testdocuments/TransparencyChart.sxs | Bin 0 -> 10810 bytes chart2/qa/unoapi/testdocuments/emptyChart.sds | Bin 0 -> 44544 bytes chart2/qa/unoapi/testdocuments/space-metal.jpg | Bin 0 -> 4313 bytes 379 files changed, 22263 insertions(+) create mode 100644 chart2/qa/TestCaseOldAPI.java create mode 100644 chart2/qa/data.chd create mode 100644 chart2/qa/extras/PivotChartTest.cxx create mode 100644 chart2/qa/extras/chart2_trendcalculators.cxx create mode 100644 chart2/qa/extras/chart2dump/chart2dump.cxx create mode 100644 chart2/qa/extras/chart2dump/data/axis_special_positioning.odp create mode 100644 chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_with_titles.ods create mode 100644 chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_without_titles.ods create mode 100644 chart2/qa/extras/chart2dump/data/chartwall_custom_positioning.ods create mode 100644 chart2/qa/extras/chart2dump/data/column_chart_small_spacing.ods create mode 100644 chart2/qa/extras/chart2dump/data/custom_legend_position.odp create mode 100644 chart2/qa/extras/chart2dump/data/default_formated_axis.odp create mode 100644 chart2/qa/extras/chart2dump/data/donut_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/exploded_pie_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/formated_axis_labels.odp create mode 100644 chart2/qa/extras/chart2dump/data/formated_axis_lines.odp create mode 100644 chart2/qa/extras/chart2dump/data/formated_grid_line.ods create mode 100644 chart2/qa/extras/chart2dump/data/horizontal_grid.ods create mode 100644 chart2/qa/extras/chart2dump/data/legend_on_bottom.odp create mode 100644 chart2/qa/extras/chart2dump/data/legend_on_left_side.odp create mode 100644 chart2/qa/extras/chart2dump/data/legend_on_right_side.odp create mode 100644 chart2/qa/extras/chart2dump/data/legend_on_top.odp create mode 100644 chart2/qa/extras/chart2dump/data/many_legend_entries.odp create mode 100644 chart2/qa/extras/chart2dump/data/minimal_legend_test.odp create mode 100644 chart2/qa/extras/chart2dump/data/minor_grid.ods create mode 100644 chart2/qa/extras/chart2dump/data/multiple_categories.odp create mode 100644 chart2/qa/extras/chart2dump/data/multiple_categories.ods create mode 100644 chart2/qa/extras/chart2dump/data/normal_area_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/normal_bar_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/normal_column_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/normal_line_chart_lines_and_points.ods create mode 100644 chart2/qa/extras/chart2dump/data/normal_line_chart_lines_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/normal_line_chart_points_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/normal_pie_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/percent_stacked_area_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/percent_stacked_bar_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.odp create mode 100644 chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_and_points.ods create mode 100644 chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_points_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/pie_chart_many_slices.ods create mode 100644 chart2/qa/extras/chart2dump/data/pivotchart_data_button.ods create mode 100644 chart2/qa/extras/chart2dump/data/rotated_axis_labels.odp create mode 100644 chart2/qa/extras/chart2dump/data/rotated_pie_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/scatter_chart_lines_and_points.ods create mode 100644 chart2/qa/extras/chart2dump/data/scatter_chart_lines_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/scatter_chart_points_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/simple_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/stacked_area_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/stacked_bar_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/stacked_column_chart.ods create mode 100644 chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_and_points.ods create mode 100644 chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/stacked_line_chart_points_only.ods create mode 100644 chart2/qa/extras/chart2dump/data/tdf118150.xlsx create mode 100644 chart2/qa/extras/chart2dump/data/vertical_grid.ods create mode 100644 chart2/qa/extras/chart2dump/reference/areacharttest/normal_area_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/areacharttest/percent_stacked_area_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/areacharttest/stacked_area_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axisgeometrytest/axis_special_positioning.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axisgeometrytest/default_formated_axis.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axisgeometrytest/formated_axis_lines.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axisgeometrytest/rotated_axis_labels.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axislabeltest/default_formated_axis.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axislabeltest/formated_axis_labels.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axislabeltest/percent_stacked_column_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axislabeltest/rotated_axis_labels.txt create mode 100644 chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt create mode 100644 chart2/qa/extras/chart2dump/reference/chartdatatest/multiple_categories.txt create mode 100644 chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_with_titles.txt create mode 100644 chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_without_titles.txt create mode 100644 chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_custom_positioning.txt create mode 100644 chart2/qa/extras/chart2dump/reference/chartwalltest/formated_chartwall.txt create mode 100644 chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt create mode 100644 chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_bar_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_column_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_bar_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_column_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_bar_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_column_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/gridtest/formated_grid_line.txt create mode 100644 chart2/qa/extras/chart2dump/reference/gridtest/horizontal_grid.txt create mode 100644 chart2/qa/extras/chart2dump/reference/gridtest/minor_grid.txt create mode 100644 chart2/qa/extras/chart2dump/reference/gridtest/vertical_grid.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/custom_legend_position.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/legend_on_bottom.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/legend_on_left_side.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/legend_on_right_side.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/legend_on_top.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/many_legend_entries.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/minimal_legend_test.txt create mode 100644 chart2/qa/extras/chart2dump/reference/legendtest/multiple_categories.txt create mode 100644 chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/piecharttest/exploded_pie_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/piecharttest/normal_pie_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/piecharttest/pie_chart_many_slices.txt create mode 100644 chart2/qa/extras/chart2dump/reference/piecharttest/rotated_pie_chart.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pivotchartdatabuttontest/pivotchart_data_button.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_and_points.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_only.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_points_only.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_and_points.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_only.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_points_only.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_and_points.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_only.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_points_only.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_and_points.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_only.txt create mode 100644 chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_points_only.txt create mode 100644 chart2/qa/extras/chart2export.cxx create mode 100644 chart2/qa/extras/chart2geometry.cxx create mode 100644 chart2/qa/extras/chart2import.cxx create mode 100644 chart2/qa/extras/charttest.hxx create mode 100644 chart2/qa/extras/data/doc/chart.doc create mode 100644 chart2/qa/extras/data/docx/3d-bar-label.docx create mode 100644 chart2/qa/extras/data/docx/Bar_horizontal_cone.docx create mode 100644 chart2/qa/extras/data/docx/DisplayUnits.docx create mode 100644 chart2/qa/extras/data/docx/FDO74430.docx create mode 100644 chart2/qa/extras/data/docx/FDO75975.docx create mode 100644 chart2/qa/extras/data/docx/MSO_axis_position.docx create mode 100644 chart2/qa/extras/data/docx/PieChartDataLabels.docx create mode 100644 chart2/qa/extras/data/docx/UpDownBars.docx create mode 100644 chart2/qa/extras/data/docx/area-chart-labels.docx create mode 100644 chart2/qa/extras/data/docx/bar-chart-labels.docx create mode 100644 chart2/qa/extras/data/docx/barChartRotation.docx create mode 100644 chart2/qa/extras/data/docx/bubblechart.docx create mode 100644 chart2/qa/extras/data/docx/chart.docx create mode 100644 chart2/qa/extras/data/docx/clustered-bar-chart-labels.docx create mode 100644 chart2/qa/extras/data/docx/data-label-borders.docx create mode 100644 chart2/qa/extras/data/docx/data_point_inherited_color.docx create mode 100644 chart2/qa/extras/data/docx/doughnut-chart-labels.docx create mode 100644 chart2/qa/extras/data/docx/doughnutChart.docx create mode 100644 chart2/qa/extras/data/docx/fdo74115_WallBitmapFill.docx create mode 100644 chart2/qa/extras/data/docx/fdo74115_WallGradientFill.docx create mode 100644 chart2/qa/extras/data/docx/fdo78290_Combination_Chart_Marker_x.docx create mode 100644 chart2/qa/extras/data/docx/fdo78290_Line_Chart_Marker_x.docx create mode 100644 chart2/qa/extras/data/docx/fdo78290_Scatter_Chart_Marker_x.docx create mode 100644 chart2/qa/extras/data/docx/fdo83058_dlblPos.docx create mode 100644 chart2/qa/extras/data/docx/line-chart-label-default-placement.docx create mode 100644 chart2/qa/extras/data/docx/pieChartRotation.docx create mode 100644 chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx create mode 100644 chart2/qa/extras/data/docx/radar-chart-labels.docx create mode 100644 chart2/qa/extras/data/docx/scatter-chart-text-x-values.docx create mode 100644 chart2/qa/extras/data/docx/tdf121744.docx create mode 100644 chart2/qa/extras/data/docx/tdf123206.docx create mode 100644 chart2/qa/extras/data/docx/tdf124083.docx create mode 100644 chart2/qa/extras/data/docx/tdf124243.docx create mode 100644 chart2/qa/extras/data/docx/tdf125337.docx create mode 100644 chart2/qa/extras/data/docx/tdf128794.docx create mode 100644 chart2/qa/extras/data/docx/tdf132174.docx create mode 100644 chart2/qa/extras/data/docx/tdf133632.docx create mode 100644 chart2/qa/extras/data/docx/tdf136650.docx create mode 100644 chart2/qa/extras/data/docx/tdf91250.docx create mode 100644 chart2/qa/extras/data/docx/testAreaChartLoad.docx create mode 100644 chart2/qa/extras/data/docx/testAxisTitlePosition.docx create mode 100644 chart2/qa/extras/data/docx/testBarChart.docx create mode 100644 chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx create mode 100644 chart2/qa/extras/data/docx/testChartDataTable.docx create mode 100644 chart2/qa/extras/data/docx/testChartTitlePropertiesBitmapFill.docx create mode 100644 chart2/qa/extras/data/docx/testChartTitlePropertiesColorFill.docx create mode 100644 chart2/qa/extras/data/docx/testChartTitlePropertiesGradientFill.docx create mode 100644 chart2/qa/extras/data/docx/testColorGradientWithTransparancy.docx create mode 100644 chart2/qa/extras/data/docx/testCustomlabeltext.docx create mode 100644 chart2/qa/extras/data/docx/testLabelSeparator.docx create mode 100644 chart2/qa/extras/data/docx/testMultilevelCategoryAxis.docx create mode 100644 chart2/qa/extras/data/docx/testMultipleChart.docx create mode 100644 chart2/qa/extras/data/docx/testMultiplechartembeddings.docx create mode 100644 chart2/qa/extras/data/docx/testSeriesIdxOrder.docx create mode 100644 chart2/qa/extras/data/docx/testSimpleCategoryAxis.docx create mode 100644 chart2/qa/extras/data/docx/testStockChart.docx create mode 100644 chart2/qa/extras/data/docx/testTdf108110.docx create mode 100644 chart2/qa/extras/data/docx/testTdf114179.docx create mode 100644 chart2/qa/extras/data/docx/testTdf122226.docx create mode 100644 chart2/qa/extras/data/docx/testchartoleobjectembeddings.docx create mode 100644 chart2/qa/extras/data/fods/stacked-column-chart.fods create mode 100644 chart2/qa/extras/data/odp/chart.odp create mode 100644 chart2/qa/extras/data/odp/ellipticalGradientFill.odp create mode 100644 chart2/qa/extras/data/odp/tdf119029.odp create mode 100644 chart2/qa/extras/data/odp/tdf121189.odp create mode 100644 chart2/qa/extras/data/odp/tdf123206.odp create mode 100644 chart2/qa/extras/data/ods/ErrorBarRange.ods create mode 100644 chart2/qa/extras/data/ods/PivotChartRoundTrip.ods create mode 100644 chart2/qa/extras/data/ods/PivotTableExample.ods create mode 100644 chart2/qa/extras/data/ods/axis-numformats-linked.ods create mode 100644 chart2/qa/extras/data/ods/axis_number_format.ods create mode 100644 chart2/qa/extras/data/ods/chart.ods create mode 100644 chart2/qa/extras/data/ods/combined_chart_secondary_axis.ods create mode 100644 chart2/qa/extras/data/ods/error_bar.ods create mode 100644 chart2/qa/extras/data/ods/error_bar_properties.ods create mode 100644 chart2/qa/extras/data/ods/error_bar_range.ods create mode 100644 chart2/qa/extras/data/ods/fdo60083.ods create mode 100644 chart2/qa/extras/data/ods/labelString.ods create mode 100644 chart2/qa/extras/data/ods/legend_overlay.ods create mode 100644 chart2/qa/extras/data/ods/multilevelcat.ods create mode 100644 chart2/qa/extras/data/ods/multiple_axis.ods create mode 100644 chart2/qa/extras/data/ods/pie_chart_100_and_0.ods create mode 100644 chart2/qa/extras/data/ods/secondary_axis.ods create mode 100644 chart2/qa/extras/data/ods/smoothedLines.ods create mode 100644 chart2/qa/extras/data/ods/stepped_lines.ods create mode 100644 chart2/qa/extras/data/ods/tdf108021.ods create mode 100644 chart2/qa/extras/data/ods/tdf123774.ods create mode 100644 chart2/qa/extras/data/ods/tdf128432.ods create mode 100644 chart2/qa/extras/data/ods/tdf131115.ods create mode 100644 chart2/qa/extras/data/ods/tdf131979.ods create mode 100644 chart2/qa/extras/data/ods/tdf132076.ods create mode 100644 chart2/qa/extras/data/ods/tdf59857.ods create mode 100644 chart2/qa/extras/data/ods/tdf64224.ods create mode 100644 chart2/qa/extras/data/ods/tdf86624.ods create mode 100644 chart2/qa/extras/data/ods/testChartMainWithSubTitle.ods create mode 100644 chart2/qa/extras/data/ods/testChartSubTitle.ods create mode 100644 chart2/qa/extras/data/ods/testColorGradientWithTransparancy.ods create mode 100644 chart2/qa/extras/data/ods/test_CrossBetween.ods create mode 100644 chart2/qa/extras/data/ods/trend_calculators.ods create mode 100644 chart2/qa/extras/data/ods/trendline.ods create mode 100644 chart2/qa/extras/data/odt/axis-position.odt create mode 100644 chart2/qa/extras/data/odt/chart.odt create mode 100644 chart2/qa/extras/data/odt/multilevelcat.odt create mode 100644 chart2/qa/extras/data/odt/scatter-plot-labels.odt create mode 100644 chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt create mode 100644 chart2/qa/extras/data/odt/tdf108022.odt create mode 100644 chart2/qa/extras/data/odt/tdf114657.odt create mode 100644 chart2/qa/extras/data/odt/tdf128733.odt create mode 100644 chart2/qa/extras/data/odt/tdf131143.odt create mode 100644 chart2/qa/extras/data/odt/testPieChartWallLineStyle.odt create mode 100644 chart2/qa/extras/data/ppt/chart.ppt create mode 100644 chart2/qa/extras/data/pptx/bnc864396.pptx create mode 100644 chart2/qa/extras/data/pptx/bnc882383.pptx create mode 100644 chart2/qa/extras/data/pptx/bnc889755.pptx create mode 100644 chart2/qa/extras/data/pptx/chart.pptx create mode 100644 chart2/qa/extras/data/pptx/percentage-number-formats.pptx create mode 100644 chart2/qa/extras/data/pptx/sparse-chart.pptx create mode 100644 chart2/qa/extras/data/pptx/stacked-bar-chart-hidden-series.pptx create mode 100644 chart2/qa/extras/data/pptx/stacked-non-stacked-mix-y-axis.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf105517.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf106217.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf115107-2.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf115107.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf115859.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf116163.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf121205.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf122765.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf125444.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf127393.pptx create mode 100644 chart2/qa/extras/data/pptx/tdf48041.pptx create mode 100644 chart2/qa/extras/data/pptx/testChartTitlePropertiesBitmapFill.pptx create mode 100644 chart2/qa/extras/data/pptx/testChartTitlePropertiesColorFill.pptx create mode 100644 chart2/qa/extras/data/pptx/testChartTitlePropertiesGradientFill.pptx create mode 100644 chart2/qa/extras/data/xls/axis_sourceformatting.xls create mode 100644 chart2/qa/extras/data/xls/chart.xls create mode 100644 chart2/qa/extras/data/xls/piechart_outside.xls create mode 100644 chart2/qa/extras/data/xls/source_number_format_axis.xls create mode 100644 chart2/qa/extras/data/xlsx/add_series_secondary_axis.xlsx create mode 100644 chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx create mode 100644 chart2/qa/extras/data/xlsx/autotitledel_2007.xlsx create mode 100644 chart2/qa/extras/data/xlsx/autotitledel_2013.xlsx create mode 100644 chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx create mode 100644 chart2/qa/extras/data/xlsx/axis_character_properties.xlsx create mode 100644 chart2/qa/extras/data/xlsx/axis_title_default_rotation.xlsx create mode 100644 chart2/qa/extras/data/xlsx/axis_title_rotated.xlsx create mode 100644 chart2/qa/extras/data/xlsx/axis_title_rotation.xlsx create mode 100644 chart2/qa/extras/data/xlsx/bar_chart_simple.xlsx create mode 100644 chart2/qa/extras/data/xlsx/barchart_outend.xlsx create mode 100644 chart2/qa/extras/data/xlsx/bubble_chart_simple.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart-area-style-background.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart-area-style-border.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart-auto-background.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart-hatch-fill.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart-text-can-overlap.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart_label_text_break.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart_pie2007.xlsx create mode 100644 chart2/qa/extras/data/xlsx/chart_title.xlsx create mode 100644 chart2/qa/extras/data/xlsx/combined_chart_secondary_axis.xlsx create mode 100644 chart2/qa/extras/data/xlsx/data_label.xlsx create mode 100644 chart2/qa/extras/data/xlsx/deleted_data_labels.xlsx create mode 100644 chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx create mode 100644 chart2/qa/extras/data/xlsx/deleted_legend_entry2.xlsx create mode 100644 chart2/qa/extras/data/xlsx/dispBlanksAs_2007.xlsx create mode 100644 chart2/qa/extras/data/xlsx/dispBlanksAs_2013.xlsx create mode 100644 chart2/qa/extras/data/xlsx/external_str_ref.xlsx create mode 100644 chart2/qa/extras/data/xlsx/fdo54361-1.xlsx create mode 100644 chart2/qa/extras/data/xlsx/fdo54361.xlsx create mode 100644 chart2/qa/extras/data/xlsx/fdo70609.xlsx create mode 100644 chart2/qa/extras/data/xlsx/fdo78080.xlsx create mode 100644 chart2/qa/extras/data/xlsx/gapWidth.xlsx create mode 100644 chart2/qa/extras/data/xlsx/hidden_cells.xlsx create mode 100644 chart2/qa/extras/data/xlsx/legend_manual_layout.xlsx create mode 100644 chart2/qa/extras/data/xlsx/majorTickMark.xlsx create mode 100644 chart2/qa/extras/data/xlsx/markerColor.xlsx create mode 100644 chart2/qa/extras/data/xlsx/minorTickMark.xlsx create mode 100644 chart2/qa/extras/data/xlsx/no_marker.xlsx create mode 100644 chart2/qa/extras/data/xlsx/number-formats.xlsx create mode 100644 chart2/qa/extras/data/xlsx/pie_chart_datapoint_explosion.xlsx create mode 100644 chart2/qa/extras/data/xlsx/piechart_outside.xlsx create mode 100644 chart2/qa/extras/data/xlsx/plotVisOnly.xlsx create mode 100644 chart2/qa/extras/data/xlsx/plot_area_manual_layout.xlsx create mode 100644 chart2/qa/extras/data/xlsx/rAngAx.xlsx create mode 100644 chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx create mode 100644 chart2/qa/extras/data/xlsx/smoothed_series.xlsx create mode 100644 chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx create mode 100644 chart2/qa/extras/data/xlsx/strict_chart.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf100084.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf108107.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf111173.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf111824.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf114139.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf115012.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf122031.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf122915.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf124817.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf126033.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf126115.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf127777.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf128619.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf128627.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf128633.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf128634.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf128732.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf130657.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf130986.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf132076.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf133376.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf134225.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf135184RoundLineCap.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf135184RoundLineCap2.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf136267.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdf90876.xlsx create mode 100644 chart2/qa/extras/data/xlsx/tdfPieNumFormat.xlsx create mode 100644 chart2/qa/extras/data/xlsx/test3DAreaChartZAxis.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testChartTitlePropertiesBitmapFill.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testChartTitlePropertiesColorFill.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testChartTitlePropertiesGradientFill.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testCombinedChartAxis.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testCustomPosDataLabels.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testDataPointLabelCustomPos.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testTdf130032.xlsx create mode 100644 chart2/qa/extras/data/xlsx/testTdf90749.xlsx create mode 100644 chart2/qa/extras/data/xlsx/title_character_properties.xlsx create mode 100644 chart2/qa/extras/data/xlsx/title_manual_layout.xlsx create mode 100644 chart2/qa/extras/data/xlsx/trendline.xlsx create mode 100644 chart2/qa/extras/data/xlsx/trendline2007.xlsx create mode 100644 chart2/qa/extras/data/xlsx/vary_color.xlsx create mode 100644 chart2/qa/extras/data/xlsx/vary_color2007.xlsx create mode 100644 chart2/qa/extras/data/xlsx/xAxisLabelsRotation.xlsx create mode 100644 chart2/qa/extras/xshape/chart2xshape.cxx create mode 100644 chart2/qa/extras/xshape/data/ods/fdo75075.ods create mode 100644 chart2/qa/extras/xshape/data/ods/property-mapping-bar.ods create mode 100644 chart2/qa/extras/xshape/data/ods/tdf76649_TrendLineBug.ods create mode 100644 chart2/qa/extras/xshape/data/ods/tdf90839-4.ods create mode 100644 chart2/qa/extras/xshape/data/pptx/tdf88154_LabelRotatedLayout.pptx create mode 100644 chart2/qa/extras/xshape/data/reference/fdo75075.xml create mode 100644 chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml create mode 100644 chart2/qa/extras/xshape/data/reference/tdf90839-1.xml create mode 100644 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml create mode 100644 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml create mode 100644 chart2/qa/extras/xshape/data/reference/tdf90839-4.xml create mode 100644 chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx create mode 100644 chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx create mode 100644 chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx create mode 100644 chart2/qa/unit/chart2-dialogs-test.cxx create mode 100644 chart2/qa/unit/common_functor_test.cxx create mode 100644 chart2/qa/unit/data/chart2-dialogs-test.txt create mode 100644 chart2/qa/unit/data/ods/testChart.ods create mode 100644 chart2/qa/unit/data/reference/testChart.xml create mode 100644 chart2/qa/unit/data/tolerance.xml create mode 100644 chart2/qa/unoapi/knownissues.xcl create mode 100644 chart2/qa/unoapi/sch.sce create mode 100644 chart2/qa/unoapi/testdocuments/TransparencyChart.sxs create mode 100644 chart2/qa/unoapi/testdocuments/emptyChart.sds create mode 100644 chart2/qa/unoapi/testdocuments/space-metal.jpg (limited to 'chart2/qa') diff --git a/chart2/qa/TestCaseOldAPI.java b/chart2/qa/TestCaseOldAPI.java new file mode 100644 index 000000000..613ba480e --- /dev/null +++ b/chart2/qa/TestCaseOldAPI.java @@ -0,0 +1,957 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +// package name: as default, start with complex +package qa; + +import complexlib.ComplexTestCase; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.Type; +import java.io.PrintWriter; +import com.sun.star.lang.*; +import com.sun.star.beans.*; +import com.sun.star.frame.*; +import com.sun.star.chart.*; +import com.sun.star.drawing.*; +import com.sun.star.awt.*; +import com.sun.star.container.*; +import com.sun.star.util.XCloseable; +import com.sun.star.util.CloseVetoException; +import com.sun.star.uno.AnyConverter; +import util.utils; + +/** + * The following Complex Test will test the + * com.sun.star.document.IndexedPropertyValues + * service + */ + +public class TestCaseOldAPI extends ComplexTestCase { + + // The name of the tested service + private static final String testedServiceName = + "com.sun.star.chart.ChartDocument"; + + // The first of the mandatory functions: + /** + * Return the name of the test. + * In this case it is the actual name of the service. + * @return The tested service. + */ + @Override + public String getTestObjectName() { + return testedServiceName; + } + + // The second of the mandatory functions: return all test methods as an + // array. There is only one test function in this example. + /** + * Return all test methods. + * @return The test methods. + */ + @Override + public String[] getTestMethodNames() { + // For some tests a view needs to be created. Accessing the model via + // this program and the view may lead to problems + boolean bAvoidViewCreation = false; + + if( bAvoidViewCreation ) + return new String[] { + "testData", + "testChartType", + "testArea", + "testAggregation", + "testFactory", + "testDataSeriesAndPoints", + "testStatistics", + "testStockProperties" + }; + + return new String[] { + "testData", + "testChartType", + "testTitle", + "testSubTitle", + "testDiagram", + "testAxis", + "testLegend", + "testArea", + "testAggregation", + "testFactory", + "testDataSeriesAndPoints", + "testStatistics", + "testStockProperties" + }; + } + + + + public void before() + { + // set to "true" to get a view + mbCreateView = true; + + if( mbCreateView ) + mxChartModel = createDocument( "schart" ); + else + mxChartModel = createChartModel(); + + mxOldDoc = UnoRuntime.queryInterface( + XChartDocument.class, mxChartModel ); + } + + + + public void after() + { + XCloseable xCloseable = UnoRuntime.queryInterface( + XCloseable.class, mxChartModel ); + assure( "document is no XCloseable", xCloseable != null ); + + // do not close document if there exists a view + if( ! mbCreateView ) + { + try + { + xCloseable.close( true ); + } + catch( CloseVetoException ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + } + + + + public void testTitle() + { + try + { + XPropertySet xDocProp = UnoRuntime.queryInterface( + XPropertySet.class, mxOldDoc ); + assure( "Chart Document is no XPropertySet", xDocProp != null ); + xDocProp.setPropertyValue( "HasMainTitle", Boolean.TRUE); + assure( "Property HasMainTitle", AnyConverter.toBoolean( + xDocProp.getPropertyValue( "HasMainTitle" ))); + + XShape xTitleShape = mxOldDoc.getTitle(); + XPropertySet xTitleProp = UnoRuntime.queryInterface( + XPropertySet.class, xTitleShape ); + + // set property via old API + if( xTitleProp != null ) + { + String aTitle = " Overwritten by Old API "; + float fHeight = (float)17.0; + + xTitleProp.setPropertyValue( "String", aTitle ); + xTitleProp.setPropertyValue( "CharHeight", new Float( fHeight ) ); + + float fNewHeight = AnyConverter.toFloat( xTitleProp.getPropertyValue( "CharHeight" ) ); + assure( "Changing CharHeight via old API failed", fNewHeight == fHeight ); + + String aNewTitle = AnyConverter.toString( xTitleProp.getPropertyValue( "String" ) ); + assure( "Property \"String\" failed", aNewTitle.equals( aTitle )); + } + + // move title + Point aSetPos = new Point(); + aSetPos.X = 1000; + aSetPos.Y = 200; + xTitleShape.setPosition( aSetPos ); + + Point aNewPos = xTitleShape.getPosition(); + assure( "Title Position X", approxEqual( aNewPos.X, aSetPos.X, 1 )); + assure( "Title Position Y", approxEqual( aNewPos.Y, aSetPos.Y, 1 )); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testSubTitle() + { + try + { + XPropertySet xDocProp = UnoRuntime.queryInterface( + XPropertySet.class, mxOldDoc ); + assure( "Chart Document is no XPropertySet", xDocProp != null ); + xDocProp.setPropertyValue( "HasSubTitle", Boolean.TRUE); + assure( "Property HasSubTitle", AnyConverter.toBoolean( + xDocProp.getPropertyValue( "HasSubTitle" ))); + + XShape xTitleShape = mxOldDoc.getSubTitle(); + XPropertySet xTitleProp = UnoRuntime.queryInterface( + XPropertySet.class, xTitleShape ); + + // set Property via old API + if( xTitleProp != null ) + { + int nColor = 0x009acd; // DeepSkyBlue3 + float fWeight = FontWeight.BOLD; + float fHeight = (float)14.0; + + xTitleProp.setPropertyValue( "CharColor", Integer.valueOf( nColor ) ); + xTitleProp.setPropertyValue( "CharWeight", new Float( fWeight )); + xTitleProp.setPropertyValue( "CharHeight", new Float( fHeight ) ); + + int nNewColor = AnyConverter.toInt( xTitleProp.getPropertyValue( "CharColor" ) ); + assure( "Changing CharColor via old API failed", nNewColor == nColor ); + + float fNewWeight = AnyConverter.toFloat( xTitleProp.getPropertyValue( "CharWeight" ) ); + assure( "Changing CharWeight via old API failed", fNewWeight == fWeight ); + + float fNewHeight = AnyConverter.toFloat( xTitleProp.getPropertyValue( "CharHeight" ) ); + assure( "Changing CharHeight via old API failed", fNewHeight == fHeight ); + } + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testDiagram() + { + try + { + // testing wall + XDiagram xDia = mxOldDoc.getDiagram(); + if( xDia != null ) + { + X3DDisplay xDisp = UnoRuntime.queryInterface( + X3DDisplay.class, xDia ); + assure( "X3DDisplay not supported", xDisp != null ); + + // Wall + XPropertySet xProp = xDisp.getWall(); + if( xProp != null ) + { + int nColor = 0xffe1ff; // thistle1 + xProp.setPropertyValue( "FillColor", Integer.valueOf( nColor ) ); + int nNewColor = AnyConverter.toInt( xProp.getPropertyValue( "FillColor" ) ); + assure( "Changing FillColor via old API failed", nNewColor == nColor ); + } + + assure( "Wrong Diagram Type", xDia.getDiagramType().equals( + "com.sun.star.chart.BarDiagram" )); + + // Diagram properties + xProp = UnoRuntime.queryInterface( XPropertySet.class, xDia ); + assure( "Diagram is no property set", xProp != null ); + + // y-axis + boolean bFirstYAxisText = false; + xProp.setPropertyValue( "HasYAxisDescription", Boolean.valueOf( bFirstYAxisText )); + boolean bNewFirstYAxisText = AnyConverter.toBoolean( + xProp.getPropertyValue( "HasYAxisDescription" )); + assure( "Removing description of first y-axis", bNewFirstYAxisText == bFirstYAxisText ); + + // second y-axis + boolean bSecondaryYAxis = true; + xProp.setPropertyValue( "HasSecondaryYAxis", Boolean.valueOf( bSecondaryYAxis )); + boolean bNewSecYAxisValue = AnyConverter.toBoolean( + xProp.getPropertyValue( "HasSecondaryYAxis" )); + assure( "Adding a second y-axis does not work", bNewSecYAxisValue == bSecondaryYAxis ); + + XTwoAxisYSupplier xSecYAxisSuppl = UnoRuntime.queryInterface( + XTwoAxisYSupplier.class, xDia ); + assure( "XTwoAxisYSupplier not implemented", xSecYAxisSuppl != null ); + assure( "No second y-axis found", xSecYAxisSuppl.getSecondaryYAxis() != null ); + } + + // move diagram + { + XShape xDiagramShape = UnoRuntime.queryInterface( + XShape.class, xDia ); + + Point aOldPos = xDiagramShape.getPosition(); + int xDiff = 20; + int yDiff = 20; + Point aSetPos = new Point(); + aSetPos.X = aOldPos.X + xDiff; + aSetPos.Y = aOldPos.Y + yDiff; + xDiagramShape.setPosition( aSetPos ); + + Point aNewPos = xDiagramShape.getPosition(); + assure( "Diagram Position X", approxEqual( aNewPos.X, aSetPos.X, 1 )); + assure( "Diagram Position Y", approxEqual( aNewPos.Y, aSetPos.Y, 1 )); + } + + // size diagram + { + XShape xDiagramShape = UnoRuntime.queryInterface( + XShape.class, xDia ); + + Size aOldSize = xDiagramShape.getSize(); + int xDiff = aOldSize.Width/2+2; + int yDiff = aOldSize.Height/2+2; + Size aSetSize = new Size(); + aSetSize.Width = aOldSize.Width - xDiff; + aSetSize.Height = aOldSize.Height - yDiff; + xDiagramShape.setSize( aSetSize ); + + Size aNewSize = xDiagramShape.getSize(); + assure( "Diagram Width", approxEqual( aNewSize.Width, aSetSize.Width, 2 )); + assure( "Diagram Height", approxEqual( aNewSize.Height, aSetSize.Height, 2 )); + } + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testAxis() + { + try + { + XAxisYSupplier xYAxisSuppl = UnoRuntime.queryInterface( + XAxisYSupplier.class, mxOldDoc.getDiagram() ); + assure( "Diagram is no y-axis supplier", xYAxisSuppl != null ); + + XPropertySet xProp = xYAxisSuppl.getYAxis(); + assure( "No y-axis found", xProp != null ); + + double fMax1, fMax2; + Object oMax = xProp.getPropertyValue( "Max" ); + assure( "No Maximum set", AnyConverter.isDouble( oMax )); + fMax1 = AnyConverter.toDouble( oMax ); + log.println( "Maximum retrieved: " + fMax1 ); + //todo: the view has to be built before there is an explicit value + xProp.setPropertyValue( "AutoMax", Boolean.FALSE); + oMax = xProp.getPropertyValue( "Max" ); + assure( "No Maximum set", AnyConverter.isDouble( oMax )); + fMax2 = AnyConverter.toDouble( oMax ); + log.println( "Maximum with AutoMax off: " + fMax2 ); + assure( "maxima differ", fMax1 == fMax2 ); + + double nNewMax = 12.3; + double nNewOrigin = 2.7; + + xProp.setPropertyValue( "Max", new Double( nNewMax )); + assure( "AutoMax is on", ! AnyConverter.toBoolean( xProp.getPropertyValue( "AutoMax" )) ); + + assure( "Maximum value invalid", + utils.approxEqual( + AnyConverter.toDouble( xProp.getPropertyValue( "Max" )), + nNewMax )); + + xProp.setPropertyValue( "AutoMin", Boolean.TRUE); + assure( "AutoMin is off", AnyConverter.toBoolean( xProp.getPropertyValue( "AutoMin" )) ); + + xProp.setPropertyValue( "Origin", new Double( nNewOrigin )); + assure( "Origin invalid", + utils.approxEqual( + AnyConverter.toDouble( xProp.getPropertyValue( "Origin" )), + nNewOrigin )); + xProp.setPropertyValue( "AutoOrigin", Boolean.TRUE); + assure( "AutoOrigin is off", AnyConverter.toBoolean( xProp.getPropertyValue( "AutoOrigin" )) ); + Object oOrigin = xProp.getPropertyValue( "Origin" ); + assure( "No Origin set", AnyConverter.isDouble( oOrigin )); + log.println( "Origin retrieved: " + AnyConverter.toDouble( oOrigin )); + + xProp.setPropertyValue( "Logarithmic", Boolean.TRUE); + assure( "Scaling is not logarithmic", + AnyConverter.toBoolean( xProp.getPropertyValue( "Logarithmic" )) ); + xProp.setPropertyValue( "Logarithmic", Boolean.FALSE); + assure( "Scaling is not logarithmic", + ! AnyConverter.toBoolean( xProp.getPropertyValue( "Logarithmic" )) ); + + int nNewColor = 0xcd853f; // peru + xProp.setPropertyValue( "LineColor", Integer.valueOf( nNewColor )); + assure( "Property LineColor", + AnyConverter.toInt( xProp.getPropertyValue( "LineColor" )) == nNewColor ); + float fNewCharHeight = (float)(16.0); + xProp.setPropertyValue( "CharHeight", new Float( fNewCharHeight )); + assure( "Property CharHeight", + AnyConverter.toFloat( xProp.getPropertyValue( "CharHeight" )) == fNewCharHeight ); + + int nNewTextRotation = 700; // in 1/100 degrees + xProp.setPropertyValue( "TextRotation", Integer.valueOf( nNewTextRotation )); + assure( "Property TextRotation", + AnyConverter.toInt( xProp.getPropertyValue( "TextRotation" )) == nNewTextRotation ); + + double fStepMain = 10.0; + xProp.setPropertyValue( "StepMain", new Double( fStepMain )); + assure( "Property StepMain", + AnyConverter.toDouble( xProp.getPropertyValue( "StepMain" )) == fStepMain ); + + // note: fStepHelp must be a divider of fStepMain, because + // internally, the help-step is stored as an integer number of + // substeps + double fStepHelp = 5.0; + xProp.setPropertyValue( "StepHelp", new Double( fStepHelp )); + assure( "Property StepHelp", + AnyConverter.toDouble( xProp.getPropertyValue( "StepHelp" )) == fStepHelp ); + + xProp.setPropertyValue( "DisplayLabels", Boolean.FALSE); + assure( "Property DisplayLabels", ! AnyConverter.toBoolean( + xProp.getPropertyValue( "DisplayLabels" ))); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testLegend() + { + XShape xLegend = mxOldDoc.getLegend(); + assure( "No Legend returned", xLegend != null ); + + XPropertySet xLegendProp = UnoRuntime.queryInterface( + XPropertySet.class, xLegend ); + assure( "Legend is no property set", xLegendProp != null ); + + try + { + ChartLegendPosition eNewPos = ChartLegendPosition.BOTTOM; + xLegendProp.setPropertyValue( "Alignment", eNewPos ); + assure( "Property Alignment", + AnyConverter.toObject( + new Type( ChartLegendPosition.class ), + xLegendProp.getPropertyValue( "Alignment" )) == eNewPos ); + + float fNewCharHeight = (float)(11.0); + xLegendProp.setPropertyValue( "CharHeight", new Float( fNewCharHeight )); + assure( "Property CharHeight", + AnyConverter.toFloat( xLegendProp.getPropertyValue( "CharHeight" )) == fNewCharHeight ); + + // move legend + { + Point aOldPos = xLegend.getPosition(); + int xDiff = 20; + int yDiff = 20; + Point aSetPos = new Point(); + aSetPos.X = aOldPos.X + xDiff; + aSetPos.Y = aOldPos.Y + yDiff; + xLegend.setPosition( aSetPos ); + + Point aNewPos = xLegend.getPosition(); + assure( "Legend Position X", approxEqual( aNewPos.X, aSetPos.X, 1 )); + assure( "Legend Position Y", approxEqual( aNewPos.Y, aSetPos.Y, 1 )); + } + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testArea() + { + XPropertySet xArea = mxOldDoc.getArea(); + assure( "No Area", xArea != null ); + + try + { + int nColor = 0xf5fffa; // mint cream + xArea.setPropertyValue( "FillColor", Integer.valueOf( nColor ) ); + xArea.setPropertyValue( "FillStyle", FillStyle.SOLID ); + + int nNewColor = AnyConverter.toInt( xArea.getPropertyValue( "FillColor" ) ); + assure( "Changing FillColor of Area failed", nNewColor == nColor ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testChartType() + { + XMultiServiceFactory xFact = UnoRuntime.queryInterface( + XMultiServiceFactory.class, mxOldDoc ); + assure( "document is no factory", xFact != null ); + + try + { + String aMyServiceName = "com.sun.star.chart.BarDiagram"; + String aServices[] = xFact.getAvailableServiceNames(); + boolean bServiceFound = false; + for( int i = 0; i < aServices.length; ++i ) + { + if( aServices[ i ].equals( aMyServiceName )) + { + bServiceFound = true; + break; + } + } + assure( "getAvailableServiceNames did not return " + aMyServiceName, bServiceFound ); + + if( bServiceFound ) + { + XDiagram xDia = UnoRuntime.queryInterface( + XDiagram.class, xFact.createInstance( aMyServiceName )); + assure( aMyServiceName + " could not be created", xDia != null ); + + mxOldDoc.setDiagram( xDia ); + + XPropertySet xDiaProp = UnoRuntime.queryInterface( + XPropertySet.class, xDia ); + assure( "Diagram is no XPropertySet", xDiaProp != null ); + + xDiaProp.setPropertyValue( "Stacked", Boolean.TRUE); + assure( "StackMode could not be set correctly", + AnyConverter.toBoolean( + xDiaProp.getPropertyValue( "Stacked" ))); + + xDiaProp.setPropertyValue( "Dim3D", Boolean.FALSE); + assure( "Dim3D could not be set correctly", + ! AnyConverter.toBoolean( + xDiaProp.getPropertyValue( "Dim3D" ))); + + xDiaProp.setPropertyValue( "Vertical", Boolean.TRUE); + assure( "Vertical could not be set correctly", + AnyConverter.toBoolean( + xDiaProp.getPropertyValue( "Vertical" ))); + } + + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testAggregation() + { + // query to new type + XChartDocument xDiaProv = UnoRuntime.queryInterface( + XChartDocument.class, mxOldDoc ); + assure( "query to new interface failed", xDiaProv != null ); + + com.sun.star.chart.XChartDocument xDoc = UnoRuntime.queryInterface( + com.sun.star.chart.XChartDocument.class, xDiaProv ); + assure( "querying back to old interface failed", xDoc != null ); + } + + + + public void testDataSeriesAndPoints() + { + try + { + XDiagram xDia = mxOldDoc.getDiagram(); + assure( "Invalid Diagram", xDia != null ); + XMultiServiceFactory xFact = UnoRuntime.queryInterface( + XMultiServiceFactory.class, mxOldDoc ); + assure( "document is no factory", xFact != null ); + + // FillColor + XPropertySet xProp = xDia.getDataRowProperties( 0 ); + int nColor = 0xffd700; // gold + xProp.setPropertyValue( "FillColor", Integer.valueOf( nColor )); + int nNewColor = AnyConverter.toInt( xProp.getPropertyValue( "FillColor" ) ); + assure( "Changing FillColor of Data Series failed", nNewColor == nColor ); + + // Gradient + + // note: the FillGradient property is optional, however it was + // supported in the old chart's API + XNameContainer xGradientTable = UnoRuntime.queryInterface( + XNameContainer.class, + xFact.createInstance( "com.sun.star.drawing.GradientTable" )); + assure( "no gradient table", xGradientTable != null ); + String aGradientName = "NewAPITestGradient"; + Gradient aGradient = new Gradient(); + aGradient.Style = GradientStyle.LINEAR; + aGradient.StartColor = 0xe0ffff; // light cyan + aGradient.EndColor = 0xff8c00; // dark orange + aGradient.Angle = 300; // 30 degrees + aGradient.Border = 15; + aGradient.XOffset = 0; + aGradient.YOffset = 0; + aGradient.StartIntensity = 100; + aGradient.EndIntensity = 80; + aGradient.StepCount = 23; + + xGradientTable.insertByName( aGradientName, aGradient ); + xProp.setPropertyValue( "FillStyle", FillStyle.GRADIENT ); + xProp.setPropertyValue( "FillGradientName", aGradientName ); + String aNewGradientName = AnyConverter.toString( xProp.getPropertyValue( "FillGradientName" )); + assure( "GradientName", aNewGradientName.equals( aGradientName )); + Gradient aNewGradient = (Gradient) AnyConverter.toObject( + new Type( Gradient.class ), + xGradientTable.getByName( aNewGradientName )); + assure( "Gradient Style", aNewGradient.Style == aGradient.Style ); + assure( "Gradient StartColor", aNewGradient.StartColor == aGradient.StartColor ); + assure( "Gradient EndColor", aNewGradient.EndColor == aGradient.EndColor ); + assure( "Gradient Angle", aNewGradient.Angle == aGradient.Angle ); + assure( "Gradient Border", aNewGradient.Border == aGradient.Border ); + assure( "Gradient XOffset", aNewGradient.XOffset == aGradient.XOffset ); + assure( "Gradient YOffset", aNewGradient.YOffset == aGradient.YOffset ); + assure( "Gradient StartIntensity", aNewGradient.StartIntensity == aGradient.StartIntensity ); + assure( "Gradient EndIntensity", aNewGradient.EndIntensity == aGradient.EndIntensity ); + assure( "Gradient StepCount", aNewGradient.StepCount == aGradient.StepCount ); + + // Hatch + xProp = xDia.getDataPointProperties( 1, 0 ); + assure( "No DataPointProperties for (1,0)", xProp != null ); + + // note: the FillHatch property is optional, however it was + // supported in the old chart's API + XNameContainer xHatchTable = UnoRuntime.queryInterface( + XNameContainer.class, + xFact.createInstance( "com.sun.star.drawing.HatchTable" )); + assure( "no hatch table", xHatchTable != null ); + String aHatchName = "NewAPITestHatch"; + Hatch aHatch = new Hatch(); + aHatch.Style = HatchStyle.DOUBLE; + aHatch.Color = 0xd2691e; // chocolate + aHatch.Distance = 200; // 2 mm (?) + aHatch.Angle = 230; // 23 degrees + + xHatchTable.insertByName( aHatchName, aHatch ); + xProp.setPropertyValue( "FillHatchName", aHatchName ); + xProp.setPropertyValue( "FillStyle", FillStyle.HATCH ); + xProp.setPropertyValue( "FillBackground", Boolean.TRUE); + String aNewHatchName = AnyConverter.toString( xProp.getPropertyValue( "FillHatchName" )); + assure( "HatchName", aNewHatchName.equals( aHatchName )); + Hatch aNewHatch = (Hatch) AnyConverter.toObject( + new Type( Hatch.class ), + xHatchTable.getByName( aNewHatchName )); + assure( "Hatch Style", aNewHatch.Style == aHatch.Style ); + assure( "Hatch Color", aNewHatch.Color == aHatch.Color ); + assure( "Hatch Distance", aNewHatch.Distance == aHatch.Distance ); + assure( "Hatch Angle", aNewHatch.Angle == aHatch.Angle ); + assure( "FillBackground", AnyConverter.toBoolean( xProp.getPropertyValue( "FillBackground" )) ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testStatistics() + { + try + { + XDiagram xDia = mxOldDoc.getDiagram(); + assure( "Invalid Diagram", xDia != null ); + + XPropertySet xProp = xDia.getDataRowProperties( 0 ); + assure( "No DataRowProperties for first series", xProp != null ); + + xProp.setPropertyValue( "MeanValue", Boolean.TRUE); + assure( "No MeanValue", AnyConverter.toBoolean( xProp.getPropertyValue( "MeanValue" )) ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void setStockData_Type4() + { + try + { + XPropertySet xDiaProp = UnoRuntime.queryInterface( + XPropertySet.class, mxOldDoc.getDiagram() ); + + ChartDataRowSource eNewSource = ChartDataRowSource.ROWS; + xDiaProp.setPropertyValue( "DataRowSource", eNewSource ); + assure( "Couldn't set \"DataRowSource\" property at Diagram", + AnyConverter.toObject( + new Type( ChartDataRowSource.class ), + xDiaProp.getPropertyValue( "DataRowSource" )) == eNewSource ); + + double aData[][] = + { + { 100.0, 200.0, 300.0, 250.0, 300.0 }, + { 6.5, 4.5, 6.0, 5.5, 3.5 }, + { 1.0, 1.5, 2.0, 2.5, 3.0 }, + { 6.0, 6.5, 7.0, 6.5, 5.0 }, + { 6.0, 5.5, 4.0, 4.5, 4.0 } + }; + + String[] aRowDescriptions = + { + "Volume", "Open", "Min", "Max", "Close" + }; + + String[] aColumnDescriptions = + { + "First Row", "Second Row", "Third Row", "Fourth Row", "Fifth Row" + }; + + + XChartData xData = mxOldDoc.getData(); + XChartDataArray xDataArray = UnoRuntime.queryInterface( + XChartDataArray.class, xData ); + assure( "document has no XChartDataArray", xDataArray != null ); + + xDataArray.setData( aData ); + xDataArray.setRowDescriptions( aRowDescriptions ); + xDataArray.setColumnDescriptions( aColumnDescriptions ); + + mxOldDoc.attachData( xData ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testStockProperties() + { + try + { + setStockData_Type4(); + + XMultiServiceFactory xFact = UnoRuntime.queryInterface( + XMultiServiceFactory.class, mxOldDoc ); + assure( "document is no factory", xFact != null ); + + String aMyServiceName = "com.sun.star.chart.StockDiagram"; + XDiagram xDia = UnoRuntime.queryInterface( + XDiagram.class, xFact.createInstance( aMyServiceName )); + assure( aMyServiceName + " could not be created", xDia != null ); + + mxOldDoc.setDiagram( xDia ); + + XPropertySet xDiaProp = UnoRuntime.queryInterface( + XPropertySet.class, xDia ); + assure( "Diagram is no XPropertySet", xDiaProp != null ); + + xDiaProp.setPropertyValue( "Volume", Boolean.TRUE); + assure( "Has Volume", AnyConverter.toBoolean( xDiaProp.getPropertyValue( "Volume" ))); + + xDiaProp.setPropertyValue( "UpDown", Boolean.TRUE); + assure( "Has UpDown", AnyConverter.toBoolean( xDiaProp.getPropertyValue( "UpDown" ))); + + // MinMaxLine + XStatisticDisplay xMinMaxProvider = UnoRuntime.queryInterface( + XStatisticDisplay.class, xDia ); + assure( "Diagram is no XStatisticDisplay", xMinMaxProvider != null ); + XPropertySet xMinMaxProp = xMinMaxProvider.getMinMaxLine(); + assure( "No MinMaxLine", xMinMaxProp != null ); + + int nLineColor = 0x458b00; // chartreuse4 + xMinMaxProp.setPropertyValue( "LineColor", Integer.valueOf( nLineColor )); + int nNewColor = AnyConverter.toInt( xMinMaxProp.getPropertyValue( "LineColor" ) ); + assure( "Changing LineColor of MinMax Line", nNewColor == nLineColor ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testFactory() + { + try + { + XMultiServiceFactory xFact = UnoRuntime.queryInterface( + XMultiServiceFactory.class, mxOldDoc ); + assure( "document is no factory", xFact != null ); + + Object aTestTable = xFact.createInstance( "com.sun.star.drawing.GradientTable" ); + assure( "Couldn't create gradient table via factory", aTestTable != null ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + + + public void testData() + { + try + { + // set data + double aData[][] = { + { 1.0, 1.5, 2.0, 2.5, 3.0 }, + { 2.0, 2.5, 3.0, 3.5, 4.0 }, + { 3.0, 3.5, 4.0, 4.5, 5.0 } + }; + + String[] aColumnDescriptions = { + "First Column", "Second Column", "Third Column", + "Fourth Column", "Fifth Column" + }; + + String[] aRowDescriptions = { + "First Row", "Second Row", "Third Row" + }; + + XPropertySet xDiaProp = UnoRuntime.queryInterface( + XPropertySet.class, mxOldDoc.getDiagram() ); + ChartDataRowSource eNewSource = ChartDataRowSource.ROWS; + xDiaProp.setPropertyValue( "DataRowSource", eNewSource ); + assure( "Couldn't set \"DataRowSource\" property at Diagram", + AnyConverter.toObject( + new Type( ChartDataRowSource.class ), + xDiaProp.getPropertyValue( "DataRowSource" )) == eNewSource ); + + XChartData xData = mxOldDoc.getData(); + XChartDataArray xDataArray = UnoRuntime.queryInterface( + XChartDataArray.class, xData ); + assure( "document has no XChartDataArray", xDataArray != null ); + + xDataArray.setData( aData ); + xDataArray.setRowDescriptions( aRowDescriptions ); + xDataArray.setColumnDescriptions( aColumnDescriptions ); + + mxOldDoc.attachData( xData ); + + // get data + double aReadData[][]; + String[] aReadColumnDescriptions; + String[] aReadRowDescriptions; + + // refetch data + xData = mxOldDoc.getData(); + xDataArray = UnoRuntime.queryInterface( + XChartDataArray.class, xData ); + assure( "document has no XChartDataArray", xDataArray != null ); + + aReadData = xDataArray.getData(); + aReadRowDescriptions = xDataArray.getRowDescriptions(); + aReadColumnDescriptions = xDataArray.getColumnDescriptions(); + + // compare to values set before + assure( "Data size differs", aData.length == aReadData.length ); + for( int i=0; i= b )); + } +} diff --git a/chart2/qa/data.chd b/chart2/qa/data.chd new file mode 100644 index 000000000..01888e4c1 --- /dev/null +++ b/chart2/qa/data.chd @@ -0,0 +1,14 @@ +# Series Labels +Column_1 Column_2 Column_3 + +# Categories +Row_1 Row_2 Row_3 Row_4 + +# Column 1 +9.1 2.4 3.1 4.3 + +# Column 2 +3.2 8.8 1.5 9.02 + +# Column 3 +4.54 9.65 3.7 6.2 diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx new file mode 100644 index 000000000..91a43cf33 --- /dev/null +++ b/chart2/qa/extras/PivotChartTest.cxx @@ -0,0 +1,986 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "charttest.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace com::sun::star::table { class XCellRange; } +namespace com::sun::star::util { class XNumberFormats; } + +class PivotChartTest : public ChartTest +{ +public: + PivotChartTest() : ChartTest() + {} + + void testRoundtrip(); + void testChangePivotTable(); + void testPivotChartWithOneColumnField(); + void testPivotChartWithOneRowField(); + void testPivotTableDataProvider_PivotTableFields(); + void testPivotChartRowFieldInOutlineMode(); + void testPivotChartWithDateRowField(); + + CPPUNIT_TEST_SUITE(PivotChartTest); + CPPUNIT_TEST(testRoundtrip); + CPPUNIT_TEST(testChangePivotTable); + CPPUNIT_TEST(testPivotChartWithOneColumnField); + CPPUNIT_TEST(testPivotChartWithOneRowField); + CPPUNIT_TEST(testPivotTableDataProvider_PivotTableFields); + CPPUNIT_TEST(testPivotChartRowFieldInOutlineMode); + CPPUNIT_TEST(testPivotChartWithDateRowField); + CPPUNIT_TEST_SUITE_END(); +}; + +namespace +{ + +void lclModifyOrientation(uno::Reference const & xDescriptor, + OUString const & sFieldName, + sheet::DataPilotFieldOrientation eOrientation) +{ + uno::Reference xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); + sal_Int32 nCount = xIndexAccess->getCount(); + for (sal_Int32 i = 0; i < nCount; ++i) + { + uno::Reference xNamed(xIndexAccess->getByIndex(i), UNO_QUERY_THROW); + OUString aName = xNamed->getName(); + uno::Reference xPropSet(xNamed, UNO_QUERY_THROW); + if (aName == sFieldName) + xPropSet->setPropertyValue("Orientation", uno::makeAny(eOrientation)); + } +} + +void lclModifyFunction(uno::Reference const & xDescriptor, + OUString const & sFieldName, + sheet::GeneralFunction eFunction) +{ + uno::Reference xPilotIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); + sal_Int32 nCount = xPilotIndexAccess->getCount(); + for (sal_Int32 i = 0; i < nCount; ++i) + { + uno::Reference xNamed(xPilotIndexAccess->getByIndex(i), UNO_QUERY_THROW); + OUString aName = xNamed->getName(); + uno::Reference xPropSet(xNamed, UNO_QUERY_THROW); + if (aName == sFieldName) + xPropSet->setPropertyValue("Function", uno::makeAny(eFunction)); + } +} + +void lclModifyLayoutInfo(uno::Reference const & xDescriptor, + OUString const & sFieldName, + sheet::DataPilotFieldLayoutInfo aLayoutInfo) +{ + uno::Reference xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); + sal_Int32 nCount = xIndexAccess->getCount(); + for (sal_Int32 i = 0; i < nCount; ++i) + { + uno::Reference xNamed(xIndexAccess->getByIndex(i), UNO_QUERY_THROW); + OUString aName = xNamed->getName(); + uno::Reference xPropSet(xNamed, UNO_QUERY_THROW); + if (aName == sFieldName) + { + uno::Any aValue; + aValue <<= aLayoutInfo; + xPropSet->setPropertyValue("LayoutInfo", aValue); + } + } +} + +void lclModifySubtotals(uno::Reference const & xDescriptor, + OUString const & sFieldName, + uno::Sequence const & rSubtotalFunctions) +{ + uno::Reference xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); + sal_Int32 nCount = xIndexAccess->getCount(); + for (sal_Int32 i = 0; i < nCount; ++i) + { + uno::Reference xNamed(xIndexAccess->getByIndex(i), UNO_QUERY_THROW); + OUString aName = xNamed->getName(); + uno::Reference xPropSet(xNamed, UNO_QUERY_THROW); + if (aName == sFieldName) + { + uno::Any aValue; + aValue <<= rSubtotalFunctions; + xPropSet->setPropertyValue("Subtotals", aValue); + } + } +} + +void lclModifyColumnGrandTotal(uno::Reference const & xDataPilotDescriptor, bool bTotal) +{ + uno::Reference xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW); + xProperties->setPropertyValue("ColumnGrand", uno::makeAny(bTotal)); +} + +void lclModifyRowGrandTotal(uno::Reference const & xDataPilotDescriptor, bool bTotal) +{ + uno::Reference xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW); + xProperties->setPropertyValue("RowGrand", uno::makeAny(bTotal)); +} + +void lclCheckSequence(std::vector const & reference, + uno::Sequence const & values, + double delta) +{ + CPPUNIT_ASSERT_EQUAL(reference.size(), size_t(values.getLength())); + for (size_t i = 0; i < reference.size(); ++i) + { + CPPUNIT_ASSERT_DOUBLES_EQUAL( + reference[i], values[i].get(), delta); + } +} + +void lclCheckCategories(std::vector const & reference, + uno::Reference const & xSequence) +{ + uno::Reference xTextualDataSequence(xSequence, uno::UNO_QUERY_THROW); + uno::Sequence aText = xTextualDataSequence->getTextualData(); + + CPPUNIT_ASSERT_EQUAL(reference.size(), size_t(aText.getLength())); + for (size_t i = 0; i < reference.size(); ++i) + { + CPPUNIT_ASSERT_EQUAL(reference[i], aText[i]); + } +} + +OUString lclGetLabel(Reference const & xChartDoc, sal_Int32 nSeriesIndex) +{ + Reference xLabelDataSequence = getLabelDataSequenceFromDoc(xChartDoc, nSeriesIndex); + return xLabelDataSequence->getData()[0].get(); +} + +uno::Reference lclGetPivotTableByName(sal_Int32 nIndex, OUString const & sPivotTableName, + uno::Reference const & xComponent) +{ + uno::Reference xDoc(xComponent, UNO_QUERY_THROW); + uno::Reference xSheetIndexAccess(xDoc->getSheets(), UNO_QUERY_THROW); + uno::Any aAny = xSheetIndexAccess->getByIndex(nIndex); + uno::Reference xSheet; + CPPUNIT_ASSERT(aAny >>= xSheet); + uno::Reference xDataPilotTablesSupplier(xSheet, uno::UNO_QUERY_THROW); + uno::Reference xDataPilotTables = xDataPilotTablesSupplier->getDataPilotTables(); + return uno::Reference(xDataPilotTables->getByName(sPivotTableName), UNO_QUERY_THROW); +} + +uno::Sequence> + lclGetCategories(Reference const & xChartDoc) +{ + uno::Sequence aArguments( comphelper::InitPropertySequence( + {{"CellRangeRepresentation", uno::Any(OUString("PT@categories"))}} )); + + uno::Reference xDataProvider(xChartDoc->getDataProvider(), uno::UNO_SET_THROW); + return xDataProvider->createDataSource(aArguments)->getDataSequences(); +} + +struct Value +{ + OUString maString; + double mfValue; + bool mbIsValue; + + Value(OUString const & rString) + : maString(rString) + , mfValue(0.0) + , mbIsValue(false) + {} + + Value(double fValue) + : mfValue(fValue) + , mbIsValue(true) + {} +}; + +uno::Reference< sheet::XDataPilotTables> +lclGetDataPilotTables(sal_Int32 nIndex, uno::Reference const & xSheetDoc) +{ + uno::Reference xSpreadsheets = xSheetDoc->getSheets(); + uno::Reference oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW); + uno::Reference xSheet; + CPPUNIT_ASSERT(oIndexAccess->getByIndex(nIndex) >>= xSheet); + + // create the test objects + uno::Reference< sheet::XDataPilotTablesSupplier> xDataPilotTablesSupplier(xSheet, uno::UNO_QUERY_THROW); + return xDataPilotTablesSupplier->getDataPilotTables(); +} + +table::CellRangeAddress lclCreateTestData(uno::Reference const & xSheetDoc) +{ + CPPUNIT_ASSERT_MESSAGE("no calc document!", xSheetDoc.is()); + + std::vector aHeaders { + "Country", "City", "Type", "Sales T1", "Sales T2", "Sales T3", "Sales T4", "Date" + }; + + std::vector> aData { + { {"FR"}, {"Paris"}, {"A"}, {123.0}, {223.0}, {323.0}, {423.0}, {"12/14/15"} }, + { {"EN"}, {"London"}, {"A"}, {456.0}, {556.0}, {656.0}, {756.0}, {"12/11/15"} }, + { {"DE"}, {"Berlin"}, {"A"}, {468.0}, {568.0}, {668.0}, {768.0}, {"12/11/15"} }, + { {"FR"}, {"Nantes"}, {"A"}, {694.0}, {794.0}, {894.0}, {994.0}, {"12/11/15"} }, + { {"EN"}, {"Glasgow"}, {"A"}, {298.0}, {398.0}, {498.0}, {598.0}, {"12/11/15"} }, + { {"DE"}, {"Munich"}, {"A"}, {369.0}, {469.0}, {569.0}, {669.0}, {"12/11/15"} }, + { {"FR"}, {"Paris"}, {"B"}, {645.0}, {745.0}, {845.0}, {945.0}, {"12/11/15"} }, + { {"EN"}, {"London"}, {"B"}, {687.0}, {787.0}, {887.0}, {987.0}, {"03/21/17"} }, + { {"DE"}, {"Munich"}, {"B"}, {253.0}, {353.0}, {453.0}, {553.0}, {"12/17/15"} }, + { {"FR"}, {"Nantes"}, {"B"}, {474.0}, {574.0}, {674.0}, {774.0}, {"01/20/16"} }, + { {"EN"}, {"Liverpool"}, {"B"}, {562.0}, {662.0}, {762.0}, {862.0}, {"01/20/16"} }, + { {"DE"}, {"Berlin"}, {"B"}, {648.0}, {748.0}, {848.0}, {948.0}, {"01/20/16"} } + }; + + // Getting spreadsheet + uno::Reference xSpreadsheets = xSheetDoc->getSheets(); + uno::Reference oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW); + uno::Reference xSheet; + CPPUNIT_ASSERT(oIndexAccess->getByIndex(0) >>= xSheet); + + uno::Reference oPivotTableSheet; + xSpreadsheets->insertNewByName("Pivot Table", 1); + CPPUNIT_ASSERT(oIndexAccess->getByIndex(1) >>= oPivotTableSheet); + + sal_Int32 currentRow = 0; + for (size_t column = 0; column < aHeaders.size(); ++column) + { + xSheet->getCellByPosition(column, currentRow)->setFormula(aHeaders[column]); + } + currentRow++; + + for (std::vector const & rRowOfData : aData) + { + for (size_t column = 0; column < rRowOfData.size(); ++column) + { + Value const & rValue = rRowOfData[column]; + uno::Reference xCell(xSheet->getCellByPosition(column, currentRow)); + if (rValue.mbIsValue) + xCell->setValue(rValue.mfValue); + else + xCell->setFormula(rValue.maString); + } + currentRow++; + } + + sal_Int32 nEndCol = sal_Int32(aHeaders.size() - 1); + sal_Int32 nEndRow = sal_Int32(1/*HEADER*/ + aData.size() - 1); + + // Apply date format to the last column + uno::Reference xNumberFormatsSupplier(xSheetDoc, UNO_QUERY_THROW); + uno::Reference xNumberFormats = xNumberFormatsSupplier->getNumberFormats(); + uno::Reference xNumberFormatTypes(xNumberFormats, UNO_QUERY_THROW); + lang::Locale aLocale; + sal_Int32 nDateKey = xNumberFormatTypes->getStandardFormat(util::NumberFormat::DATE, aLocale); + uno::Reference xCellRange = xSheet->getCellRangeByPosition(nEndCol, 1, nEndCol, nEndRow); + uno::Reference xCellProp(xCellRange, UNO_QUERY_THROW); + xCellProp->setPropertyValue("NumberFormat", uno::makeAny(nDateKey)); + + table::CellRangeAddress sCellRangeAdress; + sCellRangeAdress.Sheet = 0; + sCellRangeAdress.StartColumn = 0; + sCellRangeAdress.StartRow = 0; + sCellRangeAdress.EndColumn = nEndCol; + sCellRangeAdress.EndRow = nEndRow; + + return sCellRangeAdress; +} + +} // end anonymous namespace + +void PivotChartTest::testRoundtrip() +{ + uno::Sequence xSequence; + Reference xChartDoc; + + std::vector aReference1 { 10162.033139, 16614.523063, 27944.146101 }; + OUString const aExpectedLabel1("Exp."); + + std::vector aReference2 { 101879.458079, 178636.929704, 314626.484864 }; + OUString const aExpectedLabel2("Rev."); + + load("/chart2/qa/extras/data/ods/", "PivotChartRoundTrip.ods"); + + xChartDoc = getPivotChartDocFromSheet(1, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getNumberOfDataSeries(xChartDoc)); + + // Check the data series + { + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference1, xSequence, 1E-4); + CPPUNIT_ASSERT_EQUAL(aExpectedLabel1, lclGetLabel(xChartDoc, 0)); + } + { + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + lclCheckSequence(aReference2, xSequence, 1E-4); + CPPUNIT_ASSERT_EQUAL(aExpectedLabel2, lclGetLabel(xChartDoc, 1)); + } + + // Modify the pivot table + { + uno::Reference xDataPilotTable = lclGetPivotTableByName(1, "DataPilot1", mxComponent); + uno::Reference xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW); + lclModifyOrientation(xDataPilotDescriptor, "Exp.", sheet::DataPilotFieldOrientation_HIDDEN); + } + + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); + + // Check again the data series + { + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference2, xSequence, 1E-4); + CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); + } + + reload("calc8"); + + xChartDoc = getPivotChartDocFromSheet(1, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); + + // Check again the data series + { + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference2, xSequence, 1E-4); + CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); + } +} + +void PivotChartTest::testChangePivotTable() +{ + uno::Sequence xSequence; + Reference xChartDoc; + + load("/chart2/qa/extras/data/ods/", "PivotTableExample.ods"); + + // Check we have the Pivot Table + OUString sPivotTableName("DataPilot1"); + uno::Reference xDataPilotTable = lclGetPivotTableByName(1, sPivotTableName, mxComponent); + CPPUNIT_ASSERT(xDataPilotTable.is()); + + // Check that we don't have any pivot chart in the document + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet(1, mxComponent); + uno::Reference xIndexAccess(xTablePivotCharts, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount()); + + // Create a new pivot chart + xTablePivotCharts->addNewByName("Chart", awt::Rectangle{0, 0, 9000, 9000}, sPivotTableName); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + + // Get the pivot chart document so we can access its data + xChartDoc.set(getPivotChartDocFromSheet(xTablePivotCharts, 0)); + + CPPUNIT_ASSERT(xChartDoc.is()); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getNumberOfDataSeries(xChartDoc)); + + // Check first data series + { + std::vector aReference { 10162.033139, 16614.523063, 27944.146101 }; + OUString const aExpectedLabel("Exp."); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 0)); + } + + // Check second data series + { + std::vector aReference { 101879.458079, 178636.929704, 314626.484864 }; + OUString const aExpectedLabel("Rev."); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 1)); + } + + // Modify the pivot table, move "Group Segment" to Column fields, + // add "Service Month" to Row fields, remove "Rev." Data field + { + uno::Reference xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW); + + lclModifyOrientation(xDataPilotDescriptor, "Service Month", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "Group Segment", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, "Rev.", sheet::DataPilotFieldOrientation_HIDDEN); + } + + // Check the pivot chart again as we expect it has been updated when we updated the pivot table + + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getNumberOfDataSeries(xChartDoc)); + + // Check the first data series + { + std::vector aReference { 2855.559, 1780.326, 2208.713, 2130.064, 1187.371 }; + OUString const aExpectedLabel("Big"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 0)); + } + + // Check the second data series + { + std::vector aReference { 4098.908, 2527.286, 4299.716, 2362.225, 3326.389 }; + OUString const aExpectedLabel("Medium"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 1)); + } + + // Check the third data series + { + std::vector aReference { 4926.303, 5684.060, 4201.398, 7290.795, 5841.591 }; + OUString const aExpectedLabel("Small"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 2)); + } + + // Remove "Service Month" so row fields are empty - check we handle empty rows + { + uno::Reference xDataPilotDescriptor(xDataPilotTable, uno::UNO_QUERY_THROW); + lclModifyOrientation(xDataPilotDescriptor, "Service Month", sheet::DataPilotFieldOrientation_HIDDEN); + } + + // Check the pivot chart again as we expect it has been updated when we updated the pivot table + + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getNumberOfDataSeries(xChartDoc)); + + // Check the first data series + { + std::vector aReference { 10162.033139 }; + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0)); + } + // Check the second data series + { + std::vector aReference { 16614.523063 }; + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1)); + } + // Check the third data series + { + std::vector aReference { 27944.146101 }; + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2)); + } + + // Enable column totals and check the data is still unchanged + { + uno::Reference xProperties(xDataPilotTable, uno::UNO_QUERY_THROW); + xProperties->setPropertyValue("ColumnGrand", uno::makeAny(true)); + } + + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getNumberOfDataSeries(xChartDoc)); + + // Check the first data series + { + std::vector aReference { 10162.033139 }; + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0)); + } + // Check the second data series + { + std::vector aReference { 16614.523063 }; + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1)); + } + // Check the third data series + { + std::vector aReference { 27944.146101 }; + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + lclCheckSequence(aReference, xSequence, 1E-3); + CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2)); + } +} + +void PivotChartTest::testPivotChartWithOneColumnField() +{ + // We put one field as COLUMN field only and one DATA field. We expect we will get as many data series + // in the pivot table as many distinct column values we have (with this example data 3: DE, EN, FR). + + // SETUP DATA and PIVOT TABLE + + if (!mxComponent.is()) + mxComponent = loadFromDesktop("private:factory/scalc"); + + uno::Reference xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); + + OUString sPivotTableName("DataPilotTable"); + + table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc); + + uno::Reference xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc); + + uno::Reference xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); + xDataPilotDescriptor->setSourceRange(sCellRangeAdress); + + lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + + xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); + + // TEST + + uno::Sequence xSequence; + Reference xChartDoc; + + // Check we have the Pivot Table + + uno::Reference xDataPilotTable = lclGetPivotTableByName(1, sPivotTableName, mxComponent); + CPPUNIT_ASSERT(xDataPilotTable.is()); + + // Check that we don't have any pivot chart in the document + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet(1, mxComponent); + uno::Reference xIndexAccess(xTablePivotCharts, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount()); + + // Create a new pivot chart + xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + + // Get the pivot chart document so we can access its data + xChartDoc.set(getPivotChartDocFromSheet(xTablePivotCharts, 0)); + + CPPUNIT_ASSERT(xChartDoc.is()); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getNumberOfDataSeries(xChartDoc)); + // Check data series 1 + { + std::vector aReference { 1738.0 }; + OUString const aExpectedLabel("DE"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 0)); + } + + // Check data series 2 + { + std::vector aReference { 2003.0 }; + OUString const aExpectedLabel("EN"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 1)); + } + // Check data series 3 + { + std::vector aReference { 1936.0 }; + OUString const aExpectedLabel("FR"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 2)); + } +} + +void PivotChartTest::testPivotChartWithOneRowField() +{ + // We put one field as ROW field only and one DATA field. We expect we will get one data series + // in the pivot table. + + // SETUP DATA and PIVOT TABLE + + if (!mxComponent.is()) + mxComponent = loadFromDesktop("private:factory/scalc"); + + uno::Reference xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); + + OUString sPivotTableName("DataPilotTable"); + + table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc); + + uno::Reference xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc); + + uno::Reference xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); + xDataPilotDescriptor->setSourceRange(sCellRangeAdress); + + lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + + xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); + + // TEST + + uno::Sequence xSequence; + Reference xChartDoc; + + // Check we have the Pivot Table + + uno::Reference xDataPilotTable = lclGetPivotTableByName(1, sPivotTableName, mxComponent); + CPPUNIT_ASSERT(xDataPilotTable.is()); + + // Check that we don't have any pivot chart in the document + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet(1, mxComponent); + uno::Reference xIndexAccess(xTablePivotCharts, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount()); + + // Create a new pivot chart + xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + + // Get the pivot chart document so we can access its data + xChartDoc.set(getPivotChartDocFromSheet(xTablePivotCharts, 0)); + + CPPUNIT_ASSERT(xChartDoc.is()); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); + // Check data series 1 + { + std::vector aReference { 1738.0, 2003.0, 1936.0 }; + OUString const aExpectedLabel("Total"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 0)); + } +} + +void PivotChartTest::testPivotTableDataProvider_PivotTableFields() +{ + // SETUP DATA and PIVOT TABLE + + if (!mxComponent.is()) + mxComponent = loadFromDesktop("private:factory/scalc"); + + uno::Reference xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); + + OUString sPivotTableName("DataPilotTable"); + + table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc); + + uno::Reference xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc); + + uno::Reference xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); + xDataPilotDescriptor->setSourceRange(sCellRangeAdress); + + lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + lclModifyOrientation(xDataPilotDescriptor, "Sales T2", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, "Sales T2", sheet::GeneralFunction_SUM); + + lclModifyColumnGrandTotal(xDataPilotDescriptor, true); + lclModifyRowGrandTotal(xDataPilotDescriptor, true); + + xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); + + // TEST + Reference xChartDoc; + + // Check we have the Pivot Table + uno::Reference xDataPilotTable = lclGetPivotTableByName(1, sPivotTableName, mxComponent); + CPPUNIT_ASSERT(xDataPilotTable.is()); + + // refetch the XDataPilotDescriptor + xDataPilotDescriptor.set(xDataPilotTable, uno::UNO_QUERY_THROW); + + // Check that we don't have any pivot chart in the document + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet(1, mxComponent); + uno::Reference xIndexAccess(xTablePivotCharts, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount()); + + // Create a new pivot chart + xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + + // Get the pivot chart document so we can access its data + xChartDoc.set(getPivotChartDocFromSheet(xTablePivotCharts, 0)); + + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xPivotTableDataProvider(xChartDoc->getDataProvider(), UNO_QUERY_THROW); + uno::Sequence aFieldEntries; + + aFieldEntries = xPivotTableDataProvider->getColumnFields(); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Country"), aFieldEntries[0].Name); + CPPUNIT_ASSERT_EQUAL(OUString("Type"), aFieldEntries[1].Name); + + aFieldEntries = xPivotTableDataProvider->getRowFields(); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("City"), aFieldEntries[0].Name); + CPPUNIT_ASSERT_EQUAL(OUString("Data"), aFieldEntries[1].Name); + + aFieldEntries = xPivotTableDataProvider->getDataFields(); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T1"), aFieldEntries[0].Name); + CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name); + + // Data to column fields + lclModifyOrientation(xDataPilotDescriptor, "Data", sheet::DataPilotFieldOrientation_COLUMN); + + // Change the order of column fields: expected data, type, country + lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_HIDDEN); + lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_HIDDEN); + + lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN); + + // set the XPivotTableDataProvider again as the old one was exchanged + xPivotTableDataProvider.set(xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW); + + aFieldEntries = xPivotTableDataProvider->getColumnFields(); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aFieldEntries.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Data"), aFieldEntries[0].Name); + CPPUNIT_ASSERT_EQUAL(OUString("Type"), aFieldEntries[1].Name); + CPPUNIT_ASSERT_EQUAL(OUString("Country"), aFieldEntries[2].Name); + + aFieldEntries = xPivotTableDataProvider->getRowFields(); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aFieldEntries.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("City"), aFieldEntries[0].Name); + + aFieldEntries = xPivotTableDataProvider->getDataFields(); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T1"), aFieldEntries[0].Name); + CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name); +} + +void PivotChartTest::testPivotChartRowFieldInOutlineMode() +{ + // SETUP DATA and PIVOT TABLE + + if (!mxComponent.is()) + mxComponent = loadFromDesktop("private:factory/scalc"); + + uno::Reference xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); + + OUString sPivotTableName("DataPilotTable"); + + table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc); + + uno::Reference xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc); + + uno::Reference xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); + xDataPilotDescriptor->setSourceRange(sCellRangeAdress); + + lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); + + // TEST + uno::Sequence xSequence; + Reference xChartDoc; + + // Check we have the Pivot Table + uno::Reference xDataPilotTable = lclGetPivotTableByName(1, sPivotTableName, mxComponent); + CPPUNIT_ASSERT(xDataPilotTable.is()); + + // refetch the XDataPilotDescriptor + xDataPilotDescriptor.set(xDataPilotTable, uno::UNO_QUERY_THROW); + + // Check that we don't have any pivot chart in the document + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet(1, mxComponent); + uno::Reference xIndexAccess(xTablePivotCharts, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount()); + + // Create a new pivot chart + xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + + // Get the pivot chart document so we can access its data + xChartDoc.set(getPivotChartDocFromSheet(xTablePivotCharts, 0)); + + CPPUNIT_ASSERT(xChartDoc.is()); + + // Test case with defaults + + // Check when using defaults the data is as expected + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); + { + std::vector aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 }; + OUString const aExpectedLabel("Total"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 0)); + } + // Check the categories + { + lclCheckCategories({ "DE", "", "EN", "", "", "FR", ""}, + lclGetCategories(xChartDoc)[0]->getValues()); + lclCheckCategories({ "Berlin", "Munich", "Glasgow", "Liverpool", "London", "Nantes", "Paris"}, + lclGetCategories(xChartDoc)[1]->getValues()); + } + + sheet::DataPilotFieldLayoutInfo aLayoutInfoValue; + uno::Sequence aGeneralFunctionSequence(1); + + // Test case where we enable subtotals (auto) and set the outline subtotals at the bottom + // We don't expect any change in data as every extra subtotal row should be ignored + + // Enable subtotals - set to auto + aGeneralFunctionSequence[0] = sheet::GeneralFunction_AUTO; + lclModifySubtotals(xDataPilotDescriptor, "Country", aGeneralFunctionSequence); + // Set Subtotals layout to bottom + add empty lines + aLayoutInfoValue.AddEmptyLines = true; + aLayoutInfoValue.LayoutMode = sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM; + lclModifyLayoutInfo(xDataPilotDescriptor, "Country", aLayoutInfoValue); + + // Check data is unchanged + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); + { + std::vector aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 }; + OUString const aExpectedLabel("Total"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 0)); + } + // Check categories + { + lclCheckCategories({ "DE", "", "EN", "", "", "FR", ""}, + lclGetCategories(xChartDoc)[0]->getValues()); + lclCheckCategories({ "Berlin", "Munich", "Glasgow", "Liverpool", "London", "Nantes", "Paris"}, + lclGetCategories(xChartDoc)[1]->getValues()); + } + + // Test case where we enable subtotals (auto) and set the outline subtotals at the top + // We don't expect any change in data as every extra subtotal row should be ignored + + // Enable subtotals - set to auto + aGeneralFunctionSequence[0] = sheet::GeneralFunction_AUTO; + lclModifySubtotals(xDataPilotDescriptor, "Country", aGeneralFunctionSequence); + // Set Subtotals layout to top + add empty lines + aLayoutInfoValue.AddEmptyLines = true; + aLayoutInfoValue.LayoutMode = sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP; + lclModifyLayoutInfo(xDataPilotDescriptor, "Country", aLayoutInfoValue); + + // Check data is unchanged + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); + { + std::vector aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 }; + OUString const aExpectedLabel("Total"); + + xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + lclCheckSequence(aReference, xSequence, 1E-4); + + CPPUNIT_ASSERT_EQUAL(aExpectedLabel, lclGetLabel(xChartDoc, 0)); + } + // Check categories + { + lclCheckCategories({ "DE", "", "EN", "", "", "FR", ""}, + lclGetCategories(xChartDoc)[0]->getValues()); + lclCheckCategories({ "Berlin", "Munich", "Glasgow", "Liverpool", "London", "Nantes", "Paris"}, + lclGetCategories(xChartDoc)[1]->getValues()); + } +} + +void PivotChartTest::testPivotChartWithDateRowField() +{ + // SETUP DATA and PIVOT TABLE + + if (!mxComponent.is()) + mxComponent = loadFromDesktop("private:factory/scalc"); + + uno::Reference xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); + + OUString sPivotTableName("DataPilotTable"); + + table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc); + + uno::Reference xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc); + + uno::Reference xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); + xDataPilotDescriptor->setSourceRange(sCellRangeAdress); + + lclModifyOrientation(xDataPilotDescriptor, "Date", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + + lclModifyColumnGrandTotal(xDataPilotDescriptor, true); + lclModifyRowGrandTotal(xDataPilotDescriptor, true); + + xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); + + // TEST + Reference xChartDoc; + + // Check we have the Pivot Table + uno::Reference xDataPilotTable = lclGetPivotTableByName(1, sPivotTableName, mxComponent); + CPPUNIT_ASSERT(xDataPilotTable.is()); + + // refetch the XDataPilotDescriptor + xDataPilotDescriptor.set(xDataPilotTable, uno::UNO_QUERY_THROW); + + // Check that we don't have any pivot chart in the document + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet(1, mxComponent); + uno::Reference xIndexAccess(xTablePivotCharts, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount()); + + // Create a new pivot chart + xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + + // Get the pivot chart document so we can access its data + xChartDoc.set(getPivotChartDocFromSheet(xTablePivotCharts, 0)); + + CPPUNIT_ASSERT(xChartDoc.is()); + + // Check if Date category is date formatted. + lclCheckCategories( { "12/11/15", "", "", "", "", "", "12/14/15", "12/17/15", "01/20/16", "", "", "03/21/17" }, + lclGetCategories( xChartDoc )[0]->getValues() ); +} + + +CPPUNIT_TEST_SUITE_REGISTRATION(PivotChartTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx new file mode 100644 index 000000000..42dce791d --- /dev/null +++ b/chart2/qa/extras/chart2_trendcalculators.cxx @@ -0,0 +1,209 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "charttest.hxx" +#include +#include +#include + + +// Define the index of sheets in the test document +#define SHEET_POTENTIAL1 0 +#define SHEET_POTENTIAL2 ( SHEET_POTENTIAL1 + 1) +#define SHEET_POTENTIAL_LAST ( SHEET_POTENTIAL2 ) + +#define SHEET_LINEAR1 ( SHEET_POTENTIAL_LAST + 1 ) +#define SHEET_LINEAR_LAST ( SHEET_LINEAR1 ) + +#define SHEET_POLYNOMIAL1 ( SHEET_LINEAR_LAST + 1 ) +#define SHEET_POLYNOMIAL_LAST ( SHEET_POLYNOMIAL1 ) + +#define SHEET_EXPONENTIAL1 ( SHEET_POLYNOMIAL_LAST + 1 ) +#define SHEET_EXPONENTIAL2 ( SHEET_EXPONENTIAL1 + 1 ) + +class Chart2TrendCalculators : public ChartTest +{ +public: + void setUp() override; + void tearDown() override; + + void testPotentialRegression1(); + void testPotentialRegression2(); + void testLinearRegression1(); + void testPolynomialRegression1(); + void testExponentialRegression1(); + void testExponentialRegression2(); + + CPPUNIT_TEST_SUITE(Chart2TrendCalculators); + CPPUNIT_TEST(testPotentialRegression1); + CPPUNIT_TEST(testPotentialRegression2); + CPPUNIT_TEST(testLinearRegression1); + CPPUNIT_TEST(testPolynomialRegression1); + CPPUNIT_TEST(testExponentialRegression1); + CPPUNIT_TEST(testExponentialRegression2); + CPPUNIT_TEST_SUITE_END(); + +private: + + Reference m_xCurve; + Reference< chart2::XRegressionCurveCalculator > m_xRegressionCurveCalculator; + + void loadCalculatorFromSheet(sal_Int32 nSheet); + void checkCalculator( + const Sequence< double >& xValues, const Sequence< double >& yValues, + const OUString& sExpectedFormula ); + +}; + +void Chart2TrendCalculators::setUp() +{ + ChartTest::setUp(); + load("/chart2/qa/extras/data/ods/", "trend_calculators.ods"); +} + +void Chart2TrendCalculators::tearDown() +{ + m_xRegressionCurveCalculator.clear(); + m_xCurve.clear(); + ChartTest::tearDown(); +} + +void Chart2TrendCalculators::loadCalculatorFromSheet(sal_Int32 nSheet) +{ + Reference xChartDoc = getChartDocFromSheet(nSheet, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + + Reference xRegressionCurveContainer(xDataSeries, UNO_QUERY_THROW); + + Sequence< Reference< chart2::XRegressionCurve > > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xRegressionCurveSequence.getLength()); + + m_xCurve = xRegressionCurveSequence[0]; + CPPUNIT_ASSERT(m_xCurve.is()); + + m_xRegressionCurveCalculator = m_xCurve->getCalculator(); + CPPUNIT_ASSERT(m_xRegressionCurveCalculator.is()); +} + +void Chart2TrendCalculators::checkCalculator( + const Sequence< double >& xValues, const Sequence< double >& yValues, + const OUString& sExpectedFormula ) +{ + m_xRegressionCurveCalculator->recalculateRegression( xValues, yValues ); + OUString aRepresentation = m_xRegressionCurveCalculator->getRepresentation (); + CPPUNIT_ASSERT_EQUAL( sExpectedFormula, aRepresentation ); + double r2 = m_xRegressionCurveCalculator->getCorrelationCoefficient(); + CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, r2, 1e-8 ); +} + +// test y = A x ^ B +void Chart2TrendCalculators::testPotentialRegression1() +{ + loadCalculatorFromSheet( SHEET_POTENTIAL1 ); + m_xRegressionCurveCalculator->setRegressionProperties( 0, false, 0, 0 ); + Sequence< double > xValues( 7 ); + Sequence< double > yValues( 7 ); + for (int i=0; i<7; i++) + { + const double d = static_cast(i); + xValues[i] = d; + yValues[i] = 2.0 * pow ( d, 3 ); + } + checkCalculator( xValues, yValues, "f(x) = 2 x^3"); +} + +// test y = A x ^ B +void Chart2TrendCalculators::testPotentialRegression2() +{ + loadCalculatorFromSheet( SHEET_POTENTIAL2 ); + m_xRegressionCurveCalculator->setRegressionProperties( 0, false, 0, 0 ); + Sequence< double > xValues( 7 ); + Sequence< double > yValues( 7 ); + for (int i=0; i<7; i++) + { + const double d = static_cast(i); + xValues[i] = d; + yValues[i] = -2.0 * pow ( d, 3 ); + } + checkCalculator( xValues, yValues, "f(x) = "+ OUStringChar(aMinusSign) +" 2 x^3"); +} + +// test y = - 2 X - 5 +void Chart2TrendCalculators::testLinearRegression1() +{ + loadCalculatorFromSheet( SHEET_LINEAR1 ); + m_xRegressionCurveCalculator->setRegressionProperties( 1, false, 0, 0 ); + Sequence< double > xValues( 7 ); + Sequence< double > yValues( 7 ); + for (int i=0; i<7; i++) + { + const double d = static_cast(i); + xValues[i] = d; + yValues[i] = - 2.0 * d - 5.0 ; + } + checkCalculator( xValues, yValues, "f(x) = "+ OUStringChar(aMinusSign) +" 2 x "+ OUStringChar(aMinusSign) +" 5"); +} + +// test y = A x ^ B +void Chart2TrendCalculators::testPolynomialRegression1() +{ + loadCalculatorFromSheet( SHEET_POLYNOMIAL1 ); + m_xRegressionCurveCalculator->setRegressionProperties( 2, false, 0, 0 ); + Sequence< double > xValues( 7 ); + Sequence< double > yValues( 7 ); + for (int i=0; i<7; i++) + { + const double d = static_cast(i); + xValues[i] = d; + yValues[i] = - 2.0 * d * d + 4 * d - 5; + } + OUString sExpectedFormula( "f(x) = "+ OUStringChar(aMinusSign) +" 2 x" + OUStringChar( aSuperscriptFigures[2] ) + " + 4 x "+ OUStringChar(aMinusSign) +" 5" ); + checkCalculator( xValues, yValues, sExpectedFormula ); +} + +void Chart2TrendCalculators::testExponentialRegression1() +{ + loadCalculatorFromSheet( SHEET_EXPONENTIAL1 ); + m_xRegressionCurveCalculator->setRegressionProperties( 0, false, 0, 0 ); + Sequence< double > xValues( 7 ); + Sequence< double > yValues( 7 ); + for (int i=0; i<7; i++) + { + const double d = static_cast(i); + xValues[i] = d; + yValues[i] = 2.0 * exp ( 0.3 * d ); + } + checkCalculator( xValues, yValues, "f(x) = 2 exp( 0.3 x )"); +} + +void Chart2TrendCalculators::testExponentialRegression2() +{ + loadCalculatorFromSheet( SHEET_EXPONENTIAL2 ); + m_xRegressionCurveCalculator->setRegressionProperties( 0, false, 0, 0 ); + Sequence< double > xValues( 7 ); + Sequence< double > yValues( 7 ); + for (int i=0; i<7; i++) + { + const double d = static_cast(i); + xValues[i] = d; + yValues[i] = -2.0 * exp ( 0.3 * d ); + } + checkCalculator( xValues, yValues, "f(x) = "+ OUStringChar(aMinusSign) + " 2 exp( 0.3 x )"); +} + + +CPPUNIT_TEST_SUITE_REGISTRATION(Chart2TrendCalculators); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx new file mode 100644 index 000000000..680744bab --- /dev/null +++ b/chart2/qa/extras/chart2dump/chart2dump.cxx @@ -0,0 +1,1147 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#if defined(X86) +#define INT_EPS 2.1 +#else +#define INT_EPS 0.1 +#endif + +#define DECLARE_DUMP_TEST(TestName, BaseClass, DumpMode) \ + class TestName : public BaseClass { \ + protected:\ + virtual OUString getTestName() override { return #TestName; } \ + public:\ + TestName() : BaseClass(DumpMode) {}; \ + CPPUNIT_TEST_SUITE(TestName); \ + CPPUNIT_TEST(verify); \ + CPPUNIT_TEST_SUITE_END(); \ + virtual void verify() override;\ + };\ + CPPUNIT_TEST_SUITE_REGISTRATION(TestName); \ + void TestName::verify() + + +#define CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aActual) \ + if(isInDumpMode()) \ + writeActual(OUString::number(aActual), #aActual); \ + else \ + { \ + OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \ + CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(#aActual), OUString(OUString::number(aActual))); \ + } + +#define CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aActual, EPS_) \ + if(isInDumpMode()) \ + writeActual(OUString::number(aActual), #aActual); \ + else \ + { \ + OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \ + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpectedDouble(#aActual), aActual, EPS_); \ + } + +#define CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aActual) \ + if(isInDumpMode()) \ + writeActual(aActual, #aActual); \ + else \ + { \ + OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \ + CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(#aActual), aActual.trim()); \ + } + +#define CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aActual, EPS_) \ + if(isInDumpMode()) \ + writeActualTransformation(aActual, #aActual); \ + else \ + { \ + OUString expectedTransform; \ + if (!readAndCheckTransformation (aActual, #aActual, EPS_, expectedTransform)) \ + { \ + OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \ + CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), expectedTransform, transformationToOneLineString(aActual)); \ + } \ + } + +#define CPPUNIT_DUMP_ASSERT_NOTE(Note) \ + if(isInDumpMode()) \ + writeNote(Note); \ + else \ + readNote(Note);\ + + +class Chart2DumpTest : public ChartTest, public XmlTestTools +{ +protected: + Chart2DumpTest(bool bDumpMode) + { + m_bDumpMode = bDumpMode; + } + + virtual ~Chart2DumpTest() override + { + } + + bool isInDumpMode () const {return m_bDumpMode;} + + virtual OUString getTestName() { return OUString(); } + OUString const & getTestFileName() const { return m_sTestFileName; } + OUString getTestFileDirName() const { return "/chart2/qa/extras/chart2dump/data/"; } + OUString getReferenceDirName() + { + return "/chart2/qa/extras/chart2dump/reference/" + getTestName().toAsciiLowerCase() + "/"; + } + + void setTestFileName (const OUString& sName) + { + m_sTestFileName = sName; + + OUString sFileName = m_sTestFileName; + assert(sFileName.lastIndexOf('.') < sFileName.getLength()); + sFileName = sFileName.copy(0, sFileName.lastIndexOf('.')) + ".txt"; + if (!m_bDumpMode) + { + if (m_aReferenceFile.is_open()) + m_aReferenceFile.close(); + OString sReferenceFile = OUStringToOString(m_directories.getPathFromSrc(getReferenceDirName()) + sFileName, RTL_TEXTENCODING_UTF8); + m_aReferenceFile.open(sReferenceFile.getStr(), std::ios_base::in); + CPPUNIT_ASSERT_MESSAGE(OString("Can't open reference file: " + sReferenceFile).getStr(), m_aReferenceFile.is_open()); + } + else + { + if (m_aDumpFile.is_open()) + m_aDumpFile.close(); + OString sDumpFile = OUStringToOString(m_directories.getPathFromSrc(getReferenceDirName()) + sFileName, RTL_TEXTENCODING_UTF8); + m_aDumpFile.open(sDumpFile.getStr(), std::ios_base::out | std::ofstream::binary | std::ofstream::trunc); + CPPUNIT_ASSERT_MESSAGE(OString("Can't open dump file: " + sDumpFile).getStr(), m_aDumpFile.is_open()); + } + } + + virtual void verify() + { + CPPUNIT_FAIL("verify method must be overridden"); + } + + OUString readExpected(const OUString& sCheck) + { + assert(!m_bDumpMode); + assert(m_aReferenceFile.is_open()); + std::string sTemp; + getline(m_aReferenceFile, sTemp); + OString sAssertMessage = + "The reference file does not contain the right content. Maybe it needs an update:" + + OUStringToOString(m_sTestFileName, RTL_TEXTENCODING_UTF8); + CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString("// " + sCheck), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8)); + getline(m_aReferenceFile, sTemp); + return OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8); + } + + void writeActual(const OUString& sActualValue, const OUString& sCheck) + { + assert(m_bDumpMode); + assert(m_aDumpFile.is_open()); + m_aDumpFile << "// " << sCheck << "\n"; // Add check string to make dump file readable + m_aDumpFile << sActualValue.trim() << "\n"; // Write out the checked value, will be used as reference later + } + + void readNote(const OUString& sNote) + { + assert(!m_bDumpMode); + assert(m_aReferenceFile.is_open()); + std::string sTemp; + getline(m_aReferenceFile, sTemp); + OString sAssertMessage = + "The reference file does not contain the right content. Maybe it needs an update:" + + OUStringToOString(m_sTestFileName, RTL_TEXTENCODING_UTF8); + CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString("/// " + sNote), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8)); + } + + void writeNote(const OUString& sNote) + { + assert(m_bDumpMode); + assert(m_aDumpFile.is_open()); + m_aDumpFile << "/// " << sNote << "\n"; + } + + double readExpectedDouble(const OUString& sCheck) + { + OUString sExpected = readExpected(sCheck); + return sExpected.toDouble(); + } + + void writeActualTransformation(const drawing::HomogenMatrix3& rTransform, const OUString& sCheck) + { + writeActual(transformationToOneLineString(rTransform), sCheck); + } + + bool readAndCheckTransformation(const drawing::HomogenMatrix3& rTransform, const OUString& sCheck, const double fEPS, OUString& rExpectedTransform) + { + rExpectedTransform = readExpected(sCheck); // Reference transformation string + + // Convert string back to a transformation; + drawing::HomogenMatrix3 aExpectedTransform; + sal_Int32 nIdx {0}; + aExpectedTransform.Line1.Column1 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line1.Column2 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line1.Column3 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line2.Column1 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line2.Column2 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line2.Column3 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line3.Column1 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line3.Column2 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + aExpectedTransform.Line3.Column3 = rExpectedTransform.getToken(0, ';', nIdx).toDouble(); + + // Check the equality of the two transformation + return (std::abs(aExpectedTransform.Line1.Column1 - rTransform.Line1.Column1) < fEPS && + std::abs(aExpectedTransform.Line1.Column2 - rTransform.Line1.Column2) < fEPS && + std::abs(aExpectedTransform.Line1.Column3 - rTransform.Line1.Column3) < fEPS && + std::abs(aExpectedTransform.Line2.Column1 - rTransform.Line2.Column1) < fEPS && + std::abs(aExpectedTransform.Line2.Column2 - rTransform.Line2.Column2) < fEPS && + std::abs(aExpectedTransform.Line2.Column3 - rTransform.Line2.Column3) < fEPS && + std::abs(aExpectedTransform.Line3.Column1 - rTransform.Line3.Column1) < fEPS && + std::abs(aExpectedTransform.Line3.Column2 - rTransform.Line3.Column2) < fEPS && + std::abs(aExpectedTransform.Line3.Column3 - rTransform.Line3.Column3) < fEPS); + } + + OUString sequenceToOneLineString(const uno::Sequence& rSeq) + { + OUStringBuffer aBufer; + for (const OUString& seqItem : rSeq) + { + aBufer.append(seqItem).append(";"); + } + return aBufer.makeStringAndClear(); + } + + OUString doubleVectorToOneLineString(const std::vector& rVector) + { + OUStringBuffer aBufer; + for (const double& vectorItem : rVector) + { + aBufer.append(OUString::number(vectorItem)).append(";"); + } + return aBufer.makeStringAndClear(); + } + + OUString transformationToOneLineString(const drawing::HomogenMatrix3& rTransform) + { + return OUString::number(rTransform.Line1.Column1) + ";" + OUString::number(rTransform.Line1.Column2) + ";" + OUString::number(rTransform.Line1.Column3) + ";" + + OUString::number(rTransform.Line2.Column1) + ";" + OUString::number(rTransform.Line2.Column2) + ";" + OUString::number(rTransform.Line2.Column3) + ";" + + OUString::number(rTransform.Line3.Column1) + ";" + OUString::number(rTransform.Line3.Column2) + ";" + OUString::number(rTransform.Line3.Column3); + } + + uno::Reference getShapeByName(const uno::Reference& rShapes, const OUString& rName, bool (*pCondition)(const uno::Reference&) = nullptr) + { + for (sal_Int32 i = 0; i < rShapes->getCount(); ++i) + { + uno::Reference xShapes(rShapes->getByIndex(i), uno::UNO_QUERY); + if (xShapes.is()) + { + uno::Reference xRet = getShapeByName(xShapes, rName, pCondition); + if (xRet.is()) + return xRet; + } + uno::Reference xNamedShape(rShapes->getByIndex(i), uno::UNO_QUERY); + if (xNamedShape->getName() == rName) + { + uno::Reference xShape(xNamedShape, uno::UNO_QUERY); + if (pCondition == nullptr || (*pCondition)(xShape)) + return xShape; + } + } + return uno::Reference(); + } + +private: + OUString m_sTestFileName; + bool m_bDumpMode; + std::ifstream m_aReferenceFile; + std::ofstream m_aDumpFile; +}; + +DECLARE_DUMP_TEST(ChartDataTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "simple_chart.ods", + "multiple_categories.ods" + }; + + for (const OUString& aTestFile : aTestFiles) + { + setTestFileName(aTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc (getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); + + // Check title + uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, UNO_QUERY_THROW); + Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + uno::Reference xTitle = xTitled->getTitleObject(); + if(xTitle.is()) + { + OUString sChartTitle = getTitleString(xTitled); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sChartTitle); + } + + // Check chart type + Reference xChartType = getChartTypeFromDoc(xChartDoc2, 0); + CPPUNIT_ASSERT(xChartType.is()); + OUString sChartType = xChartType->getChartType(); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sChartType); + + // Check axis titles and number format + // x Axis + Reference xAxis = getAxisFromDoc(xChartDoc2, 0, 0, 0); + Reference xAxisTitled(xAxis, UNO_QUERY_THROW); + uno::Reference xAxisTitle = xAxisTitled->getTitleObject(); + if (xAxisTitle.is()) + { + OUString sXAxisTitle = getTitleString(xAxisTitled); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sXAxisTitle); + } + sal_Int32 nXAxisNumberFormat = getNumberFormatFromAxis(xAxis); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nXAxisNumberFormat); + sal_Int16 nXAxisNumberType = getNumberFormatType(xChartDoc2, nXAxisNumberFormat); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nXAxisNumberType); + + // y Axis + xAxis.set(getAxisFromDoc(xChartDoc2, 0, 1, 0)); + xAxisTitled.set(xAxis, UNO_QUERY_THROW); + xAxisTitle.set(xAxisTitled->getTitleObject()); + if (xAxisTitle.is()) + { + OUString sYAxisTitle = getTitleString(xAxisTitled); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sYAxisTitle); + } + sal_Int32 nYAxisNumberFormat = getNumberFormatFromAxis(xAxis); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nYAxisNumberFormat); + sal_Int16 nYAxisNumberType = getNumberFormatType(xChartDoc2, nYAxisNumberFormat); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nYAxisNumberType); + + // Check column labels + uno::Reference< chart::XChartDataArray > xChartData(xChartDoc->getData(), UNO_QUERY_THROW); + uno::Sequence < OUString > aColumnLabels = xChartData->getColumnDescriptions(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aColumnLabels.getLength()); + OUString sColumnLabels = sequenceToOneLineString(aColumnLabels); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sColumnLabels); + + // Check row labels + uno::Sequence< OUString > aRowLabels = xChartData->getRowDescriptions(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aRowLabels.getLength()); + OUString sRowLabels = sequenceToOneLineString(aRowLabels); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sRowLabels); + + // Check Y values + std::vector > aDataSeriesYValues = getDataSeriesYValuesFromChartType(xChartType); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aDataSeriesYValues.size()); + for (const std::vector& aYValuesOfSeries : aDataSeriesYValues) + { + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aYValuesOfSeries.size()); + OUString sYValuesOfSeries = doubleVectorToOneLineString(aYValuesOfSeries); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sYValuesOfSeries); + } + + // Check source ranges + for (size_t nIndex = 0; nIndex < aDataSeriesYValues.size(); ++nIndex) + { + Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc2, "values-x", nIndex); + if (xDataSeq.is()) + { + OUString aXValuesSourceRange = xDataSeq->getSourceRangeRepresentation(); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aXValuesSourceRange); + } + xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, "values-y", nIndex)); + if (xDataSeq.is()) + { + OUString aYValuesSourceRange = xDataSeq->getSourceRangeRepresentation(); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aYValuesSourceRange); + } + xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, "categories", nIndex)); + if (xDataSeq.is()) + { + OUString aCategoriesSourceRange = xDataSeq->getSourceRangeRepresentation(); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aCategoriesSourceRange); + } + } + } +} + +DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "legend_on_right_side.odp", + "legend_on_bottom.odp", + "legend_on_left_side.odp", + "legend_on_top.odp", + "many_legend_entries.odp", + "custom_legend_position.odp", + "multiple_categories.odp", + "minimal_legend_test.odp" + }; + + for (const OUString& aTestFile : aTestFiles) + { + setTestFileName(aTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + // Get legend shape + uno::Reference xLegend = getShapeByName(xShapes, "CID/D=0:Legend="); + CPPUNIT_ASSERT(xLegend.is()); + + /* Check legend position and size + awt::Point aLegendPosition = xLegend->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendPosition.Y, INT_EPS); + awt::Size aLegendSize = xLegend->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendSize.Width, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendSize.Height, INT_EPS);*/ + + // Check legend entries + uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, UNO_QUERY_THROW); + Reference xChartType = getChartTypeFromDoc(xChartDoc2, 0); + CPPUNIT_ASSERT(xChartType.is()); + std::vector > aDataSeriesYValues = getDataSeriesYValuesFromChartType(xChartType); + size_t nLegendEntryCount = aDataSeriesYValues.size(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nLegendEntryCount); + // Check legend entries geometry + for (size_t nSeriesIndex = 0; nSeriesIndex < nLegendEntryCount; ++nSeriesIndex) + { + uno::Reference xLegendEntry = getShapeByName(xShapes, "CID/MultiClick/D=0:CS=0:CT=0:Series=" + OUString::number(nSeriesIndex) + ":LegendEntry=0"); + CPPUNIT_ASSERT(xLegendEntry.is()); + + /* Check position and size + awt::Point aLegendEntryPosition = xLegendEntry->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendEntryPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendEntryPosition.Y, INT_EPS); + awt::Size aLegendEntrySize = xLegendEntry->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendEntrySize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendEntrySize.Width, INT_EPS); + + // Check transformation + Reference< beans::XPropertySet > xLegendEntryPropSet(xLegendEntry, UNO_QUERY_THROW); + drawing::HomogenMatrix3 aLegendEntryTransformation; + xLegendEntryPropSet->getPropertyValue("Transformation") >>= aLegendEntryTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aLegendEntryTransformation, INT_EPS);*/ + + uno::Reference xLegendEntryContainer(xLegendEntry, UNO_QUERY_THROW); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(xLegendEntryContainer->getCount()); + for (sal_Int32 nEntryGeometryElement = 1; nEntryGeometryElement < xLegendEntryContainer->getCount(); ++nEntryGeometryElement) + { + uno::Reference xLegendEntryGeom(xLegendEntryContainer->getByIndex(nEntryGeometryElement), UNO_QUERY_THROW); + + // Check geometry + uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor(xLegendEntryGeom, uno::UNO_QUERY_THROW); + OUString sEntryGeomShapeType = xShapeDescriptor->getShapeType(); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sEntryGeomShapeType); + + // Check display color + Reference< beans::XPropertySet > xPropSet(xLegendEntryGeom, UNO_QUERY_THROW); + util::Color aEntryGeomColor = 0; + xPropSet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= aEntryGeomColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aEntryGeomColor)); + } + } + // Check legend entries' text + uno::Reference xLegendContainer(xLegend, UNO_QUERY_THROW); + for (sal_Int32 i = 0; i < xLegendContainer->getCount(); ++i) + { + uno::Reference xShape(xLegendContainer->getByIndex(i), uno::UNO_QUERY); + uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor(xShape, uno::UNO_QUERY_THROW); + OUString sShapeType = xShapeDescriptor->getShapeType(); + + if (sShapeType == "com.sun.star.drawing.TextShape") + { + uno::Reference xLegendEntryText = uno::Reference(xShape, uno::UNO_QUERY_THROW)->getText(); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(xLegendEntryText->getString()); + } + } + } +} + +DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "vertical_grid.ods", + "horizontal_grid.ods", + "minor_grid.ods", + "formated_grid_line.ods" + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + const std::vector aGridShapeNames = + { + "CID/D=0:CS=0:Axis=1,0:Grid=0", // Major vertical grid + "CID/D=0:CS=0:Axis=0,0:Grid=0", // Major horizontal grid + "CID/D=0:CS=0:Axis=1,0:Grid=0:SubGrid=0", // Minor vertical grid + "CID/D=0:CS=0:Axis=0,0:Grid=0:SubGrid=0" // Minor horizontal grid + }; + + for (const OUString& sGridShapeName : aGridShapeNames) + { + uno::Reference xGrid = getShapeByName(xShapes, sGridShapeName); + if (xGrid.is()) + { + CPPUNIT_DUMP_ASSERT_NOTE(sGridShapeName); + // Check position and size + awt::Point aGridPosition = xGrid->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aGridPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aGridPosition.Y, INT_EPS); + awt::Size aGridSize = xGrid->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aGridSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aGridSize.Width, INT_EPS); + + // Check transformation + Reference< beans::XPropertySet > xPropSet(xGrid, UNO_QUERY_THROW); + drawing::HomogenMatrix3 aGridTransformation; + xPropSet->getPropertyValue("Transformation") >>= aGridTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aGridTransformation, INT_EPS); + + // Check line properties + uno::Reference xIndexAccess(xGrid, UNO_QUERY_THROW); + uno::Reference xGridLine(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); + Reference< beans::XPropertySet > xGridLinePropSet(xGridLine, UNO_QUERY_THROW); + // Line type + drawing::LineDash aLineDash; + xGridLinePropSet->getPropertyValue("LineDash") >>= aLineDash; + OUString sGridLineDash = + OUString::number(static_cast(aLineDash.Style)) + ";" + OUString::number(aLineDash.Dots) + ";" + OUString::number(aLineDash.DotLen) + + OUString::number(aLineDash.Dashes) + ";" + OUString::number(aLineDash.DashLen) + ";" + OUString::number(aLineDash.Distance); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sGridLineDash); + // Line color + util::Color aLineColor = 0; + xGridLinePropSet->getPropertyValue("LineColor") >>= aLineColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aLineColor)); + // Line width + sal_Int32 nLineWidth = 0; + xGridLinePropSet->getPropertyValue("LineWidth") >>= nLineWidth; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nLineWidth); + } + } + } +} + +DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "default_formated_axis.odp", + "axis_special_positioning.odp", + "formated_axis_lines.odp", + "rotated_axis_labels.odp" + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + const std::vector aAxisShapeNames = + { + "CID/D=0:CS=0:Axis=0,0", // X Axis + "CID/D=0:CS=0:Axis=1,0", // Y Axis + }; + + for (const OUString& sAxisShapeName : aAxisShapeNames) + { + uno::Reference xXAxis = getShapeByName(xShapes, sAxisShapeName); + CPPUNIT_ASSERT(xXAxis.is()); + + CPPUNIT_DUMP_ASSERT_NOTE(sAxisShapeName); + // Check position and size + awt::Point aAxisPosition = xXAxis->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisPosition.Y, INT_EPS); + awt::Size aAxisSize = xXAxis->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisSize.Width, INT_EPS); + + // Check transformation + Reference< beans::XPropertySet > xPropSet(xXAxis, UNO_QUERY_THROW); + drawing::HomogenMatrix3 aAxisTransformation; + xPropSet->getPropertyValue("Transformation") >>= aAxisTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aAxisTransformation, INT_EPS); + + // Check line properties + uno::Reference xIndexAccess(xXAxis, UNO_QUERY_THROW); + sal_Int32 nAxisGeometriesCount = xIndexAccess->getCount(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nAxisGeometriesCount); + uno::Reference xAxisLine(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); + Reference< beans::XPropertySet > xAxisLinePropSet(xAxisLine, UNO_QUERY_THROW); + // Line type + drawing::LineDash aLineDash; + xAxisLinePropSet->getPropertyValue("LineDash") >>= aLineDash; + OUString sAxisLineDash = + OUString::number(static_cast(aLineDash.Style)) + ";" + OUString::number(aLineDash.Dots) + ";" + OUString::number(aLineDash.DotLen) + + OUString::number(aLineDash.Dashes) + ";" + OUString::number(aLineDash.DashLen) + ";" + OUString::number(aLineDash.Distance); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sAxisLineDash); + // Line color + util::Color aAxisLineColor = 0; + xAxisLinePropSet->getPropertyValue("LineColor") >>= aAxisLineColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aAxisLineColor)); + // Line width + sal_Int32 nAxisLineWidth = 0; + xAxisLinePropSet->getPropertyValue("LineWidth") >>= nAxisLineWidth; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nAxisLineWidth); + } + } +} + +DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "default_formated_axis.odp", + "rotated_axis_labels.odp", + "formated_axis_labels.odp", + "percent_stacked_column_chart.odp", + "tdf118150.xlsx", + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + const std::vector aAxisShapeNames = + { + "CID/D=0:CS=0:Axis=0,0", // X Axis + "CID/D=0:CS=0:Axis=1,0", // Y Axis + }; + + for (const OUString& sAxisShapeName : aAxisShapeNames) + { + uno::Reference xXAxis = getShapeByName(xShapes, sAxisShapeName, + // Axis occurs twice in chart xshape representation so need to get the one related to labels + [](const uno::Reference& rXShape) -> bool + { + uno::Reference xAxisShapes(rXShape, uno::UNO_QUERY); + CPPUNIT_ASSERT(xAxisShapes.is()); + uno::Reference xChildShape(xAxisShapes->getByIndex(0), uno::UNO_QUERY); + uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor(xChildShape, uno::UNO_QUERY_THROW); + return (xShapeDescriptor->getShapeType() == "com.sun.star.drawing.TextShape"); + }); + CPPUNIT_ASSERT(xXAxis.is()); + CPPUNIT_DUMP_ASSERT_NOTE(sAxisShapeName); + + // Check label count + uno::Reference xIndexAccess(xXAxis, UNO_QUERY_THROW); + sal_Int32 nAxisLabelsCount = xIndexAccess->getCount(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nAxisLabelsCount); + + // Check labels's text, positioning and font properties + for (sal_Int32 nLabelIndex = 0; nLabelIndex < nAxisLabelsCount; ++nLabelIndex) + { + // Check text + uno::Reference xLabel(xIndexAccess->getByIndex(nLabelIndex), uno::UNO_QUERY); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(xLabel->getString()); + + // Check size and position + uno::Reference xLabelShape(xLabel, uno::UNO_QUERY); + /*awt::Point aLabelPosition = xLabelShape->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelPosition.Y, INT_EPS); + awt::Size aLabelSize = xLabelShape->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelSize.Width, INT_EPS);*/ + + // Check transformation + Reference< beans::XPropertySet > xPropSet(xLabelShape, UNO_QUERY_THROW); + /*drawing::HomogenMatrix3 aLabelTransformation; + xPropSet->getPropertyValue("Transformation") >>= aLabelTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aLabelTransformation, INT_EPS);*/ + + // Check font color and height + util::Color aLabelFontColor = 0; + xPropSet->getPropertyValue("CharColor") >>= aLabelFontColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aLabelFontColor)); + float fLabelFontHeight = 0.0f; + xPropSet->getPropertyValue("CharHeight") >>= fLabelFontHeight; + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(fLabelFontHeight, 1E-12); + } + } + } +} + +DECLARE_DUMP_TEST(ColumnBarChartTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "normal_column_chart.ods", + "stacked_column_chart.ods", + "percent_stacked_column_chart.ods", + "column_chart_small_spacing.ods", + "normal_bar_chart.ods", + "stacked_bar_chart.ods", + "percent_stacked_bar_chart.ods", + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, UNO_QUERY_THROW); + Reference xChartType = getChartTypeFromDoc(xChartDoc2, 0); + CPPUNIT_ASSERT(xChartType.is()); + std::vector > aDataSeriesYValues = getDataSeriesYValuesFromChartType(xChartType); + size_t nSeriesCount = aDataSeriesYValues.size(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nSeriesCount); + + for (size_t nSeries = 0; nSeries < nSeriesCount; ++nSeries) + { + uno::Reference xSeriesColumnsOrBars = getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=" + OUString::number(nSeries)); + CPPUNIT_ASSERT(xSeriesColumnsOrBars.is()); + CPPUNIT_DUMP_ASSERT_NOTE("Series " + OUString::number(nSeries) + " ColumnsOrBars"); + + // Check column/bar count in the series + uno::Reference xIndexAccess(xSeriesColumnsOrBars, UNO_QUERY_THROW); + sal_Int32 nColumnOrBarCountInSeries = xIndexAccess->getCount(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nColumnOrBarCountInSeries); + + // Check column/bar fill style and color + Reference< beans::XPropertySet > xColumnOrBarPropSet(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); + drawing::FillStyle aSeriesColumnOrBarFillStyle; + xColumnOrBarPropSet->getPropertyValue(UNO_NAME_FILLSTYLE) >>= aSeriesColumnOrBarFillStyle; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aSeriesColumnOrBarFillStyle)); + util::Color aSeriesColumnOrBarFillColor = 0; + xColumnOrBarPropSet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= aSeriesColumnOrBarFillColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aSeriesColumnOrBarFillColor)); + + for (sal_Int32 nColumnOrBar = 0; nColumnOrBar < nColumnOrBarCountInSeries; ++nColumnOrBar) + { + uno::Reference xColumnOrBar(xIndexAccess->getByIndex(nColumnOrBar), UNO_QUERY_THROW); + uno::Reference xNamedShape(xIndexAccess->getByIndex(nColumnOrBar), uno::UNO_QUERY); + CPPUNIT_DUMP_ASSERT_NOTE(xNamedShape->getName()); + + // Check size and position + awt::Point aColumnOrBarPosition = xColumnOrBar->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aColumnOrBarPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aColumnOrBarPosition.Y, INT_EPS); + awt::Size aColumnOrBarSize = xColumnOrBar->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aColumnOrBarSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aColumnOrBarSize.Width, INT_EPS); + + // Check transformation + Reference< beans::XPropertySet > xPropSet(xColumnOrBar, UNO_QUERY_THROW); + drawing::HomogenMatrix3 aColumnOrBarTransformation; + xPropSet->getPropertyValue("Transformation") >>= aColumnOrBarTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aColumnOrBarTransformation, INT_EPS); + } + } + } +} + +DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "chartwall_auto_adjust_with_titles.ods", + "chartwall_auto_adjust_without_titles.ods", + "chartwall_custom_positioning.ods" + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + uno::Reference xChartWall = getShapeByName(xShapes, "CID/DiagramWall="); + CPPUNIT_ASSERT(xChartWall.is()); + + // Check position and size + /*awt::Point aChartWallPosition = xChartWall->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aChartWallPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aChartWallPosition.Y, INT_EPS); + awt::Size aChartWallSize = xChartWall->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aChartWallSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aChartWallSize.Width, INT_EPS);*/ + + // Check transformation + Reference< beans::XPropertySet > xPropSet(xChartWall, UNO_QUERY_THROW); + /*drawing::HomogenMatrix3 aChartWallTransformation; + xPropSet->getPropertyValue("Transformation") >>= aChartWallTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aChartWallTransformation, INT_EPS);*/ + + // Check fill properties + drawing::FillStyle aChartWallFillStyle; + xPropSet->getPropertyValue(UNO_NAME_FILLSTYLE) >>= aChartWallFillStyle; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aChartWallFillStyle)); + util::Color aChartWallFillColor = 0; + xPropSet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= aChartWallFillColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aChartWallFillColor)); + + // Check line properties + // Line type + drawing::LineDash aLineDash; + xPropSet->getPropertyValue("LineDash") >>= aLineDash; + OUString sChartWallLineDash = + OUString::number(static_cast(aLineDash.Style)) + ";" + OUString::number(aLineDash.Dots) + ";" + OUString::number(aLineDash.DotLen) + + OUString::number(aLineDash.Dashes) + ";" + OUString::number(aLineDash.DashLen) + ";" + OUString::number(aLineDash.Distance); + CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sChartWallLineDash); + // Line color + util::Color aChartWallLineColor = 0; + xPropSet->getPropertyValue("LineColor") >>= aChartWallLineColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aChartWallLineColor)); + // Line width + sal_Int32 nChartWallLineWidth = 0; + xPropSet->getPropertyValue("LineWidth") >>= nChartWallLineWidth; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nChartWallLineWidth); + + } +} + +DECLARE_DUMP_TEST(PieChartTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "normal_pie_chart.ods", + "rotated_pie_chart.ods", + "exploded_pie_chart.ods", + "donut_chart.ods", + "pie_chart_many_slices.ods", + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, UNO_QUERY_THROW); + Reference xChartType = getChartTypeFromDoc(xChartDoc2, 0); + CPPUNIT_ASSERT(xChartType.is()); + + std::vector > aDataSeriesYValues = getDataSeriesYValuesFromChartType(xChartType); + size_t nSeriesCount = aDataSeriesYValues.size(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nSeriesCount); + + for (size_t nSeries = 0; nSeries < nSeriesCount; ++nSeries) + { + uno::Reference xSeriesSlices = getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=" + OUString::number(nSeries)); + if (!xSeriesSlices.is()) + break; // Normal pie chart displays only one series + CPPUNIT_DUMP_ASSERT_NOTE("Series " + OUString::number(nSeries) + " slices"); + + // Check slice count in the series + uno::Reference xIndexAccess(xSeriesSlices, UNO_QUERY_THROW); + sal_Int32 nSlicesCountInSeries = xIndexAccess->getCount(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nSlicesCountInSeries); + + // Check slices properties + for (sal_Int32 nSlice = 0; nSlice < nSlicesCountInSeries; ++nSlice) + { + uno::Reference xSlice(xIndexAccess->getByIndex(nSlice), UNO_QUERY_THROW); + uno::Reference xNamedShape(xIndexAccess->getByIndex(nSlice), uno::UNO_QUERY); + OUString sName = xNamedShape->getName(); + CPPUNIT_DUMP_ASSERT_NOTE(sName.copy(sName.lastIndexOf("/D=0"))); + + // Check size and position + awt::Point aSlicePosition = xSlice->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aSlicePosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aSlicePosition.Y, INT_EPS); + awt::Size aSliceSize = xSlice->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aSliceSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aSliceSize.Width, INT_EPS); + + // Check transformation + Reference< beans::XPropertySet > xPropSet(xSlice, UNO_QUERY_THROW); + drawing::HomogenMatrix3 aSliceTransformation; + xPropSet->getPropertyValue("Transformation") >>= aSliceTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aSliceTransformation, INT_EPS); + + // Check slice fill style and color + drawing::FillStyle aSliceFillStyle; + xPropSet->getPropertyValue(UNO_NAME_FILLSTYLE) >>= aSliceFillStyle; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aSliceFillStyle)); + util::Color aSliceFillColor = 0; + xPropSet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= aSliceFillColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aSliceFillColor)); + } + } + } +} + +DECLARE_DUMP_TEST(AreaChartTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "normal_area_chart.ods", + "stacked_area_chart.ods", + "percent_stacked_area_chart.ods" + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, UNO_QUERY_THROW); + Reference xChartType = getChartTypeFromDoc(xChartDoc2, 0); + CPPUNIT_ASSERT(xChartType.is()); + + std::vector > aDataSeriesYValues = getDataSeriesYValuesFromChartType(xChartType); + size_t nSeriesCount = aDataSeriesYValues.size(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nSeriesCount); + + for (size_t nSeries = 0; nSeries < nSeriesCount; ++nSeries) + { + uno::Reference xSeries = getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=" + OUString::number(nSeries)); + CPPUNIT_ASSERT(xSeries.is()); + CPPUNIT_DUMP_ASSERT_NOTE("Series " + OUString::number(nSeries)); + + // One area for one series + uno::Reference xIndexAccess(xSeries, UNO_QUERY_THROW); + uno::Reference xIndexAccess2(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); // Why this second group shape is here? + uno::Reference xArea(xIndexAccess2->getByIndex(0), UNO_QUERY_THROW); + + // Check size and position + awt::Point aAreaPosition = xArea->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaPosition.Y, INT_EPS); + awt::Size aAreaSize = xArea->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaSize.Width, INT_EPS); + + // Check transformation + Reference< beans::XPropertySet > xPropSet(xArea, UNO_QUERY_THROW); + drawing::HomogenMatrix3 aAreaTransformation; + xPropSet->getPropertyValue("Transformation") >>= aAreaTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aAreaTransformation, INT_EPS); + + // Check area fill style and color + drawing::FillStyle aAreaFillStyle; + xPropSet->getPropertyValue(UNO_NAME_FILLSTYLE) >>= aAreaFillStyle; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aAreaFillStyle)); + util::Color aAreaFillColor = 0; + xPropSet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= aAreaFillColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aAreaFillColor)); + } + } +} + + +DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false) +{ + const std::vector aTestFiles = + { + "normal_line_chart_lines_only.ods", + "normal_line_chart_points_only.ods", + "normal_line_chart_lines_and_points.ods", + "stacked_line_chart_lines_only.ods", + "stacked_line_chart_points_only.ods", + "stacked_line_chart_lines_and_points.ods", + "percent_stacked_line_chart_lines_only.ods", + "percent_stacked_line_chart_points_only.ods", + "percent_stacked_line_chart_lines_and_points.ods", + "scatter_chart_points_only.ods", + "scatter_chart_lines_only.ods", + "scatter_chart_lines_and_points.ods", + }; + + for (const OUString& sTestFile : aTestFiles) + { + setTestFileName(sTestFile); + load(getTestFileDirName(), getTestFileName()); + uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, UNO_QUERY_THROW); + Reference xChartType = getChartTypeFromDoc(xChartDoc2, 0); + CPPUNIT_ASSERT(xChartType.is()); + + std::vector > aDataSeriesYValues = getDataSeriesYValuesFromChartType(xChartType); + size_t nSeriesCount = aDataSeriesYValues.size(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nSeriesCount); + + for (size_t nSeries = 0; nSeries < nSeriesCount; ++nSeries) + { + uno::Reference xSeries = getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=" + OUString::number(nSeries)); + CPPUNIT_ASSERT(xSeries.is()); + CPPUNIT_DUMP_ASSERT_NOTE("Series " + OUString::number(nSeries)); + + uno::Reference xIndexAccess(xSeries, UNO_QUERY_THROW); + uno::Reference xIndexAccess2(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); + uno::Reference xLine(xIndexAccess2->getByIndex(0), UNO_QUERY_THROW); + Reference< beans::XPropertySet > xPropSet(xLine, UNO_QUERY_THROW); + + // Check whether we have line + drawing::LineStyle aSeriesLineStyle; + xPropSet->getPropertyValue(UNO_NAME_LINESTYLE) >>= aSeriesLineStyle; + if (aSeriesLineStyle != drawing::LineStyle_NONE) + { + CPPUNIT_DUMP_ASSERT_NOTE("Lines are displayed"); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aSeriesLineStyle)); + + // Check line shape geometry + awt::Point aLinePosition = xLine->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLinePosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLinePosition.Y, INT_EPS); + awt::Size aLineSize = xLine->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLineSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLineSize.Width, INT_EPS); + CPPUNIT_ASSERT(xPropSet.is()); + drawing::HomogenMatrix3 aLineTransformation; + xPropSet->getPropertyValue("Transformation") >>= aLineTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aLineTransformation, INT_EPS); + } + + // Check points of series + if (xIndexAccess->getCount() >= 2) + { + CPPUNIT_DUMP_ASSERT_NOTE("Points are displayed"); + uno::Reference xPointsOfSeries(xIndexAccess->getByIndex(1), UNO_QUERY_THROW); + sal_Int32 nPointCountInSeries = xPointsOfSeries->getCount(); + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nPointCountInSeries); + for (sal_Int32 nPoint = 0; nPoint < nPointCountInSeries; ++nPoint) + { + uno::Reference XPointContainer ( + getShapeByName(xShapes, "CID/MultiClick/D=0:CS=0:CT=0:Series=" + OUString::number(nSeries) + ":Point=" + OUString::number(nPoint)), UNO_QUERY_THROW); + uno::Reference XPoint(XPointContainer->getByIndex(0), UNO_QUERY_THROW); + uno::Reference xNamedShape(XPointContainer, uno::UNO_QUERY); + CPPUNIT_DUMP_ASSERT_NOTE(xNamedShape->getName()); + + // Check size and position + awt::Point aPointPosition = XPoint->getPosition(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aPointPosition.X, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aPointPosition.Y, INT_EPS); + awt::Size aPointSize = XPoint->getSize(); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aPointSize.Height, INT_EPS); + CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aPointSize.Width, INT_EPS); + + // Check transformation + Reference< beans::XPropertySet > xPointPropSet(XPoint, UNO_QUERY_THROW); + drawing::HomogenMatrix3 aPointTransformation; + xPointPropSet->getPropertyValue("Transformation") >>= aPointTransformation; + CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aPointTransformation, INT_EPS); + + // Check fill style and color + drawing::FillStyle aPointFillStyle; + xPointPropSet->getPropertyValue(UNO_NAME_FILLSTYLE) >>= aPointFillStyle; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aPointFillStyle)); + util::Color aPointFillColor = 0; + xPointPropSet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= aPointFillColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aPointFillColor)); + } + } + } + } +} + +DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false ) +{ + const OUString aTestFile = "pivotchart_data_button.ods"; + + setTestFileName( aTestFile ); + load( getTestFileDirName(), getTestFileName() ); + + // Check that we have pivot chart in the document + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet( 1, mxComponent ); + uno::Reference xIndexAccess( xTablePivotCharts, UNO_QUERY_THROW ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(1), xIndexAccess->getCount() ); + + // Get the pivot chart document so we ca access its data + uno::Reference xChartDoc; + xChartDoc.set( getPivotChartDocFromSheet( xTablePivotCharts, 0 ) ); + CPPUNIT_ASSERT( xChartDoc.is() ); + + uno::Reference xDrawPageSupplier( xChartDoc, uno::UNO_QUERY ); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes( xDrawPage->getByIndex(0), uno::UNO_QUERY ); + CPPUNIT_ASSERT( xShapes.is() ); + + // Get the shape that represents the "Data" button. + uno::Reference xButton = getShapeByName( xShapes, "FieldButton.Row.8", + []( const uno::Reference& xShapeNode ) + { + return xShapeNode->getShapeType() == "com.sun.star.drawing.TextShape"; + } ); + CPPUNIT_ASSERT_MESSAGE( OString( "Cannot find Data button shape" ).getStr(), xButton.is() ); + + // Make sure that there is no arrow shape with the Data button + uno::Reference xArrow = getShapeByName( xShapes, "FieldButton.Row.8", + []( const uno::Reference& xShapeNode ) + { + return xShapeNode->getShapeType() == "com.sun.star.drawing.PolyPolygonShape"; + } ); + CPPUNIT_ASSERT_MESSAGE( OString( "Arrow shape should not be present for the Data button" ).getStr(), !xArrow.is() ); + + // Assert the background color of the Data button + util::Color aButtonFillColor = 0; + uno::Reference xPropSet( xButton, UNO_QUERY_THROW ); + xPropSet->getPropertyValue( UNO_NAME_FILLCOLOR ) >>= aButtonFillColor; + CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL( static_cast( aButtonFillColor ) ); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/chart2dump/data/axis_special_positioning.odp b/chart2/qa/extras/chart2dump/data/axis_special_positioning.odp new file mode 100644 index 000000000..a09ddb893 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/axis_special_positioning.odp differ diff --git a/chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_with_titles.ods b/chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_with_titles.ods new file mode 100644 index 000000000..1b41db316 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_with_titles.ods differ diff --git a/chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_without_titles.ods b/chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_without_titles.ods new file mode 100644 index 000000000..be5b11804 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/chartwall_auto_adjust_without_titles.ods differ diff --git a/chart2/qa/extras/chart2dump/data/chartwall_custom_positioning.ods b/chart2/qa/extras/chart2dump/data/chartwall_custom_positioning.ods new file mode 100644 index 000000000..b6ba87221 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/chartwall_custom_positioning.ods differ diff --git a/chart2/qa/extras/chart2dump/data/column_chart_small_spacing.ods b/chart2/qa/extras/chart2dump/data/column_chart_small_spacing.ods new file mode 100644 index 000000000..1206a4e19 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/column_chart_small_spacing.ods differ diff --git a/chart2/qa/extras/chart2dump/data/custom_legend_position.odp b/chart2/qa/extras/chart2dump/data/custom_legend_position.odp new file mode 100644 index 000000000..d36677ab4 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/custom_legend_position.odp differ diff --git a/chart2/qa/extras/chart2dump/data/default_formated_axis.odp b/chart2/qa/extras/chart2dump/data/default_formated_axis.odp new file mode 100644 index 000000000..a5cdd0522 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/default_formated_axis.odp differ diff --git a/chart2/qa/extras/chart2dump/data/donut_chart.ods b/chart2/qa/extras/chart2dump/data/donut_chart.ods new file mode 100644 index 000000000..4490f7695 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/donut_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/exploded_pie_chart.ods b/chart2/qa/extras/chart2dump/data/exploded_pie_chart.ods new file mode 100644 index 000000000..68a9c9842 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/exploded_pie_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/formated_axis_labels.odp b/chart2/qa/extras/chart2dump/data/formated_axis_labels.odp new file mode 100644 index 000000000..a94c8c4d0 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/formated_axis_labels.odp differ diff --git a/chart2/qa/extras/chart2dump/data/formated_axis_lines.odp b/chart2/qa/extras/chart2dump/data/formated_axis_lines.odp new file mode 100644 index 000000000..7a421497b Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/formated_axis_lines.odp differ diff --git a/chart2/qa/extras/chart2dump/data/formated_grid_line.ods b/chart2/qa/extras/chart2dump/data/formated_grid_line.ods new file mode 100644 index 000000000..1d0ef5389 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/formated_grid_line.ods differ diff --git a/chart2/qa/extras/chart2dump/data/horizontal_grid.ods b/chart2/qa/extras/chart2dump/data/horizontal_grid.ods new file mode 100644 index 000000000..c9f913067 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/horizontal_grid.ods differ diff --git a/chart2/qa/extras/chart2dump/data/legend_on_bottom.odp b/chart2/qa/extras/chart2dump/data/legend_on_bottom.odp new file mode 100644 index 000000000..b080d3311 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/legend_on_bottom.odp differ diff --git a/chart2/qa/extras/chart2dump/data/legend_on_left_side.odp b/chart2/qa/extras/chart2dump/data/legend_on_left_side.odp new file mode 100644 index 000000000..71e2947c6 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/legend_on_left_side.odp differ diff --git a/chart2/qa/extras/chart2dump/data/legend_on_right_side.odp b/chart2/qa/extras/chart2dump/data/legend_on_right_side.odp new file mode 100644 index 000000000..7aac4d3f3 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/legend_on_right_side.odp differ diff --git a/chart2/qa/extras/chart2dump/data/legend_on_top.odp b/chart2/qa/extras/chart2dump/data/legend_on_top.odp new file mode 100644 index 000000000..318901f2e Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/legend_on_top.odp differ diff --git a/chart2/qa/extras/chart2dump/data/many_legend_entries.odp b/chart2/qa/extras/chart2dump/data/many_legend_entries.odp new file mode 100644 index 000000000..8f02a99f6 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/many_legend_entries.odp differ diff --git a/chart2/qa/extras/chart2dump/data/minimal_legend_test.odp b/chart2/qa/extras/chart2dump/data/minimal_legend_test.odp new file mode 100644 index 000000000..63911f119 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/minimal_legend_test.odp differ diff --git a/chart2/qa/extras/chart2dump/data/minor_grid.ods b/chart2/qa/extras/chart2dump/data/minor_grid.ods new file mode 100644 index 000000000..f8f30198b Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/minor_grid.ods differ diff --git a/chart2/qa/extras/chart2dump/data/multiple_categories.odp b/chart2/qa/extras/chart2dump/data/multiple_categories.odp new file mode 100644 index 000000000..95e51f3f6 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/multiple_categories.odp differ diff --git a/chart2/qa/extras/chart2dump/data/multiple_categories.ods b/chart2/qa/extras/chart2dump/data/multiple_categories.ods new file mode 100644 index 000000000..67e00525b Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/multiple_categories.ods differ diff --git a/chart2/qa/extras/chart2dump/data/normal_area_chart.ods b/chart2/qa/extras/chart2dump/data/normal_area_chart.ods new file mode 100644 index 000000000..84b9ec224 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/normal_area_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/normal_bar_chart.ods b/chart2/qa/extras/chart2dump/data/normal_bar_chart.ods new file mode 100644 index 000000000..531f406f9 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/normal_bar_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/normal_column_chart.ods b/chart2/qa/extras/chart2dump/data/normal_column_chart.ods new file mode 100644 index 000000000..a8c640400 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/normal_column_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/normal_line_chart_lines_and_points.ods b/chart2/qa/extras/chart2dump/data/normal_line_chart_lines_and_points.ods new file mode 100644 index 000000000..4dd613b6f Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/normal_line_chart_lines_and_points.ods differ diff --git a/chart2/qa/extras/chart2dump/data/normal_line_chart_lines_only.ods b/chart2/qa/extras/chart2dump/data/normal_line_chart_lines_only.ods new file mode 100644 index 000000000..c4f57a6f3 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/normal_line_chart_lines_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/normal_line_chart_points_only.ods b/chart2/qa/extras/chart2dump/data/normal_line_chart_points_only.ods new file mode 100644 index 000000000..e55b41115 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/normal_line_chart_points_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/normal_pie_chart.ods b/chart2/qa/extras/chart2dump/data/normal_pie_chart.ods new file mode 100644 index 000000000..3c3a6a327 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/normal_pie_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_area_chart.ods b/chart2/qa/extras/chart2dump/data/percent_stacked_area_chart.ods new file mode 100644 index 000000000..0cc5d1728 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/percent_stacked_area_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_bar_chart.ods b/chart2/qa/extras/chart2dump/data/percent_stacked_bar_chart.ods new file mode 100644 index 000000000..2d337a5b3 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/percent_stacked_bar_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.odp b/chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.odp new file mode 100644 index 000000000..e8180cfc7 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.odp differ diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.ods b/chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.ods new file mode 100644 index 000000000..ce7440aa7 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/percent_stacked_column_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_and_points.ods b/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_and_points.ods new file mode 100644 index 000000000..ade9ea8f1 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_and_points.ods differ diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_only.ods b/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_only.ods new file mode 100644 index 000000000..3228f51a3 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_lines_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_points_only.ods b/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_points_only.ods new file mode 100644 index 000000000..b2483b6da Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/percent_stacked_line_chart_points_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/pie_chart_many_slices.ods b/chart2/qa/extras/chart2dump/data/pie_chart_many_slices.ods new file mode 100644 index 000000000..2cc2e8b7b Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/pie_chart_many_slices.ods differ diff --git a/chart2/qa/extras/chart2dump/data/pivotchart_data_button.ods b/chart2/qa/extras/chart2dump/data/pivotchart_data_button.ods new file mode 100644 index 000000000..d57edf66d Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/pivotchart_data_button.ods differ diff --git a/chart2/qa/extras/chart2dump/data/rotated_axis_labels.odp b/chart2/qa/extras/chart2dump/data/rotated_axis_labels.odp new file mode 100644 index 000000000..24e9cf05b Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/rotated_axis_labels.odp differ diff --git a/chart2/qa/extras/chart2dump/data/rotated_pie_chart.ods b/chart2/qa/extras/chart2dump/data/rotated_pie_chart.ods new file mode 100644 index 000000000..ee8b3a7d9 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/rotated_pie_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/scatter_chart_lines_and_points.ods b/chart2/qa/extras/chart2dump/data/scatter_chart_lines_and_points.ods new file mode 100644 index 000000000..de7b1c67c Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/scatter_chart_lines_and_points.ods differ diff --git a/chart2/qa/extras/chart2dump/data/scatter_chart_lines_only.ods b/chart2/qa/extras/chart2dump/data/scatter_chart_lines_only.ods new file mode 100644 index 000000000..fed578992 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/scatter_chart_lines_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/scatter_chart_points_only.ods b/chart2/qa/extras/chart2dump/data/scatter_chart_points_only.ods new file mode 100644 index 000000000..dd1626d7a Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/scatter_chart_points_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/simple_chart.ods b/chart2/qa/extras/chart2dump/data/simple_chart.ods new file mode 100644 index 000000000..f65584d12 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/simple_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/stacked_area_chart.ods b/chart2/qa/extras/chart2dump/data/stacked_area_chart.ods new file mode 100644 index 000000000..56bc4e499 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/stacked_area_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/stacked_bar_chart.ods b/chart2/qa/extras/chart2dump/data/stacked_bar_chart.ods new file mode 100644 index 000000000..2e8ca327e Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/stacked_bar_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/stacked_column_chart.ods b/chart2/qa/extras/chart2dump/data/stacked_column_chart.ods new file mode 100644 index 000000000..159df229a Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/stacked_column_chart.ods differ diff --git a/chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_and_points.ods b/chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_and_points.ods new file mode 100644 index 000000000..d11ecb705 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_and_points.ods differ diff --git a/chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_only.ods b/chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_only.ods new file mode 100644 index 000000000..1652c3a58 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/stacked_line_chart_lines_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/stacked_line_chart_points_only.ods b/chart2/qa/extras/chart2dump/data/stacked_line_chart_points_only.ods new file mode 100644 index 000000000..a85a2abe8 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/stacked_line_chart_points_only.ods differ diff --git a/chart2/qa/extras/chart2dump/data/tdf118150.xlsx b/chart2/qa/extras/chart2dump/data/tdf118150.xlsx new file mode 100644 index 000000000..f29b9a1c2 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/tdf118150.xlsx differ diff --git a/chart2/qa/extras/chart2dump/data/vertical_grid.ods b/chart2/qa/extras/chart2dump/data/vertical_grid.ods new file mode 100644 index 000000000..9f2ed7838 Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/vertical_grid.ods differ diff --git a/chart2/qa/extras/chart2dump/reference/areacharttest/normal_area_chart.txt b/chart2/qa/extras/chart2dump/reference/areacharttest/normal_area_chart.txt new file mode 100644 index 000000000..4f4a5181f --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/areacharttest/normal_area_chart.txt @@ -0,0 +1,62 @@ +// nSeriesCount +4 +/// Series 0 +// aAreaPosition.X +5507 +// aAreaPosition.Y +3295 +// aAreaSize.Height +4052 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;4052;3295;0;0;1 +// static_cast(aAreaFillStyle) +1 +// static_cast(aAreaFillColor) +16711680 +/// Series 1 +// aAreaPosition.X +5507 +// aAreaPosition.Y +3385 +// aAreaSize.Height +3962 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;3962;3385;0;0;1 +// static_cast(aAreaFillStyle) +2 +// static_cast(aAreaFillColor) +10079487 +/// Series 2 +// aAreaPosition.X +5507 +// aAreaPosition.Y +3345 +// aAreaSize.Height +4002 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;4002;3345;0;0;1 +// static_cast(aAreaFillStyle) +4 +// static_cast(aAreaFillColor) +10079487 +/// Series 3 +// aAreaPosition.X +5507 +// aAreaPosition.Y +2334 +// aAreaSize.Height +5013 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;5013;2334;0;0;1 +// static_cast(aAreaFillStyle) +3 +// static_cast(aAreaFillColor) +16777215 diff --git a/chart2/qa/extras/chart2dump/reference/areacharttest/percent_stacked_area_chart.txt b/chart2/qa/extras/chart2dump/reference/areacharttest/percent_stacked_area_chart.txt new file mode 100644 index 000000000..b8769b7ad --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/areacharttest/percent_stacked_area_chart.txt @@ -0,0 +1,62 @@ +// nSeriesCount +4 +/// Series 0 +// aAreaPosition.X +5507 +// aAreaPosition.Y +5080 +// aAreaSize.Height +2267 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;2267;5080;0;0;1 +// static_cast(aAreaFillStyle) +1 +// static_cast(aAreaFillColor) +16711680 +/// Series 1 +// aAreaPosition.X +5507 +// aAreaPosition.Y +3458 +// aAreaSize.Height +2693 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;2693;3458;0;0;1 +// static_cast(aAreaFillStyle) +2 +// static_cast(aAreaFillColor) +10079487 +/// Series 2 +// aAreaPosition.X +5507 +// aAreaPosition.Y +2634 +// aAreaSize.Height +2049 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;2049;2634;0;0;1 +// static_cast(aAreaFillStyle) +4 +// static_cast(aAreaFillColor) +10079487 +/// Series 3 +// aAreaPosition.X +5507 +// aAreaPosition.Y +1344 +// aAreaSize.Height +2157 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;2157;1344;0;0;1 +// static_cast(aAreaFillStyle) +3 +// static_cast(aAreaFillColor) +16777215 diff --git a/chart2/qa/extras/chart2dump/reference/areacharttest/stacked_area_chart.txt b/chart2/qa/extras/chart2dump/reference/areacharttest/stacked_area_chart.txt new file mode 100644 index 000000000..00934b44b --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/areacharttest/stacked_area_chart.txt @@ -0,0 +1,62 @@ +// nSeriesCount +4 +/// Series 0 +// aAreaPosition.X +5507 +// aAreaPosition.Y +5958 +// aAreaSize.Height +1389 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;1389;5958;0;0;1 +// static_cast(aAreaFillStyle) +1 +// static_cast(aAreaFillColor) +16711680 +/// Series 1 +// aAreaPosition.X +5507 +// aAreaPosition.Y +4882 +// aAreaSize.Height +1710 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;1710;4882;0;0;1 +// static_cast(aAreaFillStyle) +2 +// static_cast(aAreaFillColor) +10079487 +/// Series 2 +// aAreaPosition.X +5507 +// aAreaPosition.Y +3510 +// aAreaSize.Height +2542 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;2542;3510;0;0;1 +// static_cast(aAreaFillStyle) +4 +// static_cast(aAreaFillColor) +10079487 +/// Series 3 +// aAreaPosition.X +5507 +// aAreaPosition.Y +1792 +// aAreaSize.Height +3985 +// aAreaSize.Width +11328 +// aAreaTransformation +11328;0;5507;0;3985;1792;0;0;1 +// static_cast(aAreaFillStyle) +3 +// static_cast(aAreaFillColor) +16777215 diff --git a/chart2/qa/extras/chart2dump/reference/axisgeometrytest/axis_special_positioning.txt b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/axis_special_positioning.txt new file mode 100644 index 000000000..e34ef3c10 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/axis_special_positioning.txt @@ -0,0 +1,38 @@ +/// CID/D=0:CS=0:Axis=0,0 +// aAxisPosition.X +5112 +// aAxisPosition.Y +1990 +// aAxisSize.Height +300 +// aAxisSize.Width +17133 +// aAxisTransformation +17134;0;5112;0;301;1990;0;0;1 +// nAxisGeometriesCount +2 +// sAxisLineDash +0;1;201;20;20 +// static_cast(aAxisLineColor) +0 +// nAxisLineWidth +0 +/// CID/D=0:CS=0:Axis=1,0 +// aAxisPosition.X +22245 +// aAxisPosition.Y +2140 +// aAxisSize.Height +8005 +// aAxisSize.Width +150 +// aAxisTransformation +151;0;22245;0;8006;2140;0;0;1 +// nAxisGeometriesCount +3 +// sAxisLineDash +0;1;201;20;20 +// static_cast(aAxisLineColor) +0 +// nAxisLineWidth +0 diff --git a/chart2/qa/extras/chart2dump/reference/axisgeometrytest/default_formated_axis.txt b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/default_formated_axis.txt new file mode 100644 index 000000000..46eec6d76 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/default_formated_axis.txt @@ -0,0 +1,38 @@ +/// CID/D=0:CS=0:Axis=0,0 +// aAxisPosition.X +5393 +// aAxisPosition.Y +11883 +// aAxisSize.Height +150 +// aAxisSize.Width +17455 +// aAxisTransformation +17456;0;5393;0;151;11883;0;0;1 +// nAxisGeometriesCount +2 +// sAxisLineDash +0;1;201;20;20 +// static_cast(aAxisLineColor) +0 +// nAxisLineWidth +0 +/// CID/D=0:CS=0:Axis=1,0 +// aAxisPosition.X +5243 +// aAxisPosition.Y +2507 +// aAxisSize.Height +9376 +// aAxisSize.Width +150 +// aAxisTransformation +151;0;5243;0;9377;2507;0;0;1 +// nAxisGeometriesCount +2 +// sAxisLineDash +0;1;201;20;20 +// static_cast(aAxisLineColor) +0 +// nAxisLineWidth +0 diff --git a/chart2/qa/extras/chart2dump/reference/axisgeometrytest/formated_axis_lines.txt b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/formated_axis_lines.txt new file mode 100644 index 000000000..980e2592d --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/formated_axis_lines.txt @@ -0,0 +1,38 @@ +/// CID/D=0:CS=0:Axis=0,0 +// aAxisPosition.X +3852 +// aAxisPosition.Y +9713 +// aAxisSize.Height +150 +// aAxisSize.Width +15854 +// aAxisTransformation +15855;0;3852;0;151;9713;0;0;1 +// nAxisGeometriesCount +2 +// sAxisLineDash +0;1;00;0;457 +// static_cast(aAxisLineColor) +16711680 +// nAxisLineWidth +100 +/// CID/D=0:CS=0:Axis=1,0 +// aAxisPosition.X +3702 +// aAxisPosition.Y +2051 +// aAxisSize.Height +7662 +// aAxisSize.Width +150 +// aAxisTransformation +151;0;3702;0;7663;2051;0;0;1 +// nAxisGeometriesCount +2 +// sAxisLineDash +0;1;511;51;51 +// static_cast(aAxisLineColor) +65280 +// nAxisLineWidth +100 diff --git a/chart2/qa/extras/chart2dump/reference/axisgeometrytest/rotated_axis_labels.txt b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/rotated_axis_labels.txt new file mode 100644 index 000000000..151ab21ac --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axisgeometrytest/rotated_axis_labels.txt @@ -0,0 +1,38 @@ +/// CID/D=0:CS=0:Axis=0,0 +// aAxisPosition.X +3798 +// aAxisPosition.Y +9860 +// aAxisSize.Height +150 +// aAxisSize.Width +16412 +// aAxisTransformation +16413;0;3798;0;151;9860;0;0;1 +// nAxisGeometriesCount +2 +// sAxisLineDash +0;1;201;20;20 +// static_cast(aAxisLineColor) +0 +// nAxisLineWidth +0 +/// CID/D=0:CS=0:Axis=1,0 +// aAxisPosition.X +3648 +// aAxisPosition.Y +2082 +// aAxisSize.Height +7778 +// aAxisSize.Width +150 +// aAxisTransformation +151;0;3648;0;7779;2082;0;0;1 +// nAxisGeometriesCount +2 +// sAxisLineDash +0;1;201;20;20 +// static_cast(aAxisLineColor) +0 +// nAxisLineWidth +0 diff --git a/chart2/qa/extras/chart2dump/reference/axislabeltest/default_formated_axis.txt b/chart2/qa/extras/chart2dump/reference/axislabeltest/default_formated_axis.txt new file mode 100644 index 000000000..51c1e37d6 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axislabeltest/default_formated_axis.txt @@ -0,0 +1,96 @@ +/// CID/D=0:CS=0:Axis=0,0 +// nAxisLabelsCount +4 +// xLabel->getString() +1. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +2. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +3. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +4. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +/// CID/D=0:CS=0:Axis=1,0 +// nAxisLabelsCount +11 +// xLabel->getString() +- Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +2000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +4000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +6000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +8000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +10000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +12000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +14000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +16000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +18000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +20000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 diff --git a/chart2/qa/extras/chart2dump/reference/axislabeltest/formated_axis_labels.txt b/chart2/qa/extras/chart2dump/reference/axislabeltest/formated_axis_labels.txt new file mode 100644 index 000000000..ffc0877e4 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axislabeltest/formated_axis_labels.txt @@ -0,0 +1,96 @@ +/// CID/D=0:CS=0:Axis=0,0 +// nAxisLabelsCount +4 +// xLabel->getString() +1. quarter +// static_cast(aLabelFontColor) +8388352 +// fLabelFontHeight +12 +// xLabel->getString() +2. quarter +// static_cast(aLabelFontColor) +8388352 +// fLabelFontHeight +12 +// xLabel->getString() +2. quarter +// static_cast(aLabelFontColor) +8388352 +// fLabelFontHeight +12 +// xLabel->getString() +2. quarter +// static_cast(aLabelFontColor) +8388352 +// fLabelFontHeight +12 +/// CID/D=0:CS=0:Axis=1,0 +// nAxisLabelsCount +11 +// xLabel->getString() +- Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +2000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +4000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +6000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +8000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +10000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +12000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +14000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +16000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +18000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 +// xLabel->getString() +20000000 Ft +// static_cast(aLabelFontColor) +16711935 +// fLabelFontHeight +14 diff --git a/chart2/qa/extras/chart2dump/reference/axislabeltest/percent_stacked_column_chart.txt b/chart2/qa/extras/chart2dump/reference/axislabeltest/percent_stacked_column_chart.txt new file mode 100644 index 000000000..304f9abf0 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axislabeltest/percent_stacked_column_chart.txt @@ -0,0 +1,96 @@ +/// CID/D=0:CS=0:Axis=0,0 +// nAxisLabelsCount +4 +// xLabel->getString() +Inkjet +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Leser +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Multifunction +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Picture +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +/// CID/D=0:CS=0:Axis=1,0 +// nAxisLabelsCount +11 +// xLabel->getString() +0,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +10,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +20,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +30,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +40,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +50,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +60,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +70,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +80,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +90,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +100,00% +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 diff --git a/chart2/qa/extras/chart2dump/reference/axislabeltest/rotated_axis_labels.txt b/chart2/qa/extras/chart2dump/reference/axislabeltest/rotated_axis_labels.txt new file mode 100644 index 000000000..52aceba87 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axislabeltest/rotated_axis_labels.txt @@ -0,0 +1,60 @@ +/// CID/D=0:CS=0:Axis=0,0 +// nAxisLabelsCount +4 +// xLabel->getString() +1. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +2. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +3. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +4. quarter +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +/// CID/D=0:CS=0:Axis=1,0 +// nAxisLabelsCount +5 +// xLabel->getString() +- Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +5000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +10000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +15000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +20000000 Ft +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 diff --git a/chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt b/chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt new file mode 100644 index 000000000..fabf4acac --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt @@ -0,0 +1,216 @@ +/// CID/D=0:CS=0:Axis=0,0 +// nAxisLabelsCount +28 +// xLabel->getString() +Sep 2013 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Oct 2013 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Nov 2013 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Dec 2013 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Jan 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Feb 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Mar 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Apr 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +May 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Jun 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Jul 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Aug 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Sep 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Oct 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Nov 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Dec 2014 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Jan 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Feb 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Mar 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Apr 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +May 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Jun 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Jul 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Aug 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Sep 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Oct 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Nov 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +Dec 2015 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +/// CID/D=0:CS=0:Axis=1,0 +// nAxisLabelsCount +7 +// xLabel->getString() +0.00 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +2.00 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +4.00 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +6.00 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +8.00 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +10.00 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 +// xLabel->getString() +12.00 +// static_cast(aLabelFontColor) +0 +// fLabelFontHeight +10 diff --git a/chart2/qa/extras/chart2dump/reference/chartdatatest/multiple_categories.txt b/chart2/qa/extras/chart2dump/reference/chartdatatest/multiple_categories.txt new file mode 100644 index 000000000..1d0e3ea39 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/chartdatatest/multiple_categories.txt @@ -0,0 +1,70 @@ +// sChartTitle +Chart Title +// sChartType +com.sun.star.chart2.LineChartType +// nXAxisNumberFormat +0 +// nXAxisNumberType +16 +// nYAxisNumberFormat +0 +// nYAxisNumberType +16 +// aColumnLabels.getLength() +8 +// sColumnLabels +A In0;A In100;A In200;A In400;B In0;B In100;B In200;B In400; +// aRowLabels.getLength() +49 +// sRowLabels +M 14;M 15;M 99;M 22;M 17;M 25;M 28;M 25;M 26;M 24;M 25;M 22;M 33;M 22;M 25;M 32;M 19;M 14;M 18;F 22;F 16;F 26;F 18;F 48;F 19;F 24;F 22;F 25;F 28;F 23;F 25;F 29;F 24;F 27;F 24;F 27;F 27;F 31;F 17;F 50;F 17;F 16;F 17;F 15;F 17;F 17;F 17;F 17;F 18; +// aDataSeriesYValues.size() +8 +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +0.533;0.413;0.55;0.273;0.45;0.423;0.54;0.433;0.417;0.513;0.563;0.503;0.54;0.737;0.563;0.36;0.443;1.007;1.21;0.51;0.443;0.41;0.637;1.15;0.777;0.58;0.587;0.713;0.477;0.533;0.55;0.443;0.197;0.48;0.497;0.513;0.607;0.573;0.54;0.283;0.257;0.43;0.223;0.377;0.38;0.573;1.843;0.427;0.523; +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +0.8;0.287;0.457;0.143;0.61;0.373;0.47;0.397;0.413;0.337;0.347;0.447;0.467;0.587;0.533;0.34;0.647;0.647;0.823;0.77;0.743;0.607;0.523;0.7;1.053;0.407;0.577;0.533;0.54;0.347;0.633;0.56;0.397;0.423;0.393;0.707;0.703;0.65;0.487;0.437;0.937;0.547;0.357;0.61;0.597;0.517;0.503;0.333;0.84; +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +0.38;0.547;0.35;0.46;0.607;0.44;0.68;0.47;0.43;0.363;0.46;0.533;0.44;0.2;0.627;0.307;0.27;0.5;0.66;0.403;0.413;0.61;0.58;0.973;0.903;0.57;0.563;0.617;0.463;0.537;0.497;0.42;0.253;0.49;0.43;0.577;1.07;0.583;0.427;0.297;0.397;0.503;0.717;0.507;0.513;0.743;0.693;0.44;0.737; +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +0.467;0.467;0.463;0.367;0.457;0.443;0.63;0.48;0.38;0.577;0.477;0.443;0.47;0.557;0.45;0.46;0.283;0.523;0.527;0.537;0.34;0.32;0.51;1.12;0.897;0.437;0.673;0.637;0.463;0.613;0.72;0.443;0.25;0.497;0.393;0.503;0.617;0.87;0.383;0.383;0.39;0.467;0.373;0.523;0.553;0.353;0.37;0.493;0.52; +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +1.533;1.413;1.55;1.273;1.45;1.423;1.54;1.433;1.417;1.513;1.563;1.503;1.54;1.737;1.563;1.36;1.443;2.007;2.21;1.51;1.443;1.41;1.637;2.15;1.777;1.58;1.587;1.713;1.477;1.533;1.55;1.443;1.197;1.48;1.497;1.513;1.607;1.573;1.54;1.283;1.257;1.43;1.223;1.377;1.38;1.573;2.843;1.427;1.523; +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +0.7;0.187;0.357;0.043;0.51;0.273;0.37;0.297;0.313;0.237;0.247;0.347;0.367;0.487;0.433;0.24;0.547;0.547;0.723;0.67;0.643;0.507;0.423;0.6;0.953;0.307;0.477;0.433;0.44;0.247;0.533;0.46;0.297;0.323;0.293;0.607;0.603;0.55;0.387;0.337;0.837;0.447;0.257;0.51;0.497;0.417;0.403;0.233;0.74; +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +0.19;0.2735;0.175;0.23;0.3035;0.22;0.34;0.235;0.215;0.1815;0.23;0.2665;0.22;0.1;0.3135;0.1535;0.135;0.25;0.33;0.2015;0.2065;0.305;0.29;0.4865;0.4515;0.285;0.2815;0.3085;0.2315;0.2685;0.2485;0.21;0.1265;0.245;0.215;0.2885;0.535;0.2915;0.2135;0.1485;0.1985;0.2515;0.3585;0.2535;0.2565;0.3715;0.3465;0.22;0.3685; +// aYValuesOfSeries.size() +49 +// sYValuesOfSeries +0.0667142857142857;0.0667142857142857;0.0661428571428571;0.0524285714285714;0.0652857142857143;0.0632857142857143;0.09;0.0685714285714286;0.0542857142857143;0.0824285714285714;0.0681428571428571;0.0632857142857143;0.0671428571428571;0.0795714285714286;0.0642857142857143;0.0657142857142857;0.0404285714285714;0.0747142857142857;0.0752857142857143;0.0767142857142857;0.0485714285714286;0.0457142857142857;0.0728571428571429;0.16;0.128142857142857;0.0624285714285714;0.0961428571428572;0.091;0.0661428571428571;0.0875714285714286;0.102857142857143;0.0632857142857143;0.0357142857142857;0.071;0.0561428571428572;0.0718571428571429;0.0881428571428572;0.124285714285714;0.0547142857142857;0.0547142857142857;0.0557142857142857;0.0667142857142857;0.0532857142857143;0.0747142857142857;0.079;0.0504285714285714;0.0528571428571429;0.0704285714285714;0.0742857142857143; +// aYValuesSourceRange +$Table.$E$3:$E$51 +// aYValuesSourceRange +$Table.$F$3:$F$51 +// aYValuesSourceRange +$Table.$G$3:$G$51 +// aYValuesSourceRange +$Table.$H$3:$H$51 +// aYValuesSourceRange +$Table.$I$3:$I$51 +// aYValuesSourceRange +$Table.$J$3:$J$51 +// aYValuesSourceRange +$Table.$K$3:$K$51 +// aYValuesSourceRange +$Table.$L$3:$L$51 diff --git a/chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt b/chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt new file mode 100644 index 000000000..28a125d7a --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt @@ -0,0 +1,50 @@ +// sChartTitle +Annual Revenue +// sChartType +com.sun.star.chart2.ColumnChartType +// sXAxisTitle +Quarter +// nXAxisNumberFormat +0 +// nXAxisNumberType +16 +// sYAxisTitle +Income (Ft) +// nYAxisNumberFormat +151 +// nYAxisNumberType +17 +// aColumnLabels.getLength() +4 +// sColumnLabels +1. quarter;2. quarter;3. quarter;4. quarter; +// aRowLabels.getLength() +4 +// sRowLabels +Inkjet;Leser;Multifunction;Picture; +// aDataSeriesYValues.size() +4 +// aYValuesOfSeries.size() +4 +// sYValuesOfSeries +4399120;8098380;4799040;6448710; +// aYValuesOfSeries.size() +4 +// sYValuesOfSeries +3149650;4499500;5399400;7919120; +// aYValuesOfSeries.size() +4 +// sYValuesOfSeries +1599800;4399450;3199600;7999000; +// aYValuesOfSeries.size() +4 +// sYValuesOfSeries +2504850;5009700;7514550;10019400; +// aYValuesSourceRange +$Mo_példa_06_a.$E$11:$H$11 +// aYValuesSourceRange +$Mo_példa_06_a.$E$12:$H$12 +// aYValuesSourceRange +$Mo_példa_06_a.$E$13:$H$13 +// aYValuesSourceRange +$Mo_példa_06_a.$E$14:$H$14 diff --git a/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_with_titles.txt b/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_with_titles.txt new file mode 100644 index 000000000..83e9596f2 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_with_titles.txt @@ -0,0 +1,10 @@ +// static_cast(aChartWallFillStyle) +2 +// static_cast(aChartWallFillColor) +15132390 +// sChartWallLineDash +0;1;200710;0;152 +// static_cast(aChartWallLineColor) +11010131 +// nChartWallLineWidth +100 diff --git a/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_without_titles.txt b/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_without_titles.txt new file mode 100644 index 000000000..83e9596f2 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_auto_adjust_without_titles.txt @@ -0,0 +1,10 @@ +// static_cast(aChartWallFillStyle) +2 +// static_cast(aChartWallFillColor) +15132390 +// sChartWallLineDash +0;1;200710;0;152 +// static_cast(aChartWallLineColor) +11010131 +// nChartWallLineWidth +100 diff --git a/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_custom_positioning.txt b/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_custom_positioning.txt new file mode 100644 index 000000000..f689425ec --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/chartwalltest/chartwall_custom_positioning.txt @@ -0,0 +1,10 @@ +// static_cast(aChartWallFillStyle) +1 +// static_cast(aChartWallFillColor) +13773611 +// sChartWallLineDash +0;2;01;203;203 +// static_cast(aChartWallLineColor) +8388352 +// nChartWallLineWidth +110 diff --git a/chart2/qa/extras/chart2dump/reference/chartwalltest/formated_chartwall.txt b/chart2/qa/extras/chart2dump/reference/chartwalltest/formated_chartwall.txt new file mode 100644 index 000000000..83e9596f2 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/chartwalltest/formated_chartwall.txt @@ -0,0 +1,10 @@ +// static_cast(aChartWallFillStyle) +2 +// static_cast(aChartWallFillColor) +15132390 +// sChartWallLineDash +0;1;200710;0;152 +// static_cast(aChartWallLineColor) +11010131 +// nChartWallLineWidth +100 diff --git a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt new file mode 100644 index 000000000..b3192a728 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt @@ -0,0 +1,162 @@ +// nSeriesCount +4 +/// Series 0 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aColumnOrBarPosition.X +13522 +// aColumnOrBarPosition.Y +4147 +// aColumnOrBarSize.Height +3202 +// aColumnOrBarSize.Width +1169 +// aColumnOrBarTransformation +1169;0;13522;0;3202;4147;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aColumnOrBarPosition.X +8610 +// aColumnOrBarPosition.Y +1946 +// aColumnOrBarSize.Height +5403 +// aColumnOrBarSize.Width +1170 +// aColumnOrBarTransformation +1170;0;8610;0;5403;1946;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aColumnOrBarPosition.X +3698 +// aColumnOrBarPosition.Y +4414 +// aColumnOrBarSize.Height +2935 +// aColumnOrBarSize.Width +1170 +// aColumnOrBarTransformation +1170;0;3698;0;2935;4414;0;0;1 +/// Series 1 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aColumnOrBarPosition.X +14691 +// aColumnOrBarPosition.Y +3747 +// aColumnOrBarSize.Height +3602 +// aColumnOrBarSize.Width +1170 +// aColumnOrBarTransformation +1170;0;14691;0;3602;3747;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aColumnOrBarPosition.X +9780 +// aColumnOrBarPosition.Y +4347 +// aColumnOrBarSize.Height +3002 +// aColumnOrBarSize.Width +1169 +// aColumnOrBarTransformation +1169;0;9780;0;3002;4347;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aColumnOrBarPosition.X +4868 +// aColumnOrBarPosition.Y +5247 +// aColumnOrBarSize.Height +2102 +// aColumnOrBarSize.Width +1169 +// aColumnOrBarTransformation +1169;0;4868;0;2102;5247;0;0;1 +/// Series 2 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +3 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aColumnOrBarPosition.X +15861 +// aColumnOrBarPosition.Y +5214 +// aColumnOrBarSize.Height +2135 +// aColumnOrBarSize.Width +1169 +// aColumnOrBarTransformation +1169;0;15861;0;2135;5214;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aColumnOrBarPosition.X +10949 +// aColumnOrBarPosition.Y +4414 +// aColumnOrBarSize.Height +2935 +// aColumnOrBarSize.Width +1169 +// aColumnOrBarTransformation +1169;0;10949;0;2935;4414;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aColumnOrBarPosition.X +6037 +// aColumnOrBarPosition.Y +6281 +// aColumnOrBarSize.Height +1068 +// aColumnOrBarSize.Width +1170 +// aColumnOrBarTransformation +1170;0;6037;0;1068;6281;0;0;1 +/// Series 3 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +2 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aColumnOrBarPosition.X +17030 +// aColumnOrBarPosition.Y +2335 +// aColumnOrBarSize.Height +5014 +// aColumnOrBarSize.Width +1170 +// aColumnOrBarTransformation +1170;0;17030;0;5014;2335;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aColumnOrBarPosition.X +12118 +// aColumnOrBarPosition.Y +4006 +// aColumnOrBarSize.Height +3343 +// aColumnOrBarSize.Width +1170 +// aColumnOrBarTransformation +1170;0;12118;0;3343;4006;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aColumnOrBarPosition.X +7207 +// aColumnOrBarPosition.Y +5677 +// aColumnOrBarSize.Height +1672 +// aColumnOrBarSize.Width +1169 +// aColumnOrBarTransformation +1169;0;7207;0;1672;5677;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_bar_chart.txt b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_bar_chart.txt new file mode 100644 index 000000000..7828d7907 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_bar_chart.txt @@ -0,0 +1,162 @@ +// nSeriesCount +4 +/// Series 0 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +2709 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +7071 +// aColumnOrBarTransformation +7071;0;3582;0;364;2709;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +4710 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +11932 +// aColumnOrBarTransformation +11932;0;3582;0;364;4710;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +6712 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +6482 +// aColumnOrBarTransformation +6482;0;3582;0;364;6712;0;0;1 +/// Series 1 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +2345 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +7956 +// aColumnOrBarTransformation +7956;0;3582;0;364;2345;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +4347 +// aColumnOrBarSize.Height +363 +// aColumnOrBarSize.Width +6630 +// aColumnOrBarTransformation +6630;0;3582;0;363;4347;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +6348 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +4641 +// aColumnOrBarTransformation +4641;0;3582;0;364;6348;0;0;1 +/// Series 2 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +1981 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +4714 +// aColumnOrBarTransformation +4714;0;3582;0;364;1981;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +3983 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +6482 +// aColumnOrBarTransformation +6482;0;3582;0;364;3983;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +5984 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +2357 +// aColumnOrBarTransformation +2357;0;3582;0;364;5984;0;0;1 +/// Series 3 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +1617 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +11072 +// aColumnOrBarTransformation +11072;0;3582;0;364;1617;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +3619 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +7381 +// aColumnOrBarTransformation +7381;0;3582;0;364;3619;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +5620 +// aColumnOrBarSize.Height +364 +// aColumnOrBarSize.Width +3690 +// aColumnOrBarTransformation +3690;0;3582;0;364;5620;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_column_chart.txt b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_column_chart.txt new file mode 100644 index 000000000..3c4dad8c5 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_column_chart.txt @@ -0,0 +1,162 @@ +// nSeriesCount +4 +/// Series 0 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aColumnOrBarPosition.X +14433 +// aColumnOrBarPosition.Y +4147 +// aColumnOrBarSize.Height +3202 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;14433;0;3202;4147;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aColumnOrBarPosition.X +9396 +// aColumnOrBarPosition.Y +1946 +// aColumnOrBarSize.Height +5403 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;9396;0;5403;1946;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aColumnOrBarPosition.X +4359 +// aColumnOrBarPosition.Y +4414 +// aColumnOrBarSize.Height +2935 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;4359;0;2935;4414;0;0;1 +/// Series 1 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aColumnOrBarPosition.X +15349 +// aColumnOrBarPosition.Y +3747 +// aColumnOrBarSize.Height +3602 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;15349;0;3602;3747;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aColumnOrBarPosition.X +10312 +// aColumnOrBarPosition.Y +4347 +// aColumnOrBarSize.Height +3002 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;10312;0;3002;4347;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aColumnOrBarPosition.X +5275 +// aColumnOrBarPosition.Y +5247 +// aColumnOrBarSize.Height +2102 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;5275;0;2102;5247;0;0;1 +/// Series 2 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aColumnOrBarPosition.X +16265 +// aColumnOrBarPosition.Y +5214 +// aColumnOrBarSize.Height +2135 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;16265;0;2135;5214;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aColumnOrBarPosition.X +11228 +// aColumnOrBarPosition.Y +4414 +// aColumnOrBarSize.Height +2935 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;11228;0;2935;4414;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aColumnOrBarPosition.X +6191 +// aColumnOrBarPosition.Y +6281 +// aColumnOrBarSize.Height +1068 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;6191;0;1068;6281;0;0;1 +/// Series 3 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aColumnOrBarPosition.X +17181 +// aColumnOrBarPosition.Y +2335 +// aColumnOrBarSize.Height +5014 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;17181;0;5014;2335;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aColumnOrBarPosition.X +12144 +// aColumnOrBarPosition.Y +4006 +// aColumnOrBarSize.Height +3343 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;12144;0;3343;4006;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aColumnOrBarPosition.X +7107 +// aColumnOrBarPosition.Y +5677 +// aColumnOrBarSize.Height +1672 +// aColumnOrBarSize.Width +916 +// aColumnOrBarTransformation +916;0;7107;0;1672;5677;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_bar_chart.txt b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_bar_chart.txt new file mode 100644 index 000000000..5fa9301b1 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_bar_chart.txt @@ -0,0 +1,162 @@ +// nSeriesCount +4 +/// Series 0 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +1678 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +3381 +// aColumnOrBarTransformation +3381;0;3582;0;1334;1678;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +3679 +// aColumnOrBarSize.Height +1335 +// aColumnOrBarSize.Width +5422 +// aColumnOrBarTransformation +5422;0;3582;0;1335;3679;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +5681 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +5562 +// aColumnOrBarTransformation +5562;0;3582;0;1334;5681;0;0;1 +/// Series 1 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aColumnOrBarPosition.X +6963 +// aColumnOrBarPosition.Y +1678 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +3804 +// aColumnOrBarTransformation +3804;0;6963;0;1334;1678;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aColumnOrBarPosition.X +9004 +// aColumnOrBarPosition.Y +3679 +// aColumnOrBarSize.Height +1335 +// aColumnOrBarSize.Width +3013 +// aColumnOrBarTransformation +3013;0;9004;0;1335;3679;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aColumnOrBarPosition.X +9144 +// aColumnOrBarPosition.Y +5681 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +3982 +// aColumnOrBarTransformation +3982;0;9144;0;1334;5681;0;0;1 +/// Series 2 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +255 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aColumnOrBarPosition.X +10767 +// aColumnOrBarPosition.Y +1678 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +2255 +// aColumnOrBarTransformation +2255;0;10767;0;1334;1678;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aColumnOrBarPosition.X +12017 +// aColumnOrBarPosition.Y +3679 +// aColumnOrBarSize.Height +1335 +// aColumnOrBarSize.Width +2945 +// aColumnOrBarTransformation +2945;0;12017;0;1335;3679;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aColumnOrBarPosition.X +13126 +// aColumnOrBarPosition.Y +5681 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +2023 +// aColumnOrBarTransformation +2023;0;13126;0;1334;5681;0;0;1 +/// Series 3 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aColumnOrBarPosition.X +13022 +// aColumnOrBarPosition.Y +1678 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +5295 +// aColumnOrBarTransformation +5295;0;13022;0;1334;1678;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aColumnOrBarPosition.X +14962 +// aColumnOrBarPosition.Y +3679 +// aColumnOrBarSize.Height +1335 +// aColumnOrBarSize.Width +3355 +// aColumnOrBarTransformation +3355;0;14962;0;1335;3679;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aColumnOrBarPosition.X +15149 +// aColumnOrBarPosition.Y +5681 +// aColumnOrBarSize.Height +1334 +// aColumnOrBarSize.Width +3168 +// aColumnOrBarTransformation +3168;0;15149;0;1334;5681;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_column_chart.txt b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_column_chart.txt new file mode 100644 index 000000000..c183d4ea5 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_column_chart.txt @@ -0,0 +1,162 @@ +// nSeriesCount +4 +/// Series 0 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +5971 +// aColumnOrBarSize.Height +1378 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;1378;5971;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +5139 +// aColumnOrBarSize.Height +2210 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;2210;5139;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +5082 +// aColumnOrBarSize.Height +2267 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;2267;5082;0;0;1 +/// Series 1 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +4421 +// aColumnOrBarSize.Height +1550 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;1550;4421;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +3912 +// aColumnOrBarSize.Height +1227 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;1227;3912;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +3459 +// aColumnOrBarSize.Height +1623 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;1623;3459;0;0;1 +/// Series 2 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +3 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +3502 +// aColumnOrBarSize.Height +919 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;919;3502;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +2711 +// aColumnOrBarSize.Height +1201 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;1201;2711;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +2635 +// aColumnOrBarSize.Height +824 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;824;2635;0;0;1 +/// Series 3 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +2 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +1345 +// aColumnOrBarSize.Height +2157 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;2157;1345;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +1345 +// aColumnOrBarSize.Height +1366 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;1366;1345;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +1345 +// aColumnOrBarSize.Height +1290 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;1290;1345;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_bar_chart.txt b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_bar_chart.txt new file mode 100644 index 000000000..228bc26b8 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_bar_chart.txt @@ -0,0 +1,162 @@ +// nSeriesCount +4 +/// Series 0 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +1945 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +2828 +// aColumnOrBarTransformation +2828;0;3582;0;800;1945;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +3946 +// aColumnOrBarSize.Height +801 +// aColumnOrBarSize.Width +4773 +// aColumnOrBarTransformation +4773;0;3582;0;801;3946;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aColumnOrBarPosition.X +3582 +// aColumnOrBarPosition.Y +5948 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +2592 +// aColumnOrBarTransformation +2592;0;3582;0;800;5948;0;0;1 +/// Series 1 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aColumnOrBarPosition.X +6410 +// aColumnOrBarPosition.Y +1945 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +3182 +// aColumnOrBarTransformation +3182;0;6410;0;800;1945;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aColumnOrBarPosition.X +8355 +// aColumnOrBarPosition.Y +3946 +// aColumnOrBarSize.Height +801 +// aColumnOrBarSize.Width +2652 +// aColumnOrBarTransformation +2652;0;8355;0;801;3946;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aColumnOrBarPosition.X +6174 +// aColumnOrBarPosition.Y +5948 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +1857 +// aColumnOrBarTransformation +1857;0;6174;0;800;5948;0;0;1 +/// Series 2 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +255 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aColumnOrBarPosition.X +9592 +// aColumnOrBarPosition.Y +1945 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +1886 +// aColumnOrBarTransformation +1886;0;9592;0;800;1945;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aColumnOrBarPosition.X +11007 +// aColumnOrBarPosition.Y +3946 +// aColumnOrBarSize.Height +801 +// aColumnOrBarSize.Width +2593 +// aColumnOrBarTransformation +2593;0;11007;0;801;3946;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aColumnOrBarPosition.X +8031 +// aColumnOrBarPosition.Y +5948 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +943 +// aColumnOrBarTransformation +943;0;8031;0;800;5948;0;0;1 +/// Series 3 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aColumnOrBarPosition.X +11478 +// aColumnOrBarPosition.Y +1945 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +4429 +// aColumnOrBarTransformation +4429;0;11478;0;800;1945;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aColumnOrBarPosition.X +13600 +// aColumnOrBarPosition.Y +3946 +// aColumnOrBarSize.Height +801 +// aColumnOrBarSize.Width +2952 +// aColumnOrBarTransformation +2952;0;13600;0;801;3946;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aColumnOrBarPosition.X +8974 +// aColumnOrBarPosition.Y +5948 +// aColumnOrBarSize.Height +800 +// aColumnOrBarSize.Width +1476 +// aColumnOrBarTransformation +1476;0;8974;0;800;5948;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_column_chart.txt b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_column_chart.txt new file mode 100644 index 000000000..032645258 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_column_chart.txt @@ -0,0 +1,162 @@ +// nSeriesCount +4 +/// Series 0 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +1 +// static_cast(aSeriesColumnOrBarFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +6196 +// aColumnOrBarSize.Height +1153 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;1153;6196;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +5404 +// aColumnOrBarSize.Height +1945 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;1945;5404;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +6292 +// aColumnOrBarSize.Height +1057 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;1057;6292;0;0;1 +/// Series 1 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +4899 +// aColumnOrBarSize.Height +1297 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;1297;4899;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +4323 +// aColumnOrBarSize.Height +1081 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;1081;4323;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +5536 +// aColumnOrBarSize.Height +756 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;756;5536;0;0;1 +/// Series 2 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +4 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +4131 +// aColumnOrBarSize.Height +768 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;768;4131;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +3266 +// aColumnOrBarSize.Height +1057 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;1057;3266;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +5151 +// aColumnOrBarSize.Height +385 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;385;5151;0;0;1 +/// Series 3 ColumnsOrBars +// nColumnOrBarCountInSeries +3 +// static_cast(aSeriesColumnOrBarFillStyle) +2 +// static_cast(aSeriesColumnOrBarFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aColumnOrBarPosition.X +14878 +// aColumnOrBarPosition.Y +2326 +// aColumnOrBarSize.Height +1805 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;14878;0;1805;2326;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aColumnOrBarPosition.X +9967 +// aColumnOrBarPosition.Y +2063 +// aColumnOrBarSize.Height +1203 +// aColumnOrBarSize.Width +1964 +// aColumnOrBarTransformation +1964;0;9967;0;1203;2063;0;0;1 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aColumnOrBarPosition.X +5055 +// aColumnOrBarPosition.Y +4550 +// aColumnOrBarSize.Height +601 +// aColumnOrBarSize.Width +1965 +// aColumnOrBarTransformation +1965;0;5055;0;601;4550;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/gridtest/formated_grid_line.txt b/chart2/qa/extras/chart2dump/reference/gridtest/formated_grid_line.txt new file mode 100644 index 000000000..b3d3c0987 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/gridtest/formated_grid_line.txt @@ -0,0 +1,17 @@ +/// CID/D=0:CS=0:Axis=0,0:Grid=0 +// aGridPosition.X +3763 +// aGridPosition.Y +1344 +// aGridSize.Height +6005 +// aGridSize.Width +15480 +// aGridTransformation +15481;0;3763;0;6006;1344;0;0;1 +// sGridLineDash +2;1;1970;0;127 +// static_cast(aLineColor) +65280 +// nLineWidth +100 diff --git a/chart2/qa/extras/chart2dump/reference/gridtest/horizontal_grid.txt b/chart2/qa/extras/chart2dump/reference/gridtest/horizontal_grid.txt new file mode 100644 index 000000000..428a206de --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/gridtest/horizontal_grid.txt @@ -0,0 +1,17 @@ +/// CID/D=0:CS=0:Axis=1,0:Grid=0 +// aGridPosition.X +3644 +// aGridPosition.Y +1344 +// aGridSize.Height +6005 +// aGridSize.Width +14988 +// aGridTransformation +14989;0;3644;0;6006;1344;0;0;1 +// sGridLineDash +0;1;201;20;20 +// static_cast(aLineColor) +0 +// nLineWidth +0 diff --git a/chart2/qa/extras/chart2dump/reference/gridtest/minor_grid.txt b/chart2/qa/extras/chart2dump/reference/gridtest/minor_grid.txt new file mode 100644 index 000000000..35f3d560e --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/gridtest/minor_grid.txt @@ -0,0 +1,68 @@ +/// CID/D=0:CS=0:Axis=1,0:Grid=0 +// aGridPosition.X +3529 +// aGridPosition.Y +1344 +// aGridSize.Height +6005 +// aGridSize.Width +14515 +// aGridTransformation +14516;0;3529;0;6006;1344;0;0;1 +// sGridLineDash +0;1;201;20;20 +// static_cast(aLineColor) +0 +// nLineWidth +0 +/// CID/D=0:CS=0:Axis=0,0:Grid=0 +// aGridPosition.X +3529 +// aGridPosition.Y +1344 +// aGridSize.Height +6005 +// aGridSize.Width +14515 +// aGridTransformation +14516;0;3529;0;6006;1344;0;0;1 +// sGridLineDash +0;1;201;20;20 +// static_cast(aLineColor) +11776947 +// nLineWidth +0 +/// CID/D=0:CS=0:Axis=1,0:Grid=0:SubGrid=0 +// aGridPosition.X +3529 +// aGridPosition.Y +1773 +// aGridSize.Height +5147 +// aGridSize.Width +14515 +// aGridTransformation +14516;0;3529;0;5148;1773;0;0;1 +// sGridLineDash +0;1;201;20;20 +// static_cast(aLineColor) +14540253 +// nLineWidth +0 +/// CID/D=0:CS=0:Axis=0,0:Grid=0:SubGrid=0 +// aGridPosition.X +5343 +// aGridPosition.Y +1344 +// aGridSize.Height +6005 +// aGridSize.Width +10886 +// aGridTransformation +10887;0;5343;0;6006;1344;0;0;1 +// sGridLineDash +0;1;201;20;20 +// static_cast(aLineColor) +14540253 +// nLineWidth +0 diff --git a/chart2/qa/extras/chart2dump/reference/gridtest/vertical_grid.txt b/chart2/qa/extras/chart2dump/reference/gridtest/vertical_grid.txt new file mode 100644 index 000000000..a0c341dc6 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/gridtest/vertical_grid.txt @@ -0,0 +1,17 @@ +/// CID/D=0:CS=0:Axis=0,0:Grid=0 +// aGridPosition.X +3620 +// aGridPosition.Y +1343 +// aGridSize.Height +6120 +// aGridSize.Width +15109 +// aGridTransformation +15110;0;3620;0;6121;1343;0;0;1 +// sGridLineDash +0;1;201;20;20 +// static_cast(aLineColor) +11776947 +// nLineWidth +0 diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/custom_legend_position.txt b/chart2/qa/extras/chart2dump/reference/legendtest/custom_legend_position.txt new file mode 100644 index 000000000..ad31f8c86 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/custom_legend_position.txt @@ -0,0 +1,50 @@ +// nLegendEntryCount +4 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +43091 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +8388352 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16765728 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16711807 +// xLegendEntryText->getString() +A +// xLegendEntryText->getString() +B +// xLegendEntryText->getString() +C +// xLegendEntryText->getString() +DD diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_bottom.txt b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_bottom.txt new file mode 100644 index 000000000..5d2a2c011 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_bottom.txt @@ -0,0 +1,50 @@ +// nLegendEntryCount +4 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +43091 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +8388352 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16765728 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16711807 +// xLegendEntryText->getString() +AA +// xLegendEntryText->getString() +BB +// xLegendEntryText->getString() +CC +// xLegendEntryText->getString() +DD diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_left_side.txt b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_left_side.txt new file mode 100644 index 000000000..7f55f8918 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_left_side.txt @@ -0,0 +1,50 @@ +// nLegendEntryCount +4 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +17798 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +8388352 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16765728 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +32767 +// xLegendEntryText->getString() +AA +// xLegendEntryText->getString() +BB +// xLegendEntryText->getString() +CC +// xLegendEntryText->getString() +DD diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_right_side.txt b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_right_side.txt new file mode 100644 index 000000000..78c83ef62 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_right_side.txt @@ -0,0 +1,18 @@ +// nLegendEntryCount +2 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.RectangleShape +// static_cast(aEntryGeomColor) +17798 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.RectangleShape +// static_cast(aEntryGeomColor) +16728590 +// xLegendEntryText->getString() +A +// xLegendEntryText->getString() +C-B diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_top.txt b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_top.txt new file mode 100644 index 000000000..5d2a2c011 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/legend_on_top.txt @@ -0,0 +1,50 @@ +// nLegendEntryCount +4 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +43091 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +8388352 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16765728 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16711807 +// xLegendEntryText->getString() +AA +// xLegendEntryText->getString() +BB +// xLegendEntryText->getString() +CC +// xLegendEntryText->getString() +DD diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/many_legend_entries.txt b/chart2/qa/extras/chart2dump/reference/legendtest/many_legend_entries.txt new file mode 100644 index 000000000..a3ef82203 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/many_legend_entries.txt @@ -0,0 +1,182 @@ +// nLegendEntryCount +15 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +43091 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +8388352 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16765728 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16711807 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +8257569 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +8637183 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +3227652 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +11456256 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +4923247 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16749838 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +12910603 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +34001 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +17798 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16728590 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +16765728 +// xLegendEntryText->getString() +AA +// xLegendEntryText->getString() +BB +// xLegendEntryText->getString() +CC +// xLegendEntryText->getString() +DD +// xLegendEntryText->getString() +EE +// xLegendEntryText->getString() +FF +// xLegendEntryText->getString() +GG +// xLegendEntryText->getString() +HH +// xLegendEntryText->getString() +II +// xLegendEntryText->getString() +JJ +// xLegendEntryText->getString() +KK +// xLegendEntryText->getString() +LL +// xLegendEntryText->getString() +MM +// xLegendEntryText->getString() +NN +// xLegendEntryText->getString() +OO diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/minimal_legend_test.txt b/chart2/qa/extras/chart2dump/reference/legendtest/minimal_legend_test.txt new file mode 100644 index 000000000..63a2980cf --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/minimal_legend_test.txt @@ -0,0 +1,14 @@ +// nLegendEntryCount +1 +// xLegendEntryContainer->getCount() +3 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// sEntryGeomShapeType +com.sun.star.drawing.PolyPolygonShape +// static_cast(aEntryGeomColor) +17798 +// xLegendEntryText->getString() +Inkjet diff --git a/chart2/qa/extras/chart2dump/reference/legendtest/multiple_categories.txt b/chart2/qa/extras/chart2dump/reference/legendtest/multiple_categories.txt new file mode 100644 index 000000000..9c207c981 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/legendtest/multiple_categories.txt @@ -0,0 +1,66 @@ +// nLegendEntryCount +8 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryContainer->getCount() +2 +// sEntryGeomShapeType +com.sun.star.drawing.LineShape +// static_cast(aEntryGeomColor) +7512015 +// xLegendEntryText->getString() +A In0 +// xLegendEntryText->getString() +A In100 +// xLegendEntryText->getString() +A In200 +// xLegendEntryText->getString() +A In400 +// xLegendEntryText->getString() +B In0 +// xLegendEntryText->getString() +B In100 +// xLegendEntryText->getString() +B In200 +// xLegendEntryText->getString() +B In400 diff --git a/chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt b/chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt new file mode 100644 index 000000000..b2dfd3329 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt @@ -0,0 +1,194 @@ +// nSeriesCount +4 +/// Series 0 slices +// nSlicesCountInSeries +3 +/// /D=0:CS=0:CT=0:Series=0:Point=0 +// aSlicePosition.X +6089 +// aSlicePosition.Y +2527 +// aSliceSize.Height +2118 +// aSliceSize.Width +4554 +// aSliceTransformation +4554;0;6089;0;2118;2527;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=0:Point=1 +// aSlicePosition.X +4353 +// aSlicePosition.Y +2931 +// aSliceSize.Height +6249 +// aSliceSize.Width +4305 +// aSliceTransformation +4305;0;4353;0;6249;2931;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=0:Point=2 +// aSlicePosition.X +8909 +// aSlicePosition.Y +4532 +// aSliceSize.Height +4689 +// aSliceSize.Width +2544 +// aSliceTransformation +2544;0;8909;0;4689;4532;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 +/// Series 1 slices +// nSlicesCountInSeries +3 +/// /D=0:CS=0:CT=0:Series=1:Point=0 +// aSlicePosition.X +6601 +// aSlicePosition.Y +3192 +// aSliceSize.Height +1755 +// aSliceSize.Width +3449 +// aSliceTransformation +3449;0;6601;0;1755;3192;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=1:Point=1 +// aSlicePosition.X +5018 +// aSlicePosition.Y +3420 +// aSliceSize.Height +4691 +// aSliceSize.Width +1852 +// aSliceTransformation +1852;0;5018;0;4691;3420;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=1:Point=2 +// aSlicePosition.X +6270 +// aSlicePosition.Y +4645 +// aSliceSize.Height +3869 +// aSliceSize.Width +4070 +// aSliceTransformation +4070;0;6270;0;3869;4645;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 +/// Series 2 slices +// nSlicesCountInSeries +3 +/// /D=0:CS=0:CT=0:Series=2:Point=0 +// aSlicePosition.X +7688 +// aSlicePosition.Y +3857 +// aSliceSize.Height +1392 +// aSliceSize.Width +1769 +// aSliceTransformation +1769;0;7688;0;1392;3857;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=2:Point=1 +// aSlicePosition.X +5683 +// aSlicePosition.Y +3857 +// aSliceSize.Height +3971 +// aSliceSize.Width +2010 +// aSliceTransformation +2010;0;5683;0;3971;3857;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=2:Point=2 +// aSlicePosition.X +7394 +// aSlicePosition.Y +4947 +// aSliceSize.Height +2902 +// aSliceSize.Width +2281 +// aSliceTransformation +2281;0;7394;0;2902;4947;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 +/// Series 3 slices +// nSlicesCountInSeries +3 +/// /D=0:CS=0:CT=0:Series=3:Point=0 +// aSlicePosition.X +7714 +// aSlicePosition.Y +4524 +// aSliceSize.Height +1027 +// aSliceSize.Width +1151 +// aSliceTransformation +1151;0;7714;0;1027;4524;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=3:Point=1 +// aSlicePosition.X +6348 +// aSlicePosition.Y +4522 +// aSliceSize.Height +1935 +// aSliceSize.Width +1401 +// aSliceTransformation +1401;0;6348;0;1935;4522;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=3:Point=2 +// aSlicePosition.X +6493 +// aSlicePosition.Y +5249 +// aSliceSize.Height +1935 +// aSliceSize.Width +2517 +// aSliceTransformation +2517;0;6493;0;1935;5249;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 diff --git a/chart2/qa/extras/chart2dump/reference/piecharttest/exploded_pie_chart.txt b/chart2/qa/extras/chart2dump/reference/piecharttest/exploded_pie_chart.txt new file mode 100644 index 000000000..9cbc93de4 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/piecharttest/exploded_pie_chart.txt @@ -0,0 +1,50 @@ +// nSeriesCount +4 +/// Series 0 slices +// nSlicesCountInSeries +3 +/// /D=0:CS=0:CT=0:Series=0:Point=0 +// aSlicePosition.X +6018 +// aSlicePosition.Y +2178 +// aSliceSize.Height +2218 +// aSliceSize.Width +3177 +// aSliceTransformation +3177;0;6018;0;2218;2178;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=0:Point=1 +// aSlicePosition.X +5246 +// aSlicePosition.Y +3867 +// aSliceSize.Height +3714 +// aSliceSize.Width +3525 +// aSliceTransformation +3525;0;5246;0;3714;3867;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=0:Point=2 +// aSlicePosition.X +7679 +// aSlicePosition.Y +3576 +// aSliceSize.Height +3387 +// aSliceSize.Width +2217 +// aSliceTransformation +2217;0;7679;0;3387;3576;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 diff --git a/chart2/qa/extras/chart2dump/reference/piecharttest/normal_pie_chart.txt b/chart2/qa/extras/chart2dump/reference/piecharttest/normal_pie_chart.txt new file mode 100644 index 000000000..1b97446cc --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/piecharttest/normal_pie_chart.txt @@ -0,0 +1,50 @@ +// nSeriesCount +4 +/// Series 0 slices +// nSlicesCountInSeries +3 +/// /D=0:CS=0:CT=0:Series=0:Point=0 +// aSlicePosition.X +4353 +// aSlicePosition.Y +1846 +// aSliceSize.Height +3416 +// aSliceSize.Width +3326 +// aSliceTransformation +3326;0;4353;0;3416;1846;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=0:Point=1 +// aSlicePosition.X +4354 +// aSlicePosition.Y +5172 +// aSliceSize.Height +3326 +// aSliceSize.Width +6601 +// aSliceTransformation +6601;0;4354;0;3326;5172;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=0:Point=2 +// aSlicePosition.X +7679 +// aSlicePosition.Y +1846 +// aSliceSize.Height +3896 +// aSliceSize.Width +3326 +// aSliceTransformation +3326;0;7679;0;3896;1846;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 diff --git a/chart2/qa/extras/chart2dump/reference/piecharttest/pie_chart_many_slices.txt b/chart2/qa/extras/chart2dump/reference/piecharttest/pie_chart_many_slices.txt new file mode 100644 index 000000000..820a34444 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/piecharttest/pie_chart_many_slices.txt @@ -0,0 +1,275 @@ +// nSeriesCount +1 +/// Series 0 slices +// nSlicesCountInSeries +18 +/// /D=0:CS=0:CT=0:Series=0:Point=0 +// aSlicePosition.X +10469 +// aSlicePosition.Y +3869 +// aSliceSize.Height +4104 +// aSliceSize.Width +49 +// aSliceTransformation +49;0;10469;0;4104;3869;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=0:Point=1 +// aSlicePosition.X +10275 +// aSlicePosition.Y +505 +// aSliceSize.Height +4103 +// aSliceSize.Width +158 +// aSliceTransformation +158;0;10275;0;4103;505;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=0:Point=2 +// aSlicePosition.X +10224 +// aSlicePosition.Y +3872 +// aSliceSize.Height +4101 +// aSliceSize.Width +294 +// aSliceTransformation +294;0;10224;0;4101;3872;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 +/// /D=0:CS=0:CT=0:Series=0:Point=3 +// aSlicePosition.X +10050 +// aSlicePosition.Y +3879 +// aSliceSize.Height +4094 +// aSliceSize.Width +468 +// aSliceTransformation +468;0;10050;0;4094;3879;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +5741852 +/// /D=0:CS=0:CT=0:Series=0:Point=4 +// aSlicePosition.X +9734 +// aSlicePosition.Y +3895 +// aSliceSize.Height +4078 +// aSliceSize.Width +784 +// aSliceTransformation +784;0;9734;0;4078;3895;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +8257569 +/// /D=0:CS=0:CT=0:Series=0:Point=5 +// aSlicePosition.X +9478 +// aSlicePosition.Y +3944 +// aSliceSize.Height +4029 +// aSliceSize.Width +1040 +// aSliceTransformation +1040;0;9478;0;4029;3944;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +8637183 +/// /D=0:CS=0:CT=0:Series=0:Point=6 +// aSlicePosition.X +9184 +// aSlicePosition.Y +4002 +// aSliceSize.Height +3971 +// aSliceSize.Width +1334 +// aSliceTransformation +1334;0;9184;0;3971;4002;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +3227652 +/// /D=0:CS=0:CT=0:Series=0:Point=7 +// aSlicePosition.X +8858 +// aSlicePosition.Y +4091 +// aSliceSize.Height +3882 +// aSliceSize.Width +1660 +// aSliceTransformation +1660;0;8858;0;3882;4091;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +11456256 +/// /D=0:CS=0:CT=0:Series=0:Point=8 +// aSlicePosition.X +8506 +// aSlicePosition.Y +4219 +// aSliceSize.Height +3754 +// aSliceSize.Width +2012 +// aSliceTransformation +2012;0;8506;0;3754;4219;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +4923247 +/// /D=0:CS=0:CT=0:Series=0:Point=9 +// aSlicePosition.X +8030 +// aSlicePosition.Y +4395 +// aSliceSize.Height +3578 +// aSliceSize.Width +2488 +// aSliceTransformation +2488;0;8030;0;3578;4395;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16749838 +/// /D=0:CS=0:CT=0:Series=0:Point=10 +// aSlicePosition.X +7311 +// aSlicePosition.Y +4708 +// aSliceSize.Height +3265 +// aSliceSize.Width +3207 +// aSliceTransformation +3207;0;7311;0;3265;4708;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +12910603 +/// /D=0:CS=0:CT=0:Series=0:Point=11 +// aSlicePosition.X +6490 +// aSlicePosition.Y +5411 +// aSliceSize.Height +2562 +// aSliceSize.Width +4028 +// aSliceTransformation +4028;0;6490;0;2562;5411;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +34001 +/// /D=0:CS=0:CT=0:Series=0:Point=12 +// aSlicePosition.X +6414 +// aSlicePosition.Y +7182 +// aSliceSize.Height +2834 +// aSliceSize.Width +4104 +// aSliceTransformation +4104;0;6414;0;2834;7182;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=0:Point=13 +// aSlicePosition.X +6959 +// aSlicePosition.Y +7973 +// aSliceSize.Height +3991 +// aSliceSize.Width +3559 +// aSliceTransformation +3559;0;6959;0;3991;7973;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=0:Point=14 +// aSlicePosition.X +9562 +// aSlicePosition.Y +7973 +// aSliceSize.Height +4104 +// aSliceSize.Width +3990 +// aSliceTransformation +3990;0;9562;0;4104;7973;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 +/// /D=0:CS=0:CT=0:Series=0:Point=15 +// aSlicePosition.X +10518 +// aSlicePosition.Y +6606 +// aSliceSize.Height +4129 +// aSliceSize.Width +4104 +// aSliceTransformation +4104;0;10518;0;4129;6606;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +5741852 +/// /D=0:CS=0:CT=0:Series=0:Point=16 +// aSlicePosition.X +10518 +// aSlicePosition.Y +3909 +// aSliceSize.Height +4064 +// aSliceSize.Width +3869 +// aSliceTransformation +3869;0;10518;0;4064;3909;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +8257569 +/// /D=0:CS=0:CT=0:Series=0:Point=17 +// aSlicePosition.X +10658 +// aSlicePosition.Y +1862 +// aSliceSize.Height +4104 +// aSliceSize.Width +573 +// aSliceTransformation +573;0;10658;0;4104;1862;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +8637183 diff --git a/chart2/qa/extras/chart2dump/reference/piecharttest/rotated_pie_chart.txt b/chart2/qa/extras/chart2dump/reference/piecharttest/rotated_pie_chart.txt new file mode 100644 index 000000000..e1a370859 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/piecharttest/rotated_pie_chart.txt @@ -0,0 +1,50 @@ +// nSeriesCount +4 +/// Series 0 slices +// nSlicesCountInSeries +3 +/// /D=0:CS=0:CT=0:Series=0:Point=0 +// aSlicePosition.X +7679 +// aSlicePosition.Y +2779 +// aSliceSize.Height +4767 +// aSliceSize.Width +3326 +// aSliceTransformation +3326;0;7679;0;4767;2779;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +17798 +/// /D=0:CS=0:CT=0:Series=0:Point=1 +// aSlicePosition.X +4353 +// aSlicePosition.Y +3306 +// aSliceSize.Height +5192 +// aSliceSize.Width +5654 +// aSliceTransformation +5654;0;4353;0;5192;3306;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16728590 +/// /D=0:CS=0:CT=0:Series=0:Point=2 +// aSlicePosition.X +4925 +// aSlicePosition.Y +1846 +// aSliceSize.Height +3326 +// aSliceSize.Width +5064 +// aSliceTransformation +5064;0;4925;0;3326;1846;0;0;1 +// static_cast(aSliceFillStyle) +1 +// static_cast(aSliceFillColor) +16765728 diff --git a/chart2/qa/extras/chart2dump/reference/pivotchartdatabuttontest/pivotchart_data_button.txt b/chart2/qa/extras/chart2dump/reference/pivotchartdatabuttontest/pivotchart_data_button.txt new file mode 100644 index 000000000..3d7d8a55c --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pivotchartdatabuttontest/pivotchart_data_button.txt @@ -0,0 +1,2 @@ +// static_cast( aButtonFillColor ) +16185078 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_and_points.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_and_points.txt new file mode 100644 index 000000000..007a25ed4 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_and_points.txt @@ -0,0 +1,250 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +10215 +// aLinePosition.Y +3360 +// aLineSize.Height +4263 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;4263;3360;0;0;1 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +7498 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;7498;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +3235 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;3235;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +7037 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;7037;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16711807 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +10215 +// aLinePosition.Y +6470 +// aLineSize.Height +2592 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;2592;6470;0;0;1 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +8937 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;8937;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +7382 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;7382;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +6345 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;6345;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +10215 +// aLinePosition.Y +7622 +// aLineSize.Height +3226 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;3226;7622;0;0;1 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +10723 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;10723;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +7497 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;7497;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +8880 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;8880;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +10215 +// aLinePosition.Y +4033 +// aLineSize.Height +5772 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;5772;4033;0;0;1 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +9680 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;9680;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16776960 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +6794 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;6794;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16776960 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +3908 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;3908;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16776960 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_only.txt new file mode 100644 index 000000000..c92fbb1bf --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_lines_only.txt @@ -0,0 +1,58 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +10215 +// aLinePosition.Y +3360 +// aLineSize.Height +4263 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;4263;3360;0;0;1 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +10215 +// aLinePosition.Y +6470 +// aLineSize.Height +2592 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;2592;6470;0;0;1 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +10215 +// aLinePosition.Y +7622 +// aLineSize.Height +3226 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;3226;7622;0;0;1 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +2 +// aLinePosition.X +10215 +// aLinePosition.Y +4033 +// aLineSize.Height +5772 +// aLineSize.Width +15800 +// aLineTransformation +15800;0;10215;0;5772;4033;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_points_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_points_only.txt new file mode 100644 index 000000000..61c521ff3 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/normal_line_chart_points_only.txt @@ -0,0 +1,198 @@ +// nSeriesCount +4 +/// Series 0 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +7498 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;7498;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +3235 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;3235;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16711807 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +7037 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;7037;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16711807 +/// Series 1 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +8937 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;8937;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +7382 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;7382;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +6345 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;6345;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// Series 2 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +10723 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;10723;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +7497 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;7497;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +8880 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;8880;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +10079487 +/// Series 3 +/// Points are displayed +// nPointCountInSeries +3 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +10090 +// aPointPosition.Y +9680 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;10090;0;250;9680;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16776960 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +17990 +// aPointPosition.Y +6794 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;17990;0;250;6794;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16776960 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +25890 +// aPointPosition.Y +3908 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;25890;0;250;3908;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16776960 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_and_points.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_and_points.txt new file mode 100644 index 000000000..01c6448c2 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_and_points.txt @@ -0,0 +1,310 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +8218 +// aLineSize.Height +2227 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;2227;8218;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +8093 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;8093;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +8212 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;8212;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +9941 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;9941;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +10320 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;10320;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +4844 +// aLineSize.Height +2549 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;2549;4844;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +4719 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;4719;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +5660 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;5660;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +6718 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;6718;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +7268 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;7268;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +3131 +// aLineSize.Height +1802 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;1802;3131;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +3006 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;3006;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +3164 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;3164;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +4808 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;4808;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +4184 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;4184;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +448 +// aLineSize.Height +0 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;0;448;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +323 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;323;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +323 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;323;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +323 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;323;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +323 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;323;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_only.txt new file mode 100644 index 000000000..42eaae0b2 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_lines_only.txt @@ -0,0 +1,58 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +8218 +// aLineSize.Height +2227 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;2227;8218;0;0;1 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +4844 +// aLineSize.Height +2549 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;2549;4844;0;0;1 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +3131 +// aLineSize.Height +1802 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;1802;3131;0;0;1 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +448 +// aLineSize.Height +0 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;0;448;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_points_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_points_only.txt new file mode 100644 index 000000000..c8d1819f9 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/percent_stacked_line_chart_points_only.txt @@ -0,0 +1,258 @@ +// nSeriesCount +4 +/// Series 0 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +2980 +// aPointPosition.Y +8115 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2980;0;250;8115;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +9124 +// aPointPosition.Y +8234 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9124;0;250;8234;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +15268 +// aPointPosition.Y +9967 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15268;0;250;9967;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3 +// aPointPosition.X +21412 +// aPointPosition.Y +10347 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21412;0;250;10347;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// Series 1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +2980 +// aPointPosition.Y +4732 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2980;0;250;4732;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +9124 +// aPointPosition.Y +5675 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9124;0;250;5675;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +15268 +// aPointPosition.Y +6736 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15268;0;250;6736;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3 +// aPointPosition.X +21412 +// aPointPosition.Y +7287 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21412;0;250;7287;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// Series 2 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +2980 +// aPointPosition.Y +3014 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2980;0;250;3014;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +9124 +// aPointPosition.Y +3173 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9124;0;250;3173;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +15268 +// aPointPosition.Y +4821 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15268;0;250;4821;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=3 +// aPointPosition.X +21412 +// aPointPosition.Y +4196 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21412;0;250;4196;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// Series 3 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +2980 +// aPointPosition.Y +324 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2980;0;250;324;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +9124 +// aPointPosition.Y +324 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9124;0;250;324;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +15268 +// aPointPosition.Y +324 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15268;0;250;324;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=3 +// aPointPosition.X +21412 +// aPointPosition.Y +324 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21412;0;250;324;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_and_points.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_and_points.txt new file mode 100644 index 000000000..c6ef9431c --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_and_points.txt @@ -0,0 +1,310 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +4801 +// aLinePosition.Y +3760 +// aLineSize.Height +3138 +// aLineSize.Width +7912 +// aLineTransformation +7912;0;4801;0;3138;3760;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +4676 +// aPointPosition.Y +6773 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4676;0;250;6773;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +7313 +// aPointPosition.Y +3635 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;7313;0;250;3635;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +9951 +// aPointPosition.Y +6434 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9951;0;250;6434;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3 +// aPointPosition.X +12588 +// aPointPosition.Y +5034 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12588;0;250;5034;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +4801 +// aLinePosition.Y +3912 +// aLineSize.Height +4045 +// aLineSize.Width +7912 +// aLineTransformation +7912;0;4801;0;4045;3912;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +4676 +// aPointPosition.Y +7832 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4676;0;250;7832;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +7313 +// aPointPosition.Y +6688 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;7313;0;250;6688;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +9951 +// aPointPosition.Y +5924 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9951;0;250;5924;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3 +// aPointPosition.X +12588 +// aPointPosition.Y +3787 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12588;0;250;3787;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +4801 +// aLinePosition.Y +3845 +// aLineSize.Height +5427 +// aLineSize.Width +7912 +// aLineTransformation +7912;0;4801;0;5427;3845;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +4676 +// aPointPosition.Y +9147 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4676;0;250;9147;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +7313 +// aPointPosition.Y +6772 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;7313;0;250;6772;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +9951 +// aPointPosition.Y +7790 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9951;0;250;7790;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=3 +// aPointPosition.X +12588 +// aPointPosition.Y +3720 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12588;0;250;3720;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +4801 +// aLinePosition.Y +2131 +// aLineSize.Height +6373 +// aLineSize.Width +7912 +// aLineTransformation +7912;0;4801;0;6373;2131;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +4676 +// aPointPosition.Y +8379 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4676;0;250;8379;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +7313 +// aPointPosition.Y +6255 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;7313;0;250;6255;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +9951 +// aPointPosition.Y +4131 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9951;0;250;4131;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=3 +// aPointPosition.X +12588 +// aPointPosition.Y +2006 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12588;0;250;2006;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_only.txt new file mode 100644 index 000000000..55a84b00f --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_lines_only.txt @@ -0,0 +1,58 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +5069 +// aLinePosition.Y +3954 +// aLineSize.Height +3299 +// aLineSize.Width +8352 +// aLineTransformation +8352;0;5069;0;3299;3954;0;0;1 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +5069 +// aLinePosition.Y +4114 +// aLineSize.Height +4253 +// aLineSize.Width +8352 +// aLineTransformation +8352;0;5069;0;4253;4114;0;0;1 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +5069 +// aLinePosition.Y +4043 +// aLineSize.Height +5706 +// aLineSize.Width +8352 +// aLineTransformation +8352;0;5069;0;5706;4043;0;0;1 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +5069 +// aLinePosition.Y +2242 +// aLineSize.Height +6700 +// aLineSize.Width +8352 +// aLineTransformation +8352;0;5069;0;6700;2242;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_points_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_points_only.txt new file mode 100644 index 000000000..1107f97cd --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/scatter_chart_points_only.txt @@ -0,0 +1,258 @@ +// nSeriesCount +4 +/// Series 0 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +4695 +// aPointPosition.Y +7540 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4695;0;250;7540;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +8618 +// aPointPosition.Y +4016 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;8618;0;250;4016;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +12540 +// aPointPosition.Y +7159 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12540;0;250;7159;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3 +// aPointPosition.X +16463 +// aPointPosition.Y +5588 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;16463;0;250;5588;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// Series 1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +4695 +// aPointPosition.Y +8730 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4695;0;250;8730;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +8618 +// aPointPosition.Y +7444 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;8618;0;250;7444;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +12540 +// aPointPosition.Y +6587 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12540;0;250;6587;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3 +// aPointPosition.X +16463 +// aPointPosition.Y +4187 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;16463;0;250;4187;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// Series 2 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +4695 +// aPointPosition.Y +10207 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4695;0;250;10207;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +8618 +// aPointPosition.Y +7540 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;8618;0;250;7540;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +12540 +// aPointPosition.Y +8683 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12540;0;250;8683;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=3 +// aPointPosition.X +16463 +// aPointPosition.Y +4111 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;16463;0;250;4111;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// Series 3 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +4695 +// aPointPosition.Y +9344 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;4695;0;250;9344;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +8618 +// aPointPosition.Y +6958 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;8618;0;250;6958;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +12540 +// aPointPosition.Y +4572 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;12540;0;250;4572;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=3 +// aPointPosition.X +16463 +// aPointPosition.Y +2186 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;16463;0;250;2186;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_and_points.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_and_points.txt new file mode 100644 index 000000000..d58d57d1e --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_and_points.txt @@ -0,0 +1,310 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +10042 +// aLineSize.Height +1320 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;1320;10042;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +11237 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;11237;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +9917 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;9917;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +11094 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;11094;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +10506 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;10506;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +7806 +// aLineSize.Height +2432 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;2432;7806;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +10113 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;10113;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +8312 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;8312;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +9168 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;9168;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +7681 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;7681;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +4953 +// aLineSize.Height +4715 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;4715;4953;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +9543 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;9543;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +6743 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;6743;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +8027 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;8027;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +4828 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;4828;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3101 +// aLinePosition.Y +1380 +// aLineSize.Height +7394 +// aLineSize.Width +18406 +// aLineTransformation +18406;0;3101;0;7394;1380;0;0;1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +8649 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;8649;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +4957 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;4957;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +5347 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;5347;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +1255 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;1255;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16744192 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_only.txt new file mode 100644 index 000000000..b8d7c7a24 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_lines_only.txt @@ -0,0 +1,58 @@ +// nSeriesCount +4 +/// Series 0 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3100 +// aLinePosition.Y +10256 +// aLineSize.Height +1221 +// aLineSize.Width +18405 +// aLineTransformation +18405;0;3100;0;1221;10256;0;0;1 +/// Series 1 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3100 +// aLinePosition.Y +8187 +// aLineSize.Height +2250 +// aLineSize.Width +18405 +// aLineTransformation +18405;0;3100;0;2250;8187;0;0;1 +/// Series 2 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3100 +// aLinePosition.Y +5547 +// aLineSize.Height +4362 +// aLineSize.Width +18405 +// aLineTransformation +18405;0;3100;0;4362;5547;0;0;1 +/// Series 3 +/// Lines are displayed +// static_cast(aSeriesLineStyle) +1 +// aLinePosition.X +3100 +// aLinePosition.Y +2240 +// aLineSize.Height +6843 +// aLineSize.Width +18405 +// aLineTransformation +18405;0;3100;0;6843;2240;0;0;1 diff --git a/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_points_only.txt b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_points_only.txt new file mode 100644 index 000000000..8803c6e02 --- /dev/null +++ b/chart2/qa/extras/chart2dump/reference/pointlinecharttest/stacked_line_chart_points_only.txt @@ -0,0 +1,258 @@ +// nSeriesCount +4 +/// Series 0 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +11237 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;11237;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +9917 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;9917;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +11094 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;11094;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +10506 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;10506;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +17798 +/// Series 1 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +10113 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;10113;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +8312 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;8312;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +9168 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;9168;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +7681 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;7681;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16728590 +/// Series 2 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +9543 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;9543;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +6743 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;6743;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +8027 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;8027;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +4828 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;4828;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +16765728 +/// Series 3 +/// Points are displayed +// nPointCountInSeries +4 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=0 +// aPointPosition.X +2976 +// aPointPosition.Y +8649 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;2976;0;250;8649;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=1 +// aPointPosition.X +9111 +// aPointPosition.Y +4957 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;9111;0;250;4957;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=2 +// aPointPosition.X +15246 +// aPointPosition.Y +5347 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;15246;0;250;5347;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 +/// CID/MultiClick/D=0:CS=0:CT=0:Series=3:Point=3 +// aPointPosition.X +21382 +// aPointPosition.Y +1255 +// aPointSize.Height +250 +// aPointSize.Width +250 +// aPointTransformation +250;0;21382;0;250;1255;0;0;1 +// static_cast(aPointFillStyle) +1 +// static_cast(aPointFillColor) +5741852 diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx new file mode 100644 index 000000000..b1bc22c61 --- /dev/null +++ b/chart2/qa/extras/chart2export.cxx @@ -0,0 +1,2834 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "charttest.hxx" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +using uno::Reference; +using beans::XPropertySet; + +class Chart2ExportTest : public ChartTest, public XmlTestTools +{ +protected: + + virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override; +public: + Chart2ExportTest() : ChartTest() {} + void testErrorBarXLSX(); + void testErrorBarPropXLSX(); + void testTrendline(); + void testTrendlineOOXML(); + void testTrendlineXLS(); + void testStockChart(); + void testBarChart(); + void testCrosses(); + void testScatterChartTextXValues(); + void testScatterXAxisValues(); + void testScatterXAxisCategories(); + void testChartDataTable(); + void testChartExternalData(); + void testEmbeddingsGrabBag(); + void testAreaChartLoad(); + void testUpDownBars(); + void testDoughnutChart(); + void testDisplayUnits(); + // void testFdo74115WallGradientFill(); + void testFdo74115WallBitmapFill(); + void testPieChartWallLineStyle(); + void testBarChartRotation(); + void testShapeFollowedByChart(); + void testPieChartDataLabels(); + void testSeriesIdxOrder(); + void testScatterPlotLabels(); + void testErrorBarDataRangeODS(); + void testChartCrash(); + void testPieChartRotation(); + void testEmbeddingsOleObjectGrabBag(); + void testGapWidthXLSX(); + void testSmoothedLines(); + void testLabelStringODS(); + void testFdo78290LineChartMarkerX(); + void testFdo78290ScatterChartMarkerX(); + void testFdo78290CombinationChartMarkerX(); + void testTdf126115IndividualMarker(); + void testAxisNumberFormatODS(); + void testAxisNumberFormatXLS(); + void testDataLabelBordersDOCX(); + void testDataLabel3DChartDOCX(); + void testDataLabelBarChartDOCX(); + void testDataLabelClusteredBarChartDOCX(); + void testDataLabelRadarChartDOCX(); + void testDataLabelDoughnutChartDOCX(); + void testDataLabelAreaChartDOCX(); + void testDataLabelDefaultLineChartDOCX(); + void testIndividualDataLabelProps(); + void testTdf108107(); + void testTdf114139(); + void testTdf64224(); + void testChartTitlePropertiesColorFillDOCX(); + void testChartTitlePropertiesGradientFillDOCX(); + void testChartTitlePropertiesBitmapFillDOCX(); + void testColorGradientWithTransparancyDOCX(); + void testColorGradientWithTransparancyODS(); + void testColorGradientStopXLSX(); + void testRadialColorGradientDOCX(); + void testBarChartDataPointPropDOCX(); + void testFdo83058dlblPos(); + void testAutoTitleDelXLSX(); + void testDispBlanksAsXLSX(); + void testMarkerColorXLSX(); + void testRoundedCornersXLSX(); + void testAxisNumberFormatXLSX(); + void testDataPointLabelNumberFormatXLSX(); + void testDataLabelDefaultValuesXLSX(); + void testTitleOverlayXLSX(); + void testInvertIfNegativeXLSX(); + void testBubble3DXLSX(); + void testNoMarkerXLSX(); + void testTitleManualLayoutXLSX(); + void testPlotAreaManualLayoutXLSX(); + void testLegendManualLayoutXLSX(); + void testChartSubTitle(); + void testChartMainWithSubTitle(); + void testAutoTitleDeleted(); + void testChartTitlePropertiesColorFillXLSX(); + void testChartTitlePropertiesGradientFillXLSX(); + void testChartTitlePropertiesBitmapFillXLSX(); + void testBarChartDataPointPropXLSX(); + void testDataseriesOverlapStackedChartXLSX(); + void testAxisCharacterPropertiesXLSX(); + void testTitleCharacterPropertiesXLSX(); + void testPlotVisOnlyXLSX(); + void testBarChartVaryColorsXLSX(); + void testMultipleAxisXLSX(); + void testSecondaryAxisXLSX(); + void testSetSeriesToSecondaryAxisXLSX(); + void testCombinedChartSecondaryAxisXLSX(); + void testCombinedChartSecondaryAxisODS(); + void testCrossBetweenXLSX(); + void testCrossBetweenWithDeletedAxis(); + void testCrossBetweenODS(); + void testAxisTitleRotationXLSX(); + void testAxisTitlePositionDOCX(); + void testAxisCrossBetweenDOCX(); + void testPieChartDataPointExplosionXLSX(); + void testCustomDataLabel(); + void testCustomPositionofDataLabel(); + void testCustomDataLabelMultipleSeries(); + void testLeaderLines(); + void testNumberFormatExportPPTX(); + void testLabelSeparatorExportDOCX(); + void testChartTitlePropertiesColorFillPPTX(); + void testChartTitlePropertiesGradientFillPPTX(); + void testChartTitlePropertiesBitmapFillPPTX(); + void testxAxisLabelsRotation(); + void testMultipleCategoryAxisLablesXLSX(); + void testMultipleCategoryAxisLablesDOCX(); + void testTdf116163(); + void testTdf111824(); + void test3DAreaChartZAxis(); + void testTdf119029(); + void testTdf108022(); + void testTdf121744(); + void testTdf121189(); + void testTdf122031(); + void testTdf115012(); + void testTdf123206_customLabelText(); + void testCustomLabelText(); + void testDeletedLegendEntries(); + void testTdf130225(); + void testTdf59857(); + void testTdf126076(); + void testTdf75330(); + void testTdf127792(); + void testTdf131979(); + void testTdf132076(); + void testTdf125812(); + void testTdf133190(); + void testTdf133191(); + void testTdf132594(); + void testTdf136267(); + + CPPUNIT_TEST_SUITE(Chart2ExportTest); + CPPUNIT_TEST(testErrorBarXLSX); + CPPUNIT_TEST(testErrorBarPropXLSX); + CPPUNIT_TEST(testTrendline); + CPPUNIT_TEST(testTrendlineOOXML); + CPPUNIT_TEST(testTrendlineXLS); + CPPUNIT_TEST(testStockChart); + CPPUNIT_TEST(testBarChart); + CPPUNIT_TEST(testCrosses); + CPPUNIT_TEST(testScatterChartTextXValues); + CPPUNIT_TEST(testScatterXAxisValues); + CPPUNIT_TEST(testScatterXAxisCategories); + CPPUNIT_TEST(testChartDataTable); + CPPUNIT_TEST(testChartExternalData); + CPPUNIT_TEST(testEmbeddingsGrabBag); + CPPUNIT_TEST(testAreaChartLoad); + CPPUNIT_TEST(testUpDownBars); + CPPUNIT_TEST(testDoughnutChart); + CPPUNIT_TEST(testDisplayUnits); + // CPPUNIT_TEST(testFdo74115WallGradientFill); + CPPUNIT_TEST(testFdo74115WallBitmapFill); + CPPUNIT_TEST(testPieChartWallLineStyle); + CPPUNIT_TEST(testBarChartRotation); + CPPUNIT_TEST(testShapeFollowedByChart); + CPPUNIT_TEST(testPieChartDataLabels); + CPPUNIT_TEST(testSeriesIdxOrder); + CPPUNIT_TEST(testScatterPlotLabels); + CPPUNIT_TEST(testErrorBarDataRangeODS); + CPPUNIT_TEST(testChartCrash); + CPPUNIT_TEST(testPieChartRotation); + CPPUNIT_TEST(testEmbeddingsOleObjectGrabBag); + CPPUNIT_TEST(testGapWidthXLSX); + CPPUNIT_TEST(testSmoothedLines); + CPPUNIT_TEST(testLabelStringODS); + CPPUNIT_TEST(testFdo78290LineChartMarkerX); + CPPUNIT_TEST(testFdo78290ScatterChartMarkerX); + CPPUNIT_TEST(testFdo78290CombinationChartMarkerX); + CPPUNIT_TEST(testTdf126115IndividualMarker); + CPPUNIT_TEST(testAxisNumberFormatODS); + CPPUNIT_TEST(testAxisNumberFormatXLS); + CPPUNIT_TEST(testDataLabelBordersDOCX); + CPPUNIT_TEST(testDataLabel3DChartDOCX); + CPPUNIT_TEST(testDataLabelBarChartDOCX); + CPPUNIT_TEST(testDataLabelClusteredBarChartDOCX); + CPPUNIT_TEST(testDataLabelRadarChartDOCX); + CPPUNIT_TEST(testDataLabelDoughnutChartDOCX); + CPPUNIT_TEST(testDataLabelAreaChartDOCX); + CPPUNIT_TEST(testDataLabelDefaultLineChartDOCX); + CPPUNIT_TEST(testIndividualDataLabelProps); + CPPUNIT_TEST(testTdf108107); + CPPUNIT_TEST(testTdf114139); + CPPUNIT_TEST(testTdf64224); + CPPUNIT_TEST(testChartTitlePropertiesColorFillDOCX); + CPPUNIT_TEST(testChartTitlePropertiesGradientFillDOCX); + CPPUNIT_TEST(testChartTitlePropertiesBitmapFillDOCX); + CPPUNIT_TEST(testColorGradientWithTransparancyDOCX); + CPPUNIT_TEST(testColorGradientWithTransparancyODS); + CPPUNIT_TEST(testColorGradientStopXLSX); + CPPUNIT_TEST(testRadialColorGradientDOCX); + CPPUNIT_TEST(testBarChartDataPointPropDOCX); + CPPUNIT_TEST(testFdo83058dlblPos); + CPPUNIT_TEST(testAutoTitleDelXLSX); + CPPUNIT_TEST(testDispBlanksAsXLSX); + CPPUNIT_TEST(testMarkerColorXLSX); + CPPUNIT_TEST(testRoundedCornersXLSX); + CPPUNIT_TEST(testAxisNumberFormatXLSX); + CPPUNIT_TEST(testDataPointLabelNumberFormatXLSX); + CPPUNIT_TEST(testDataLabelDefaultValuesXLSX); + CPPUNIT_TEST(testTitleOverlayXLSX); + CPPUNIT_TEST(testInvertIfNegativeXLSX); + CPPUNIT_TEST(testBubble3DXLSX); + CPPUNIT_TEST(testNoMarkerXLSX); + CPPUNIT_TEST(testTitleManualLayoutXLSX); + CPPUNIT_TEST(testPlotAreaManualLayoutXLSX); + CPPUNIT_TEST(testLegendManualLayoutXLSX); + CPPUNIT_TEST(testChartSubTitle); + CPPUNIT_TEST(testChartMainWithSubTitle); + CPPUNIT_TEST(testAutoTitleDeleted); + CPPUNIT_TEST(testChartTitlePropertiesColorFillXLSX); + CPPUNIT_TEST(testChartTitlePropertiesGradientFillXLSX); + CPPUNIT_TEST(testChartTitlePropertiesBitmapFillXLSX); + CPPUNIT_TEST(testBarChartDataPointPropXLSX); + CPPUNIT_TEST(testDataseriesOverlapStackedChartXLSX); + CPPUNIT_TEST(testAxisCharacterPropertiesXLSX); + CPPUNIT_TEST(testTitleCharacterPropertiesXLSX); + CPPUNIT_TEST(testPlotVisOnlyXLSX); + CPPUNIT_TEST(testBarChartVaryColorsXLSX); + CPPUNIT_TEST(testMultipleAxisXLSX); + CPPUNIT_TEST(testSecondaryAxisXLSX); + CPPUNIT_TEST(testSetSeriesToSecondaryAxisXLSX); + CPPUNIT_TEST(testCombinedChartSecondaryAxisXLSX); + CPPUNIT_TEST(testCombinedChartSecondaryAxisODS); + CPPUNIT_TEST(testCrossBetweenXLSX); + CPPUNIT_TEST(testCrossBetweenWithDeletedAxis); + CPPUNIT_TEST(testCrossBetweenODS); + CPPUNIT_TEST(testAxisTitleRotationXLSX); + CPPUNIT_TEST(testAxisTitlePositionDOCX); + CPPUNIT_TEST(testAxisCrossBetweenDOCX); + CPPUNIT_TEST(testPieChartDataPointExplosionXLSX); + CPPUNIT_TEST(testCustomDataLabel); + CPPUNIT_TEST(testCustomPositionofDataLabel); + CPPUNIT_TEST(testCustomDataLabelMultipleSeries); + CPPUNIT_TEST(testLeaderLines); + CPPUNIT_TEST(testNumberFormatExportPPTX); + CPPUNIT_TEST(testLabelSeparatorExportDOCX); + CPPUNIT_TEST(testChartTitlePropertiesColorFillPPTX); + CPPUNIT_TEST(testChartTitlePropertiesGradientFillPPTX); + CPPUNIT_TEST(testChartTitlePropertiesBitmapFillPPTX); + CPPUNIT_TEST(testxAxisLabelsRotation); + CPPUNIT_TEST(testMultipleCategoryAxisLablesXLSX); + CPPUNIT_TEST(testMultipleCategoryAxisLablesDOCX); + CPPUNIT_TEST(testTdf116163); + CPPUNIT_TEST(testTdf111824); + CPPUNIT_TEST(test3DAreaChartZAxis); + CPPUNIT_TEST(testTdf119029); + CPPUNIT_TEST(testTdf108022); + CPPUNIT_TEST(testTdf121744); + CPPUNIT_TEST(testTdf121189); + CPPUNIT_TEST(testTdf122031); + CPPUNIT_TEST(testTdf115012); + CPPUNIT_TEST(testTdf123206_customLabelText); + CPPUNIT_TEST(testCustomLabelText); + CPPUNIT_TEST(testDeletedLegendEntries); + CPPUNIT_TEST(testTdf130225); + CPPUNIT_TEST(testTdf59857); + CPPUNIT_TEST(testTdf126076); + CPPUNIT_TEST(testTdf75330); + CPPUNIT_TEST(testTdf127792); + CPPUNIT_TEST(testTdf131979); + CPPUNIT_TEST(testTdf132076); + CPPUNIT_TEST(testTdf125812); + CPPUNIT_TEST(testTdf133190); + CPPUNIT_TEST(testTdf133191); + CPPUNIT_TEST(testTdf132594); + CPPUNIT_TEST(testTdf136267); + + CPPUNIT_TEST_SUITE_END(); + +protected: + /** + * Given that some problem doesn't affect the result in the importer, we + * test the resulting file directly, by opening the zip file, parsing an + * xml stream, and asserting an XPath expression. This method returns the + * xml stream, so that you can do the asserting. + */ + xmlDocUniquePtr parseExport(const OUString& rDir, const OUString& rFilterFormat); + +}; + +namespace { + +struct CheckForChartName +{ +private: + OUString aDir; + +public: + explicit CheckForChartName( const OUString& rDir ): + aDir(rDir) {} + + bool operator()(const OUString& rName) + { + if(!rName.startsWith(aDir)) + return false; + + if(!rName.endsWith(".xml")) + return false; + + return true; + } +}; + +OUString findChartFile(const OUString& rDir, uno::Reference< container::XNameAccess > const & xNames ) +{ + uno::Sequence aNames = xNames->getElementNames(); + OUString* pElement = std::find_if(aNames.begin(), aNames.end(), CheckForChartName(rDir)); + + CPPUNIT_ASSERT(pElement != aNames.end()); + return *pElement; +} + +} + +xmlDocUniquePtr Chart2ExportTest::parseExport(const OUString& rDir, const OUString& rFilterFormat) +{ + std::shared_ptr pTempFile = save(rFilterFormat); + + // Read the XML stream we're interested in. + uno::Reference xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), pTempFile->GetURL()); + uno::Reference xInputStream(xNameAccess->getByName(findChartFile(rDir, xNameAccess)), uno::UNO_QUERY); + CPPUNIT_ASSERT(xInputStream.is()); + std::unique_ptr pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true)); + + return parseXmlStream(pStream.get()); +} + +void Chart2ExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) +{ + static struct { char const * pPrefix; char const * pURI; } const aNamespaces[] = + { + { "w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main" }, + { "v", "urn:schemas-microsoft-com:vml" }, + { "c", "http://schemas.openxmlformats.org/drawingml/2006/chart" }, + { "a", "http://schemas.openxmlformats.org/drawingml/2006/main" }, + { "mc", "http://schemas.openxmlformats.org/markup-compatibility/2006" }, + { "wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape" }, + { "wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" }, + { "wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" }, + { "office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" }, + { "table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0" }, + { "text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0" }, + { "xlink", "http://www.w3c.org/1999/xlink" }, + { "c15", "http://schemas.microsoft.com/office/drawing/2012/chart" } + }; + for(size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i) + { + xmlXPathRegisterNs( + pXmlXPathCtx, + reinterpret_cast(aNamespaces[i].pPrefix), + reinterpret_cast(aNamespaces[i].pURI)); + } +} + +namespace { + +void testErrorBar( Reference< XPropertySet > const & xErrorBar ) +{ + sal_Int32 nErrorBarStyle; + CPPUNIT_ASSERT( + xErrorBar->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle); + CPPUNIT_ASSERT_EQUAL(chart::ErrorBarStyle::RELATIVE, nErrorBarStyle); + bool bShowPositive = bool(), bShowNegative = bool(); + CPPUNIT_ASSERT( + xErrorBar->getPropertyValue("ShowPositiveError") >>= bShowPositive); + CPPUNIT_ASSERT(bShowPositive); + CPPUNIT_ASSERT( + xErrorBar->getPropertyValue("ShowNegativeError") >>= bShowNegative); + CPPUNIT_ASSERT(bShowNegative); + double nVal = 0.0; + CPPUNIT_ASSERT(xErrorBar->getPropertyValue("PositiveError") >>= nVal); + CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, nVal, 1e-10); +} + +void checkCommonTrendline( + Reference const & xCurve, + double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward, + bool aExpectedForceIntercept, double aExpectedInterceptValue, + bool aExpectedShowEquation, bool aExpectedR2) +{ + Reference xProperties( xCurve , uno::UNO_QUERY ); + CPPUNIT_ASSERT(xProperties.is()); + + double aExtrapolateForward = 0.0; + CPPUNIT_ASSERT(xProperties->getPropertyValue("ExtrapolateForward") >>= aExtrapolateForward); + CPPUNIT_ASSERT_EQUAL(aExpectedExtrapolateForward, aExtrapolateForward); + + double aExtrapolateBackward = 0.0; + CPPUNIT_ASSERT(xProperties->getPropertyValue("ExtrapolateBackward") >>= aExtrapolateBackward); + CPPUNIT_ASSERT_EQUAL(aExpectedExtrapolateBackward, aExtrapolateBackward); + + bool bForceIntercept = false; + CPPUNIT_ASSERT(xProperties->getPropertyValue("ForceIntercept") >>= bForceIntercept); + CPPUNIT_ASSERT_EQUAL(aExpectedForceIntercept, bForceIntercept); + + if (bForceIntercept) + { + double aInterceptValue = 0.0; + CPPUNIT_ASSERT(xProperties->getPropertyValue("InterceptValue") >>= aInterceptValue); + CPPUNIT_ASSERT_EQUAL(aExpectedInterceptValue, aInterceptValue); + } + + Reference< XPropertySet > xEquationProperties( xCurve->getEquationProperties() ); + CPPUNIT_ASSERT(xEquationProperties.is()); + + bool bShowEquation = false; + CPPUNIT_ASSERT(xEquationProperties->getPropertyValue("ShowEquation") >>= bShowEquation); + CPPUNIT_ASSERT_EQUAL(aExpectedShowEquation, bShowEquation); + + bool bShowCorrelationCoefficient = false; + CPPUNIT_ASSERT(xEquationProperties->getPropertyValue("ShowCorrelationCoefficient") >>= bShowCorrelationCoefficient); + CPPUNIT_ASSERT_EQUAL(aExpectedR2, bShowCorrelationCoefficient); +} + +void checkNameAndType(Reference const & xProperties, const OUString& aExpectedName, const OUString& aExpectedServiceName) +{ + Reference< lang::XServiceName > xServiceName( xProperties, UNO_QUERY ); + CPPUNIT_ASSERT(xServiceName.is()); + + OUString aServiceName = xServiceName->getServiceName(); + CPPUNIT_ASSERT_EQUAL(aExpectedServiceName, aServiceName); + + OUString aCurveName; + CPPUNIT_ASSERT(xProperties->getPropertyValue("CurveName") >>= aCurveName); + CPPUNIT_ASSERT_EQUAL(aExpectedName, aCurveName); +} + +void checkLinearTrendline( + Reference const & xCurve, const OUString& aExpectedName, + double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward, + double aExpectedInterceptValue) +{ + Reference xProperties( xCurve , uno::UNO_QUERY ); + CPPUNIT_ASSERT(xProperties.is()); + + checkNameAndType(xProperties, aExpectedName, "com.sun.star.chart2.LinearRegressionCurve"); + + checkCommonTrendline( + xCurve, + aExpectedExtrapolateForward, aExpectedExtrapolateBackward, + /*aExpectedForceIntercept*/false, aExpectedInterceptValue, + /*aExpectedShowEquation*/true, /*aExpectedR2*/false); +} + +void checkPolynomialTrendline( + Reference const & xCurve, const OUString& aExpectedName, + sal_Int32 aExpectedDegree, + double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward, + double aExpectedInterceptValue) +{ + Reference xProperties( xCurve , uno::UNO_QUERY ); + CPPUNIT_ASSERT(xProperties.is()); + + checkNameAndType(xProperties, aExpectedName, "com.sun.star.chart2.PolynomialRegressionCurve"); + + sal_Int32 aDegree = 2; + CPPUNIT_ASSERT(xProperties->getPropertyValue("PolynomialDegree") >>= aDegree); + CPPUNIT_ASSERT_EQUAL(aExpectedDegree, aDegree); + + checkCommonTrendline( + xCurve, + aExpectedExtrapolateForward, aExpectedExtrapolateBackward, + /*aExpectedForceIntercept*/true, aExpectedInterceptValue, + /*aExpectedShowEquation*/true, /*aExpectedR2*/true); +} + +void checkMovingAverageTrendline( + Reference const & xCurve, const OUString& aExpectedName, sal_Int32 aExpectedPeriod) +{ + Reference xProperties( xCurve , uno::UNO_QUERY ); + CPPUNIT_ASSERT(xProperties.is()); + + checkNameAndType(xProperties, aExpectedName, "com.sun.star.chart2.MovingAverageRegressionCurve"); + + sal_Int32 aPeriod = 2; + CPPUNIT_ASSERT(xProperties->getPropertyValue("MovingAveragePeriod") >>= aPeriod); + CPPUNIT_ASSERT_EQUAL(aExpectedPeriod, aPeriod); +} + +void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xChartDoc) +{ + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT( xDataSeries.is() ); + + Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer( xDataSeries, UNO_QUERY ); + CPPUNIT_ASSERT( xRegressionCurveContainer.is() ); + + Sequence< Reference< chart2::XRegressionCurve > > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xRegressionCurveSequence.getLength()); + + Reference xCurve; + + xCurve = xRegressionCurveSequence[0]; + CPPUNIT_ASSERT(xCurve.is()); + checkPolynomialTrendline(xCurve, "col2_poly", 3, 0.1, -0.1, -1.0); + + xCurve = xRegressionCurveSequence[1]; + CPPUNIT_ASSERT(xCurve.is()); + checkLinearTrendline(xCurve, "col2_linear", -0.5, -0.5, 0.0); + + xCurve = xRegressionCurveSequence[2]; + CPPUNIT_ASSERT(xCurve.is()); + checkMovingAverageTrendline(xCurve, "col2_moving_avg", 3); +} + +} + +// improve the test +void Chart2ExportTest::testErrorBarXLSX() +{ + load("/chart2/qa/extras/data/ods/", "error_bar.ods"); + { + // make sure the ODS import was successful + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT( xDataSeries.is() ); + + Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW ); + + // test that y error bars are there + Reference< beans::XPropertySet > xErrorBarYProps; + xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarYProps; + testErrorBar(xErrorBarYProps); + } + + reload("Calc Office Open XML"); + { + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT( xDataSeries.is() ); + + Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW ); + + // test that y error bars are there + Reference< beans::XPropertySet > xErrorBarYProps; + xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarYProps; + testErrorBar(xErrorBarYProps); + } +} + +void Chart2ExportTest::testErrorBarPropXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testErrorBarProp.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + // test y error bars property + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:errDir", "val", "y"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln", "w", "12600"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "ff0000"); + + // test x error bars property + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:errDir", "val", "x"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln", "w", "9360"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "595959"); +} + +// This method tests the preservation of properties for trendlines / regression curves +// in an export -> import cycle using different file formats - ODS, XLS and XLSX. +void Chart2ExportTest::testTrendline() +{ + mbSkipValidation = true; + load("/chart2/qa/extras/data/ods/", "trendline.ods"); + checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); + reload("calc8"); + checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); +} + +void Chart2ExportTest::testTrendlineOOXML() +{ + load("/chart2/qa/extras/data/ods/", "trendline.ods"); + checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); + reload("Calc Office Open XML"); + checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); +} + +void Chart2ExportTest::testTrendlineXLS() +{ + mbSkipValidation = true; + load("/chart2/qa/extras/data/ods/", "trendline.ods"); + checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); + reload("MS Excel 97"); + checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); +} + +void Chart2ExportTest::testStockChart() +{ + /* For attached file Stock_Chart.docx, in chart1.xml, + * , there are four types of series as + * Open,Low,High and Close. + * For Open series, in + * an attribute val of index should start from 1 and not from 0. + * Which was problem area. + */ + load("/chart2/qa/extras/data/docx/", "testStockChart.docx"); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:idx", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:order", "val", "1"); + assertXPathContent( + pXmlDoc, + "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v", + "Open"); +} + +void Chart2ExportTest::testBarChart() +{ + load("/chart2/qa/extras/data/docx/", "testBarChart.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir", "val", "col"); +} + +void Chart2ExportTest::testCrosses() +{ + load("/chart2/qa/extras/data/docx/", "Bar_horizontal_cone.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero"); +} + +void Chart2ExportTest::testScatterChartTextXValues() +{ + load("/chart2/qa/extras/data/docx/", "scatter-chart-text-x-values.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + // Make sure we have exactly 3 data series. + std::vector > aLabels = getDataSeriesLabelsFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); + CPPUNIT_ASSERT_EQUAL(OUString("Series 1"), aLabels[0][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("Series 2"), aLabels[1][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("Series 3"), aLabels[2][0].get()); + + std::vector > aYValues = getDataSeriesYValuesFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aYValues.size()); + + // Check the Y values of "Series 1". + CPPUNIT_ASSERT_EQUAL(size_t(4), aYValues[0].size()); + CPPUNIT_ASSERT_EQUAL(4.3, aYValues[0][0]); + CPPUNIT_ASSERT_EQUAL(2.5, aYValues[0][1]); + CPPUNIT_ASSERT_EQUAL(3.5, aYValues[0][2]); + CPPUNIT_ASSERT_EQUAL(4.5, aYValues[0][3]); + + // And "Series 2". + CPPUNIT_ASSERT_EQUAL(size_t(4), aYValues[1].size()); + CPPUNIT_ASSERT_EQUAL(2.4, aYValues[1][0]); + CPPUNIT_ASSERT_EQUAL(4.4, aYValues[1][1]); + CPPUNIT_ASSERT_EQUAL(1.8, aYValues[1][2]); + CPPUNIT_ASSERT_EQUAL(2.8, aYValues[1][3]); + + // And "Series 3". + CPPUNIT_ASSERT_EQUAL(size_t(4), aYValues[2].size()); + CPPUNIT_ASSERT_EQUAL(2.0, aYValues[2][0]); + CPPUNIT_ASSERT_EQUAL(2.0, aYValues[2][1]); + CPPUNIT_ASSERT_EQUAL(3.0, aYValues[2][2]); + CPPUNIT_ASSERT_EQUAL(5.0, aYValues[2][3]); + + // Test the export. + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + if (!pXmlDoc) + return; + + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]", "1"); +} + +void Chart2ExportTest::testScatterXAxisValues() +{ + load("/chart2/qa/extras/data/odt/", "tdf114657.odt"); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:ptCount", "val", "5"); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[1]/c:v", "15"); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[2]/c:v", "11"); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[3]/c:v", "20"); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[4]/c:v", "16"); +} + +void Chart2ExportTest::testScatterXAxisCategories() +{ + load("/chart2/qa/extras/data/odt/", "tdf131143.odt"); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:ptCount", "val", "4"); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[1]/c:v", "Row 1"); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[2]/c:v", "Row 2"); +} + +void Chart2ExportTest::testChartDataTable() +{ + load("/chart2/qa/extras/data/docx/", "testChartDataTable.docx"); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showHorzBorder", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showVertBorder", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showOutline", "val", "1"); +} + +void Chart2ExportTest::testChartExternalData() +{ + load("/chart2/qa/extras/data/docx/", "testMultipleChart.docx"); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + xmlXPathObjectPtr pXmlPathObj = getXPathNode(pXmlDoc, "/c:chartSpace/c:externalData"); + xmlNodeSetPtr pXmlNodes = pXmlPathObj->nodesetval; + CPPUNIT_ASSERT(pXmlNodes); +} + +void Chart2ExportTest::testEmbeddingsGrabBag() +{ + // The problem was that .xlsx files were missing from docx file from embeddings folder + // after saving file. + // This test case tests whether embeddings files grabbagged properly in correct object. + + load("/chart2/qa/extras/data/docx/", "testMultiplechartembeddings.docx" ); + uno::Reference xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY); + uno::Sequence aGrabBag(0); + xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; + CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty + bool bEmbeddings = false; + const char* const testEmbeddedFileNames[] {"word/embeddings/Microsoft_Excel_Worksheet3.xlsx", + "word/embeddings/Microsoft_Excel_Worksheet2.xlsx", + "word/embeddings/Microsoft_Excel_Worksheet1.xlsx"}; + for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + { + if (prop.Name == "OOXEmbeddings") + { + bEmbeddings = true; + uno::Sequence aEmbeddingsList(0); + uno::Reference aEmbeddingXlsxStream; + OUString aEmbeddedfileName; + CPPUNIT_ASSERT(prop.Value >>= aEmbeddingsList); // PropertyValue of proper type + sal_Int32 length = aEmbeddingsList.getLength(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), length); + for(int j = 0; j < length; ++j) + { + aEmbeddingsList[j].Value >>= aEmbeddingXlsxStream; + aEmbeddedfileName = aEmbeddingsList[j].Name; + CPPUNIT_ASSERT(aEmbeddingXlsxStream.get()); // Reference not empty + CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(testEmbeddedFileNames[j]),aEmbeddedfileName); + } + } + } + CPPUNIT_ASSERT(bEmbeddings); // Grab Bag has all the expected elements +} + +void Chart2ExportTest::testAreaChartLoad() +{ + load ("/chart2/qa/extras/data/docx/", "testAreaChartLoad.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:showVal", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl", 0); +} + +void Chart2ExportTest::testUpDownBars() +{ + /* + load("/chart2/qa/extras/data/docx/", "UpDownBars.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:upDownBars"); + */ +} + +void Chart2ExportTest::testDoughnutChart() +{ + load("/chart2/qa/extras/data/docx/", "doughnutChart.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart"); +} + +void Chart2ExportTest::testDisplayUnits() +{ + load("/chart2/qa/extras/data/docx/", "DisplayUnits.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit", "val", "billions"); +} + +// void Chart2ExportTest::testFdo74115WallGradientFill() +// { +// load("/chart2/qa/extras/data/docx/", "fdo74115_WallGradientFill.docx"); +// xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); +// CPPUNIT_ASSERT(pXmlDoc); +// +// assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill"); +// } + +void Chart2ExportTest::testFdo74115WallBitmapFill() +{ + load("/chart2/qa/extras/data/docx/", "fdo74115_WallBitmapFill.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill"); +} + +void Chart2ExportTest::testPieChartWallLineStyle() +{ + load("/chart2/qa/extras/data/odt/", "testPieChartWallLineStyle.odt"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill"); +} + +//The below test case tests the built in marker 'x' for Office 2010 in Line charts + +void Chart2ExportTest::testFdo78290LineChartMarkerX() +{ + load("/chart2/qa/extras/data/docx/", "fdo78290_Line_Chart_Marker_x.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x"); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]","val","7"); +} + +// We can also use the built in marker 'x' in scatter chart, hence writing the test case for the same. + +void Chart2ExportTest::testFdo78290ScatterChartMarkerX() +{ + load("/chart2/qa/extras/data/docx/", "fdo78290_Scatter_Chart_Marker_x.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x"); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:size[1]","val","7"); +} + +// Also in a combination of charts like a column chart and line chart, we can use the built in marker 'x' +// for the line chart too. hence put a test case for the combination chart also. + +void Chart2ExportTest::testFdo78290CombinationChartMarkerX() +{ + load("/chart2/qa/extras/data/docx/", "fdo78290_Combination_Chart_Marker_x.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x"); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]","val","7"); +} + +void Chart2ExportTest::testTdf126115IndividualMarker() +{ + // Check individual marker properties. + load("/chart2/qa/extras/data/xlsx/", "tdf126115.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // 1. series + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:symbol", "val", "square"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:size", "val", "8"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000"); + // 2. series + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:symbol", "val", "x"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:size", "val", "15"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", "7030a0"); +} + +void Chart2ExportTest::testAxisNumberFormatODS() +{ + struct + { + void check( const Reference& xChartDoc ) + { + Reference xAxisX = getAxisFromDoc(xChartDoc, 0, 0, 0); + Reference xTitle(xAxisX, UNO_QUERY_THROW); + OUString aTitleText = getTitleString(xTitle); + CPPUNIT_ASSERT_EQUAL(OUString("Linked To Source"), aTitleText); + + sal_Int32 nNumFmt = getNumberFormatFromAxis(xAxisX); + sal_Int16 nType = getNumberFormatType(xChartDoc, nNumFmt); + CPPUNIT_ASSERT_MESSAGE("X axis should be percentage format.", (nType & util::NumberFormat::PERCENT)); + + bool bNumFmtLinked = false; + Reference xPS(xAxisX, uno::UNO_QUERY_THROW); + xPS->getPropertyValue("LinkNumberFormatToSource") >>= bNumFmtLinked; + CPPUNIT_ASSERT_MESSAGE("X axis should have its number format linked to source.", bNumFmtLinked); + + Reference xAxisY = getAxisFromDoc(xChartDoc, 0, 1, 0); + xTitle.set(xAxisY, UNO_QUERY_THROW); + aTitleText = getTitleString(xTitle); + CPPUNIT_ASSERT_EQUAL(OUString("Not Linked"), aTitleText); + + nNumFmt = getNumberFormatFromAxis(xAxisY); + nType = getNumberFormatType(xChartDoc, nNumFmt); + CPPUNIT_ASSERT_MESSAGE("Y axis should be a normal number format.", (nType & util::NumberFormat::NUMBER)); + + bNumFmtLinked = true; + xPS.set(xAxisY, uno::UNO_QUERY_THROW); + xPS->getPropertyValue("LinkNumberFormatToSource") >>= bNumFmtLinked; + CPPUNIT_ASSERT_MESSAGE("Y axis should not have its number format linked to source.", !bNumFmtLinked); + } + + } aTest; + + load("/chart2/qa/extras/data/ods/", "axis-numformats-linked.ods"); + + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + aTest.check(xChartDoc); + + // Reload the document and make sure everything remains intact. + reload("calc8"); + xChartDoc = getChartDocFromSheet(0, mxComponent); + aTest.check(xChartDoc); +} + +void Chart2ExportTest::testAxisNumberFormatXLS() +{ + struct + { + void check( const Reference& xChartDoc, bool bNumFmtLinkedActual, sal_Int16 nNumFmtTypeFlag ) const + { + Reference xAxisY = getAxisFromDoc( xChartDoc, 0, 1, 0 ); + bool bNumFmtLinked = false; + Reference xPS( xAxisY, uno::UNO_QUERY_THROW ); + xPS->getPropertyValue( "LinkNumberFormatToSource" ) >>= bNumFmtLinked; + + if ( bNumFmtLinkedActual ) + CPPUNIT_ASSERT_MESSAGE( "Y axis should have its number format linked to source.", bNumFmtLinked ); + else + { + CPPUNIT_ASSERT_MESSAGE( "Y axis should not have its number format linked to source.", !bNumFmtLinked ); + + sal_Int32 nNumFmt = getNumberFormatFromAxis( xAxisY ); + sal_Int16 nType = getNumberFormatType( xChartDoc, nNumFmt ); + if ( nNumFmtTypeFlag == util::NumberFormat::PERCENT ) + CPPUNIT_ASSERT_MESSAGE( "Y axis should be percentage format.", ( nType & util::NumberFormat::PERCENT ) ); + else + CPPUNIT_ASSERT_MESSAGE( "Y axis should be number format.", ( nType & util::NumberFormat::NUMBER ) ); + } + } + + void change( const Reference& xChartDoc, sal_Int16 nNumFmtTypeFlag ) + { + Reference xAxisY = getAxisFromDoc( xChartDoc, 0, 1, 0 ); + Reference xPS( xAxisY, uno::UNO_QUERY_THROW ); + Any aAny( false ); + xPS->setPropertyValue( "LinkNumberFormatToSource", aAny ); + + Reference xNFS( xChartDoc, uno::UNO_QUERY_THROW ); + Reference xNumberFormats = xNFS->getNumberFormats(); + CPPUNIT_ASSERT( xNumberFormats.is() ); + lang::Locale aLocale{ "en", "US", "" }; + Sequence aNumFmts = xNumberFormats->queryKeys( nNumFmtTypeFlag, aLocale, false ); + CPPUNIT_ASSERT( aNumFmts.hasElements() ); + aAny <<= aNumFmts[0]; + xPS->setPropertyValue( CHART_UNONAME_NUMFMT, aAny ); + } + + } aTest; + + load( "/chart2/qa/extras/data/xls/", "axis_sourceformatting.xls" ); + + Reference xChartDoc = getChartDocFromSheet( 0, mxComponent ); + aTest.check( xChartDoc, true, util::NumberFormat::PERCENT ); + + aTest.change( xChartDoc, util::NumberFormat::NUMBER ); + // Write the document(xls) with changes made close it, load it and check if changes are intact + reload( "MS Excel 97" ); + xChartDoc = getChartDocFromSheet( 0, mxComponent ); + aTest.check( xChartDoc, false, util::NumberFormat::NUMBER ); +} + +void Chart2ExportTest::testDataLabelBordersDOCX() +{ + struct Check + { + sal_Int32 mnIndex; + css::drawing::LineStyle meStyle; + sal_Int32 mnColor; + }; + + struct + { + /** + * Chart 1 has 4 bars of which 1st and 3rd have labels with borders + * around them. + */ + void checkObject1( const Reference& xChartDoc ) + { + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + + // Check to make sure that data points 0 and 2 have local properties. + Reference xPropSet(xDataSeries, uno::UNO_QUERY); + CPPUNIT_ASSERT(xPropSet.is()); + + Sequence aIndices; + xPropSet->getPropertyValue("AttributedDataPoints") >>= aIndices; + /* + CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be 2 data points with local properties.", sal_Int32(2), aIndices.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aIndices[0]); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aIndices[1]); + */ + + static const Check aDataPoints[] = + { + { 0, css::drawing::LineStyle_SOLID, 0x00FFFF00 }, // solid yellow + { 2, css::drawing::LineStyle_SOLID, 0x00FF0000 } // solid red + }; + + for (size_t i = 0; i < SAL_N_ELEMENTS(aDataPoints); ++i) + { + xPropSet = xDataSeries->getDataPointByIndex(aDataPoints[i].mnIndex); + CPPUNIT_ASSERT(xPropSet.is()); + + css::drawing::LineStyle eLineStyle = css::drawing::LineStyle_NONE; + xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_STYLE) >>= eLineStyle; + CPPUNIT_ASSERT_EQUAL(aDataPoints[i].meStyle, eLineStyle); + + sal_Int32 nWidth = -1; + xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_WIDTH) >>= nWidth; + CPPUNIT_ASSERT(nWidth > 0); + + sal_Int32 nColor = -1; + xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_COLOR) >>= nColor; + CPPUNIT_ASSERT_EQUAL_MESSAGE("Border color is wrong.", aDataPoints[i].mnColor, nColor); + } + } + + /** + * Chart 2 has all its data labels with identical borders. + */ + void checkObject2( const Reference& xChartDoc ) + { + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + + Reference xPropSet(xDataSeries, uno::UNO_QUERY); + CPPUNIT_ASSERT(xPropSet.is()); + + css::drawing::LineStyle eLineStyle = css::drawing::LineStyle_NONE; + xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_STYLE) >>= eLineStyle; + CPPUNIT_ASSERT_EQUAL(css::drawing::LineStyle_SOLID, eLineStyle); + + sal_Int32 nWidth = -1; + xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_WIDTH) >>= nWidth; + CPPUNIT_ASSERT(nWidth > 0); + + sal_Int32 nColor = -1; + xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_COLOR) >>= nColor; + CPPUNIT_ASSERT_EQUAL_MESSAGE("Border color should be green.", sal_Int32(0x0000FF00), nColor); + } + + } aTest; + + load("/chart2/qa/extras/data/docx/", "data-label-borders.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + + // "Automatic" chart background fill in docx should be loaded as solid white. + Reference xPropSet = xChartDoc->getPageBackground(); + CPPUNIT_ASSERT(xPropSet.is()); + drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get(); + sal_Int32 nColor = xPropSet->getPropertyValue("FillColor").get(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in docx should be loaded as solid fill.", + drawing::FillStyle_SOLID, eStyle); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in docx should be loaded as solid white.", + sal_Int32(0x00FFFFFF), sal_Int32(nColor & 0x00FFFFFF)); // highest 2 bytes are transparency which we ignore here. + + aTest.checkObject1(xChartDoc); + xChartDoc.set(getChartDocFromWriter(1), uno::UNO_QUERY); + aTest.checkObject2(xChartDoc); + + reload("Office Open XML Text"); + + xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY); + aTest.checkObject1(xChartDoc); + xChartDoc.set(getChartDocFromWriter(1), uno::UNO_QUERY); + aTest.checkObject2(xChartDoc); +} + +void Chart2ExportTest::testDataLabel3DChartDOCX() +{ + load("/chart2/qa/extras/data/docx/", "3d-bar-label.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // We must not export label position attributes for 3D bar charts. The + // same rule also applies to several other 3D charts, apparently. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLblPos", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0); +} + +void Chart2ExportTest::testDataLabelBarChartDOCX() +{ + load("/chart2/qa/extras/data/docx/", "bar-chart-labels.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLblPos", "val", "ctr"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLblPos", "val", "inEnd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:dLblPos", "val", "inBase"); +} + +void Chart2ExportTest::testDataLabelClusteredBarChartDOCX() +{ + load("/chart2/qa/extras/data/docx/", "clustered-bar-chart-labels.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // This was "t", should be one of the allowed values. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl[2]/c:dLblPos", "val", "outEnd"); +} + +void Chart2ExportTest::testDataLabelRadarChartDOCX() +{ + load("/chart2/qa/extras/data/docx/", "radar-chart-labels.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // We must not export label position attributes for radar charts. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLblPos", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0); +} + +void Chart2ExportTest::testDataLabelDoughnutChartDOCX() +{ + load("/chart2/qa/extras/data/docx/", "doughnut-chart-labels.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // We must not export label position attributes for doughnut charts. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLblPos", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0); +} + +void Chart2ExportTest::testDataLabelAreaChartDOCX() +{ + load("/chart2/qa/extras/data/docx/", "area-chart-labels.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // We must not export label position attributes for area charts. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLblPos", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0); +} + +void Chart2ExportTest::testDataLabelDefaultLineChartDOCX() +{ + // This file was created by Word 2007, which doesn't provide default data + // label position (2010 does). Make sure its default data label position + // is RIGHT when exporting. + + load("/chart2/qa/extras/data/docx/", "line-chart-label-default-placement.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + reload("Office Open XML Text"); + + xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + Reference xPropSet(xDataSeries, uno::UNO_QUERY); + CPPUNIT_ASSERT(xPropSet.is()); + sal_Int32 nLabelPlacement = -1; + if (xPropSet->getPropertyValue("LabelPlacement") >>= nLabelPlacement) + // This option may not be set. Check its value only when it's set. + CPPUNIT_ASSERT_EQUAL_MESSAGE("Line chart's default label placement should be 'right'.", chart::DataLabelPlacement::RIGHT, nLabelPlacement ); +} + +void Chart2ExportTest::testIndividualDataLabelProps() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf122915.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr", "b", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr", "sz", "1600"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "ff0000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr/a:latin", "typeface", "Times New Roman"); +} + +void Chart2ExportTest::testTdf108107() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf108107.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:p/a:pPr/a:defRPr", "b", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:p/a:pPr/a:defRPr", "sz", "2000"); +} + +void Chart2ExportTest::testTdf114139() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf114139.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart", 1); + //no fill + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill", 0); +} + +void Chart2ExportTest::testTdf64224() +{ + load("/chart2/qa/extras/data/ods/", "tdf64224.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + //no fill + assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:noFill", 1); + assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:solidFill", 0); +} + +void Chart2ExportTest::testChartTitlePropertiesColorFillDOCX() +{ + load("/chart2/qa/extras/data/docx/", "testChartTitlePropertiesColorFill.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testChartTitlePropertiesGradientFillDOCX() +{ + load("/chart2/qa/extras/data/docx/", "testChartTitlePropertiesGradientFill.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "cccccc"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "666666"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testChartTitlePropertiesBitmapFillDOCX() +{ + load("/chart2/qa/extras/data/docx/", "testChartTitlePropertiesBitmapFill.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testColorGradientWithTransparancyDOCX() +{ + // Test color gradient (two color) with gradient transparency + load("/chart2/qa/extras/data/docx/", "testColorGradientWithTransparancy.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + // Test the transparency of the first color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "60000"); + // Test the transparency of the second color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "90196"); +} + +void Chart2ExportTest::testColorGradientWithTransparancyODS() +{ + // Test color gradient (two color) with simple transparency + load("/chart2/qa/extras/data/ods/", "testColorGradientWithTransparancy.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // Test the transparency of the first color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "60000"); + // Test the transparency of the second color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "60000"); +} + +void Chart2ExportTest::testColorGradientStopXLSX() +{ + // Test color gradient (two color) stop of the first color + load("/chart2/qa/extras/data/xlsx/", "tdf128619.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // Test the position of the first color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]", "pos", "45000"); + // Test the position of the second color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]", "pos", "100000"); +} + +void Chart2ExportTest::testRadialColorGradientDOCX() +{ + load("/chart2/qa/extras/data/docx/", "tdf128794.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + // Test the gradient style (if there is no 'a:path' attribute, it is a linear gradient) + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path", 0); + // Test the linear gradient angle + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:lin", "ang", "13500000"); +} + +void Chart2ExportTest::testBarChartDataPointPropDOCX() +{ + load("/chart2/qa/extras/data/docx/", "testBarChartDataPointPropDOCX.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "f6f8fc"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "c7d5ed"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "70ad47"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx", "val", "2"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "000000"); +} + +void Chart2ExportTest::testBarChartRotation() +{ + load ("/chart2/qa/extras/data/docx/", "barChartRotation.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX", "val", "30"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY", "val", "50"); +} + +void Chart2ExportTest::testShapeFollowedByChart() +{ + /* If there is a scenario where a chart is followed by a shape + which is being exported as an alternate content then, the + docPr Id is being repeated, ECMA 20.4.2.5 says that the + docPr Id should be unique, ensuring the same here. + */ + load("/chart2/qa/extras/data/docx/", "FDO74430.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/document", "Office Open XML Text" ); + CPPUNIT_ASSERT(pXmlDoc); + + OUString aValueOfFirstDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]", "id"); + OUString aValueOfSecondDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:docPr[1]", "id"); + + CPPUNIT_ASSERT( aValueOfFirstDocPR != aValueOfSecondDocPR ); +} + +void Chart2ExportTest::testPieChartDataLabels() +{ + load("/chart2/qa/extras/data/docx/", "PieChartDataLabels.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos", "val", "bestFit"); +} + +void Chart2ExportTest::testSeriesIdxOrder() +{ + load("/chart2/qa/extras/data/docx/", "testSeriesIdxOrder.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:order[1]", "val", "1"); +} + +void Chart2ExportTest::testScatterPlotLabels() +{ + load("/chart2/qa/extras/data/odt/", "scatter-plot-labels.odt"); + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + // Make sure the original chart has 'a', 'b', 'c' as its data labels. + std::vector > aLabels = getDataSeriesLabelsFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); + CPPUNIT_ASSERT_EQUAL(OUString("a"), aLabels[0][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("b"), aLabels[1][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("c"), aLabels[2][0].get()); + + // Reload the doc and check again. The labels should not change. + reload("writer8"); + + xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + aLabels = getDataSeriesLabelsFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); + CPPUNIT_ASSERT_EQUAL(OUString("a"), aLabels[0][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("b"), aLabels[1][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("c"), aLabels[2][0].get()); +} + +void Chart2ExportTest::testErrorBarDataRangeODS() +{ + load("/chart2/qa/extras/data/ods/", "ErrorBarRange.ods"); + reload("calc8"); + + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT( xDataSeries.is() ); + + Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW ); + + // test that y error bars are there + Reference< beans::XPropertySet > xErrorBarYProps; + xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarYProps; + uno::Any aAny = xErrorBarYProps->getPropertyValue("ErrorBarRangePositive"); + CPPUNIT_ASSERT(aAny.hasValue()); + OUString aPosRange; + aAny >>= aPosRange; + CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$B$1:$B$3"), aPosRange); + + aAny = xErrorBarYProps->getPropertyValue("ErrorBarRangeNegative"); + CPPUNIT_ASSERT(aAny.hasValue()); + OUString aNegRange; + aAny >>= aNegRange; + CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$1:$C$3"), aNegRange); +} + +void Chart2ExportTest::testChartCrash() +{ + load("/chart2/qa/extras/data/docx/", "FDO75975.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); +} + +void Chart2ExportTest::testPieChartRotation() +{ + load ("/chart2/qa/extras/data/docx/", "pieChartRotation.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX", "val", "40"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY", "val", "30"); +} + +void Chart2ExportTest::testEmbeddingsOleObjectGrabBag() +{ + // The problem was that .bin files were missing from docx file from embeddings folder + // after saving file. + // This test case tests whether embeddings files grabbagged properly in correct object. + + load("/chart2/qa/extras/data/docx/", "testchartoleobjectembeddings.docx" ); + uno::Reference xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY); + uno::Sequence aGrabBag(0); + xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; + CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty + bool bEmbeddings = false; + const char* const testEmbeddedFileNames[] = {"word/embeddings/oleObject1.bin"}; + for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + { + if (prop.Name == "OOXEmbeddings") + { + bEmbeddings = true; + uno::Sequence aEmbeddingsList(0); + uno::Reference aEmbeddingXlsxStream; + OUString aEmbeddedfileName; + CPPUNIT_ASSERT(prop.Value >>= aEmbeddingsList); // PropertyValue of proper type + sal_Int32 length = aEmbeddingsList.getLength(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), length); + for(int j = 0; j < length; ++j) + { + aEmbeddingsList[j].Value >>= aEmbeddingXlsxStream; + aEmbeddedfileName = aEmbeddingsList[j].Name; + CPPUNIT_ASSERT(aEmbeddingXlsxStream.get()); // Reference not empty + CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(testEmbeddedFileNames[j]),aEmbeddedfileName); + } + } + } + CPPUNIT_ASSERT(bEmbeddings); // Grab Bag has all the expected elements +} + +namespace { + +void checkGapWidth(Reference const & xPropSet, sal_Int32 nValue) +{ + uno::Any aAny = xPropSet->getPropertyValue("GapwidthSequence"); + CPPUNIT_ASSERT(aAny.hasValue()); + uno::Sequence< sal_Int32 > aSequence; + aAny >>= aSequence; + CPPUNIT_ASSERT(aSequence.hasElements()); + CPPUNIT_ASSERT_EQUAL(nValue, aSequence[0]); +} + +void checkOverlap(Reference const & xPropSet, sal_Int32 nValue) +{ + uno::Any aAny = xPropSet->getPropertyValue("OverlapSequence"); + CPPUNIT_ASSERT(aAny.hasValue()); + uno::Sequence< sal_Int32 > aSequence; + aAny >>= aSequence; + CPPUNIT_ASSERT(aSequence.hasElements()); + CPPUNIT_ASSERT_EQUAL(nValue, aSequence[0]); +} + +void checkSheetForGapWidthAndOverlap(uno::Reference< chart2::XChartDocument > const & xChartDoc, + sal_Int32 nExpectedGapWidth, sal_Int32 nExpectedOverlap) +{ + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT(xChartType.is()); + + Reference< beans::XPropertySet > xPropSet( xChartType, uno::UNO_QUERY_THROW ); + checkGapWidth(xPropSet, nExpectedGapWidth); + checkOverlap(xPropSet, nExpectedOverlap); + +} + +} + +void Chart2ExportTest::testGapWidthXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "gapWidth.xlsx"); + + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 120, -60); + + xChartDoc = getChartDocFromSheet( 1, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 50, 30); + + reload("Calc Office Open XML"); + + xChartDoc = getChartDocFromSheet( 0, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 120, -60); + + xChartDoc = getChartDocFromSheet( 1, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 50, 30); +} + +void Chart2ExportTest::testSmoothedLines() +{ + load("/chart2/qa/extras/data/ods/", "smoothedLines.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth", "val", "0"); +} + +void Chart2ExportTest::testLabelStringODS() +{ + load("/chart2/qa/extras/data/ods/", "labelString.ods"); + + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + Reference< chart2::data::XDataSequence > xLabelSeq = + getLabelDataSequenceFromDoc(xChartDoc); + CPPUNIT_ASSERT(xLabelSeq.is()); + + OUString aLabelString = xLabelSeq->getSourceRangeRepresentation(); + CPPUNIT_ASSERT_EQUAL(OUString("\"LabelName\""), aLabelString); + + reload("calc8"); + + xChartDoc = getChartDocFromSheet( 0, mxComponent ); + xLabelSeq = getLabelDataSequenceFromDoc(xChartDoc); + CPPUNIT_ASSERT(xLabelSeq.is()); + + aLabelString = xLabelSeq->getSourceRangeRepresentation(); + CPPUNIT_ASSERT_EQUAL(OUString("\"LabelName\""), aLabelString); +} + +void Chart2ExportTest::testFdo83058dlblPos() +{ + load ("/chart2/qa/extras/data/docx/", "fdo83058_dlblPos.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[2]/c:dLblPos", "val", "outEnd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[3]/c:dLblPos", "val", "outEnd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[4]/c:dLblPos", "val", "outEnd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[5]/c:dLblPos", "val", "outEnd"); +} + +void Chart2ExportTest::testAutoTitleDelXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", "0"); +} + +void Chart2ExportTest::testDispBlanksAsXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", "gap"); +} + +void Chart2ExportTest::testMarkerColorXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "markerColor.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", "92d050"); +} + +void Chart2ExportTest::testRoundedCornersXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "markerColor.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:roundedCorners", "val", "0"); +} + +void Chart2ExportTest::testAxisNumberFormatXLSX() +{ + load("/chart2/qa/extras/data/ods/", "axis_number_format.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx", 2); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt", "formatCode", "0.00E+000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt", "sourceLinked", "0"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt", "formatCode", "[$$-409]#,##0;\\-[$$-409]#,##0"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt", "sourceLinked", "1"); +} + +void Chart2ExportTest::testDataPointLabelNumberFormatXLSX() +{ + load("/chart2/qa/extras/data/ods/", "tdf123774.ods"); + { + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt", "formatCode", "[$-40E]0.00%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt", "sourceLinked", "0"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt", "formatCode", "[$-40E]0.00%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt", "sourceLinked", "0"); + } + + load("/chart2/qa/extras/data/xlsx/", "tdf130986.xlsx"); + { + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:idx", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt", "formatCode", "0.00E+00"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt", "sourceLinked", "0"); + } +} + +void Chart2ExportTest::testDataLabelDefaultValuesXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "data_label.xlsx"); + Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent); + Reference xSeries = getDataSeriesFromDoc(xDoc, 0); + Reference xPropSet(xSeries, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("Label"); + chart2::DataPointLabel aLabel; + CPPUNIT_ASSERT(aAny >>= aLabel); + CPPUNIT_ASSERT(aLabel.ShowNumber); + + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:showVal", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLblPos", "val", "outEnd"); +} + +void Chart2ExportTest::testTitleOverlayXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "chart_title.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:overlay", "val", "0"); +} + +void Chart2ExportTest::testInvertIfNegativeXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "bar_chart_simple.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:invertIfNegative", "val", "0"); +} + +void Chart2ExportTest::testBubble3DXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "bubble_chart_simple.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[1]/c:bubble3D", "val", "0"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[2]/c:bubble3D", "val", "0"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[3]/c:bubble3D", "val", "0"); +} + +void Chart2ExportTest::testNoMarkerXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "no_marker.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:marker/c:symbol", "val", "none"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:marker/c:symbol", "val", "none"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:marker", "val", "0"); +} + +void Chart2ExportTest::testTitleManualLayoutXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "title_manual_layout.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode", "val", "edge"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode", "val", "edge"); + + OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:x", "val"); + double nX = aXVal.toDouble(); + CPPUNIT_ASSERT(nX > 0 && nX < 1); + + OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:y", "val"); + double nY = aYVal.toDouble(); + CPPUNIT_ASSERT(nY > 0 && nY < 1); + CPPUNIT_ASSERT(nX != nY); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:bodyPr", "rot", "1200000"); +} + +void Chart2ExportTest::testPlotAreaManualLayoutXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "plot_area_manual_layout.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", "val", "inner"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:xMode", "val", "edge"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:yMode", "val", "edge"); + + OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:x", "val"); + double nX = aXVal.toDouble(); + CPPUNIT_ASSERT(nX > 0 && nX < 1); + + OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:y", "val"); + double nY = aYVal.toDouble(); + CPPUNIT_ASSERT(nY > 0 && nY < 1); + CPPUNIT_ASSERT(nX != nY); + + OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:w", "val"); + double nW = aWVal.toDouble(); + CPPUNIT_ASSERT(nW > 0 && nW < 1); + + OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:h", "val"); + double nH = aHVal.toDouble(); + CPPUNIT_ASSERT(nH > 0 && nH < 1); + CPPUNIT_ASSERT(nH != nW); +} + +void Chart2ExportTest::testLegendManualLayoutXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "legend_manual_layout.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:xMode", "val", "edge"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:yMode", "val", "edge"); + + OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:x", "val"); + double nX = aXVal.toDouble(); + CPPUNIT_ASSERT(nX > 0 && nX < 1); + + OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:y", "val"); + double nY = aYVal.toDouble(); + CPPUNIT_ASSERT(nY > 0 && nY < 1); + CPPUNIT_ASSERT(nX != nY); + + OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:w", "val"); + double nW = aWVal.toDouble(); + CPPUNIT_ASSERT(nW > 0 && nW < 1); + + OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:h", "val"); + double nH = aHVal.toDouble(); + CPPUNIT_ASSERT(nH > 0 && nH < 1); + CPPUNIT_ASSERT(nH != nW); + + // Make sure that default text font size is preserved after export + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:txPr/a:p/a:pPr/a:defRPr", "sz", "900"); +} + +void Chart2ExportTest::testChartSubTitle() +{ + load("/chart2/qa/extras/data/ods/", "testChartSubTitle.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // test properties of subtitle + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "1100"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "00a933"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin", "typeface", "Times New Roman"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t", "It is a Subtitle"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "b2b2b2"); +} + +void Chart2ExportTest::testChartMainWithSubTitle() +{ + load("/chart2/qa/extras/data/ods/", "testChartMainWithSubTitle.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // test properties of title + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "1300"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "0"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "i", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "f10d0c"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin", "typeface", "Arial"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t", "It is a Maintitle\nIt is a Subtitle"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "81d41a"); +} + +void Chart2ExportTest::testAutoTitleDeleted() +{ + load("/chart2/qa/extras/data/xlsx/", "testAutoTitleDeleted.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", "1"); +} + +void Chart2ExportTest::testChartTitlePropertiesColorFillXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesColorFill.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testChartTitlePropertiesGradientFillXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesGradientFill.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "cccccc"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "666666"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testChartTitlePropertiesBitmapFillXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesBitmapFill.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testBarChartDataPointPropXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testBarChartDataPointPropXLSX.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "000000"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx", "val", "2"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "f6f8fc"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "c7d5ed"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "70ad47"); +} + +void Chart2ExportTest::testDataseriesOverlapStackedChartXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testDataseriesOverlapStackedChart.xlsx"); + + // test the overlap value of a simple Stacked Column Chart + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 0); + + // test the overlap value of a Percent Stacked Bar Chart + xChartDoc = getChartDocFromSheet( 1, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 35); + + reload("Calc Office Open XML"); + + xChartDoc = getChartDocFromSheet( 0, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 100); + + xChartDoc = getChartDocFromSheet( 1, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 100); +} + +void Chart2ExportTest::testAxisCharacterPropertiesXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "axis_character_properties.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "sz", "1000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "b", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "i", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "u", "sng"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "sz", "900"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "b", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "strike", "sngStrike"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "ff0000"); +} + +void Chart2ExportTest::testTitleCharacterPropertiesXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "title_character_properties.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "2400"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "1"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr", "sz", "2400"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr", "b", "1"); +} + +void Chart2ExportTest::testPlotVisOnlyXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "hidden_cells.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotVisOnly", "val", "0"); +} + +void Chart2ExportTest::testBarChartVaryColorsXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf90876.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0"); +} + +void Chart2ExportTest::testMultipleAxisXLSX() +{ + load("/chart2/qa/extras/data/ods/", "multiple_axis.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart", 2); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[1]/c:ser", 1); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[2]/c:ser", 1); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx", 4); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:delete[@val='1']", 1); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='l']", 1); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='r']", 1); +} + +void Chart2ExportTest::testSecondaryAxisXLSX() +{ + load("/chart2/qa/extras/data/ods/", "secondary_axis.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart", 2); + // test there is just those series in the first tag which are attached to the primary axis + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser", 2); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v", "b"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser[2]/c:tx/c:strRef/c:strCache/c:pt/c:v", "c"); + // test there is just those series in the second tag which are attached to the secondary axis + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[2]/c:ser", 1); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[2]/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v", "a"); +} + +void Chart2ExportTest::testSetSeriesToSecondaryAxisXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "add_series_secondary_axis.xlsx"); + Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + // Second series + Reference xSeries = getDataSeriesFromDoc(xChartDoc, 1); + CPPUNIT_ASSERT(xSeries.is()); + + Reference xPropSet(xSeries, uno::UNO_QUERY_THROW); + sal_Int32 AxisIndex = 1; + // Attach the second series to the secondary axis. (The third series is already attached.) + xPropSet->setPropertyValue("AttachedAxisIndex", uno::Any(AxisIndex)); + + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // Check there are only two tag in the XML, one for the primary and one for the secondary axis. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart", 2); +} + +void Chart2ExportTest::testCombinedChartSecondaryAxisXLSX() +{ + // Original file was created with MS Office + load("/chart2/qa/extras/data/xlsx/", "combined_chart_secondary_axis.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // Collect barchart axID on secondary Axis + OUString XValueIdOfBarchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]", "val"); + OUString YValueIdOfBarchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]", "val"); + // Collect linechart axID on primary Axis + OUString XValueIdOfLinechart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]", "val"); + OUString YValueIdOfLinechart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val"); + // Check which c:catAx and c:valAx contain the AxisId of charttypes + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId", "val", XValueIdOfLinechart); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val", YValueIdOfLinechart); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val", XValueIdOfBarchart); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val", YValueIdOfBarchart); +} + +void Chart2ExportTest::testCombinedChartSecondaryAxisODS() +{ + // Original file was created with LibreOffice + load("/chart2/qa/extras/data/ods/", "combined_chart_secondary_axis.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // Collect barchart axID on secondary Axis + OUString XValueIdOfBarchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]", "val"); + OUString YValueIdOfBarchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]", "val"); + // Collect linechart axID on primary Axis + OUString XValueIdOfLinechart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]", "val"); + OUString YValueIdOfLinechart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val"); + // Check which c:catAx and c:valAx contain the AxisId of charttypes + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId", "val", XValueIdOfLinechart); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val", YValueIdOfLinechart); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val", XValueIdOfBarchart); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val", YValueIdOfBarchart); + // do not need CT_crosses tag if the actual axis is deleted, so we need to make sure it is not saved + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:crosses", 0); +} + +void Chart2ExportTest::testCrossBetweenXLSX() +{ + // Original files were created with MS Office + { + load("/chart2/qa/extras/data/xlsx/", "tdf127777.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between"); + } + { + load("/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between"); + } +} + +void Chart2ExportTest::testCrossBetweenWithDeletedAxis() +{ + // Original file was created with MS Office (the category axis is deleted in the file) + load("/chart2/qa/extras/data/xlsx/", "tdf128633.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between"); +} + +void Chart2ExportTest::testCrossBetweenODS() +{ + // Original file was created with LibreOffice + load("/chart2/qa/extras/data/ods/", "test_CrossBetween.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between"); +} + +void Chart2ExportTest::testAxisTitleRotationXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "axis_title_rotation.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:bodyPr", "rot", "0"); +} + +void Chart2ExportTest::testAxisTitlePositionDOCX() +{ + load("/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // test X Axis title position + OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:x", "val"); + double nX = aXVal.toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.698208543867708, nX, 1e-3); + OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:y", "val"); + double nY = aYVal.toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.805152435594555, nY, 1e-3); + + // test Y Axis title position + aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:x", "val"); + nX = aXVal.toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0253953671500755, nX, 1e-3); + aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:y", "val"); + nY = aYVal.toDouble(); + // just test the first two decimal digits because it is not perfect in docx yet. + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.384070199122511, nY, 1e-2); +} + +void Chart2ExportTest::testAxisCrossBetweenDOCX() +{ + load("/chart2/qa/extras/data/odt/", "axis-position.odt"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + assertXPath(pXmlDoc, "(//c:crossBetween)[1]", "val", "midCat"); +} + +void Chart2ExportTest::testPieChartDataPointExplosionXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "pie_chart_datapoint_explosion.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dPt/c:explosion", "val", "28"); +} + +void Chart2ExportTest::testCustomDataLabel() +{ + load("/chart2/qa/extras/data/pptx/", "tdf115107.pptx"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + // Check the data labels font color for the complete data series + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "404040"); + + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + float nFontSize; + sal_Int64 nFontColor; + sal_Int32 nCharUnderline; + uno::Reference xPropertySet; + uno::Sequence> aFields; + + // 1 + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(2), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("90.0 = "), aFields[0]->getString()); + aFields[0]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[0]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(18), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xed7d31), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("90"), aFields[1]->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("{0C576297-5A9F-4B4E-A675-B6BA406B7D87}"), aFields[1]->getGuid()); + + // 2 + xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(8), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), aFields[0]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" : "), aFields[1]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME, aFields[2]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("B"), aFields[2]->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("{0CCAAACD-B393-42CE-8DBD-82F9F9ADC852}"), aFields[2]->getGuid()); + aFields[2]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[2]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(16), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xed7d31), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE, aFields[3]->getFieldType()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[4]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Multi"), aFields[4]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[5]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("line"), aFields[5]->getString()); + aFields[5]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[5]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(13), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xbf9000), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE, aFields[6]->getFieldType()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[7]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Abc"), aFields[7]->getString()); + aFields[7]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[7]->getPropertyValue("CharColor") >>= nFontColor; + aFields[7]->getPropertyValue("CharUnderline") >>= nCharUnderline; + CPPUNIT_ASSERT_EQUAL(static_cast(12), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xa9d18e), nFontColor); + CPPUNIT_ASSERT_EQUAL(static_cast(1), nCharUnderline); + + // 3 + xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(1), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("DATA"), aFields[0]->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("{C8F3EB90-8960-4F9A-A3AD-B4FAC4FE4566}"), aFields[0]->getGuid()); + + // 4 + xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(2), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF, aFields[0]->getFieldType()); + //CPPUNIT_ASSERT_EQUAL(OUString("70"), aFields[0]->getString()); TODO: Not implemented yet + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" getString()); +} + +void Chart2ExportTest::testCustomPositionofDataLabel() +{ + load("/chart2/qa/extras/data/xlsx/", "testCustomPosDataLabels.xlsx"); + { + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + // test custom position of data label (xlsx) + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val", "2"); + OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:layout/c:manualLayout/c:x", "val"); + double nX = aXVal.toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.11027682973075476, nX, 1e-7); + + OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:layout/c:manualLayout/c:y", "val"); + double nY = aYVal.toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0742140311063737, nY, 1e-7); + } + + load("/chart2/qa/extras/data/docx/", "testTdf108110.docx"); + { + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // test custom position of data label (docx) + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[2]/c:idx", "val", "2"); + OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[2]/c:layout/c:manualLayout/c:x", "val"); + double nX = aXVal.toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0227256488772236, nX, 1e-7); + + OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[2]/c:layout/c:manualLayout/c:y", "val"); + double nY = aYVal.toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.172648731408574, nY, 1e-7); + } +} + +void Chart2ExportTest::testCustomDataLabelMultipleSeries() +{ + load("/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart2", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + float nFontSize; + sal_Int64 nFontColor; + uno::Reference xPropertySet; + uno::Sequence> aFields; + + // First series + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(3), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("4.3"), aFields[0]->getString()); + aFields[0]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[0]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(18), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xc00000), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[2]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString()); + + // Second series + xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1); + CPPUNIT_ASSERT(xDataSeries.is()); + + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(3), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("2"), aFields[0]->getString()); + aFields[0]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[0]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(18), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xffd966), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[2]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Line"), aFields[2]->getString()); + +} + +void Chart2ExportTest::testLeaderLines() +{ + load("/chart2/qa/extras/data/xlsx/", "testTdf90749.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "1"); +} + +void Chart2ExportTest::testNumberFormatExportPPTX() +{ + load("/chart2/qa/extras/data/pptx/", "tdf115859.pptx"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt", "formatCode", "#,##0.00,\\K"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt", "sourceLinked", "0"); +} + +void Chart2ExportTest::testLabelSeparatorExportDOCX() +{ + load("/chart2/qa/extras/data/docx/", "testLabelSeparator.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // The text separator should be a new line + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:separator", "\n"); + // The text separator should be a comma + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:separator", ", "); + // The text separator should be a semicolon + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:separator", "; "); +} + +void Chart2ExportTest::testChartTitlePropertiesColorFillPPTX() +{ + load("/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesColorFill.pptx"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testChartTitlePropertiesGradientFillPPTX() +{ + load("/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesGradientFill.pptx"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "f6f8fc"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "c7d5ed"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testChartTitlePropertiesBitmapFillPPTX() +{ + load("/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesBitmapFill.pptx"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1); +} + +void Chart2ExportTest::testxAxisLabelsRotation() +{ + load ("/chart2/qa/extras/data/xlsx/", "xAxisLabelsRotation.xlsx"); + xmlDocUniquePtr pXmlDoc1 = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc1); + + // Chart1 xAxis labels should be 45 degree + assertXPath(pXmlDoc1, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot", "2700000"); +} + +void Chart2ExportTest::testMultipleCategoryAxisLablesXLSX() +{ + load("/chart2/qa/extras/data/ods/", "multilevelcat.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // check category axis labels number of first level + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:ptCount", "val", "6"); + // check category axis labels text of first level + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v", "Categoria 1"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[6]/c:v", "Categoria 6"); + // check category axis labels text of second level + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v", "2011"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[3]/c:v", "2013"); + // check the 'noMultiLvlLbl' tag - ChartExport.cxx:2950 FIXME: seems not support, so check the default noMultiLvlLbl value. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl", "val", "0"); +} + +void Chart2ExportTest::testMultipleCategoryAxisLablesDOCX() +{ + load("/chart2/qa/extras/data/odt/", "multilevelcat.odt"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + // check category axis labels number of first level + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:ptCount", "val", "4"); + // check category axis labels text of first level + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v", "Categoria 1"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[4]/c:v", "Categoria 4"); + // check category axis labels text of second level + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v", "2011"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[2]/c:v", "2012"); + // check the 'noMultiLvlLbl' tag - ChartExport.cxx:2950 FIXME: seems not support, so check the default noMultiLvlLbl value. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl", "val", "0"); +} + +void Chart2ExportTest::testTdf116163() +{ + load("/chart2/qa/extras/data/pptx/", "tdf116163.pptx"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot", "-5400000"); +} + +void Chart2ExportTest::testTdf111824() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf111824.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + // Collect 3D barchart Z axID + OUString zAxisIdOf3DBarchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:axId[3]", "val"); + // 3D barchart Z axis properties should be in a serAx OOXML tag instead of catAx + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId", "val", zAxisIdOf3DBarchart); +} + +void Chart2ExportTest::test3DAreaChartZAxis() +{ + load("/chart2/qa/extras/data/xlsx/", "test3DAreaChartZAxis.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + // Collect 3D area chart Z axID + OUString zAxisIdOf3DAreachart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:area3DChart/c:axId[3]", "val"); + // 3D area chart z-axis properties should be in a serAx OOXML element instead of catAx + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId", "val", zAxisIdOf3DAreachart); +} + +void Chart2ExportTest::testTdf119029() +{ + load("/chart2/qa/extras/data/odp/", "tdf119029.odp"); + // Only use "chart", without number, because the number depends on the previous tests + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, + "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:bodyPr", "rot", + "-5400000"); +} + +void Chart2ExportTest::testTdf108022() +{ + load("/chart2/qa/extras/data/odt/", "tdf108022.odt"); + reload("Office Open XML Text"); + + // assert we really have two charts + Reference xChartDoc1(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc1.is()); + Reference xChartDoc2(getChartDocFromWriter(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc2.is()); +} + +void Chart2ExportTest::testTdf121744() +{ + load("/chart2/qa/extras/data/docx/", "tdf121744.docx"); + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + OUString XValueId = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]", "val"); + OUString YValueId = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]", "val"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]", "val", XValueId ); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val", YValueId ); +} + +void Chart2ExportTest::testTdf121189() +{ + load("/chart2/qa/extras/data/odp/", "tdf121189.odp"); + reload("Impress Office Open XML"); + + uno::Reference xDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPage->getCount()); + uno::Reference xShape(xPage->getByIndex(0), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.OLE2Shape"), xShape->getShapeType()); +} + +void Chart2ExportTest::testTdf122031() +{ + //Checks pie chart data label format. + + load("/chart2/qa/extras/data/xlsx/", "tdf122031.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt", "formatCode", "0.000%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt", "formatCode", "0.000%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:numFmt", "formatCode", "0.000%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:numFmt", "formatCode", "0.000%"); +} + +void Chart2ExportTest::testTdf115012() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf115012.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // workaround: use-zero instead of leave-gap to show the original line chart + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", "zero"); +} + +void Chart2ExportTest::testTdf123206_customLabelText() +{ + load("/chart2/qa/extras/data/docx/", "tdf123206.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:tx/c:rich/a:p/a:r/a:t", "kiscica"); +} + +void Chart2ExportTest::testCustomLabelText() +{ + load("/chart2/qa/extras/data/docx/", "testCustomlabeltext.docx"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val", "2"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:tx/c:rich/a:p/a:r[1]/a:t", "3.5"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:tx/c:rich/a:p/a:r[3]/a:t", "CustomLabel 1"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:idx", "val", "3"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:tx/c:rich/a:p/a:r[1]/a:t", "4.5"); + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:tx/c:rich/a:p/a:r[3]/a:t", "CustomLabel 2"); +} + +void Chart2ExportTest::testDeletedLegendEntries() +{ + load("/chart2/qa/extras/data/xlsx/", "deleted_legend_entry.xlsx"); + { + reload("Calc Office Open XML"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 1)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropertySet(xDataSeries, uno::UNO_QUERY_THROW); + bool bShowLegendEntry = true; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("ShowLegendEntry") >>= bShowLegendEntry); + CPPUNIT_ASSERT(!bShowLegendEntry); + } + + load("/chart2/qa/extras/data/xlsx/", "deleted_legend_entry2.xlsx"); + { + reload("Calc Office Open XML"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropertySet(xDataSeries, uno::UNO_QUERY_THROW); + bool bShowLegendEntry = true; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("ShowLegendEntry") >>= bShowLegendEntry); + CPPUNIT_ASSERT(!bShowLegendEntry); + + Reference xChartDoc2 = getChartDocFromSheet(1, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries2(getDataSeriesFromDoc(xChartDoc2, 0)); + CPPUNIT_ASSERT(xDataSeries2.is()); + Reference xPropertySet2(xDataSeries2, uno::UNO_QUERY_THROW); + Sequence deletedLegendEntriesSeq; + CPPUNIT_ASSERT(xPropertySet2->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]); + } +} + +void Chart2ExportTest::testTdf130225() +{ + load("/chart2/qa/extras/data/docx/", "piechart_deleted_legend_entry.docx"); + reload("Office Open XML Text"); + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropertySet(xDataSeries, uno::UNO_QUERY_THROW); + Sequence deletedLegendEntriesSeq; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]); +} + +void Chart2ExportTest::testTdf59857() +{ + load("/chart2/qa/extras/data/ods/", "tdf59857.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:ln/a:noFill", 1); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:solidFill/a:srgbClr", "val", "cccccc"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:noFill", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "b3b3b3"); +} + +void Chart2ExportTest::testTdf126076() +{ + load("/chart2/qa/extras/data/xlsx/", "auto_marker_excel10.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + // This was 12: all series exported with square markers + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker/c:symbol[@val='square']", 0); + // instead of skipping markers + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker", 0); +} + +void Chart2ExportTest::testTdf75330() +{ + load("/chart2/qa/extras/data/ods/", "legend_overlay.ods"); + reload("calc8"); + { + uno::Reference xChart2Doc = getChartDocFromSheet(0, mxComponent); + uno::Reference xChartDoc(xChart2Doc, uno::UNO_QUERY); + uno::Reference xLegend = xChartDoc->getLegend(); + Reference xPropertySet(xLegend, uno::UNO_QUERY_THROW); + bool bOverlay = false; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Overlay") >>= bOverlay); + CPPUNIT_ASSERT(bOverlay); + } + reload("Calc Office Open XML"); + { + uno::Reference xChart2Doc = getChartDocFromSheet(0, mxComponent); + uno::Reference xChartDoc(xChart2Doc, uno::UNO_QUERY); + uno::Reference xLegend = xChartDoc->getLegend(); + Reference xPropertySet(xLegend, uno::UNO_QUERY_THROW); + bool bOverlay = false; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Overlay") >>= bOverlay); + CPPUNIT_ASSERT(bOverlay); + } +} + +void Chart2ExportTest::testTdf127792() +{ + load("/chart2/qa/extras/data/docx/", "MSO_axis_position.docx"); + { + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between"); + } + { + xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart2", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "midCat"); + } +} + +void Chart2ExportTest::testTdf131979() +{ + load("/chart2/qa/extras/data/ods/", "tdf131115.ods"); + { + reload("calc8"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropertySet; + xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW); + bool blinknumberformattosource = true; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= blinknumberformattosource); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !blinknumberformattosource); + } + + load("/chart2/qa/extras/data/ods/", "tdf131979.ods"); + { + reload("calc8"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropertySet; + xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW); + bool blinknumberformattosource = true; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= blinknumberformattosource); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", blinknumberformattosource); + } +} + +void Chart2ExportTest::testTdf132076() +{ + { + load("/chart2/qa/extras/data/ods/", "tdf132076.ods"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt", "formatCode", "dd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt", "sourceLinked", "0"); + } + { + load("/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt", "formatCode", "dd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt", "sourceLinked", "0"); + } +} + +void Chart2ExportTest::testTdf125812() +{ + load("/chart2/qa/extras/data/odp/", "ellipticalGradientFill.odp"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path", "path", "circle"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "l", "50000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "t", "49000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "r", "50000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "b", "51000"); +} + +void Chart2ExportTest::testTdf133190() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + // Test word wrap of data point label + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:bodyPr", "wrap", "none"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:txPr/a:bodyPr", "wrap", "square"); +} + +void Chart2ExportTest::testTdf133191() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + // Test rotation of data point label + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:txPr/a:bodyPr", "rot", "-4500000"); +} + +void Chart2ExportTest::testTdf132594() +{ + load("/chart2/qa/extras/data/xlsx/", "chart_pie2007.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:cat", 1); +} + +void Chart2ExportTest::testTdf136267() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf136267.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:strCache/c:pt/c:v", "John"); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx new file mode 100644 index 000000000..dedfda6e1 --- /dev/null +++ b/chart2/qa/extras/chart2geometry.cxx @@ -0,0 +1,242 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "charttest.hxx" + +#include + +#include +#include +#include +#include + +#include + +#include + +#include + +using uno::Reference; +using beans::XPropertySet; + +class Chart2GeometryTest : public ChartTest, public XmlTestTools +{ +protected: + virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override; + +public: + Chart2GeometryTest() + : ChartTest() + { + } + void testTdf135184RoundLineCap(); + void testTdf135184RoundLineCap2(); + void testTdf135184RoundLineCap3(); + void testTdf135184RoundLineCap4(); + + CPPUNIT_TEST_SUITE(Chart2GeometryTest); + CPPUNIT_TEST(testTdf135184RoundLineCap); + CPPUNIT_TEST(testTdf135184RoundLineCap2); + CPPUNIT_TEST(testTdf135184RoundLineCap3); + CPPUNIT_TEST(testTdf135184RoundLineCap4); + + CPPUNIT_TEST_SUITE_END(); + +protected: + /** + * Given that some problem doesn't affect the result in the importer, we + * test the resulting file directly, by opening the zip file, parsing an + * xml stream, and asserting an XPath expression. This method returns the + * xml stream, so that you can do the asserting. + */ + xmlDocUniquePtr parseExport(const OUString& rDir, const OUString& rFilterFormat); +}; + +namespace +{ +struct CheckForChartName +{ +private: + OUString aDir; + +public: + explicit CheckForChartName(const OUString& rDir) + : aDir(rDir) + { + } + + bool operator()(const OUString& rName) + { + if (!rName.startsWith(aDir)) + return false; + + if (!rName.endsWith(".xml")) + return false; + + return true; + } +}; + +OUString findChartFile(const OUString& rDir, uno::Reference const& xNames) +{ + uno::Sequence aNames = xNames->getElementNames(); + OUString* pElement = std::find_if(aNames.begin(), aNames.end(), CheckForChartName(rDir)); + + CPPUNIT_ASSERT(pElement != aNames.end()); + return *pElement; +} +} + +xmlDocUniquePtr Chart2GeometryTest::parseExport(const OUString& rDir, const OUString& rFilterFormat) +{ + std::shared_ptr pTempFile = save(rFilterFormat); + + // Read the XML stream we're interested in. + uno::Reference xNameAccess + = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), + pTempFile->GetURL()); + uno::Reference xInputStream( + xNameAccess->getByName(findChartFile(rDir, xNameAccess)), uno::UNO_QUERY); + CPPUNIT_ASSERT(xInputStream.is()); + std::unique_ptr pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true)); + + return parseXmlStream(pStream.get()); +} + +void Chart2GeometryTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) +{ + static struct + { + char const* pPrefix; + char const* pURI; + } const aNamespaces[] + = { { "w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main" }, + { "v", "urn:schemas-microsoft-com:vml" }, + { "c", "http://schemas.openxmlformats.org/drawingml/2006/chart" }, + { "a", "http://schemas.openxmlformats.org/drawingml/2006/main" }, + { "mc", "http://schemas.openxmlformats.org/markup-compatibility/2006" }, + { "wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape" }, + { "wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" }, + { "wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" }, + { "c15", "http://schemas.microsoft.com/office/drawing/2012/chart" }, + { "office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" }, + { "chart", "urn:oasis:names:tc:opendocument:xmlns:chart:1.0" }, + { "style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0" }, + { "svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" }, + { "table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0" }, + { "text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0" }, + { "xlink", "http://www.w3c.org/1999/xlink" }, + { "c15", "http://schemas.microsoft.com/office/drawing/2012/chart" } }; + for (size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i) + { + xmlXPathRegisterNs(pXmlXPathCtx, reinterpret_cast(aNamespaces[i].pPrefix), + reinterpret_cast(aNamespaces[i].pURI)); + } +} + +static OString OU2O(const OUString& sOUSource) +{ + return rtl::OUStringToOString(sOUSource, RTL_TEXTENCODING_UTF8); +} + +// Without the patch for tdf#135184, charts were not able to use linecap at all. +// These two tests verify, that round linecaps in the xlsx file are saved in ods. +void Chart2GeometryTest::testTdf135184RoundLineCap() +{ + // It tests chart area, data series line and regression-curve line. + load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8"); + CPPUNIT_ASSERT(pXmlDoc); + + const OString sStyleStart("/office:document-content/office:automatic-styles"); + const OString sCap("/style:graphic-properties[@svg:stroke-linecap='round']"); + const OString sChartStart("/office:document-content/office:body/office:chart/chart:chart"); + OString sPredicate; + // chart area + const OUString sOUAreaStyleName = getXPathContent(pXmlDoc, sChartStart + "/@chart:style-name"); + sPredicate = "[@style:name='" + OU2O(sOUAreaStyleName) + "']"; + assertXPath(pXmlDoc, sStyleStart + "/style:style" + sPredicate + sCap); + // data series line + const OString sSeries(sChartStart + "/chart:plot-area/chart:series"); + const OUString sOUSeriesStyleName = getXPathContent(pXmlDoc, sSeries + "/@chart:style-name"); + sPredicate = "[@style:name='" + OU2O(sOUSeriesStyleName) + "']"; + assertXPath(pXmlDoc, sStyleStart + "/style:style" + sPredicate + sCap); + // regression-curve (trend line) + const OString sTrend(sChartStart + "/chart:plot-area/chart:series/chart:regression-curve"); + const OUString sOUTrendStyleName = getXPathContent(pXmlDoc, sTrend + "/@chart:style-name"); + sPredicate = "[@style:name='" + OU2O(sOUTrendStyleName) + "']"; + assertXPath(pXmlDoc, sStyleStart + "/style:style" + sPredicate + sCap); +} + +void Chart2GeometryTest::testTdf135184RoundLineCap2() +{ + // It tests legend, data series sector and title. + load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8"); + CPPUNIT_ASSERT(pXmlDoc); + + const OString sStyleStart("/office:document-content/office:automatic-styles"); + const OString sCap("/style:graphic-properties[@svg:stroke-linecap='round']"); + const OString sChartStart("/office:document-content/office:body/office:chart/chart:chart"); + OString sPredicate; + // legend + const OString sLegend(sChartStart + "/chart:legend"); + const OUString sOULegendStyleName = getXPathContent(pXmlDoc, sLegend + "/@chart:style-name"); + sPredicate = "[@style:name='" + OU2O(sOULegendStyleName) + "']"; + assertXPath(pXmlDoc, sStyleStart + "/style:style" + sPredicate + sCap); + // title + const OString sTitle(sChartStart + "/chart:title"); + const OUString sOUTitleStyleName = getXPathContent(pXmlDoc, sTitle + "/@chart:style-name"); + sPredicate = "[@style:name='" + OU2O(sOUTitleStyleName) + "']"; + assertXPath(pXmlDoc, sStyleStart + "/style:style" + sPredicate + sCap); + // sector + const OString sSector(sChartStart + "/chart:plot-area/chart:series/chart:data-point[3]"); + const OUString sOUSectorStyleName = getXPathContent(pXmlDoc, sSector + "/@chart:style-name"); + sPredicate = "[@style:name='" + OU2O(sOUSectorStyleName) + "']"; + assertXPath(pXmlDoc, sStyleStart + "/style:style" + sPredicate + sCap); +} + +// These two tests verify the round-trip of preset dash styles in the xlsx file. +void Chart2GeometryTest::testTdf135184RoundLineCap3() +{ + // It tests chart area, data series line and regression-curve line. + load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + const OString sDash("/c:spPr/a:ln/a:prstDash"); + // chart area + assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val", "dashDot"); + // data series line + const OString sStart("/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser"); + assertXPath(pXmlDoc, sStart + sDash, "val", "dash"); + // regression-curve (trendline) + assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val", "sysDot"); +} + +void Chart2GeometryTest::testTdf135184RoundLineCap4() +{ + // It tests legend, data series sector and title. + load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + const OString sChartStart("/c:chartSpace/c:chart"); + const OString sDash("/c:spPr/a:ln/a:prstDash"); + assertXPath(pXmlDoc, sChartStart + "/c:legend" + sDash, "val", "sysDot"); + const OString sSeries(sChartStart + "/c:plotArea/c:pieChart/c:ser/c:dPt[3]"); + assertXPath(pXmlDoc, sSeries + sDash, "val", "dash"); + assertXPath(pXmlDoc, sChartStart + "/c:title" + sDash, "val", "dashDot"); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Chart2GeometryTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx new file mode 100644 index 000000000..8fd7ca7a2 --- /dev/null +++ b/chart2/qa/extras/chart2import.cxx @@ -0,0 +1,2603 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "charttest.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +class Chart2ImportTest : public ChartTest +{ +public: + void Fdo60083(); + void testSteppedLines(); + void testErrorBarRange(); + void testErrorBarFormatting(); + void testODSChartSeries(); + void testXLSXChartSeries(); + void testXLSChartSeries(); + void testODTChartSeries(); + void testDOCChartSeries(); + void testDOCXChartSeries(); + void testDOCXChartEmptySeries(); + void testDOCXChartValuesSize(); + void testPPTXChartSeries(); + void testPPTXSparseChartSeries(); + /** + * Original data contains 3 series but 2 of them are hidden. For now, we + * detect and skip those hidden series on import (since we don't support + * hidden columns for internal data table yet). + */ + void testPPTXHiddenDataSeries(); + void testPPTXPercentageNumberFormats(); + void testPieChartLabelsNumFormat(); + void testPPTXStackedNonStackedYAxis(); + void testPPTChartSeries(); + void testODPChartSeries(); + void testBnc864396(); + void testBnc882383(); + void testTransparancyGradientValue(); + void testBnc889755(); + void testSimpleStrictXLSX(); + void testDelayedCellImport(); // chart range referencing content on later sheets + void testFlatODSStackedColumnChart(); + void testFdo78080(); + void testFdo54361(); + void testFdo54361_1(); + void testTdf86624(); // manually placed legends + void testTdf105517(); + void testTdf106217(); + void testTdf108021(); + void testTdf100084(); + void testTdf124817(); + void testTdf126033(); + void testAutoBackgroundXLSX(); + void testAutoChartAreaBorderPropXLSX(); + void testChartAreaStyleBackgroundXLSX(); + void testChartHatchFillXLSX(); + void testAxisTextRotationXLSX(); + // void testTextCanOverlapXLSX(); // TODO : temporarily disabled. + void testTextBreakXLSX(); + void testNumberFormatsXLSX(); + void testNumberFormatsDOCX(); + void testPercentageNumberFormatsDOCX(); + + void testTransparentBackground(OUString const & filename); + + // below are OOXML default value tests for cases + // where we fixed the handling of MSO 2007 vs OOXML + void testAutoTitleDelDefaultValue2007XLSX(); + void testAutoTitleDelDefaultValue2013XLSX(); + void testDispBlanksAsDefaultValue2007XLSX(); + void testDispBlanksAsDefaultValue2013XLSX(); + + void testSmoothDefaultValue2007XLSX(); + void testSmoothDefaultValue2013XLSX(); + void testTrendlineDefaultValue2007XLSX(); + void testTrendlineDefaultValue2013XLSX(); + void testVaryColorDefaultValues2007XLSX(); + void testVaryColorDefaultValues2013XLSX(); + void testPlotVisOnlyDefaultValue2013XLSX(); + void testRAngAxDefaultValue2013XLSX(); + void testMajorTickMarksDefaultValue2013XLSX(); + void testMinorTickMarksDefaultValue2013XLSX(); + + void testAxisTitleDefaultRotationXLSX(); + void testSecondaryAxisTitleDefaultRotationXLSX(); + void testAxisTitleRotationXLSX(); + void testAxisTitlePositionDOCX(); + void testCombinedChartAttachedAxisXLSX(); + + void testTdf90510(); // Pie chart label placement settings(XLS) + void testTdf109858(); // Pie chart label placement settings(XLSX) + void testTdf130105(); + + void testTdf111173(); + void testTdf122226(); + + void testInternalDataProvider(); + + void testTdf115107(); // import complex data point labels + void testTdf115107_2(); // import complex data point labels in cobo charts with multiple data series + + void testTdf116163(); + + void testTdf48041(); + + void testTdf121205(); + + void testTdf114179(); + void testTdf124243(); + void testTdf127393(); + void testTdf128733(); + void testTdf128432(); + void testTdf128627(); + void testTdf128634(); + void testTdf130657(); + void testDeletedDataLabel(); + void testDataPointInheritedColorDOCX(); + void testExternalStrRefsXLSX(); + void testSourceNumberFormatComplexCategoriesXLS(); + void testSimpleCategoryAxis(); + void testMultilevelCategoryAxis(); + void testXaxisValues(); + void testTdf123504(); + void testTdf122765(); + void testTdf123206CustomLabelField(); + void testTdf125444PercentageCustomLabel(); + void testDataPointLabelCustomPos(); + void testTdf130032(); + void testTdf119138MissingAutoTitleDeleted(); + void testStockChartShiftedCategoryPosition(); + void testTdf133376(); + void testTdf134225(); + void testTdf91250(); + + CPPUNIT_TEST_SUITE(Chart2ImportTest); + CPPUNIT_TEST(Fdo60083); + CPPUNIT_TEST(testSteppedLines); + CPPUNIT_TEST(testErrorBarRange); + CPPUNIT_TEST(testErrorBarFormatting); + CPPUNIT_TEST(testODSChartSeries); + CPPUNIT_TEST(testXLSXChartSeries); + CPPUNIT_TEST(testXLSChartSeries); + CPPUNIT_TEST(testODTChartSeries); + CPPUNIT_TEST(testDOCChartSeries); + CPPUNIT_TEST(testDOCXChartSeries); + CPPUNIT_TEST(testDOCXChartEmptySeries); + CPPUNIT_TEST(testDOCXChartValuesSize); + CPPUNIT_TEST(testPPTChartSeries); + CPPUNIT_TEST(testPPTXChartSeries); + CPPUNIT_TEST(testPPTXSparseChartSeries); + CPPUNIT_TEST(testPPTXHiddenDataSeries); + CPPUNIT_TEST(testPPTXPercentageNumberFormats); + CPPUNIT_TEST(testPieChartLabelsNumFormat); + CPPUNIT_TEST(testPPTXStackedNonStackedYAxis); + CPPUNIT_TEST(testODPChartSeries); + CPPUNIT_TEST(testBnc864396); + CPPUNIT_TEST(testBnc882383); + CPPUNIT_TEST(testTransparancyGradientValue); + CPPUNIT_TEST(testBnc889755); + CPPUNIT_TEST(testSimpleStrictXLSX); + CPPUNIT_TEST(testDelayedCellImport); + CPPUNIT_TEST(testFlatODSStackedColumnChart); + CPPUNIT_TEST(testFdo78080); + CPPUNIT_TEST(testFdo54361); + CPPUNIT_TEST(testFdo54361_1); + CPPUNIT_TEST(testTdf86624); + CPPUNIT_TEST(testTdf105517); + CPPUNIT_TEST(testTdf106217); + CPPUNIT_TEST(testTdf108021); + CPPUNIT_TEST(testTdf100084); + CPPUNIT_TEST(testTdf124817); + CPPUNIT_TEST(testTdf126033); + CPPUNIT_TEST(testAutoBackgroundXLSX); + CPPUNIT_TEST(testAutoChartAreaBorderPropXLSX); + CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX); + CPPUNIT_TEST(testChartHatchFillXLSX); + CPPUNIT_TEST(testAxisTextRotationXLSX); + // CPPUNIT_TEST(testTextCanOverlapXLSX); // TODO : temporarily disabled. + CPPUNIT_TEST(testTextBreakXLSX); + CPPUNIT_TEST(testNumberFormatsXLSX); + CPPUNIT_TEST(testNumberFormatsDOCX); + CPPUNIT_TEST(testPercentageNumberFormatsDOCX); + CPPUNIT_TEST(testAutoTitleDelDefaultValue2007XLSX); + CPPUNIT_TEST(testAutoTitleDelDefaultValue2013XLSX); + CPPUNIT_TEST(testDispBlanksAsDefaultValue2007XLSX); + CPPUNIT_TEST(testDispBlanksAsDefaultValue2013XLSX); + CPPUNIT_TEST(testSmoothDefaultValue2007XLSX); + CPPUNIT_TEST(testSmoothDefaultValue2013XLSX); + CPPUNIT_TEST(testTrendlineDefaultValue2007XLSX); + CPPUNIT_TEST(testTrendlineDefaultValue2013XLSX); + CPPUNIT_TEST(testVaryColorDefaultValues2007XLSX); + CPPUNIT_TEST(testVaryColorDefaultValues2013XLSX); + CPPUNIT_TEST(testPlotVisOnlyDefaultValue2013XLSX); + CPPUNIT_TEST(testRAngAxDefaultValue2013XLSX); + CPPUNIT_TEST(testMajorTickMarksDefaultValue2013XLSX); + CPPUNIT_TEST(testMinorTickMarksDefaultValue2013XLSX); + CPPUNIT_TEST(testAxisTitleDefaultRotationXLSX); + CPPUNIT_TEST(testSecondaryAxisTitleDefaultRotationXLSX); + CPPUNIT_TEST(testAxisTitleRotationXLSX); + CPPUNIT_TEST(testAxisTitlePositionDOCX); + CPPUNIT_TEST(testCombinedChartAttachedAxisXLSX); + CPPUNIT_TEST(testTdf90510); + CPPUNIT_TEST(testTdf109858); + CPPUNIT_TEST(testTdf130105); + CPPUNIT_TEST(testTdf111173); + CPPUNIT_TEST(testTdf122226); + + CPPUNIT_TEST(testInternalDataProvider); + + CPPUNIT_TEST(testTdf115107); + CPPUNIT_TEST(testTdf115107_2); + + CPPUNIT_TEST(testTdf116163); + + CPPUNIT_TEST(testTdf48041); + + CPPUNIT_TEST(testTdf121205); + + CPPUNIT_TEST(testTdf114179); + CPPUNIT_TEST(testTdf124243); + CPPUNIT_TEST(testTdf127393); + CPPUNIT_TEST(testTdf128733); + CPPUNIT_TEST(testTdf128432); + CPPUNIT_TEST(testTdf128627); + CPPUNIT_TEST(testTdf128634); + CPPUNIT_TEST(testTdf130657); + CPPUNIT_TEST(testDeletedDataLabel); + CPPUNIT_TEST(testDataPointInheritedColorDOCX); + CPPUNIT_TEST(testExternalStrRefsXLSX); + CPPUNIT_TEST(testSourceNumberFormatComplexCategoriesXLS); + CPPUNIT_TEST(testSimpleCategoryAxis); + CPPUNIT_TEST(testMultilevelCategoryAxis); + CPPUNIT_TEST(testXaxisValues); + CPPUNIT_TEST(testTdf123504); + CPPUNIT_TEST(testTdf122765); + CPPUNIT_TEST(testTdf123206CustomLabelField); + CPPUNIT_TEST(testTdf125444PercentageCustomLabel); + CPPUNIT_TEST(testDataPointLabelCustomPos); + CPPUNIT_TEST(testTdf130032); + CPPUNIT_TEST(testTdf119138MissingAutoTitleDeleted); + CPPUNIT_TEST(testStockChartShiftedCategoryPosition); + CPPUNIT_TEST(testTdf133376); + CPPUNIT_TEST(testTdf134225); + CPPUNIT_TEST(testTdf91250); + + CPPUNIT_TEST_SUITE_END(); + +private: + +}; + +static uno::Reference +getShapeByName(const uno::Reference& rShapes, const OUString& rName, + const std::function&)>& pCondition + = nullptr) +{ + for (sal_Int32 i = 0; i < rShapes->getCount(); ++i) + { + uno::Reference xShapes(rShapes->getByIndex(i), uno::UNO_QUERY); + if (xShapes.is()) + { + uno::Reference xRet = getShapeByName(xShapes, rName, pCondition); + if (xRet.is()) + return xRet; + } + uno::Reference xNamedShape(rShapes->getByIndex(i), uno::UNO_QUERY); + if (xNamedShape->getName() == rName) + { + uno::Reference xShape(xNamedShape, uno::UNO_QUERY); + if (pCondition == nullptr || pCondition(xShape)) + return xShape; + } + } + return uno::Reference(); +} + +// error bar import +// split method up into smaller chunks for more detailed tests +void Chart2ImportTest::Fdo60083() +{ + load("/chart2/qa/extras/data/ods/", "fdo60083.ods"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT( xDataSeries.is() ); + + Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW ); + + // test that y error bars are there + Reference< beans::XPropertySet > xErrorBarYProps; + xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarYProps; + CPPUNIT_ASSERT(xErrorBarYProps.is()); + { + sal_Int32 nErrorBarStyle; + CPPUNIT_ASSERT( + xErrorBarYProps->getPropertyValue("ErrorBarStyle") + >>= nErrorBarStyle); + CPPUNIT_ASSERT_EQUAL( + chart::ErrorBarStyle::RELATIVE, + nErrorBarStyle); + + double nVal = 0.0; + CPPUNIT_ASSERT( + xErrorBarYProps->getPropertyValue("PositiveError") >>= nVal); + CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, nVal, 1e-8); + + CPPUNIT_ASSERT( + xErrorBarYProps->getPropertyValue("NegativeError") >>= nVal); + CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, nVal, 1e-8); + + bool bVal; + CPPUNIT_ASSERT( + xErrorBarYProps->getPropertyValue("ShowPositiveError") >>= bVal); + CPPUNIT_ASSERT_EQUAL(true, bVal); + + CPPUNIT_ASSERT( + xErrorBarYProps->getPropertyValue("ShowNegativeError") >>= bVal); + CPPUNIT_ASSERT_EQUAL(true, bVal); + } + + // test that x error bars are not imported + Reference< beans::XPropertySet > xErrorBarXProps; + xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_X) >>= xErrorBarXProps; + CPPUNIT_ASSERT(!xErrorBarXProps.is()); +} + +void Chart2ImportTest::testErrorBarRange() +{ + load("/chart2/qa/extras/data/ods/", "error_bar_range.ods"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT( xDataSeries.is() ); + + Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW ); + + // test that y error bars are there + Reference< beans::XPropertySet > xErrorBarYProps; + xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarYProps; + CPPUNIT_ASSERT(xErrorBarYProps.is()); + + sal_Int32 nErrorBarStyle; + CPPUNIT_ASSERT( + xErrorBarYProps->getPropertyValue("ErrorBarStyle") + >>= nErrorBarStyle); + CPPUNIT_ASSERT_EQUAL( + chart::ErrorBarStyle::FROM_DATA, + nErrorBarStyle); + + OUString aRangePos; + CPPUNIT_ASSERT(xErrorBarYProps->getPropertyValue("ErrorBarRangePositive") >>= aRangePos); + CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$2:$C$4"), aRangePos); +} + +void Chart2ImportTest::testErrorBarFormatting() +{ + load("/chart2/qa/extras/data/ods/", "error_bar_properties.ods"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT( xDataSeries.is() ); + + Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW ); + + // test that y error bars are there + Reference< beans::XPropertySet > xErrorBarYProps; + xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarYProps; + CPPUNIT_ASSERT(xErrorBarYProps.is()); + + util::Color aColor(0); + xErrorBarYProps->getPropertyValue("LineColor") >>= aColor; + sal_uInt32 nColorValue = aColor; + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0xff3333), nColorValue); +} + +// stepped line interpolation +void Chart2ImportTest::testSteppedLines() +{ + const sal_Int32 MAXSHEET = 14; + chart2::CurveStyle const curveStyle[] = { + chart2::CurveStyle_LINES, + chart2::CurveStyle_CUBIC_SPLINES, + chart2::CurveStyle_B_SPLINES, + chart2::CurveStyle_STEP_START, + chart2::CurveStyle_STEP_END, + chart2::CurveStyle_STEP_CENTER_X, + chart2::CurveStyle_STEP_CENTER_Y, + chart2::CurveStyle_LINES, + chart2::CurveStyle_CUBIC_SPLINES, + chart2::CurveStyle_B_SPLINES, + chart2::CurveStyle_STEP_START, + chart2::CurveStyle_STEP_END, + chart2::CurveStyle_STEP_CENTER_X, + chart2::CurveStyle_STEP_CENTER_Y + }; + + load("/chart2/qa/extras/data/ods/", "stepped_lines.ods"); + for(sal_Int32 nSheet = 0; nSheet < MAXSHEET; ++nSheet) + { + uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet( nSheet, mxComponent ); + CPPUNIT_ASSERT(xChart2Doc.is()); + + Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChart2Doc, 0 ); + CPPUNIT_ASSERT(xChartType.is()); + + Reference< beans::XPropertySet > xPropSet( xChartType, UNO_QUERY ); + CPPUNIT_ASSERT(xPropSet.is()); + + chart2::CurveStyle eCurveStyle; + xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle; + CPPUNIT_ASSERT_EQUAL(eCurveStyle, curveStyle[nSheet]); + } +} + +static uno::Sequence < OUString > getChartColumnDescriptions( uno::Reference< chart::XChartDocument > const & xChart1Doc) +{ + CPPUNIT_ASSERT(xChart1Doc.is()); + uno::Reference< chart::XChartDataArray > xChartData ( xChart1Doc->getData(), UNO_QUERY_THROW); + uno::Sequence < OUString > seriesList = xChartData->getColumnDescriptions(); + return seriesList; +} + +void Chart2ImportTest::testODSChartSeries() +{ + load("/chart2/qa/extras/data/ods/", "chart.ods"); + uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + uno::Sequence < OUString > seriesList = getChartColumnDescriptions( xChart1Doc); + CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Col2"), seriesList[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Col 33"), seriesList[2]); + +} + +void Chart2ImportTest::testXLSXChartSeries() +{ + load("/chart2/qa/extras/data/xlsx/", "chart.xlsx"); + uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc ); + CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Col2"), seriesList[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Col 33"), seriesList[2]); + +} + +void Chart2ImportTest::testXLSChartSeries() +{ + load("/chart2/qa/extras/data/xls/", "chart.xls"); + uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc ); + CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Col 2"), seriesList[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Col 3"), seriesList[2]); + +} + +void Chart2ImportTest::testODTChartSeries() +{ + load("/chart2/qa/extras/data/odt/", "chart.odt"); + uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent); + CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]); + +} + +void Chart2ImportTest::testDOCChartSeries() +{ + load("/chart2/qa/extras/data/doc/", "chart.doc"); + uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent); + CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]); +} + +void Chart2ImportTest::testDOCXChartSeries() +{ + load("/chart2/qa/extras/data/docx/", "chart.docx"); + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + std::vector > aLabels = getDataSeriesLabelsFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); + CPPUNIT_ASSERT_EQUAL(OUString("Series 1"), aLabels[0][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("Series 2"), aLabels[1][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("Series 3"), aLabels[2][0].get()); +} + +void Chart2ImportTest::testDOCXChartEmptySeries() +{ + load("/chart2/qa/extras/data/docx/", "tdf125337.docx"); + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + std::vector > aLabels = getDataSeriesLabelsFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); + CPPUNIT_ASSERT_EQUAL(OUString("1. dataseries"), aLabels[0][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("2. dataseries"), aLabels[1][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), aLabels[2][0].get()); + + //test chart series sparse data for docx + std::vector > aValues = getDataSeriesYValuesFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aValues.size()); + //test the second series values + CPPUNIT_ASSERT_EQUAL(2.4, aValues[1][0]); + CPPUNIT_ASSERT_EQUAL(4.4, aValues[1][1]); + //test the third series (empty) values + CPPUNIT_ASSERT(std::isnan(aValues[2][0])); + CPPUNIT_ASSERT(std::isnan(aValues[2][1])); +} + +void Chart2ImportTest::testDOCXChartValuesSize() +{ + load( "/chart2/qa/extras/data/docx/", "bubblechart.docx" ); + Reference xChartDoc( getChartDocFromWriter(0), uno::UNO_QUERY ); + CPPUNIT_ASSERT( xChartDoc.is() ); + + uno::Reference< chart::XChartDataArray > xDataArray( xChartDoc->getDataProvider(), UNO_QUERY_THROW ); + Sequence aColumnDesc = xDataArray->getColumnDescriptions(); + // Number of columns = 3 (Y-values, X-values and bubble sizes). + // Without the fix there would only be 2 columns (no bubble sizes). + CPPUNIT_ASSERT_EQUAL_MESSAGE( "There must be 3 columns and descriptions", static_cast(3), aColumnDesc.getLength() ); + Sequence> aData = xDataArray->getData(); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "There must be exactly 3 data points", static_cast(3), aData.getLength() ); + + std::vector> aExpected = { { 2.7, 0.7, 10.0 }, { 3.2, 1.8, 4.0 }, { 0.8, 2.6, 8.0 } }; + + for ( sal_Int32 nRowIdx = 0; nRowIdx < 3; ++nRowIdx ) + for( sal_Int32 nColIdx = 0; nColIdx < 3; ++nColIdx ) + CPPUNIT_ASSERT_DOUBLES_EQUAL( aExpected[nRowIdx][nColIdx], aData[nRowIdx][nColIdx], 1e-1 ); +} + +void Chart2ImportTest::testPPTChartSeries() +{ + //test chart series names for ppt + uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions("/chart2/qa/extras/data/ppt/", "chart.ppt"); + + CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]); + +} + +void Chart2ImportTest::testPPTXChartSeries() +{ + //test chart series names for pptx + load("/chart2/qa/extras/data/pptx/", "chart.pptx"); + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + std::vector > aLabels = getDataSeriesLabelsFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); + CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), aLabels[0][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), aLabels[1][0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), aLabels[2][0].get()); +} + +void Chart2ImportTest::testPPTXSparseChartSeries() +{ + //test chart series sparse data for pptx + load("/chart2/qa/extras/data/pptx/", "sparse-chart.pptx"); + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + std::vector > aValues = getDataSeriesYValuesFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(2), aValues.size()); + CPPUNIT_ASSERT( std::isnan( aValues[0][0] ) ); + CPPUNIT_ASSERT_EQUAL(2.5, aValues[0][1]); + CPPUNIT_ASSERT_EQUAL(3.5, aValues[0][2]); + CPPUNIT_ASSERT( std::isnan( aValues[0][3] ) ); + CPPUNIT_ASSERT_EQUAL(-2.4, aValues[1][0]); + CPPUNIT_ASSERT( std::isnan( aValues[1][1] ) ); + CPPUNIT_ASSERT( std::isnan( aValues[1][2] ) ); + CPPUNIT_ASSERT_EQUAL(-2.8, aValues[1][3]); +} + +void Chart2ImportTest::testPPTXHiddenDataSeries() +{ + load("/chart2/qa/extras/data/pptx/", "stacked-bar-chart-hidden-series.pptx"); + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + // "Automatic" chart background fill in pptx should be loaded as no fill. + Reference xPropSet = xChartDoc->getPageBackground(); + CPPUNIT_ASSERT(xPropSet.is()); + drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in pptx should be loaded as no fill (transparent).", + drawing::FillStyle_NONE, eStyle); + + Reference xCT = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xCT.is()); + + // There should be only one data series present. + std::vector > aLabels = getDataSeriesLabelsFromChartType(xCT); + CPPUNIT_ASSERT_EQUAL(size_t(1), aLabels.size()); + CPPUNIT_ASSERT_EQUAL(OUString("Series 3"), aLabels[0][0].get()); + + // Test the internal data. + CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider()); + + Reference xInternalProvider(xChartDoc->getDataProvider(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xInternalProvider.is()); + + Reference xDescAccess(xInternalProvider, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDescAccess.is()); + + // Get the category labels. + Sequence > aCategories = xDescAccess->getComplexRowDescriptions(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aCategories.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Category 1"), aCategories[0][0]); + CPPUNIT_ASSERT_EQUAL(OUString("Category 2"), aCategories[1][0]); + CPPUNIT_ASSERT_EQUAL(OUString("Category 3"), aCategories[2][0]); + CPPUNIT_ASSERT_EQUAL(OUString("Category 4"), aCategories[3][0]); +} + +void Chart2ImportTest::testPPTXPercentageNumberFormats() +{ + load("/chart2/qa/extras/data/pptx/", "percentage-number-formats.pptx"); + + // 1st chart + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference xPropertySet; + chart2::DataPointLabel aLabel; + sal_Int32 nNumberFormat; + const sal_Int32 nPercentFormatSimple = getNumberFormat(xChartDoc, "0%"); + const sal_Int32 nPercentFormatDecimal = getNumberFormat(xChartDoc, "0.00%"); + + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nPercentFormatSimple, nNumberFormat); + + xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nPercentFormatDecimal, nNumberFormat); + + xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nPercentFormatSimple, nNumberFormat); + + xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nPercentFormatDecimal, nNumberFormat); + + // 2nd chart + xChartDoc.set(getChartDocFromDrawImpress(1, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); + CPPUNIT_ASSERT(xYAxis.is()); + + Reference xPS(xYAxis, uno::UNO_QUERY_THROW); + bool bLinkNumberFormatToSource = true; + bool bSuccess = xPS->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", bSuccess && !bLinkNumberFormatToSource); + + // FIXME: This should be in fact "0.00%". + // see TODO in oox/source/drawingml/chart/modelbase.cxx + const sal_Int32 nPercentFormatDecimalShort = getNumberFormat(xChartDoc, "0.0%"); + nNumberFormat = getNumberFormatFromAxis(xYAxis); + CPPUNIT_ASSERT_EQUAL(nPercentFormatDecimalShort, nNumberFormat); + sal_Int16 nType = getNumberFormatType(xChartDoc, nNumberFormat); + CPPUNIT_ASSERT_MESSAGE("Y axis should be a percent format.", (nType & util::NumberFormat::PERCENT)); +} + +void Chart2ImportTest::testPieChartLabelsNumFormat() +{ + load("/chart2/qa/extras/data/xlsx/", "tdfPieNumFormat.xlsx"); + uno::Reference< chart::XChartDocument > xChartDoc(getChartCompFromSheet(0, mxComponent), UNO_QUERY_THROW); + CPPUNIT_ASSERT(xChartDoc.is()); + // test data point labels format + Reference xDataPointPropSet(xChartDoc->getDiagram()->getDataPointProperties(0, 0), uno::UNO_SET_THROW); + chart2::DataPointLabel aLabel; + xDataPointPropSet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber); +} + +void Chart2ImportTest::testPPTXStackedNonStackedYAxis() +{ + load("/chart2/qa/extras/data/pptx/", "stacked-non-stacked-mix-y-axis.pptx"); + + // 1st chart is a normal stacked column. + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + OUString aTitle = getTitleString(xTitled); + CPPUNIT_ASSERT_EQUAL(OUString("Stacked"), aTitle); + + // Get the Y-axis. + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); + CPPUNIT_ASSERT(xYAxis.is()); + + sal_Int32 nNumberFormat = getNumberFormatFromAxis(xYAxis); + sal_Int16 nType = getNumberFormatType(xChartDoc, nNumberFormat); + CPPUNIT_ASSERT_MESSAGE("Y axis should be a normal number format.", (nType & util::NumberFormat::NUMBER)); + CPPUNIT_ASSERT_MESSAGE("Y axis should NOT be a percent format.", !(nType & util::NumberFormat::PERCENT)); + + // 2nd chart is a percent-stacked column. + xChartDoc.set(getChartDocFromDrawImpress(1, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xTitled.set(xChartDoc, uno::UNO_QUERY_THROW); + aTitle = getTitleString(xTitled); + CPPUNIT_ASSERT_EQUAL(OUString("100% Stacked"), aTitle); + + // Get the Y-axis. + xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); + CPPUNIT_ASSERT(xYAxis.is()); + + // Get the number format of the Y-axis. + nNumberFormat = getNumberFormatFromAxis(xYAxis); + nType = getNumberFormatType(xChartDoc, nNumberFormat); + CPPUNIT_ASSERT_MESSAGE("Y axis should be a percent format.", (nType & util::NumberFormat::PERCENT)); + + // 3rd chart is a mixture of normal-stacked column with a percent-stacked + // area chart series. Excel in this case sets the Y-axis to be + // non-percent axis and we should do the same for interoperability. + xChartDoc.set(getChartDocFromDrawImpress(2, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xTitled.set(xChartDoc, uno::UNO_QUERY_THROW); + aTitle = getTitleString(xTitled); + CPPUNIT_ASSERT_EQUAL(OUString("Stacked column mixed with 100% stacked area"), aTitle); + + // Get the Y-axis. + xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); + CPPUNIT_ASSERT(xYAxis.is()); + + // Get the number format of the Y-axis. + nNumberFormat = getNumberFormatFromAxis(xYAxis); + nType = getNumberFormatType(xChartDoc, nNumberFormat); + CPPUNIT_ASSERT_MESSAGE("Y axis should be a normal number format.", (nType & util::NumberFormat::NUMBER)); + CPPUNIT_ASSERT_MESSAGE("Y axis should NOT be a percent format.", !(nType & util::NumberFormat::PERCENT)); +} + +void Chart2ImportTest::testODPChartSeries() +{ + //test chart series names for odp + uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions("/chart2/qa/extras/data/odp/", "chart.odp"); + CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]); + +} + +void Chart2ImportTest::testBnc864396() +{ + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/pptx/", "bnc864396.pptx"), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider()); + + uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW ); + uno::Reference< chart::XChartDataArray > xChartDataArray(xDataProvider, uno::UNO_QUERY_THROW); + uno::Sequence< OUString > aRowLabels = xChartDataArray->getRowDescriptions(); + for(sal_Int32 i = 0; i < aRowLabels.getLength(); ++i) + { + OUString aExpected = "cat" + OUString::number(i+1); + CPPUNIT_ASSERT_EQUAL(aExpected, aRowLabels[i]); + } +} + +void Chart2ImportTest::testBnc889755() +{ + load("/chart2/qa/extras/data/pptx/", "bnc889755.pptx"); + uno::Reference xChartDoc(getChartDocFromDrawImpress(0, 6), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider()); + + uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW ); + uno::Reference< chart::XChartDataArray > xChartDataArray(xDataProvider, uno::UNO_QUERY_THROW); + uno::Sequence< OUString > aRowLabels = xChartDataArray->getRowDescriptions(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(16), aRowLabels.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Oct-12"), aRowLabels[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Nov-12"), aRowLabels[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Dec-12"), aRowLabels[2]); + CPPUNIT_ASSERT_EQUAL(OUString("Jan-13"), aRowLabels[3]); + CPPUNIT_ASSERT_EQUAL(OUString("Feb-13"), aRowLabels[4]); + CPPUNIT_ASSERT_EQUAL(OUString("Mar-13"), aRowLabels[5]); + CPPUNIT_ASSERT_EQUAL(OUString("Apr-13"), aRowLabels[6]); + CPPUNIT_ASSERT_EQUAL(OUString("May-13"), aRowLabels[7]); + CPPUNIT_ASSERT_EQUAL(OUString("Jun-13"), aRowLabels[8]); + CPPUNIT_ASSERT_EQUAL(OUString("Jul-13"), aRowLabels[9]); + CPPUNIT_ASSERT_EQUAL(OUString("Aug-13"), aRowLabels[10]); + CPPUNIT_ASSERT_EQUAL(OUString("Sep-13"), aRowLabels[11]); + CPPUNIT_ASSERT_EQUAL(OUString("Oct-13"), aRowLabels[12]); + CPPUNIT_ASSERT_EQUAL(OUString("Nov-13"), aRowLabels[13]); + CPPUNIT_ASSERT_EQUAL(OUString("Dec-13"), aRowLabels[14]); + CPPUNIT_ASSERT_EQUAL(OUString("Jan-14"), aRowLabels[15]); +} + +void Chart2ImportTest::testBnc882383() +{ + load("/chart2/qa/extras/data/pptx/", "bnc882383.pptx"); + uno::Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY_THROW); + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + OUString sGradientName; + xPropertySet->getPropertyValue("GradientName") >>= sGradientName; + CPPUNIT_ASSERT(!sGradientName.isEmpty()); +} + +void Chart2ImportTest::testTransparancyGradientValue() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf128732.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + OUString sTranspGradientName; + xPropertySet->getPropertyValue("FillTransparenceGradientName") >>= sTranspGradientName; + CPPUNIT_ASSERT(!sTranspGradientName.isEmpty()); + + awt::Gradient aTransparenceGradient; + uno::Reference< lang::XMultiServiceFactory > xFact(xChartDoc, uno::UNO_QUERY); + CPPUNIT_ASSERT(xFact.is()); + uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY); + uno::Any rTransparenceValue = xTransparenceGradient->getByName(sTranspGradientName); + CPPUNIT_ASSERT(rTransparenceValue >>= aTransparenceGradient); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3355443), aTransparenceGradient.EndColor); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5000268), aTransparenceGradient.StartColor); +} + +void Chart2ImportTest::testSimpleStrictXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "strict_chart.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT(xDataSeries.is()); + +} + +void Chart2ImportTest::testDelayedCellImport() +{ + load("/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + Reference< chart2::data::XDataSequence > xDataSeq = + getDataSequenceFromDocByRole(xChartDoc, "values-x"); + + OUString aRange = xDataSeq->getSourceRangeRepresentation(); + CPPUNIT_ASSERT_EQUAL(OUString("$Sheet2.$C$5:$C$9"), aRange); +} + +void Chart2ImportTest::testFlatODSStackedColumnChart() +{ + load("/chart2/qa/extras/data/fods/", "stacked-column-chart.fods"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xChartType = getChartTypeFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xChartType.is()); + + Reference xDSCont(xChartType, UNO_QUERY); + CPPUNIT_ASSERT(xDSCont.is()); + Sequence > aSeriesSeq = xDSCont->getDataSeries(); + + // The stacked column chart should consist of 5 data series. + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aSeriesSeq.getLength()); +} + +void Chart2ImportTest::testFdo78080() +{ + load("/chart2/qa/extras/data/xlsx/", "fdo78080.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT(!xTitle.is()); +} + +void Chart2ImportTest::testTdf86624() +{ + load("/chart2/qa/extras/data/ods/", "tdf86624.ods"); + uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent); + uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY); + uno::Reference xLegend = xChartDoc->getLegend(); + awt::Point aPos = xLegend->getPosition(); + CPPUNIT_ASSERT(aPos.X > 5000); // real value for me is above 8000 but before bug fix is below 1000 + CPPUNIT_ASSERT(aPos.Y > 4000); // real value for ms is above 7000 +} + +void Chart2ImportTest::testTdf105517() +{ + load("/chart2/qa/extras/data/pptx/", "tdf105517.pptx"); + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xCoordContainer(xChartDoc->getFirstDiagram(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xCoordContainer.is()); + Reference xChartTypeContainer(xCoordContainer->getCoordinateSystems()[0], uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartTypeContainer.is()); + Reference xDSContainer(xChartTypeContainer->getChartTypes()[0], uno::UNO_QUERY); + CPPUNIT_ASSERT(xDSContainer.is()); + Reference xPropSet1(xDSContainer->getDataSeries()[0], uno::UNO_QUERY); + CPPUNIT_ASSERT(xPropSet1.is()); + + long lineColor; + xPropSet1->getPropertyValue("Color") >>= lineColor; + // incorrect line color was 0x4a7ebb due to not handling themeOverride + CPPUNIT_ASSERT_EQUAL(long(0xeaa700), lineColor); + + Reference xPropSet2(xDSContainer->getDataSeries()[1], uno::UNO_QUERY); + CPPUNIT_ASSERT(xPropSet2.is()); + + xPropSet2->getPropertyValue("Color") >>= lineColor; + // incorrect line color was 0x98b855 + CPPUNIT_ASSERT_EQUAL(long(0x1e69a8), lineColor); +} + +void Chart2ImportTest::testTdf106217() +{ + load("/chart2/qa/extras/data/pptx/", "tdf106217.pptx"); + uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0, 0); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xCircle(xDrawPage->getByIndex(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xCircle.is()); + + uno::Reference xNamedShape(xCircle, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Oval 1"), xNamedShape->getName()); + + awt::Point aPosition = xCircle->getPosition(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(6870), aPosition.X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(7261), aPosition.Y); + awt::Size aSize = xCircle->getSize(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2701), aSize.Width); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2700), aSize.Height); +} + +void Chart2ImportTest::testTdf108021() +{ + // Tdf108021 : To check TextBreak value is true. + load("/chart2/qa/extras/data/ods/", "tdf108021.ods"); + uno::Reference< chart::XDiagram > mxDiagram; + uno::Reference< beans::XPropertySet > xAxisProp; + bool bTextBreak = false; + uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + mxDiagram.set(xChartDoc->getDiagram()); + CPPUNIT_ASSERT(mxDiagram.is()); + uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY ); + CPPUNIT_ASSERT(xAxisXSupp.is()); + xAxisProp = xAxisXSupp->getXAxis(); + xAxisProp->getPropertyValue("TextBreak") >>= bTextBreak; + // Expected value of 'TextBreak' is true + CPPUNIT_ASSERT(bTextBreak); +} + +void Chart2ImportTest::testTdf100084() +{ + // The test file was created with IBM Cognos, make sure there is a diagram. + load("/chart2/qa/extras/data/xlsx/", "tdf100084.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY); + CPPUNIT_ASSERT_MESSAGE("There should be a Diagram.", xDiagram.is()); +} + +void Chart2ImportTest::testTdf124817() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf124817.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + uno::Reference xDataSeries; + chart2::Symbol aSymblProp; + + // Check the symbol of data series 1 (marker style none) + xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference xPropSet_0(xDataSeries, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT((xPropSet_0->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.Style == chart2::SymbolStyle_NONE)); + + // Check the symbol of data series 2 (marker style square) + xDataSeries = getDataSeriesFromDoc(xChartDoc, 1); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference xPropSet_1(xDataSeries, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT((xPropSet_1->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.FillColor == static_cast(0xED7D31))); + + // Check the symbol of data series 3 (marker style diagonal cross) + xDataSeries = getDataSeriesFromDoc(xChartDoc, 2); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference xPropSet_2(xDataSeries, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT((xPropSet_2->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.BorderColor == static_cast(0xFF0000))); +} + +void Chart2ImportTest::testTdf126033() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + // Check symbol style and size of data points + chart2::Symbol aSymblProp; + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Symbol") >>= aSymblProp); + CPPUNIT_ASSERT_EQUAL(chart2::SymbolStyle_NONE, aSymblProp.Style); + CPPUNIT_ASSERT_EQUAL(static_cast(176), aSymblProp.Size.Width); + CPPUNIT_ASSERT_EQUAL(static_cast(176), aSymblProp.Size.Height); +} + +void Chart2ImportTest::testTransparentBackground(OUString const & filename) +{ + load("/chart2/qa/extras/data/xlsx/", filename); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + uno::Reference< chart::XChartDocument > xChart2Doc (xChartDoc, uno::UNO_QUERY); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChart2Doc.is()); + + Reference< beans::XPropertySet > xPropSet = xChart2Doc->getArea(); + CPPUNIT_ASSERT_MESSAGE("failed to get Area", xPropSet.is()); + + css::drawing::FillStyle aStyle; + xPropSet -> getPropertyValue("FillStyle") >>= aStyle; + + CPPUNIT_ASSERT_EQUAL_MESSAGE("Background needs to be with solid fill style", css::drawing::FillStyle_SOLID, aStyle); +} +// 2 test methods here so that tearDown() can dispose the document +void Chart2ImportTest::testFdo54361() +{ + testTransparentBackground("fdo54361.xlsx"); +} +void Chart2ImportTest::testFdo54361_1() +{ + testTransparentBackground("fdo54361-1.xlsx"); +} + +void Chart2ImportTest::testAutoBackgroundXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "chart-auto-background.xlsx"); + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + // "Automatic" chart background fill in xlsx should be loaded as solid white. + Reference xPropSet = xChartDoc->getPageBackground(); + CPPUNIT_ASSERT(xPropSet.is()); + drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get(); + sal_Int32 nColor = xPropSet->getPropertyValue("FillColor").get(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid fill.", + drawing::FillStyle_SOLID, eStyle); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid white.", + sal_Int32(0x00FFFFFF), sal_Int32(nColor & 0x00FFFFFF)); // highest 2 bytes are transparency which we ignore here. +} + +void Chart2ImportTest::testAutoChartAreaBorderPropXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "chart-area-style-border.xlsx"); + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + // Test "Automatic" chartarea border style/color/width. + Reference xPropSet = xChartDoc->getPageBackground(); + CPPUNIT_ASSERT(xPropSet.is()); + drawing::LineStyle eStyle = xPropSet->getPropertyValue("LineStyle").get(); + sal_Int32 nColor = xPropSet->getPropertyValue("LineColor").get(); + sal_Int32 nWidth = xPropSet->getPropertyValue("LineWidth").get(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border should be loaded as solid style.", + drawing::LineStyle_SOLID, eStyle); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border color should be loaded as light gray.", + sal_Int32(0xD9D9D9), nColor); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border width should be loaded as 0.75 pt (~0.026 cm)", + sal_Int32(26), nWidth); +} + +void Chart2ImportTest::testChartAreaStyleBackgroundXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "chart-area-style-background.xlsx"); + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + // "Automatic" chart background fill in xlsx should be loaded as solid white. + Reference xPropSet = xChartDoc->getPageBackground(); + CPPUNIT_ASSERT(xPropSet.is()); + drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get(); + sal_Int32 nColor = xPropSet->getPropertyValue("FillColor").get(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid fill.", + drawing::FillStyle_SOLID, eStyle); + CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid white.", + sal_Int32(0), nColor); +} + +void Chart2ImportTest::testChartHatchFillXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "chart-hatch-fill.xlsx"); + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + // Check the chart background FillStyle is HATCH + Reference xPropSet = xChartDoc->getPageBackground(); + CPPUNIT_ASSERT(xPropSet.is()); + drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get(); + + CPPUNIT_ASSERT_EQUAL_MESSAGE("Chart background fill in this xlsx should be loaded as hatch fill.", + drawing::FillStyle_HATCH, eStyle); + + // Check the FillBackground of chart background + bool bBackgroundFill = false; + xPropSet->getPropertyValue("FillBackground") >>= bBackgroundFill; + CPPUNIT_ASSERT(bBackgroundFill); + + sal_Int32 nBackgroundColor; + xPropSet->getPropertyValue("FillColor") >>= nBackgroundColor; + CPPUNIT_ASSERT_EQUAL(static_cast(0xFFFFFF), nBackgroundColor); + + // Check the datapoint has HatchName value + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); + OUString sHatchName; + xPropertySet->getPropertyValue("HatchName") >>= sHatchName; + CPPUNIT_ASSERT(!sHatchName.isEmpty()); + + // Check the FillBackground of datapoint + bool bBackgroundFillofDatapoint = false; + xPropertySet->getPropertyValue("FillBackground") >>= bBackgroundFillofDatapoint; + CPPUNIT_ASSERT(bBackgroundFillofDatapoint); + + sal_Int32 nBackgroundColorofDatapoint; + xPropertySet->getPropertyValue("FillColor") >>= nBackgroundColorofDatapoint; + CPPUNIT_ASSERT_EQUAL(static_cast(0x00B050), nBackgroundColorofDatapoint); +} + +void Chart2ImportTest::testAxisTextRotationXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "axis-label-rotation.xlsx"); + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xYAxis.is()); + + Reference xPS(xYAxis, uno::UNO_QUERY_THROW); + double nRotation = 0; + bool bSuccess = xPS->getPropertyValue("TextRotation") >>= nRotation; + + CPPUNIT_ASSERT(bSuccess); + CPPUNIT_ASSERT_DOUBLES_EQUAL(90, nRotation, 1e-10); +} + +/* TODO : temporarily disabled. +void Chart2ImportTest::testTextCanOverlapXLSX() +{ + // fdo#84647 : To check textoverlap value is imported correctly. + load("/chart2/qa/extras/data/xlsx/", "chart-text-can-overlap.xlsx"); + uno::Reference< chart::XDiagram > mxDiagram; + uno::Reference< beans::XPropertySet > xAxisProp; + bool bTextCanOverlap = false; + uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + mxDiagram.set(xChartDoc->getDiagram()); + CPPUNIT_ASSERT(mxDiagram.is()); + uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY ); + CPPUNIT_ASSERT(xAxisXSupp.is()); + xAxisProp = xAxisXSupp->getXAxis(); + xAxisProp->getPropertyValue("TextCanOverlap") >>= bTextCanOverlap; + // Expected value of 'TextCanOverlap' is true + CPPUNIT_ASSERT(bTextCanOverlap); +} +*/ + +void Chart2ImportTest::testTextBreakXLSX() +{ + // tdf#122091: To check textbreak value is true in case of 0° degree of Axis label rotation. + load("/chart2/qa/extras/data/xlsx/", "chart_label_text_break.xlsx"); + uno::Reference< chart::XDiagram > mxDiagram; + uno::Reference< beans::XPropertySet > xAxisProp; + bool textBreak = false; + uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + CPPUNIT_ASSERT(xChartDoc.is()); + mxDiagram.set(xChartDoc->getDiagram()); + CPPUNIT_ASSERT(mxDiagram.is()); + uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY ); + CPPUNIT_ASSERT(xAxisXSupp.is()); + xAxisProp = xAxisXSupp->getXAxis(); + xAxisProp->getPropertyValue("TextBreak") >>= textBreak; + // Expected value of 'TextBreak' is true + CPPUNIT_ASSERT(textBreak); +} + +void Chart2ImportTest::testNumberFormatsXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "number-formats.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference xPropertySet; + chart2::DataPointLabel aLabel; + sal_Int32 nNumberFormat; + bool bLinkNumberFormatToSource = false; + const sal_Int32 nChartDataNumberFormat = getNumberFormat( + xChartDoc, "_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"??_);_(@_)"); + + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + bool bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(false, bSuccess); + bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + + xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(false, bSuccess); + bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + + xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(false, bSuccess); + bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); +} + +void Chart2ImportTest::testNumberFormatsDOCX() +{ + load("/chart2/qa/extras/data/docx/", "tdf132174.docx"); + { + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + css::uno::Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + uno::Reference xPropertySet(xDataSeries, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT(xPropertySet.is()); + + sal_Int32 nNumberFormat; + bool bLinkNumberFormatToSource = true; + const sal_Int32 nChartDataNumberFormat = getNumberFormat(xChartDoc, "0%"); + xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; + // LinkNumberFormatToSource should be set to false even if the original OOXML contain a true value, + // because the inner data table of charts have no own number format! + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !bLinkNumberFormatToSource); + } + + load("/chart2/qa/extras/data/docx/", "tdf136650.docx"); + { + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + css::uno::Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropertySet(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); + + sal_Int32 nNumberFormat; + bool bLinkNumberFormatToSource = true; + const sal_Int32 nChartDataNumberFormat = getNumberFormat(xChartDoc, "0%"); + xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; + // LinkNumberFormatToSource should be set to false even if the original OOXML file contain a true value, + // because the inner data table of charts have no own number format! + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !bLinkNumberFormatToSource); + } +} + +void Chart2ImportTest::testPercentageNumberFormatsDOCX() +{ + load("/chart2/qa/extras/data/docx/", "tdf133632.docx"); + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + css::uno::Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + uno::Reference xPropertySet(xDataSeries, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT(xPropertySet.is()); + + bool bLinkNumberFormatToSource = false; + chart2::DataPointLabel aLabel; + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + bool bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); +} + +void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + OUString aTitle = getTitleString(xTitled); + CPPUNIT_ASSERT_MESSAGE("autoTitleDel default value is false in MSO 2007 documents", + !aTitle.isEmpty()); +} + +void Chart2ImportTest::testAutoTitleDelDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "autotitledel_2013.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + uno::Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT_MESSAGE("autoTitleDel default value is true in the OOXML spec", + !xTitle.is()); +} + +void Chart2ImportTest::testDispBlanksAsDefaultValue2007XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY); + CPPUNIT_ASSERT(xDiagram.is()); + uno::Any aAny = xDiagram->getPropertyValue("MissingValueTreatment"); + sal_Int32 nMissingValueTreatment = -2; + CPPUNIT_ASSERT(aAny >>= nMissingValueTreatment); + CPPUNIT_ASSERT_EQUAL(chart::MissingValueTreatment::LEAVE_GAP, nMissingValueTreatment); +} + +void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2013.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY); + CPPUNIT_ASSERT(xDiagram.is()); + uno::Any aAny = xDiagram->getPropertyValue("MissingValueTreatment"); + sal_Int32 nMissingValueTreatment = -2; + CPPUNIT_ASSERT(aAny >>= nMissingValueTreatment); + CPPUNIT_ASSERT_EQUAL(chart::MissingValueTreatment::USE_ZERO, nMissingValueTreatment); +} + +void Chart2ImportTest::testSmoothDefaultValue2007XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "smoothed_series2007.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT(xChartType.is()); + + Reference< beans::XPropertySet > xPropSet( xChartType, UNO_QUERY ); + CPPUNIT_ASSERT(xPropSet.is()); + + chart2::CurveStyle eCurveStyle; + xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle; + CPPUNIT_ASSERT_EQUAL(chart2::CurveStyle_LINES, eCurveStyle); +} + +void Chart2ImportTest::testSmoothDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "smoothed_series.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT(xChartType.is()); + + Reference< beans::XPropertySet > xPropSet( xChartType, UNO_QUERY ); + CPPUNIT_ASSERT(xPropSet.is()); + + chart2::CurveStyle eCurveStyle; + xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle; + CPPUNIT_ASSERT(eCurveStyle != chart2::CurveStyle_LINES); +} + +void Chart2ImportTest::testTrendlineDefaultValue2007XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "trendline2007.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xRegressionCurveContainer(xDataSeries, UNO_QUERY_THROW); + Sequence< Reference > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xRegressionCurveSequence.getLength()); + + Reference xCurve = xRegressionCurveSequence[0]; + + Reference xPropSet(xCurve->getEquationProperties(), uno::UNO_SET_THROW); + uno::Any aAny = xPropSet->getPropertyValue("ShowEquation"); + bool bShowEquation = true; + CPPUNIT_ASSERT(aAny >>= bShowEquation); + CPPUNIT_ASSERT(!bShowEquation); + + aAny = xPropSet->getPropertyValue("ShowCorrelationCoefficient"); + bool bShowCorrelation = true; + CPPUNIT_ASSERT(aAny >>= bShowCorrelation); + CPPUNIT_ASSERT(!bShowCorrelation); +} + +void Chart2ImportTest::testTrendlineDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "trendline.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xRegressionCurveContainer(xDataSeries, UNO_QUERY_THROW); + Sequence< Reference > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xRegressionCurveSequence.getLength()); + + Reference xCurve = xRegressionCurveSequence[0]; + + Reference xPropSet(xCurve->getEquationProperties(), uno::UNO_SET_THROW); + uno::Any aAny = xPropSet->getPropertyValue("ShowEquation"); + bool bShowEquation = false; + CPPUNIT_ASSERT(aAny >>= bShowEquation); + CPPUNIT_ASSERT(bShowEquation); + + aAny = xPropSet->getPropertyValue("ShowCorrelationCoefficient"); + bool bShowCorrelation = false; + CPPUNIT_ASSERT(aAny >>= bShowCorrelation); + CPPUNIT_ASSERT(bShowCorrelation); +} + +void Chart2ImportTest::testVaryColorDefaultValues2007XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "vary_color2007.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropSet(xDataSeries, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("VaryColorsByPoint"); + bool bVaryColor = true; + CPPUNIT_ASSERT(aAny >>= bVaryColor); + CPPUNIT_ASSERT(!bVaryColor); +} + +void Chart2ImportTest::testVaryColorDefaultValues2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "vary_color.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xPropSet(xDataSeries, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("VaryColorsByPoint"); + bool bVaryColor = false; + CPPUNIT_ASSERT(aAny >>= bVaryColor); + CPPUNIT_ASSERT(bVaryColor); +} + +void Chart2ImportTest::testPlotVisOnlyDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "plotVisOnly.xlsx"); + uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + Reference xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("IncludeHiddenCells"); + CPPUNIT_ASSERT(aAny.hasValue()); + bool bShowHiddenValues = true; + CPPUNIT_ASSERT(aAny >>= bShowHiddenValues); + CPPUNIT_ASSERT(!bShowHiddenValues); +} + +void Chart2ImportTest::testRAngAxDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "rAngAx.xlsx"); + uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + Reference xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("RightAngledAxes"); + CPPUNIT_ASSERT(aAny.hasValue()); + bool bRightAngleAxes = false; + CPPUNIT_ASSERT(aAny >>= bRightAngleAxes); + CPPUNIT_ASSERT(bRightAngleAxes); +} + +void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "majorTickMark.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + Reference xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xXAxis.is()); + Reference xPropSet(xXAxis, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("MajorTickmarks"); + sal_Int32 nMajorTickmarks = chart2::TickmarkStyle::NONE; + CPPUNIT_ASSERT(aAny.hasValue()); + CPPUNIT_ASSERT(aAny >>= nMajorTickmarks); + CPPUNIT_ASSERT_EQUAL(chart2::TickmarkStyle::INNER | chart2::TickmarkStyle::OUTER, nMajorTickmarks); +} + +void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "minorTickMark.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + Reference xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xXAxis.is()); + Reference xPropSet(xXAxis, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("MinorTickmarks"); + sal_Int32 nMajorTickmarks = chart2::TickmarkStyle::NONE; + CPPUNIT_ASSERT(aAny.hasValue()); + CPPUNIT_ASSERT(aAny >>= nMajorTickmarks); + CPPUNIT_ASSERT_EQUAL(chart2::TickmarkStyle::INNER | chart2::TickmarkStyle::OUTER, nMajorTickmarks); +} + +void Chart2ImportTest::testAxisTitleDefaultRotationXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "axis_title_default_rotation.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); + CPPUNIT_ASSERT(xYAxis.is()); + Reference xTitled(xYAxis, uno::UNO_QUERY_THROW); + Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT(xTitle.is()); + Reference xPropSet(xTitle, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("TextRotation"); + double nRotation = 0; + CPPUNIT_ASSERT(aAny >>= nRotation); + CPPUNIT_ASSERT_EQUAL(90.0, nRotation); +} + +void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "secondary_axis_title_default_rotation.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 1); + CPPUNIT_ASSERT(xYAxis.is()); + Reference xTitled(xYAxis, uno::UNO_QUERY_THROW); + Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT(xTitle.is()); + Reference xPropSet(xTitle, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("TextRotation"); + double nRotation = 0; + CPPUNIT_ASSERT(aAny >>= nRotation); + CPPUNIT_ASSERT_EQUAL(90.0, nRotation); +} + +void Chart2ImportTest::testAxisTitleRotationXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "axis_title_rotated.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + { + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); + CPPUNIT_ASSERT(xYAxis.is()); + Reference xTitled(xYAxis, uno::UNO_QUERY_THROW); + Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT(xTitle.is()); + Reference xPropSet(xTitle, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("TextRotation"); + double nRotation = 0; + CPPUNIT_ASSERT(aAny >>= nRotation); + CPPUNIT_ASSERT_EQUAL(340.0, nRotation); + } + { + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 1); + CPPUNIT_ASSERT(xYAxis.is()); + Reference xTitled(xYAxis, uno::UNO_QUERY_THROW); + Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT(xTitle.is()); + Reference xPropSet(xTitle, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("TextRotation"); + double nRotation = 0; + CPPUNIT_ASSERT(aAny >>= nRotation); + CPPUNIT_ASSERT_EQUAL(270.0, nRotation); + } + +} + +void Chart2ImportTest::testAxisTitlePositionDOCX() +{ + load("/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx"); + uno::Reference< chart::XDiagram > mxDiagram; + uno::Reference< drawing::XShape > xAxisTitle; + uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + mxDiagram.set(xChartDoc->getDiagram()); + CPPUNIT_ASSERT(mxDiagram.is()); + // test X Axis title position + uno::Reference< chart::XAxisXSupplier > xAxisXSupp(mxDiagram, uno::UNO_QUERY); + CPPUNIT_ASSERT(xAxisXSupp.is()); + + xAxisTitle = xAxisXSupp->getXAxisTitle(); + CPPUNIT_ASSERT(xAxisTitle.is()); + + awt::Point aPos = xAxisTitle->getPosition(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(10640, aPos.X, 2); + CPPUNIT_ASSERT_DOUBLES_EQUAL(7157, aPos.Y, 2); + + // test Y Axis title position + uno::Reference< chart::XAxisYSupplier > xAxisYSupp(mxDiagram, uno::UNO_QUERY); + CPPUNIT_ASSERT(xAxisYSupp.is()); + + xAxisTitle = xAxisYSupp->getYAxisTitle(); + CPPUNIT_ASSERT(xAxisTitle.is()); + + aPos = xAxisTitle->getPosition(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(387, aPos.X, 2); + CPPUNIT_ASSERT_DOUBLES_EQUAL(6378, aPos.Y, 300); +} + +void Chart2ImportTest::testCombinedChartAttachedAxisXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testCombinedChartAxis.xlsx"); + Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + // First series + Reference xSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xSeries.is()); + + Reference xPropSet(xSeries, uno::UNO_QUERY_THROW); + sal_Int32 nAxisIndex = -1; + // First series (column chart) should be attached to secondary axis! + uno::Any aAny = xPropSet->getPropertyValue("AttachedAxisIndex"); + CPPUNIT_ASSERT(aAny >>= nAxisIndex); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nAxisIndex); + + // Second series + xSeries = getDataSeriesFromDoc(xChartDoc, 0, 1); + CPPUNIT_ASSERT(xSeries.is()); + + xPropSet.set(xSeries, uno::UNO_QUERY_THROW); + // Second series (line chart) should be attached to primary axis! + aAny = xPropSet->getPropertyValue("AttachedAxisIndex"); + CPPUNIT_ASSERT(aAny >>= nAxisIndex); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAxisIndex); +} + +void Chart2ImportTest::testInternalDataProvider() { + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/odp/", "chart.odp"), uno::UNO_QUERY_THROW); + const uno::Reference< chart2::data::XDataProvider >& rxDataProvider = xChartDoc->getDataProvider(); + + // Parse 42 array + Reference xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{42;42;42;42}"); + Sequence xSequence = xDataSeq->getData(); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[0]); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[1]); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[2]); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[3]); + + // Parse empty first and last + xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{\"\";42;42;\"\"}"); + xSequence = xDataSeq->getData(); + CPPUNIT_ASSERT( std::isnan( *static_cast(xSequence[0].getValue()))); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[1]); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[2]); + CPPUNIT_ASSERT( std::isnan( *static_cast(xSequence[3].getValue()))); + + // Parse empty middle + xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{42;\"\";\"\";42}"); + xSequence = xDataSeq->getData(); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[0]); + CPPUNIT_ASSERT( std::isnan( *static_cast(xSequence[1].getValue())) ); + CPPUNIT_ASSERT( std::isnan( *static_cast(xSequence[2].getValue())) ); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[3]); + + // Parse mixed types, numeric only role + xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{42;\"hello\";0;\"world\"}"); + xSequence = xDataSeq->getData(); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[0]); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)), xSequence[1]); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)), xSequence[2]); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)), xSequence[3]); + + // Parse mixed types, mixed role + xDataSeq = rxDataProvider->createDataSequenceByValueArray("categories", "{42;\"hello\";0;\"world\"}"); + xSequence = xDataSeq->getData(); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 1 42")), xSequence[0]); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 2 hello")), xSequence[1]); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 3 0")), xSequence[2]); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 4 world")), xSequence[3]); +} + +void Chart2ImportTest::testTdf90510() +{ + load("/chart2/qa/extras/data/xls/", "piechart_outside.xls"); + uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW ); + Reference xPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW ); + uno::Any aAny = xPropSet->getPropertyValue( "LabelPlacement" ); + CPPUNIT_ASSERT( aAny.hasValue() ); + sal_Int32 nLabelPlacement = 0; + CPPUNIT_ASSERT( aAny >>= nLabelPlacement ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be placed outside", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement ); +} + +void Chart2ImportTest::testTdf109858() +{ + load("/chart2/qa/extras/data/xlsx/", "piechart_outside.xlsx"); + uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW ); + + // test data point labels position + Reference xDataPointPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW ); + uno::Any aAny = xDataPointPropSet->getPropertyValue( "LabelPlacement" ); + CPPUNIT_ASSERT( aAny.hasValue() ); + sal_Int32 nLabelPlacement = 0; + CPPUNIT_ASSERT( aAny >>= nLabelPlacement ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data point label should be placed bestFit", chart::DataLabelPlacement::AVOID_OVERLAP, nLabelPlacement ); + + // test data series label position + Reference xSeriesPropSet(xChart1Doc->getDiagram()->getDataRowProperties(0), uno::UNO_SET_THROW); + aAny = xSeriesPropSet->getPropertyValue( "LabelPlacement" ); + CPPUNIT_ASSERT( aAny >>= nLabelPlacement ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data series labels should be placed outside", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement ); +} + +void Chart2ImportTest::testTdf130105() +{ + load("/chart2/qa/extras/data/xlsx/", "barchart_outend.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + uno::Any aAny = xPropertySet->getPropertyValue("LabelPlacement"); + CPPUNIT_ASSERT(aAny.hasValue()); + sal_Int32 nLabelPlacement = 0; + CPPUNIT_ASSERT(aAny >>= nLabelPlacement); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Data label should be placed outend", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement); +} + +void Chart2ImportTest::testTdf111173() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf111173.xlsx"); + uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW ); +} + +void Chart2ImportTest::testTdf122226() +{ + load( "/chart2/qa/extras/data/docx/", "testTdf122226.docx" ); + uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT( xChartDoc.is() ); + + css::uno::Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + CPPUNIT_ASSERT(xPropertySet.is()); + + uno::Any aAny = xPropertySet->getPropertyValue( "LabelSeparator" ); + CPPUNIT_ASSERT( aAny.hasValue() ); + OUString nLabelSeparator; + CPPUNIT_ASSERT( aAny >>= nLabelSeparator ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be separated into new lines", OUString("\n"), nLabelSeparator ); +} + +void Chart2ImportTest::testTdf115107() +{ + load("/chart2/qa/extras/data/pptx/", "tdf115107.pptx"); + + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + float nFontSize; + sal_Int64 nFontColor; + sal_Int32 nCharUnderline; + uno::Reference xPropertySet; + uno::Sequence> aFields; + + // 1 + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(2), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("90.0 = "), aFields[0]->getString()); + aFields[0]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[0]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(18), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xed7d31), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("90"), aFields[1]->getString()); + + // 2 + xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(8), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), aFields[0]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" : "), aFields[1]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME, aFields[2]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("B"), aFields[2]->getString()); + aFields[2]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[2]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(16), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xed7d31), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE, aFields[3]->getFieldType()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[4]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Multi"), aFields[4]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[5]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("line"), aFields[5]->getString()); + aFields[5]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[5]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(13), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xbf9000), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE, aFields[6]->getFieldType()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[7]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Abc"), aFields[7]->getString()); + aFields[7]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[7]->getPropertyValue("CharColor") >>= nFontColor; + aFields[7]->getPropertyValue("CharUnderline") >>= nCharUnderline; + CPPUNIT_ASSERT_EQUAL(static_cast(12), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xa9d18e), nFontColor); + CPPUNIT_ASSERT_EQUAL(static_cast(1), nCharUnderline); + + // 3 + xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(1), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("DATA"), aFields[0]->getString()); + + // 4 + xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(2), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF, aFields[0]->getFieldType()); + //CPPUNIT_ASSERT_EQUAL(OUString("70"), aFields[0]->getString()); TODO: Not implemented yet + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" getString()); +} + +void Chart2ImportTest::testTdf115107_2() +{ + load("/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx"); + + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + float nFontSize; + sal_Int64 nFontColor; + uno::Reference xPropertySet; + uno::Sequence> aFields; + + // First series + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(3), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("4.3"), aFields[0]->getString()); + aFields[0]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[0]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(18), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xc00000), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[2]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString()); + + // Second series + xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1); + CPPUNIT_ASSERT(xDataSeries.is()); + + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields; + CPPUNIT_ASSERT_EQUAL(static_cast(3), aFields.getLength()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[0]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("2"), aFields[0]->getString()); + aFields[0]->getPropertyValue("CharHeight") >>= nFontSize; + aFields[0]->getPropertyValue("CharColor") >>= nFontColor; + CPPUNIT_ASSERT_EQUAL(static_cast(18), nFontSize); + CPPUNIT_ASSERT_EQUAL(static_cast(0xffd966), nFontColor); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString()); + + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[2]->getFieldType()); + CPPUNIT_ASSERT_EQUAL(OUString("Line"), aFields[2]->getString()); + +} + +void Chart2ImportTest::testTdf116163() +{ + load("/chart2/qa/extras/data/pptx/", "tdf116163.pptx"); + + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xHAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xHAxis.is()); + + chart2::ScaleData aScaleData = xHAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + + Reference xLabeledDataSequence = aScaleData.Categories; + CPPUNIT_ASSERT(xLabeledDataSequence.is()); + + Reference xDataSequence = xLabeledDataSequence->getValues(); + CPPUNIT_ASSERT(xDataSequence.is()); + + Reference xTextualDataSequence(xDataSequence, uno::UNO_QUERY); + CPPUNIT_ASSERT(xTextualDataSequence.is()); + + std::vector aCategories; + Sequence aTextData(xTextualDataSequence->getTextualData()); + ::std::copy(aTextData.begin(), aTextData.end(), + ::std::back_inserter(aCategories)); + + CPPUNIT_ASSERT_EQUAL(OUString("Aaaa"), aCategories[0]); + CPPUNIT_ASSERT_EQUAL(OUString("Bbbbbbb"), aCategories[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Ccc"), aCategories[2]); + CPPUNIT_ASSERT_EQUAL(OUString("Ddddddddddddd"), aCategories[3]); + + // Check visible text + + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + const OUString sXAxisName = "CID/D=0:CS=0:Axis=0,0"; + uno::Reference xXAxis = getShapeByName(xShapes, sXAxisName, + // Axis occurs twice in chart xshape representation so need to get the one related to labels + [](const uno::Reference& rXShape) -> bool + { + uno::Reference xAxisShapes(rXShape, uno::UNO_QUERY); + CPPUNIT_ASSERT(xAxisShapes.is()); + uno::Reference xChildShape(xAxisShapes->getByIndex(0), uno::UNO_QUERY); + uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor(xChildShape, uno::UNO_QUERY_THROW); + return (xShapeDescriptor->getShapeType() == "com.sun.star.drawing.TextShape"); + }); + CPPUNIT_ASSERT(xXAxis.is()); + + uno::Reference xIndexAccess(xXAxis, UNO_QUERY_THROW); + + // Check text + uno::Reference xLabel0(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Aaaa"), xLabel0->getString()); + uno::Reference xLabel1(xIndexAccess->getByIndex(1), uno::UNO_QUERY); + // If there is space for 3 chars only then don't show "..." + CPPUNIT_ASSERT_EQUAL(OUString("Bbb"), xLabel1->getString()); + uno::Reference xLabel2(xIndexAccess->getByIndex(2), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Ccc"), xLabel2->getString()); + uno::Reference xLabel3(xIndexAccess->getByIndex(3), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Dddd..."), xLabel3->getString()); +} + +void Chart2ImportTest::testTdf48041() +{ + load("/chart2/qa/extras/data/pptx/", "tdf48041.pptx"); + + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); + CPPUNIT_ASSERT(xYAxis.is()); + + chart2::ScaleData aScaleData = xYAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Scaling.is()); + + // Check visible text + uno::Reference xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapes.is()); + + const OUString sYAxisName = "CID/D=0:CS=0:Axis=1,0"; // Y Axis + uno::Reference xYAxisShape = getShapeByName(xShapes, sYAxisName, + // Axis occurs twice in chart xshape representation so need to get the one related to labels + [](const uno::Reference& rXShape) -> bool + { + uno::Reference xAxisShapes(rXShape, uno::UNO_QUERY); + CPPUNIT_ASSERT(xAxisShapes.is()); + uno::Reference xChildShape(xAxisShapes->getByIndex(0), uno::UNO_QUERY); + uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor(xChildShape, uno::UNO_QUERY_THROW); + return (xShapeDescriptor->getShapeType() == "com.sun.star.drawing.TextShape"); + }); + CPPUNIT_ASSERT(xYAxisShape.is()); + + // Check label count + uno::Reference xIndexAccess(xYAxisShape, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(static_cast(6), xIndexAccess->getCount()); + + // Check text + uno::Reference xLabel0(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("0"), xLabel0->getString()); + uno::Reference xLabel1(xIndexAccess->getByIndex(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("1"), xLabel1->getString()); + uno::Reference xLabel2(xIndexAccess->getByIndex(2), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("2"), xLabel2->getString()); + uno::Reference xLabel3(xIndexAccess->getByIndex(3), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("3"), xLabel3->getString()); + uno::Reference xLabel4(xIndexAccess->getByIndex(4), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("4"), xLabel4->getString()); + uno::Reference xLabel5(xIndexAccess->getByIndex(5), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("5"), xLabel5->getString()); +} + +void Chart2ImportTest::testTdf121205() +{ + load("/chart2/qa/extras/data/pptx/", "tdf121205.pptx"); + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + + uno::Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_MESSAGE("chart doc does not have title", xTitled.is()); + OUString aTitle = getTitleString(xTitled); + + // We expect title split in 3 lines + CPPUNIT_ASSERT_EQUAL(OUString("Firstline\nSecondline\nThirdline"), aTitle); +} + +void Chart2ImportTest::testTdf114179() +{ + load( "/chart2/qa/extras/data/docx/", "testTdf114179.docx" ); + uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT( xChartDoc.is() ); + css::uno::Reference xDiagram; + xDiagram.set( xChartDoc->getFirstDiagram() ); + CPPUNIT_ASSERT_MESSAGE( "There is a Diagram." , xDiagram.is() ); + awt::Size aPage = getPageSize( xChartDoc ); + awt::Size aSize = getSize( xDiagram,aPage ); + CPPUNIT_ASSERT( aSize.Width > 0); + CPPUNIT_ASSERT( aSize.Height > 0); +} + +void Chart2ImportTest::testTdf124243() +{ + load("/chart2/qa/extras/data/docx/", "tdf124243.docx"); + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + Reference xPS(xAxis, uno::UNO_QUERY_THROW); + bool bShow = true; + // test X Axis is not visible. + bool bSuccess = xPS->getPropertyValue("Show") >>= bShow; + CPPUNIT_ASSERT(bSuccess); + CPPUNIT_ASSERT(!bShow); +} + +void Chart2ImportTest::testTdf127393() +{ + load("/chart2/qa/extras/data/pptx/", "tdf127393.pptx"); + + // 1st chart + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData1 = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData1.Categories.is()); + CPPUNIT_ASSERT(aScaleData1.ShiftedCategoryPosition); + + // 2nd chart + xChartDoc.set(getChartDocFromDrawImpress(1, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xAxis.set(getAxisFromDoc(xChartDoc, 0, 0, 0)); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData2 = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData2.Categories.is()); + CPPUNIT_ASSERT(!aScaleData2.ShiftedCategoryPosition); +} + +void Chart2ImportTest::testTdf128733() +{ + load("/chart2/qa/extras/data/odt/", "tdf128733.odt"); + + Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + // test secondary X axis ShiftedCategoryPosition value + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 1); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition); +} + +void Chart2ImportTest::testTdf128432() +{ + load("/chart2/qa/extras/data/ods/", "tdf128432.ods"); + + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition); +} + +void Chart2ImportTest::testTdf128627() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf128627.xlsx"); + // Test ShiftedCategoryPosition for Radar Chart + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + CPPUNIT_ASSERT(!aScaleData.ShiftedCategoryPosition); +} + +void Chart2ImportTest::testTdf128634() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf128634.xlsx"); + // Test ShiftedCategoryPosition for 3D Charts + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition); +} + +void Chart2ImportTest::testTdf130657() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf130657.xlsx"); + // Test ShiftedCategoryPosition for charts which is not contain a "crossbetween" OOXML tag. + uno::Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition); +} + +namespace { + +void checkDataLabelProperties(const Reference& xDataSeries, sal_Int32 nDataPointIndex, bool bValueVisible) +{ + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(nDataPointIndex), uno::UNO_SET_THROW); + chart2::DataPointLabel aLabel; + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(bValueVisible, static_cast(aLabel.ShowNumber)); + CPPUNIT_ASSERT_EQUAL(false, static_cast(aLabel.ShowNumberInPercent)); +} + +} + +void Chart2ImportTest::testDeletedDataLabel() +{ + load("/chart2/qa/extras/data/xlsx/", "deleted_data_labels.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW ); + Reference xDataSeries0 = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries0.is()); + checkDataLabelProperties(xDataSeries0, 0, true); + checkDataLabelProperties(xDataSeries0, 1, false); + checkDataLabelProperties(xDataSeries0, 2, true); + Reference xDataSeries1 = getDataSeriesFromDoc(xChartDoc, 1); + CPPUNIT_ASSERT(xDataSeries1.is()); + checkDataLabelProperties(xDataSeries1, 0, false); + checkDataLabelProperties(xDataSeries1, 1, false); + checkDataLabelProperties(xDataSeries1, 2, false); +} + +void Chart2ImportTest::testDataPointInheritedColorDOCX() +{ + load( "/chart2/qa/extras/data/docx/", "data_point_inherited_color.docx" ); + uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT( xChartDoc.is() ); + css::uno::Reference xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW); + + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + CPPUNIT_ASSERT(xPropertySet.is()); + sal_Int32 nColor = xPropertySet->getPropertyValue("FillColor").get(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(16776960), nColor); +} + +void Chart2ImportTest::testExternalStrRefsXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "external_str_ref.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + chart2::ScaleData aScaleData = xAxis->getScaleData(); + css::uno::Sequence aValues = aScaleData.Categories->getValues()->getData(); + CPPUNIT_ASSERT_EQUAL(OUString("test1"), aValues[0].get()); + CPPUNIT_ASSERT_EQUAL(OUString("test2"), aValues[1].get()); +} + +void Chart2ImportTest::testSourceNumberFormatComplexCategoriesXLS() +{ + load("/chart2/qa/extras/data/xls/", "source_number_format_axis.xls"); + uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW ); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + chart2::ScaleData aScaleData = xAxis->getScaleData(); + sal_Int32 nNumberFormat = aScaleData.Categories->getValues()->getNumberFormatKeyByIndex(-1); + CPPUNIT_ASSERT(nNumberFormat != 0); +} + +void Chart2ImportTest::testSimpleCategoryAxis() +{ + load("/chart2/qa/extras/data/docx/", "testSimpleCategoryAxis.docx"); + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + // Test the internal data. + CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider()); + + Reference xInternalProvider(xChartDoc->getDataProvider(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xInternalProvider.is()); + + Reference xDescAccess(xInternalProvider, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDescAccess.is()); + + // Get the category labels. + Sequence > aCategories = xDescAccess->getComplexRowDescriptions(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aCategories[0].getLength()); + CPPUNIT_ASSERT(aCategories[0][0].endsWith("ria 1")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aCategories[1].getLength()); + CPPUNIT_ASSERT(aCategories[1][0].endsWith("ria 2")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aCategories[2].getLength()); + CPPUNIT_ASSERT(aCategories[2][0].endsWith("ria 3")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aCategories[3].getLength()); + CPPUNIT_ASSERT(aCategories[3][0].endsWith("ria 4")); +} + +void Chart2ImportTest::testMultilevelCategoryAxis() +{ + load("/chart2/qa/extras/data/docx/", "testMultilevelCategoryAxis.docx"); + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + // Test the internal data. + CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider()); + + Reference xInternalProvider(xChartDoc->getDataProvider(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xInternalProvider.is()); + + Reference xDescAccess(xInternalProvider, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDescAccess.is()); + + // Get the complex category labels. + Sequence > aCategories = xDescAccess->getComplexRowDescriptions(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aCategories.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("2011"), aCategories[0][0]); + CPPUNIT_ASSERT_EQUAL(OUString(""), aCategories[1][0]); + CPPUNIT_ASSERT_EQUAL(OUString("2012"), aCategories[2][0]); + CPPUNIT_ASSERT_EQUAL(OUString(""), aCategories[3][0]); + CPPUNIT_ASSERT_EQUAL(OUString("Categoria 1"), aCategories[0][1]); + CPPUNIT_ASSERT_EQUAL(OUString("Categoria 2"), aCategories[1][1]); + CPPUNIT_ASSERT_EQUAL(OUString("Categoria 3"), aCategories[2][1]); + CPPUNIT_ASSERT_EQUAL(OUString("Categoria 4"), aCategories[3][1]); +} + +void Chart2ImportTest::testXaxisValues() +{ + load("/chart2/qa/extras/data/docx/", "tdf124083.docx"); + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + const uno::Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc, "values-x"); + Sequence xSequence = xDataSeq->getData(); + // test X values + CPPUNIT_ASSERT_EQUAL(uno::Any(0.04), xSequence[0]); + CPPUNIT_ASSERT(std::isnan(*static_cast(xSequence[1].getValue()))); + CPPUNIT_ASSERT_EQUAL(uno::Any(0.16), xSequence[2]); + CPPUNIT_ASSERT_EQUAL(uno::Any(0.11), xSequence[3]); + CPPUNIT_ASSERT(std::isnan(*static_cast(xSequence[4].getValue()))); +} + +void Chart2ImportTest::testTdf123504() +{ + load("/chart2/qa/extras/data/ods/", "pie_chart_100_and_0.ods"); + Reference xChartDoc(getChartDocFromSheet(0, mxComponent), + UNO_QUERY_THROW); + + Reference xChartDoc2(xChartDoc, UNO_QUERY_THROW); + Reference xChartType(getChartTypeFromDoc(xChartDoc2, 0), UNO_SET_THROW); + std::vector aDataSeriesYValues = getDataSeriesYValuesFromChartType(xChartType); + CPPUNIT_ASSERT_EQUAL(size_t(1), aDataSeriesYValues.size()); + + Reference xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); + Reference xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); + Reference xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW); + Reference xSeriesSlices(getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=0"), + UNO_SET_THROW); + + Reference xIndexAccess(xSeriesSlices, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + Reference xSlice(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); + + // Check size and position of the only slice in the chart (100%) + // In the regressed state, it used to be 0-sized at position 0,0 + awt::Point aSlicePosition = xSlice->getPosition(); + CPPUNIT_ASSERT_GREATER(sal_Int32(3000), aSlicePosition.X); + CPPUNIT_ASSERT_GREATER(sal_Int32(150), aSlicePosition.Y); + awt::Size aSliceSize = xSlice->getSize(); + CPPUNIT_ASSERT_GREATER(sal_Int32(8500), aSliceSize.Height); + CPPUNIT_ASSERT_GREATER(sal_Int32(8500), aSliceSize.Width); +} + +void Chart2ImportTest::testTdf122765() +{ + // The horizontal position of the slices was wrong. + load("/chart2/qa/extras/data/pptx/", "tdf122765.pptx"); + Reference xChartDoc = getChartDocFromDrawImpress(0, 0); + Reference xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); + Reference xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); + Reference xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW); + Reference xSeriesSlices(getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=0"), + UNO_SET_THROW); + + Reference xIndexAccess(xSeriesSlices, UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(sal_Int32(9), xIndexAccess->getCount()); + Reference xSlice(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); + + // Check position of the first slice, all slices move together, so enough to check only one. + // Wrong position was around 5856. + awt::Point aSlicePosition = xSlice->getPosition(); + CPPUNIT_ASSERT_GREATER(sal_Int32(7000), aSlicePosition.X); +} + +void Chart2ImportTest::testTdf123206CustomLabelField() +{ + // File contains the deprecated "custom-label-field" attribute of the + // "data-point" element. It should be interpreted and stored as a data point + // property. + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/odp/", "tdf123206.odp"), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xDp = xDataSeries->getDataPointByIndex(1); + Sequence> aLabelFields; + CPPUNIT_ASSERT(xDp->getPropertyValue("CustomLabelFields") >>= aLabelFields); + CPPUNIT_ASSERT_EQUAL(static_cast(1), aLabelFields.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Kiskacsa"), aLabelFields[0]->getString()); + +} + +void Chart2ImportTest::testTdf125444PercentageCustomLabel() +{ + load("/chart2/qa/extras/data/pptx/", "tdf125444.pptx"); + + // 1st chart + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference xDp = xDataSeries->getDataPointByIndex(1); + Sequence> aLabelFields; + CPPUNIT_ASSERT(xDp->getPropertyValue("CustomLabelFields") >>= aLabelFields); + // There are three label field: a value label, a newline and a percentage label. We want + // to assert the latter. + CPPUNIT_ASSERT_EQUAL(static_cast(3), aLabelFields.getLength()); + CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType_PERCENTAGE, aLabelFields[2]->getFieldType()); +} + +void Chart2ImportTest::testDataPointLabelCustomPos() +{ + // test CustomLabelPosition on Bar chart + load("/chart2/qa/extras/data/xlsx/", "testDataPointLabelCustomPos.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + CPPUNIT_ASSERT(xPropertySet.is()); + + chart2::RelativePosition aCustomLabelPosition; + xPropertySet->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition; + CPPUNIT_ASSERT_DOUBLES_EQUAL(aCustomLabelPosition.Primary, -0.14621409921671025, 1e-7); + CPPUNIT_ASSERT_DOUBLES_EQUAL(aCustomLabelPosition.Secondary, -5.2887961029923464E-2, 1e-7); + + sal_Int32 aPlacement; + xPropertySet->getPropertyValue("LabelPlacement") >>= aPlacement; + CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::OUTSIDE, aPlacement); +} + +void Chart2ImportTest::testTdf130032() +{ + // test CustomLabelPosition on Line chart + load("/chart2/qa/extras/data/xlsx/", "testTdf130032.xlsx"); + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + uno::Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + + uno::Reference xPropertySet(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); + CPPUNIT_ASSERT(xPropertySet.is()); + + chart2::RelativePosition aCustomLabelPosition; + xPropertySet->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition; + CPPUNIT_ASSERT_DOUBLES_EQUAL(aCustomLabelPosition.Primary, -0.0438333333333334, 1e-7); + CPPUNIT_ASSERT_DOUBLES_EQUAL(aCustomLabelPosition.Secondary, 0.086794050743657, 1e-7); + + sal_Int32 aPlacement; + xPropertySet->getPropertyValue("LabelPlacement") >>= aPlacement; + CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::RIGHT, aPlacement); +} + +void Chart2ImportTest::testTdf119138MissingAutoTitleDeleted() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf119138-missing-autotitledeleted.xlsx"); + Reference xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + uno::Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT_MESSAGE("Missing autoTitleDeleted is implied to be True if title text is present", xTitle.is()); +} + +void Chart2ImportTest::testStockChartShiftedCategoryPosition() +{ + load("/chart2/qa/extras/data/odt/", "stock_chart_LO_6_2.odt"); + + uno::Reference xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition); +} + +void Chart2ImportTest::testTdf133376() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf133376.xlsx"); + Reference xChartDoc(getChartDocFromSheet(0, mxComponent), + UNO_QUERY_THROW); + + Reference xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); + Reference xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); + Reference xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW); + Reference xDataPointLabel(getShapeByName(xShapes, + "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2"), UNO_SET_THROW); + + CPPUNIT_ASSERT(xDataPointLabel.is()); + // Check the position of the 3rd data point label, which is out from the pie slice + awt::Point aLabelPosition = xDataPointLabel->getPosition(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(1071, aLabelPosition.X, 30); + CPPUNIT_ASSERT_DOUBLES_EQUAL(5269, aLabelPosition.Y, 30); +} + +void Chart2ImportTest::testTdf134225() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf134225.xlsx"); + Reference xChartDoc(getChartDocFromSheet(0, mxComponent), + UNO_QUERY_THROW); + + Reference xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); + Reference xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); + Reference xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW); + Reference xDataPointLabel1(getShapeByName(xShapes, + "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"), UNO_SET_THROW); + CPPUNIT_ASSERT(xDataPointLabel1.is()); + awt::Point aLabelPosition1 = xDataPointLabel1->getPosition(); + + Reference xDataPointLabel2(getShapeByName(xShapes, + "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"), UNO_SET_THROW); + CPPUNIT_ASSERT(xDataPointLabel2.is()); + awt::Point aLabelPosition2 = xDataPointLabel2->getPosition(); + + // Check the distance between the position of the 1st data point label and the second one + CPPUNIT_ASSERT_DOUBLES_EQUAL(1800, sal_Int32(aLabelPosition2.X - aLabelPosition1.X), 200); + CPPUNIT_ASSERT_DOUBLES_EQUAL(2123, sal_Int32(aLabelPosition2.Y - aLabelPosition1.Y), 200); +} + +void Chart2ImportTest::testTdf91250() +{ + load("/chart2/qa/extras/data/docx/", "tdf91250.docx"); + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference xInternalProvider(xChartDoc->getDataProvider(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xInternalProvider.is()); + + Reference xDescAccess(xInternalProvider, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDescAccess.is()); + + // Get the category labels. + Sequence aCategories = xDescAccess->getRowDescriptions(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aCategories.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("12.3254"), aCategories[0]); + CPPUNIT_ASSERT_EQUAL(OUString("11.62315"), aCategories[1]); + CPPUNIT_ASSERT_EQUAL(OUString("9.26"), aCategories[2]); + CPPUNIT_ASSERT_EQUAL(OUString("8.657"), aCategories[3]); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx new file mode 100644 index 000000000..9b8e98a48 --- /dev/null +++ b/chart2/qa/extras/charttest.hxx @@ -0,0 +1,614 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_CHART2_QA_EXTRAS_CHARTTEST_HXX +#define INCLUDED_CHART2_QA_EXTRAS_CHARTTEST_HXX + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +using namespace css; +using namespace css::uno; + +namespace com::sun::star::chart2 { class XDataSeries; } +namespace com::sun::star::chart2 { class XDiagram; } +namespace com::sun::star::table { class XTableCharts; } +namespace com::sun::star::table { class XTablePivotCharts; } + +class ChartTest : public test::BootstrapFixture, public unotest::MacrosTest +{ +public: + ChartTest():mbSkipValidation(false) {} + void load( const OUString& rDir, const OUString& rFileName ); + std::shared_ptr save( const OUString& rFileName ); + std::shared_ptr reload( const OUString& rFileName ); + uno::Sequence < OUString > getImpressChartColumnDescriptions( const OUString& pDir, const char* pName ); + OUString getFileExtension( const OUString& rFileName ); + + uno::Reference< chart::XChartDocument > getChartDocFromImpress( const OUString& pDir, const char* pName ); + + uno::Reference getChartDocFromDrawImpress( sal_Int32 nPage, sal_Int32 nShape ); + + uno::Reference getChartDocFromWriter( sal_Int32 nShape ); + awt::Size getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ); + awt::Size getSize(css::uno::Reference xDiagram, const awt::Size& rPageSize); + + virtual void setUp() override; + virtual void tearDown() override; + +protected: + Reference< lang::XComponent > mxComponent; + OUString maServiceName; + bool mbSkipValidation; // if you set this flag for a new test I'm going to haunt you! +}; + +OUString ChartTest::getFileExtension( const OUString& aFileName ) +{ + sal_Int32 nDotLocation = aFileName.lastIndexOf('.'); + CPPUNIT_ASSERT(nDotLocation != -1); + return aFileName.copy(nDotLocation+1); // Skip the dot. +} + +void ChartTest::load( const OUString& aDir, const OUString& aName ) +{ + OUString extension = getFileExtension(aName); + if (extension == "ods" || extension == "xlsx" || extension == "fods") + { + maServiceName = "com.sun.star.sheet.SpreadsheetDocument"; + } + else if (extension == "docx") + { + maServiceName = "com.sun.star.text.TextDocument"; + } + else if (extension == "odg") + { + maServiceName = "com.sun.star.drawing.DrawingDocument"; + } + if (mxComponent.is()) + mxComponent->dispose(); + mxComponent = loadFromDesktop(m_directories.getURLFromSrc(aDir) + aName, maServiceName); + CPPUNIT_ASSERT(mxComponent.is()); +} + +std::shared_ptr ChartTest::save(const OUString& rFilterName) +{ + uno::Reference xStorable(mxComponent, uno::UNO_QUERY); + auto aArgs(::comphelper::InitPropertySequence({ + { "FilterName", Any(rFilterName) } + })); + std::shared_ptr pTempFile = std::make_shared(); + pTempFile->EnableKillingFile(); + xStorable->storeToURL(pTempFile->GetURL(), aArgs); + + return pTempFile; +} + +std::shared_ptr ChartTest::reload(const OUString& rFilterName) +{ + std::shared_ptr pTempFile = save(rFilterName); + mxComponent->dispose(); + mxComponent = loadFromDesktop(pTempFile->GetURL(), maServiceName); + std::cout << pTempFile->GetURL(); + if(rFilterName == "Calc Office Open XML") + { + validate(pTempFile->GetFileName(), test::OOXML); + } + else if(rFilterName == "Office Open XML Text") + { + // validate(pTempFile->GetFileName(), test::OOXML); + } + else if(rFilterName == "calc8") + { + if(!mbSkipValidation) + validate(pTempFile->GetFileName(), test::ODF); + } + else if(rFilterName == "MS Excel 97") + { + if(!mbSkipValidation) + validate(pTempFile->GetFileName(), test::MSBINARY); + } + CPPUNIT_ASSERT(mxComponent.is()); + return pTempFile; +} + +void ChartTest::setUp() +{ + test::BootstrapFixture::setUp(); + + mxDesktop.set( css::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) ) ); +} + +void ChartTest::tearDown() +{ + if(mxComponent.is()) + mxComponent->dispose(); + + test::BootstrapFixture::tearDown(); + +} + +Reference< lang::XComponent > getChartCompFromSheet( sal_Int32 nSheet, uno::Reference< lang::XComponent > const & xComponent ) +{ + // let us assume that we only have one chart per sheet + + uno::Reference< sheet::XSpreadsheetDocument > xDoc(xComponent, UNO_QUERY_THROW); + + uno::Reference< container::XIndexAccess > xIA(xDoc->getSheets(), UNO_QUERY_THROW); + + uno::Reference< table::XTableChartsSupplier > xChartSupplier( xIA->getByIndex(nSheet), UNO_QUERY_THROW); + + uno::Reference< table::XTableCharts > xCharts = xChartSupplier->getCharts(); + CPPUNIT_ASSERT(xCharts.is()); + + uno::Reference< container::XIndexAccess > xIACharts(xCharts, UNO_QUERY_THROW); + uno::Reference< table::XTableChart > xChart( xIACharts->getByIndex(0), UNO_QUERY_THROW); + + uno::Reference< document::XEmbeddedObjectSupplier > xEmbObjectSupplier(xChart, UNO_QUERY_THROW); + + uno::Reference< lang::XComponent > xChartComp( xEmbObjectSupplier->getEmbeddedObject(), UNO_SET_THROW ); + + return xChartComp; + +} + +Reference< chart2::XChartDocument > getChartDocFromSheet( sal_Int32 nSheet, uno::Reference< lang::XComponent > const & xComponent ) +{ + uno::Reference< chart2::XChartDocument > xChartDoc ( getChartCompFromSheet(nSheet, xComponent), UNO_QUERY_THROW ); + return xChartDoc; +} + +uno::Reference getTablePivotChartsFromSheet(sal_Int32 nSheet, uno::Reference const & xComponent) +{ + uno::Reference xDoc(xComponent, UNO_QUERY_THROW); + + uno::Reference xIA(xDoc->getSheets(), UNO_QUERY_THROW); + + uno::Reference xChartSupplier(xIA->getByIndex(nSheet), UNO_QUERY_THROW); + + uno::Reference xTablePivotCharts = xChartSupplier->getPivotCharts(); + CPPUNIT_ASSERT(xTablePivotCharts.is()); + + return xTablePivotCharts; +} + +Reference getPivotChartCompFromSheet(sal_Int32 nSheet, uno::Reference const & xComponent) +{ + uno::Reference xTablePivotCharts = getTablePivotChartsFromSheet(nSheet, xComponent); + + uno::Reference xIACharts(xTablePivotCharts, UNO_QUERY_THROW); + uno::Reference xTablePivotChart(xIACharts->getByIndex(0), UNO_QUERY_THROW); + + uno::Reference xEmbObjectSupplier(xTablePivotChart, UNO_QUERY_THROW); + + uno::Reference xChartComp(xEmbObjectSupplier->getEmbeddedObject(), UNO_SET_THROW); + + return xChartComp; +} + +Reference getPivotChartDocFromSheet(sal_Int32 nSheet, uno::Reference const & xComponent) +{ + uno::Reference xChartDoc(getPivotChartCompFromSheet(nSheet, xComponent), UNO_QUERY_THROW); + return xChartDoc; +} + +Reference getPivotChartDocFromSheet(uno::Reference const & xTablePivotCharts, sal_Int32 nIndex) +{ + uno::Reference xIACharts(xTablePivotCharts, UNO_QUERY_THROW); + uno::Reference xTablePivotChart(xIACharts->getByIndex(nIndex), UNO_QUERY_THROW); + + uno::Reference xEmbObjectSupplier(xTablePivotChart, UNO_QUERY_THROW); + + uno::Reference xChartComp(xEmbObjectSupplier->getEmbeddedObject(), UNO_SET_THROW); + + uno::Reference xChartDoc(xChartComp, UNO_QUERY_THROW); + return xChartDoc; +} + +Reference< chart2::XChartType > getChartTypeFromDoc( Reference< chart2::XChartDocument > const & xChartDoc, + sal_Int32 nChartType, sal_Int32 nCooSys = 0 ) +{ + CPPUNIT_ASSERT( xChartDoc.is() ); + + Reference xDiagram = xChartDoc->getFirstDiagram(); + CPPUNIT_ASSERT( xDiagram.is() ); + + Reference< chart2::XCoordinateSystemContainer > xCooSysContainer( xDiagram, UNO_QUERY_THROW ); + + Sequence< Reference< chart2::XCoordinateSystem > > xCooSysSequence( xCooSysContainer->getCoordinateSystems()); + CPPUNIT_ASSERT( xCooSysSequence.getLength() > nCooSys ); + + Reference< chart2::XChartTypeContainer > xChartTypeContainer( xCooSysSequence[nCooSys], UNO_QUERY_THROW ); + + Sequence< Reference< chart2::XChartType > > xChartTypeSequence( xChartTypeContainer->getChartTypes() ); + CPPUNIT_ASSERT( xChartTypeSequence.getLength() > nChartType ); + + return xChartTypeSequence[nChartType]; +} + +Reference getAxisFromDoc( + const Reference& xChartDoc, sal_Int32 nCooSys, sal_Int32 nAxisDim, sal_Int32 nAxisIndex ) +{ + Reference xDiagram = xChartDoc->getFirstDiagram(); + CPPUNIT_ASSERT(xDiagram.is()); + + Reference xCooSysContainer(xDiagram, UNO_QUERY_THROW); + + Sequence > xCooSysSequence = xCooSysContainer->getCoordinateSystems(); + CPPUNIT_ASSERT(xCooSysSequence.getLength() > nCooSys); + + Reference xCoord = xCooSysSequence[nCooSys]; + CPPUNIT_ASSERT(xCoord.is()); + + Reference xAxis = xCoord->getAxisByDimension(nAxisDim, nAxisIndex); + CPPUNIT_ASSERT(xAxis.is()); + + return xAxis; +} + +sal_Int32 getNumberOfDataSeries(uno::Reference const & xChartDoc, + sal_Int32 nChartType = 0, sal_Int32 nCooSys = 0) +{ + Reference xChartType = getChartTypeFromDoc(xChartDoc, nChartType, nCooSys); + Reference xDataSeriesContainer(xChartType, UNO_QUERY_THROW); + + uno::Sequence> xSeriesSequence(xDataSeriesContainer->getDataSeries()); + return xSeriesSequence.getLength(); +} + +Reference< chart2::XDataSeries > getDataSeriesFromDoc(uno::Reference const & xChartDoc, + sal_Int32 nDataSeries, sal_Int32 nChartType = 0, + sal_Int32 nCooSys = 0) +{ + Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, nChartType, nCooSys ); + Reference< chart2::XDataSeriesContainer > xDataSeriesContainer( xChartType, UNO_QUERY_THROW ); + + Sequence< Reference< chart2::XDataSeries > > xSeriesSequence( xDataSeriesContainer->getDataSeries() ); + CPPUNIT_ASSERT( xSeriesSequence.getLength() > nDataSeries ); + + Reference< chart2::XDataSeries > xSeries = xSeriesSequence[nDataSeries]; + + return xSeries; +} + +Reference< chart2::data::XDataSequence > getLabelDataSequenceFromDoc( + Reference< chart2::XChartDocument > const & xChartDoc, + sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0 ) +{ + Reference< chart2::XDataSeries > xDataSeries = + getDataSeriesFromDoc( xChartDoc, nDataSeries, nChartType ); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference< chart2::data::XDataSource > xDataSource( xDataSeries, uno::UNO_QUERY_THROW ); + const Sequence< Reference< chart2::data::XLabeledDataSequence > > xDataSequences = + xDataSource->getDataSequences(); + for(auto const & lds : xDataSequences) + { + Reference< chart2::data::XDataSequence> xLabelSeq = lds->getLabel(); + if(!xLabelSeq.is()) + continue; + + return xLabelSeq; + } + + CPPUNIT_FAIL("no Label sequence found"); +} + +Reference< chart2::data::XDataSequence > getDataSequenceFromDocByRole( + Reference< chart2::XChartDocument > const & xChartDoc, const OUString& rRole, + sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0 ) +{ + Reference< chart2::XDataSeries > xDataSeries = + getDataSeriesFromDoc( xChartDoc, nDataSeries, nChartType ); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference< chart2::data::XDataSource > xDataSource( xDataSeries, uno::UNO_QUERY_THROW ); + const Sequence< Reference< chart2::data::XLabeledDataSequence > > xDataSequences = + xDataSource->getDataSequences(); + for(auto const & lds : xDataSequences) + { + Reference< chart2::data::XDataSequence> xLabelSeq = lds->getValues(); + uno::Reference< beans::XPropertySet > xProps(xLabelSeq, uno::UNO_QUERY); + if(!xProps.is()) + continue; + + OUString aRoleName = xProps->getPropertyValue("Role").get(); + + if(aRoleName == rRole) + return xLabelSeq; + } + + return Reference< chart2::data::XDataSequence > (); +} + +uno::Sequence < OUString > getWriterChartColumnDescriptions( Reference< lang::XComponent > const & mxComponent ) +{ + uno::Reference xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); + uno::Reference xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT( xShape.is() ); + uno::Reference xPropertySet(xShape, uno::UNO_QUERY); + uno::Reference< chart2::XChartDocument > xChartDoc; + xChartDoc.set( xPropertySet->getPropertyValue( "Model" ), uno::UNO_QUERY ); + CPPUNIT_ASSERT( xChartDoc.is() ); + CPPUNIT_ASSERT( xChartDoc->getDataProvider().is() ); + uno::Reference< chart2::XAnyDescriptionAccess > xAnyDescriptionAccess ( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW ); + uno::Sequence< OUString > seriesList = xAnyDescriptionAccess->getColumnDescriptions(); + return seriesList; +} + +std::vector > getDataSeriesYValuesFromChartType( const Reference& xCT ) +{ + Reference xDSCont(xCT, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDSCont.is()); + const Sequence > aDataSeriesSeq = xDSCont->getDataSeries(); + + double fNan; + rtl::math::setNan(&fNan); + + std::vector > aRet; + for (uno::Reference const & ds : aDataSeriesSeq) + { + uno::Reference xDSrc(ds, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDSrc.is()); + const uno::Sequence > aDataSeqs = xDSrc->getDataSequences(); + for (auto const & lds : aDataSeqs) + { + Reference xValues = lds->getValues(); + CPPUNIT_ASSERT(xValues.is()); + Reference xPropSet(xValues, uno::UNO_QUERY); + if (!xPropSet.is()) + continue; + + OUString aRoleName; + xPropSet->getPropertyValue("Role") >>= aRoleName; + if (aRoleName == "values-y") + { + const uno::Sequence aData = xValues->getData(); + std::vector aValues; + aValues.reserve(aData.getLength()); + for (uno::Any const & any : aData) + { + double fVal; + if (any >>= fVal) + aValues.push_back(fVal); + else + aValues.push_back(fNan); + } + aRet.push_back(aValues); + } + } + } + + return aRet; +} + +std::vector > getDataSeriesLabelsFromChartType( const Reference& xCT ) +{ + OUString aLabelRole = xCT->getRoleOfSequenceForSeriesLabel(); + + Reference xDSCont(xCT, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDSCont.is()); + const Sequence > aDataSeriesSeq = xDSCont->getDataSeries(); + + std::vector > aRet; + for (auto const & ds : aDataSeriesSeq) + { + uno::Reference xDSrc(ds, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDSrc.is()); + const uno::Sequence > aDataSeqs = xDSrc->getDataSequences(); + for (auto const & lds : aDataSeqs) + { + Reference xValues = lds->getValues(); + CPPUNIT_ASSERT(xValues.is()); + Reference xPropSet(xValues, uno::UNO_QUERY); + if (!xPropSet.is()) + continue; + + OUString aRoleName; + xPropSet->getPropertyValue("Role") >>= aRoleName; + if (aRoleName == aLabelRole) + { + Reference xLabel = lds; + CPPUNIT_ASSERT(xLabel.is()); + Reference xDS2 = xLabel->getLabel(); + CPPUNIT_ASSERT(xDS2.is()); + uno::Sequence aData = xDS2->getData(); + aRet.push_back(aData); + } + } + } + + return aRet; +} + +uno::Reference< chart::XChartDocument > ChartTest::getChartDocFromImpress( const OUString& pDir, const char* pName ) +{ + mxComponent = loadFromDesktop(m_directories.getURLFromSrc(pDir) + OUString::createFromAscii(pName), "com.sun.star.comp.Draw.PresentationDocument"); + uno::Reference< drawing::XDrawPagesSupplier > xDoc(mxComponent, uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XDrawPage > xPage( + xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xShapeProps( + xPage->getByIndex(0), uno::UNO_QUERY ); + CPPUNIT_ASSERT(xShapeProps.is()); + uno::Reference< frame::XModel > xDocModel; + xShapeProps->getPropertyValue("Model") >>= xDocModel; + CPPUNIT_ASSERT(xDocModel.is()); + uno::Reference< chart::XChartDocument > xChartDoc( xDocModel, uno::UNO_QUERY_THROW ); + + return xChartDoc; +} + +uno::Reference ChartTest::getChartDocFromDrawImpress( + sal_Int32 nPage, sal_Int32 nShape ) +{ + uno::Reference xEmpty; + + uno::Reference xPages(mxComponent, uno::UNO_QUERY); + if (!xPages.is()) + return xEmpty; + + uno::Reference xPage( + xPages->getDrawPages()->getByIndex(nPage), uno::UNO_QUERY_THROW); + + uno::Reference xShapeProps(xPage->getByIndex(nShape), uno::UNO_QUERY); + if (!xShapeProps.is()) + return xEmpty; + + uno::Reference xDocModel; + xShapeProps->getPropertyValue("Model") >>= xDocModel; + if (!xDocModel.is()) + return xEmpty; + + uno::Reference xChartDoc(xDocModel, uno::UNO_QUERY); + return xChartDoc; +} + +uno::Reference ChartTest::getChartDocFromWriter( sal_Int32 nShape ) +{ + // DO NOT use XDrawPageSupplier since SwVirtFlyDrawObj are not created + // during import, only in layout! + Reference xEOS(mxComponent, uno::UNO_QUERY); + CPPUNIT_ASSERT(xEOS.is()); + Reference xEmbeddeds(xEOS->getEmbeddedObjects(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xEmbeddeds.is()); + + Reference xShapeProps(xEmbeddeds->getByIndex(nShape), uno::UNO_QUERY); + CPPUNIT_ASSERT(xShapeProps.is()); + + Reference xDocModel; + xShapeProps->getPropertyValue("Model") >>= xDocModel; + CPPUNIT_ASSERT(xDocModel.is()); + + uno::Reference xChartDoc(xDocModel, uno::UNO_QUERY); + return xChartDoc; +} + +uno::Sequence < OUString > ChartTest::getImpressChartColumnDescriptions( const OUString& pDir, const char* pName ) +{ + uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromImpress( pDir, pName ); + uno::Reference< chart::XChartDataArray > xChartData ( xChartDoc->getData(), uno::UNO_QUERY_THROW); + uno::Sequence < OUString > seriesList = xChartData->getColumnDescriptions(); + return seriesList; +} + +OUString getTitleString( const Reference& xTitled ) +{ + uno::Reference xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT(xTitle.is()); + const uno::Sequence > aFSSeq = xTitle->getText(); + OUString aText; + for (auto const & fs : aFSSeq) + aText += fs->getString(); + + return aText; +} + +sal_Int32 getNumberFormat( const Reference& xChartDoc, const OUString& sFormat ) +{ + Reference xNFS(xChartDoc, uno::UNO_QUERY_THROW); + Reference xNumberFormats = xNFS->getNumberFormats(); + CPPUNIT_ASSERT(xNumberFormats.is()); + + return xNumberFormats->queryKey(sFormat, css::lang::Locale(), false); +} + +sal_Int32 getNumberFormatFromAxis( const Reference& xAxis ) +{ + Reference xPS(xAxis, uno::UNO_QUERY); + CPPUNIT_ASSERT(xPS.is()); + sal_Int32 nNumberFormat = -1; + bool bSuccess = xPS->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; + CPPUNIT_ASSERT(bSuccess); + + return nNumberFormat; +} + +sal_Int16 getNumberFormatType( const Reference& xChartDoc, sal_Int32 nNumberFormat ) +{ + Reference xNFS(xChartDoc, uno::UNO_QUERY_THROW); + Reference xNumberFormats = xNFS->getNumberFormats(); + CPPUNIT_ASSERT(xNumberFormats.is()); + + Reference xNumPS = xNumberFormats->getByKey(nNumberFormat); + CPPUNIT_ASSERT(xNumPS.is()); + + sal_Int16 nType = util::NumberFormat::UNDEFINED; + xNumPS->getPropertyValue("Type") >>= nType; + + return nType; +} + +awt::Size ChartTest::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) +{ + awt::Size aSize( 0, 0 ); + uno::Reference< com::sun::star::embed::XVisualObject > xVisualObject( xChartDoc, uno::UNO_QUERY ); + CPPUNIT_ASSERT( xVisualObject.is() ); + aSize = xVisualObject->getVisualAreaSize( com::sun::star::embed::Aspects::MSOLE_CONTENT ); + return aSize; +} + +awt::Size ChartTest::getSize(css::uno::Reference xDiagram, const awt::Size& rPageSize) +{ + Reference< beans::XPropertySet > xProp(xDiagram, uno::UNO_QUERY); + chart2::RelativeSize aRelativeSize; + xProp->getPropertyValue( "RelativeSize" ) >>= aRelativeSize; + double fX = aRelativeSize.Primary * rPageSize.Width; + double fY = aRelativeSize.Secondary * rPageSize.Height; + awt::Size aSize; + aSize.Width = static_cast< sal_Int32 >( ::rtl::math::round( fX ) ); + aSize.Height = static_cast< sal_Int32 >( ::rtl::math::round( fY ) ); + return aSize; +} + +#endif // INCLUDED_CHART2_QA_EXTRAS_CHARTTEST_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/data/doc/chart.doc b/chart2/qa/extras/data/doc/chart.doc new file mode 100644 index 000000000..2bfa5aed2 Binary files /dev/null and b/chart2/qa/extras/data/doc/chart.doc differ diff --git a/chart2/qa/extras/data/docx/3d-bar-label.docx b/chart2/qa/extras/data/docx/3d-bar-label.docx new file mode 100644 index 000000000..69cab8e71 Binary files /dev/null and b/chart2/qa/extras/data/docx/3d-bar-label.docx differ diff --git a/chart2/qa/extras/data/docx/Bar_horizontal_cone.docx b/chart2/qa/extras/data/docx/Bar_horizontal_cone.docx new file mode 100644 index 000000000..2280d89fc Binary files /dev/null and b/chart2/qa/extras/data/docx/Bar_horizontal_cone.docx differ diff --git a/chart2/qa/extras/data/docx/DisplayUnits.docx b/chart2/qa/extras/data/docx/DisplayUnits.docx new file mode 100644 index 000000000..97092a3ed Binary files /dev/null and b/chart2/qa/extras/data/docx/DisplayUnits.docx differ diff --git a/chart2/qa/extras/data/docx/FDO74430.docx b/chart2/qa/extras/data/docx/FDO74430.docx new file mode 100644 index 000000000..f4a68b519 Binary files /dev/null and b/chart2/qa/extras/data/docx/FDO74430.docx differ diff --git a/chart2/qa/extras/data/docx/FDO75975.docx b/chart2/qa/extras/data/docx/FDO75975.docx new file mode 100644 index 000000000..30f251014 Binary files /dev/null and b/chart2/qa/extras/data/docx/FDO75975.docx differ diff --git a/chart2/qa/extras/data/docx/MSO_axis_position.docx b/chart2/qa/extras/data/docx/MSO_axis_position.docx new file mode 100644 index 000000000..a9955b7b1 Binary files /dev/null and b/chart2/qa/extras/data/docx/MSO_axis_position.docx differ diff --git a/chart2/qa/extras/data/docx/PieChartDataLabels.docx b/chart2/qa/extras/data/docx/PieChartDataLabels.docx new file mode 100644 index 000000000..99a72c0f2 Binary files /dev/null and b/chart2/qa/extras/data/docx/PieChartDataLabels.docx differ diff --git a/chart2/qa/extras/data/docx/UpDownBars.docx b/chart2/qa/extras/data/docx/UpDownBars.docx new file mode 100644 index 000000000..755f81499 Binary files /dev/null and b/chart2/qa/extras/data/docx/UpDownBars.docx differ diff --git a/chart2/qa/extras/data/docx/area-chart-labels.docx b/chart2/qa/extras/data/docx/area-chart-labels.docx new file mode 100644 index 000000000..4db844112 Binary files /dev/null and b/chart2/qa/extras/data/docx/area-chart-labels.docx differ diff --git a/chart2/qa/extras/data/docx/bar-chart-labels.docx b/chart2/qa/extras/data/docx/bar-chart-labels.docx new file mode 100644 index 000000000..9ff8b4fd1 Binary files /dev/null and b/chart2/qa/extras/data/docx/bar-chart-labels.docx differ diff --git a/chart2/qa/extras/data/docx/barChartRotation.docx b/chart2/qa/extras/data/docx/barChartRotation.docx new file mode 100644 index 000000000..bf4be47b3 Binary files /dev/null and b/chart2/qa/extras/data/docx/barChartRotation.docx differ diff --git a/chart2/qa/extras/data/docx/bubblechart.docx b/chart2/qa/extras/data/docx/bubblechart.docx new file mode 100644 index 000000000..c2040730c Binary files /dev/null and b/chart2/qa/extras/data/docx/bubblechart.docx differ diff --git a/chart2/qa/extras/data/docx/chart.docx b/chart2/qa/extras/data/docx/chart.docx new file mode 100644 index 000000000..f9cddd494 Binary files /dev/null and b/chart2/qa/extras/data/docx/chart.docx differ diff --git a/chart2/qa/extras/data/docx/clustered-bar-chart-labels.docx b/chart2/qa/extras/data/docx/clustered-bar-chart-labels.docx new file mode 100644 index 000000000..3b9941cc1 Binary files /dev/null and b/chart2/qa/extras/data/docx/clustered-bar-chart-labels.docx differ diff --git a/chart2/qa/extras/data/docx/data-label-borders.docx b/chart2/qa/extras/data/docx/data-label-borders.docx new file mode 100644 index 000000000..6f2b94d98 Binary files /dev/null and b/chart2/qa/extras/data/docx/data-label-borders.docx differ diff --git a/chart2/qa/extras/data/docx/data_point_inherited_color.docx b/chart2/qa/extras/data/docx/data_point_inherited_color.docx new file mode 100644 index 000000000..70de8b218 Binary files /dev/null and b/chart2/qa/extras/data/docx/data_point_inherited_color.docx differ diff --git a/chart2/qa/extras/data/docx/doughnut-chart-labels.docx b/chart2/qa/extras/data/docx/doughnut-chart-labels.docx new file mode 100644 index 000000000..559208578 Binary files /dev/null and b/chart2/qa/extras/data/docx/doughnut-chart-labels.docx differ diff --git a/chart2/qa/extras/data/docx/doughnutChart.docx b/chart2/qa/extras/data/docx/doughnutChart.docx new file mode 100644 index 000000000..f0642d4d5 Binary files /dev/null and b/chart2/qa/extras/data/docx/doughnutChart.docx differ diff --git a/chart2/qa/extras/data/docx/fdo74115_WallBitmapFill.docx b/chart2/qa/extras/data/docx/fdo74115_WallBitmapFill.docx new file mode 100644 index 000000000..15f42b0cf Binary files /dev/null and b/chart2/qa/extras/data/docx/fdo74115_WallBitmapFill.docx differ diff --git a/chart2/qa/extras/data/docx/fdo74115_WallGradientFill.docx b/chart2/qa/extras/data/docx/fdo74115_WallGradientFill.docx new file mode 100644 index 000000000..e10334bd9 Binary files /dev/null and b/chart2/qa/extras/data/docx/fdo74115_WallGradientFill.docx differ diff --git a/chart2/qa/extras/data/docx/fdo78290_Combination_Chart_Marker_x.docx b/chart2/qa/extras/data/docx/fdo78290_Combination_Chart_Marker_x.docx new file mode 100644 index 000000000..ee2489d21 Binary files /dev/null and b/chart2/qa/extras/data/docx/fdo78290_Combination_Chart_Marker_x.docx differ diff --git a/chart2/qa/extras/data/docx/fdo78290_Line_Chart_Marker_x.docx b/chart2/qa/extras/data/docx/fdo78290_Line_Chart_Marker_x.docx new file mode 100644 index 000000000..7e4b096b8 Binary files /dev/null and b/chart2/qa/extras/data/docx/fdo78290_Line_Chart_Marker_x.docx differ diff --git a/chart2/qa/extras/data/docx/fdo78290_Scatter_Chart_Marker_x.docx b/chart2/qa/extras/data/docx/fdo78290_Scatter_Chart_Marker_x.docx new file mode 100644 index 000000000..2edc8f086 Binary files /dev/null and b/chart2/qa/extras/data/docx/fdo78290_Scatter_Chart_Marker_x.docx differ diff --git a/chart2/qa/extras/data/docx/fdo83058_dlblPos.docx b/chart2/qa/extras/data/docx/fdo83058_dlblPos.docx new file mode 100644 index 000000000..721a71789 Binary files /dev/null and b/chart2/qa/extras/data/docx/fdo83058_dlblPos.docx differ diff --git a/chart2/qa/extras/data/docx/line-chart-label-default-placement.docx b/chart2/qa/extras/data/docx/line-chart-label-default-placement.docx new file mode 100644 index 000000000..ab9548d59 Binary files /dev/null and b/chart2/qa/extras/data/docx/line-chart-label-default-placement.docx differ diff --git a/chart2/qa/extras/data/docx/pieChartRotation.docx b/chart2/qa/extras/data/docx/pieChartRotation.docx new file mode 100644 index 000000000..f76f60237 Binary files /dev/null and b/chart2/qa/extras/data/docx/pieChartRotation.docx differ diff --git a/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx b/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx new file mode 100644 index 000000000..da6b2fa19 Binary files /dev/null and b/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx differ diff --git a/chart2/qa/extras/data/docx/radar-chart-labels.docx b/chart2/qa/extras/data/docx/radar-chart-labels.docx new file mode 100644 index 000000000..2cb876dd2 Binary files /dev/null and b/chart2/qa/extras/data/docx/radar-chart-labels.docx differ diff --git a/chart2/qa/extras/data/docx/scatter-chart-text-x-values.docx b/chart2/qa/extras/data/docx/scatter-chart-text-x-values.docx new file mode 100644 index 000000000..b741bbce2 Binary files /dev/null and b/chart2/qa/extras/data/docx/scatter-chart-text-x-values.docx differ diff --git a/chart2/qa/extras/data/docx/tdf121744.docx b/chart2/qa/extras/data/docx/tdf121744.docx new file mode 100644 index 000000000..b5ff10098 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf121744.docx differ diff --git a/chart2/qa/extras/data/docx/tdf123206.docx b/chart2/qa/extras/data/docx/tdf123206.docx new file mode 100644 index 000000000..f47089fe3 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf123206.docx differ diff --git a/chart2/qa/extras/data/docx/tdf124083.docx b/chart2/qa/extras/data/docx/tdf124083.docx new file mode 100644 index 000000000..b8030ca9a Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf124083.docx differ diff --git a/chart2/qa/extras/data/docx/tdf124243.docx b/chart2/qa/extras/data/docx/tdf124243.docx new file mode 100644 index 000000000..e58ef6a02 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf124243.docx differ diff --git a/chart2/qa/extras/data/docx/tdf125337.docx b/chart2/qa/extras/data/docx/tdf125337.docx new file mode 100644 index 000000000..811f12d89 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf125337.docx differ diff --git a/chart2/qa/extras/data/docx/tdf128794.docx b/chart2/qa/extras/data/docx/tdf128794.docx new file mode 100644 index 000000000..098c0a00e Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf128794.docx differ diff --git a/chart2/qa/extras/data/docx/tdf132174.docx b/chart2/qa/extras/data/docx/tdf132174.docx new file mode 100644 index 000000000..4f4369578 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf132174.docx differ diff --git a/chart2/qa/extras/data/docx/tdf133632.docx b/chart2/qa/extras/data/docx/tdf133632.docx new file mode 100644 index 000000000..b970e73f4 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf133632.docx differ diff --git a/chart2/qa/extras/data/docx/tdf136650.docx b/chart2/qa/extras/data/docx/tdf136650.docx new file mode 100644 index 000000000..cd095ec63 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf136650.docx differ diff --git a/chart2/qa/extras/data/docx/tdf91250.docx b/chart2/qa/extras/data/docx/tdf91250.docx new file mode 100644 index 000000000..4cb199b45 Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf91250.docx differ diff --git a/chart2/qa/extras/data/docx/testAreaChartLoad.docx b/chart2/qa/extras/data/docx/testAreaChartLoad.docx new file mode 100644 index 000000000..9383f75cd Binary files /dev/null and b/chart2/qa/extras/data/docx/testAreaChartLoad.docx differ diff --git a/chart2/qa/extras/data/docx/testAxisTitlePosition.docx b/chart2/qa/extras/data/docx/testAxisTitlePosition.docx new file mode 100644 index 000000000..6abd37eec Binary files /dev/null and b/chart2/qa/extras/data/docx/testAxisTitlePosition.docx differ diff --git a/chart2/qa/extras/data/docx/testBarChart.docx b/chart2/qa/extras/data/docx/testBarChart.docx new file mode 100644 index 000000000..b92260f71 Binary files /dev/null and b/chart2/qa/extras/data/docx/testBarChart.docx differ diff --git a/chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx b/chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx new file mode 100644 index 000000000..66df9153d Binary files /dev/null and b/chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx differ diff --git a/chart2/qa/extras/data/docx/testChartDataTable.docx b/chart2/qa/extras/data/docx/testChartDataTable.docx new file mode 100644 index 000000000..8663e8937 Binary files /dev/null and b/chart2/qa/extras/data/docx/testChartDataTable.docx differ diff --git a/chart2/qa/extras/data/docx/testChartTitlePropertiesBitmapFill.docx b/chart2/qa/extras/data/docx/testChartTitlePropertiesBitmapFill.docx new file mode 100644 index 000000000..462c15976 Binary files /dev/null and b/chart2/qa/extras/data/docx/testChartTitlePropertiesBitmapFill.docx differ diff --git a/chart2/qa/extras/data/docx/testChartTitlePropertiesColorFill.docx b/chart2/qa/extras/data/docx/testChartTitlePropertiesColorFill.docx new file mode 100644 index 000000000..d86928d61 Binary files /dev/null and b/chart2/qa/extras/data/docx/testChartTitlePropertiesColorFill.docx differ diff --git a/chart2/qa/extras/data/docx/testChartTitlePropertiesGradientFill.docx b/chart2/qa/extras/data/docx/testChartTitlePropertiesGradientFill.docx new file mode 100644 index 000000000..a72600d09 Binary files /dev/null and b/chart2/qa/extras/data/docx/testChartTitlePropertiesGradientFill.docx differ diff --git a/chart2/qa/extras/data/docx/testColorGradientWithTransparancy.docx b/chart2/qa/extras/data/docx/testColorGradientWithTransparancy.docx new file mode 100644 index 000000000..adc2aff04 Binary files /dev/null and b/chart2/qa/extras/data/docx/testColorGradientWithTransparancy.docx differ diff --git a/chart2/qa/extras/data/docx/testCustomlabeltext.docx b/chart2/qa/extras/data/docx/testCustomlabeltext.docx new file mode 100644 index 000000000..db28209c9 Binary files /dev/null and b/chart2/qa/extras/data/docx/testCustomlabeltext.docx differ diff --git a/chart2/qa/extras/data/docx/testLabelSeparator.docx b/chart2/qa/extras/data/docx/testLabelSeparator.docx new file mode 100644 index 000000000..452fdccc9 Binary files /dev/null and b/chart2/qa/extras/data/docx/testLabelSeparator.docx differ diff --git a/chart2/qa/extras/data/docx/testMultilevelCategoryAxis.docx b/chart2/qa/extras/data/docx/testMultilevelCategoryAxis.docx new file mode 100644 index 000000000..75605de72 Binary files /dev/null and b/chart2/qa/extras/data/docx/testMultilevelCategoryAxis.docx differ diff --git a/chart2/qa/extras/data/docx/testMultipleChart.docx b/chart2/qa/extras/data/docx/testMultipleChart.docx new file mode 100644 index 000000000..28d8bbcfe Binary files /dev/null and b/chart2/qa/extras/data/docx/testMultipleChart.docx differ diff --git a/chart2/qa/extras/data/docx/testMultiplechartembeddings.docx b/chart2/qa/extras/data/docx/testMultiplechartembeddings.docx new file mode 100644 index 000000000..28d8bbcfe Binary files /dev/null and b/chart2/qa/extras/data/docx/testMultiplechartembeddings.docx differ diff --git a/chart2/qa/extras/data/docx/testSeriesIdxOrder.docx b/chart2/qa/extras/data/docx/testSeriesIdxOrder.docx new file mode 100644 index 000000000..9274e2c2c Binary files /dev/null and b/chart2/qa/extras/data/docx/testSeriesIdxOrder.docx differ diff --git a/chart2/qa/extras/data/docx/testSimpleCategoryAxis.docx b/chart2/qa/extras/data/docx/testSimpleCategoryAxis.docx new file mode 100644 index 000000000..de511664a Binary files /dev/null and b/chart2/qa/extras/data/docx/testSimpleCategoryAxis.docx differ diff --git a/chart2/qa/extras/data/docx/testStockChart.docx b/chart2/qa/extras/data/docx/testStockChart.docx new file mode 100644 index 000000000..a804e7df2 Binary files /dev/null and b/chart2/qa/extras/data/docx/testStockChart.docx differ diff --git a/chart2/qa/extras/data/docx/testTdf108110.docx b/chart2/qa/extras/data/docx/testTdf108110.docx new file mode 100644 index 000000000..769360c15 Binary files /dev/null and b/chart2/qa/extras/data/docx/testTdf108110.docx differ diff --git a/chart2/qa/extras/data/docx/testTdf114179.docx b/chart2/qa/extras/data/docx/testTdf114179.docx new file mode 100644 index 000000000..36fb11e17 Binary files /dev/null and b/chart2/qa/extras/data/docx/testTdf114179.docx differ diff --git a/chart2/qa/extras/data/docx/testTdf122226.docx b/chart2/qa/extras/data/docx/testTdf122226.docx new file mode 100644 index 000000000..7205525a7 Binary files /dev/null and b/chart2/qa/extras/data/docx/testTdf122226.docx differ diff --git a/chart2/qa/extras/data/docx/testchartoleobjectembeddings.docx b/chart2/qa/extras/data/docx/testchartoleobjectembeddings.docx new file mode 100644 index 000000000..8167de7a3 Binary files /dev/null and b/chart2/qa/extras/data/docx/testchartoleobjectembeddings.docx differ diff --git a/chart2/qa/extras/data/fods/stacked-column-chart.fods b/chart2/qa/extras/data/fods/stacked-column-chart.fods new file mode 100644 index 000000000..8a142120b --- /dev/null +++ b/chart2/qa/extras/data/fods/stacked-column-chart.fods @@ -0,0 +1,861 @@ + + + + Michael Meeks2014-06-05T11:25:47.3465744642014-06-05T11:32:25.317381922Michael MeeksPT3M51S6LibreOffice/3.5$Linux_X86_64 LibreOffice_project/f647884-246edd6 + + + 0 + 0 + 27093 + 9934 + + + view1 + + + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 0 + 130 + 60 + true + + + 1 + 16 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 0 + 130 + 60 + true + + + Summary + 270 + 0 + 130 + 60 + false + true + true + true + 12632256 + true + true + true + true + false + false + 1000 + 1000 + 1 + 1 + true + + + + + true + false + true + 12632256 + true + false + 1 + 1 + + + en + GB + + + + + + true + fwH+/0Nhbm9uLTg2MGkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ1VQUzpDYW5vbi04NjBpAAAAAAAAAAAAAAAAAAAAAAAWAAMApQAAAAAAAAAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9Q2Fub24tODYwaQpvcmllbnRhdGlvbj1Qb3J0cmFpdApjb3BpZXM9MQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY= + true + false + true + Canon-860i + 3 + false + false + false + true + 1000 + 1000 + true + true + true + 0 + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + £ + + + + + - + £ + + + + + £ + + + + + - + £ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ??? + + + + Page 1 + + + + + + + ??? (???) + + + 00/00/0000, 00:00:00 + + + + + Page 1 / 99 + + + + + + + + + + + + LibreOffice/3.5$Linux_X86_64 LibreOffice_project/f647884-246edd6 + + + + + + + £ + + + + + - + £ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Some + + Summary.B1:Summary.B1 + + + + + + + One + + Summary.A2:Summary.A2 + + + 956.594173563644 + + Summary.B2:Summary.B2 + + + + + Two + + Summary.A3:Summary.A3 + + + 207.425649510697 + + Summary.B3:Summary.B3 + + + + + Three + + Summary.A4:Summary.A4 + + + 689.508363604546 + + Summary.B4:Summary.B4 + + + + + Four + + Summary.A5:Summary.A5 + + + 346.062566153705 + + Summary.B5:Summary.B5 + + + + + Five + + Summary.A6:Summary.A6 + + + 893.98120646365 + + Summary.B6:Summary.B6 + + + + + + + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAAAAAAAAAAAAAA7EwAAoA8AAPsIAAAIBwAAAIA+AAAo + IwAArQEAAIsAAQACAAAA//+BAAEAEAAAAAAAAAAAAAAAfz4AACcjAACLAAEAAgAAACAAggAB + ACEAAAACABsAAAACAAIAAAAAAAAAJyMAAAEAAAAAAH8+AAACAACVAAEABAAAAAAAAACWAAEA + AgAAAAkAhQABAAUAAAD///8AAYQAAQAFAAAAAAAAAABvAAIANgAAAAEABgBAHwAAKCMAAAAA + AAAoIwAAAAAAAAAAAACAPgAAAAAAAIA+AAAoIwAAQB8AACgjAAAAAIQAAQAFAAAAs7OzAAEA + AgEAjgAAABUAWFBBVEhTVFJPS0VfU0VRX0JFR0lOAAAAAG8AAAABAGkAAAABADMAAAAGAOEe + AABNHgAA+gcAAE0eAAD6BwAAHAQAAMc1AAAcBAAAxzUAAE0eAADhHgAATR4AAAABAAIAAAAA + AAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAACEAAEABQAAALOzswAB + hQABAAUAAAAAAAAAAG0AAwBTAAAABgDhHgAATR4AAPoHAABNHgAA+gcAABwEAADHNQAAHAQA + AMc1AABNHgAA4R4AAE0eAAAEABoAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAgEA + HQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAAhAABAAUAAACzs7MAAQACAQBuAAAA + FQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEASQAAAAEAEwAAAAIAxzUAAEweAAD6 + BwAATB4AAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAA + AACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAzAAAAAgDHNQAATB4AAPoHAABMHgAA + BAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIBAB0AAAATAFhQQVRIU1RST0tF + X1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEAbgAAABUAWFBBVEhTVFJPS0VfU0VR + X0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAMc1AACOGgAA+gcAAI4aAAAAAQACAAAAAAAB + AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAhAABAAUAAACzs7MAAYUA + AQAFAAAAAAAAAABtAAMAMwAAAAIAxzUAAI4aAAD6BwAAjhoAAAQAGgAAAAEAAAAAAAAAAAAA + AAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNUUk9LRV9TRVFfRU5EAAAAAAAAAACE + AAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tFX1NFUV9CRUdJTgAAAABPAAAAAQBJ + AAAAAQATAAAAAgDHNQAA0BYAAPoHAADQFgAAAAEAAgAAAAAAAQACAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7OzAAGFAAEABQAAAAAAAAAAbQADADMA + AAACAMc1AADQFgAA+gcAANAWAAAEABoAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAA + AgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAAhAABAAUAAACzs7MAAQACAQBu + AAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEASQAAAAEAEwAAAAIAxzUAABIT + AAD6BwAAEhMAAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAA + AAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAzAAAAAgDHNQAAEhMAAPoHAAAS + EwAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIBAB0AAAATAFhQQVRIU1RS + T0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEAbgAAABUAWFBBVEhTVFJPS0Vf + U0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAMc1AABUDwAA+gcAAFQPAAAAAQACAAAA + AAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAhAABAAUAAACzs7MA + AYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAxzUAAFQPAAD6BwAAVA8AAAQAGgAAAAEAAAAAAAAA + AAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNUUk9LRV9TRVFfRU5EAAAAAAAA + AACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tFX1NFUV9CRUdJTgAAAABPAAAA + AQBJAAAAAQATAAAAAgDHNQAAlgsAAPoHAACWCwAAAAEAAgAAAAAAAQACAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7OzAAGFAAEABQAAAAAAAAAAbQAD + ADMAAAACAMc1AACWCwAA+gcAAJYLAAAEABoAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAA + AAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAAhAABAAUAAACzs7MAAQAC + AQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEASQAAAAEAEwAAAAIAxzUA + ANgHAAD6BwAA2AcAAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAA + AAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAzAAAAAgDHNQAA2AcAAPoH + AADYBwAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIBAB0AAAATAFhQQVRI + U1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEAbgAAABUAWFBBVEhTVFJP + S0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAMc1AAAbBAAA+gcAABsEAAAAAQAC + AAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAhAABAAUAAACz + s7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAxzUAABsEAAD6BwAAGwQAAAQAGgAAAAEAAAAA + AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNUUk9LRV9TRVFfRU5EAAAA + AAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tFX1NFUV9CRUdJTgAAAABP + AAAAAQBJAAAAAQATAAAAAgD6BwAA4h4AAPoHAABMHgAAAAEAAgAAAAAAAQACAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7OzAAGFAAEABQAAAAAAAAAA + bQADADMAAAACAPoHAADiHgAA+gcAAEweAAAEABoAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA + BAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAAhAABAAUAAACzs7MA + AQACAQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEASQAAAAEAEwAAAAIA + +gcAAOIeAAD6BwAATB4AAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA + AAAAAAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAzAAAAAgD6BwAA4h4A + APoHAABMHgAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIBAB0AAAATAFhQ + QVRIU1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEAbgAAABUAWFBBVEhT + VFJPS0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAMc1AADiHgAAxzUAAEweAAAA + AQACAAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAhAABAAUA + AACzs7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAxzUAAOIeAADHNQAATB4AAAQAGgAAAAEA + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNUUk9LRV9TRVFfRU5E + AAAAAAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tFX1NFUV9CRUdJTgAA + AABPAAAAAQBJAAAAAQATAAAAAgDHNQAA4h4AAMc1AABMHgAAAAEAAgAAAAAAAQACAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7OzAAGFAAEABQAAAAAA + AAAAbQADADMAAAACAMc1AADiHgAAxzUAAEweAAAEABoAAAABAAAAAAAAAAAAAAAAAAAAAAAA + AAAABAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAAhAABAAUAAACz + s7MAAQACAQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEASQAAAAEAEwAA + AAIA+gcAAEweAADHNQAATB4AAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AQAAAAAAAAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAzAAAAAgD6BwAA + TB4AAMc1AABMHgAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIBAB0AAAAT + AFhQQVRIU1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEAbgAAABUAWFBB + VEhTVFJPS0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAGQHAABMHgAA+gcAAEwe + AAAAAQACAAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAhAAB + AAUAAACzs7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAZAcAAEweAAD6BwAATB4AAAQAGgAA + AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNUUk9LRV9TRVFf + RU5EAAAAAAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tFX1NFUV9CRUdJ + TgAAAABPAAAAAQBJAAAAAQATAAAAAgBkBwAATB4AAPoHAABMHgAAAAEAAgAAAAAAAQACAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7OzAAGFAAEABQAA + AAAAAAAAbQADADMAAAACAGQHAABMHgAA+gcAAEweAAAEABoAAAABAAAAAAAAAAAAAAAAAAAA + AAAAAAAABAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAAhAABAAUA + AACzs7MAAQACAQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEASQAAAAEA + EwAAAAIAZAcAAI4aAAD6BwAAjhoAAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAQAAAAAAAAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAzAAAAAgBk + BwAAjhoAAPoHAACOGgAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIBAB0A + AAATAFhQQVRIU1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEAbgAAABUA + WFBBVEhTVFJPS0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAGQHAACOGgAA+gcA + AI4aAAAAAQACAAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAA + hAABAAUAAACzs7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAZAcAAI4aAAD6BwAAjhoAAAQA + GgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNUUk9LRV9T + RVFfRU5EAAAAAAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tFX1NFUV9C + RUdJTgAAAABPAAAAAQBJAAAAAQATAAAAAgBkBwAA0BYAAPoHAADQFgAAAAEAAgAAAAAAAQAC + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7OzAAGFAAEA + BQAAAAAAAAAAbQADADMAAAACAGQHAADQFgAA+gcAANAWAAAEABoAAAABAAAAAAAAAAAAAAAA + AAAAAAAAAAAABAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAAhAAB + AAUAAACzs7MAAQACAQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEASQAA + AAEAEwAAAAIAZAcAANAWAAD6BwAA0BYAAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAQAAAAAAAAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAzAAAA + AgBkBwAA0BYAAPoHAADQFgAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIB + AB0AAAATAFhQQVRIU1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEAbgAA + ABUAWFBBVEhTVFJPS0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAGQHAAASEwAA + +gcAABITAAAAAQACAAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAA + AAAAhAABAAUAAACzs7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAZAcAABITAAD6BwAAEhMA + AAQAGgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNUUk9L + RV9TRVFfRU5EAAAAAAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tFX1NF + UV9CRUdJTgAAAABPAAAAAQBJAAAAAQATAAAAAgBkBwAAEhMAAPoHAAASEwAAAAEAAgAAAAAA + AQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7OzAAGF + AAEABQAAAAAAAAAAbQADADMAAAACAGQHAAASEwAA+gcAABITAAAEABoAAAABAAAAAAAAAAAA + AAAAAAAAAAAAAAAABAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAAAAAA + hAABAAUAAACzs7MAAQACAQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAAAAEA + SQAAAAEAEwAAAAIAZAcAAFQPAAD6BwAAVA8AAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAQAAAAAAAAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0AAwAz + AAAAAgBkBwAAVA8AAPoHAABUDwAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAA + AAIBAB0AAAATAFhQQVRIU1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEAAgEA + bgAAABUAWFBBVEhTVFJPS0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAGQHAABU + DwAA+gcAAFQPAAAAAQACAAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAA + AAAAAAAAhAABAAUAAACzs7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAZAcAAFQPAAD6BwAA + VA8AAAQAGgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFUSFNU + Uk9LRV9TRVFfRU5EAAAAAAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RST0tF + X1NFUV9CRUdJTgAAAABPAAAAAQBJAAAAAQATAAAAAgBkBwAAlgsAAPoHAACWCwAAAAEAAgAA + AAAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAAs7Oz + AAGFAAEABQAAAAAAAAAAbQADADMAAAACAGQHAACWCwAA+gcAAJYLAAAEABoAAAABAAAAAAAA + AAAAAAAAAAAAAAAAAAAABAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAAAAAA + AAAAhAABAAUAAACzs7MAAQACAQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAATwAA + AAEASQAAAAEAEwAAAAIAZAcAAJYLAAD6BwAAlgsAAAABAAIAAAAAAAEAAgAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAAAG0A + AwAzAAAAAgBkBwAAlgsAAPoHAACWCwAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQA + AAAAAAIBAB0AAAATAFhQQVRIU1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7OzAAEA + AgEAbgAAABUAWFBBVEhTVFJPS0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAACAGQH + AADYBwAA+gcAANgHAAAAAQACAAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAA + AAAAAAAAAAAAhAABAAUAAACzs7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAZAcAANgHAAD6 + BwAA2AcAAAQAGgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBYUEFU + SFNUUk9LRV9TRVFfRU5EAAAAAAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRIU1RS + T0tFX1NFUV9CRUdJTgAAAABPAAAAAQBJAAAAAQATAAAAAgBkBwAA2AcAAPoHAADYBwAAAAEA + AgAAAAAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAFAAAA + s7OzAAGFAAEABQAAAAAAAAAAbQADADMAAAACAGQHAADYBwAA+gcAANgHAAAEABoAAAABAAAA + AAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VORAAA + AAAAAAAAhAABAAUAAACzs7MAAQACAQBuAAAAFQBYUEFUSFNUUk9LRV9TRVFfQkVHSU4AAAAA + TwAAAAEASQAAAAEAEwAAAAIAZAcAABsEAAD6BwAAGwQAAAABAAIAAAAAAAEAAgAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAACEAAEABQAAALOzswABhQABAAUAAAAAAAAA + AG0AAwAzAAAAAgBkBwAAGwQAAPoHAAAbBAAABAAaAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA + AAQAAAAAAAIBAB0AAAATAFhQQVRIU1RST0tFX1NFUV9FTkQAAAAAAAAAAIQAAQAFAAAAs7Oz + AAEAAgEAbgAAABUAWFBBVEhTVFJPS0VfU0VRX0JFR0lOAAAAAE8AAAABAEkAAAABABMAAAAC + AGQHAAAbBAAA+gcAABsEAAAAAQACAAAAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA + AAAAAAAAAAAAAAAAhAABAAUAAACzs7MAAYUAAQAFAAAAAAAAAABtAAMAMwAAAAIAZAcAABsE + AAD6BwAAGwQAAAQAGgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAACAQAdAAAAEwBY + UEFUSFNUUk9LRV9TRVFfRU5EAAAAAAAAAACEAAEABQAAALOzswABAAIBAG4AAAAVAFhQQVRI + U1RST0tFX1NFUV9CRUdJTgAAAABPAAAAAQBJAAAAAQATAAAAAgD6BwAATB4AAPoHAAAbBAAA + AAEAAgAAAAAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAIQAAQAF + AAAAs7OzAAGFAAEABQAAAAAAAAAAbQADADMAAAACAPoHAABMHgAA+gcAABsEAAAEABoAAAAB + AAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAgEAHQAAABMAWFBBVEhTVFJPS0VfU0VRX0VO + RAAAAAAAAAAAhQABAAUAAACGRQAAAYQAAQAFAAAAAAAAAABvAAIALgAAAAEABQBtEwAATB4A + AFMqAABMHgAAUyoAACMXAABtEwAAIxcAAG0TAABMHgAAAACFAAEABQAAAA5C/wABhAABAAUA + AAAAAAAAAG8AAgAuAAAAAQAFAG0TAAAjFwAAUyoAACMXAABTKgAAlhUAAG0TAACWFQAAbRMA + ACMXAAAAAIUAAQAFAAAAINP/AAGEAAEABQAAAAAAAAAAbwACAC4AAAABAAUAbRMAAJYVAABT + KgAAlhUAAFMqAABtEAAAbRMAAG0QAABtEwAAlhUAAAAAhQABAAUAAAAcnVcAAYQAAQAFAAAA + AAAAAABvAAIALgAAAAEABQBtEwAAbRAAAFMqAABtEAAAUyoAANYNAABtEwAA1g0AAG0TAABt + EAAAAACFAAEABQAAACEAfgABhAABAAUAAAAAAAAAAG8AAgAuAAAAAQAFAG0TAADWDQAAUyoA + ANYNAABTKgAAJQcAAG0TAAAlBwAAbRMAANYNAAAAAAACAQAgAAAAFgBYVEVYVF9QQUlOVFNI + QVBFX0JFR0lOAAAAAAAAAACKAAEAQQAAAAMAOwAAAA8ATGliZXJhdGlvbiBTYW5zAAAAAAAA + YQEAAP//AAACAAUAAAAAAAAACQgAAAAAAAAAAAD/AwAAAAAAiAABAAIAAAABAIcAAQAFAAAA + /////wCGAAEABAAAAAAAAABxAAIANgAAACQdAACAIAAABAAAAFMAbwBtAGUAAAAEAAQAAADs + AAAAowEAAMMCAAB6AwAABABTAG8AbQBlAAACAQATAAAACQBYVEVYVF9FT0MAAAAAAAAAAAAC + AQATAAAACQBYVEVYVF9FT0MBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MCAAAAAAAAAAAC + AQATAAAACQBYVEVYVF9FT0MDAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0wAAAAAAAAAAAAC + AQATAAAACQBYVEVYVF9FT1AAAAAAAAAAAAACAQAeAAAAFABYVEVYVF9QQUlOVFNIQVBFX0VO + RAAAAAAAAAAAAAIBACAAAAAWAFhURVhUX1BBSU5UU0hBUEVfQkVHSU4AAAAAAAAAAIoAAQBB + AAAAAwA7AAAADwBMaWJlcmF0aW9uIFNhbnMAAAAAAABhAQAA//8AAAIABQAAAAAAAAAJCAAA + AAAAAAAAAP8DAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHEAAgAm + AAAAkQUAAMMeAAACAAAAowAwAAAAAgACAAAAtwAAAG8BAAACAKMAMAAAAgEAEwAAAAkAWFRF + WFRfRU9DAAAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9DAQAAAAAAAAAAAgEAEwAAAAkAWFRF + WFRfRU9XAQAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9MAAAAAAAAAAAAAgEAEwAAAAkAWFRF + WFRfRU9QAAAAAAAAAAAAAgEAHgAAABQAWFRFWFRfUEFJTlRTSEFQRV9FTkQAAAAAAAAAAAAC + AQAgAAAAFgBYVEVYVF9QQUlOVFNIQVBFX0JFR0lOAAAAAAAAAACKAAEAQQAAAAMAOwAAAA8A + TGliZXJhdGlvbiBTYW5zAAAAAAAAYQEAAP//AAACAAUAAAAAAAAACQgAAAAAAAAAAAD/AwAA + AAAAiAABAAIAAAABAIcAAQAFAAAA/////wCGAAEABAAAAAAAAABxAAIANgAAACMEAAAFGwAA + BAAAAKMANQAwADAAAAAEAAQAAAC3AAAAbwEAACYCAADdAgAABACjADUAMAAwAAACAQATAAAA + CQBYVEVYVF9FT0MAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MBAAAAAAAAAAACAQATAAAA + CQBYVEVYVF9FT1cBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MCAAAAAAAAAAACAQATAAAA + CQBYVEVYVF9FT0MDAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0wAAAAAAAAAAAACAQATAAAA + CQBYVEVYVF9FT1AAAAAAAAAAAAACAQAeAAAAFABYVEVYVF9QQUlOVFNIQVBFX0VORAAAAAAA + AAAAAAIBACAAAAAWAFhURVhUX1BBSU5UU0hBUEVfQkVHSU4AAAAAAAAAAIoAAQBBAAAAAwA7 + AAAADwBMaWJlcmF0aW9uIFNhbnMAAAAAAABhAQAA//8AAAIABQAAAAAAAAAJCAAAAAAAAAAA + AP8DAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHEAAgBGAAAAAwMA + AEcXAAAGAAAAowAxACwAMAAwADAAAAAGAAYAAAC3AAAAbwEAANcBAACPAgAARgMAAP0DAAAG + AKMAMQAsADAAMAAwAAACAQATAAAACQBYVEVYVF9FT0MAAAAAAAAAAAACAQATAAAACQBYVEVY + VF9FT0MBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1cBAAAAAAAAAAACAQATAAAACQBYVEVY + VF9FT0MCAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MDAAAAAAAAAAACAQATAAAACQBYVEVY + VF9FT0MEAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MFAAAAAAAAAAACAQATAAAACQBYVEVY + VF9FT0wAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1AAAAAAAAAAAAACAQAeAAAAFABYVEVY + VF9QQUlOVFNIQVBFX0VORAAAAAAAAAAAAAIBACAAAAAWAFhURVhUX1BBSU5UU0hBUEVfQkVH + SU4AAAAAAAAAAIoAAQBBAAAAAwA7AAAADwBMaWJlcmF0aW9uIFNhbnMAAAAAAABhAQAA//8A + AAIABQAAAAAAAAAJCAAAAAAAAAAAAP8DAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYA + AQAEAAAAAAAAAHEAAgBGAAAAAwMAAIkTAAAGAAAAowAxACwANQAwADAAAAAGAAYAAAC3AAAA + bwEAANcBAACPAgAARgMAAP0DAAAGAKMAMQAsADUAMAAwAAACAQATAAAACQBYVEVYVF9FT0MA + AAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1cB + AAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MCAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MD + AAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MEAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MF + AAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0wAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1AA + AAAAAAAAAAACAQAeAAAAFABYVEVYVF9QQUlOVFNIQVBFX0VORAAAAAAAAAAAAAIBACAAAAAW + AFhURVhUX1BBSU5UU0hBUEVfQkVHSU4AAAAAAAAAAIoAAQBBAAAAAwA7AAAADwBMaWJlcmF0 + aW9uIFNhbnMAAAAAAABhAQAA//8AAAIABQAAAAAAAAAJCAAAAAAAAAAAAP8DAAAAAACIAAEA + AgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHEAAgBGAAAAAwMAAMsPAAAGAAAAowAy + ACwAMAAwADAAAAAGAAYAAAC3AAAAbwEAANcBAACPAgAARgMAAP0DAAAGAKMAMgAsADAAMAAw + AAACAQATAAAACQBYVEVYVF9FT0MAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MBAAAAAAAA + AAACAQATAAAACQBYVEVYVF9FT1cBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MCAAAAAAAA + AAACAQATAAAACQBYVEVYVF9FT0MDAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MEAAAAAAAA + AAACAQATAAAACQBYVEVYVF9FT0MFAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0wAAAAAAAAA + AAACAQATAAAACQBYVEVYVF9FT1AAAAAAAAAAAAACAQAeAAAAFABYVEVYVF9QQUlOVFNIQVBF + X0VORAAAAAAAAAAAAAIBACAAAAAWAFhURVhUX1BBSU5UU0hBUEVfQkVHSU4AAAAAAAAAAIoA + AQBBAAAAAwA7AAAADwBMaWJlcmF0aW9uIFNhbnMAAAAAAABhAQAA//8AAAIABQAAAAAAAAAJ + CAAAAAAAAAAAAP8DAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHEA + AgBGAAAAAwMAAA0MAAAGAAAAowAyACwANQAwADAAAAAGAAYAAAC3AAAAbwEAANcBAACPAgAA + RgMAAP0DAAAGAKMAMgAsADUAMAAwAAACAQATAAAACQBYVEVYVF9FT0MAAAAAAAAAAAACAQAT + AAAACQBYVEVYVF9FT0MBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1cBAAAAAAAAAAACAQAT + AAAACQBYVEVYVF9FT0MCAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MDAAAAAAAAAAACAQAT + AAAACQBYVEVYVF9FT0MEAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MFAAAAAAAAAAACAQAT + AAAACQBYVEVYVF9FT0wAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1AAAAAAAAAAAAACAQAe + AAAAFABYVEVYVF9QQUlOVFNIQVBFX0VORAAAAAAAAAAAAAIBACAAAAAWAFhURVhUX1BBSU5U + U0hBUEVfQkVHSU4AAAAAAAAAAIoAAQBBAAAAAwA7AAAADwBMaWJlcmF0aW9uIFNhbnMAAAAA + AABhAQAA//8AAAIABQAAAAAAAAAJCAAAAAAAAAAAAP8DAAAAAACIAAEAAgAAAAEAhwABAAUA + AAD/////AIYAAQAEAAAAAAAAAHEAAgBGAAAAAwMAAE8IAAAGAAAAowAzACwAMAAwADAAAAAG + AAYAAAC3AAAAbwEAANcBAACPAgAARgMAAP0DAAAGAKMAMwAsADAAMAAwAAACAQATAAAACQBY + VEVYVF9FT0MAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MBAAAAAAAAAAACAQATAAAACQBY + VEVYVF9FT1cBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MCAAAAAAAAAAACAQATAAAACQBY + VEVYVF9FT0MDAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MEAAAAAAAAAAACAQATAAAACQBY + VEVYVF9FT0MFAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0wAAAAAAAAAAAACAQATAAAACQBY + VEVYVF9FT1AAAAAAAAAAAAACAQAeAAAAFABYVEVYVF9QQUlOVFNIQVBFX0VORAAAAAAAAAAA + AAIBACAAAAAWAFhURVhUX1BBSU5UU0hBUEVfQkVHSU4AAAAAAAAAAIoAAQBBAAAAAwA7AAAA + DwBMaWJlcmF0aW9uIFNhbnMAAAAAAABhAQAA//8AAAIABQAAAAAAAAAJCAAAAAAAAAAAAP8D + AAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHEAAgBGAAAAAwMAAJIE + AAAGAAAAowAzACwANQAwADAAAAAGAAYAAAC3AAAAbwEAANcBAACPAgAARgMAAP0DAAAGAKMA + MwAsADUAMAAwAAACAQATAAAACQBYVEVYVF9FT0MAAAAAAAAAAAACAQATAAAACQBYVEVYVF9F + T0MBAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1cBAAAAAAAAAAACAQATAAAACQBYVEVYVF9F + T0MCAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MDAAAAAAAAAAACAQATAAAACQBYVEVYVF9F + T0MEAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MFAAAAAAAAAAACAQATAAAACQBYVEVYVF9F + T0wAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1AAAAAAAAAAAAACAQAeAAAAFABYVEVYVF9Q + QUlOVFNIQVBFX0VORAAAAAAAAAAAhQABAAUAAACGRQAAAYQAAQAFAAAAAAAAAABvAAIANgAA + AAEABgAlOQAA2RUAALs4AADZFQAAuzgAAAYVAACOOQAABhUAAI45AADZFQAAJTkAANkVAAAA + AIUAAQAFAAAADkL/AAGEAAEABQAAAAAAAAAAbwACADYAAAABAAYAJTkAAOsTAAC7OAAA6xMA + ALs4AAAYEwAAjjkAABgTAACOOQAA6xMAACU5AADrEwAAAACFAAEABQAAACDT/wABhAABAAUA + AAAAAAAAAG8AAgA2AAAAAQAGACU5AAD9EQAAuzgAAP0RAAC7OAAAKhEAAI45AAAqEQAAjjkA + AP0RAAAlOQAA/REAAAAAhQABAAUAAAAcnVcAAYQAAQAFAAAAAAAAAABvAAIANgAAAAEABgAl + OQAADxAAALs4AAAPEAAAuzgAADwPAACOOQAAPA8AAI45AAAPEAAAJTkAAA8QAAAAAIUAAQAF + AAAAIQB+AAGEAAEABQAAAAAAAAAAbwACADYAAAABAAYAJTkAACEOAAC7OAAAIQ4AALs4AABO + DQAAjjkAAE4NAACOOQAAIQ4AACU5AAAhDgAAAAAAAgEAIAAAABYAWFRFWFRfUEFJTlRTSEFQ + RV9CRUdJTgAAAAAAAAAAigABAEEAAAADADsAAAAPAExpYmVyYXRpb24gU2FucwAAAAAAAGEB + AAD//wAAAgAFAAAAAAAAAAkIAAAAAAAAAAAA/wMAAAAAAIgAAQACAAAAAQCHAAEABQAAAP// + //8AhgABAAQAAAAAAAAAcQACADYAAADyOQAALQ4AAAQAAABGAGkAdgBlAAAABAAEAAAA0QAA + ACABAACjAQAAWgIAAAQARgBpAHYAZQAAAgEAEwAAAAkAWFRFWFRfRU9DAAAAAAAAAAAAAgEA + EwAAAAkAWFRFWFRfRU9DAQAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9DAgAAAAAAAAAAAgEA + EwAAAAkAWFRFWFRfRU9DAwAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9MAAAAAAAAAAAAAgEA + EwAAAAkAWFRFWFRfRU9QAAAAAAAAAAAAAgEAHgAAABQAWFRFWFRfUEFJTlRTSEFQRV9FTkQA + AAAAAAAAAAACAQAgAAAAFgBYVEVYVF9QQUlOVFNIQVBFX0JFR0lOAAAAAAAAAACKAAEAQQAA + AAMAOwAAAA8ATGliZXJhdGlvbiBTYW5zAAAAAAAAYQEAAP//AAACAAUAAAAAAAAACQgAAAAA + AAAAAAD/AwAAAAAAiAABAAIAAAABAIcAAQAFAAAA/////wCGAAEABAAAAAAAAABxAAIANgAA + API5AAAbEAAABAAAAEYAbwB1AHIAAAAEAAQAAADRAAAAiQEAAEACAACpAgAABABGAG8AdQBy + AAACAQATAAAACQBYVEVYVF9FT0MAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MBAAAAAAAA + AAACAQATAAAACQBYVEVYVF9FT0MCAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT0MDAAAAAAAA + AAACAQATAAAACQBYVEVYVF9FT0wAAAAAAAAAAAACAQATAAAACQBYVEVYVF9FT1AAAAAAAAAA + AAACAQAeAAAAFABYVEVYVF9QQUlOVFNIQVBFX0VORAAAAAAAAAAAAAIBACAAAAAWAFhURVhU + X1BBSU5UU0hBUEVfQkVHSU4AAAAAAAAAAIoAAQBBAAAAAwA7AAAADwBMaWJlcmF0aW9uIFNh + bnMAAAAAAABhAQAA//8AAAIABQAAAAAAAAAJCAAAAAAAAAAAAP8DAAAAAACIAAEAAgAAAAEA + hwABAAUAAAD/////AIYAAQAEAAAAAAAAAHEAAgA+AAAA8jkAAAkSAAAFAAAAVABoAHIAZQBl + AAAABQAFAAAAtwAAAG8BAADXAQAAjwIAAEYDAAAFAFQAaAByAGUAZQAAAgEAEwAAAAkAWFRF + WFRfRU9DAAAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9DAQAAAAAAAAAAAgEAEwAAAAkAWFRF + WFRfRU9DAgAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9DAwAAAAAAAAAAAgEAEwAAAAkAWFRF + WFRfRU9DBAAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9MAAAAAAAAAAAAAgEAEwAAAAkAWFRF + WFRfRU9QAAAAAAAAAAAAAgEAHgAAABQAWFRFWFRfUEFJTlRTSEFQRV9FTkQAAAAAAAAAAAAC + AQAgAAAAFgBYVEVYVF9QQUlOVFNIQVBFX0JFR0lOAAAAAAAAAACKAAEAQQAAAAMAOwAAAA8A + TGliZXJhdGlvbiBTYW5zAAAAAAAAYQEAAP//AAACAAUAAAAAAAAACQgAAAAAAAAAAAD/AwAA + AAAAiAABAAIAAAABAIcAAQAFAAAA/////wCGAAEABAAAAAAAAABxAAIALgAAAPI5AAD3EwAA + AwAAAFQAdwBvAAAAAwADAAAAnQAAAIkBAABAAgAAAwBUAHcAbwAAAgEAEwAAAAkAWFRFWFRf + RU9DAAAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9DAQAAAAAAAAAAAgEAEwAAAAkAWFRFWFRf + RU9DAgAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9MAAAAAAAAAAAAAgEAEwAAAAkAWFRFWFRf + RU9QAAAAAAAAAAAAAgEAHgAAABQAWFRFWFRfUEFJTlRTSEFQRV9FTkQAAAAAAAAAAAACAQAg + AAAAFgBYVEVYVF9QQUlOVFNIQVBFX0JFR0lOAAAAAAAAAACKAAEAQQAAAAMAOwAAAA8ATGli + ZXJhdGlvbiBTYW5zAAAAAAAAYQEAAP//AAACAAUAAAAAAAAACQgAAAAAAAAAAAD/AwAAAAAA + iAABAAIAAAABAIcAAQAFAAAA/////wCGAAEABAAAAAAAAABxAAIALgAAAPI5AADlFQAAAwAA + AE8AbgBlAAAAAwADAAAABgEAAL0BAAB0AgAAAwBPAG4AZQAAAgEAEwAAAAkAWFRFWFRfRU9D + AAAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9DAQAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9D + AgAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9MAAAAAAAAAAAAAgEAEwAAAAkAWFRFWFRfRU9Q + AAAAAAAAAAAAAgEAHgAAABQAWFRFWFRfUEFJTlRTSEFQRV9FTkQAAAAAAAAAAIwAAQAAAAAA + iwABAAIAAAAgAIIAAQAhAAAAAgAbAAAAAgACAAAAAAAAACcjAAABAAAAAAB/PgAAAgAAjAAB + AAAAAACMAAEAAAAAAA== + + + + + + + + Summary + + + Some + + + + + + One + + + £957 + + + + + + Two + + + £207 + + + + + + Three + + + £690 + + + + + + Four + + + £346 + + + + + + Five + + + £894 + + + + + + + + + + To reproduce bug: + + + + + + + Save as Flat ODS: extension '.fods' + + + + + + + Reload … bingo … + + + + + + + + + 956.5941735636 + + + 573.4103277791 + + + + + 207.4256495107 + + + 604.592139367 + + + + + 689.5083636045 + + + 44.302029768 + + + + + 346.0625661537 + + + 835.6307845097 + + + + + 893.9812064637 + + + 220.4455654137 + + + + + 140.1847645175 + + + 130.7745140512 + + + + + + + \ No newline at end of file diff --git a/chart2/qa/extras/data/odp/chart.odp b/chart2/qa/extras/data/odp/chart.odp new file mode 100644 index 000000000..81a5f56b2 Binary files /dev/null and b/chart2/qa/extras/data/odp/chart.odp differ diff --git a/chart2/qa/extras/data/odp/ellipticalGradientFill.odp b/chart2/qa/extras/data/odp/ellipticalGradientFill.odp new file mode 100644 index 000000000..754f439e5 Binary files /dev/null and b/chart2/qa/extras/data/odp/ellipticalGradientFill.odp differ diff --git a/chart2/qa/extras/data/odp/tdf119029.odp b/chart2/qa/extras/data/odp/tdf119029.odp new file mode 100644 index 000000000..87e4a03c8 Binary files /dev/null and b/chart2/qa/extras/data/odp/tdf119029.odp differ diff --git a/chart2/qa/extras/data/odp/tdf121189.odp b/chart2/qa/extras/data/odp/tdf121189.odp new file mode 100644 index 000000000..6f99e0054 Binary files /dev/null and b/chart2/qa/extras/data/odp/tdf121189.odp differ diff --git a/chart2/qa/extras/data/odp/tdf123206.odp b/chart2/qa/extras/data/odp/tdf123206.odp new file mode 100644 index 000000000..1975756bc Binary files /dev/null and b/chart2/qa/extras/data/odp/tdf123206.odp differ diff --git a/chart2/qa/extras/data/ods/ErrorBarRange.ods b/chart2/qa/extras/data/ods/ErrorBarRange.ods new file mode 100644 index 000000000..28e6aeedd Binary files /dev/null and b/chart2/qa/extras/data/ods/ErrorBarRange.ods differ diff --git a/chart2/qa/extras/data/ods/PivotChartRoundTrip.ods b/chart2/qa/extras/data/ods/PivotChartRoundTrip.ods new file mode 100644 index 000000000..c34521e0b Binary files /dev/null and b/chart2/qa/extras/data/ods/PivotChartRoundTrip.ods differ diff --git a/chart2/qa/extras/data/ods/PivotTableExample.ods b/chart2/qa/extras/data/ods/PivotTableExample.ods new file mode 100644 index 000000000..bc8df8170 Binary files /dev/null and b/chart2/qa/extras/data/ods/PivotTableExample.ods differ diff --git a/chart2/qa/extras/data/ods/axis-numformats-linked.ods b/chart2/qa/extras/data/ods/axis-numformats-linked.ods new file mode 100644 index 000000000..ddaa9c901 Binary files /dev/null and b/chart2/qa/extras/data/ods/axis-numformats-linked.ods differ diff --git a/chart2/qa/extras/data/ods/axis_number_format.ods b/chart2/qa/extras/data/ods/axis_number_format.ods new file mode 100644 index 000000000..52e979a49 Binary files /dev/null and b/chart2/qa/extras/data/ods/axis_number_format.ods differ diff --git a/chart2/qa/extras/data/ods/chart.ods b/chart2/qa/extras/data/ods/chart.ods new file mode 100644 index 000000000..2a9916aca Binary files /dev/null and b/chart2/qa/extras/data/ods/chart.ods differ diff --git a/chart2/qa/extras/data/ods/combined_chart_secondary_axis.ods b/chart2/qa/extras/data/ods/combined_chart_secondary_axis.ods new file mode 100644 index 000000000..d125bc23d Binary files /dev/null and b/chart2/qa/extras/data/ods/combined_chart_secondary_axis.ods differ diff --git a/chart2/qa/extras/data/ods/error_bar.ods b/chart2/qa/extras/data/ods/error_bar.ods new file mode 100644 index 000000000..9c3adbbca Binary files /dev/null and b/chart2/qa/extras/data/ods/error_bar.ods differ diff --git a/chart2/qa/extras/data/ods/error_bar_properties.ods b/chart2/qa/extras/data/ods/error_bar_properties.ods new file mode 100644 index 000000000..056be88b2 Binary files /dev/null and b/chart2/qa/extras/data/ods/error_bar_properties.ods differ diff --git a/chart2/qa/extras/data/ods/error_bar_range.ods b/chart2/qa/extras/data/ods/error_bar_range.ods new file mode 100644 index 000000000..27a0103e5 Binary files /dev/null and b/chart2/qa/extras/data/ods/error_bar_range.ods differ diff --git a/chart2/qa/extras/data/ods/fdo60083.ods b/chart2/qa/extras/data/ods/fdo60083.ods new file mode 100644 index 000000000..74704f618 Binary files /dev/null and b/chart2/qa/extras/data/ods/fdo60083.ods differ diff --git a/chart2/qa/extras/data/ods/labelString.ods b/chart2/qa/extras/data/ods/labelString.ods new file mode 100644 index 000000000..2b7e03c8e Binary files /dev/null and b/chart2/qa/extras/data/ods/labelString.ods differ diff --git a/chart2/qa/extras/data/ods/legend_overlay.ods b/chart2/qa/extras/data/ods/legend_overlay.ods new file mode 100644 index 000000000..fade62640 Binary files /dev/null and b/chart2/qa/extras/data/ods/legend_overlay.ods differ diff --git a/chart2/qa/extras/data/ods/multilevelcat.ods b/chart2/qa/extras/data/ods/multilevelcat.ods new file mode 100644 index 000000000..76b140a87 Binary files /dev/null and b/chart2/qa/extras/data/ods/multilevelcat.ods differ diff --git a/chart2/qa/extras/data/ods/multiple_axis.ods b/chart2/qa/extras/data/ods/multiple_axis.ods new file mode 100644 index 000000000..7e2a505cc Binary files /dev/null and b/chart2/qa/extras/data/ods/multiple_axis.ods differ diff --git a/chart2/qa/extras/data/ods/pie_chart_100_and_0.ods b/chart2/qa/extras/data/ods/pie_chart_100_and_0.ods new file mode 100644 index 000000000..a6ff5d6aa Binary files /dev/null and b/chart2/qa/extras/data/ods/pie_chart_100_and_0.ods differ diff --git a/chart2/qa/extras/data/ods/secondary_axis.ods b/chart2/qa/extras/data/ods/secondary_axis.ods new file mode 100644 index 000000000..3f8f269c0 Binary files /dev/null and b/chart2/qa/extras/data/ods/secondary_axis.ods differ diff --git a/chart2/qa/extras/data/ods/smoothedLines.ods b/chart2/qa/extras/data/ods/smoothedLines.ods new file mode 100644 index 000000000..725827e63 Binary files /dev/null and b/chart2/qa/extras/data/ods/smoothedLines.ods differ diff --git a/chart2/qa/extras/data/ods/stepped_lines.ods b/chart2/qa/extras/data/ods/stepped_lines.ods new file mode 100644 index 000000000..23d443ab5 Binary files /dev/null and b/chart2/qa/extras/data/ods/stepped_lines.ods differ diff --git a/chart2/qa/extras/data/ods/tdf108021.ods b/chart2/qa/extras/data/ods/tdf108021.ods new file mode 100644 index 000000000..ebbc5e56f Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf108021.ods differ diff --git a/chart2/qa/extras/data/ods/tdf123774.ods b/chart2/qa/extras/data/ods/tdf123774.ods new file mode 100644 index 000000000..5c422b58c Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf123774.ods differ diff --git a/chart2/qa/extras/data/ods/tdf128432.ods b/chart2/qa/extras/data/ods/tdf128432.ods new file mode 100644 index 000000000..a93822fc9 Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf128432.ods differ diff --git a/chart2/qa/extras/data/ods/tdf131115.ods b/chart2/qa/extras/data/ods/tdf131115.ods new file mode 100644 index 000000000..76a87c2c2 Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf131115.ods differ diff --git a/chart2/qa/extras/data/ods/tdf131979.ods b/chart2/qa/extras/data/ods/tdf131979.ods new file mode 100644 index 000000000..3dfcf6b69 Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf131979.ods differ diff --git a/chart2/qa/extras/data/ods/tdf132076.ods b/chart2/qa/extras/data/ods/tdf132076.ods new file mode 100644 index 000000000..348dd0d71 Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf132076.ods differ diff --git a/chart2/qa/extras/data/ods/tdf59857.ods b/chart2/qa/extras/data/ods/tdf59857.ods new file mode 100644 index 000000000..e60e9c4c1 Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf59857.ods differ diff --git a/chart2/qa/extras/data/ods/tdf64224.ods b/chart2/qa/extras/data/ods/tdf64224.ods new file mode 100644 index 000000000..e60e9c4c1 Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf64224.ods differ diff --git a/chart2/qa/extras/data/ods/tdf86624.ods b/chart2/qa/extras/data/ods/tdf86624.ods new file mode 100644 index 000000000..05702371a Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf86624.ods differ diff --git a/chart2/qa/extras/data/ods/testChartMainWithSubTitle.ods b/chart2/qa/extras/data/ods/testChartMainWithSubTitle.ods new file mode 100644 index 000000000..5ae4fa7d9 Binary files /dev/null and b/chart2/qa/extras/data/ods/testChartMainWithSubTitle.ods differ diff --git a/chart2/qa/extras/data/ods/testChartSubTitle.ods b/chart2/qa/extras/data/ods/testChartSubTitle.ods new file mode 100644 index 000000000..1c7814195 Binary files /dev/null and b/chart2/qa/extras/data/ods/testChartSubTitle.ods differ diff --git a/chart2/qa/extras/data/ods/testColorGradientWithTransparancy.ods b/chart2/qa/extras/data/ods/testColorGradientWithTransparancy.ods new file mode 100644 index 000000000..d8a41c02c Binary files /dev/null and b/chart2/qa/extras/data/ods/testColorGradientWithTransparancy.ods differ diff --git a/chart2/qa/extras/data/ods/test_CrossBetween.ods b/chart2/qa/extras/data/ods/test_CrossBetween.ods new file mode 100644 index 000000000..e59546b3d Binary files /dev/null and b/chart2/qa/extras/data/ods/test_CrossBetween.ods differ diff --git a/chart2/qa/extras/data/ods/trend_calculators.ods b/chart2/qa/extras/data/ods/trend_calculators.ods new file mode 100644 index 000000000..fdc5ea42d Binary files /dev/null and b/chart2/qa/extras/data/ods/trend_calculators.ods differ diff --git a/chart2/qa/extras/data/ods/trendline.ods b/chart2/qa/extras/data/ods/trendline.ods new file mode 100644 index 000000000..707d51020 Binary files /dev/null and b/chart2/qa/extras/data/ods/trendline.ods differ diff --git a/chart2/qa/extras/data/odt/axis-position.odt b/chart2/qa/extras/data/odt/axis-position.odt new file mode 100644 index 000000000..35ea152aa Binary files /dev/null and b/chart2/qa/extras/data/odt/axis-position.odt differ diff --git a/chart2/qa/extras/data/odt/chart.odt b/chart2/qa/extras/data/odt/chart.odt new file mode 100644 index 000000000..5f2dd34d2 Binary files /dev/null and b/chart2/qa/extras/data/odt/chart.odt differ diff --git a/chart2/qa/extras/data/odt/multilevelcat.odt b/chart2/qa/extras/data/odt/multilevelcat.odt new file mode 100644 index 000000000..8148e1be1 Binary files /dev/null and b/chart2/qa/extras/data/odt/multilevelcat.odt differ diff --git a/chart2/qa/extras/data/odt/scatter-plot-labels.odt b/chart2/qa/extras/data/odt/scatter-plot-labels.odt new file mode 100644 index 000000000..ab8f24324 Binary files /dev/null and b/chart2/qa/extras/data/odt/scatter-plot-labels.odt differ diff --git a/chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt b/chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt new file mode 100644 index 000000000..06e15a6b0 Binary files /dev/null and b/chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt differ diff --git a/chart2/qa/extras/data/odt/tdf108022.odt b/chart2/qa/extras/data/odt/tdf108022.odt new file mode 100644 index 000000000..b8659ec32 Binary files /dev/null and b/chart2/qa/extras/data/odt/tdf108022.odt differ diff --git a/chart2/qa/extras/data/odt/tdf114657.odt b/chart2/qa/extras/data/odt/tdf114657.odt new file mode 100644 index 000000000..4c99963b0 Binary files /dev/null and b/chart2/qa/extras/data/odt/tdf114657.odt differ diff --git a/chart2/qa/extras/data/odt/tdf128733.odt b/chart2/qa/extras/data/odt/tdf128733.odt new file mode 100644 index 000000000..18aace26c Binary files /dev/null and b/chart2/qa/extras/data/odt/tdf128733.odt differ diff --git a/chart2/qa/extras/data/odt/tdf131143.odt b/chart2/qa/extras/data/odt/tdf131143.odt new file mode 100644 index 000000000..e8ffeaf5a Binary files /dev/null and b/chart2/qa/extras/data/odt/tdf131143.odt differ diff --git a/chart2/qa/extras/data/odt/testPieChartWallLineStyle.odt b/chart2/qa/extras/data/odt/testPieChartWallLineStyle.odt new file mode 100644 index 000000000..0e1ab533b Binary files /dev/null and b/chart2/qa/extras/data/odt/testPieChartWallLineStyle.odt differ diff --git a/chart2/qa/extras/data/ppt/chart.ppt b/chart2/qa/extras/data/ppt/chart.ppt new file mode 100644 index 000000000..0efffaf36 Binary files /dev/null and b/chart2/qa/extras/data/ppt/chart.ppt differ diff --git a/chart2/qa/extras/data/pptx/bnc864396.pptx b/chart2/qa/extras/data/pptx/bnc864396.pptx new file mode 100644 index 000000000..e2e05c516 Binary files /dev/null and b/chart2/qa/extras/data/pptx/bnc864396.pptx differ diff --git a/chart2/qa/extras/data/pptx/bnc882383.pptx b/chart2/qa/extras/data/pptx/bnc882383.pptx new file mode 100644 index 000000000..18b44f0c1 Binary files /dev/null and b/chart2/qa/extras/data/pptx/bnc882383.pptx differ diff --git a/chart2/qa/extras/data/pptx/bnc889755.pptx b/chart2/qa/extras/data/pptx/bnc889755.pptx new file mode 100644 index 000000000..f3af67765 Binary files /dev/null and b/chart2/qa/extras/data/pptx/bnc889755.pptx differ diff --git a/chart2/qa/extras/data/pptx/chart.pptx b/chart2/qa/extras/data/pptx/chart.pptx new file mode 100644 index 000000000..8f11ea53d Binary files /dev/null and b/chart2/qa/extras/data/pptx/chart.pptx differ diff --git a/chart2/qa/extras/data/pptx/percentage-number-formats.pptx b/chart2/qa/extras/data/pptx/percentage-number-formats.pptx new file mode 100644 index 000000000..280c7ef29 Binary files /dev/null and b/chart2/qa/extras/data/pptx/percentage-number-formats.pptx differ diff --git a/chart2/qa/extras/data/pptx/sparse-chart.pptx b/chart2/qa/extras/data/pptx/sparse-chart.pptx new file mode 100644 index 000000000..d91e8f52f Binary files /dev/null and b/chart2/qa/extras/data/pptx/sparse-chart.pptx differ diff --git a/chart2/qa/extras/data/pptx/stacked-bar-chart-hidden-series.pptx b/chart2/qa/extras/data/pptx/stacked-bar-chart-hidden-series.pptx new file mode 100644 index 000000000..20ba89a0b Binary files /dev/null and b/chart2/qa/extras/data/pptx/stacked-bar-chart-hidden-series.pptx differ diff --git a/chart2/qa/extras/data/pptx/stacked-non-stacked-mix-y-axis.pptx b/chart2/qa/extras/data/pptx/stacked-non-stacked-mix-y-axis.pptx new file mode 100644 index 000000000..27d099d40 Binary files /dev/null and b/chart2/qa/extras/data/pptx/stacked-non-stacked-mix-y-axis.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf105517.pptx b/chart2/qa/extras/data/pptx/tdf105517.pptx new file mode 100644 index 000000000..ff9d747f0 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf105517.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf106217.pptx b/chart2/qa/extras/data/pptx/tdf106217.pptx new file mode 100644 index 000000000..64fb968b8 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf106217.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf115107-2.pptx b/chart2/qa/extras/data/pptx/tdf115107-2.pptx new file mode 100644 index 000000000..629056ecc Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf115107-2.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf115107.pptx b/chart2/qa/extras/data/pptx/tdf115107.pptx new file mode 100644 index 000000000..2ec5c2cd2 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf115107.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf115859.pptx b/chart2/qa/extras/data/pptx/tdf115859.pptx new file mode 100644 index 000000000..07943041b Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf115859.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf116163.pptx b/chart2/qa/extras/data/pptx/tdf116163.pptx new file mode 100644 index 000000000..5fbee8304 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf116163.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf121205.pptx b/chart2/qa/extras/data/pptx/tdf121205.pptx new file mode 100644 index 000000000..e60849ec0 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf121205.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf122765.pptx b/chart2/qa/extras/data/pptx/tdf122765.pptx new file mode 100644 index 000000000..948190c30 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf122765.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf125444.pptx b/chart2/qa/extras/data/pptx/tdf125444.pptx new file mode 100644 index 000000000..e78efecd6 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf125444.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf127393.pptx b/chart2/qa/extras/data/pptx/tdf127393.pptx new file mode 100644 index 000000000..7c4047817 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf127393.pptx differ diff --git a/chart2/qa/extras/data/pptx/tdf48041.pptx b/chart2/qa/extras/data/pptx/tdf48041.pptx new file mode 100644 index 000000000..b0872f84f Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf48041.pptx differ diff --git a/chart2/qa/extras/data/pptx/testChartTitlePropertiesBitmapFill.pptx b/chart2/qa/extras/data/pptx/testChartTitlePropertiesBitmapFill.pptx new file mode 100644 index 000000000..395546edb Binary files /dev/null and b/chart2/qa/extras/data/pptx/testChartTitlePropertiesBitmapFill.pptx differ diff --git a/chart2/qa/extras/data/pptx/testChartTitlePropertiesColorFill.pptx b/chart2/qa/extras/data/pptx/testChartTitlePropertiesColorFill.pptx new file mode 100644 index 000000000..361bdd643 Binary files /dev/null and b/chart2/qa/extras/data/pptx/testChartTitlePropertiesColorFill.pptx differ diff --git a/chart2/qa/extras/data/pptx/testChartTitlePropertiesGradientFill.pptx b/chart2/qa/extras/data/pptx/testChartTitlePropertiesGradientFill.pptx new file mode 100644 index 000000000..a77896dcd Binary files /dev/null and b/chart2/qa/extras/data/pptx/testChartTitlePropertiesGradientFill.pptx differ diff --git a/chart2/qa/extras/data/xls/axis_sourceformatting.xls b/chart2/qa/extras/data/xls/axis_sourceformatting.xls new file mode 100644 index 000000000..2ee38b720 Binary files /dev/null and b/chart2/qa/extras/data/xls/axis_sourceformatting.xls differ diff --git a/chart2/qa/extras/data/xls/chart.xls b/chart2/qa/extras/data/xls/chart.xls new file mode 100644 index 000000000..7c81d7f49 Binary files /dev/null and b/chart2/qa/extras/data/xls/chart.xls differ diff --git a/chart2/qa/extras/data/xls/piechart_outside.xls b/chart2/qa/extras/data/xls/piechart_outside.xls new file mode 100644 index 000000000..02a4f7b85 Binary files /dev/null and b/chart2/qa/extras/data/xls/piechart_outside.xls differ diff --git a/chart2/qa/extras/data/xls/source_number_format_axis.xls b/chart2/qa/extras/data/xls/source_number_format_axis.xls new file mode 100644 index 000000000..bc54593ac Binary files /dev/null and b/chart2/qa/extras/data/xls/source_number_format_axis.xls differ diff --git a/chart2/qa/extras/data/xlsx/add_series_secondary_axis.xlsx b/chart2/qa/extras/data/xlsx/add_series_secondary_axis.xlsx new file mode 100644 index 000000000..03d7a47f6 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/add_series_secondary_axis.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx b/chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx new file mode 100644 index 000000000..c15756257 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/autotitledel_2007.xlsx b/chart2/qa/extras/data/xlsx/autotitledel_2007.xlsx new file mode 100644 index 000000000..9ce71cf4e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/autotitledel_2007.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/autotitledel_2013.xlsx b/chart2/qa/extras/data/xlsx/autotitledel_2013.xlsx new file mode 100644 index 000000000..a5070273a Binary files /dev/null and b/chart2/qa/extras/data/xlsx/autotitledel_2013.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx b/chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx new file mode 100644 index 000000000..cc3b1df8a Binary files /dev/null and b/chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/axis_character_properties.xlsx b/chart2/qa/extras/data/xlsx/axis_character_properties.xlsx new file mode 100644 index 000000000..635aafe81 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/axis_character_properties.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/axis_title_default_rotation.xlsx b/chart2/qa/extras/data/xlsx/axis_title_default_rotation.xlsx new file mode 100644 index 000000000..5cda3af37 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/axis_title_default_rotation.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/axis_title_rotated.xlsx b/chart2/qa/extras/data/xlsx/axis_title_rotated.xlsx new file mode 100644 index 000000000..29e42d8a4 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/axis_title_rotated.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/axis_title_rotation.xlsx b/chart2/qa/extras/data/xlsx/axis_title_rotation.xlsx new file mode 100644 index 000000000..fc90e2bf4 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/axis_title_rotation.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/bar_chart_simple.xlsx b/chart2/qa/extras/data/xlsx/bar_chart_simple.xlsx new file mode 100644 index 000000000..52040bf2c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/bar_chart_simple.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/barchart_outend.xlsx b/chart2/qa/extras/data/xlsx/barchart_outend.xlsx new file mode 100644 index 000000000..621c0c284 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/barchart_outend.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/bubble_chart_simple.xlsx b/chart2/qa/extras/data/xlsx/bubble_chart_simple.xlsx new file mode 100644 index 000000000..d13fe5ef4 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/bubble_chart_simple.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart-area-style-background.xlsx b/chart2/qa/extras/data/xlsx/chart-area-style-background.xlsx new file mode 100644 index 000000000..2baf1e206 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart-area-style-background.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart-area-style-border.xlsx b/chart2/qa/extras/data/xlsx/chart-area-style-border.xlsx new file mode 100644 index 000000000..81a6a6e60 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart-area-style-border.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart-auto-background.xlsx b/chart2/qa/extras/data/xlsx/chart-auto-background.xlsx new file mode 100644 index 000000000..a4594ad4f Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart-auto-background.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart-hatch-fill.xlsx b/chart2/qa/extras/data/xlsx/chart-hatch-fill.xlsx new file mode 100644 index 000000000..4e3394c8e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart-hatch-fill.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart-text-can-overlap.xlsx b/chart2/qa/extras/data/xlsx/chart-text-can-overlap.xlsx new file mode 100644 index 000000000..59f907dff Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart-text-can-overlap.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart.xlsx b/chart2/qa/extras/data/xlsx/chart.xlsx new file mode 100644 index 000000000..193bfc49d Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart_label_text_break.xlsx b/chart2/qa/extras/data/xlsx/chart_label_text_break.xlsx new file mode 100644 index 000000000..81c495860 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart_label_text_break.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx b/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx new file mode 100644 index 000000000..b12268025 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/chart_title.xlsx b/chart2/qa/extras/data/xlsx/chart_title.xlsx new file mode 100644 index 000000000..0b7985546 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/chart_title.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/combined_chart_secondary_axis.xlsx b/chart2/qa/extras/data/xlsx/combined_chart_secondary_axis.xlsx new file mode 100644 index 000000000..e922d4df4 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/combined_chart_secondary_axis.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/data_label.xlsx b/chart2/qa/extras/data/xlsx/data_label.xlsx new file mode 100644 index 000000000..1ccf9b698 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/data_label.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/deleted_data_labels.xlsx b/chart2/qa/extras/data/xlsx/deleted_data_labels.xlsx new file mode 100644 index 000000000..587c95608 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/deleted_data_labels.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx b/chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx new file mode 100644 index 000000000..06a052646 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/deleted_legend_entry2.xlsx b/chart2/qa/extras/data/xlsx/deleted_legend_entry2.xlsx new file mode 100644 index 000000000..ea02464b1 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/deleted_legend_entry2.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/dispBlanksAs_2007.xlsx b/chart2/qa/extras/data/xlsx/dispBlanksAs_2007.xlsx new file mode 100644 index 000000000..64e673e7c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/dispBlanksAs_2007.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/dispBlanksAs_2013.xlsx b/chart2/qa/extras/data/xlsx/dispBlanksAs_2013.xlsx new file mode 100644 index 000000000..86a0a3596 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/dispBlanksAs_2013.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/external_str_ref.xlsx b/chart2/qa/extras/data/xlsx/external_str_ref.xlsx new file mode 100644 index 000000000..f2dde80e1 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/external_str_ref.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/fdo54361-1.xlsx b/chart2/qa/extras/data/xlsx/fdo54361-1.xlsx new file mode 100644 index 000000000..dba79ef9c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/fdo54361-1.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/fdo54361.xlsx b/chart2/qa/extras/data/xlsx/fdo54361.xlsx new file mode 100644 index 000000000..2c49802a0 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/fdo54361.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/fdo70609.xlsx b/chart2/qa/extras/data/xlsx/fdo70609.xlsx new file mode 100644 index 000000000..261ef8805 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/fdo70609.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/fdo78080.xlsx b/chart2/qa/extras/data/xlsx/fdo78080.xlsx new file mode 100644 index 000000000..c4a4e3e00 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/fdo78080.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/gapWidth.xlsx b/chart2/qa/extras/data/xlsx/gapWidth.xlsx new file mode 100644 index 000000000..0e9c0eec0 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/gapWidth.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/hidden_cells.xlsx b/chart2/qa/extras/data/xlsx/hidden_cells.xlsx new file mode 100644 index 000000000..da3e2da77 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/hidden_cells.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/legend_manual_layout.xlsx b/chart2/qa/extras/data/xlsx/legend_manual_layout.xlsx new file mode 100644 index 000000000..16ea01142 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/legend_manual_layout.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/majorTickMark.xlsx b/chart2/qa/extras/data/xlsx/majorTickMark.xlsx new file mode 100644 index 000000000..2b6cdcfb3 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/majorTickMark.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/markerColor.xlsx b/chart2/qa/extras/data/xlsx/markerColor.xlsx new file mode 100644 index 000000000..65e87ff38 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/markerColor.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/minorTickMark.xlsx b/chart2/qa/extras/data/xlsx/minorTickMark.xlsx new file mode 100644 index 000000000..2d6879247 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/minorTickMark.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/no_marker.xlsx b/chart2/qa/extras/data/xlsx/no_marker.xlsx new file mode 100644 index 000000000..228c4590f Binary files /dev/null and b/chart2/qa/extras/data/xlsx/no_marker.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/number-formats.xlsx b/chart2/qa/extras/data/xlsx/number-formats.xlsx new file mode 100644 index 000000000..f5250c52e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/number-formats.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/pie_chart_datapoint_explosion.xlsx b/chart2/qa/extras/data/xlsx/pie_chart_datapoint_explosion.xlsx new file mode 100644 index 000000000..273ebeb82 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/pie_chart_datapoint_explosion.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/piechart_outside.xlsx b/chart2/qa/extras/data/xlsx/piechart_outside.xlsx new file mode 100644 index 000000000..e90eab1e9 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/piechart_outside.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/plotVisOnly.xlsx b/chart2/qa/extras/data/xlsx/plotVisOnly.xlsx new file mode 100644 index 000000000..8e4fcbd5e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/plotVisOnly.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/plot_area_manual_layout.xlsx b/chart2/qa/extras/data/xlsx/plot_area_manual_layout.xlsx new file mode 100644 index 000000000..f0bc58813 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/plot_area_manual_layout.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/rAngAx.xlsx b/chart2/qa/extras/data/xlsx/rAngAx.xlsx new file mode 100644 index 000000000..f6d521a3e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/rAngAx.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx b/chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx new file mode 100644 index 000000000..de5d0391d Binary files /dev/null and b/chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/smoothed_series.xlsx b/chart2/qa/extras/data/xlsx/smoothed_series.xlsx new file mode 100644 index 000000000..bab00ce13 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/smoothed_series.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx b/chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx new file mode 100644 index 000000000..3c8f0cc46 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/strict_chart.xlsx b/chart2/qa/extras/data/xlsx/strict_chart.xlsx new file mode 100644 index 000000000..43789331a Binary files /dev/null and b/chart2/qa/extras/data/xlsx/strict_chart.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf100084.xlsx b/chart2/qa/extras/data/xlsx/tdf100084.xlsx new file mode 100644 index 000000000..5f03f3924 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf100084.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf108107.xlsx b/chart2/qa/extras/data/xlsx/tdf108107.xlsx new file mode 100644 index 000000000..3f86326fa Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf108107.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf111173.xlsx b/chart2/qa/extras/data/xlsx/tdf111173.xlsx new file mode 100644 index 000000000..e62c6747b Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf111173.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf111824.xlsx b/chart2/qa/extras/data/xlsx/tdf111824.xlsx new file mode 100644 index 000000000..ae86756c4 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf111824.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf114139.xlsx b/chart2/qa/extras/data/xlsx/tdf114139.xlsx new file mode 100644 index 000000000..ef09575c1 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf114139.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf115012.xlsx b/chart2/qa/extras/data/xlsx/tdf115012.xlsx new file mode 100644 index 000000000..cf8ac7d81 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf115012.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx b/chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx new file mode 100644 index 000000000..a20aa0bb1 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf122031.xlsx b/chart2/qa/extras/data/xlsx/tdf122031.xlsx new file mode 100644 index 000000000..ac937a8c7 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf122031.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf122915.xlsx b/chart2/qa/extras/data/xlsx/tdf122915.xlsx new file mode 100644 index 000000000..ff20e04ba Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf122915.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf124817.xlsx b/chart2/qa/extras/data/xlsx/tdf124817.xlsx new file mode 100644 index 000000000..d9b09644e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf124817.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf126033.xlsx b/chart2/qa/extras/data/xlsx/tdf126033.xlsx new file mode 100644 index 000000000..ee60103c9 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf126033.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf126115.xlsx b/chart2/qa/extras/data/xlsx/tdf126115.xlsx new file mode 100644 index 000000000..f845c06e3 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf126115.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf127777.xlsx b/chart2/qa/extras/data/xlsx/tdf127777.xlsx new file mode 100644 index 000000000..c04de30fc Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf127777.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf128619.xlsx b/chart2/qa/extras/data/xlsx/tdf128619.xlsx new file mode 100644 index 000000000..e6eb14259 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf128619.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf128627.xlsx b/chart2/qa/extras/data/xlsx/tdf128627.xlsx new file mode 100644 index 000000000..419c1ad2f Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf128627.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf128633.xlsx b/chart2/qa/extras/data/xlsx/tdf128633.xlsx new file mode 100644 index 000000000..fa186895d Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf128633.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf128634.xlsx b/chart2/qa/extras/data/xlsx/tdf128634.xlsx new file mode 100644 index 000000000..91baa780c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf128634.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf128732.xlsx b/chart2/qa/extras/data/xlsx/tdf128732.xlsx new file mode 100644 index 000000000..b92afb1ed Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf128732.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf130657.xlsx b/chart2/qa/extras/data/xlsx/tdf130657.xlsx new file mode 100644 index 000000000..036da200a Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf130657.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf130986.xlsx b/chart2/qa/extras/data/xlsx/tdf130986.xlsx new file mode 100644 index 000000000..9674fd1ab Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf130986.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf132076.xlsx b/chart2/qa/extras/data/xlsx/tdf132076.xlsx new file mode 100644 index 000000000..799ef9c85 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf132076.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsx b/chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsx new file mode 100644 index 000000000..f8cad0e8c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf133376.xlsx b/chart2/qa/extras/data/xlsx/tdf133376.xlsx new file mode 100644 index 000000000..2000733ec Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf133376.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf134225.xlsx b/chart2/qa/extras/data/xlsx/tdf134225.xlsx new file mode 100644 index 000000000..ae7bdc66e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf134225.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf135184RoundLineCap.xlsx b/chart2/qa/extras/data/xlsx/tdf135184RoundLineCap.xlsx new file mode 100644 index 000000000..69cad0d67 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf135184RoundLineCap.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf135184RoundLineCap2.xlsx b/chart2/qa/extras/data/xlsx/tdf135184RoundLineCap2.xlsx new file mode 100644 index 000000000..ced797258 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf135184RoundLineCap2.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf136267.xlsx b/chart2/qa/extras/data/xlsx/tdf136267.xlsx new file mode 100644 index 000000000..741a33c42 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf136267.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdf90876.xlsx b/chart2/qa/extras/data/xlsx/tdf90876.xlsx new file mode 100644 index 000000000..3cf60e816 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf90876.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/tdfPieNumFormat.xlsx b/chart2/qa/extras/data/xlsx/tdfPieNumFormat.xlsx new file mode 100644 index 000000000..0835cb333 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdfPieNumFormat.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/test3DAreaChartZAxis.xlsx b/chart2/qa/extras/data/xlsx/test3DAreaChartZAxis.xlsx new file mode 100644 index 000000000..01c6fe56f Binary files /dev/null and b/chart2/qa/extras/data/xlsx/test3DAreaChartZAxis.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsx b/chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsx new file mode 100644 index 000000000..409389e23 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx b/chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx new file mode 100644 index 000000000..e73d16bd2 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testChartTitlePropertiesBitmapFill.xlsx b/chart2/qa/extras/data/xlsx/testChartTitlePropertiesBitmapFill.xlsx new file mode 100644 index 000000000..9d2dff9b3 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testChartTitlePropertiesBitmapFill.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testChartTitlePropertiesColorFill.xlsx b/chart2/qa/extras/data/xlsx/testChartTitlePropertiesColorFill.xlsx new file mode 100644 index 000000000..9e9aa0bea Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testChartTitlePropertiesColorFill.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testChartTitlePropertiesGradientFill.xlsx b/chart2/qa/extras/data/xlsx/testChartTitlePropertiesGradientFill.xlsx new file mode 100644 index 000000000..b5b617754 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testChartTitlePropertiesGradientFill.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testCombinedChartAxis.xlsx b/chart2/qa/extras/data/xlsx/testCombinedChartAxis.xlsx new file mode 100644 index 000000000..47f8246e2 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testCombinedChartAxis.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testCustomPosDataLabels.xlsx b/chart2/qa/extras/data/xlsx/testCustomPosDataLabels.xlsx new file mode 100644 index 000000000..caa08956c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testCustomPosDataLabels.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testDataPointLabelCustomPos.xlsx b/chart2/qa/extras/data/xlsx/testDataPointLabelCustomPos.xlsx new file mode 100644 index 000000000..69f89ec0e Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testDataPointLabelCustomPos.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx b/chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx new file mode 100644 index 000000000..ba1c526b4 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx b/chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx new file mode 100644 index 000000000..ac9dde9b7 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testTdf130032.xlsx b/chart2/qa/extras/data/xlsx/testTdf130032.xlsx new file mode 100644 index 000000000..03a3dbf40 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testTdf130032.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/testTdf90749.xlsx b/chart2/qa/extras/data/xlsx/testTdf90749.xlsx new file mode 100644 index 000000000..ca3bc806c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/testTdf90749.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/title_character_properties.xlsx b/chart2/qa/extras/data/xlsx/title_character_properties.xlsx new file mode 100644 index 000000000..2a239936c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/title_character_properties.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/title_manual_layout.xlsx b/chart2/qa/extras/data/xlsx/title_manual_layout.xlsx new file mode 100644 index 000000000..c89b2af4d Binary files /dev/null and b/chart2/qa/extras/data/xlsx/title_manual_layout.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/trendline.xlsx b/chart2/qa/extras/data/xlsx/trendline.xlsx new file mode 100644 index 000000000..701fcfd01 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/trendline.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/trendline2007.xlsx b/chart2/qa/extras/data/xlsx/trendline2007.xlsx new file mode 100644 index 000000000..87d4d5a9c Binary files /dev/null and b/chart2/qa/extras/data/xlsx/trendline2007.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/vary_color.xlsx b/chart2/qa/extras/data/xlsx/vary_color.xlsx new file mode 100644 index 000000000..980cdda34 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/vary_color.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/vary_color2007.xlsx b/chart2/qa/extras/data/xlsx/vary_color2007.xlsx new file mode 100644 index 000000000..657c2176d Binary files /dev/null and b/chart2/qa/extras/data/xlsx/vary_color2007.xlsx differ diff --git a/chart2/qa/extras/data/xlsx/xAxisLabelsRotation.xlsx b/chart2/qa/extras/data/xlsx/xAxisLabelsRotation.xlsx new file mode 100644 index 000000000..cf511dfaf Binary files /dev/null and b/chart2/qa/extras/data/xlsx/xAxisLabelsRotation.xlsx differ diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx new file mode 100644 index 000000000..a4f24e666 --- /dev/null +++ b/chart2/qa/extras/xshape/chart2xshape.cxx @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include + +#include + +#include +#include +#include +#include + +#include + +class Chart2XShapeTest : public ChartTest, public XmlTestTools +{ +public: + + void testFdo75075(); + void testPropertyMappingBarChart(); + void testPieChartLabels1(); + void testPieChartLabels2(); + void testPieChartLabels3(); + void testPieChartLabels4(); + void testTdf76649TrendLineBug(); + void testTdf88154LabelRotatedLayout(); + + CPPUNIT_TEST_SUITE(Chart2XShapeTest); + CPPUNIT_TEST(testFdo75075); + CPPUNIT_TEST(testPropertyMappingBarChart); + CPPUNIT_TEST(testPieChartLabels1); + CPPUNIT_TEST(testPieChartLabels2); + CPPUNIT_TEST(testPieChartLabels3); + CPPUNIT_TEST(testPieChartLabels4); + CPPUNIT_TEST(testTdf76649TrendLineBug); + CPPUNIT_TEST(testTdf88154LabelRotatedLayout); + + CPPUNIT_TEST_SUITE_END(); + +private: + + void compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference = false); + OUString getXShapeDumpString(); + xmlDocUniquePtr getXShapeDumpXmlDoc(); +}; + +namespace { + +bool checkDumpAgainstFile( const OUString& rDump, const OUString& aFilePath) +{ + OString aOFile = OUStringToOString(aFilePath, RTL_TEXTENCODING_UTF8); + + CPPUNIT_ASSERT_MESSAGE("dump is empty", !rDump.isEmpty()); + + OString aDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8); + return doXMLDiff(aOFile.getStr(), aDump.getStr(), + static_cast(rDump.getLength()), nullptr); +} + +} + +OUString Chart2XShapeTest::getXShapeDumpString() +{ + uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW); + uno::Reference< qa::XDumper > xDumper( xChartDoc, UNO_QUERY_THROW ); + return xDumper->dump(); +} + +xmlDocUniquePtr Chart2XShapeTest::getXShapeDumpXmlDoc() +{ + OUString rDump = getXShapeDumpString(); + OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8); + return xmlDocUniquePtr(xmlParseDoc(reinterpret_cast(aXmlDump.getStr()))); +} + +void Chart2XShapeTest::compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference) +{ + OUString aDump = getXShapeDumpString(); + + OUString aReference = m_directories.getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile; + if(bCreateReference) + { + OString aOFile = OUStringToOString(aReference, RTL_TEXTENCODING_UTF8); + OString aODump = OUStringToOString(aDump, RTL_TEXTENCODING_UTF8); + std::ofstream aReferenceFile(aOFile.getStr()); + aReferenceFile << aODump; + } + else + { + checkDumpAgainstFile(aDump, aReference); + } +} + +void Chart2XShapeTest::testFdo75075() +{ +#if 0 + load("chart2/qa/extras/xshape/data/ods/", "fdo75075.ods"); + compareAgainstReference("fdo75075.xml"); +#endif +} + +void Chart2XShapeTest::testPropertyMappingBarChart() +{ +#if 0 + load("chart2/qa/extras/xshape/data/ods/", "property-mapping-bar.ods"); + compareAgainstReference("property-mapping-bar.xml"); +#endif +} + +void Chart2XShapeTest::testPieChartLabels1() +{ + // FIXME: the DPI check should be removed when either (1) the test is fixed to work with + // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin. + if (Application::GetDefaultDevice()->GetDPIX() != 96 + || Application::GetDefaultDevice()->GetDPIY() != 96) + return; + + // inside placement for the best fit case + load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-1.xlsx"); + compareAgainstReference("tdf90839-1.xml"); +} + +void Chart2XShapeTest::testPieChartLabels2() +{ + // FIXME: the DPI check should be removed when either (1) the test is fixed to work with + // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin. + if (Application::GetDefaultDevice()->GetDPIX() != 96 + || Application::GetDefaultDevice()->GetDPIY() != 96) + return; + + // text wrap: wrap all text labels except one + load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-2.xlsx"); + compareAgainstReference("tdf90839-2.xml"); +} + +void Chart2XShapeTest::testPieChartLabels3() +{ + // FIXME: the DPI check should be removed when either (1) the test is fixed to work with + // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin. + if (Application::GetDefaultDevice()->GetDPIX() != 96 + || Application::GetDefaultDevice()->GetDPIY() != 96) + return; + + // text wrap: wrap no text label except one + load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-3.xlsx"); + compareAgainstReference("tdf90839-3.xml"); +} + +void Chart2XShapeTest::testPieChartLabels4() +{ + // FIXME: the DPI check should be removed when either (1) the test is fixed to work with + // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin. + if (Application::GetDefaultDevice()->GetDPIX() != 96 + || Application::GetDefaultDevice()->GetDPIY() != 96) + return; + + // data value and percent value are centered horizontally + load("chart2/qa/extras/xshape/data/ods/", "tdf90839-4.ods"); + compareAgainstReference("tdf90839-4.xml"); +} + +void Chart2XShapeTest::testTdf76649TrendLineBug() +{ + // This bug prevents that the trendline (regression curve) is drawn + // if the first cell is empty. See tdf#76649 for details. + + load("chart2/qa/extras/xshape/data/ods/", "tdf76649_TrendLineBug.ods"); + + xmlDocUniquePtr pXmlDoc = getXShapeDumpXmlDoc(); + + // Check if the regression curve exists (which means a XShape with a certain + // name should exist in the dump) + assertXPath(pXmlDoc, "//XShape[@name='CID/D=0:CS=0:CT=0:Series=0:Curve=0']", 1); +} + +void Chart2XShapeTest::testTdf88154LabelRotatedLayout() +{ + load("chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx"); + uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0,6); + uno::Reference< qa::XDumper > xDumper( xChartDoc, UNO_QUERY_THROW ); + OUString rDump = xDumper->dump(); + OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8); + xmlDocUniquePtr pXmlDoc(xmlParseDoc(reinterpret_cast(aXmlDump.getStr()))); + + { + OString aPath( "//XShape[@text='Oct-12']/Transformation" ); + assertXPath(pXmlDoc, aPath, 1); + double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble(); + double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble(); + double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble(); + double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble(); + + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8); + } + { + OString aPath( "//XShape[@text='Nov-12']/Transformation" ); + assertXPath(pXmlDoc, aPath, 1); + double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble(); + double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble(); + double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble(); + double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble(); + + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8); + } + { + OString aPath( "//XShape[@text='Dec-12']/Transformation" ); + assertXPath(pXmlDoc, aPath, 1); + double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble(); + double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble(); + double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble(); + double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble(); + + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8); + } + { + OString aPath( "//XShape[@text='May-13']/Transformation" ); + assertXPath(pXmlDoc, aPath, 1); + double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble(); + double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble(); + double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble(); + double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble(); + + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8); + } + { + OString aPath( "//XShape[@text='Jan-14']/Transformation" ); + assertXPath(pXmlDoc, aPath, 1); + double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble(); + double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble(); + double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble(); + double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble(); + + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8); + } +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Chart2XShapeTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/xshape/data/ods/fdo75075.ods b/chart2/qa/extras/xshape/data/ods/fdo75075.ods new file mode 100644 index 000000000..d2a1be49b Binary files /dev/null and b/chart2/qa/extras/xshape/data/ods/fdo75075.ods differ diff --git a/chart2/qa/extras/xshape/data/ods/property-mapping-bar.ods b/chart2/qa/extras/xshape/data/ods/property-mapping-bar.ods new file mode 100644 index 000000000..1a4e826df Binary files /dev/null and b/chart2/qa/extras/xshape/data/ods/property-mapping-bar.ods differ diff --git a/chart2/qa/extras/xshape/data/ods/tdf76649_TrendLineBug.ods b/chart2/qa/extras/xshape/data/ods/tdf76649_TrendLineBug.ods new file mode 100644 index 000000000..1032e960b Binary files /dev/null and b/chart2/qa/extras/xshape/data/ods/tdf76649_TrendLineBug.ods differ diff --git a/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods b/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods new file mode 100644 index 000000000..fe9950f27 Binary files /dev/null and b/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods differ diff --git a/chart2/qa/extras/xshape/data/pptx/tdf88154_LabelRotatedLayout.pptx b/chart2/qa/extras/xshape/data/pptx/tdf88154_LabelRotatedLayout.pptx new file mode 100644 index 000000000..f3af67765 Binary files /dev/null and b/chart2/qa/extras/xshape/data/pptx/tdf88154_LabelRotatedLayout.pptx differ diff --git a/chart2/qa/extras/xshape/data/reference/fdo75075.xml b/chart2/qa/extras/xshape/data/reference/fdo75075.xml new file mode 100644 index 000000000..93becacff --- /dev/null +++ b/chart2/qa/extras/xshape/data/reference/fdo75075.xml @@ -0,0 +1,1692 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml b/chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml new file mode 100644 index 000000000..cc172969f --- /dev/null +++ b/chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml @@ -0,0 +1,1164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml new file mode 100644 index 000000000..2e255433d --- /dev/null +++ b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml new file mode 100644 index 000000000..46a4d7986 --- /dev/null +++ b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml new file mode 100644 index 000000000..074e3df51 --- /dev/null +++ b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml new file mode 100644 index 000000000..54e0ad187 --- /dev/null +++ b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx b/chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx new file mode 100644 index 000000000..9474de35f Binary files /dev/null and b/chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx differ diff --git a/chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx b/chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx new file mode 100644 index 000000000..9a5b35228 Binary files /dev/null and b/chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx differ diff --git a/chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx b/chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx new file mode 100644 index 000000000..e256c3a0b Binary files /dev/null and b/chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx differ diff --git a/chart2/qa/unit/chart2-dialogs-test.cxx b/chart2/qa/unit/chart2-dialogs-test.cxx new file mode 100644 index 000000000..c37fb1e1b --- /dev/null +++ b/chart2/qa/unit/chart2-dialogs-test.cxx @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include + +using namespace ::com::sun::star; + +/// Test opening a dialog in chart2 +class Chart2DialogsTest : public ScreenshotTest +{ +private: + /// helper method to populate KnownDialogs, called in setUp(). Needs to be + /// written and has to add entries to KnownDialogs + virtual void registerKnownDialogsByID(mapType& rKnownDialogs) override; + + /// dialog creation for known dialogs by ID. Has to be implemented for + /// each registered known dialog + virtual VclPtr createDialogByID(sal_uInt32 nID) override; + +public: + Chart2DialogsTest(); + + // try to open a dialog + void openAnyDialog(); + + CPPUNIT_TEST_SUITE(Chart2DialogsTest); + CPPUNIT_TEST(openAnyDialog); + CPPUNIT_TEST_SUITE_END(); +}; + +Chart2DialogsTest::Chart2DialogsTest() {} + +void Chart2DialogsTest::registerKnownDialogsByID(mapType& /*rKnownDialogs*/) +{ + // fill map of known dialogs +} + +VclPtr Chart2DialogsTest::createDialogByID(sal_uInt32 /*nID*/) +{ + return nullptr; +} + +void Chart2DialogsTest::openAnyDialog() +{ + /// process input file containing the UXMLDescriptions of the dialogs to dump + processDialogBatchFile("chart2/qa/unit/data/chart2-dialogs-test.txt"); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Chart2DialogsTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/unit/common_functor_test.cxx b/chart2/qa/unit/common_functor_test.cxx new file mode 100644 index 000000000..eaa5a29fc --- /dev/null +++ b/chart2/qa/unit/common_functor_test.cxx @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + + +class CommonFunctorsTest : public CppUnit::TestFixture +{ +public: + CPPUNIT_TEST_SUITE(CommonFunctorsTest); + CPPUNIT_TEST(testAnyToString); + CPPUNIT_TEST(testDoubleToString); + CPPUNIT_TEST_SUITE_END(); + + void testAnyToString(); + void testDoubleToString(); + +private: +}; + +void CommonFunctorsTest::testAnyToString() +{ + std::vector aInput; + aInput.emplace_back(2.0); + aInput.emplace_back(10.0); + aInput.emplace_back(12.0); + aInput.emplace_back(15.0); + aInput.emplace_back(25.234); + aInput.emplace_back(123.456); + aInput.emplace_back(0.123450); + + std::vector aOutput; + std::transform(aInput.begin(), aInput.end(), + std::back_inserter(aOutput), chart::CommonFunctors::AnyToString()); + + CPPUNIT_ASSERT_EQUAL(OUString("2"), aOutput[0]); + CPPUNIT_ASSERT_EQUAL(OUString("10"), aOutput[1]); + CPPUNIT_ASSERT_EQUAL(OUString("12"), aOutput[2]); + CPPUNIT_ASSERT_EQUAL(OUString("15"), aOutput[3]); + CPPUNIT_ASSERT_EQUAL(OUString("25.234"), aOutput[4]); + CPPUNIT_ASSERT_EQUAL(OUString("123.456"), aOutput[5]); + CPPUNIT_ASSERT_EQUAL(OUString("0.12345"), aOutput[6]); +} + +void CommonFunctorsTest::testDoubleToString() +{ + std::vector aInput; + aInput.push_back(2.0); + aInput.push_back(10.0); + aInput.push_back(12.0); + aInput.push_back(15.0); + aInput.push_back(25.234); + aInput.push_back(123.456); + aInput.push_back(0.123450); + + std::vector aOutput; + std::transform(aInput.begin(), aInput.end(), + std::back_inserter(aOutput), chart::CommonFunctors::DoubleToOUString()); + + CPPUNIT_ASSERT_EQUAL(OUString("2"), aOutput[0]); + CPPUNIT_ASSERT_EQUAL(OUString("10"), aOutput[1]); + CPPUNIT_ASSERT_EQUAL(OUString("12"), aOutput[2]); + CPPUNIT_ASSERT_EQUAL(OUString("15"), aOutput[3]); + CPPUNIT_ASSERT_EQUAL(OUString("25.234"), aOutput[4]); + CPPUNIT_ASSERT_EQUAL(OUString("123.456"), aOutput[5]); + CPPUNIT_ASSERT_EQUAL(OUString("0.12345"), aOutput[6]); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(CommonFunctorsTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/unit/data/chart2-dialogs-test.txt b/chart2/qa/unit/data/chart2-dialogs-test.txt new file mode 100644 index 000000000..42deae23e --- /dev/null +++ b/chart2/qa/unit/data/chart2-dialogs-test.txt @@ -0,0 +1,69 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +# This file contains all dialogs that the unit tests in the module +# will work on if it is in script mode. It will read one-by-one, +# try to open it and create a screenshot that will be saved in +# workdir/screenshots using the pattern of the ui-file name. +# +# Syntax: +# - empty lines are allowed +# - lines starting with '#' are treated as comment +# - all other lines should contain a *.ui filename in the same +# notation as in the dialog constructors (see code) + +# +# The 'known' dialogs which have a hard-coded representation +# in registerKnownDialogsByID/createDialogByID +# + +# No known dialogs in chart2 for now + +# +# Dialogs without a hard-coded representation. These will +# be visualized using a fallback based on VclBuilder +# + +# currently deactivated, leads to problems and the test to not work +# This is typically a hint that these should be hard-coded in the +# test case since they need some document and model data to work + +modules/schart/ui/datarangedialog.ui +modules/schart/ui/attributedialog.ui +modules/schart/ui/chardialog.ui +modules/schart/ui/paradialog.ui +modules/schart/ui/3dviewdialog.ui +modules/schart/ui/tp_3D_SceneAppearance.ui +modules/schart/ui/tp_3D_SceneGeometry.ui +modules/schart/ui/tp_3D_SceneIllumination.ui +modules/schart/ui/tp_axisLabel.ui +modules/schart/ui/tp_AxisPositions.ui +modules/schart/ui/tp_DataLabel.ui +modules/schart/ui/tp_ErrorBars.ui +modules/schart/ui/tp_LegendPosition.ui +modules/schart/ui/tp_ChartType.ui +modules/schart/ui/tp_PolarOptions.ui +modules/schart/ui/tp_Scale.ui +modules/schart/ui/tp_SeriesToAxis.ui +modules/schart/ui/titlerotationtabpage.ui +modules/schart/ui/tp_Trendline.ui +modules/schart/ui/tp_ChartType.ui +modules/schart/ui/tp_DataSource.ui +modules/schart/ui/tp_RangeChooser.ui +modules/schart/ui/wizelementspage.ui +modules/schart/ui/charttypedialog.ui +modules/schart/ui/chartdatadialog.ui +modules/schart/ui/insertaxisdlg.ui +modules/schart/ui/insertgriddlg.ui +modules/schart/ui/dlg_DataLabel.ui +modules/schart/ui/dlg_InsertErrorBars.ui +modules/schart/ui/dlg_InsertLegend.ui +modules/schart/ui/inserttitledlg.ui +modules/schart/ui/smoothlinesdlg.ui +modules/schart/ui/steppedlinesdlg.ui diff --git a/chart2/qa/unit/data/ods/testChart.ods b/chart2/qa/unit/data/ods/testChart.ods new file mode 100644 index 000000000..956f57d52 Binary files /dev/null and b/chart2/qa/unit/data/ods/testChart.ods differ diff --git a/chart2/qa/unit/data/reference/testChart.xml b/chart2/qa/unit/data/reference/testChart.xml new file mode 100644 index 000000000..03ad3d95f --- /dev/null +++ b/chart2/qa/unit/data/reference/testChart.xml @@ -0,0 +1,1216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/qa/unit/data/tolerance.xml b/chart2/qa/unit/data/tolerance.xml new file mode 100644 index 000000000..b73b0ff15 --- /dev/null +++ b/chart2/qa/unit/data/tolerance.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/chart2/qa/unoapi/knownissues.xcl b/chart2/qa/unoapi/knownissues.xcl new file mode 100644 index 000000000..8321f45d0 --- /dev/null +++ b/chart2/qa/unoapi/knownissues.xcl @@ -0,0 +1,58 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# + +#i83851 +sch.ChXChartDocument::com::sun::star::frame::XModel +#i83833 +sch.ChXChartDocument::com::sun::star::chart::XChartDocument +#i83834 +sch.ChXChartDocument::com::sun::star::chart::ChartTableAddressSupplier + +#i83852 +sch.ChXChartView::com::sun::star::view::XSelectionSupplier + +#i83855 +sch.ChXDiagram::com::sun::star::chart::LineDiagram +#i83853 +sch.ChXDiagram::com::sun::star::beans::XPropertySet +#i83854 +sch.ChXDiagram::com::sun::star::chart::ChartAxisXSupplier +sch.ChXDiagram::com::sun::star::chart::ChartAxisYSupplier +sch.ChXDiagram::com::sun::star::chart::ChartAxisZSupplier +#i83856 +sch.ChXDiagram::com::sun::star::chart::StockDiagram + +sch.ChartLegend::com::sun::star::drawing::XShape +#i83830 +sch.ChartTitle::com::sun::star::drawing::XShape + +#i78867 +sch.ChXChartDocument::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChXChartAxis::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChXDiagram::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChartArea::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChartGrid::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChartLegend::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChartLine::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChartTitle::com::sun::star::xml::UserDefinedAttributesSupplier +sch.ChXDataPoint::com::sun::star::xml::UserDefinedAttributesSupplier + +#i83865 +sch.ChXDataPoint::com::sun::star::drawing::LineProperties +#112078 +sch.ChartLegend::com::sun::star::beans::XPropertySet diff --git a/chart2/qa/unoapi/sch.sce b/chart2/qa/unoapi/sch.sce new file mode 100644 index 000000000..54842bfd7 --- /dev/null +++ b/chart2/qa/unoapi/sch.sce @@ -0,0 +1,42 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +-o sch.ChXChartDocument +#i79073 -o sch.AccArea +#i79073 -o sch.AccAxis +#i79073 -o sch.AccDataPoint +#i79073 -o sch.AccDataSeries +#i79073 -o sch.AccDiagram +#i79073 -o sch.AccFloor +#i79073 -o sch.AccGrid +#i79073 -o sch.AccLegend +#i79073 -o sch.AccLegendEntry +#i79073 -o sch.AccTitle +#i79073 -o sch.AccWall +#i79073 -o sch.AccessibleDocumentView +-o sch.ChXChartAxis +-o sch.ChXChartData +-o sch.ChXChartDataArray +-o sch.ChXChartView +-o sch.ChXDataPoint +#i83868 -o sch.ChXDataRow +-o sch.ChXDiagram +-o sch.ChartArea +-o sch.ChartGrid +-o sch.ChartLegend +-o sch.ChartLine +-o sch.ChartTitle diff --git a/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs b/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs new file mode 100644 index 000000000..c3a5833ae Binary files /dev/null and b/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs differ diff --git a/chart2/qa/unoapi/testdocuments/emptyChart.sds b/chart2/qa/unoapi/testdocuments/emptyChart.sds new file mode 100644 index 000000000..853a44a12 Binary files /dev/null and b/chart2/qa/unoapi/testdocuments/emptyChart.sds differ diff --git a/chart2/qa/unoapi/testdocuments/space-metal.jpg b/chart2/qa/unoapi/testdocuments/space-metal.jpg new file mode 100644 index 000000000..d23344389 Binary files /dev/null and b/chart2/qa/unoapi/testdocuments/space-metal.jpg differ -- cgit v1.2.3